: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;
    --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;
}

/* =========================
   RESET
========================= */

* {
    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.07), 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;
}

textarea {
    resize: vertical;
}

.hidden {
    display: none !important;
}

/* =========================
   LAYOUT
========================= */

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
}

.main {
    min-width: 0;
    padding: 28px;
    overflow: hidden;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    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;
    overflow-y: auto;
}

    .sidebar::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.22);
        border-radius: 999px;
    }

.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);
}

.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;
    padding-top: 24px;
}

    .sidebar-footer a {
        color: #FECACA;
    }

.sidebar-backdrop {
    display: none;
}

/* =========================
   TOPBAR
========================= */

.topbar {
    background: rgba(255, 255, 255, 0.86);
    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;
}

.page-kicker {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.topbar h1 {
    font-size: 30px;
    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-wrap: wrap;
}

/* =========================
   BOTONES
========================= */

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.btn {
    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;
}

.primary-button {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 14px 32px rgba(11, 61, 145, 0.22);
}

    .primary-button:hover {
        background: var(--blue-dark);
        transform: translateY(-2px);
    }

.secondary-button,
.ghost-button,
.btn-outline {
    background: var(--blue-soft);
    color: var(--blue);
}

    .secondary-button:hover,
    .ghost-button:hover,
    .btn-outline:hover {
        transform: translateY(-2px);
        background: #DCEAFF;
    }

.danger-button {
    background: #FEE2E2;
    color: #991B1B;
}

    .danger-button:hover {
        transform: translateY(-2px);
        background: #FECACA;
    }

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =========================
   HERO
========================= */

.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;
}

.hero-summary h2 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    max-width: 820px;
}

.hero-summary p {
    color: #D8E2F0;
    margin-top: 14px;
    max-width: 760px;
    line-height: 1.7;
}

.summary-card {
    width: 270px;
    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: 20px;
        margin: 12px 0 6px;
        line-height: 1.25;
    }

    .summary-card small {
        color: #D8E2F0;
        line-height: 1.45;
    }

/* =========================
   STATS
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.22s ease;
    min-width: 0;
}

    .stat-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.active {
        background: #DCFCE7;
        color: #166534;
    }

    .stat-icon.pending {
        background: #FEF3C7;
        color: #B45309;
    }

    .stat-icon.review {
        background: #F3E8FF;
        color: var(--purple);
    }

    .stat-icon.checked {
        background: #FFF6D8;
        color: #A16207;
    }

.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;
}

/* =========================
   PANEL
========================= */

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.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.5;
    }

/* =========================
   ALERTAS
========================= */

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-weight: 850;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
}

/* =========================
   TOOLBAR
========================= */

.toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 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;
    justify-content: flex-end;
}

.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;
}

/* =========================
   TABLA
========================= */

.table-wrapper {
    overflow-x: auto;
}

    .table-wrapper::-webkit-scrollbar {
        height: 9px;
    }

    .table-wrapper::-webkit-scrollbar-thumb {
        background: #CBD5E1;
        border-radius: 999px;
    }

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

    .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;
    }

    .data-table td {
        color: var(--text);
        font-size: 14px;
    }

    .data-table tbody tr {
        transition: 0.18s ease;
    }

        .data-table tbody tr:hover {
            background: #F8FAFC;
        }

.participant-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.participant-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-weight: 950;
}

.participant-info strong,
.participant-info small {
    display: block;
}

.participant-info strong,
.data-table td > strong {
    color: var(--blue-dark);
    font-weight: 950;
}

.participant-info small,
.data-table td > small {
    color: var(--muted);
    margin-top: 3px;
    display: block;
    line-height: 1.45;
}

.folio-stack,
.congress-stack,
.contact-stack,
.payment-stack,
.checkin-stack,
.status-stack {
    display: grid;
    gap: 4px;
}

    .folio-stack strong,
    .congress-stack strong,
    .contact-stack strong,
    .payment-stack strong,
    .checkin-stack strong,
    .status-stack strong {
        color: var(--blue-dark);
        font-weight: 950;
    }

    .folio-stack small,
    .congress-stack small,
    .contact-stack small,
    .payment-stack small,
    .checkin-stack small,
    .status-stack small {
        color: var(--muted);
        font-weight: 750;
        line-height: 1.45;
    }

.mono-text {
    display: inline-block;
    max-width: 180px;
    color: var(--blue);
    font-family: Consolas, Monaco, monospace;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-message {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 20px;
    color: var(--muted);
    font-weight: 850;
    text-align: center;
}

/* =========================
   BADGES
========================= */

.badge,
.type-badge,
.payment-badge,
.category-badge,
.checkin-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-borrador {
    background: #EEF2F7;
    color: #475467;
}

.badge-pago_pendiente {
    background: #FEF3C7;
    color: #92400E;
}

.badge-confirmado {
    background: #DCFCE7;
    color: #166534;
}

.badge-completado {
    background: #DBEAFE;
    color: var(--blue-dark);
}

.badge-cancelado,
.badge-rechazado {
    background: #FEE2E2;
    color: #991B1B;
}

.type-badge {
    background: #EAF1FF;
    color: var(--blue);
}

.type-interno {
    background: #DCFCE7;
    color: #166534;
}

.type-externo {
    background: #FFF6D8;
    color: #8A6500;
}

.category-badge {
    background: #EEF2F7;
    color: #475467;
}

.category-alumno_itgam {
    background: #DCFCE7;
    color: #166534;
}

.category-alumno_externo {
    background: #EAF1FF;
    color: var(--blue);
}

.category-docente,
.category-investigador,
.category-ponente {
    background: #F3E8FF;
    color: var(--purple);
}

.category-publico_general {
    background: #FFF6D8;
    color: #8A6500;
}

.category-staff {
    background: #DBEAFE;
    color: var(--blue-dark);
}

.payment-badge-pendiente {
    background: #FEF3C7;
    color: #92400E;
}

.payment-badge-pagado {
    background: #DCFCE7;
    color: #166534;
}

.checkin-badge {
    background: #EEF2F7;
    color: #475467;
}

.checkin-badge-done {
    background: #DCFCE7;
    color: #166534;
}

.checkin-badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

/* =========================
   ACCIONES
========================= */

.action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 210px;
}

