/* =====================================================================
   e-OsTech design system
   Brand navy #022557 (structure) · Brand blue #1474D8 (measurement) · Amber (the student / "you")
   Note: the --teal-* variables hold the e-OsTech blue scale (names kept for stability)
   Manrope (display, numerals) · IBM Plex Sans (reading)
   ===================================================================== */
:root {
    --navy-950: #011A40;
    --navy-900: #022557;
    --navy-800: #0A3270;
    --navy-700: #1A4A8F;
    --teal-700: #0B4E9E;
    --teal-600: #0F62C0;
    --teal-500: #1474D8;
    --teal-100: #CFE2F8;
    --teal-50: #EAF3FD;
    --amber-500: #E3A23B;
    --amber-100: #FBEBCF;
    --coral-500: #D2555A;
    --coral-100: #F8DEDF;

    --bg: #F3F5F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --line: #DFE5EE;
    --line-strong: #C9D3E1;
    --text: #142238;
    --muted: #5A6B85;
    --faint: #8A98AE;

    --lvl-high: var(--teal-600);
    --lvl-high-bg: var(--teal-50);
    --lvl-mid: #B7791F;
    --lvl-mid-bg: var(--amber-100);
    --lvl-low: var(--coral-500);
    --lvl-low-bg: var(--coral-100);

    --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

    --radius-lg: 16px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-float: 0 24px 60px -24px rgba(15, 39, 71, .35);
    --sidebar-w: 256px;

    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-primary: var(--teal-600);
    --bs-primary-rgb: 15, 98, 192;
    --bs-link-color: var(--teal-600);
    --bs-link-color-rgb: 15, 98, 192;
    --bs-link-hover-color: var(--teal-700);
    --bs-link-hover-color-rgb: 11, 78, 158;
    --bs-focus-ring-color: rgba(20, 116, 216, .3);
}

[data-bs-theme="dark"] {
    --bg: #01142F;
    --surface: #0A2148;
    --surface-2: #0F2A57;
    --line: #1E3A66;
    --line-strong: #2B4B7E;
    --text: #E6ECF5;
    --muted: #9CADC6;
    --faint: #6F83A3;
    --teal-50: rgba(20, 116, 216, .14);
    --teal-100: rgba(20, 116, 216, .3);
    --amber-100: rgba(227, 162, 59, .16);
    --coral-100: rgba(210, 85, 90, .16);
    --lvl-mid: #E3A23B;
    --lvl-high: #5AA8F2;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-secondary-bg: var(--surface-2);
    --bs-tertiary-bg: var(--surface-2);
}

/* ---------------------------------------------------------- base */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .display { font-family: var(--font-display); letter-spacing: -0.02em; color: var(--text); }
h1 { font-weight: 800; }
h2, h3 { font-weight: 750; }
h4, h5, h6 { font-weight: 700; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 750; letter-spacing: -0.02em; }
.text-muted { color: var(--muted) !important; }
.text-faint { color: var(--faint); }
.text-teal { color: var(--teal-600); }
.text-amber { color: var(--amber-500); }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--teal-100); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------- buttons */
.btn { font-family: var(--font-display); font-weight: 700; border-radius: var(--radius-sm); letter-spacing: -0.005em; }
.btn-primary, .btn-brand {
    --bs-btn-color: #fff; --bs-btn-bg: var(--teal-600); --bs-btn-border-color: var(--teal-600);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--teal-700); --bs-btn-hover-border-color: var(--teal-700);
    --bs-btn-active-bg: var(--teal-700); --bs-btn-active-border-color: var(--teal-700);
    --bs-btn-disabled-bg: var(--teal-600); --bs-btn-disabled-border-color: var(--teal-600);
}
.btn-navy {
    --bs-btn-color: #fff; --bs-btn-bg: var(--navy-900); --bs-btn-border-color: var(--navy-900);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--navy-800); --bs-btn-hover-border-color: var(--navy-800);
}
.btn-ghost {
    --bs-btn-color: var(--text); --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--line-strong);
}
.btn-ghost-danger {
    --bs-btn-color: var(--coral-500); --bs-btn-bg: transparent; --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--coral-500); --bs-btn-hover-border-color: var(--coral-500);
}
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }

