/* ============================================================
   STV ENGLISH & SARAH KIỀU — BRAND DESIGN SYSTEM
   Brand Colors:
   - STV Red:      #E21F26 (C: 4%, M: 100%, Y: 100%, K: 0%)
   - STV Cyan:     #0875B1 (C: 88%, M: 49%, Y: 7%, K: 0%)
   - STV Navy:     #1D3A66 (C: 98%, M: 83%, Y: 34%, K: 22%)
   - STV Yellow:   #FFB800 (Mascot & Warm Accent)
   ============================================================ */

:root {
    /* STV Brand Red */
    --brand:          #E21F26;
    --brand-700:      #C3141B;
    --brand-600:      #D91A20;
    --brand-100:      #FEE2E2;
    --brand-50:       #FEF2F2;

    /* STV Cyan / Sky Blue */
    --brand-blue:     #0875B1;
    --brand-blue-700: #065A89;
    --brand-blue-600: #076AA0;
    --brand-blue-100: #E0F2FE;
    --brand-blue-50:  #F0F9FF;

    /* STV Deep Navy */
    --brand-navy:     #1D3A66;
    --brand-navy-800: #142948;
    --brand-navy-100: #E2E8F0;

    /* STV Warm Joyful Yellow */
    --brand-yellow:   #FFB800;
    --brand-yellow-600:#E5A600;
    --brand-yellow-50:#FFFBEB;

    /* Accent & Semantic */
    --accent:         #0875B1;
    --accent-600:     #065A89;
    --accent-50:      #F0F9FF;

    /* Typography & Neutral Colors */
    --ink:            #1D3A66;
    --ink-2:          #334E68;
    --muted:          #627D98;
    --muted-2:        #9FB3C8;
    --line:           #E2E8F0;
    --line-2:         #EDF2F7;
    --bg:             #F8FAFC;
    --card:           #FFFFFF;

    /* Statuses */
    --ok:             #059669;
    --ok-bg:          #ECFDF5;
    --err:            #E21F26;
    --err-bg:         #FEF2F2;
    --info:           #0875B1;
    --info-bg:        #E0F2FE;

    /* Border Radius */
    --r-sm:           8px;
    --r-md:           12px;
    --r-lg:           18px;
    --r-xl:           24px;

    /* Soft Brand Shadows */
    --shadow-sm:      0 1px 2px rgba(29, 58, 102, .04), 0 1px 3px rgba(29, 58, 102, .06);
    --shadow-md:      0 4px 14px rgba(29, 58, 102, .08), 0 2px 6px rgba(29, 58, 102, .04);
    --shadow-lg:      0 20px 40px -12px rgba(29, 58, 102, .14), 0 8px 16px -8px rgba(226, 31, 38, .08);
    --shadow-glow:    0 8px 25px rgba(226, 31, 38, .28);
    --shadow-blue-glow: 0 8px 25px rgba(8, 117, 177, .28);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--brand-blue); text-decoration: none; transition: all .15s ease; }
a:hover { color: var(--brand); }

