:root {
    --blue: #0B3D91;
    --blue-dark: #061E45;
    --blue-mid: #123B73;
    --blue-soft: #EAF1FF;
    --gold: #D4AF37;
    --gold-soft: #FFF6D8;
    --white: #FFFFFF;
    --bg: #F4F7FB;
    --bg-strong: #EEF3FA;
    --text: #172033;
    --muted: #667085;
    --muted-strong: #475467;
    --border: #DFE7F2;
    --success: #16A34A;
    --success-soft: #DCFCE7;
    --warning: #F59E0B;
    --warning-soft: #FEF3C7;
    --danger: #DC2626;
    --danger-soft: #FEE2E2;
    --purple: #7C3AED;
    --purple-soft: #F3E8FF;
    --cyan: #0891B2;
    --cyan-soft: #CFFAFE;
    --radius: 24px;
    --radius-lg: 32px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
    --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.16);
    --sidebar-width: 280px;
}

/* Accesibilidad y límites de contenido compartidos con el perfil. */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 200; padding: 12px 18px; background: white; color: #0b3d91; border-radius: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #d4af37; outline-offset: 4px; }
.student-menu-open { overflow: hidden; }
.student-page-alert { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; padding: 18px; border: 1px solid #f59e0b; border-radius: 16px; background: #fffbeb; color: #713f12; }
.student-page-alert > span { flex: 1 1 220px; }
.student-page-alert .secondary-button { width: auto; }
.activity-top > div, .info-main > div, .payment-detail-top > div { min-width: 0; }
.activity-top h3, .activity-top p, .activity-meta > span, .list-content, .info-grid strong { overflow-wrap: anywhere; }
.activity-meta > span { min-width: 0; max-width: 100%; }
.material-symbols-rounded { flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================
   RESET
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    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.08), transparent 30%), var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

    button:disabled {
        cursor: not-allowed;
        opacity: 0.58;
        transform: none !important;
    }

input,
textarea,
select {
    min-width: 0;
}

textarea {
    resize: vertical;
}

img,
svg {
    max-width: 100%;
}

/* =========================
   LAYOUT
========================= */

.student-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.main {
    min-width: 0;
    padding: clamp(18px, 2vw, 28px);
    overflow: clip;
}

.dashboard-content {
    display: grid;
    gap: 28px;
}

/* =========================
   SIDEBAR
========================= */

.student-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    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 18px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 22px;
    z-index: 80;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.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;
    line-height: 1.15;
}

.sidebar-brand span {
    color: #CBD5E1;
    font-size: 13px;
    margin-top: 3px;
    line-height: 1.35;
}

.sidebar-nav {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 2px 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.32) transparent;
}

    .sidebar-nav::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.28);
        border-radius: 999px;
    }

    .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;
        line-height: 1.15;
        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);
        flex: 0 0 auto;
    }

.sidebar-footer {
    min-height: 0;
    padding-top: 10px;
}

    .sidebar-footer a {
        color: #FECACA;
    }

/* =========================
   TOPBAR
========================= */

.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;
}

    .topbar > div:not(.topbar-actions) {
        min-width: 0;
        flex: 1 1 auto;
    }

.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;
}

