/* ==========================================================================
   Student Planet - stylesheet
   Colours come from the logo: black, red, gold on warm white.
   Change the variables below to re-theme the whole site.
   ========================================================================== */

:root {
    --red: #C8102E;
    --red-dark: #8B0000;
    --red-soft: #FCEBEC;
    --gold: #F2B705;
    --gold-deep: #D69A00;
    --gold-soft: #FFF6D9;
    --ink: #141414;
    --ink-2: #2A2A2A;
    --text: #2B2725;
    --muted: #6E6762;
    --line: #ECE5DD;
    --soft: #FAF6F1;
    --bg: #FFFFFF;
    --green: #1E8E5A;
    --green-soft: #E6F5EE;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(20, 20, 20, .05), 0 2px 8px rgba(20, 20, 20, .04);
    --shadow: 0 10px 30px -12px rgba(20, 20, 20, .18);
    --shadow-lg: 0 30px 60px -20px rgba(80, 10, 10, .28);

    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --container: 1180px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1, h2 { font-family: var(--font-display); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--soft); padding: 2px 6px; border-radius: 6px; color: var(--ink-2); }
[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.block { display: block; }
.strong { font-weight: 600; color: var(--ink); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.text-red { color: var(--red); }
.icon { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: 3px solid rgba(242, 183, 5, .7); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
    font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(200, 16, 46, .6); }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 8px 20px -8px rgba(214, 154, 0, .6); }
.btn-gold:hover { background: var(--gold-deep); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-light:hover { background: #fff; color: var(--red-dark); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #157048; color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { background: #fff; color: var(--red); border-color: #F3C9CE; }
.btn-danger-ghost:hover { background: var(--red-soft); color: var(--red-dark); }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-xs { padding: 6px 10px; font-size: .8rem; gap: 4px; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.b-dark { color: var(--ink); }
.b-red { color: var(--red-dark); }

/* ---------- Header / navigation ---------- */
.site-header, .portal-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled, .portal-header { border-bottom-color: var(--line); }
.site-header.scrolled { box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .25); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > a:not(.btn), .main-nav .link-btn { color: var(--ink-2); font-weight: 500; font-size: .95rem; position: relative; }
.main-nav > a:not(.btn):hover, .main-nav .link-btn:hover { color: var(--red); }
.main-nav .btn { color: #fff; }
.portal-nav { gap: 6px; }
.portal-nav > a:not(.btn), .portal-nav .link-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-size: .9rem; }
.portal-nav > a.active { background: var(--ink); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }

/* ---------- Flash messages ---------- */
.flash-stack { position: fixed; top: 88px; right: 20px; z-index: 100; display: grid; gap: 10px; max-width: min(420px, calc(100% - 40px)); }
.flash {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px;
    background: #fff; box-shadow: var(--shadow); border-left: 4px solid var(--ink); font-size: .93rem;
    animation: slideIn .3s ease; transition: opacity .3s, transform .3s;
}
.flash span { flex: 1; }
.flash.hide { opacity: 0; transform: translateX(20px); }
.flash-success { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); }
.flash-info { border-left-color: var(--gold); }
.flash-close { background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Common bits ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red);
    margin-bottom: 14px;
}
.eyebrow.light { color: var(--gold); }
.flag-dot { width: 22px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, #111 0 33.3%, #DD0000 33.3% 66.6%, #FFCE00 66.6%); box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.lv {
    display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 8px;
    border-radius: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .03em; color: #fff; background: var(--ink);
}
.lv-a1 { background: var(--gold); color: var(--ink); }
.lv-a2 { background: #E9862B; }
.lv-b1 { background: var(--red); }
.lv-b2 { background: var(--red-dark); }
.lv-c1 { background: var(--ink); }
.lv-lg { height: 36px; min-width: 52px; font-size: 1rem; border-radius: 9px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.section-head h2 em { color: var(--red); font-style: italic; }
.section-head p { color: var(--muted); font-size: 1.07rem; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; padding: 72px 0 96px;
    background:
        radial-gradient(900px 500px at 85% 20%, rgba(242, 183, 5, .14), transparent 60%),
        radial-gradient(700px 500px at 10% 90%, rgba(200, 16, 46, .07), transparent 60%),
        linear-gradient(180deg, #fff, var(--soft));
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); line-height: 1.07; margin-bottom: 22px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--ink-2); font-size: .92rem; font-weight: 500; }
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .icon { color: var(--green); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-logo-card {
    position: relative; width: min(440px, 100%); aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #fff 55%, #FFF8E6 100%);
    box-shadow: var(--shadow-lg), inset 0 0 0 10px rgba(255, 255, 255, .9), 0 0 0 1px var(--line);
    display: grid; place-items: center; padding: 11%;
}
.hero-logo-card::before {
    content: ""; position: absolute; inset: -14px; border-radius: 50%;
    border: 2px dashed rgba(200, 16, 46, .18); animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.float-chip {
    position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
    background: #fff; border-radius: 14px; box-shadow: var(--shadow); font-size: .88rem; font-weight: 600; color: var(--ink);
    animation: float 6s ease-in-out infinite;
}
.float-chip .icon { color: var(--red); }
.chip-1 { top: 6%; left: -2%; flex-direction: column; align-items: flex-start; gap: 0; }
.chip-1 strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--red); }
.chip-1 span { font-weight: 500; color: var(--muted); font-size: .8rem; }
.chip-2 { bottom: 14%; left: -4%; animation-delay: -2s; }
.chip-3 { top: 48%; right: -4%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Stats strip ---------- */
.stats-strip { background: var(--ink); color: #fff; padding: 34px 0; position: relative; }
.stats-strip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #111 0 33%, var(--red) 33% 66%, var(--gold) 66%); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-grid strong { display: block; font-family: var(--font-display); font-size: 2.5rem; color: var(--gold); line-height: 1.1; }
.stats-grid span { color: #cfc9c3; font-size: .92rem; }

/* ---------- Course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.course-card {
    position: relative; display: flex; flex-direction: column; padding: 28px 26px 24px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #E3D9CE; }
.course-card h3 { font-size: 1.2rem; margin: 14px 0 8px; }
.course-card p { color: var(--muted); font-size: .94rem; flex: 1; }
.course-card.featured { background: linear-gradient(160deg, #1b1b1b, #000); border-color: #000; color: #ddd; box-shadow: var(--shadow-lg); }
.course-card.featured h3 { color: #fff; }
.course-card.featured p { color: #bdb6b0; }
.course-card.featured .duration { color: #fff; }
.course-card.featured .course-meta { border-top-color: rgba(255,255,255,.12); }
.course-badge { position: absolute; top: 18px; right: 18px; background: var(--gold-soft); color: #8a6200; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.featured .course-badge { background: var(--gold); color: var(--ink); }
.level-chips { display: flex; gap: 6px; }
.course-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.duration { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: .9rem; }
.duration strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.duration .icon { color: var(--red); }

/* ---------- Level path ---------- */
.level-path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; position: relative; }
.level-path::before { content: ""; position: absolute; top: 28px; left: 8%; right: 8%; height: 3px; background: linear-gradient(90deg, var(--gold), #E9862B, var(--red), var(--red-dark), var(--ink)); border-radius: 3px; }
.level-path li { position: relative; text-align: center; padding: 0 6px; }
.path-dot { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-weight: 800; color: #fff; background: var(--ink); border: 5px solid var(--soft); margin-bottom: 14px; font-size: 1rem; }
.path-dot.lv-a1 { color: var(--ink); }
.level-path h3 { font-size: 1.05rem; margin-bottom: 6px; }
.level-path p { font-size: .87rem; color: var(--muted); margin-bottom: 8px; }
.level-path small { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-weight: 600; font-size: .8rem; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 30px 28px; border-radius: var(--radius); background: var(--soft); border: 1px solid transparent; transition: background .25s, border-color .25s, transform .25s; }
.feature:hover { background: #fff; border-color: var(--line); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.f-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: #fff; color: var(--red); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Team band ---------- */
.team-band { background: linear-gradient(120deg, var(--red-dark), #5c0000 70%); color: #f5e9e9; padding: 72px 0; position: relative; overflow: hidden; }
.team-band::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(242, 183, 5, .12); }
.team-grid { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.team-number { font-family: var(--font-display); font-size: clamp(5rem, 12vw, 9rem); font-weight: 700; line-height: .9; color: var(--gold); }
.team-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.team-band p { color: #ead2d2; font-size: 1.05rem; margin: 0; max-width: 640px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; position: relative; }
.step > span { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: var(--gold); font-weight: 800; margin-bottom: 16px; }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-weight: 600; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* ---------- CTA ---------- */
.cta-band { padding: 0 0 96px; }
.cta-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
    background: linear-gradient(120deg, var(--ink) 0%, #2a0505 60%, var(--red-dark) 100%);
    border-radius: 28px; padding: 54px 56px; color: #fff; box-shadow: var(--shadow-lg);
    max-width: calc(var(--container) - 40px);
}
.cta-inner h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 8px; }
.cta-inner p { color: #d7cfca; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: #0E0E0E; color: #b9b2ad; padding: 64px 0 0; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.footer-brand img { width: 120px; background: #fff; border-radius: 16px; padding: 10px; margin-bottom: 14px; }
.site-footer h4 { color: #fff; font-family: var(--font); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a, .site-footer span { display: block; color: #b9b2ad; margin-bottom: 9px; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #222; padding-top: 22px; padding-bottom: 22px; font-size: .85rem; }
.footer-bottom span { margin: 0; }
.flag-line { display: inline-flex !important; gap: 0; border-radius: 3px; overflow: hidden; }
.flag-line i { width: 18px; height: 5px; display: block; }
.flag-line i:nth-child(1) { background: #333; } .flag-line i:nth-child(2) { background: #DD0000; } .flag-line i:nth-child(3) { background: #FFCE00; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form.compact { gap: 10px; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .88rem; color: var(--ink-2); display: flex; justify-content: space-between; padding: 0; }
.label-link { font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=url], input[type=tel], input[type=number], input[type=search], input:not([type]), select, textarea {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff;
    font: 400 .95rem/1.4 var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(242, 183, 5, .18); }
input:disabled { background: var(--soft); color: var(--muted); }
textarea { resize: vertical; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: .82rem; font-weight: 500; }
.hint { color: var(--muted); font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; font-weight: 500; }
.check input { margin-top: 4px; accent-color: var(--red); width: 16px; height: 16px; }
.check.has-error span { color: var(--red); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.course-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick-box { display: grid; gap: 4px; justify-items: start; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; transition: all .15s; height: 100%; }
.pick-box strong { font-size: .92rem; color: var(--ink); }
.pick-box small { color: var(--muted); font-size: .8rem; }
.pick:hover .pick-box { border-color: #d8ccbf; }
.pick input:checked + .pick-box { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }
.pick input:focus-visible + .pick-box { outline: 3px solid rgba(242, 183, 5, .7); }

/* ---------- Auth pages ---------- */
.auth-section { padding: 56px 0 90px; background: linear-gradient(180deg, #fff, var(--soft)); }
.auth-wrap { display: grid; grid-template-columns: .9fr 1.1fr; max-width: 1040px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; padding: 0; }
.auth-aside { background: linear-gradient(160deg, #161616, #000 60%, #2a0505); color: #d6cfca; padding: 48px 44px; display: flex; flex-direction: column; }
.auth-aside img { width: 170px; background: #fff; border-radius: 22px; padding: 12px; margin-bottom: 30px; }
.auth-aside h2 { color: #fff; font-size: 2rem; }
.auth-aside ul { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 12px; padding-top: 24px; }
.auth-aside li { display: flex; gap: 10px; align-items: center; font-size: .93rem; }
.auth-aside li .icon { color: var(--gold); }
.auth-card { padding: 48px 48px 44px; background: #fff; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 26px; }
.auth-narrow { max-width: 480px; }
.auth-narrow .auth-card { border-radius: 24px; box-shadow: var(--shadow-lg); text-align: left; }
.auth-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--red-soft); color: var(--red); margin-bottom: 18px; }

/* ---------- Error pages ---------- */
.error-page { padding: 120px 0; }
.error-code { font-family: var(--font-display); font-size: 6rem; font-weight: 700; color: var(--red); line-height: 1; margin-bottom: 10px; }

/* ==========================================================================
   STUDENT PORTAL
   ========================================================================== */
.page-portal { background: var(--soft); }
.portal-main { padding: 36px 0 64px; min-height: calc(100vh - 160px); }
.portal-footer { padding: 24px 0; text-align: center; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); background: #fff; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.card h2 { font-family: var(--font); font-size: 1.15rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 600; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; gap: 20px; }
.page-head h1 { font-size: 2.1rem; margin-bottom: 4px; }
.page-head p { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; margin-bottom: 18px; color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .icon { color: #cfc4b8; margin: 0 auto 8px; display: block; }
.empty p { margin: 0; font-size: .93rem; }
.empty.big { padding: 70px 20px; }
.empty.big h3 { margin-top: 6px; }
.empty.small { padding: 18px 6px; }

.welcome-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    background: linear-gradient(120deg, var(--ink), #2a0505 70%, var(--red-dark)); color: #ddd; border-radius: 24px;
    padding: 38px 42px; margin-bottom: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.welcome-banner h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 8px; }
.welcome-banner p { color: #cbc3bd; margin: 0; max-width: 620px; }
.welcome-level { flex-shrink: 0; display: grid; place-items: center; width: 110px; height: 110px; border-radius: 28px; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: #fff; background: var(--red); box-shadow: 0 0 0 8px rgba(255,255,255,.06); }
.welcome-level.lv-a1 { color: var(--ink); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.stat-card strong { display: block; font-size: 1.4rem; color: var(--ink); line-height: 1.1; }
.stat-card small { color: var(--muted); font-size: .82rem; }
.s-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft); color: var(--red); }

.lecture-list { display: grid; gap: 4px; }
.lecture-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; color: var(--ink); transition: background .15s; }
.lecture-row:hover { background: var(--soft); color: var(--ink); }
.play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; flex-shrink: 0; }
.lr-text strong { display: block; font-size: .95rem; font-weight: 600; }
.lr-text small { color: var(--muted); font-size: .8rem; }

.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.file-list li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; }
.file-list li:hover { background: var(--soft); }
.fl-text { flex: 1; min-width: 0; }
.fl-text strong { display: block; font-size: .93rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-text small { color: var(--muted); font-size: .8rem; }
.file-type { display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 6px; border-radius: 8px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; background: var(--red-soft); color: var(--red); flex-shrink: 0; }
.file-type.big { min-width: 58px; height: 40px; font-size: .8rem; border-radius: 10px; }
.t-doc { background: #E8F0FE; color: #1a56c4; }
.t-ppt { background: #FFF0E3; color: #c4570e; }
.t-xls { background: var(--green-soft); color: var(--green); }
.t-audio { background: #F2EAFE; color: #6b2fc4; }
.t-img { background: var(--gold-soft); color: #8a6200; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.icon-btn:hover { color: #fff; background: var(--red); border-color: var(--red); }

.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.material-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: box-shadow .2s, transform .2s; }
.material-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.material-card h3 { font-size: 1.05rem; margin: 8px 0 0; }
.material-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.mc-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1a1a1a, #3a0a0a); display: grid; place-items: center; overflow: hidden; }
.video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.play-big { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(200, 16, 46, .95); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s; }
.play-big .icon { margin-left: 3px; }
.video-card:hover .play-big { transform: scale(1.08); }
.lesson-no { position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.vid-duration { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.75); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 6px; }
.video-info { padding: 16px 18px 18px; }
.video-info h3 { font-size: 1rem; margin-bottom: 4px; }

.player-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-info h1 { font-family: var(--font); font-size: 1.5rem; margin: 10px 0 4px; }
.prose { margin-top: 14px; color: var(--text); }
.playlist { padding: 20px; max-height: 70vh; overflow: auto; }
.playlist h3 { font-size: 1rem; margin-bottom: 12px; }
.pl-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; color: var(--ink); font-size: .9rem; }
.pl-item:hover { background: var(--soft); color: var(--ink); }
.pl-item.current { background: var(--red-soft); }
.pl-item strong { display: block; font-weight: 600; }
.pl-item small { color: var(--muted); }
.pl-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--soft); font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.pl-item.current .pl-no { background: var(--red); color: #fff; }

.pending-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; max-width: 1000px; margin: 20px auto 0; align-items: start; }
.pending-card { padding: 42px; }
.pending-card h1 { font-size: 1.9rem; }
.status-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-deep); margin-bottom: 20px; }
.status-icon.status-bad { background: var(--red-soft); color: var(--red); }
.progress-steps { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 0; }
.progress-steps li { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 22px; }
.progress-steps li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.progress-steps li.done:not(:last-child)::before { background: var(--green); }
.progress-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); border: 2px solid var(--line); font-size: .82rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.progress-steps li.done > span { background: var(--green); border-color: var(--green); color: #fff; }
.progress-steps li.current > span { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 0 0 5px rgba(242, 183, 5, .2); }
.progress-steps strong { display: block; color: var(--ink); font-size: .95rem; }
.progress-steps small { color: var(--muted); font-size: .82rem; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 14px 0 18px; font-size: .92rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; word-break: break-word; }

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.page-admin { background: #F5F2EE; }
.admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 250px; background: #0E0E0E; color: #bdb6b0; display: flex; flex-direction: column;
    padding: 22px 14px; z-index: 60; transition: transform .25s ease;
}
.admin-brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 0 8px 22px; border-bottom: 1px solid #222; margin-bottom: 16px; }
.admin-brand img { width: 34px; }
.admin-brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.admin-brand small { display: block; font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.admin-sidebar nav { display: grid; gap: 3px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.admin-sidebar nav::-webkit-scrollbar { width: 6px; }
.admin-sidebar nav::-webkit-scrollbar-thumb { background: #333; border-radius: 999px; }
.admin-sidebar nav a, .sidebar-foot a, .sidebar-foot button {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: #bdb6b0; font-size: .92rem; font-weight: 500;
    background: none; border: 0; width: 100%; cursor: pointer; font-family: var(--font); text-align: left;
}
.admin-sidebar nav a:hover, .sidebar-foot a:hover, .sidebar-foot button:hover { background: #1b1b1b; color: #fff; }
.admin-sidebar nav a.active { background: linear-gradient(90deg, var(--red), var(--red-dark)); color: #fff; box-shadow: 0 8px 20px -10px rgba(200, 16, 46, .8); }
.nav-badge { margin-left: auto; font-style: normal; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #222; padding-top: 12px; display: grid; gap: 3px; }
.sidebar-foot form { margin: 0; }
.admin-shell { margin-left: 250px; min-height: 100vh; }
.admin-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 70px; padding: 0 30px; background: rgba(245, 242, 238, .9); backdrop-filter: blur(10px); border-bottom: 1px solid #E8E1D9; }
.admin-topbar h1 { font-family: var(--font); font-size: 1.3rem; margin: 0; flex: 1; }
.admin-user { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--gold); font-weight: 700; }
.avatar.big { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 18px; background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; flex-shrink: 0; }
.admin-main { padding: 28px 30px 60px; }
.admin-toggle { display: none; }
.sidebar-overlay { display: none; }
.page-admin .flash-stack { top: 80px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi { position: relative; background: #fff; border-radius: 16px; padding: 20px 22px; border: 1px solid #ECE5DD; overflow: hidden; }
.kpi small { display: block; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { display: block; font-size: 2.1rem; color: var(--ink); line-height: 1.15; margin: 4px 0 2px; font-family: var(--font-display); }
.kpi em { font-style: normal; font-size: .8rem; color: var(--muted); }
.kpi-icon { position: absolute; right: 18px; top: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--ink); }
.kpi-green .kpi-icon { background: var(--green-soft); color: var(--green); }
.kpi-gold .kpi-icon { background: var(--gold-soft); color: var(--gold-deep); }
.kpi-red .kpi-icon { background: var(--red-soft); color: var(--red); }
.kpi::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ink); }
.kpi-green::after { background: var(--green); } .kpi-gold::after { background: var(--gold); } .kpi-red::after { background: var(--red); }

.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.panel { background: #fff; border: 1px solid #ECE5DD; border-radius: 16px; padding: 22px 24px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-family: var(--font); font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.narrow-panel { max-width: 720px; }
.sub-h { font-size: .9rem; margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.sub-h.danger { color: var(--red); }
.intro { margin-bottom: 20px; }

.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid #F3EEE8; vertical-align: middle; }
.table tbody tr:hover { background: #FCFAF7; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.table .btn + .btn, .table .btn + form, .table form + form, .table form + a, .table a + form, .table a + a { margin-left: 4px; }
.w-check { width: 36px; }
.w-check input { accent-color: var(--red); width: 16px; height: 16px; }
.file-cell { display: flex; align-items: center; gap: 12px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; }
.badge-approved { background: var(--green-soft); color: var(--green); }
.badge-pending { background: var(--gold-soft); color: #8a6200; }
.badge-declined, .badge-suspended { background: var(--red-soft); color: var(--red); }
.badge-muted { background: #EFEBE6; color: var(--muted); }
.event { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.event-login { background: var(--green-soft); color: var(--green); }
.event-register { background: var(--gold-soft); color: #8a6200; }
.event-admin_login { background: #EEE; color: var(--ink); }

.bar-list { display: grid; gap: 14px; }
.bar-label { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bar-label strong { margin-left: auto; color: var(--ink); }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); border-radius: 99px; min-width: 2px; transition: width .3s; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.mini-stats strong { display: block; font-size: 1.5rem; color: var(--ink); }
.mini-stats small { color: var(--muted); font-size: .8rem; }

.spark-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 10px; }
.spark-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.spark-col i { display: block; width: 100%; background: linear-gradient(180deg, var(--red), var(--red-dark)); border-radius: 4px 4px 0 0; opacity: .85; }
.spark-col:hover i { opacity: 1; background: var(--gold-deep); }
.spark-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 6px; }

.loc-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.loc-list li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #F3EEE8; font-size: .9rem; }
.loc-list li .icon { color: var(--red); }
.loc-list strong { margin-left: auto; color: var(--ink); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 8px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid #E8E1D9; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { border-color: var(--ink); color: var(--ink); }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs em { font-style: normal; background: var(--gold); color: var(--ink); font-size: .72rem; padding: 0 7px; border-radius: 99px; font-weight: 800; }
.tabs em.soft { background: rgba(0,0,0,.07); color: inherit; }
.tabs a.active em.soft { background: rgba(255,255,255,.2); }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filter-bar select { width: auto; min-width: 180px; }
.filter-bar.flat { margin-bottom: 14px; }
.search-input { position: relative; flex: 1; min-width: 220px; }
.search-input .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input input { padding-left: 38px; }
.bulk-actions { display: flex; gap: 8px; }
.bulk-actions select { width: auto; padding-top: 8px; padding-bottom: 8px; font-size: .88rem; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .88rem; }
.pagination a.current { background: var(--ink); color: #fff; border-color: var(--ink); }

.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.ph-text { flex: 1; min-width: 220px; }
.ph-text h2 { font-family: var(--font); font-size: 1.35rem; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-text p { margin: 0; font-size: .9rem; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.upload-layout { grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); }
.upload-layout .span-2 { grid-column: auto; }
.dropzone { position: relative; display: flex !important; flex-direction: column; align-items: center; justify-content: center !important; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed #DCD1C5; border-radius: 14px; background: var(--soft); cursor: pointer; color: var(--muted); font-weight: 500 !important; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.has-file { border-color: var(--red); background: var(--red-soft); color: var(--ink); }
.dropzone.small { padding: 16px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone small { font-size: .72rem; }
.upload-progress { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.upload-progress .bar { height: 10px; }
.upload-progress .bar i { width: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 9px 8px; border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.course-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; }
.course-admin { display: grid; gap: 14px; }
.ca-head { display: flex; align-items: center; justify-content: space-between; }
.ca-counts { display: flex; gap: 14px; font-size: .85rem; color: var(--muted); }
.ca-counts a, .ca-counts span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.toggles { align-content: end; gap: 8px; }

/* Admin login */
.page-blank { background: radial-gradient(800px 500px at 80% 0%, rgba(200, 16, 46, .25), transparent 60%), #0E0E0E; min-height: 100vh; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.admin-login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 40px 36px 30px; text-align: center; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.admin-login-card img { width: 130px; margin: 0 auto 12px; }
.admin-login-card h1 { font-size: 1.7rem; margin-bottom: 4px; }
.admin-login-card .form { text-align: left; margin: 24px 0 18px; }
.page-blank .flash-stack { top: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-grid { grid-template-columns: 1fr 1fr; }
    .span-2 { grid-column: 1 / -1; }
    .upload-layout { grid-template-columns: 1fr; }
    .level-path { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
    .level-path::before { display: none; }
}
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 50px; text-align: center; }
    .hero .lead { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-trust { justify-content: center; }
    .hero-logo-card { width: min(360px, 86%); }
    .feature-grid, .steps { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 26px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .two-col, .pending-wrap, .player-layout { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: 1fr; gap: 10px; text-align: center; }
    .team-band p { margin: 0 auto; }

    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
        background: #fff; padding: 14px 20px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav > a:not(.btn), .main-nav .link-btn { padding: 12px 6px; }
    .main-nav .btn { margin-top: 8px; }
    .portal-nav > a:not(.btn), .portal-nav .link-btn { padding: 12px 14px; }

    .admin-sidebar { transform: translateX(-100%); }
    .sidebar-open .admin-sidebar { transform: none; }
    .sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
    .admin-shell { margin-left: 0; }
    .admin-toggle { display: inline-flex; }
    .course-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .hide-md { display: none; }
}
@media (max-width: 640px) {
    .section { padding: 68px 0; }
    .hero { padding: 40px 0 70px; }
    .float-chip { display: none; }
    .feature-grid, .steps, .admin-grid, .kpi-grid { grid-template-columns: 1fr; }
    .level-path { grid-template-columns: 1fr 1fr; }
    .field-row, .field-row.three { grid-template-columns: 1fr; }
    .auth-card { padding: 32px 22px; }
    .auth-section { padding: 24px 0 60px; }
    .cta-inner { padding: 38px 26px; border-radius: 22px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 10px; }
    .welcome-banner { padding: 28px 24px; flex-direction: column-reverse; align-items: flex-start; }
    .welcome-level { width: 72px; height: 72px; font-size: 1.7rem; border-radius: 18px; }
    .stat-row { grid-template-columns: 1fr 1fr; gap: 12px; }
    .admin-main { padding: 20px 16px 50px; }
    .admin-topbar { padding: 0 16px; }
    .hide-sm { display: none; }
    .brand-text { font-size: 1.1rem; }
    .pending-card { padding: 28px 22px; }
    .page-head h1 { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Fixes: keep the full logo inside the hero circle; colour the level-path dots */
.hero-logo-card img { width: 100%; height: auto; }
.path-dot.lv-a1 { background: var(--gold); }
.path-dot.lv-a2 { background: #E9862B; }
.path-dot.lv-b1 { background: var(--red); }
.path-dot.lv-b2 { background: var(--red-dark); }
.path-dot.lv-c1 { background: var(--ink); }
.hero-logo-card { padding: 13% 15% 17%; }
.chip-2 { bottom: 4%; left: 2%; }

/* ==========================================================================
   Practice papers, MCQ quizzes and homework (added Oct 2026)
   ========================================================================== */
.mt { margin-top: 14px; }
.stack { display: grid; gap: 22px; align-content: start; min-width: 0; }
.small-eyebrow { margin: 4px 0 0; font-size: .7rem; }
.t-quiz { background: var(--gold-soft); color: #8a6200; }
.qc-top { display: flex; justify-content: space-between; align-items: center; }
.score-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.score-pill.good { background: var(--green-soft); color: var(--green); }
.score-pill.ok { background: var(--gold-soft); color: #8a6200; }
.score-pill.low { background: var(--red-soft); color: var(--red); }

.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.quick-link { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.quick-link:hover { color: var(--ink); box-shadow: var(--shadow); transform: translateY(-2px); }
.quick-link > span:nth-child(2) { flex: 1; }
.quick-link strong { display: block; }
.quick-link small { color: var(--muted); font-size: .85rem; }
.quick-link > .icon { color: var(--muted); }
.quick-link.attention { border-color: var(--gold); background: linear-gradient(90deg, var(--gold-soft), #fff 60%); }
.quick-link.attention .s-icon { background: var(--gold); color: var(--ink); }

/* Quiz taking */
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.quiz-form { display: grid; gap: 16px; }
.quiz-head h1 { font-size: 1.8rem; margin: 10px 0 6px; }
.question { margin: 0; padding: 24px 26px; }
.question legend, .q-text { float: left; width: 100%; font-weight: 600; color: var(--ink); font-size: 1.02rem; margin-bottom: 14px; padding: 0; display: flex; gap: 10px; align-items: flex-start; }
.question .options { clear: both; }
.q-no { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--gold); font-size: .8rem; font-weight: 800; flex-shrink: 0; }
.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: #d8ccbf; }
.option input { accent-color: var(--red); width: 18px; height: 18px; flex-shrink: 0; }
.option > span { flex: 1; }
.option b { display: inline-block; width: 22px; color: var(--muted); }
.option:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.option.static { cursor: default; }
.option.correct { border-color: var(--green); background: var(--green-soft); }
.option.wrong { border-color: var(--red); background: var(--red-soft); }
.option em { font-style: normal; font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.option.correct em { color: var(--green); }
.option.wrong em { color: var(--red); }
.quiz-submit { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 4px 20px; }
.quiz-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.timer-card { text-align: center; padding: 20px; }
.timer-card small { color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; font-weight: 700; }
.timer-card strong { display: block; font-family: var(--font-display); font-size: 2.4rem; color: var(--ink); }
.timer-card strong.urgent { color: var(--red); }
.side-h { font-size: .95rem; margin-bottom: 10px; }
.attempt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.attempt-list li { display: flex; justify-content: space-between; }
.result-hero { display: flex; align-items: center; gap: 30px; margin-bottom: 26px; }
.result-hero h1 { font-size: 2rem; margin-bottom: 4px; }
.score-ring { --c: var(--red); width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--soft) 0); }
.score-ring span { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.score-ring.good { --c: var(--green); } .score-ring.ok { --c: var(--gold); }
.section-sub { font-family: var(--font); font-size: 1.15rem; margin: 6px 0 14px; }
.question.review { margin-bottom: 14px; border-left: 4px solid var(--red); }
.question.review.is-right { border-left-color: var(--green); }
.explain { display: flex; gap: 8px; margin: 14px 0 0; padding: 12px 14px; background: var(--soft); border-radius: 10px; font-size: .9rem; color: var(--ink-2); }
.explain .icon { color: var(--red); margin-top: 2px; }

/* Homework */
.hw-list { padding: 8px; }
.hw-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; color: var(--ink); }
.hw-row + .hw-row { border-top: 1px solid #F3EEE8; }
.hw-row:hover { background: var(--soft); color: var(--ink); }
.hw-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); flex-shrink: 0; }
.hw-icon.done { background: var(--green-soft); color: var(--green); }
.hw-text { flex: 1; min-width: 0; }
.hw-text strong { display: block; }
.hw-layout { align-items: start; }
.hw-title { font-family: var(--font); font-size: 1.5rem; margin: 10px 0 4px; }
.hw-sub { font-size: 1.05rem; margin: 22px 0 12px; }
.attach { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 500; font-size: .9rem; max-width: 100%; }
.attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach:hover { border-color: var(--red); color: var(--red); }
.answer-box { background: var(--soft); border-radius: 12px; padding: 14px 16px; font-size: .93rem; white-space: normal; word-break: break-word; }
.mark-box { border-radius: 14px; padding: 18px 20px; background: var(--gold-soft); margin-bottom: 8px; }
.mark-box small { display: block; font-weight: 600; color: #8a6200; font-size: .8rem; }
.mark-box strong { font-family: var(--font-display); font-size: 2.4rem; color: var(--ink); }
.mark-box strong span { font-size: 1.2rem; color: var(--muted); }
.mark-box.final { background: var(--green-soft); }
.mark-box.final small { color: var(--green); }
.mark-box.final p { margin: 6px 0 0; }
.mark-box.pending { display: flex; align-items: center; gap: 12px; background: var(--soft); font-size: .92rem; color: var(--ink-2); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: spin 1s linear infinite; flex-shrink: 0; }
.ai-feedback { margin-top: 14px; }
.ai-feedback h3 { font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.ai-feedback h3 .icon { color: var(--gold-deep); }
.ai-items { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.ai-items li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: .9rem; }
.ai-items li > div { display: grid; gap: 2px; }
.ai-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; background: var(--green); color: #fff; }
.ai-items li.bad .ai-mark, .ai-mark.bad { background: var(--red); }
.ai-mark.ok { background: var(--green); }

/* Admin: quizzes & homework */
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-soft); border: 1px solid #F2DB8F; border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; font-size: .9rem; }
.notice .icon { color: var(--gold-deep); margin-top: 2px; }
.sample { background: var(--soft); border-radius: 10px; padding: 12px 14px; font-size: .8rem; white-space: pre-wrap; margin: 0 0 12px; color: var(--ink-2); }
.option-edit { display: grid; gap: 8px; }
.opt-row { display: flex; align-items: center; gap: 10px; }
.opt-row input[type=radio] { accent-color: var(--green); width: 18px; height: 18px; flex-shrink: 0; }
.opt-row b { width: 16px; color: var(--muted); }
.q-admin { padding: 16px 0; border-bottom: 1px solid #F3EEE8; }
.q-admin:last-child { border-bottom: 0; }
.q-admin-head { display: flex; justify-content: space-between; gap: 12px; }
.q-admin-head p { margin: 0 0 8px; font-weight: 600; color: var(--ink); display: flex; gap: 10px; }
.q-opts { list-style: none; margin: 0 0 6px 38px; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.q-opts b { color: var(--muted); margin-right: 6px; }
.q-opts li.correct { color: var(--green); font-weight: 600; }
.row-actions { display: flex; gap: 8px; }
.sub-h.first { border-top: 0; padding-top: 0; margin-top: 4px; }
.sub-image { margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); max-height: 900px; width: auto; }
.sub-pdf { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; }

@media (max-width: 960px) {
    .quiz-layout { grid-template-columns: 1fr; }
    .quiz-side { position: static; order: -1; }
    .quick-links { grid-template-columns: 1fr; }
    .result-hero { flex-direction: column; text-align: center; }
}

/* Labels with a muted hint, and checkboxes inside form fields */
.field label:has(> .muted) { justify-content: flex-start; flex-wrap: wrap; gap: 0 6px; }
.field label > .muted { font-weight: 400; }
.field label.check { justify-content: flex-start; font-weight: 500; }

/* ==========================================================================
   Day-by-day course content, live classes, video player (October 2026 update)
   ========================================================================== */

/* Portal nav: Profile and Log out as icons on wide screens to make room */
@media (min-width: 961px) {
    .portal-nav .nav-icon-only { padding: 8px 10px; }
    .portal-nav .nav-icon-only > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Day navigation and day groups ---------- */
.day-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: -4px 0 18px; scrollbar-width: thin; }
.day-nav a { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 8px 14px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: .85rem; line-height: 1.2; }
.day-nav a:first-child { justify-content: center; font-weight: 600; }
.day-nav a strong { font-weight: 700; }
.day-nav a small { color: var(--muted); font-size: .75rem; }
.day-nav a:hover { border-color: var(--ink); color: var(--ink); }
.day-nav a.is-today { border-color: var(--red); }
.day-nav a.is-today small { color: var(--red); font-weight: 600; }
.day-nav a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.day-nav a.active small { color: rgba(255, 255, 255, .75); }
.day-group { margin-bottom: 34px; }
.day-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.day-head h2 { font-family: var(--font); font-size: 1.15rem; margin: 0; }
.day-head small { display: inline-flex; align-items: center; gap: 6px; }
.day-no { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; background: var(--ink); color: var(--gold); font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: center; line-height: 1; }
.day-no b { display: block; font-size: 1.3rem; color: #fff; letter-spacing: 0; margin-top: 2px; }
.day-no.today { background: var(--red); color: #ffe7a3; }
.day-no .icon { color: #fff; }
.today-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; }

/* ---------- Live classes: badges, hero card, lists ---------- */
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: live-pulse 1.4s ease-in-out infinite; }
.live-badge.soon { background: var(--gold); color: var(--ink); }
.live-badge.soon i { background: var(--ink); }
.live-badge.next { background: rgba(255, 255, 255, .14); color: #fff; }
.is-live .live-badge:not(.soon):not(.next) { background: #fff; color: var(--red); }
.is-live .live-badge:not(.soon):not(.next) i { background: var(--red); }
.live-room.ended .live-badge { background: rgba(255, 255, 255, .14) !important; color: #fff !important; }
.live-room.ended .live-badge i { display: none; }
.field-row > * { min-width: 0; }
.field input, .field select { min-width: 0; }
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.live-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 32px; border-radius: var(--radius); background: linear-gradient(120deg, #1d1d1d, #2b2020 60%, #3a1414); color: #fff; box-shadow: var(--shadow); margin-bottom: 14px; position: relative; overflow: hidden; }
.live-hero::after { content: ""; position: absolute; right: -90px; top: -90px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(242, 183, 5, .08); pointer-events: none; }
.live-hero.is-live { background: linear-gradient(120deg, var(--red-dark), #5c0000 70%); }
.live-hero h2 { color: #fff; font-family: var(--font); font-size: 1.6rem; margin: 12px 0 4px; }
.live-when { margin: 0; color: rgba(255, 255, 255, .8); }
.live-notes { margin: 10px 0 0; color: rgba(255, 255, 255, .9); font-size: .92rem; }
.live-hero-action { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; flex-shrink: 0; }
.live-hero-action small { color: rgba(255, 255, 255, .7); font-size: .8rem; }
.live-hero-action .btn[disabled] { opacity: .85; cursor: default; }
.live-hero-action .btn[disabled]:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.live-hint { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .88rem; margin: 0 0 26px; }
.live-hint .icon { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.live-upcoming { margin-bottom: 24px; }
.live-list { list-style: none; margin: 0; padding: 0; }
.live-list li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.live-list li:first-child { border-top: 0; padding-top: 0; }
.ll-date { display: grid; place-items: center; width: 48px; height: 52px; border-radius: 12px; background: var(--soft); font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--red); line-height: 1.1; }
.ll-date b { font-size: 1.25rem; color: var(--ink); }
.ll-text { flex: 1; min-width: 0; }
.ll-text strong { display: block; }
.ll-att { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ll-norec { white-space: nowrap; }
.attend-summary { text-align: right; }
.attend-summary strong { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--ink); }
.attend-summary strong small { font-size: 1rem; color: var(--muted); }
.attend-summary span { color: var(--muted); font-size: .85rem; }
.stat-card strong .of { font-size: .9rem; color: var(--muted); font-weight: 600; }

/* Class page (student) */
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.room-grid h3 { font-family: var(--font); font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.attend-meter { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.attend-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 999px; transition: width .6s; }
.attend-text { margin: 12px 0 4px; font-size: .95rem; }
.attend-text strong { font-size: 1.4rem; }
.attend-status { color: var(--muted); font-size: .9rem; margin: 0; }
.live-room.ended .live-hero { background: linear-gradient(120deg, #1d1d1d, #2b2b2b); }
.tick-list { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .92rem; }
.tick-list li { margin-bottom: 8px; }

/* Dashboard strip */
.live-strip { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 16px; background: var(--ink); color: #fff; margin-bottom: 20px; flex-wrap: wrap; }
.live-strip.is-live { background: linear-gradient(120deg, var(--red-dark), #5c0000 70%); }
.live-strip .ls-text { flex: 1; min-width: 200px; }
.live-strip .ls-text strong { display: block; }
.live-strip .ls-text small { color: rgba(255, 255, 255, .75); }
.live-strip .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.live-strip .btn-ghost:hover { background: #fff; color: var(--ink); }

/* Admin */
.weekday-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-picker label { cursor: pointer; }
.weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picker span { display: inline-block; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--muted); background: #fff; }
.weekday-picker input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.weekday-picker input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.live-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.live-admin-head h2 { font-family: var(--font); font-size: 1.35rem; margin: 10px 0 2px; }
.live-admin-head p { margin: 0; }
.lah-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.lah-stats strong { display: block; font-size: 1.6rem; line-height: 1; }
.lah-stats small { color: var(--muted); font-size: .8rem; }
.select-sm { padding: 6px 28px 6px 10px; font-size: .85rem; border-radius: 8px; min-width: 96px; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.rec-linked { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--soft); border-radius: 12px; }

/* ---------- Home page: live classes ---------- */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; animation: live-pulse 1.4s ease-in-out infinite; }
.live-section { background: linear-gradient(180deg, #fff, var(--soft)); }
.live-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.live-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.live-copy .lead { color: var(--muted); font-size: 1.07rem; }
.live-points { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 16px; }
.live-points li { display: flex; gap: 14px; align-items: flex-start; }
.live-points strong { display: block; font-size: 1rem; }
.live-points p { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }
.lp-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--red-soft); color: var(--red); flex-shrink: 0; }
.live-mock { background: #161616; border-radius: 22px; padding: 16px; box-shadow: var(--shadow-lg); color: #fff; transform: rotate(1.2deg); }
.lm-bar { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; font-size: .85rem; }
.lm-live { display: inline-flex; align-items: center; gap: 6px; background: var(--red); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .72rem; letter-spacing: .06em; }
.lm-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-pulse 1.4s infinite; }
.lm-title { font-weight: 600; flex: 1; }
.lm-time { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .6); }
.lm-stage { display: grid; gap: 10px; }
.lm-teacher { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background: linear-gradient(135deg, #3a1414, #6a0f0f 55%, #2a2a2a); display: grid; place-items: center; overflow: hidden; }
.lm-name { position: absolute; left: 12px; bottom: 10px; font-size: .75rem; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 6px; }
.lm-board { position: absolute; right: 12px; top: 12px; background: rgba(255, 255, 255, .95); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: .78rem; display: grid; gap: 3px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.lm-board strong { color: var(--red); font-size: .85rem; }
.lm-board b { color: var(--red); }
.lm-avatar { display: grid; place-items: center; height: 58px; border-radius: 12px; background: #2a2a2a; font-weight: 700; font-size: .85rem; color: var(--gold); }
.lm-avatar.big { width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; }
.lm-students { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lm-chat { display: grid; gap: 6px; margin: 12px 0; }
.lm-bubble { justify-self: start; background: #262626; padding: 8px 12px; border-radius: 12px 12px 12px 4px; font-size: .8rem; max-width: 85%; }
.lm-bubble.me { justify-self: end; background: var(--gold); color: var(--ink); border-radius: 12px 12px 4px 12px; }
.lm-controls { display: flex; justify-content: center; gap: 12px; }
.lm-controls span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #2a2a2a; }
.lm-controls .lm-leave { background: var(--red); }

/* ---------- Video player (YouTube with our own controls; Google Drive) ---------- */
.sp-player { position: absolute; inset: 0; background: #000; overflow: hidden; outline: none; user-select: none; -webkit-user-select: none; }
.sp-player:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); }
.sp-frame, .sp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.sp-topmask { position: absolute; left: 0; right: 0; top: 0; height: 24%; min-height: 76px; z-index: 2; pointer-events: none; background: linear-gradient(180deg, #000 0%, #000 55%, transparent); opacity: 0; transition: opacity .3s; }
.sp-player.paused .sp-controls { background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .9) 50%, transparent); }
.sp-player.paused .sp-topmask, .sp-player.intro .sp-topmask { opacity: 1; }
.sp-cover { position: absolute; inset: 0; z-index: 4; border: 0; padding: 0; cursor: pointer; background: #000 center / cover no-repeat; display: grid; place-items: center; }
.sp-cover::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.sp-player.started .sp-cover { display: none; }
.sp-bigplay { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); transition: transform .2s; }
.sp-bigplay .icon { fill: currentColor; }
.sp-bigplay .i-play .icon { margin-left: 5px; }
.sp-cover:hover .sp-bigplay { transform: scale(1.07); }
.sp-bigplay .i-replay, .sp-player.ended .sp-bigplay .i-play { display: none; }
.sp-player.ended .sp-bigplay .i-replay { display: block; }
.sp-player.ended .sp-bigplay .i-replay .icon { fill: none; }
.sp-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); color: #fff; transition: opacity .3s; }
.sp-player:not(.started) .sp-controls { opacity: 0; pointer-events: none; }
.sp-player.playing.idle .sp-controls { opacity: 0; pointer-events: none; }
.sp-player.playing.idle { cursor: none; }
.sp-player.playing.idle .sp-shield { cursor: none; }
.sp-controls button { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; font-weight: 700; font-size: .85rem; }
.sp-controls button:hover { background: rgba(255, 255, 255, .15); }
.sp-controls .i-pause, .sp-player.playing .sp-controls .i-play, .sp-controls .i-mute, .sp-player.muted .sp-controls .i-vol { display: none; }
.sp-player.playing .sp-controls .i-pause, .sp-player.muted .sp-controls .i-mute { display: grid; }
.sp-controls .i-play .icon, .sp-controls .i-pause .icon { fill: currentColor; }
.sp-time { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .9; }
.sp-controls input[type=range] { flex: 1; min-width: 60px; height: 5px; -webkit-appearance: none; appearance: none; border-radius: 999px; cursor: pointer; background: linear-gradient(90deg, var(--red) var(--p, 0%), rgba(255, 255, 255, .3) var(--p, 0%)); padding: 0; border: 0; }
.sp-controls input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.sp-controls input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.sp-player:fullscreen, .sp-player:-webkit-full-screen { width: 100%; height: 100%; }
/* Until the first play, taps in the middle reach YouTube's own play button: a real tap
   inside the video is what lets phones (iPhones above all) play with sound */
.sp-player.ready:not(.played) .sp-cover { pointer-events: none; }
.sp-player.ready:not(.played) .sp-shield { clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 25% 25%, 25% 75%, 75% 75%, 75% 25%, 25% 25%); }
.sp-controls input.sp-vol { flex: 0 0 80px; min-width: 0; }
.sp-unmute { position: absolute; left: 12px; top: 12px; z-index: 3; display: none; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; }
.sp-player.playing.muted .sp-unmute { display: inline-flex; }
/* Full screen where the browser has none (iPhone): fill the window, sideways when held upright */
.sp-player.fake-fs, .sp-embed.fake-fs { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; background: #000; }
.sp-player.fake-fs .sp-controls { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
@media (orientation: portrait) {
    .sp-player.fake-fs, .sp-embed.fake-fs { inset: auto; top: 0; left: 100vw; width: 100vh; width: 100dvh; height: 100vw; transform: rotate(90deg); transform-origin: top left; }
}
/* Phones and tablets: bigger buttons; the phone's own volume buttons set the volume */
@media (hover: none) {
    .sp-controls { gap: 4px; padding: 26px 8px 8px; }
    .sp-controls button { min-width: 44px; height: 44px; }
    .sp-controls input.sp-vol { display: none; }
    .sp-controls input[type=range]::-webkit-slider-thumb { width: 18px; height: 18px; }
    .sp-controls input[type=range]::-moz-range-thumb { width: 18px; height: 18px; }
}
body.no-scroll { overflow: hidden; }
.drive-mask { position: absolute; top: 0; right: 0; width: 76px; height: 64px; z-index: 2; }
.sp-embed { position: absolute; inset: 0; background: #000; }
.sp-embed:fullscreen, .sp-embed:-webkit-full-screen { width: 100%; height: 100%; }
.sp-embed-fs { position: absolute; top: 10px; left: 10px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.sp-embed-fs:hover { background: rgba(0, 0, 0, .8); }

@media (max-width: 960px) {
    .live-grid { grid-template-columns: 1fr; gap: 40px; }
    .live-mock { transform: none; max-width: 560px; }
    .room-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .live-hero { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
    .live-hero-action { align-items: stretch; width: 100%; }
    .live-hero h2 { font-size: 1.35rem; }
    .attend-summary { text-align: left; }
    .page-head { flex-wrap: wrap; }
    .sp-time { display: none; }
    .sp-speed { display: none !important; }
    .lm-board { display: none; }
    .day-head h2 { font-size: 1.05rem; }
}

/* ==========================================================================
   Announcements (October 2026 update)
   ========================================================================== */
.badge-new { background: var(--red); color: #fff; }
.nav-bell { position: relative; }
.nav-count {
    font-style: normal; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; line-height: 1;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}
@media (min-width: 961px) {
    .portal-nav .nav-bell .nav-count { position: absolute; top: 1px; right: 0; box-shadow: 0 0 0 2px #fff; }
}

.ann-list { display: grid; gap: 16px; max-width: 860px; }
.ann-card { padding: 24px 28px; }
.ann-card.is-new { box-shadow: inset 4px 0 0 var(--red), var(--shadow-sm); }
.ann-card.pinned { border-color: #EBD9A6; background: linear-gradient(180deg, var(--gold-soft), #fff 70%); }
.ann-card h2 { font-size: 1.25rem; margin: 10px 0 8px; }
.ann-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; }
.ann-pin { display: inline-flex; align-items: center; gap: 4px; color: #8a6200; font-weight: 700; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.ann-body { color: var(--ink-2); line-height: 1.65; overflow-wrap: anywhere; }

.ann-dash { margin-bottom: 24px; padding: 22px 26px; }
.ann-dash .card-head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.ann-dash .card-head h2 .icon { color: var(--red); }
.ann-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; }
.ann-row:first-of-type { border-top: 0; padding-top: 4px; }
.ann-row:hover strong { color: var(--red); }
.ann-row-icon { flex: 0 0 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-soft); color: #8a6200; }
.ann-row.is-new .ann-row-icon { background: var(--red-soft); color: var(--red); }
.ann-row-text { min-width: 0; }
.ann-row-text strong { display: block; color: var(--ink); }
.ann-row-text small { display: block; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

.ann-admin-list { list-style: none; margin: 0; padding: 0; }
.ann-admin-list li { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.ann-admin-list li:first-child { border-top: 0; padding-top: 4px; }
.aal-text { min-width: 0; }
.aal-text .ann-meta { margin-bottom: 6px; }
.aal-text p { margin: 4px 0 0; overflow-wrap: anywhere; }
.aal-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 640px) {
    .ann-card { padding: 20px; }
    .ann-dash { padding: 18px 20px; }
}
@media (min-width: 961px) {
    .portal-nav > a { white-space: nowrap; }
}
@media (min-width: 961px) and (max-width: 1180px) {
    .portal-nav { gap: 2px; }
    .portal-nav > a:not(.btn) { padding: 8px 10px; }
    .portal-nav .nav-icon-only { padding: 8px 8px; }
}

/* ==========================================================================
   WhatsApp links and dark/light theme for the student portal (October 2026 update)
   ========================================================================== */
.wa-line { margin: 4px 0 0; font-size: .9rem; }
.wa-link { display: inline-flex; align-items: center; gap: 5px; color: #128C4A; font-weight: 600; }
.wa-link:hover { color: #0b6b37; }

/* Theme switch in the portal header */
.portal-header .main-nav { margin-left: auto; }
.theme-toggle {
    position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: space-between;
    width: 60px; height: 32px; margin-left: 12px; padding: 0 8px; border-radius: 999px; cursor: pointer;
    background: var(--soft); border: 1px solid var(--line); color: var(--muted); transition: background .2s, border-color .2s;
}
.theme-toggle:hover { border-color: var(--gold-deep); }
.theme-toggle .icon { position: relative; z-index: 1; transition: color .2s; }
.theme-toggle .tt-sun { color: var(--gold-deep); }
.tt-knob {
    position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: transform .25s ease;
}
html[data-theme="dark"] .tt-knob { transform: translateX(28px); background: #3a3532; }
html[data-theme="dark"] .theme-toggle .tt-sun { color: var(--muted); }
html[data-theme="dark"] .theme-toggle .tt-moon { color: var(--gold); }
@media (max-width: 960px) {
    .portal-header .theme-toggle { margin-left: auto; margin-right: 6px; }
}

/* Dark theme: colour variables first, then the parts that use fixed light colours */
html[data-theme="dark"] {
    color-scheme: dark;
    --red: #E0384F;
    --red-soft: rgba(224, 56, 79, .16);
    --gold-soft: rgba(242, 183, 5, .13);
    --green: #2FB577;
    --green-soft: rgba(47, 181, 119, .16);
    --ink: #F4EFEA;
    --ink-2: #DAD3CC;
    --text: #CFC8C1;
    --muted: #9C948D;
    --line: #34302C;
    --soft: #121110;
    --bg: #1B1918;
    --surface: #1E1C1A;
    --surface-2: #262321;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
}
html[data-theme="dark"] .portal-header { background: rgba(22, 20, 19, .9); }
html[data-theme="dark"] .b-red { color: var(--red); }
html[data-theme="dark"] :is(.card, .stat-card, .material-card, .video-card, .quick-link, .flash, .portal-footer,
    .day-nav a, .icon-btn, .pagination a, .tabs a, .weekday-picker span, .btn-outline, .btn-danger-ghost,
    .score-ring span, .panel, .kpi, .auth-card) { background: var(--surface); }
html[data-theme="dark"] :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not(:disabled) { background-color: var(--surface-2); }
html[data-theme="dark"] input:disabled { background: var(--soft); }
html[data-theme="dark"] .seg input:checked + span { background: var(--surface-2); }
html[data-theme="dark"] .icon-btn:hover { background: var(--red); }

/* Places where the dark ink colour is a background turn into light pills */
html[data-theme="dark"] :is(.portal-nav > a.active, .tabs a.active, .pagination a.current, .day-nav a.active,
    .weekday-picker input:checked + span, .btn-dark) { background: var(--ink); border-color: var(--ink); color: #141414; }
html[data-theme="dark"] .day-nav a.active small { color: #5a534d; }
html[data-theme="dark"] :is(.lv, .avatar, .day-no) { --ink: #34302D; }
html[data-theme="dark"] .live-strip:not(.is-live) { background: #262220; }
html[data-theme="dark"] .welcome-banner { background: linear-gradient(120deg, #1d1a18, #2a0505 70%, var(--red-dark)); }
html[data-theme="dark"] .live-strip .btn-ghost:hover { color: #141414; }

/* Text that sits on gold stays dark */
html[data-theme="dark"] :is(.btn-gold, .btn-gold:hover, .welcome-level.lv-a1, .lesson-no, .nav-badge, .featured .course-badge, .progress-steps li.current > span) { color: #141414; }

/* Deep gold text on pale gold becomes bright gold */
html[data-theme="dark"] :is(.badge-pending, .course-badge, .t-img, .t-quiz, .score-pill.ok, .event-register, .mark-box small, .ann-pin, .ann-row-icon) { color: #F0C24A; }
html[data-theme="dark"] .t-doc { background: rgba(80, 140, 255, .16); color: #93B7FF; }
html[data-theme="dark"] .t-ppt { background: rgba(255, 140, 60, .15); color: #FFAA70; }
html[data-theme="dark"] .t-audio { background: rgba(160, 100, 255, .16); color: #C4A2FF; }
html[data-theme="dark"] .badge-muted { background: #2E2A27; }
html[data-theme="dark"] .notice { border-color: rgba(242, 183, 5, .3); }
html[data-theme="dark"] .ann-card.pinned { border-color: rgba(242, 183, 5, .3); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%); }
html[data-theme="dark"] .quick-link.attention { background: linear-gradient(90deg, var(--gold-soft), var(--surface) 60%); }
html[data-theme="dark"] .portal-nav .nav-bell .nav-count { box-shadow: 0 0 0 2px var(--bg); }
html[data-theme="dark"] :is(.table td, .hw-row + .hw-row, .loc-list li, .q-admin) { border-color: var(--line); }
html[data-theme="dark"] .table tbody tr:hover { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] :is(.pick:hover .pick-box, .option:hover) { border-color: #4a443f; }
html[data-theme="dark"] .dropzone { border-color: #4a443f; }
html[data-theme="dark"] .empty .icon { color: #4a443f; }
html[data-theme="dark"] .wa-link { color: #3DD68C; }
html[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); }
@media (max-width: 960px) {
    html[data-theme="dark"] .main-nav { background: var(--surface); }
}


/* ==========================================================================
   Attendance reports (October 2026 update)
   ========================================================================== */
.att-toolbar { justify-content: space-between; }
.month-nav { display: inline-flex; align-items: center; gap: 10px; }
.month-nav strong { min-width: 130px; text-align: center; color: var(--ink); }
.att-toolbar .inline-form select { min-width: 200px; }
.att-legend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-legend .att-mark:not(:first-child) { margin-left: 8px; }
.att-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: .8rem; line-height: 1; }
.att-mark .icon { stroke-width: 3; }
.att-mark.p { background: var(--green-soft); color: var(--green); }
.att-mark.a { background: var(--red-soft); color: var(--red); }
.att-mark.n { color: var(--muted); }
.att-grid th, .att-grid td { padding-left: 4px; padding-right: 4px; }
.att-grid .att-day { text-align: center; width: 30px; }
.att-grid th.att-day a { display: block; color: var(--ink-2); line-height: 1.1; }
.att-grid th.att-day b { display: block; font-size: .85rem; }
.att-grid th.att-day small { font-size: .65rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.att-grid th.att-day a:hover b { color: var(--red); }
.att-grid .att-name { position: sticky; left: 0; background: #fff; min-width: 160px; padding-right: 12px; z-index: 1; }
.att-pct { font-weight: 700; color: var(--green); }
.att-pct.low, .att-low { color: var(--red) !important; }
.att-foot { margin: 14px 0 0; }
.att-foot .icon { vertical-align: -2px; margin-right: 4px; }
.att-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.att-email-note { display: flex; gap: 6px; align-items: flex-start; margin: 12px 0 0; }
.att-email-note .icon { flex-shrink: 0; margin-top: 3px; }
.att-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 6px; }
.att-summary-row > div { background: var(--soft, #F7F4F0); border-radius: 12px; padding: 14px 16px; }
.att-summary-row small { display: block; color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.att-summary-row strong { display: block; font-size: 1.6rem; color: var(--ink); font-family: var(--font-display); line-height: 1.2; }
.att-summary-row em { font-style: normal; font-size: .8rem; color: var(--muted); }
.att-record { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 28px; }
.att-record .sub-h { border-top: 0; padding-top: 0; margin-top: 8px; }
a.stat-card, a.attend-summary { color: inherit; transition: border-color .2s; }
a.stat-card:hover { border-color: var(--red); color: inherit; }
a.attend-summary:hover span { color: var(--red); }
@media (max-width: 860px) {
    .att-record { grid-template-columns: 1fr; gap: 6px; }
    .att-summary-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .att-summary-row strong { font-size: 1.25rem; }
}
html[data-theme="dark"] .att-grid .att-name { background: var(--surface); }
html[data-theme="dark"] .att-summary-row > div { background: var(--surface-2); }

/* Batches (Admin > Courses) */
.table tr.row-muted td { opacity: .6; }
.check input { flex-shrink: 0; }

/* Google Meet sync (Admin > Google Meet, live class page) */
.g-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.g-step { display: flex; gap: 12px; align-items: flex-start; }
.g-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; border: 2px solid var(--line); margin-top: 1px; }
.g-step.ok .g-dot { background: var(--green); border-color: var(--green); color: #fff; }
.g-step.todo strong { color: var(--muted); }
.g-facts { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 8px; font-size: .92rem; }
.g-auto { padding: 12px 14px; background: var(--soft); border-radius: 12px; margin-bottom: 14px; }
.g-auto p { margin: 0 0 8px; }
.g-auto p:last-child { margin: 10px 0 0; }
.g-auto .inline-form { display: inline-block; }

/* Import from Drive (admin) + Drive document viewer */
.import-table td { vertical-align: top; }
.import-table .break { word-break: break-word; }
.import-table input[name^="title"] { width: 100%; }
.doc-view { max-width: 1000px; margin: 0 auto; padding: 18px 16px 40px; }
.doc-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.doc-actions { display: flex; gap: 8px; }
.doc-title { font-size: 1.3rem; margin: 6px 0 14px; }
.doc-frame { position: relative; width: 100%; height: 80vh; min-height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.doc-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