h1, h2, h3, h4, h5, h6 { color: var(--ink); letter-spacing: -.02em; line-height: 1.25; font-weight: 700; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; width: 100%; }
.narrow    { max-width: 480px; }
.medium    { max-width: 760px; }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all .2s;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}
.brand img { height: 42px; width: auto; display: block; }
.brand-tag {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--brand-blue);
    text-transform: uppercase;
    padding: 4px 10px;
    background: var(--brand-blue-50);
    border: 1px solid var(--brand-blue-100);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.brand-tag::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    transition: all .2s ease;
}
.nav-toggle:hover {
    background: var(--brand-50);
    border-color: var(--brand-100);
}
.hamburger-bar {
    display: block;
    width: 20px;
    height: 2.2px;
    background: var(--brand-navy);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.open .hamburger-bar:nth-child(1) {
    transform: translateY(7.2px) rotate(45deg);
}
.nav-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle.open .hamburger-bar:nth-child(3) {
    transform: translateY(-7.2px) rotate(-45deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-links > a:not(.btn), .nav-links form button {
    font: inherit;
    color: var(--ink-2);
    padding: 9px 16px;
    border-radius: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    transition: all .15s ease;
    font-size: .94rem;
}
.nav-links > a:not(.btn):hover, .nav-links form button:hover {
    background: var(--brand-50);
    color: var(--brand);
}
.nav-links > a.active {
    color: var(--brand);
    background: var(--brand-100);
    font-weight: 700;
}
.nav-links .btn {
    background: var(--brand) !important;
    color: #ffffff !important;
    border: 1px solid var(--brand) !important;
    padding: 9px 20px !important;
    font-size: .92rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(226, 31, 38, 0.28) !important;
    text-decoration: none !important;
}
.nav-links .btn:hover {
    background: var(--brand-700) !important;
    border-color: var(--brand-700) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(226, 31, 38, 0.4) !important;
    transform: translateY(-1px);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid var(--line);
}
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-blue) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .92rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(8, 117, 177, .25);
}

/* ============================================================
   MAIN / LAYOUT
   ============================================================ */
main { flex: 1; padding: 40px 0 80px; }

.page-head { margin-bottom: 36px; }
.page-title {
    font-size: 2.1rem;
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--ink);
}
.page-sub {
    color: var(--muted);
    margin: 0;
    font-size: 1.05rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .75rem;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.eyebrow--blue {
    color: var(--brand-blue);
    background: var(--brand-blue-50);
    border-color: var(--brand-blue-100);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    padding: 36px;
    transition: box-shadow .2s, border-color .2s;
}
.card:hover {
    border-color: #CBD5E1;
    box-shadow: var(--shadow-md);
}
.card-tight { padding: 24px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand);
    color: #fff !important;
    border: 1px solid var(--brand);
    padding: 13px 26px;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    text-decoration: none;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(226, 31, 38, .15);
}
.btn:hover {
    background: var(--brand-700);
    border-color: var(--brand-700);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.btn:active { transform: translateY(0); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: .88rem; border-radius: 8px; }

.btn-secondary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff !important;
}
.btn-secondary:hover {
    background: var(--brand-blue-700);
    border-color: var(--brand-blue-700);
    box-shadow: var(--shadow-blue-glow);
}

.btn-ghost {
    background: #fff;
    color: var(--brand-navy) !important;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
    background: var(--brand-blue-50);
    border-color: var(--brand-blue-100);
    color: var(--brand-blue) !important;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue) !important;
    border: 1.5px solid var(--brand-blue-100);
}
.btn-outline:hover {
    background: var(--brand-blue-50);
    border-color: var(--brand-blue);
    color: var(--brand-blue) !important;
}

.btn-accent {
    background: linear-gradient(135deg, var(--brand) 0%, #FF4D4D 100%);
    border: none;
    color: #fff !important;
}
.btn-accent:hover {
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand) 100%);
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="number"],
.field textarea,
.field select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    transition: all .15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(8, 117, 177, .15);
}
.field input:disabled {
    background: #F1F5F9;
    color: var(--muted);
    cursor: not-allowed;
}

.otp-input {
    text-align: center;
    font-size: 2rem !important;
    font-weight: 800;
    letter-spacing: .35em;
    padding: 14px !important;
    color: var(--brand) !important;
    border: 2px solid var(--brand-100) !important;
    background: var(--brand-50) !important;
}
.otp-input:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 4px rgba(226, 31, 38, .15) !important;
}

/* ============================================================
   HERO SECTION (HOME)
   ============================================================ */
.hero {
    position: relative;
    padding: 60px 0 70px;
    overflow: hidden;
}
.hero-center { text-align: center; }
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 10%, rgba(8, 117, 177, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 80% 30%, rgba(226, 31, 38, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 20% 50%, rgba(255, 184, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.hero h1 {
    font-size: 3rem;
    line-height: 1.25;
    margin: 12px 0 20px;
    font-weight: 900;
    letter-spacing: -.03em;
}
.hero h1 .headline-primary {
    color: var(--brand-navy);
    display: inline-block;
}
.hero h1 .headline-accent {
    color: var(--brand);
    display: inline-block;
}
.hero h1 .accent {
    color: var(--brand);
    background: linear-gradient(135deg, var(--brand) 0%, #FF4545 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.no-break {
    white-space: nowrap;
}
.hero .lead {
    font-size: 1.2rem;
    color: var(--ink-2);
    line-height: 1.7;
    margin: 0 auto 36px;
    max-width: 680px;
}
.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

/* Stats Counter */
.stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 24px 36px;
    box-shadow: var(--shadow-md);
    max-width: 720px;
    margin: 0 auto;
}
.stat { text-align: center; }
.stat-num {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--brand-navy);
    line-height: 1.1;
}
.stat-num span { color: var(--brand); }
.stat-label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 4px;
}
.stat-divider { width: 1px; height: 42px; background: var(--line); }

/* ============================================================
   MASCOT & PILLARS SHOWCASE (HOMEPAGE)
   ============================================================ */
.mascots-section {
    padding: 80px 0 60px;
}
.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}
.section-head h2 {
    font-size: 2.2rem;
    margin: 10px 0 12px;
    font-weight: 800;
}
.section-head p {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 0;
}

