:root {
    --blue: #0B3D91;
    --blue-dark: #061E45;
    --blue-mid: #123B73;
    --blue-soft: #EAF1FF;
    --gold: #D4AF37;
    --gold-soft: #FFF6D8;
    --white: #FFFFFF;
    --bg: #F4F7FB;
    --text: #172033;
    --muted: #667085;
    --border: #DFE7F2;
    --success: #16A34A;
    --warning: #F59E0B;
    --danger: #DC2626;
    --purple: #7C3AED;
    --cyan: #0891B2;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
    --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.16);
    --sidebar-width: 280px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 28%), radial-gradient(circle at bottom left, rgba(11, 61, 145, 0.10), transparent 30%), var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

    button:disabled,
    input:disabled,
    select:disabled,
    textarea:disabled {
        cursor: not-allowed;
        opacity: 0.68;
    }

input,
select,
textarea {
    min-width: 0;
}

textarea {
    resize: vertical;
}

strong {
    font-weight: 950;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
}

.sidebar {
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
    background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 32%), linear-gradient(180deg, var(--blue-dark), #08295C);
    color: var(--white);
    padding: 22px;
    display: flex;
    flex-direction: column;
    z-index: 80;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 34px;
}

.brand-badge {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: var(--gold);
    color: var(--blue-dark);
    display: grid;
    place-items: center;
    font-weight: 950;
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.24);
    flex: 0 0 auto;
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}

.sidebar-brand strong {
    font-size: 18px;
}

.sidebar-brand span {
    color: #CBD5E1;
    font-size: 13px;
    margin-top: 3px;
    line-height: 1.35;
}

.sidebar-nav {
    display: grid;
    gap: 9px;
}

    .sidebar-nav a,
    .sidebar-footer a {
        min-height: 48px;
        padding: 0 14px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        color: #E5E7EB;
        font-weight: 850;
        transition: 0.2s ease;
    }

        .sidebar-nav a:hover,
        .sidebar-nav a.active,
        .sidebar-footer a:hover {
            background: rgba(255, 255, 255, 0.13);
            color: var(--white);
            transform: translateX(3px);
        }

        .sidebar-nav a.active {
            box-shadow: inset 4px 0 0 var(--gold);
        }

    .sidebar-nav span,
    .sidebar-footer span {
        color: var(--gold);
    }

.sidebar-footer {
    margin-top: auto;
}

    .sidebar-footer a {
        color: #FECACA;
    }

.main {
    padding: 28px;
    overflow: hidden;
}

.topbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(223, 231, 242, 0.85);
    border-radius: 28px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.menu-button {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    display: none;
    place-items: center;
    flex: 0 0 auto;
}

    .menu-button:hover {
        background: var(--blue);
        color: var(--white);
    }

.page-kicker {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.topbar h1 {
    font-size: clamp(26px, 4vw, 34px);
    color: var(--blue-dark);
    letter-spacing: -0.035em;
}

.topbar p {
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
    min-height: 46px;
    padding: 0 15px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 950;
    transition: 0.2s ease;
    white-space: nowrap;
}

.primary-button {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 14px 32px rgba(11, 61, 145, 0.22);
}

    .primary-button:hover:not(:disabled) {
        background: var(--blue-dark);
        transform: translateY(-2px);
    }

.secondary-button,
.ghost-button {
    background: var(--blue-soft);
    color: var(--blue);
}

    .secondary-button:hover:not(:disabled),
    .ghost-button:hover:not(:disabled) {
        background: #DDEAFF;
        transform: translateY(-2px);
    }

.danger-button {
    background: #FEE2E2;
    color: #991B1B;
}

    .danger-button:hover:not(:disabled) {
        background: #FECACA;
        transform: translateY(-2px);
    }

    .primary-button span,
    .secondary-button span,
    .ghost-button span,
    .danger-button span {
        font-size: 21px;
    }

.hero-summary {
    position: relative;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.24), transparent 26%), linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
    color: var(--white);
    border-radius: 32px;
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    margin-bottom: 24px;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold);
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 950;
    margin-bottom: 18px;
}

    .summary-pill span {
        font-size: 20px;
    }

