.rb-page {
    padding: 24px;
}

.rb-page__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.rb-page__header h1 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    color: #263244;
}

.rb-page__header p {
    margin: 0;
    color: #6b7280;
}

.rb-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.rb-table-wrap {
    overflow-x: auto;
}

.rb-table {
    width: 100%;
    border-collapse: collapse;
}

.rb-table thead th {
    text-align: left;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.rb-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}

.rb-table tbody tr:hover {
    background: #fafafa;
}

.rb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.rb-row-status {
    margin-top: 6px;
}

.rb-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.rb-btn:hover {
    transform: translateY(-1px);
}

.rb-btn--primary {
    background: #0f172a;
    color: #fff;
}

.rb-btn--dark {
    background: #334155;
    color: #fff;
}

.rb-btn--ghost {
    background: #eef2f7;
    color: #0f172a;
}

.rb-empty {
    text-align: center;
    color: #64748b;
    padding: 24px !important;
}

.rb-empty--error {
    color: #b91c1c;
}

.rb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.rb-badge--ok {
    background: #dcfce7;
    color: #166534;
}

.rb-badge--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.rb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.rb-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.rb-modal__dialog {
    position: relative;
    width: min(1100px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    z-index: 1;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.28);
}

.rb-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 26px;
    cursor: pointer;
}

.rb-modal__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-right: 40px;
}

.rb-modal__header h2 {
    margin: 0 0 6px;
    color: #263244;
}

.rb-modal__header p {
    margin: 0;
    color: #64748b;
}

.rb-resumen-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.rb-resumen-item {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}