.mascots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.mascot-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.mascot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color, var(--brand));
    transition: height .2s;
}
.mascot-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #CBD5E1;
}
.mascot-card:hover::before { height: 6px; }

.mascot-avatar {
    width: 130px;
    height: 140px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease;
}
.mascot-card:hover .mascot-avatar { transform: scale(1.08); }
.mascot-avatar img { width: 100%; height: 100%; object-fit: contain; }

.mascot-tag {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.mascot-card h3 {
    font-size: 1.22rem;
    margin: 0 0 6px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--brand-navy);
}
.mascot-subname {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 3px;
}
.mascot-role {
    font-size: .88rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 12px;
}
.mascot-desc {
    font-size: .92rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   WHY SECTION (FEATURES)
   ============================================================ */
.why { padding: 60px 0 70px; }
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 32px 26px;
    box-shadow: var(--shadow-sm);
    transition: all .2s ease;
}
.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-blue-100);
}
.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    display: inline-block;
    background: var(--brand-50);
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--brand-100);
}
.feature h3 { font-size: 1.15rem; margin: 0 0 8px; font-weight: 700; }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; line-height: 1.65; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
    padding: 70px 0;
    margin-top: 40px;
}
.cta-banner-inner {
    background: linear-gradient(135deg, var(--brand-navy) 0%, #0F2548 100%);
    border-radius: var(--r-xl);
    padding: 60px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(29, 58, 102, .25);
}
.cta-banner-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(226,31,38,0.25) 0%, transparent 70%);
    pointer-events: none;
}
.cta-banner-inner::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8,117,177,0.3) 0%, transparent 70%);
    pointer-events: none;
}
.cta-banner-inner h2 {
    color: #fff;
    font-size: 2.2rem;
    margin: 0 0 12px;
    font-weight: 800;
}
.cta-banner-inner p {
    color: #CBD5E1;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ============================================================
   COURSES GRID & CARDS
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.course-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: all .2s ease;
    text-decoration: none;
}
.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #CBD5E1;
}
.course-thumb {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb span { font-size: 3rem; font-weight: 900; color: rgba(255,255,255,.9); }

.course-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.course-body h3 { font-size: 1.25rem; margin: 0 0 8px; color: var(--ink); font-weight: 700; }
.course-body .sub { color: var(--muted); font-size: .92rem; margin-bottom: 18px; flex: 1; }
.course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: .88rem;
}
.lesson-count { color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge.owned {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid #A7F3D0;
}
.price { font-weight: 800; color: var(--brand); font-size: 1rem; }

/* ============================================================
   COURSE DETAIL & LESSONS
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--brand-blue); }
.breadcrumb .sep { color: var(--muted-2); }

.course-hero-title { font-size: 2.2rem; margin: 8px 0 12px; }
.course-intro {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 24px;
    margin: 24px 0;
}
.course-intro-inner { line-height: 1.7; color: var(--ink-2); }

.module-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 16px;
    overflow: hidden;
}
.module-header {
    background: var(--bg);
    padding: 16px 20px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink);
    text-decoration: none;
    transition: background .15s;
}
.lesson-item:last-child { border-bottom: none; }
.lesson-item:hover { background: var(--brand-blue-50); color: var(--brand-blue); }
.lesson-item.active {
    background: var(--brand-100);
    color: var(--brand);
    font-weight: 700;
}
.lesson-icon { font-size: 1.1rem; }
.lesson-duration { margin-left: auto; font-size: .84rem; color: var(--muted); }

/* ============================================================
   LESSON PLAYBACK & SIDEBAR
   ============================================================ */
.lesson-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 960px) {
    .lesson-wrap { grid-template-columns: 1fr; }
}
.video-frame {
    position: relative;
    aspect-ratio: 16/9;
    background: #0A1128;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(29, 58, 102, .18);
    margin-bottom: 24px;
}
.lesson-title { font-size: 1.8rem; margin: 0 0 14px; }
.prose { color: var(--ink-2); line-height: 1.7; }