.hero-summary h2 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    max-width: 850px;
}

.hero-summary p {
    color: #D8E2F0;
    margin-top: 14px;
    max-width: 760px;
    line-height: 1.7;
}

    .hero-summary p strong {
        color: var(--white);
    }

.summary-card {
    width: 260px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    padding: 24px;
}

    .summary-card > span {
        color: var(--gold);
        font-size: 46px;
    }

    .summary-card strong,
    .summary-card small {
        display: block;
    }

    .summary-card strong {
        font-size: 22px;
        margin: 12px 0 6px;
        color: var(--white);
    }

    .summary-card small {
        color: #D8E2F0;
    }

.stats-grid,
.reports-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.stats-grid {
    grid-template-columns: repeat(3, 1fr);
}

.reports-grid {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card,
.report-card,
.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.22s ease;
}

    .stat-card:hover,
    .report-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-strong);
    }

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

    .stat-icon span {
        font-size: 34px;
    }

    .stat-icon.total {
        background: #EAF1FF;
        color: var(--blue);
    }

    .stat-icon.pending {
        background: #FEF3C7;
        color: #92400E;
    }

    .stat-icon.review {
        background: #EDE9FE;
        color: #5B21B6;
    }

    .stat-icon.paid {
        background: #DCFCE7;
        color: #166534;
    }

    .stat-icon.cancelled {
        background: #FEE2E2;
        color: #991B1B;
    }

.stat-card span {
    color: var(--muted);
    font-weight: 850;
}

.stat-card strong {
    display: block;
    color: var(--blue-dark);
    font-size: 34px;
    line-height: 1;
    margin-top: 8px;
}

.report-card {
    padding: 22px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    transition: 0.22s ease;
}

    .report-card > span {
        width: 54px;
        height: 54px;
        border-radius: 18px;
        display: grid;
        place-items: center;
        font-size: 32px;
    }

    .report-card.pending > span {
        background: #FEF3C7;
        color: #92400E;
    }

    .report-card.review > span {
        background: #EDE9FE;
        color: #5B21B6;
    }

    .report-card.paid > span {
        background: #DCFCE7;
        color: #166534;
    }

    .report-card.cancelled > span {
        background: #FEE2E2;
        color: #991B1B;
    }

    .report-card h3 {
        color: var(--blue-dark);
        font-size: 19px;
    }

    .report-card p {
        color: var(--muted);
        margin-top: 4px;
        line-height: 1.5;
    }

.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

    .report-actions button {
        min-height: 38px;
        padding: 0 13px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        font-weight: 900;
        background: var(--blue-soft);
        color: var(--blue);
        transition: 0.2s ease;
    }

        .report-actions button span {
            font-size: 20px;
        }

        .report-actions button:hover {
            transform: translateY(-2px);
            background: var(--blue);
            color: var(--white);
        }

.panel {
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

    .panel-header h2 {
        color: var(--blue-dark);
        font-size: 24px;
        letter-spacing: -0.025em;
    }

    .panel-header p {
        color: var(--muted);
        margin-top: 5px;
        line-height: 1.55;
    }

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.search-box {
    min-height: 52px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

    .search-box span {
        color: var(--blue);
    }

    .search-box input {
        border: none;
        outline: none;
        background: transparent;
        width: 100%;
        color: var(--text);
        font-weight: 750;
    }

        .search-box input::placeholder {
            color: #98A2B3;
        }

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    min-height: 42px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--blue-dark);
    border: 1px solid var(--border);
    font-weight: 900;
    transition: 0.2s ease;
}

    .filter-btn:hover,
    .filter-btn.active {
        background: var(--blue);
        color: var(--white);
        border-color: var(--blue);
    }

.table-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

    .table-meta div {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--muted);
        font-weight: 850;
    }

        .table-meta div span:first-child {
            color: var(--blue);
        }