.rb-resumen-item span {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.rb-resumen-item strong {
    font-size: 24px;
    color: #1e293b;
}

.rb-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.rb-tab {
    border: 1px solid #dbe4ee;
    background: #fff;
    color: #475569;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

.rb-tab.is-active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.rb-panel {
    display: none;
}

.rb-panel.is-active {
    display: block;
}

.rb-mov {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.rb-mov--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.rb-mov--danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.rb-mov--warning {
    background: #fff7ed;
    border-color: #fed7aa;
}

.rb-mov__left strong {
    display: block;
    margin-bottom: 6px;
    color: #1e293b;
}

.rb-mov__left p {
    margin: 0 0 6px;
    color: #475569;
}

.rb-mov__left small {
    color: #64748b;
}

.rb-mov__right {
    text-align: right;
    min-width: 150px;
}

.rb-mov__right span {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
}

.rb-mov__right strong {
    font-size: 20px;
    color: #0f172a;
}

.rb-alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 600;
}

.rb-alert--warning {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.rb-cuadre-box {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
}

.rb-cuadre-table {
    width: 100%;
    border-collapse: collapse;
}

.rb-cuadre-table thead th,
.rb-cuadre-table tfoot th,
.rb-cuadre-table tfoot td {
    background: #f8fafc;
    font-weight: 800;
}

.rb-cuadre-table th,
.rb-cuadre-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
}

.rb-medio strong {
    display: block;
    color: #1e293b;
}

.rb-medio small {
    color: #64748b;
}

.is-ok {
    color: #15803d;
    font-weight: 800;
}

.is-up {
    color: #2563eb;
    font-weight: 800;
}

.is-down {
    color: #dc2626;
    font-weight: 800;
}

@media (max-width: 960px) {
    .rb-resumen-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rb-modal__dialog {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .rb-page {
        padding: 14px;
    }

    .rb-page__header {
        flex-direction: column;
        align-items: stretch;
    }

    .rb-resumen-grid {
        grid-template-columns: 1fr;
    }

    .rb-mov {
        flex-direction: column;
    }

    .rb-mov__right {
        text-align: left;
    }
}

.rb-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rb-filter {
    position: relative;
}

.rb-filter__trigger {
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rb-filter__caret {
    font-size: 14px;
    line-height: 1;
}

.rb-filter__menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    padding: 8px;
    z-index: 50;
}

.rb-filter__menu.is-open {
    display: block;
}

.rb-filter__option {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

.rb-filter__option:hover {
    background: #f8fafc;
}

.rb-filter-panel {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 18px;
}

.rb-filter-panel__header h3 {
    margin: 0 0 6px;
    color: #263244;
}

.rb-filter-panel__header p {
    margin: 0;
    color: #64748b;
}

.rb-filter-panel__body {
    margin-top: 16px;
}

.rb-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rb-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rb-field label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.rb-input,
.rb-select {
    width: 100%;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    padding: 11px 14px;
    background: #fff;
    color: #0f172a;
    outline: none;
}

.rb-input:focus,
.rb-select:focus {
    border-color: #334155;
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.08);
}

@media (max-width: 960px) {
    .rb-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .rb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rb-filter__trigger {
        width: 100%;
    }

    .rb-filter__menu {
        left: 0;
        right: 0;
        min-width: 100%;
    }

    .rb-filter-grid {
        grid-template-columns: 1fr;
    }
}


.rb-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rb-filter {
    position: relative;
}

.rb-filter__trigger {
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rb-filter__caret {
    font-size: 12px;
    line-height: 1;
}

.rb-filter__menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 92vw);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
    padding: 16px;
    z-index: 100;
}

.rb-filter__menu.is-open {
    display: block;
}

.rb-filter__title {
    font-size: 13px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 12px;
}

.rb-filter__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.rb-filter__option {
    width: 100%;
    border: 1px solid #dbe4ee;
    background: #fff;
    text-align: left;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: 0.2s ease;
}

.rb-filter__option:hover,
.rb-filter__option.is-active {
    background: #f8fafc;
    border-color: #94a3b8;
}

.rb-filter__fields {
    border-top: 1px solid #eef2f7;
    padding-top: 14px;
    margin-top: 8px;
}

.rb-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rb-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rb-field--full {
    grid-column: 1 / -1;
}

.rb-field label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.rb-input,
.rb-select {
    width: 100%;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    padding: 11px 14px;
    background: #fff;
    color: #0f172a;
    outline: none;
}

.rb-input:focus,
.rb-select:focus {
    border-color: #334155;
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.08);
}

.rb-filter__footer {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

@media (max-width: 640px) {
    .rb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rb-filter__trigger {
        width: 100%;
    }

    .rb-filter__menu {
        left: 0;
        right: 0;
        width: 100%;
    }

    .rb-filter-grid {
        grid-template-columns: 1fr;
    }

    .rb-filter__footer {
        flex-direction: column;
    }
}


.rb-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #475569;
}

.rb-pagination__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rb-pagination__controls strong {
    min-width: 110px;
    text-align: center;
    color: #1e293b;
}

.rb-pagination .rb-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.rb-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 640px) {
    .rb-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .rb-pagination__controls {
        justify-content: space-between;
    }
}

/* Detalle visible de la respuesta del SII */
.rb-system-message {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 15px;
    line-height: 1.5;
}

.rb-system-message[hidden] {
    display: none !important;
}

.rb-system-message strong {
    display: block;
    font-size: 17px;
    margin-bottom: 5px;
}

.rb-system-message__detail {
    overflow-wrap: anywhere;
}

.rb-system-message--danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.rb-system-message--ok {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.rb-system-message--warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.rb-error-detail-row td {
    padding-top: 0 !important;
    background: #fffafa;
}

.rb-error-detail-row:hover {
    background: #fffafa !important;
}

.rb-sii-error-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
}

.rb-sii-error-box__icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #dc2626;
    color: #fff;
    font-weight: 900;
}

.rb-sii-error-box strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.rb-sii-error-box p {
    margin: 0;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}