.page-kicker {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.topbar h1 {
    font-size: clamp(24px, 3vw, 30px);
    color: var(--blue-dark);
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.topbar p {
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.student-chip {
    min-height: 52px;
    max-width: 270px;
    padding: 8px 14px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

    .student-chip > span {
        color: var(--blue);
        flex: 0 0 auto;
    }

    .student-chip strong,
    .student-chip small {
        display: block;
    }

    .student-chip strong {
        color: var(--blue-dark);
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .student-chip small {
        color: var(--muted);
        font-weight: 750;
    }

/* =========================
   BUTTONS
========================= */

.ghost-button,
.primary-button,
.secondary-button,
.panel-link,
.full-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;
    line-height: 1;
    white-space: nowrap;
}

.ghost-button,
.secondary-button,
.panel-link {
    background: var(--blue-soft);
    color: var(--blue);
}

.primary-button {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 14px 32px rgba(11, 61, 145, 0.22);
}

    .ghost-button:hover,
    .primary-button:hover,
    .secondary-button:hover,
    .panel-link:hover,
    .full-button:hover {
        transform: translateY(-2px);
    }

    .primary-button:hover {
        background: var(--blue-dark);
    }

.secondary-button:hover,
.ghost-button:hover,
.panel-link:hover {
    background: var(--blue);
    color: var(--white);
}

.full-button {
    width: 100%;
}

/* =========================
   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: clamp(24px, 3vw, 32px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
    gap: 28px;
    align-items: center;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.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(32px, 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;
}

.summary-card {
    width: 100%;
    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
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card,
.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 116px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.22s ease;
    min-width: 0;
}

    .stat-card:hover,
    .activity-card:hover,
    .list-item:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-strong);
    }

    .stat-card > div:last-child {
        min-width: 0;
    }

.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.courses {
        background: var(--blue-soft);
        color: var(--blue);
    }

    .stat-icon.progress {
        background: var(--success-soft);
        color: #166534;
    }

    .stat-icon.attendance {
        background: var(--purple-soft);
        color: var(--purple);
    }

    .stat-icon.tasks {
        background: var(--gold-soft);
        color: #92400E;
    }

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 850;
    line-height: 1.25;
}

.stat-card strong {
    display: block;
    color: var(--blue-dark);
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1;
    margin-top: 8px;
}

/* =========================
   PANELS
========================= */

.student-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.panel {
    min-width: 0;
    padding: 24px;
}

.wide-panel {
    min-width: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 24px;
}

    .panel-header h2 {
        color: var(--blue-dark);
        font-size: 24px;
        letter-spacing: -0.025em;
        line-height: 1.15;
    }

    .panel-header p {
        color: var(--muted);
        margin-top: 5px;
        line-height: 1.5;
    }

#registrationSection,
#paymentSection,
#teamsSection,
#activitiesSection,
#availableActivitiesSection,
#scheduleSection,
#attendanceSection {
    min-width: 0;
}

    #teamsSection > .secondary-button {
        margin-bottom: 18px;
    }

/* =========================
   STATUS / BADGES
========================= */

.status-pill,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.1;
    text-transform: none;
    white-space: nowrap;
}

.status-pill {
    background: var(--blue-soft);
    color: var(--blue);
}

.status-confirmado,
.status-completado,
.status-registrado,
.status-pagado,
.badge-pagado,
.badge-activo,
.badge-confirmado,
.badge-registrado,
.badge-revisada {
    background: var(--success-soft);
    color: #166534;
}

.status-pago_pendiente,
.status-pendiente,
.status-pago_en_revision,
.badge-pendiente,
.badge-vencido,
.badge-programada,
.badge-borrador {
    background: var(--warning-soft);
    color: #92400E;
}

.badge-entregada,
.badge-en_curso {
    background: var(--cyan-soft);
    color: #155E75;
}

/* =========================
   REGISTRO
========================= */

.registration-card,
.payment-card {
    display: grid;
    gap: 14px;
}

.student-info-card,
.payment-detail-card {
    background: linear-gradient(180deg, #F8FAFC, var(--bg));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    min-width: 0;
}

.registration-clean-card {
    min-height: 100%;
}

.info-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    min-width: 0;
}

.info-icon,
.payment-detail-top > span {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--gold-soft);
    color: #92400E;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

    .info-icon span,
    .payment-detail-top > span {
        font-size: 32px;
    }

.info-main h3 {
    color: var(--blue-dark);
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.info-main p {
    color: var(--muted);
    margin-top: 4px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.info-grid,
.payment-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.registration-clean-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-grid div,
.payment-detail-list div {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px 14px;
    min-width: 0;
}

.registration-clean-grid div {
    min-height: 82px;
    display: grid;
    align-content: center;
}

.info-grid span,
.payment-detail-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 5px;
}

.info-grid strong,
.payment-detail-list strong {
    display: block;
    color: var(--blue-dark);
    overflow-wrap: anywhere;
}

/* =========================
   PAGO
========================= */

.payment-status-grid {
    display: block;
    margin-bottom: 16px;
}

.payment-box {
    border-radius: 22px;
    padding: 20px;
}

    .payment-box.payment-summary {
        min-height: 122px;
        display: flex;
        align-items: center;
        gap: 16px;
    }

        .payment-box.payment-summary > span {
            width: 52px;
            height: 52px;
            border-radius: 18px;
            background: rgba(255, 255, 255, 0.58);
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            font-size: 34px;
        }

        .payment-box.payment-summary strong {
            display: block;
            font-size: clamp(24px, 3vw, 34px);
            line-height: 1.05;
        }

        .payment-box.payment-summary small {
            display: block;
            margin-top: 5px;
            line-height: 1.45;
            font-weight: 850;
        }

        .payment-box.payment-summary.pending {
            background: var(--warning-soft);
            color: #92400E;
        }

        .payment-box.payment-summary.review {
            background: var(--cyan-soft);
            color: #155E75;
        }

        .payment-box.payment-summary.paid {
            background: var(--success-soft);
            color: #166534;
        }

.payment-detail-card {
    margin-top: 0;
}

.payment-detail-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

    .payment-detail-top strong,
    .payment-detail-top small {
        display: block;
    }

    .payment-detail-top strong {
        color: var(--blue-dark);
        font-size: 20px;
    }

    .payment-detail-top small {
        color: var(--muted);
        margin-top: 3px;
        font-weight: 780;
        line-height: 1.45;
    }

.payment-upload-action {
    margin-top: 16px;
}

    .payment-upload-action .full-button {
        margin-top: 0;
    }

/* =========================
   ACTIVIDADES / EQUIPOS
========================= */

.activities-list,
.team-list,
.available-list {
    display: grid;
    gap: 16px;
}

.activity-card {
    background: linear-gradient(180deg, #F8FAFC, var(--bg));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    transition: 0.22s ease;
    min-width: 0;
}

.team-card {
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 28%), linear-gradient(180deg, #F8FAFC, var(--bg));
}

.available-card {
    background: radial-gradient(circle at top left, rgba(22, 163, 74, 0.10), transparent 28%), linear-gradient(180deg, #F8FAFC, var(--bg));
}

.activity-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    min-width: 0;
}

.activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 17px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

    .activity-icon span {
        font-size: 30px;
    }

.activity-top h3 {
    color: var(--blue-dark);
    font-size: 20px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.activity-top p {
    color: var(--muted);
    line-height: 1.55;
    margin-top: 5px;
}

.activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
}

    .activity-meta > span {
        min-height: 34px;
        padding: 7px 10px;
        border-radius: 999px;
        background: var(--white);
        border: 1px solid var(--border);
        color: var(--muted-strong);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 850;
        line-height: 1.2;
    }

    .activity-meta .material-symbols-rounded {
        color: var(--blue);
        font-size: 19px;
    }

.activity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.mini-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 13px;
    font-weight: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: 0.2s ease;
    white-space: nowrap;
}

    .mini-button:hover {
        transform: translateY(-2px);
        background: var(--blue);
        color: var(--white);
    }

    .mini-button.success {
        background: var(--success-soft);
        color: #166534;
    }

        .mini-button.success:hover {
            background: var(--success);
            color: var(--white);
        }

    .mini-button.danger {
        background: var(--danger-soft);
        color: #991B1B;
    }

        .mini-button.danger:hover {
            background: var(--danger);
            color: var(--white);
        }

    .mini-button.disabled,
    .mini-button.disabled:hover {
        background: var(--bg-strong);
        color: var(--muted);
        cursor: default;
        transform: none;
    }

.compact-member-card {
    padding: 14px;
    background: var(--white);
}

    .compact-member-card .activity-top {
        align-items: center;
    }

    .compact-member-card .activity-icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

        .compact-member-card .activity-icon span {
            font-size: 26px;
        }

    .compact-member-card h3 {
        font-size: 17px;
    }

    .compact-member-card p {
        font-size: 13px;
    }

/* =========================
   LISTAS
========================= */

.list {
    display: grid;
    gap: 14px;
}

.list-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    transition: 0.22s ease;
    min-width: 0;
}

.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 {
    min-width: 0;
    flex: 1;
}

    .list-content strong {
        display: block;
        color: var(--blue-dark);
        margin-bottom: 4px;
        overflow-wrap: anywhere;
    }

    .list-content span {
        display: block;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.5;
    }

/* =========================
   EMPTY / LOCKED
========================= */

.empty-message {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 20px;
    color: var(--muted);
    font-weight: 850;
    text-align: center;
    line-height: 1.55;
}

.locked-state {
    min-height: calc(100vh - 56px);
    display: grid;
    place-items: center;
}

.locked-card {
    width: min(560px, 100%);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow-strong);
    text-align: center;
}

    .locked-card > span {
        color: var(--gold);
        font-size: 64px;
    }

    .locked-card h2 {
        color: var(--blue-dark);
        font-size: 34px;
        margin: 14px 0 10px;
    }

    .locked-card p {
        color: var(--muted);
        line-height: 1.7;
        margin-bottom: 22px;
    }