.sort-select {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 13px;
    background: var(--bg);
    color: var(--blue-dark);
    font-weight: 850;
    outline: none;
}

    .sort-select:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.12);
        background: var(--white);
    }

.table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1120px;
}

    .data-table th,
    .data-table td {
        padding: 15px 13px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        vertical-align: middle;
    }

    .data-table th {
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        font-weight: 950;
        background: #FAFCFF;
    }

    .data-table td {
        color: var(--text);
        font-size: 14px;
    }

    .data-table tr:hover td {
        background: #FAFCFF;
    }

    .data-table td > strong,
    .data-table td > small {
        display: block;
    }

    .data-table td > small {
        color: var(--muted);
        margin-top: 4px;
        line-height: 1.45;
    }

.payment-cell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.payment-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.payment-info strong,
.payment-info small {
    display: block;
}

.payment-info strong {
    color: var(--blue-dark);
    line-height: 1.3;
}

.payment-info small {
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.35;
    word-break: break-word;
}

.money {
    color: var(--blue-dark);
    font-weight: 950;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    text-transform: none;
    line-height: 1.15;
    white-space: nowrap;
}

.badge-pagado,
.badge-paid,
.badge-confirmable,
.badge-valido,
.badge-validado {
    background: #DCFCE7;
    color: #166534;
}

.badge-pendiente,
.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-en_revision,
.badge-review,
.badge-revision {
    background: #EDE9FE;
    color: #5B21B6;
}

.badge-rechazado,
.badge-vencido,
.badge-cancelado,
.badge-cancelled,
.badge-rejected,
.badge-invalido,
.badge-invalid,
.badge-error_tipo {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-no_requerido,
.badge-not_required,
.badge-no_required {
    background: #E0F2FE;
    color: #075985;
}

.badge-sin_coincidencia,
.badge-no_match {
    background: #F1F5F9;
    color: #475569;
}

.badge-pagado,
.badge-invalido,
.badge-confirmable,
.badge-sin_coincidencia,
.badge-error_tipo {
    text-transform: none;
}

.receipt-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    background: var(--blue-soft);
    color: var(--blue);
    line-height: 1.15;
    white-space: nowrap;
}

    .receipt-badge span {
        font-size: 17px;
    }

    .receipt-badge.empty {
        background: var(--bg);
        color: var(--muted);
    }

.action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.icon-action {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 900;
    transition: 0.2s ease;
}

    .icon-action span {
        font-size: 19px;
    }

    .icon-action.edit {
        background: var(--blue-soft);
        color: var(--blue);
    }

    .icon-action.approve {
        background: #DCFCE7;
        color: #166534;
    }

    .icon-action.delete {
        background: #FEE2E2;
        color: #991B1B;
    }

    .icon-action.reject {
        background: #FEF3C7;
        color: #92400E;
    }

    .icon-action:hover {
        transform: translateY(-2px);
    }

.empty-message {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 20px;
    color: var(--muted);
    font-weight: 850;
    text-align: center;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-weight: 850;
    line-height: 1.5;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

.alert-info {
    background: var(--blue-soft);
    color: var(--blue);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
}

.payment-modal,
.excel-modal {
    width: min(900px, calc(100% - 32px));
    max-height: calc(100vh - 34px);
    border: none;
    border-radius: 30px;
    padding: 0;
    background: transparent;
    margin: auto;
    overflow: visible;
}

.excel-modal {
    width: min(1120px, calc(100% - 32px));
}

    .payment-modal::backdrop,
    .excel-modal::backdrop {
        background: rgba(8, 31, 69, 0.74);
        backdrop-filter: blur(8px);
    }

.modal-card {
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.10), transparent 24%), var(--white);
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--shadow-strong);
    position: relative;
    max-height: calc(100vh - 34px);
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    transition: 0.2s ease;
    z-index: 2;
}

    .modal-close:hover {
        background: var(--blue);
        color: var(--white);
    }

