: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;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 28%), var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.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);
}

.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;
}

.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.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;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghost-button {
    min-height: 46px;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    transition: 0.2s ease;
}

    .ghost-button:hover {
        transform: translateY(-2px);
        background: #DCEAFF;
    }

.user-chip {
    min-height: 52px;
    padding: 8px 14px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .user-chip > span {
        color: var(--blue);
    }

    .user-chip strong,
    .user-chip small {
        display: block;
    }

    .user-chip small {
        color: var(--muted);
        font-weight: 750;
    }

.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: 760px;
}

.hero-summary p {
    color: #D8E2F0;
    margin-top: 14px;
    max-width: 680px;
    line-height: 1.7;
}

.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: 20px;
        margin: 12px 0 6px;
    }

    .summary-card small {
        color: #D8E2F0;
    }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 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;
}

    .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;
}

    .stat-icon span {
        font-size: 34px;
    }

    .stat-icon.students {
        background: #EAF1FF;
        color: var(--blue);
    }

    .stat-icon.teachers {
        background: #F3E8FF;
        color: var(--purple);
    }

    .stat-icon.workshops {
        background: #FFF6D8;
        color: #A16207;
    }

    .stat-icon.payments {
        background: #FEF3C7;
        color: var(--warning);
    }

.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;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
    margin-bottom: 24px;
}

.bottom-grid {
    grid-template-columns: repeat(2, 1fr);
}

.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: 23px;
        letter-spacing: -0.025em;
    }

    .panel-header p {
        color: var(--muted);
        margin-top: 5px;
    }

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 950;
}

.payment-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.payment-box {
    border-radius: 22px;
    padding: 20px;
    display: grid;
    gap: 7px;
}

    .payment-box span {
        font-size: 34px;
    }

    .payment-box strong {
        font-size: 30px;
        line-height: 1;
    }

    .payment-box small {
        color: var(--muted);
        font-weight: 850;
    }

    .payment-box.paid {
        background: #DCFCE7;
        color: #166534;
    }

    .payment-box.pending {
        background: #FEF3C7;
        color: #92400E;
    }

    .payment-box.expired {
        background: #FEE2E2;
        color: #991B1B;
    }

    .payment-box.cancelled {
        background: #E5E7EB;
        color: #374151;
    }

.quick-actions {
    display: grid;
    gap: 12px;
}

    .quick-actions a {
        min-height: 56px;
        border-radius: 18px;
        background: var(--bg);
        border: 1px solid var(--border);
        color: var(--blue-dark);
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 16px;
        font-weight: 900;
        transition: 0.2s ease;
    }

        .quick-actions a:hover {
            background: var(--blue-soft);
            transform: translateX(4px);
        }

    .quick-actions span {
        color: var(--blue);
    }

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.list-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.list-content strong {
    display: block;
    color: var(--blue-dark);
    margin-bottom: 4px;
}

.list-content span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.status-badge {
    display: inline-flex !important;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 950;
    text-transform: capitalize;
}

.status-pagado,
.status-activo {
    background: #DCFCE7;
    color: #166534 !important;
}

.status-pendiente {
    background: #FEF3C7;
    color: #92400E !important;
}

.status-vencido,
.status-cancelado {
    background: #FEE2E2;
    color: #991B1B !important;
}

.empty-message {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 20px;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1180px) {
    .stats-grid,
    .payment-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid,
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .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;
    }

    .topbar-actions {
        display: none;
    }

    .hero-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .hero-summary,
    .panel {
        border-radius: 22px;
    }

    .stats-grid,
    .payment-overview {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px;
    }

    .panel-header {
        display: grid;
    }
}