/* Motivo SII visible dentro de la misma columna Estado */
.rb-inline-error {
    margin-top: 10px;
    padding: 10px 11px;
    max-width: 300px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.rb-inline-error strong {
    display: block;
    margin-bottom: 3px;
}

/* Diagnóstico explicativo del estado y errores SII */
.rb-sii-diagnostic {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid #fecaca;
    border-radius: 16px;
    background: #fff7f7;
    color: #7f1d1d;
}

.rb-sii-diagnostic--warning {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #78350f;
}

.rb-sii-diagnostic--ok {
    border-color: #86efac;
    background: #f0fdf4;
    color: #14532d;
}

.rb-sii-diagnostic__icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #dc2626;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.rb-sii-diagnostic--warning .rb-sii-diagnostic__icon {
    background: #d97706;
}

.rb-sii-diagnostic--ok .rb-sii-diagnostic__icon {
    background: #16a34a;
}

.rb-sii-diagnostic__content {
    min-width: 0;
    flex: 1;
}

.rb-sii-diagnostic__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.rb-sii-diagnostic__header strong {
    font-size: 17px;
}

.rb-sii-diagnostic__header span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid currentColor;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.rb-sii-diagnostic__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rb-sii-diagnostic__grid > div {
    padding: 13px 14px;
    border: 1px solid rgba(127, 29, 29, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.64);
}