.modal-heading {
    margin-bottom: 24px;
    max-width: 760px;
}

.modal-kicker {
    color: var(--gold);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.modal-heading h2 {
    font-size: clamp(30px, 5vw, 46px);
    color: var(--blue-dark);
    letter-spacing: -0.045em;
    line-height: 1.04;
    margin: 10px 52px 10px 0;
}

.modal-heading p {
    color: var(--muted);
    line-height: 1.7;
}

    .modal-heading p strong {
        color: var(--blue-dark);
    }

.payment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

    .form-group label {
        color: var(--blue-dark);
        font-weight: 900;
        font-size: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        border: 1px solid var(--border);
        background: var(--bg);
        border-radius: 16px;
        padding: 13px 14px;
        outline: none;
        color: var(--text);
        transition: 0.2s ease;
        font-weight: 750;
    }

    .form-group textarea {
        min-height: 104px;
        line-height: 1.55;
    }

    .form-group input[readonly] {
        background: #F8FAFC;
        color: var(--blue-dark);
        border-style: dashed;
    }

    .form-group small {
        color: var(--muted);
        line-height: 1.5;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.12);
        background: var(--white);
    }

.full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.payment-rule-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: flex-start;
    background: var(--gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.38);
    border-radius: 20px;
    padding: 17px;
    color: #8A5A00;
}

    .payment-rule-box > span {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        background: var(--white);
        color: #A16207;
        display: grid;
        place-items: center;
        flex: 0 0 auto;
    }

    .payment-rule-box strong {
        display: block;
        color: #713F12;
        margin-bottom: 5px;
    }

    .payment-rule-box p {
        color: #8A5A00;
        line-height: 1.55;
    }

    .payment-rule-box ul {
        margin-top: 9px;
        padding-left: 19px;
        color: #713F12;
        line-height: 1.65;
    }

.excel-dropzone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 26px;
    padding: 42px;
    text-align: center;
    background: var(--bg);
    transition: 0.2s ease;
    overflow: hidden;
}

    .excel-dropzone:hover {
        border-color: var(--blue);
        background: var(--blue-soft);
    }

    .excel-dropzone > span {
        color: var(--blue);
        font-size: 54px;
    }

    .excel-dropzone h3 {
        color: var(--blue-dark);
        margin: 10px 0 6px;
    }

    .excel-dropzone p {
        color: var(--muted);
    }

    .excel-dropzone input {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

.excel-preview {
    margin-top: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
}

    .excel-preview h3 {
        color: var(--blue-dark);
        margin-bottom: 6px;
    }

    .excel-preview p {
        color: var(--muted);
        word-break: break-word;
    }

.excel-rules {
    margin-top: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
}

    .excel-rules strong {
        display: block;
        color: var(--blue-dark);
        margin-bottom: 8px;
    }

    .excel-rules ul {
        padding-left: 20px;
        color: var(--text);
        line-height: 1.6;
    }

.excel-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.excel-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 850;
    line-height: 1.6;
    overflow: hidden;
}

    .excel-result > strong {
        color: var(--blue-dark);
    }

.excel-table-wrapper {
    width: 100%;
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid rgba(11, 61, 145, 0.12);
    border-radius: 18px;
    background: var(--white);
}

.excel-preview-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    color: var(--text);
    font-size: 13px;
}

    .excel-preview-table th,
    .excel-preview-table td {
        padding: 12px 13px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        vertical-align: top;
    }

    .excel-preview-table th {
        background: #F8FAFC;
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        font-weight: 950;
        white-space: nowrap;
    }

    .excel-preview-table td {
        color: var(--text);
        font-weight: 750;
    }

    .excel-preview-table tr:hover td {
        background: #FAFCFF;
    }

    .excel-preview-table tr:last-child td {
        border-bottom: none;
    }

#confirmExcelMatchesBtn {
    margin-top: 2px;
}

    #confirmExcelMatchesBtn:disabled {
        background: #CBD5E1;
        color: #64748B;
        box-shadow: none;
        transform: none;
    }