/* ---------------------------------------------------------- forms */
.form-control, .form-select {
    border-radius: var(--radius-sm); border-color: var(--line-strong); background-color: var(--surface);
    color: var(--text); padding: .6rem .8rem;
}
.form-control:focus, .form-select:focus { border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(20, 116, 216, .15); }
.form-label { font-weight: 600; font-size: .875rem; color: var(--text); margin-bottom: .35rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--teal-600); border-color: var(--teal-600); }

/* ---------------------------------------------------------- app shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: var(--navy-900); color: #C9D6EA;
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.25rem 1rem;
    z-index: 1030;
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; padding: .25rem .5rem 1.25rem; }
.brand:hover { color: #fff; text-decoration: none; }
.brand small { display: block; font-weight: 600; font-size: .7rem; color: #8FA6C8; letter-spacing: 0; margin-top: -2px; }
.nav-group { font-size: .75rem; font-weight: 600; color: #7F95B8; padding: 1rem .75rem .4rem; }
.side-link {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 10px;
    color: #C9D6EA; font-weight: 500; font-size: .93rem; margin-bottom: 2px;
}
.side-link i { font-size: 1.05rem; opacity: .85; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side-link.active { background: var(--navy-800); color: #fff; box-shadow: inset 3px 0 0 var(--amber-500); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 1rem; }
.user-chip { display: flex; align-items: center; gap: .65rem; padding: .4rem .5rem; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: var(--teal-600); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .85rem;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 2rem;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.content { padding: 2rem; max-width: 1360px; width: 100%; }
.sidebar-toggle { display: none; }
@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: none; box-shadow: var(--shadow-float); }
    .sidebar-toggle { display: inline-grid; }
    .content { padding: 1.25rem; }
    .topbar { padding: 0 1rem; }
}

/* ---------------------------------------------------------- page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-head h1 { font-size: 1.75rem; margin: 0; }
.page-head p { margin: .35rem 0 0; color: var(--muted); max-width: 62ch; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; display: inline-block; }

/* ---------------------------------------------------------- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-pad { padding: 1.5rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-size: 1rem; margin: 0; }
.panel-head .sub { font-size: .82rem; color: var(--muted); }
.panel-body { padding: 1.5rem; }
.panel-flush .table { margin: 0; }
.panel-navy { background: var(--navy-900); color: #DCE6F4; border-color: var(--navy-900); }
.panel-navy h2, .panel-navy h3, .panel-navy h4 { color: #fff; }

/* KPI */
.kpi { padding: 1.25rem 1.4rem; }
.kpi-label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.kpi-row > .panel:first-child { background: var(--navy-900); border-color: var(--navy-900); }
.kpi-row > .panel:first-child .kpi-label, .kpi-row > .panel:first-child .kpi-foot { color: #9FB4D3; }
.kpi-row > .panel:first-child .kpi-value { color: #fff; }

/* ---------------------------------------------------------- tables */
.table-modern { --bs-table-bg: transparent; --bs-table-color: var(--text); margin: 0; }
.table-modern thead th {
    font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--surface-2);
    border-bottom: 1px solid var(--line); padding: .7rem 1rem; white-space: nowrap;
}
.table-modern td { padding: .85rem 1rem; border-color: var(--line); vertical-align: middle; }
.table-modern tbody tr:hover { background: var(--surface-2); }
.table-modern .cell-title { font-weight: 600; }
.table-modern .cell-sub { font-size: .8rem; color: var(--muted); }

/* ---------------------------------------------------------- chips & levels */
.chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 999px;
    font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
    white-space: nowrap;
}
.chip-teal { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
[data-bs-theme="dark"] .chip-teal { color: #9CCBF8; }
.lvl { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 6px; font-size: .78rem; font-weight: 700; font-family: var(--font-display); }
.lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lvl-high { color: var(--lvl-high); background: var(--lvl-high-bg); }
.lvl-mid { color: var(--lvl-mid); background: var(--lvl-mid-bg); }
.lvl-low { color: var(--lvl-low); background: var(--lvl-low-bg); }
.lvl-na { color: var(--faint); background: var(--surface-2); }

.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-chips a {
    padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text);
    font-weight: 600; font-size: .85rem; background: var(--surface);
}
.filter-chips a:hover { text-decoration: none; border-color: var(--teal-500); }
.filter-chips a.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* ---------------------------------------------------------- meters */
.meter { position: relative; height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: visible; }
.meter > .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--teal-600); }
.meter > .fill.lvl-mid-fill { background: var(--amber-500); }
.meter > .fill.lvl-low-fill { background: var(--coral-500); }
.meter > .mark { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--navy-900); border-radius: 2px; }
[data-bs-theme="dark"] .meter > .mark { background: #fff; }
.meter-sm { height: 6px; }
.meter-legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); }
.meter-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; background: var(--teal-600); }
.meter-legend span.mk::before { width: 2px; height: 12px; background: var(--navy-900); border-radius: 1px; }

