/* 369 Tesla ExamOS — layout chrome: public nav/footer, auth, app shell */

/* ============ Brand mark ============ */
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--primary-dark); text-decoration: none; }
.brand .mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 800; font-size: .9rem; }
.brand .mark span { transform: translateY(-1px); }
.brand small { display: block; font-size: .62rem; letter-spacing: .18em; font-weight: 700; color: var(--secondary); }

/* ============ Public site ============ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a.navlink { color: var(--text-secondary); font-weight: 600; font-size: .95rem; }
.site-nav a.navlink:hover { color: var(--primary); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 10px; padding: .4rem; color: var(--text-primary); cursor: pointer; }

.hero { position: relative; overflow: hidden; background:
    radial-gradient(1200px 400px at 80% -10%, var(--secondary-soft), transparent),
    radial-gradient(900px 400px at 0% 0%, var(--primary-soft), transparent); }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding: 4.5rem 20px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.02em; }
.hero p.lead { font-size: 1.15rem; color: var(--text-secondary); max-width: 34rem; }
.hero-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.25rem; }
.hero-panel .mini { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: var(--radius-sm); background: var(--surface-soft); margin-bottom: .6rem; }

.feature-tile { text-align: left; }
.feature-tile h3 { font-size: 1.05rem; margin-top: .8rem; }
.feature-tile p { color: var(--text-secondary); font-size: .93rem; margin: 0; }

.course-card { display: flex; flex-direction: column; gap: .5rem; }
.course-card .course-ico { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }

.roadmap { counter-reset: step; display: grid; gap: .75rem; }
.roadmap .step { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.roadmap .step .num { counter-increment: step; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.roadmap .step .num::before { content: counter(step); }

.site-footer { background: var(--primary-dark); color: #c7d3ec; padding: 3rem 0 1.5rem; }
.site-footer a { color: #c7d3ec; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; color: #9fb0d2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ============ Auth ============ */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { background: linear-gradient(150deg, var(--primary-dark), var(--primary) 60%, var(--secondary)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-aside .brand, .auth-aside .brand small { color: #fff; }
.auth-aside .mark { background: rgba(255,255,255,.16); }
.auth-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.auth-aside li { display: flex; gap: .65rem; align-items: center; color: #dbe4fb; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem; background: var(--surface-soft); }
.auth-card { width: 100%; max-width: 430px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2.25rem; }
.auth-mobile-hero { display: none; }
.auth-title { font-size: 1.6rem; margin: 0 0 .25rem; color: var(--text-primary); }
.auth-lead { margin: 0 0 1.5rem; }
.auth-form-meta { margin-bottom: 1.2rem; }
.auth-foot { margin-top: 1.5rem; }

/* ============ App shell (student/admin) ============ */
/* Named areas keep .scrim from stealing a grid track and blanking .app-main. */
.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-areas: "sidebar main";
    background: var(--surface-soft);
}
.app > .scrim { display: none !important; grid-area: unset; }
.app-sidebar {
    grid-area: sidebar;
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.app-sidebar .brand-row { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.side-nav { padding: .9rem .75rem; display: flex; flex-direction: column; gap: .15rem; }
.side-nav .navcap { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: .9rem .75rem .35rem; font-weight: 700; }
.side-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 600; font-size: .92rem; }
.side-link:hover { background: var(--surface-soft); color: var(--primary); text-decoration: none; }
.side-link.active { background: var(--primary-soft); color: var(--primary); }
.side-link svg { flex: none; }

.app-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; background: var(--surface-soft); }
.app-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; gap: 1rem; }
.app-header .search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: .5rem; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: .5rem .9rem; color: var(--text-muted); }
.app-header .search input { border: none; background: none; outline: none; font: inherit; width: 100%; color: var(--text-primary); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text-secondary); cursor: pointer; }
.icon-btn:hover { color: var(--primary); border-color: var(--border-strong); }
.notif-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #e07a3d); border: 2px solid #fff; }
.header-pop { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); min-width: 280px; max-width: min(360px, 92vw); padding: .4rem; z-index: 70; }
.header-pop-title { padding: .55rem .7rem .35rem; font-weight: 700; font-size: .9rem; }
.header-pop-item { display: block; padding: .55rem .7rem; border-radius: 8px; text-decoration: none; color: inherit; }
.header-pop-item:hover { background: var(--surface-soft); }
.header-pop-item strong { display: block; font-size: .88rem; margin-bottom: .15rem; }
.header-pop-foot { display: block; text-align: center; padding: .55rem; font-size: .85rem; font-weight: 600; color: var(--primary); text-decoration: none; border-top: 1px solid var(--border); margin-top: .25rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; border: none; }
.app-content { padding: 1.75rem; }
.page-title { font-size: 1.6rem; margin-bottom: .25rem; }