.hidden {
    display: none !important;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1280px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }

    .report-card {
        grid-template-columns: auto 1fr auto;
    }
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .filters {
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: calc(var(--sidebar-width) * -1 - 20px);
        top: 0;
        width: var(--sidebar-width);
        transition: 0.25s ease;
    }

        .sidebar.open {
            left: 0;
        }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(8, 31, 69, 0.52);
        backdrop-filter: blur(4px);
        z-index: 70;
    }

        .sidebar-backdrop.show {
            display: block;
        }

    .menu-button {
        display: grid;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        display: none;
    }

    .hero-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        width: 100%;
    }

    .payment-form {
        grid-template-columns: 1fr;
    }

    .table-meta {
        display: grid;
        justify-items: start;
    }
}

@media (max-width: 760px) {
    .main {
        padding: 20px;
    }

    .topbar {
        display: grid;
        grid-template-columns: auto 1fr;
    }

    .hero-summary,
    .panel,
    .modal-card {
        padding: 22px;
    }

    .payment-modal,
    .excel-modal {
        width: calc(100% - 20px);
    }

    .modal-heading h2 {
        margin-right: 46px;
    }

    .report-card {
        grid-template-columns: 1fr;
    }

    .report-actions {
        justify-content: flex-start;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .form-actions button {
            width: 100%;
        }

    .excel-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .excel-actions button {
            width: 100%;
        }
}

@media (max-width: 620px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .hero-summary,
    .panel,
    .modal-card {
        border-radius: 22px;
    }

    .stats-grid,
    .reports-grid {
        grid-template-columns: 1fr;
    }

    .stat-card,
    .report-card {
        padding: 18px;
    }

    .panel-header {
        display: grid;
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filter-btn {
        width: 100%;
    }

    .excel-dropzone {
        padding: 30px 18px;
    }

    .payment-rule-box {
        grid-template-columns: 1fr;
    }

        .payment-rule-box > span {
            width: 40px;
            height: 40px;
        }

    .data-table,
    .excel-preview-table {
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .main {
        padding: 14px;
    }

    .topbar,
    .hero-summary,
    .panel,
    .modal-card {
        padding: 18px;
    }

    .sidebar {
        width: min(var(--sidebar-width), 86vw);
    }

    .hero-summary h2 {
        font-size: 32px;
    }

    .modal-heading h2 {
        font-size: 31px;
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .danger-button {
        min-height: 44px;
        padding-inline: 13px;
    }
}

@media (max-width: 760px) {
    /* Contenedor principal */
    body.cii-shell .admin-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-width: 0;
    }

    body.cii-shell .admin-layout .main {
        width: 100%;
        min-width: 0;
        padding: 16px;
    }

    body.cii-shell .admin-layout .topbar {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr);
        align-items: start;
        justify-content: initial;
        gap: 12px;
        width: 100%;
        min-width: 0;
        padding: 18px;
    }

    body.cii-shell .topbar > .menu-button {
        display: grid;
        grid-column: 1;
        grid-row: 1;
        width: 46px;
        height: 46px;
    }

    body.cii-shell .topbar > div:not(.topbar-actions) {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    body.cii-shell .topbar h1 {
        font-size: clamp(23px, 6vw, 30px);
        line-height: 1.2;
        letter-spacing: -0.03em;
        word-break: normal;
        overflow-wrap: normal;
        white-space: normal;
    }

    body.cii-shell .topbar p {
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: break-word;
    }

    body.cii-shell .topbar-actions {
        display: none;
    }

    body.cii-shell .hero-summary,
    body.cii-shell .panel,
    body.cii-shell .stat-card,
    body.cii-shell .report-card {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    body.cii-shell .admin-layout .main {
        padding: 12px;
    }

    body.cii-shell .admin-layout .topbar {
        padding: 16px;
        gap: 10px;
    }

    body.cii-shell .topbar h1 {
        font-size: 24px;
    }
}