/* =========================
   MODALS
========================= */

.task-modal {
    width: min(900px, calc(100% - 32px));
    max-height: calc(100vh - 36px);
    border: none;
    border-radius: 30px;
    padding: 0;
    background: transparent;
    margin: auto;
    overflow: visible;
}

    .task-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 - 36px);
    overflow-y: auto;
}

    .modal-card::-webkit-scrollbar {
        width: 10px;
    }

    .modal-card::-webkit-scrollbar-track {
        background: transparent;
    }

    .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;
    transition: 0.2s ease;
    z-index: 2;
}

    .modal-close:hover {
        background: var(--blue);
        color: var(--white);
        transform: rotate(90deg);
    }

.modal-heading {
    margin-bottom: 24px;
    max-width: 720px;
}

.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;
}

/* =========================
   FORMS
========================= */

.task-form {
    display: grid;
    grid-template-columns: 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 textarea,
    .form-group select {
        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: 120px;
        line-height: 1.6;
    }

    .form-group input[type="file"] {
        padding: 12px;
        background: var(--white);
    }

    .form-group small {
        color: var(--muted);
        line-height: 1.5;
    }

    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select: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;
}

/* =========================
   ALERTS
========================= */

.quick-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 850;
    line-height: 1.6;
}

    .quick-alert.success {
        background: var(--success-soft);
        color: #166534;
    }

    .quick-alert.error {
        background: var(--danger-soft);
        color: #991B1B;
    }

    .quick-alert.info {
        background: var(--blue-soft);
        color: var(--blue);
    }

    .quick-alert.warning {
        background: var(--warning-soft);
        color: #92400E;
    }

