:root {
    --synco-red: #BD4444;
    --synco-cream: #F1DEC4;
    --synco-green: #73976A;
    --synco-dark-green: #677E61;
    --synco-surface: #fffaf3;
    --synco-text: #2f2a26;
    --synco-radius: 16px;
    --synco-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --synco-student: #0F2A66;
    --synco-student-strong: #1F3F8B;
    --synco-student-bg: #E8EEF9;
    --synco-student-accent: #D7E0F4;
    --synco-admin: #166534;
    --synco-admin-strong: #16A34A;
    --synco-admin-bg: #F0FDF4;
    --synco-admin-accent: #DCFCE7;
    --synco-parent: #6D28D9;
    --synco-parent-strong: #7C3AED;
    --synco-parent-bg: #F5F3FF;
    --synco-parent-accent: #EDE9FE;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--synco-text);
    background: linear-gradient(135deg, #f8fafc 0%, #f3f7ff 100%);
    min-height: 100vh;
}

body.role-student {
    --portal-primary: var(--synco-student);
    --portal-secondary: var(--synco-student-strong);
    --portal-background: var(--synco-student-bg);
    --portal-accent: var(--synco-student-accent);
    --portal-sidebar-top: #0b204f;
    --portal-sidebar-bottom: #1f3f8b;
}

body.role-teacher,
body.role-admin {
    --portal-primary: var(--synco-admin);
    --portal-secondary: var(--synco-admin-strong);
    --portal-background: var(--synco-admin-bg);
    --portal-accent: var(--synco-admin-accent);
    --portal-sidebar-top: #14532D;
    --portal-sidebar-bottom: #16A34A;
}

body.role-parent {
    --portal-primary: #7C3AED;
    --portal-secondary: #A78BFA;
    --portal-background: var(--synco-parent-bg);
    --portal-accent: var(--synco-parent-accent);
    --portal-sidebar-top: #6D28D9;
    --portal-sidebar-bottom: #A78BFA;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.portal-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

body.portal-dashboard-page {
    background: #f7fafd;
}

.portal-sidebar {
    background: linear-gradient(160deg, var(--portal-sidebar-top, #0f172a) 0%, var(--portal-sidebar-bottom, #334155) 100%);
    color: #fff;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrap h5 {
    margin-bottom: 0;
    letter-spacing: 1px;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: .25rem .45rem 1.1rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #f8fbff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brand-wrap small {
    opacity: 0.85;
}

.portal-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    padding: 0.65rem 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.portal-sidebar .nav-link:hover,
.portal-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateX(2px);
}

.portal-main {
    padding: 1.5rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.75);
    box-shadow: var(--synco-shadow);
    backdrop-filter: blur(12px);
    border-radius: 20px;
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.topbar {
    padding: 1rem 1.2rem;
}

.content-wrap {
    margin-top: 1rem;
}

.topbar {
    border: 1px solid rgba(226,232,240,.75);
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
}

.portal-page-intro h4 {
    color: #0f172a;
}

.stat-card {
    border-radius: 20px;
    padding: 1rem;
    color: #fff;
    min-height: 132px;
    animation: fadeIn 0.5s ease;
}

.stat-card.red { background: linear-gradient(135deg, #bd4444, #d35d5d); }
.stat-card.green { background: linear-gradient(135deg, #73976a, #8fae86); }
.stat-card.dark { background: linear-gradient(135deg, #677e61, #7e9678); }
.stat-card.cream { background: linear-gradient(135deg, #cfad74, #b89257); }

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.form-control,
.form-select {
    border-radius: 12px;
}

.card,
.table,
.modal-content {
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,.85);
    box-shadow: 0 20px 40px rgba(15,23,42,.14);
}

.dropdown-menu {
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(15,23,42,.10);
}

.pagination .page-link {
    border-radius: 999px;
    margin: 0 .15rem;
    color: var(--portal-primary, #1d4ed8);
}

.card {
    border: 1px solid #eee2d3;
    box-shadow: 0 10px 24px rgba(112, 95, 76, 0.08);
}

.landing-hero {
    min-height: 92vh;
    display: grid;
    align-items: center;
    /* legacy image removed to prefer brand gradient */
    background: linear-gradient(160deg, var(--landing-blue-soft) 0%, var(--landing-green-soft) 45%, var(--landing-purple-soft) 100%);
    color: var(--landing-text);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #73976A, #677E61);
    color: #fff;
    font-size: 1.35rem;
}

.section-pad {
    padding: 5rem 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 992px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        position: relative;
        height: auto;
    }
}

/* Professional application design system */
:root {
    --synco-red-dark: #9f3639;
    --synco-ink: #26332a;
    --synco-muted: #718076;
    --synco-page: #f5f7f2;
    --synco-line: #e1e8de;
    --synco-shadow: 0 14px 35px rgba(43, 63, 49, 0.09);
}

:root {
    --landing-green: #22C55E;
    --landing-green-dark: #16A34A;
    --landing-green-soft: #DCFCE7;
    --landing-blue: #3B82F6;
    --landing-blue-dark: #2563EB;
    --landing-blue-soft: #DBEAFE;
    --landing-purple: #8B5CF6;
    --landing-purple-dark: #7C3AED;
    --landing-purple-soft: #EDE9FE;
    --landing-surface: #FFFFFF;
    --landing-surface-alt: #F8FAFC;
    --landing-border: #E5E7EB;
    --landing-text: #1F2937;
    --landing-muted: #475569;
    --primary-gradient: linear-gradient(135deg, var(--landing-blue) 0%, var(--landing-blue-dark) 100%);
    --success-gradient: linear-gradient(135deg, var(--landing-green) 0%, var(--landing-green-dark) 100%);
    --purple-gradient: linear-gradient(135deg, var(--landing-purple) 0%, var(--landing-purple-dark) 100%);
}

.text-purple {
    color: var(--landing-purple-dark) !important;
}

.text-success {
    color: var(--landing-green-dark) !important;
}

.text-primary {
    color: var(--landing-blue-dark) !important;
}

.text-sm {
    font-size: 0.875rem !important;
}

/* Accessibility: visible skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus,
.skip-link:active {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 0.6rem 0.9rem;
    background: #fff;
    color: var(--landing-text);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.12);
    z-index: 9999;
}

/* Landing-specific CTA contrast */
.landing-hero .btn-primary {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.landing-hero .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.landing-hero .btn-outline-primary {
    color: var(--landing-blue);
    border-color: var(--landing-blue);
    border-width: 2px;
    font-weight: 600;
}

.landing-hero .btn-outline-primary:hover {
    background: var(--landing-blue);
    color: white;
}

/* Subtle micro-interactions */
.hero-visual__card,
.feature-card,
.workflow-step,
.stat-card-landing,
.partner-card,
.testimonial-card,
.contact-card,
.contact-form-card {
    transition: transform .22s cubic-bezier(.2,.9,.25,1), box-shadow .22s ease, border-color .22s ease;
}

.hero-visual__card:hover,
.feature-card:hover,
.workflow-step:hover,
.stat-card-landing:hover,
.partner-card:hover,
.testimonial-card:hover,
.contact-card:hover,
.contact-form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(15,23,42,0.12);
}

.landing-nav {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

/* Header / Branding */
.navbar-brand { gap: .75rem; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,0.06); }
.brand-text { color: var(--landing-text); font-weight: 800; letter-spacing: -0.02em; }

/* Toggler */
.navbar-toggler { border: 0; background: transparent; font-size: 1.05rem; }
.navbar-toggler:focus { outline: none; box-shadow: 0 8px 28px rgba(37,99,235,0.12); }
.btn-toggle i { font-size: 1.25rem; color: var(--landing-text); }

/* Ensure CTAs are high contrast and consistent */
.landing-nav .btn-primary { 
    background: var(--primary-gradient); 
    border-color: transparent; 
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}
.landing-nav .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
.landing-nav .btn-outline-primary { 
    color: var(--landing-blue); 
    border-color: var(--landing-blue); 
    font-weight: 600;
}
.landing-nav .btn-outline-primary:hover {
    background: var(--landing-blue);
    color: white;
}

/* Mobile: make collapse full-width and elevated */
@media (max-width: 991.98px) {
    .navbar-collapse { background: rgba(255,255,255,0.98); margin-top: 8px; border-radius: 12px; padding: 1rem; box-shadow: 0 20px 50px rgba(15,23,42,0.06); }
    .navbar-nav { gap: .5rem; }
    .navbar-brand .brand-text { display: inline-block; }
}

.landing-nav .nav-link {
    color: var(--landing-text);
    font-weight: 600;
    transition: all 0.3s ease;
}

.landing-nav .nav-link:hover,
.landing-nav .nav-link.active {
    color: var(--landing-blue);
}

.landing-hero {
    min-height: 95vh;
    background: linear-gradient(160deg, var(--landing-blue-soft) 0%, #EBF4FF 45%, var(--landing-purple-soft) 100%);
    overflow: hidden;
    position: relative;
}

.landing-hero::before,
.landing-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    z-index: 0;
}

.landing-hero::before {
    width: 500px;
    height: 500px;
    top: -120px;
    right: -150px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
}

.landing-hero::after {
    width: 400px;
    height: 400px;
    bottom: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.landing-hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    background: rgba(255,255,255,0.95);
    color: var(--landing-blue-dark);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    border: 2px solid var(--landing-blue-soft);
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    line-height: 1.02;
    color: #0F172A;
    letter-spacing: -0.04em;
}

.hero-copy {
    max-width: 620px;
    color: var(--landing-muted);
    font-size: 1.08rem;
}

.hero-actions .btn {
    min-width: 12rem;
}

.hero-visual__main {
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
    position: relative;
}

.badge-live {
    background: var(--landing-green-soft);
    color: var(--landing-green-dark);
    border: 1px solid var(--landing-green);
}

.dashboard-mockup {
    border-radius: 28px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

.mockup-header span,
.mockup-header strong {
    font-size: 0.95rem;
}

.progress-bar.bg-gradient-primary {
    background: var(--primary-gradient);
}

.hero-features {
    gap: 1rem;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    color: #1d4f78;
    font-weight: 600;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

.hero-features .bi {
    font-size: 1rem;
    color: var(--landing-blue);
}

.glass-metric {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.glass-metric__label {
    display: block;
    color: #5f7289;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.glass-metric strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.2rem;
    color: #0f172a;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--landing-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
}

.section-title {
    font-size: clamp(2.1rem, 2.8vw, 3rem);
    color: #0F172A;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.info-card {
    min-height: 172px;
}

.feature-card {
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    min-height: 240px;
}

.feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--landing-green-soft), var(--landing-green));
    color: var(--landing-green-dark);
    font-size: 1.55rem;
}

.stat-card-landing {
    min-height: 220px;
    border-radius: 24px;
    background: linear-gradient(160deg, var(--landing-surface-alt) 0%, var(--landing-blue-soft) 100%);
    border: 1px solid var(--landing-border);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.stat-card-landing__icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--landing-blue-soft), var(--landing-blue));
    color: var(--landing-blue-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.stat-card-landing__value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.stat-card-landing__label {
    margin-top: 0.4rem;
    color: #5b7288;
    font-weight: 600;
}

.testimonial-card,
.partner-card,
.contact-card,
.contact-form-card {
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(226,232,240,0.9);
    box-shadow: 0 18px 45px rgba(15,23,42,0.08);
}

.testimonial-card p {
    color: #4a5d76;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.testimonial-author span {
    color: #65758a;
    font-size: 0.92rem;
}

.partner-card {
    display: grid;
    align-items: center;
    min-height: 132px;
    font-weight: 800;
    color: #1e3a62;
}

.contact-list {
    display: grid;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #384b64;
    font-weight: 600;
}

.contact-item i {
    color: var(--landing-blue);
}

.contact-form-card .form-control {
    border-radius: 14px;
    padding: 0.9rem 1rem;
    border-color: var(--landing-border);
    transition: all 0.3s ease;
}

.contact-form-card .form-control:focus {
    border-color: var(--landing-blue);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.15);
}

.workflow-step {
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #fff;
}

.workflow-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--landing-blue-soft);
    color: var(--landing-blue);
    font-weight: 700;
}

.landing-callout {
    background: linear-gradient(135deg, var(--landing-purple-soft) 0%, var(--landing-surface-alt) 100%);
    border: 2px solid var(--landing-purple);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.15);
}

.landing-callout h2 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.landing-footer {
    background: #fff;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.bg-light {
    background-color: #F8FAFC !important;
}

@media (max-width: 992px) {
    .landing-hero::before {
        width: 300px;
        height: 300px;
        top: -120px;
        right: -120px;
    }

    .landing-hero::after {
        width: 220px;
        height: 220px;
        bottom: -120px;
        left: -100px;
    }
}

@media (max-width: 768px) {
    .hero-actions .btn {
        width: 100%;
    }

    .feature-card,
    .workflow-step,
    .info-card,
    .stat-card-landing,
    .partner-card,
    .testimonial-card {
        min-height: unset;
    }
}


.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.99), rgba(240,247,255,0.95));
    border: 1px solid rgba(226,232,240,0.85);
    box-shadow: 0 16px 32px rgba(15,23,42,0.08);
}

.page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--portal-background, rgba(37,99,235,0.08));
    color: var(--portal-primary, #2563eb);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero__meta {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0.25rem 0 0;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(59,130,246,.16);
    background: rgba(240,249,255,.95);
}
.profile-field span {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.profile-field strong {
    font-size: 1rem;
    color: #0f172a;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: var(--portal-background, rgba(37,99,235,0.08));
    color: var(--portal-primary, #2563eb);
    font-size: 0.78rem;
    font-weight: 700;
}

.page-section-card {
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,0.92);
    box-shadow: 0 12px 30px rgba(15,23,42,0.08);
    background: #fff;
}

.page-section-card .card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.table-shell {
    overflow: hidden;
    border-radius: 16px;
}

.table thead th {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #f8fafc;
    color: #64748b;
}

.table td {
    vertical-align: middle;
}

.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.btn-soft-success,
.btn-soft-danger,
.btn-soft-warning,
.btn-soft-primary,
.btn-soft-secondary {
    border-radius: 999px;
    font-weight: 600;
}

.btn-soft-success {
    background: rgba(22,163,74,0.12);
    color: #15803d;
    border: 1px solid rgba(22,163,74,0.16);
}

.btn-soft-danger {
    background: rgba(220,38,38,0.12);
    color: #b91c1c;
    border: 1px solid rgba(220,38,38,0.16);
}

.btn-soft-warning {
    background: rgba(234,179,8,0.16);
    color: #a16207;
    border: 1px solid rgba(234,179,8,0.2);
}

.btn-soft-primary {
    background: rgba(37,99,235,0.12);
    color: #1d4ed8;
    border: 1px solid rgba(37,99,235,0.16);
}

.btn-soft-secondary {
    background: rgba(100,116,139,0.12);
    color: #475569;
    border: 1px solid rgba(100,116,139,0.16);
}

body { background: radial-gradient(circle at top right, rgba(183, 210, 172, 0.38), transparent 30%), var(--synco-page); }
body[data-theme='dark'] {
    --synco-page: #121a16;
    --synco-ink: #f4efe9;
    --synco-muted: #b6c4b1;
    --synco-line: rgba(255,255,255,.12);
    --synco-shadow: 0 18px 38px rgba(0,0,0,.25);
    background: radial-gradient(circle at top right, rgba(15,23,42,.22), transparent 30%), #121a16;
}
body[data-theme='dark'] .dashboard-card,
body[data-theme='dark'] .dashboard-summary-card,
body[data-theme='dark'] .mobile-bottom-nav,
body[data-theme='dark'] .mobile-drawer,
body[data-theme='dark'] .glass-card {
    background: rgba(20,28,24,.96);
    color: var(--synco-ink);
}
body[data-theme='dark'] .dashboard-list-item,
body[data-theme='dark'] .dashboard-module-link {
    border-color: rgba(255,255,255,.12);
}
h1, h2, h3, h4, h5, h6 { color: var(--synco-ink); }
a { color: var(--synco-dark-green); text-underline-offset: 3px; }
a:hover { color: var(--synco-red-dark); }
.btn { --bs-btn-border-radius: 12px; --bs-btn-font-weight: 700; --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .68rem; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
.btn-danger { --bs-btn-bg: var(--synco-red); --bs-btn-border-color: var(--synco-red); --bs-btn-hover-bg: var(--synco-red-dark); --bs-btn-hover-border-color: var(--synco-red-dark); }
.btn-success { --bs-btn-bg: var(--synco-admin); --bs-btn-border-color: var(--synco-admin); }
.btn-outline-success { --bs-btn-color: var(--synco-admin); --bs-btn-border-color: #92aa8d; --bs-btn-hover-bg: var(--synco-admin); --bs-btn-hover-border-color: var(--synco-admin); }
.btn-primary { --bs-btn-bg: var(--synco-student); --bs-btn-border-color: var(--synco-student); --bs-btn-hover-bg: #1e40af; --bs-btn-hover-border-color: #1e40af; }
.btn-outline-primary { --bs-btn-color: var(--synco-student); --bs-btn-border-color: #bfdbfe; --bs-btn-hover-bg: var(--synco-student); --bs-btn-hover-border-color: var(--synco-student); }
.btn:focus-visible, .form-control:focus, .form-select:focus, .nav-link:focus-visible { box-shadow: 0 0 0 .25rem rgba(29, 78, 216, .18); }

.portal-shell { grid-template-columns: 268px minmax(0, 1fr); }
.portal-sidebar { padding: 1.35rem .85rem; background: linear-gradient(165deg, #334c39 0%, #567451 54%, #7f9e77 100%); box-shadow: 8px 0 30px rgba(36, 59, 43, .08); }
body.role-student .portal-sidebar { background: linear-gradient(165deg, #0b204f 0%, #1f3f8b 54%, #4c5e8f 100%); box-shadow: 8px 0 30px rgba(14, 28, 61, .18); }
body.role-parent .portal-sidebar { background: linear-gradient(165deg, #5B21B6 0%, #7C3AED 54%, #A78BFA 100%); box-shadow: 8px 0 30px rgba(91, 33, 182, .22); }
.brand-wrap { margin: 0 .45rem 2rem; }
.brand-wrap__link { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand-wrap__link:hover { color: #fff; }
.brand-wrap__link strong { display: block; font-size: 1.1rem; letter-spacing: .08em; }
.brand-wrap__link small { display: block; margin-top: .1rem; font-size: .62rem; letter-spacing: .12em; opacity: .68; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 13px; background: rgba(255,255,255,.14); font-size: 1.1rem; }
.sidebar-label { margin: 0 .65rem .55rem; color: rgba(255,255,255,.58); font-size: .63rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.portal-sidebar .nav-link { gap: .78rem; padding: .72rem .8rem; border: 1px solid transparent; border-radius: 11px; font-size: .89rem; font-weight: 600; }
.portal-sidebar .nav-link i { width: 1.15rem; text-align: center; font-size: 1rem; }
.portal-sidebar .nav-link.active { border-color: rgba(255,255,255,.2); box-shadow: 0 8px 18px rgba(27, 48, 34, .16); }
.portal-main { min-width: 0; padding: 1.5rem clamp(1rem, 2.7vw, 2.5rem) 2.5rem; }
.glass-card { border: 1px solid rgba(255,255,255,.85); box-shadow: var(--synco-shadow); }
.topbar { padding: 1rem 1.25rem; }
.page-kicker, .eyebrow { color: var(--synco-green); font-size: .66rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.page-kicker i { margin-right: .35rem; }
.portal-page-intro h4 { margin-top: .22rem !important; font-size: 1.35rem; }
.portal-page-intro small { color: var(--synco-muted); font-size: .78rem; }
.content-wrap { margin-top: 1.25rem; }
.topbar { position: relative; z-index: 20; }
.user-menu { position: relative; }
.user-menu .dropdown-menu.show { top: calc(100% + .5rem) !important; right: 0 !important; bottom: auto !important; left: auto !important; margin: 0 !important; transform: none !important; }
.user-menu__button { display: flex; align-items: center; gap: .7rem; padding: .3rem .15rem .3rem .35rem; border: 0; background: transparent; text-align: left; }
.user-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #e3eee0; color: var(--synco-dark-green); font-size: .82rem; font-weight: 800; }
.user-menu__identity { display: grid; line-height: 1.25; }
.user-menu__identity strong { color: var(--synco-ink); font-size: .82rem; }
.user-menu__identity small { color: var(--synco-muted); font-size: .7rem; }
.user-menu__chevron { color: var(--synco-muted); font-size: .72rem; }
.dropdown-menu { border: 1px solid var(--synco-line); border-radius: 12px; padding: .45rem; }

.stat-card { display: flex; align-items: flex-end; justify-content: space-between; position: relative; min-height: 142px; overflow: hidden; padding: 1.15rem; box-shadow: var(--synco-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 18px 30px rgba(43, 63, 49, .16); }
.stat-card::after { position: absolute; top: -38px; right: -25px; width: 125px; height: 125px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; content: ''; }
.stat-card.red { background: linear-gradient(135deg, #b44747, #d36a62); }
.stat-card.green { background: linear-gradient(135deg, #668b61, #91b287); }
.stat-card.dark { background: linear-gradient(135deg, #425f47, #6f9170); }
.stat-card.cream { background: linear-gradient(135deg, #b4874d, #d8b477); }
.stat-card__icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.17); font-size: 1.15rem; }
.stat-card__content { z-index: 1; display: grid; gap: .2rem; text-align: right; }
.stat-card__label { font-size: .75rem; font-weight: 700; letter-spacing: .02em; opacity: .86; }
.stat-card__value { font-family: 'Fraunces', serif; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.1; }
.summary-card { display: flex; align-items: center; gap: .8rem; min-height: 92px; padding: 1rem 1.1rem; border: 1px solid var(--synco-line); border-radius: 15px; background: var(--synco-surface); box-shadow: 0 8px 20px rgba(43,63,49,.05); }
.summary-card__icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; background: #e8f0e5; color: var(--synco-dark-green); }
.summary-card__label, .summary-card__value { display: block; }
.summary-card__label { color: var(--synco-muted); font-size: .74rem; font-weight: 700; }
.summary-card__value { margin-top: .12rem; color: var(--synco-ink); font-family: 'Fraunces', serif; font-size: 1.2rem; }

.card {
    border: 1px solid rgba(226,232,240,.8);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15,23,42,.05);
    background: #fff;
}
.card h5, .card h6 { margin-bottom: 1rem; }
.card-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 1rem; }
.card-heading h6 { margin: .2rem 0 0; font-size: 1.04rem; }
.card-heading > i { color: var(--synco-green); font-size: 1.25rem; }
.chart-area { height: 290px; }
.form-control, .form-select, .dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { min-height: 42px; border: 1px solid #d7e0d5; border-radius: 12px; background: #fff; }
.form-label { color: var(--synco-ink); font-size: .82rem; font-weight: 700; }
.form-control:focus, .form-select:focus { border-color: var(--portal-primary, #1d4ed8); box-shadow: 0 0 0 .2rem rgba(29,78,216,.12); }
.payment-summary { display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; align-items: center; min-height: 44px; padding: .75rem .9rem; border: 1px solid #d7e5d2; border-radius: 10px; background: #f4f9f2; color: var(--synco-muted); font-size: .8rem; }
.payment-summary strong { color: var(--synco-ink); }
.payment-summary i { color: var(--synco-green); margin-right: .35rem; }
.payment-summary__due { color: var(--synco-dark-green); }
.alert { border: 0; border-radius: 14px; box-shadow: 0 10px 24px rgba(15,23,42,.04); }
.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f8fbff;
    --bs-table-hover-bg: #f2f7ff;
    margin-bottom: 0;
    color: var(--synco-text);
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0;
}
.table > :not(caption) > * > * { padding: .85rem .8rem; border-bottom-color: var(--synco-line); }
.table thead th { background: #f8fafc; }
.table thead th { border-bottom-width: 1px; color: var(--synco-muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info { color: var(--synco-muted); font-size: .8rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 999px !important; font-size: .8rem; margin: .1rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--portal-primary, #1d4ed8) !important; border-color: var(--portal-primary, #1d4ed8) !important; color: #fff !important; }
.list-group { --bs-list-group-border-color: var(--synco-line); --bs-list-group-bg: transparent; }
.list-group-item { padding: 1rem 0; }
.list-group-item:first-child { padding-top: 0; }

.landing-nav { border-bottom: 1px solid rgba(225,232,222,.8); background: rgba(255,253,249,.9); backdrop-filter: blur(12px); }
.landing-hero { min-height: 650px; background: linear-gradient(100deg, rgba(27,50,37,.93) 0%, rgba(41,72,52,.76) 48%, rgba(41,72,52,.2) 100%), url('../images/synco.png') center/cover no-repeat; }
.landing-hero h1 { max-width: 800px; margin-top: 1.1rem; color: #fff; font-size: clamp(2.35rem, 5vw, 4.4rem); line-height: 1.04; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .4rem; padding: .43rem .7rem; border: 1px solid rgba(255,255,255,.28); border-radius: 30px; background: rgba(255,255,255,.12); font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.hero-copy { max-width: 645px; color: rgba(255,255,255,.86); font-size: 1.09rem; }
.hero-actions, .hero-trust { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-actions { margin-top: 1.8rem; }
.hero-trust { gap: 1.2rem; margin-top: 2.3rem; color: rgba(255,255,255,.74); font-size: .78rem; font-weight: 700; }
.hero-trust i { margin-right: .35rem; color: #d8efc9; }
.section-kicker { color: var(--synco-green); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.section-title { margin-top: .5rem; font-size: clamp(1.9rem, 3.4vw, 2.85rem); }
.feature-card { padding: 1.5rem; transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--synco-shadow); }
.feature-icon { width: 50px; height: 50px; border-radius: 14px; background: #e8f0e5; color: var(--synco-dark-green); }
.feature-card p { color: var(--synco-muted); font-size: .9rem; }
.workflow-step { height: 100%; padding: 1.45rem; border-radius: 18px; background: #fff; }
.workflow-number { display: block; margin-bottom: .9rem; color: var(--synco-green); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.landing-callout { padding: clamp(1.8rem, 4vw, 3.4rem); border-radius: 24px; color: #fff; background: linear-gradient(125deg, #3d5d43, #7e9c75); box-shadow: var(--synco-shadow); }
.landing-callout h2 { color: #fff; }
.landing-footer { background: #f0f4ed; color: var(--synco-muted); font-size: .82rem; }
.auth-page { position: relative; overflow: hidden; background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%); }
.auth-page::before { position: absolute; top: -180px; left: -100px; width: 420px; height: 420px; border-radius: 50%; background: rgba(29, 78, 216, .08); content: ''; }
.auth-card { position: relative; border-radius: 24px; border: 1px solid rgba(226,232,240,.8); box-shadow: var(--synco-shadow); }
.auth-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--synco-student); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-decoration: none; }
.auth-page::after {
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(59, 130, 246, .09);
    content: '';
}
.auth-card {
    background: rgba(255,255,255,.96);
    box-shadow: 0 24px 60px rgba(15,23,42,.12);
}
.auth-card__header {
    padding-bottom: .45rem;
    border-bottom: 1px solid rgba(203, 213, 225, .45);
}
.auth-card h2,
.auth-card h3 {
    color: #22322a;
    letter-spacing: -0.02em;
}
.auth-card .form-label {
    font-size: .82rem;
    font-weight: 700;
    color: #304238;
}
.auth-card .form-control {
    min-height: 46px;
    border-radius: 14px;
    border-color: #d7e3ef;
    background: #f8fbff;
}
.auth-card .form-control:focus {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 .22rem rgba(59,130,246,.16);
}
.auth-password-toggle {
    border: 1px solid #d7e3ef;
    border-left: 0;
    border-radius: 0 14px 14px 0;
    background: #f8fbff;
    color: #475569;
    min-width: 48px;
}
.auth-password-toggle:hover {
    background: #eef5ff;
    color: #1d4ed8;
}
.auth-password-toggle:focus {
    box-shadow: 0 0 0 .22rem rgba(59,130,246,.16);
    z-index: 3;
}
.auth-card .input-group .form-control {
    border-right: 0;
}
.auth-card .input-group .form-control:focus {
    box-shadow: 0 0 0 .22rem rgba(59,130,246,.16);
}
.auth-card .alert {
    border-width: 1px;
}
.auth-form-stack {
    display: grid;
    gap: .2rem;
}
.auth-section-title {
    display: inline-flex;
    align-items: center;
    color: #1f3f8b;
    font-size: 1.05rem;
}
.auth-input-hint {
    display: block;
    margin-top: .35rem;
    color: #617487;
    font-size: .75rem;
}
.auth-action-row {
    display: flex;
    gap: .6rem;
    justify-content: flex-start;
}
.auth-btn-back {
    border-radius: 999px;
    border-color: #c6d5e8;
    color: #334155;
    background: #fff;
    font-weight: 700;
}
.auth-btn-back:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #1e293b;
}
.auth-register-page {
    min-height: 100vh;
}
.auth-register-card {
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.auth-register-card::-webkit-scrollbar {
    width: 9px;
}
.auth-register-card::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.35);
    border-radius: 999px;
}
.auth-register-card .auth-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: .7rem;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.95) 24%);
}
.auth-links-row a {
    text-decoration: none;
    color: #3b4f6b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .45rem .6rem;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid rgba(203, 213, 225, .6);
}
.auth-links-row a:hover {
    color: #1d4ed8;
    background: #eef5ff;
    border-color: rgba(59,130,246,.3);
}
.auth-support-note {
    display: block;
    line-height: 1.55;
    font-size: .94rem;
}
.auth-login-page .auth-card {
    max-width: 560px;
    margin-inline: auto;
}
@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.2rem !important;
        border-radius: 20px;
    }
    .auth-register-card {
        max-height: calc(100vh - 1.25rem);
    }
    .auth-action-row,
    .auth-links-row {
        flex-direction: column;
        align-items: stretch;
    }
    .auth-action-row .btn,
    .auth-links-row a {
        text-align: center;
        justify-content: center;
        width: 100%;
    }
}
.mobile-dashboard { display: none; }
.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(18, 26, 22, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(86vw, 320px);
    padding: 1rem;
    background: #fff;
    box-shadow: 18px 0 38px rgba(13, 22, 18, 0.16);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
}
body.mobile-sheet-open .mobile-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}
body.mobile-sheet-open .mobile-drawer {
    transform: translateX(0);
}

@media (max-width: 991.98px) {
    .portal-shell { display: block; }
    .portal-sidebar { position: relative; height: auto; padding: .85rem 1rem; overflow: hidden; }
    .brand-wrap { margin: 0 0 .75rem; }
    .sidebar-label { display: none; }
    .portal-sidebar nav { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .15rem; }
    .portal-sidebar .nav-link { flex: 0 0 auto; padding: .55rem .7rem; }
    .portal-main { padding: 1rem; }
}
@media (max-width: 575.98px) {
    .topbar { align-items: flex-start !important; gap: .7rem; padding: 1rem; }
    .portal-page-intro small, .user-menu__identity, .user-menu__chevron { display: none; }
    .chart-area { height: 240px; }
    .landing-hero { min-height: 610px; }
    .hero-actions .btn { width: 100%; }
}

@media (max-width: 767.98px) {
    .portal-dashboard-page { background: #f8faf8; }
    .portal-dashboard-page .portal-sidebar,
    .portal-dashboard-page .topbar { display: none; }
    .portal-dashboard-page .portal-shell { display: block; }
    .portal-dashboard-page .portal-main { padding: 0; }
    .portal-dashboard-page .content-wrap { margin: 0; }
    .portal-dashboard-page .desktop-dashboard { display: none; }
    .dashboard-shell { padding: 1rem 1rem 5.75rem; min-height: 100vh; }
    .dashboard-loading { display: grid; gap: .9rem; }
    .dashboard-hero { padding: 1rem; gap: .85rem; }
    .dashboard-hero__summary { grid-template-columns: 1fr 1fr; }
    .dashboard-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .dashboard-panel-grid { grid-template-columns: 1fr; gap: .9rem; }
    .dashboard-card { padding: 1rem; }
    .mobile-drawer { display: block; }
    .mobile-drawer-backdrop { display: block; }
    .mobile-bottom-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; min-height: 70px; padding: .55rem .35rem max(.55rem, env(safe-area-inset-bottom)); border-top: 1px solid #e7edeb; background: rgba(255,255,255,.97); box-shadow: 0 -8px 20px rgba(27,42,32,.08); }
    .mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .18rem; color: #5d675f; font-size: .57rem; font-weight: 700; text-decoration: none; }
    .mobile-bottom-nav i { font-size: 1.05rem; }
    .mobile-bottom-nav a.active { color: #4c6b4b; }
}

@media (min-width: 768px) {
    .dashboard-shell { padding: 0; }
    .dashboard-loading { display: grid; gap: 1rem; }
    .mobile-bottom-nav,
    .mobile-drawer,
    .mobile-drawer-backdrop,
    .dashboard-menu-trigger,
    .theme-toggle { display: none; }
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-top: .15rem;
}
.dashboard-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .7rem;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 22px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 14px 30px rgba(39,58,48,.08);
}
.dashboard-appbar__brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #243127;
    text-decoration: none;
    min-width: 0;
}
.dashboard-appbar__brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    font-weight: 800;
}
.dashboard-appbar__brand-text {
    display: grid;
    line-height: 1.05;
}
.dashboard-appbar__brand-text strong {
    font-size: .92rem;
    letter-spacing: .08em;
}
.dashboard-appbar__brand-text small {
    color: #bfdbfe;
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.dashboard-appbar__actions {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.dashboard-notification-pill {
    position: relative;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(59,130,246,.12);
    color: #1d4ed8;
}
.dashboard-notification-pill span {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #bf1650;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
}
.dashboard-loading {
    display: none;
}
.dashboard-loading.is-active {
    display: grid;
    gap: 1rem;
}
.dashboard-skeleton-card {
    min-height: 120px;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(240,244,238,.95), rgba(255,255,255,.95));
    background-size: 200% 100%;
    animation: shimmer 1.3s linear infinite;
    box-shadow: 0 16px 32px rgba(39,58,48,.06);
}
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.dashboard-card {
    padding: 1.15rem;
    border: 1px solid #e8eee4;
    border-radius: 20px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 16px 32px rgba(39,58,48,.06);
}
.dashboard-hero {
    display: grid;
    gap: 1rem;
    padding: 1.7rem 1.7rem 1.5rem;
    border-radius: 24px;
    color: #fff;
    overflow: hidden;
    position: relative;
    min-height: 240px;
    box-shadow: 0 20px 50px rgba(30,60,140,.14);
}
.dashboard-hero::after {
    content: '';
    position: absolute;
    inset: auto -45px -45px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.28);
}
.dashboard-hero--student { background: linear-gradient(135deg, #0f2a66 0%, #1f3f8b 100%); }
.dashboard-hero--teacher { background: linear-gradient(135deg, #31553a 0%, #75a56e 100%); }
.dashboard-hero--parent { background: linear-gradient(135deg, #5a2da5 0%, #8e5fd8 100%); }
.dashboard-hero__content h2 {
    margin: 0.3rem 0 0.25rem;
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.dashboard-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(255,255,255,.95);
}
.dashboard-hero__actions {
    display: flex;
    gap: .6rem;
    align-items: center;
    justify-content: flex-end;
}
.dashboard-menu-trigger,
.theme-toggle {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    cursor: pointer;
}
.dashboard-menu-trigger--ghost {
    background: rgba(59,130,246,.08);
    color: #1d4ed8;
    box-shadow: none;
}
.dashboard-hero__meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    color: rgba(255,255,255,.82);
    font-size: .9rem;
}
.dashboard-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.dashboard-hero__summary {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.dashboard-pill {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-height: 78px;
    padding: .95rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.18);
}
.dashboard-pill--progress {
    background: rgba(59,130,246,.12);
    border-color: rgba(59,130,246,.18);
}
.dashboard-pill span { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; opacity: .95; color: rgba(255,255,255,.92); }
.dashboard-pill strong { font-size: 1.05rem; color: #fff; }
.dashboard-pill--inline {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: .35rem .6rem;
    background: rgba(59,130,246,.12);
    color: #1d4ed8;
}
.dashboard-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-summary-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(59,130,246,.12);
    border-radius: 20px;
    background: #f8fbff;
    box-shadow: 0 10px 24px rgba(30,60,140,.05);
}
.dashboard-summary-card--accent {
    background: linear-gradient(135deg, rgba(59,130,246,.08) 0%, rgba(191,219,254,.25) 100%);
}
.dashboard-summary-card__icon {
    display: grid;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    place-items: center;
    background: rgba(59,130,246,.14);
    color: #1d4ed8;
    font-size: 1.2rem;
}
.dashboard-summary-card p {
    margin: 0;
    color: #334155;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.dashboard-summary-card strong { display: block; margin-top: .2rem; color: #0f172a; font-size: 1.1rem; }
.dashboard-module-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-module-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 110px;
    padding: 1rem .85rem;
    border-radius: 20px;
    border: 1px solid rgba(59,130,246,.16);
    background: #fff;
    color: #134e8e;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(30,60,140,.05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-module-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(30,60,140,.1);
    border-color: rgba(59,130,246,.28);
    color: #0f172a;
}
.dashboard-module-link i {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: rgba(15,42,102,.16);
    color: #0f2a66;
    font-size: 1.25rem;
}
.dashboard-module-link span { font-size: .8rem; font-weight: 700; text-align: center; color: #0f172a; }
.dashboard-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.dashboard-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .8rem;
    margin-bottom: 1rem;
}

body.role-student .dashboard-card,
body.role-student .dashboard-summary-card,
body.role-student .dashboard-module-link {
    border-color: rgba(15,42,102,.18);
}

body.role-student .dashboard-card:not(.dashboard-hero) {
    background: rgba(232,238,249,.96);
}

body.role-student .dashboard-module-link {
    background: #fff;
}

body.role-student .dashboard-summary-card--accent {
    background: linear-gradient(135deg, rgba(15,42,102,.08) 0%, rgba(215,224,244,.18) 100%);
}

body.role-student .dashboard-summary-card__icon {
    background: rgba(15,42,102,.14);
    color: #0f2a66;
}

body.role-student .dashboard-pill--inline {
    background: rgba(15,42,102,.12);
    color: #0f2a66;
}

body.role-student .dashboard-appbar__brand-text small {
    color: #c5d2f1;
}

body.role-student .dashboard-menu-trigger--ghost {
    background: rgba(15,42,102,.08);
    color: #0f2a66;
}

.dashboard-card__kicker {
    margin: 0 0 .25rem;
    color: #475569;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.dashboard-card h3,
.dashboard-card h4 {
    margin: 0;
    color: #253226;
}
.dashboard-chip {
    display: inline-flex;
    align-items: center;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: #eef6ea;
    color: #4c6847;
    font-size: .72rem;
    font-weight: 800;
}
.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    padding: .8rem .9rem;
    border: 1px solid #e8eee4;
    border-radius: 16px;
    background: #f9fcf7;
}
.dashboard-list-item h4 {
    font-size: .95rem;
}
.dashboard-list-item p {
    margin: .18rem 0 0;
    color: #6c7b6e;
    font-size: .8rem;
}
.dashboard-list-item strong,
.dashboard-list-item span {
    color: #3d523f;
    font-size: .84rem;
    font-weight: 700;
}
.dashboard-list-item--compact {
    align-items: flex-start;
}
.dashboard-progress-card {
    display: grid;
    gap: .65rem;
}
.dashboard-progress-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem .8rem;
    border-radius: 14px;
    background: #f8fbf6;
    color: #617868;
}
.dashboard-progress-card__row strong { color: #243127; }
.dashboard-progress-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8efe5;
}
.dashboard-progress-bar div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4b6d49, #84b36e);
}
.dashboard-progress-bar--parent div {
    background: linear-gradient(90deg, #7C3AED, #A78BFA);
}

/* Purple Theme for Parent Pages */
body.role-parent .dashboard-card,
body.role-parent .dashboard-summary-card,
body.role-parent .dashboard-module-link {
    border-color: rgba(124,58,237,.18);
}

body.role-parent .dashboard-card:not(.dashboard-hero) {
    background: rgba(245,243,255,.96);
}

body.role-parent .dashboard-module-link {
    background: #fff;
    border-color: rgba(124,58,237,.16);
}

body.role-parent .dashboard-module-link:hover {
    border-color: rgba(124,58,237,.28);
    box-shadow: 0 18px 32px rgba(124,58,237,.1);
    color: #5B21B6;
}

body.role-parent .dashboard-summary-card--accent {
    background: linear-gradient(135deg, rgba(124,58,237,.08) 0%, rgba(196,181,253,.25) 100%);
    border-color: rgba(124,58,237,.16);
}

body.role-parent .dashboard-summary-card__icon {
    background: rgba(124,58,237,.14);
    color: #7C3AED;
}

body.role-parent .dashboard-summary-card p {
    color: #6B21A8;
}

body.role-parent .dashboard-summary-card strong {
    color: #5B21B6;
}

body.role-parent .dashboard-pill--inline {
    background: rgba(124,58,237,.12);
    color: #7C3AED;
}

body.role-parent .dashboard-appbar__brand-text small {
    color: #D8B4FE;
}

body.role-parent .dashboard-menu-trigger--ghost {
    background: rgba(124,58,237,.08);
    color: #7C3AED;
}

body.role-parent .dashboard-card__kicker {
    color: #6B21A8;
}

body.role-parent .dashboard-card h3,
body.role-parent .dashboard-card h4 {
    color: #5B21B6;
}

body.role-parent .dashboard-chip {
    background: #F3E8FF;
    color: #6B21A8;
}

body.role-parent .dashboard-list-item {
    border-color: rgba(124,58,237,.16);
    background: #F9F5FF;
}

body.role-parent .dashboard-list-item h4 {
    color: #5B21B6;
}

body.role-parent .dashboard-list-item p {
    color: #8B5CF6;
}

body.role-parent .dashboard-list-item strong {
    color: #6B21A8;
}

body.role-parent .dashboard-progress-card__row {
    background: #F3E8FF;
    color: #8B5CF6;
}

body.role-parent .dashboard-progress-card__row strong {
    color: #5B21B6;
}

body.role-parent .dashboard-progress-bar {
    background: rgba(124,58,237,.15);
}

body.role-parent .dashboard-empty-state {
    border-color: rgba(124,58,237,.15);
    background: rgba(245,243,255,.95);
    color: #5B21B6;
}

body.role-parent .dashboard-empty-state i {
    background: rgba(124,58,237,.12);
    color: #7C3AED;
}

body.role-parent .mobile-drawer {
    background: #F9F5FF;
}

body.role-parent .mobile-drawer__link {
    color: #5B21B6;
    background: #fff;
}

body.role-parent .mobile-drawer__link.active {
    background: rgba(124,58,237,.12);
    color: #7C3AED;
}
.dashboard-empty-state {
    display: grid;
    justify-items: center;
    gap: .4rem;
    padding: 1.2rem .8rem;
    border: 1px dashed rgba(59,130,246,.15);
    border-radius: 16px;
    background: rgba(240,249,255,.95);
    color: #334155;
    text-align: center;
}
.dashboard-empty-state i {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: rgba(59,130,246,.12);
    color: #1d4ed8;
    font-size: 1.15rem;
}
.mobile-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(20,26,22,.4);
    backdrop-filter: blur(3px);
}
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(83vw, 320px);
    height: 100vh;
    padding: 1rem;
    background: #eff6ff;
    box-shadow: 18px 0 40px rgba(15,23,42,.16);
    transform: translateX(-102%);
    transition: transform .25s ease;
}
body.mobile-drawer-open .mobile-drawer {
    transform: translateX(0);
}
body.mobile-drawer-open .mobile-drawer-backdrop { display: block; }
.mobile-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.mobile-drawer__links {
    display: grid;
    gap: .55rem;
}
.mobile-drawer__link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem .8rem;
    border-radius: 14px;
    background: #fff;
    color: #273227;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(39,58,48,.05);
}
.mobile-drawer__link.active {
    background: rgba(59,130,246,.12);
    color: #1d4ed8;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
body[data-theme="dark"] {
    color-scheme: dark;
    background: #101612;
    color: #f3f6f1;
}
body[data-theme="dark"] .dashboard-card,
body[data-theme="dark"] .dashboard-summary-card,
body[data-theme="dark"] .dashboard-module-link,
body[data-theme="dark"] .mobile-drawer,
body[data-theme="dark"] .dashboard-list-item,
body[data-theme="dark"] .dashboard-empty-state {
    background: #17201b;
    border-color: #2c3a2f;
    color: #f3f6f1;
}
body[data-theme="dark"] .dashboard-card h3,
body[data-theme="dark"] .dashboard-card h4,
body[data-theme="dark"] .dashboard-summary-card strong,
body[data-theme="dark"] .dashboard-list-item strong,
body[data-theme="dark"] .dashboard-progress-card__row strong {
    color: #f3f6f1;
}
body[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15,22,18,.98);
    border-color: #273527;
}
body[data-theme="dark"] .dashboard-summary-card__icon,
body[data-theme="dark"] .dashboard-module-link i,
body[data-theme="dark"] .dashboard-empty-state i {
    background: #233424;
    color: #9fcca1;
}
body[data-theme="dark"] .dashboard-chip,
body[data-theme="dark"] .dashboard-pill--inline {
    background: #233424;
    color: #9fcca1;
}
body[data-theme="dark"] .dashboard-progress-card__row,
body[data-theme="dark"] .dashboard-list-item {
    background: #1a241c;
}
body[data-theme="dark"] .dashboard-card__kicker,
body[data-theme="dark"] .dashboard-summary-card p,
body[data-theme="dark"] .dashboard-list-item p,
body[data-theme="dark"] .dashboard-progress-card__row,
body[data-theme="dark"] .dashboard-empty-state {
    color: #9db1a0;
}


/* ===========================
   New Landing Page Enhancements
   =========================== */

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.animate-slide-left {
    animation: slideLeft 0.9s ease-out 0.3s both;
}

.animate-slide-up {
    animation: slideUp 0.7s ease-out;
}

/* Hero Enhancements */
.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--landing-text);
    letter-spacing: -0.03em;
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--landing-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

.pulse-indicator {
    width: 16px;
    height: 16px;
    background: var(--landing-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
}

.bg-gradient-success {
    background: var(--success-gradient) !important;
}

.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.progress-bar.bg-gradient-success {
    background: var(--success-gradient);
}

.metric-card {
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
}

.bg-blue-light {
    background-color: var(--landing-blue-soft);
}

.bg-purple-light {
    background-color: var(--landing-purple-soft);
}

.bg-green-light {
    background-color: var(--landing-green-soft);
}

.bg-success-light {
    background-color: var(--landing-green-soft);
}

.bg-primary-light {
    background-color: var(--landing-blue-soft);
}

.check-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--landing-text);
}

/* Section Enhancements */
.bg-gradient-light {
    background: linear-gradient(135deg, var(--landing-surface-alt) 0%, var(--landing-surface) 100%);
}

.section-kicker-light {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-list-item {
    display: flex;
    gap: 1rem;
}

.feature-list-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.feature-list-content h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--landing-text);
}

/* About Visual */
.about-card {
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--landing-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.1);
}

.role-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.stat-box {
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--landing-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

/* Feature Cards */
.feature-hover {
    transition: all 0.3s ease;
    background: white;
    border: 1px solid var(--landing-border);
}

.feature-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(31, 41, 55, 0.12) !important;
}

.feature-icon-new {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    transition: all 0.3s ease;
}

.feature-hover:hover .feature-icon-new {
    transform: scale(1.1);
}

/* Impact Section */
.bg-gradient-primary {
    background: linear-gradient(160deg, var(--landing-blue-dark) 0%, var(--landing-purple-dark) 100%);
}

.impact-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.1;
    background: 
        radial-gradient(circle at 20% 50%, white 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, white 0%, transparent 40%);
}

.impact-stat-card {
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.impact-stat-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-5px);
}

.impact-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    color: white;
}

.impact-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
}

.impact-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    margin-bottom: 0.5rem;
}

.impact-description {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.25rem;
}

/* Testimonials */
.testimonial-card-new {
    background: white;
    border: 1px solid var(--landing-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.06);
    transition: all 0.3s ease;
}

.testimonial-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.12);
}

.testimonial-rating {
    display: flex;
    gap: 0.25rem;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--landing-muted);
    font-style: italic;
}

.testimonial-author-new {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.125rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-outline-primary {
    color: var(--landing-blue);
    border-color: var(--landing-blue);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--landing-blue);
    border-color: var(--landing-blue);
    color: white;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: 12px;
}

/* Progress bars */
.progress {
    background: var(--landing-border);
}

.bg-success {
    background-color: var(--landing-green) !important;
}

.bg-primary {
    background-color: var(--landing-blue) !important;
}

.bg-purple {
    background-color: var(--landing-purple) !important;
}

/* Responsive */
@media (max-width: 992px) {
    .landing-hero::before {
        width: 350px;
        height: 350px;
        top: -100px;
        right: -100px;
    }

    .landing-hero::after {
        width: 280px;
        height: 280px;
        bottom: -100px;
        left: -80px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .impact-value {
        font-size: 2rem;
    }

    .feature-list-item {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-stat-value {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .impact-stat-card {
        padding: 1.5rem;
    }

    .testimonial-card-new {
        padding: 1.5rem;
    }
}