.sten { display: inline-flex; gap: 3px; }
.sten i { width: 9px; height: 14px; border-radius: 2px; background: var(--line); display: block; }
.sten i.on { background: var(--navy-700); }
.sten i.on.you { background: var(--amber-500); }
[data-bs-theme="dark"] .sten i.on { background: #5A8BD0; }

.delta-up { color: var(--teal-600); font-weight: 700; font-size: .82rem; }
.delta-down { color: var(--coral-500); font-weight: 700; font-size: .82rem; }

/* ring */
.ring { --p: 0; --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--ring-color, var(--teal-600)) calc(var(--p) * 1%), var(--line) 0); }
.ring > span { width: calc(var(--size) - 22px); height: calc(var(--size) - 22px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.panel-navy .ring > span { background: var(--navy-900); }

/* histogram mini */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.spark span { width: 12px; background: var(--teal-500); border-radius: 2px 2px 0 0; min-height: 2px; }

/* heat cell */
.heat { font-weight: 700; font-family: var(--font-display); text-align: center; border-radius: 6px; padding: .3rem .4rem; }

/* option distribution */
.dist { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); min-width: 160px; }
.dist span { display: block; height: 100%; }
.dist span.key { background: var(--teal-600) !important; }

/* ---------------------------------------------------------- test cards */
.test-card { display: flex; flex-direction: column; height: 100%; padding: 1.5rem; }
.test-card .cat { display: flex; align-items: center; gap: .55rem; font-size: .82rem; font-weight: 600; color: var(--teal-700); }
[data-bs-theme="dark"] .test-card .cat { color: #9CCBF8; }
.cat-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); font-size: 1.15rem; flex-shrink: 0; }
.test-card h3 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
.test-card p { color: var(--muted); font-size: .9rem; flex-grow: 1; }
.meta-row { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--muted); margin: .75rem 0 1.25rem; }
.meta-row i { margin-right: .25rem; }
.status-done { color: var(--teal-600); font-weight: 600; font-size: .82rem; }