.rb-sii-diagnostic__label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rb-sii-diagnostic__grid p {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rb-sii-error-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.rb-sii-error-item {
    padding: 14px;
    border: 1px solid #fecaca;
    border-radius: 13px;
    background: #fff;
    color: #7f1d1d;
}

.rb-sii-error-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.rb-sii-error-item__code,
.rb-sii-error-item__section {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    font-size: 11px;
    font-weight: 900;
}

.rb-sii-error-item__section {
    background: #f8fafc;
    color: #475569;
}

.rb-sii-error-item > strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.rb-sii-error-item p {
    margin: 0 0 7px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.rb-sii-error-item__reported {
    font-weight: 800;
}

.rb-sii-error-item__review {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #fee2e2;
    line-height: 1.45;
}

.rb-sii-free-text {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .rb-sii-diagnostic__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rb-sii-diagnostic__header span {
        text-align: left;
    }

    .rb-sii-diagnostic__grid {
        grid-template-columns: 1fr;
    }
}

/* 2026-09-17: filtros compactos para priorizar la tabla. */
@media (min-width: 900px) {
  #reporteBoletasElectronicasApp .rb-filter-grid { grid-template-columns: 140px 140px minmax(180px, 1fr) minmax(220px, 1.5fr) 160px; gap: 10px; align-items: end; }
  #reporteBoletasElectronicasApp .rb-card:has(.rb-filter-grid) { padding: 12px 14px !important; margin-bottom: 10px !important; }
  #reporteBoletasElectronicasApp .rb-field { gap: 4px; }
  #reporteBoletasElectronicasApp .rb-field label { font-size: 11px; }
  #reporteBoletasElectronicasApp .rb-input, #reporteBoletasElectronicasApp .rb-select { padding: 8px 10px; min-height: 38px; }
}

/* VASE 2026-09-17 · reporte operativo de caja */
.rb-table {
    min-width: 1780px;
}

.rb-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
}

.rb-table tbody td {
    white-space: nowrap;
}

.rb-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.rb-badge--neutral {
    background: #e2e8f0;
    color: #334155;
}

.rb-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.rb-open-diff {
    font-weight: 800;
    color: #b45309;
}

.rb-resumen-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .rb-resumen-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* 2026-09-17 · Tabla principal simplificada: el detalle completo queda en “Ver”. */
.rb-table {
    min-width: 980px;
}
.rb-table thead th,
.rb-table tbody td {
    white-space: nowrap;
}
.rb-table tbody td:nth-child(2) {
    white-space: normal;
    min-width: 150px;
}
.rb-diff-ok {
    color: #15803d;
    font-weight: 800;
}
.rb-diff-alert {
    color: #b42318;
    font-weight: 900;
}


/* VASE 10K · Reporte de boletas: diseño aislado del resto de reportes. */
#reporteBoletasElectronicasApp { padding: 18px 18px 30px; min-width: 0; }
#reporteBoletasElectronicasApp .rb-page__header { margin-bottom: 16px; }
#reporteBoletasElectronicasApp .rb-page__header h1 { color: #083f35; font-size: clamp(24px, 2vw, 32px); line-height: 1.13; font-weight: 850; }
#reporteBoletasElectronicasApp .rb-page__header p { color: #64748b; font-size: 14px; }
.rb-dte-kicker { font-size: 11px; font-weight: 900; letter-spacing: .10em; color: #0b8d65; margin-bottom: 8px; }
#reporteBoletasElectronicasApp .rb-btn--primary { background: #087a53; color: white; }
#reporteBoletasElectronicasApp .rb-btn--primary:hover { background: #086a49; }
.rb-dte-help { display: flex; gap: 13px; align-items: center; border: 1px solid #b9e4ce; background: #f4fbf7; border-radius: 15px; padding: 13px 16px; margin-bottom: 15px; color: #115840; }
.rb-dte-help__mark { width: 33px; height: 33px; flex: 0 0 33px; border-radius: 11px; display:grid; place-items:center; font-weight:900; background:#d9f7e7; }
.rb-dte-help > div:nth-child(2) { min-width:0; flex: 1; }
.rb-dte-help strong { font-size:14px; }
.rb-dte-help p { margin: 3px 0 0; font-size: 12px; line-height: 1.55; color: #45635a; }
.rb-dte-help__link { font-size:12px; font-weight:800; flex-shrink: 0; color:#0a6649; text-decoration:none; padding:8px 11px; border:1px solid #cae7d8; border-radius:9px; background:white; }
.rb-dte-filters { padding: 15px !important; margin-bottom: 15px !important; }
#reporteBoletasElectronicasApp .rb-dte-summary { margin-bottom: 15px; }
.rb-dte-list__heading { padding:16px 18px; border-bottom:1px solid #e5ecea; background:#fff; }
.rb-dte-list__heading strong { color:#0f473b; font-size:17px; display:block; }
.rb-dte-list__heading span { font-size:12px; color:#688179; display:block; margin-top:4px; }
#reporteBoletasElectronicasApp .rb-dte-table { min-width: 940px; table-layout: auto; }
#reporteBoletasElectronicasApp .rb-dte-table thead th { padding: 13px 11px; font-size:11px; letter-spacing:.025em; background:#f5f8f7; color:#577268; }
#reporteBoletasElectronicasApp .rb-dte-main-row td { padding: 15px 11px; border-bottom:1px solid #e7eeea; font-size:13px; color:#24433c; vertical-align:middle; white-space:normal; }
#reporteBoletasElectronicasApp .rb-dte-main-row:hover { background:#fbfefd; }
#reporteBoletasElectronicasApp .rb-dte-table .rb-badge { font-size:11px; padding:6px 10px; }
.rb-dte-folio,.rb-dte-total { font-size: 15px !important; font-weight: 850; color:#0c4937 !important; font-variant-numeric: tabular-nums; }
.rb-dte-muted { display:block; margin-top:4px; color:#899c96; font-size:11px; }
.rb-dte-track { display:inline-block; font-variant-numeric:tabular-nums; color:#38574e; font-size:12px; overflow-wrap:anywhere; }
.rb-dte-status { display:flex; align-items:flex-start; flex-direction:column; gap:5px; max-width:210px; }
.rb-dte-status > small[style] { margin-top: 0 !important; max-width:100% !important; overflow-wrap:anywhere; font-size:11px; color:#77857f; }
.rb-dte-counts { font-size:10px; color:#556d62; font-weight:700; }
.rb-dte-status__reason { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-width:100%; font-size:11px; line-height:1.4; color:#a44444; }
.rb-dte-actions { display:flex; flex-direction:column; align-items:stretch; gap:7px; min-width:125px; }
.rb-dte-consult { font-size:12px; padding:10px 11px; border-radius:10px; white-space:nowrap; }
.rb-dte-action-menu { position:relative; font-size:12px; }
.rb-dte-action-menu summary { list-style:none; cursor:pointer; border:1px solid #dce8e2; border-radius:9px; background:#fff; padding:8px 10px; color:#1a5847; font-weight:750; text-align:center; }
.rb-dte-action-menu summary::-webkit-details-marker { display:none; }
.rb-dte-action-menu[open] summary { background:#edf7f1; }
.rb-dte-action-menu__items { display:grid; gap:4px; padding:7px; margin-top:5px; background:#fff; border:1px solid #dce8e2; border-radius:10px; box-shadow:0 6px 20px rgba(10,64,47,.07); }
.rb-dte-action-menu__items a,.rb-dte-action-link { color:#164a3b; text-align:left; border:0; background:transparent; padding:9px 8px; border-radius:7px; text-decoration:none; font-size:12px; cursor:pointer; font-weight:700; white-space:normal; }
.rb-dte-action-menu__items a:hover,.rb-dte-action-link:hover { background:#f2f8f5; }
.rb-dte-action-link--danger { color:#a55332; }
#reporteBoletasElectronicasApp .rb-dte-detail-row td { padding:0 12px 12px !important; background:#fff; border-bottom:1px solid #e5eee8; white-space:normal; }
.rb-dte-diagnostic { border:1px solid #f0d5d5; background:#fffafa; border-radius:12px; max-width:100%; overflow:hidden; }
.rb-dte-diagnostic summary { cursor:pointer; padding:11px 13px; display:flex; justify-content:space-between; align-items:center; gap:10px; color:#8a3030; list-style:none; }
.rb-dte-diagnostic summary::-webkit-details-marker { display:none; }
.rb-dte-diagnostic__left { display:flex; align-items:center; gap:10px; min-width:0; }
.rb-dte-diagnostic__left b { display:block; font-size:12px; }
.rb-dte-diagnostic__left small { color:#a26969; display:block; margin-top:3px; font-size:11px; overflow-wrap:anywhere; }
.rb-dte-diagnostic__dot { display:grid; place-items:center; width:25px; height:25px; flex:0 0 25px; border-radius:50%; background:#fce4e4; font-weight:900; }
.rb-dte-diagnostic__chevron { font-size:22px; transition:transform .2s; }
.rb-dte-diagnostic[open] .rb-dte-diagnostic__chevron { transform:rotate(180deg); }
.rb-dte-diagnostic__body { padding:0 13px 14px; }
.rb-dte-diagnostic__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.rb-dte-diagnostic__grid section { border:1px solid #f1e3e3; padding:12px; border-radius:10px; background:#fff; min-width:0; }
.rb-dte-diagnostic__grid h3 { color:#954343; font-size:11px; margin:0 0 6px; font-weight:850; text-transform:uppercase; }
.rb-dte-diagnostic__grid p,.rb-dte-diagnostic__body p { font-size:12px; line-height:1.55; overflow-wrap:anywhere; white-space:normal; margin:0; }
#reporteBoletasElectronicasApp .rb-sii-error-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:10px; }
#reporteBoletasElectronicasApp .rb-sii-error-item { background:white; border-color:#f1e0e0; color:#71423b; }
#reporteBoletasElectronicasApp .rb-sii-error-item p { margin-top:6px; overflow-wrap:anywhere; font-weight:400; }
.rb-dte-free-text { margin-top:10px !important; white-space:pre-wrap; }
@media (max-width:1100px) {
  #reporteBoletasElectronicasApp .rb-dte-table { min-width: 900px; }
  .rb-dte-help { align-items:flex-start; }
}
@media (max-width:760px) {
  #reporteBoletasElectronicasApp { padding:12px 10px 24px; }
  #reporteBoletasElectronicasApp .rb-page__header { align-items:stretch; }
  #reporteBoletasElectronicasApp .rb-page__header .rb-toolbar { flex-direction:row; }
  #reporteBoletasElectronicasApp .rb-page__header .rb-btn { flex:1; text-align:center; }
  .rb-dte-help { flex-wrap:wrap; padding:12px; }
  .rb-dte-help__link { width:100%; text-align:center; }
  #reporteBoletasElectronicasApp .rb-dte-filters { padding:12px !important; }
  #reporteBoletasElectronicasApp .rb-resumen-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #reporteBoletasElectronicasApp .rb-resumen-item { padding:13px; }
  #reporteBoletasElectronicasApp .rb-resumen-item strong { font-size:22px; }
  #reporteBoletasElectronicasApp .rb-table-wrap { overflow:visible; }
  #reporteBoletasElectronicasApp .rb-dte-table { min-width:0; display:block; width:100%; }
  #reporteBoletasElectronicasApp .rb-dte-table thead { display:none; }
  #reporteBoletasElectronicasApp .rb-dte-table tbody { display:block; padding:10px; }
  #reporteBoletasElectronicasApp .rb-dte-main-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 8px; border:1px solid #dce8e2; border-radius:13px; padding:13px; background:white; }
  #reporteBoletasElectronicasApp .rb-dte-main-row td { display:block; border:0; padding:0 !important; min-width:0; font-size:12px; }
  #reporteBoletasElectronicasApp .rb-dte-main-row td::before { content:attr(data-label); display:block; color:#849790; font-size:10px; font-weight:750; margin-bottom:5px; }
  #reporteBoletasElectronicasApp .rb-dte-main-row td:nth-child(4),
  #reporteBoletasElectronicasApp .rb-dte-main-row td:nth-child(7),
  #reporteBoletasElectronicasApp .rb-dte-main-row td:nth-child(9) { grid-column:1 / -1; }
  #reporteBoletasElectronicasApp .rb-dte-main-row td:nth-child(4),
  #reporteBoletasElectronicasApp .rb-dte-main-row td:nth-child(7),
  #reporteBoletasElectronicasApp .rb-dte-main-row td:nth-child(9) { padding-top:10px !important; border-top:1px solid #ecf1ed; }
  #reporteBoletasElectronicasApp .rb-dte-status { max-width:100%; }
  #reporteBoletasElectronicasApp .rb-dte-actions { flex-direction:row; }
  #reporteBoletasElectronicasApp .rb-dte-consult { flex:1; }
  #reporteBoletasElectronicasApp .rb-dte-action-menu { flex:1; }
  #reporteBoletasElectronicasApp .rb-dte-detail-row { display:block; margin-bottom:11px; }
  #reporteBoletasElectronicasApp .rb-dte-detail-row td { display:block; padding:0 4px !important; }
  #reporteBoletasElectronicasApp .rb-dte-diagnostic { border-radius:0 0 10px 10px; margin:0 5px; }
  .rb-dte-diagnostic__grid { grid-template-columns:1fr; }
  #reporteBoletasElectronicasApp .rb-dte-table .rb-empty { display:block; }
}

/* Anulación tributaria: confirmación explícita y accesible, sin confirm() nativo. */
.rb-dte-anular { background: #154e3e; color: #fff; border: 1px solid #154e3e; }
.rb-dte-anular:hover { background: #0c3b2e; }
.rb-dte-nc-aviso { color: #9a3412; font-size: 12px; }
.rb-nc-modal[hidden] { display: none !important; }
.rb-nc-modal { position: fixed; inset: 0; z-index: 30000; background: rgba(14, 28, 38, .63); display: flex; align-items: center; justify-content: center; padding: 18px; }
.rb-nc-modal__panel { background: #fff; width: min(100%, 510px); max-height: 90vh; overflow-y: auto; padding: 26px; border-radius: 16px; box-shadow: 0 20px 55px #0004; }
.rb-nc-modal__panel h2 { margin: 0 0 12px; color: #183f34; font-size: 21px; }
.rb-nc-modal__panel p { margin: 0 0 14px; color: #334155; line-height: 1.5; }
.rb-nc-modal__panel .rb-nc-modal__aviso { background: #fff7ed; color: #78350f; border-radius: 10px; padding: 12px; font-size: 13px; }
.rb-nc-modal__acciones { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