.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: 20px;
    }

    .icon-action.view {
        background: var(--blue-soft);
        color: var(--blue);
    }

    .icon-action.edit {
        background: var(--gold-soft);
        color: #8A6500;
    }

    .icon-action.approve {
        background: #DCFCE7;
        color: #166534;
    }

    .icon-action.review {
        background: #F3E8FF;
        color: var(--purple);
    }

    .icon-action.reject {
        background: #FEF3C7;
        color: #92400E;
    }

    .icon-action.delete {
        background: #FEE2E2;
        color: #991B1B;
    }

    .icon-action:hover {
        transform: translateY(-2px);
    }

/* =========================
   MODALES
========================= */

.registration-modal,
.details-modal,
.status-modal {
    width: min(1080px, calc(100% - 32px));
    border: none;
    border-radius: 30px;
    padding: 0;
    background: transparent;
    margin: auto;
}

.details-modal {
    width: min(820px, calc(100% - 32px));
}

.status-modal,
.small-modal {
    width: min(640px, calc(100% - 32px));
}

    .registration-modal::backdrop,
    .details-modal::backdrop,
    .status-modal::backdrop {
        background: rgba(8, 31, 69, 0.74);
        backdrop-filter: blur(8px);
    }

.modal-card {
    background: var(--white);
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--shadow-strong);
    position: relative;
    max-height: calc(100vh - 42px);
    overflow-y: auto;
}

    .modal-card::-webkit-scrollbar {
        width: 9px;
    }

    .modal-card::-webkit-scrollbar-thumb {
        background: #CBD5E1;
        border-radius: 999px;
    }

.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;
}

    .modal-close:hover {
        background: #FEE2E2;
        color: #991B1B;
    }

.modal-heading {
    margin-bottom: 24px;
    max-width: 780px;
}

.modal-kicker {
    color: var(--gold);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.modal-heading h2,
.modal-title {
    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,
.modal-description {
    color: var(--muted);
    line-height: 1.7;
}

/* =========================
   FORMULARIOS
========================= */

.registration-form,
.status-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.status-form {
    grid-template-columns: 1fr;
}

.form-section,
.form-group.full,
.form-actions.full {
    grid-column: 1 / -1;
}

.form-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

    .form-section:first-of-type {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

    .form-section h3 {
        display: flex;
        align-items: center;
        gap: 9px;
        color: var(--blue-dark);
        font-size: 16px;
        letter-spacing: -0.02em;
    }

        .form-section h3 span {
            color: var(--gold);
        }

.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;
    }

    .form-group textarea {
        min-height: 112px;
        line-height: 1.55;
    }

        .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);
        }

    .form-group small {
        color: var(--muted);
        line-height: 1.45;
        font-weight: 700;
    }

    .form-group input:disabled,
    .form-group select:disabled,
    .form-group textarea:disabled,
    .disabled-field {
        opacity: 0.65;
        cursor: not-allowed;
        background: #EEF2F7;
    }

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* =========================
   DETALLES
========================= */

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

    .details-grid article {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 16px;
    }

        .details-grid article > span {
            width: 42px;
            height: 42px;
            border-radius: 15px;
            background: var(--blue-soft);
            color: var(--blue);
            display: grid;
            place-items: center;
            flex: 0 0 auto;
        }

    .details-grid strong {
        display: block;
        color: var(--blue-dark);
        font-weight: 950;
    }

    .details-grid small {
        display: block;
        color: var(--muted);
        margin-top: 3px;
        line-height: 1.5;
        word-break: break-word;
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .filters {
        justify-content: flex-start;
    }
}

@media (max-width: 1080px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -290px;
        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;
    }

    .hero-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        width: 100%;
    }
}

@media (max-width: 860px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-header {
        display: grid;
    }

        .panel-header .primary-button {
            width: 100%;
        }

    .table-meta {
        display: grid;
        align-items: stretch;
    }

    .sort-select {
        width: 100%;
    }

    .registration-form {
        grid-template-columns: 1fr;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .hero-summary,
    .panel,
    .modal-card {
        border-radius: 22px;
    }

    .topbar {
        padding: 20px;
    }

    .hero-summary {
        padding: 24px;
    }

        .hero-summary h2 {
            font-size: clamp(30px, 11vw, 42px);
        }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px;
    }

    .filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-btn {
        width: 100%;
    }

    .modal-card {
        padding: 24px 20px;
        max-height: calc(100vh - 24px);
    }

    .modal-heading h2,
    .modal-title {
        margin-right: 44px;
    }

    .form-actions {
        display: grid;
    }

        .form-actions > * {
            width: 100%;
        }

    .modal-actions {
        display: grid;
    }

        .modal-actions > * {
            width: 100%;
        }
}

@media (max-width: 420px) {
    :root {
        --sidebar-width: 260px;
    }

    .main {
        padding: 14px;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .danger-button {
        width: 100%;
    }

    .data-table {
        min-width: 900px;
    }
}

/* =========================
   MOTION SAFE
========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