/* ---------------------------------------------------------- test player */
.player-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.player-top {
    position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .9rem 1.5rem; display: flex; align-items: center; gap: 1.25rem;
}
.player-progress { height: 4px; background: var(--line); }
.player-progress > div { height: 100%; background: var(--teal-600); transition: width .25s ease; }
.timer { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; padding: .35rem .8rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.timer.warn { background: var(--coral-100); color: var(--coral-500); border-color: transparent; }
.player-stage { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1.25rem 2rem; }
.q-card { width: 100%; max-width: 820px; }
.q-index { font-family: var(--font-display); font-weight: 700; color: var(--teal-600); font-size: .9rem; margin-bottom: .75rem; }
.q-text { font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 2rem; }
.q-step { display: none; }
.q-step.current { display: block; animation: qIn .22s ease; }
@keyframes qIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.likert.cols-4 { grid-template-columns: repeat(4, 1fr); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt label {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center;
    min-height: 92px; padding: .9rem .6rem; border-radius: var(--radius); border: 1.5px solid var(--line-strong);
    background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; transition: border-color .12s, background .12s;
}
.opt label:hover { border-color: var(--teal-500); }
.opt .key { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-display); font-size: .8rem; font-weight: 800; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.opt input:checked + label { border-color: var(--teal-600); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(20, 116, 216, .15); }
.opt input:checked + label .key { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }
.opt input:focus-visible + label { outline: 3px solid var(--teal-500); outline-offset: 2px; }
.mcq { display: grid; gap: .6rem; }
.mcq .opt label { flex-direction: row; justify-content: flex-start; min-height: 0; padding: 1rem 1.1rem; text-align: left; font-size: 1rem; gap: .9rem; }
@media (max-width: 767.98px) {
    .likert, .likert.cols-4 { grid-template-columns: 1fr; }
    .likert .opt label { flex-direction: row; justify-content: flex-start; min-height: 0; padding: .85rem 1rem; }
}
.player-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; gap: 1rem; }
.kbd-hint { font-size: .8rem; color: var(--faint); }
kbd { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-bottom-width: 2px; font-family: var(--font-display); font-size: .75rem; padding: .1rem .4rem; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .4rem; }
.palette button { height: 38px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--muted); }
.palette button.done { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-700); }
.palette button.here { outline: 2px solid var(--navy-900); outline-offset: 1px; color: var(--text); }
.palette button.missing { border-color: var(--coral-500); color: var(--coral-500); }