/* stat tile */
.stat { display: flex; align-items: center; gap: 1rem; }
.stat .num { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat .lbl { font-size: .85rem; color: var(--text-secondary); }

/* welcome banner */
.welcome { background: linear-gradient(120deg, var(--primary-dark), var(--primary) 55%, var(--secondary)); color: #fff; border-radius: var(--radius-lg); padding: 1.75rem; position: relative; overflow: hidden; }
.welcome h2 { color: #fff; }
.welcome p { color: #dbe4fb; margin: 0; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }

/* bottom nav (mobile) */
.bottom-nav { display: none; }
/* Base scrim stays out of the document grid; mobile overrides in the media query. */
.scrim { display: none; }

@media (max-width: 991px) {
    .site-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .hero .container { grid-template-columns: 1fr; padding: 3rem 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .auth-wrap {
        display: flex !important;
        flex-direction: column;
        grid-template-columns: unset;
        grid-template-rows: unset;
        /* min-height only (NO fixed height): the wrap grows past the viewport
           for long forms so the whole PAGE scrolls. A fixed 100dvh height with
           an inner overflow:auto region does not touch-scroll in the Android
           WebView, which is why the register form felt stuck. */
        min-height: 100vh;
        min-height: 100dvh;
        min-height: 100svh;
        background: linear-gradient(165deg, var(--primary-dark) 0%, var(--primary) 48%, #2f4fb8 100%);
    }
    .auth-aside { display: none; }
    .auth-mobile-hero {
        display: block;
        padding: calc(1.35rem + env(safe-area-inset-top, 0px)) 1.35rem 1.15rem;
        color: #fff;
    }
    .auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: .85rem;
        text-decoration: none;
        color: #fff;
    }
    .auth-mobile-brand .mark {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        background: rgba(255,255,255,.18);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 1.05rem;
        letter-spacing: -.02em;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
    }
    .auth-mobile-name { display: flex; flex-direction: column; gap: .1rem; }
    .auth-mobile-name strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
    .auth-mobile-name small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #dbe4fb; font-weight: 600; }
    .auth-mobile-tag {
        margin: .9rem 0 0;
        color: #dbe4fb;
        font-size: .95rem;
        line-height: 1.45;
        max-width: 22rem;
    }
    .auth-main {
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
        background: #fff;
        flex: 1 0 auto;
        min-height: 0;
        display: flex;
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -10px 40px rgba(8, 24, 64, .18);
        /* No inner scroll region — let the page body scroll (WebView-safe).
           flex:1 0 auto still fills the screen when the form is short. */
        overflow: visible;
    }
    .auth-card {
        max-width: none;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 1.65rem 1.35rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        flex: 1 1 auto;
        width: 100%;
        background: transparent;
    }
    .auth-title { font-size: 1.55rem; }
    .auth-form .input,
    .auth-form .select {
        min-height: 48px;
        font-size: 1rem;
    }
    .auth-submit { min-height: 52px; font-size: 1.05rem; }

    .app {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main";
    }
    .app-sidebar {
        position: fixed; left: 0; top: 0; width: 82%; max-width: 300px; z-index: 60;
        transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
        height: 100vh;
    }
    .app.nav-open .app-sidebar { transform: translateX(0); }
    .app-content { padding: 1.1rem 1rem 5.5rem; }
    .app-header .search { display: none; }
    .menu-toggle { display: inline-flex !important; }
    .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border); justify-content: space-around; padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom)); }
    .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .68rem; color: var(--text-muted); font-weight: 600; padding: .3rem .5rem; }
    .bottom-nav a.active { color: var(--primary); }
    .app > .scrim {
        display: none !important;
        position: fixed; inset: 0; background: rgba(16,32,68,.45); z-index: 55;
    }
    .app.nav-open > .scrim { display: block !important; }
}
.menu-toggle { display: none; }

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
}

/* =====================================================================
   INFOGRAPHIC POLISH  (palette unchanged — gradients blend existing tokens)
   Loaded last so these refinements win the cascade. Markup untouched.
   ===================================================================== */

/* ---- Typography: Sora headings / Manrope UI ---- */
h1, h2, h3, h4, .page-title, .brand, .brand-title, .stat .num, .metric .n {
    font-family: var(--font-heading);
    letter-spacing: -.025em;
}
.brand, .side-link, .btn, .bottom-nav a { font-family: var(--font-ui); }
body { letter-spacing: -.005em; }