.materials { list-style: none; padding: 0; margin: 16px 0; }
.materials li { margin-bottom: 10px; }
.materials a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--ink);
    font-weight: 600;
    transition: all .15s;
}
.materials a:hover {
    border-color: var(--brand-blue);
    background: var(--brand-blue-50);
    color: var(--brand-blue);
}

.sidebar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    position: sticky;
    top: 96px;
}
.sidebar h4 { margin: 0 0 16px; font-size: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: 12px; }

/* ============================================================
   FLASH & ALERTS
   ============================================================ */
.flash {
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.flash.ok, .flash.success { background: var(--ok-bg); color: var(--ok); border: 1px solid #A7F3D0; }
.flash.err, .flash.error   { background: var(--err-bg); color: var(--err); border: 1px solid #FECACA; }
.flash.info                { background: var(--info-bg); color: var(--info); border: 1px solid #BAE6FD; }

/* ============================================================
   ADMIN DASHBOARD & UI COMPONENTS
   ============================================================ */
.admin-nav, .admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.admin-nav::-webkit-scrollbar, .admin-tabs::-webkit-scrollbar { display: none; }
.admin-nav a, .admin-tabs a {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--ink-2);
    font-size: .92rem;
    white-space: nowrap;
    transition: all .15s ease;
}
.admin-nav a:hover, .admin-tabs a:hover { background: var(--brand-50); color: var(--brand); }
.admin-nav a.active, .admin-tabs a.active { background: var(--brand); color: #fff; }

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.admin-head .page-title { margin: 0; }
.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    background: #fff;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}
.admin-filter input[type="text"],
.admin-filter select {
    padding: 9px 14px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-size: .92rem;
    background: var(--bg);
    color: var(--ink);
    flex: 1;
    min-width: 180px;
    transition: border-color .15s ease;
}
.admin-filter input[type="text"]:focus,
.admin-filter select:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: #fff;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}
.admin-stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.admin-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.admin-stat .num {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--brand-navy);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -.02em;
}
.admin-stat .lbl {
    font-size: .84rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-stat--revenue {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--brand-50) 100%);
    border-color: var(--brand-100);
}
.admin-stat--revenue .num {
    color: var(--brand);
    font-size: clamp(1.25rem, 1.6vw, 1.75rem);
}

.admin-section-title { font-size: 1.3rem; margin: 32px 0 16px; }

.admin-table-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.admin-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .92rem;
}
.admin-table th {
    background: var(--bg);
    padding: 12px 18px;
    text-align: left;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink-2);
}
.admin-table td.r, .admin-table th.r { text-align: right; white-space: nowrap; min-width: 110px; }
.admin-table td.c, .admin-table th.c { text-align: center; }
.admin-table .btn-sm, .admin-table .btn-ghost {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    word-break: keep-all;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #F8FAFC; }

.admin-module {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.admin-module-head {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-module-head .t {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
}

.admin-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

/* ============================================================
   BRAND FEATURE SECTION (HOMEPAGE SECTION 4)
   ============================================================ */
.brand-feature-section {
    margin: 60px 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 44px 40px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.brand-feature-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}
.brand-feature-logo {
    height: 44px;
    width: auto;
    max-width: 100%;
}
.brand-feature-title {
    font-size: 1.9rem;
    margin: 0 0 14px;
    color: var(--brand-navy);
    font-weight: 800;
    line-height: 1.3;
}
.brand-feature-desc {
    color: var(--ink-2);
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0 0 20px;
}
.brand-feature-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.brand-feature-tags .mascot-tag {
    font-size: 0.82rem;
    padding: 6px 14px;
}
.brand-feature-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.brand-feature-mockup {
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    width: 100%;
    max-width: 440px;
}
.brand-feature-mockup img {
    width: 100%;
    height: auto;
    display: block;
}
.brand-feature-decor {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    opacity: 0.95;
}
.brand-feature-decor img {
    max-width: 320px;
    width: 100%;
    height: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 40px 0;
    margin-top: auto;
}
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--muted);
    font-size: .92rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-brand img { height: 36px; width: auto; }
.footer-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-sarah-logo {
    height: 28px;
    width: auto;
    opacity: 0.92;
}
.footer-copy {
    text-align: right;
    font-size: 0.9rem;
    color: var(--ink);
}
.footer-copy .sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes mobileMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES (DESKTOP, TABLET, MOBILE)
   ============================================================ */
/* 1. LAPTOPS / MEDIUM DESKTOPS (<= 1100px) */
@media (max-width: 1100px) {
    .admin-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2. TABLETS & LARGE MOBILE (<= 860px) */
@media (max-width: 860px) {
    /* Mobile Header & Nav Drawer */
    .nav {
        height: 64px;
        position: relative;
    }
    .brand img {
        height: 34px;
    }
    .brand-tag {
        display: none !important;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 2px solid var(--line);
        box-shadow: 0 15px 35px rgba(29, 58, 102, 0.15);
        padding: 18px 20px 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        z-index: 99;
    }
    .nav-links.open {
        display: flex;
        animation: mobileMenuSlide .2s ease-out;
    }
    .nav-links > a:not(.btn), .nav-links form button {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }
    .nav-links .btn {
        width: 100%;
        text-align: center;
        padding: 13px 20px !important;
        font-size: 1rem !important;
    }
    .nav-user {
        margin-left: 0;
        padding-left: 0;
        padding-top: 14px;
        border-left: none;
        border-top: 1px solid var(--line);
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Brand Feature Section 1 col */
    .brand-feature-section {
        padding: 32px 24px;
        margin: 40px 0;
    }
    .brand-feature-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Lesson Layout */
    .lesson-wrap {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        top: auto;
    }
}

/* 3. MOBILE PHONES & PORTRAIT TABLETS (<= 768px) */
@media (max-width: 768px) {
    /* Admin Controls */
    .admin-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .admin-head .admin-actions {
        width: 100%;
    }
    .admin-filter {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }
    .admin-filter input[type="text"],
    .admin-filter select,
    .admin-filter button,
    .admin-filter a {
        width: 100%;
        text-align: center;
    }

    /* Admin Stats 2 Cols */
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .admin-stat {
        padding: 16px 18px;
    }
    .admin-stat .num {
        font-size: 1.45rem;
    }
    .admin-stat--revenue {
        grid-column: span 2;
    }

    /* Hero Section */
    .hero {
        padding: 40px 0 48px;
    }
    .hero h1 {
        font-size: 2rem;
        line-height: 1.25;
        margin: 8px 0 16px;
    }
    .hero .lead {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 28px;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        margin-bottom: 36px;
    }
    .hero-cta .btn {
        width: 100%;
    }
    .stats {
        flex-direction: column;
        gap: 16px;
        padding: 20px 16px;
        width: 100%;
    }
    .stat-divider {
        width: 80px;
        height: 1px;
        background: var(--line);
    }
    .stat-num {
        font-size: 1.8rem;
    }

    /* Footer */
    .footer-row {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }
    .footer-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .footer-copy {
        text-align: center;
    }
}

/* 4. COMPACT MOBILE PHONES (<= 640px) */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
    main {
        padding: 24px 0 50px;
    }
    .page-head {
        margin-bottom: 24px;
    }
    .page-title {
        font-size: 1.65rem;
    }
    .page-sub {
        font-size: .94rem;
    }
    .card {
        padding: 20px 16px;
        border-radius: var(--r-md);
    }
    .card-tight {
        padding: 16px 14px;
    }
    .btn-lg {
        padding: 13px 22px;
        font-size: .98rem;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .cta-banner-inner {
        padding: 34px 18px;
        border-radius: var(--r-lg);
    }
    .cta-banner-inner h2 {
        font-size: 1.6rem;
    }
    .cta-banner-inner p {
        font-size: .95rem;
        margin-bottom: 24px;
    }
    .cta-banner-inner .btn {
        width: 100%;
    }
    .course-hero-title {
        font-size: 1.6rem !important;
    }
    .otp-input {
        font-size: 1.6rem !important;
        letter-spacing: .2em !important;
        padding: 10px !important;
    }
    .brand-feature-section {
        padding: 24px 16px;
        border-radius: var(--r-lg);
        margin: 30px 0;
    }
    .brand-feature-title {
        font-size: 1.45rem !important;
    }
    .brand-feature-desc {
        font-size: .95rem !important;
    }
}

/* 5. EXTRA SMALL PHONES (<= 480px) */
@media (max-width: 480px) {
    .admin-stats {
        gap: 10px;
    }
    .admin-stat {
        padding: 14px 12px;
    }
    .admin-stat .num {
        font-size: 1.25rem;
    }
    .admin-stat .lbl {
        font-size: .78rem;
    }
    .admin-stat--revenue .num {
        font-size: 1.35rem;
    }
    .hero h1 {
        font-size: 1.7rem;
    }
    .eyebrow {
        font-size: .7rem;
        padding: 5px 12px;
    }
    .brand-tag {
        display: none !important;
    }
}