/* ---------------------------------------------------------- report */
.report-hero { background: var(--navy-900); color: #DCE6F4; border-radius: var(--radius-lg); padding: 2rem 2.25rem; position: relative; overflow: hidden; }
.report-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: .4rem 0 .4rem; }
.report-hero .who { color: #9FB4D3; }
.report-hero .grid-bg { position: absolute; right: -40px; top: -40px; width: 340px; opacity: .14; pointer-events: none; }
.report-hero .chip { background: rgba(255, 255, 255, .08); color: #DCE6F4; border-color: rgba(255, 255, 255, .14); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: rgba(255, 255, 255, .1); border-radius: var(--radius); overflow: hidden; margin-top: 1.75rem; }
.stat-strip > div { background: var(--navy-900); padding: 1rem 1.2rem; }
.stat-strip .lbl { font-size: .78rem; color: #8FA6C8; }
.stat-strip .val { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.section-title { font-size: 1.2rem; margin: 2.5rem 0 1rem; display: flex; align-items: center; gap: .6rem; }
.holland { display: flex; gap: .5rem; }
.holland span { width: 64px; height: 72px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; background: var(--navy-900); color: #fff; }
.holland span:first-child { background: var(--amber-500); color: var(--navy-950); }
.insight { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.insight:last-child { border-bottom: 0; }
.insight .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); flex-shrink: 0; }
.insight.dev .ico { background: var(--amber-100); color: var(--lvl-mid); }
.career { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.career:last-child { border-bottom: 0; }
.career-score { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps-list li { counter-increment: step; position: relative; padding: .8rem 0 .8rem 3rem; border-bottom: 1px solid var(--line); }
.steps-list li:last-child { border-bottom: 0; }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: .75rem; width: 30px; height: 30px; border-radius: 8px; background: var(--navy-900); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: .85rem; }
.disclaimer { font-size: .82rem; color: var(--muted); border-left: 3px solid var(--line-strong); padding: .25rem 0 .25rem 1rem; }

/* ---------------------------------------------------------- empty states / alerts */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty i { font-size: 2rem; color: var(--faint); display: block; margin-bottom: .75rem; }
.alert { border-radius: var(--radius); border: 1px solid transparent; }
.alert-success { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
.alert-danger { background: var(--coral-100); color: #9B2F33; border-color: transparent; }
.alert-info { background: var(--surface-2); color: var(--text); border-color: var(--line); }
[data-bs-theme="dark"] .alert-success { color: #9CCBF8; }
[data-bs-theme="dark"] .alert-danger { color: #F2A6A9; }

/* ---------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand { background: var(--navy-900); color: #C9D6EA; padding: 3rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-brand h2 { color: #fff; font-size: 2rem; max-width: 18ch; margin-top: auto; }
.auth-brand .quote { max-width: 46ch; margin: 1rem 0 2.5rem; color: #9FB4D3; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--surface); }
.auth-form .inner { width: 100%; max-width: 420px; }
.auth-constellation { position: absolute; right: -80px; top: 40px; width: 520px; opacity: .5; }
@media (max-width: 991.98px) { .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } }
.demo-box { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: .9rem 1rem; font-size: .85rem; }
.demo-box button { border: 0; background: none; color: var(--teal-600); font-weight: 600; padding: 0; }

/* ---------------------------------------------------------- landing */
.site-nav { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-nav .inner { max-width: 1240px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; gap: 2rem; }
.site-nav .brand { color: var(--navy-900); padding: 0; }
[data-bs-theme="dark"] .site-nav .brand { color: #fff; }
.site-nav .brand small { color: var(--muted); }
.site-nav nav a { color: var(--text); font-weight: 500; font-size: .93rem; margin-right: 1.5rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.hero { padding: 5rem 0 4rem; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.9rem); line-height: 1.04; letter-spacing: -0.045em; max-width: 15ch; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 52ch; margin: 1.5rem 0 2rem; }
.hero-proof { display: flex; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.hero-proof .num { font-size: 2rem; display: block; color: var(--navy-900); }
[data-bs-theme="dark"] .hero-proof .num { color: #fff; }
.hero-proof span:last-child { font-size: .85rem; color: var(--muted); }

.live-report { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-float); overflow: hidden; }
.live-report .lr-head { background: var(--navy-900); color: #fff; padding: 1.1rem 1.4rem; display: flex; justify-content: space-between; align-items: center; }
.live-report .lr-head small { color: #9FB4D3; display: block; font-size: .78rem; }
.live-report .lr-body { padding: 1.25rem 1.4rem 1.4rem; }
.radar-svg .grid { fill: none; stroke: var(--line); }
.radar-svg .axis { stroke: var(--line); }
.radar-svg .cohort { fill: none; stroke: var(--faint); stroke-dasharray: 4 4; stroke-width: 1.5; }
.radar-svg .you { fill: none; stroke: var(--teal-600); stroke-width: 2.5; stroke-linejoin: round;
    stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s .3s cubic-bezier(.65, 0, .35, 1) forwards; }
.radar-svg .you-fill { fill: rgba(20, 116, 216, .16); opacity: 0; animation: fadeIn .6s 1.6s forwards; }
.radar-svg .dot { fill: var(--amber-500); opacity: 0; animation: fadeIn .4s 1.8s forwards; }
.radar-svg text { font-family: var(--font-display); font-size: 11px; font-weight: 700; fill: var(--muted); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.lr-bars .row-b { display: grid; grid-template-columns: 110px 1fr 40px; gap: .75rem; align-items: center; font-size: .83rem; margin-bottom: .55rem; }
.lr-bars .fillbar { height: 8px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.lr-bars .fillbar > i { position: absolute; inset: 0 auto 0 0; background: var(--teal-600); border-radius: 999px; transform-origin: left; transform: scaleX(0); animation: grow 1s 1.2s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes grow { to { transform: scaleX(1); } }

.band { padding: 5rem 0; }
.band-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-navy { background: var(--navy-900); color: #C9D6EA; }
.band-navy h2, .band-navy h3 { color: #fff; }
.band h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); max-width: 22ch; line-height: 1.12; }
.band .intro { color: var(--muted); max-width: 60ch; font-size: 1.05rem; margin-top: 1rem; }
.band-navy .intro { color: #9FB4D3; }

.instrument-table { width: 100%; border-collapse: collapse; }
.instrument-table td { padding: 1.1rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.instrument-table td:first-child { width: 40%; }
.instrument-table .nm { font-family: var(--font-display); font-weight: 750; font-size: 1.05rem; }
.instrument-table .fw { font-size: .85rem; color: var(--muted); }

.audience h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.audience ul { list-style: none; padding: 0; margin: 0; }
.audience li { padding: .6rem 0 .6rem 1.75rem; position: relative; border-bottom: 1px solid var(--line); font-size: .95rem; }
.audience li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .6rem; color: var(--teal-600); }
.band-navy .audience li { border-color: rgba(255, 255, 255, .1); }

.metric-def { border-top: 2px solid var(--navy-900); padding-top: 1rem; }
[data-bs-theme="dark"] .metric-def { border-color: var(--teal-500); }
.metric-def h3 { font-size: 1.05rem; }
.metric-def p { color: var(--muted); font-size: .93rem; margin: 0; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: flow; }
.flow > div { padding: 1.5rem 1.5rem 1.5rem 0; border-top: 1px solid rgba(255, 255, 255, .15); counter-increment: flow; }
.flow > div::before { content: counter(flow, decimal-leading-zero); font-family: var(--font-display); font-weight: 800; color: var(--amber-500); display: block; margin-bottom: .75rem; }
.flow h3 { font-size: 1.1rem; }
.flow p { color: #9FB4D3; font-size: .93rem; margin: 0; }
@media (max-width: 991.98px) { .flow { grid-template-columns: 1fr 1fr; } }

.price { padding: 2rem; height: 100%; display: flex; flex-direction: column; }
.price .tier { font-family: var(--font-display); font-weight: 750; }
.price .amt { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; margin: .75rem 0 .25rem; }
.price .amt small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; flex-grow: 1; }
.price li { padding: .4rem 0; font-size: .93rem; }
.price li i { color: var(--teal-600); margin-right: .5rem; }
.price.featured { border: 2px solid var(--navy-900); position: relative; }
.price.featured .flag { position: absolute; top: -12px; left: 2rem; background: var(--amber-500); color: var(--navy-950); font-weight: 800; font-family: var(--font-display); font-size: .75rem; padding: .2rem .7rem; border-radius: 999px; }

.site-foot { padding: 3rem 0; font-size: .88rem; color: var(--muted); }

/* ---------------------------------------------------------- print */
@media print {
    body { background: #fff; font-size: 12px; }
    .sidebar, .topbar, .d-print-none, .site-nav { display: none !important; }
    .content { padding: 0; max-width: 100%; }
    .panel { break-inside: avoid; border-color: #ccc; }
    .report-hero, .stat-strip > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .section-title { break-after: avoid; }
}

/* ---------------------------------------------------------- e-OsTech logo */
.brand-logo { display: block; height: 40px; width: auto; }
.brand-plate {
    display: block; background: #fff; border-radius: 12px; padding: .55rem .75rem;
    box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .5); margin: 0 .25rem;
}
.brand-plate:hover { text-decoration: none; }
.brand-plate .brand-logo { height: auto; width: 100%; max-width: 200px; }
.brand-caption { font-size: .72rem; font-weight: 600; color: #8FA6C8; padding: .6rem .6rem .25rem; }
.auth-brand .brand-plate { padding: .7rem 1rem; }
.auth-brand .brand-plate .brand-logo { width: 240px; max-width: 100%; }
.site-brand .brand-logo { height: 46px; }
[data-bs-theme="dark"] .site-brand { background: #fff; border-radius: 10px; padding: 3px 8px; }
.foot-logo .brand-logo { height: 30px; }
[data-bs-theme="dark"] .foot-logo { background: #fff; border-radius: 8px; padding: 2px 6px; }
.player-mark { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.print-head { display: none; }
@media print {
    .print-head { display: flex !important; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 2px solid #022557; }
    .print-head .brand-logo { height: 42px; }
}

/* inline code in brand colours (Bootstrap default is pink) */
code { color: var(--teal-700); background: var(--teal-50); padding: .05rem .35rem; border-radius: 4px; font-size: .86em; }
[data-bs-theme="dark"] code { color: #9CCBF8; }
pre code { background: none; padding: 0; }