/* ---- Buttons: gradient fills + depth ---- */
.btn { border-radius: 14px; font-weight: 700; }
.btn-lg { border-radius: 16px; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px rgba(24,71,184,.26);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); box-shadow: 0 12px 26px rgba(24,71,184,.34); }
.btn-accent { background: linear-gradient(135deg, #FF9A3D, var(--accent)); box-shadow: 0 8px 20px rgba(255,122,26,.28); }
.btn-ghost { border-color: var(--border-strong); background: #fff; }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary-soft); }

/* ---- Cards: rounder, softer layered shadow, hairline border ---- */
.card { border-radius: var(--radius-lg); border-color: #EDF1F8; box-shadow: 0 1px 2px rgba(15,35,80,.04), 0 10px 30px rgba(15,35,80,.06); }
.card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform: translateY(-5px); box-shadow: 0 20px 46px rgba(15,35,80,.15); }

/* ---- Icon badges: gradient squircles with white glyphs (infographic hallmark) ---- */
.icon-badge { border-radius: 15px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 7px 16px rgba(24,71,184,.26); }
.icon-badge.accent { background: linear-gradient(135deg, #FF9A3D, var(--accent)); color: #fff; box-shadow: 0 7px 16px rgba(255,122,26,.28); }
.icon-badge.teal   { background: linear-gradient(135deg, #2CC6C0, var(--teal));   color: #fff; box-shadow: 0 7px 16px rgba(16,167,162,.28); }
.icon-badge.violet { background: linear-gradient(135deg, #8C74E8, var(--secondary)); color: #fff; box-shadow: 0 7px 16px rgba(115,87,217,.28); }

/* ---- Eyebrow → soft pill with an accent dot ---- */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .32rem .85rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); letter-spacing: .09em; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---- Badges: a touch bolder ---- */
.badge { font-weight: 700; }

/* ---- Progress: taller, rounder ---- */
.progress { height: 9px; }

/* ---- Big stat numbers → gradient text ---- */
.stat .num, .metric .n {
    background: linear-gradient(120deg, var(--primary-dark), var(--secondary));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Gradient text utility for headlines ---- */
.grad-text { background: linear-gradient(120deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ================= Public site ================= */
.site-header { background: rgba(255,255,255,.82); }
.site-nav a.navlink { position: relative; padding: .35rem .1rem; }
.site-nav a.navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.site-nav a.navlink:hover::after { transform: scaleX(1); }

/* Hero: richer mesh + dotted grid + gradient headline */
.hero {
    background:
      radial-gradient(900px 520px at 86% -18%, rgba(115,87,217,.16), transparent 60%),
      radial-gradient(820px 520px at -12% 6%, rgba(24,71,184,.14), transparent 55%),
      radial-gradient(620px 420px at 55% 128%, rgba(16,167,162,.10), transparent 60%);
}
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(24,71,184,.09) 1.4px, transparent 1.4px);
    background-size: 24px 24px; opacity: .55;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 72%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 25%, #000 72%, transparent);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.55rem); line-height: 1.08; }
.hero-panel { border-radius: 22px; box-shadow: 0 30px 70px rgba(15,35,80,.18); }
.hero-panel .mini { transition: transform .15s ease; }
.hero-panel .mini:hover { transform: translateX(4px); }

/* Course cards: glowing gradient tile that pops on hover */
.course-card .course-ico { border-radius: 16px; box-shadow: 0 10px 22px rgba(15,35,80,.18); transition: transform .18s ease; }
.course-card:hover .course-ico { transform: scale(1.06) rotate(-2deg); }

/* Feature tiles rounder */
.feature-tile { border-radius: var(--radius-lg); }

/* Roadmap: connector rail + gradient numbers + hover */
.roadmap .step { align-items: center; border-radius: 16px; transition: transform .15s ease, box-shadow .15s ease; }
.roadmap .step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.roadmap .step .num { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 6px 14px rgba(24,71,184,.28); }

/* Footer brand mark keeps gradient */
.site-footer .mark { background: linear-gradient(135deg, var(--primary), var(--secondary)); }

/* ================= Welcome banner (dashboards) ================= */
.welcome { box-shadow: 0 18px 44px rgba(13,45,103,.28); }
.welcome > * { position: relative; z-index: 1; }
.welcome::after { content: ""; position: absolute; right: -50px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); z-index: 0; }
.welcome::before { content: ""; position: absolute; inset: 0; z-index: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1.5px, transparent 1.5px); background-size: 22px 22px; opacity: .6; }

/* ================= App shell (student / admin) ================= */
.side-link { position: relative; }
.side-link.active { background: linear-gradient(90deg, var(--primary-soft), transparent); font-weight: 700; }
.side-link.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--secondary)); }
.app-sidebar .brand-row { border-bottom-color: var(--border); }
.app-header { background: rgba(255,255,255,.86); }
.icon-btn { border-radius: 12px; transition: transform .12s ease, color .12s, border-color .12s; }
.icon-btn:hover { transform: translateY(-1px); }
.avatar { box-shadow: 0 6px 14px rgba(24,71,184,.28); }
.list-row { transition: background .12s ease; }
a.list-row:hover { background: var(--surface-soft); border-radius: 10px; }

/* ================= Auth ================= */
.auth-aside { position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.10) 1.5px, transparent 1.5px); background-size: 24px 24px; opacity: .5; }
.auth-aside::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-card { border-radius: 22px; box-shadow: 0 24px 60px rgba(15,35,80,.14); }

/* Hero metric strip */
.hero-metrics { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.metric { display: flex; flex-direction: column; }
.metric .n { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.metric .lbl { font-size: .8rem; color: var(--text-secondary); font-weight: 600; margin-top: .25rem; }

/* ================= Section header helper (opt-in) ================= */
.section-head { text-align: center; max-width: 660px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }

/* ================= Mobile: collapse inline 2-column grids ================= */
/* Views set grid-template-columns via inline style (e.g. "1.4fr 1fr"), which
   overrides class media queries — so force any .grid with inline columns to a
   single column on small screens. Scoped to .grid so widgets like the question
   palette (plain inline grid, no .grid class) are untouched. */
@media (max-width: 820px) {
    .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .grid { gap: 1rem; }
}

/* Tables never force the page wider than the screen */
.app-content table, .card table { max-width: 100%; }

/* Phone: no sideways page scroll (long topic titles / nowrap buttons) */
@media (max-width: 820px) {
    html, body { overflow-x: hidden; }
    .app-content { max-width: 100%; overflow-x: clip; }
    .app-content .card,
    .app-content .grid { max-width: 100%; min-width: 0; }
    .btn { max-width: 100%; }
}

/* ================= Reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Note body editor (admin) + note rendering (student)
   Plain text typed by staff becomes this markup via
   App\Core\PlainTextNote. Both surfaces share the classes so a
   preview matches what a student sees.
   ============================================================ */
.note-help {
    font-size: .82rem;
    color: var(--text-secondary);
    background: var(--surface-soft, #F6F8FD);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .6rem .75rem;
    margin-bottom: .5rem;
    line-height: 1.7;
}
.note-help-keys { display: block; margin: .35rem 0; }
.note-help code {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .05rem .4rem;
    margin: .1rem .25rem .1rem 0;
    font-size: .75rem;
    color: var(--primary);
}
.note-preview-bar { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.note-preview {
    margin-top: .5rem;
    padding: 1rem 1.15rem;
    border: 1px dashed var(--border-strong, #C9D5EA);
    border-radius: 12px;
    background: #fff;
}

/* ---- Shared note rendering ---- */
.note-callout {
    display: block;
    margin: .85rem 0;
    padding: .7rem .9rem .7rem 1rem;
    border-left: 4px solid var(--accent, #F59E0B);
    border-radius: 0 10px 10px 0;
    background: #FFF8EB;
    color: #7A4E00;
    font-weight: 600;
}
.note-list { margin: .6rem 0; padding-left: 1.1rem; }
.note-list li { margin: .3rem 0; }
.note-table {
    width: 100%;
    border-collapse: collapse;
    margin: .85rem 0;
    font-size: .9rem;
}
.note-table th {
    text-align: left;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 700;
    padding: .5rem .65rem;
}
.note-table td { padding: .45rem .65rem; border-bottom: 1px solid var(--border); }
.note-table tr:nth-child(even) td { background: var(--surface-soft, #F6F8FD); }

/* Wide tables scroll inside the note instead of stretching the page. */
.note-preview, .note-body { overflow-x: auto; }

/* ---------- Upload progress ---------- */
.up-bar { margin-top: .6rem; }
.up-bar-track {
    height: 10px;
    border-radius: 99px;
    background: var(--surface-alt);
    overflow: hidden;
}
.up-bar-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width .2s linear;
}
.up-bar-text { margin-top: .3rem; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .up-bar-track > span { transition: none; } }