/* =========================
   UTILITIES
========================= */

.hidden {
    display: none !important;
}

.sidebar-backdrop {
    display: none;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1380px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-grid,
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .dashboard-content {
        gap: 24px;
    }

    .hero-summary {
        grid-template-columns: 1fr;
    }

    .summary-card {
        width: 100%;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        max-width: 520px;
    }
}

@media (max-width: 980px) {
    .student-layout {
        grid-template-columns: 1fr;
    }

    .student-sidebar {
        position: fixed;
        left: -290px;
        top: 0;
        width: var(--sidebar-width);
        height: 100dvh;
        max-height: 100dvh;
        transition: 0.25s ease;
        box-shadow: 30px 0 80px rgba(15, 23, 42, 0.24);
    }

        .student-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-actions {
        display: none;
    }
}

@media (max-width: 820px) {
    .registration-clean-grid,
    .payment-detail-list {
        grid-template-columns: 1fr;
    }

    .payment-box.payment-summary {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .hero-summary,
    .panel,
    .locked-card,
    .modal-card {
        border-radius: 22px;
    }

    .topbar {
        padding: 18px;
    }

    .hero-summary {
        padding: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px;
    }

    .panel {
        padding: 20px;
    }

    .panel-header {
        display: grid;
    }

    #teamsSection > .secondary-button {
        width: 100%;
    }

    .activity-top {
        display: grid;
    }

    .activity-meta {
        display: grid;
        grid-template-columns: 1fr;
    }

        .activity-meta > span {
            width: 100%;
            justify-content: flex-start;
        }

    .activity-actions,
    .form-actions {
        display: grid;
    }

    .mini-button,
    .primary-button,
    .secondary-button,
    .ghost-button,
    .panel-link {
        width: 100%;
    }

    .task-modal {
        width: calc(100% - 20px);
    }

    .modal-card {
        padding: 24px;
    }

    .modal-heading h2 {
        margin-right: 46px;
    }
}

@media (max-width: 460px) {
    .main {
        padding: 14px;
    }

    .hero-summary h2 {
        font-size: 30px;
    }

    .locked-card {
        padding: 26px;
    }

    .modal-card {
        padding: 20px;
    }

    .student-sidebar {
        width: min(var(--sidebar-width), 88vw);
        left: calc(-1 * min(var(--sidebar-width), 88vw));
    }

        .student-sidebar.open {
            left: 0;
        }

    .brand-badge {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .sidebar-brand strong {
        font-size: 16px;
    }

    .sidebar-brand span {
        font-size: 12px;
    }
}
