/* Fialka AI 2.0 — interactive prototype */
:root {
  color-scheme: dark;
  --bg: #0b1123;
  --sidebar: #0e162c;
  --surface: #131d35;
  --surface-raised: #1a2641;
  --surface-hover: #202e4b;
  --surface-input: #0d172d;
  --border: rgba(175, 188, 229, .14);
  --border-strong: rgba(183, 194, 231, .25);
  --text: #f0f2fc;
  --text-secondary: #c7cde2;
  --muted: #adb5cf;
  --subtle: #9ba6c3;
  --purple: #bcacf3;
  --purple-bright: #c2b0fa;
  --purple-dark: #967cd7;
  --green: #9bd2ba;
  --amber: #edc78f;
  --red: #efafbd;
  --on-accent: #18142a;
  --radius: 18px;
  --shadow: 0 16px 46px rgba(1, 7, 20, .19), 0 1px 0 rgba(235, 240, 255, .025) inset;
  --space-page: 32px;
  --font-body: 15px;
  --font-secondary: 14px;
  --font-micro: 12px;
}

* { box-sizing: border-box; }
html { min-width: 360px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; color: var(--text); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; }
h1 { margin-bottom: 9px; font-size: clamp(26px, 2.35vw, 34px); font-weight: 580; letter-spacing: -.95px; }
h2 { font-size: 22px; font-weight: 580; letter-spacing: -.35px; }
h3 { font-size: 16px; font-weight: 570; letter-spacing: -.2px; }
p { margin-bottom: 14px; }
::selection { background: rgba(166, 137, 250, .3); color: #fff; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #33314a; border-radius: 6px; }

.app-layout { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column; width: 244px; padding: 32px 18px 22px; background: linear-gradient(160deg, rgba(106, 65, 156, .07), transparent 45%), var(--sidebar); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 14px 43px; font-size: 28px; line-height: 1; font-weight: 460; letter-spacing: -.95px; }
.brand-mark { position: relative; display: grid; place-items: center; width: 32px; height: 36px; color: var(--purple); }
.brand-mark svg { width: 32px; height: 36px; }
.brand-name { color: #eee9ff; }
.brand-version { margin-left: 1px; align-self: center; padding: 4px 5px 3px; color: var(--purple); background: rgba(166, 137, 250, .1); border: 1px solid rgba(166, 137, 250, .16); border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .2px; line-height: 1; }
.nav-group-label { margin: 12px 14px 13px; color: var(--subtle); font-size: 12px; font-weight: 650; letter-spacing: 1.7px; text-transform: uppercase; }
.nav-button { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 46px; padding: 10px 14px; margin-bottom: 5px; color: #a5a1ba; border: 1px solid transparent; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 470; text-align: left; transition: background .18s, color .18s, border-color .18s; }
.nav-button svg { width: 19px; height: 19px; opacity: .8; stroke-width: 1.65; }
.nav-button:hover { color: #e1d8fa; background: rgba(166, 137, 250, .055); }
.nav-button.active { color: #c6b2ff; border-color: rgba(166, 137, 250, .13); background: linear-gradient(90deg, rgba(166, 137, 250, .15), rgba(166, 137, 250, .07)); }
.nav-button.active::before { content: ""; position: absolute; top: 13px; bottom: 13px; left: -19px; width: 3px; border-radius: 0 3px 3px 0; background: var(--purple); box-shadow: 0 0 16px rgba(166, 137, 250, .3); }
.nav-button.active svg { opacity: 1; }
.nav-button .nav-count { margin-left: auto; min-width: 20px; padding: 0 5px; border-radius: 4px; color: #c4b2f4; background: #302747; font-size: 13px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding-top: 28px; }
.workspace-pill { display: flex; align-items: center; gap: 9px; margin: 0 7px 19px; padding: 13px 8px; border-top: 1px solid var(--border); color: #c4bfd9; font-size: 15px; }
.workspace-pill > svg { color: var(--purple); }
.workspace-pill small { display: block; color: var(--subtle); font-size: 13px; line-height: 1.8; }
.sidebar-note { padding: 0 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.main-area { width: calc(100% - 244px); margin-left: 244px; background: radial-gradient(ellipse at 20% 0%, rgba(98, 63, 156, .065), transparent 38%), var(--bg); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 15px; height: 82px; padding: 0 34px; border-bottom: 1px solid var(--border); background: rgba(11, 11, 23, .87); backdrop-filter: blur(20px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.breadcrumb span { color: #d8d2e9; }
.breadcrumb svg { width: 13px; height: 13px; color: var(--subtle); }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid rgba(166, 137, 250, .16); border-radius: 5px; color: #b6a1e1; background: rgba(166, 137, 250, .055); font-size: 13px; letter-spacing: .05px; }
.demo-badge::before { content: ""; width: 4px; height: 4px; background: #b69af3; border-radius: 50%; }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; padding: 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); transition: .18s; }
.icon-button:hover { border-color: var(--border); background: var(--surface); color: var(--text); }
.notification-dot { position: absolute; right: 8px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); border: 1px solid var(--bg); }
.user-button { display: flex; align-items: center; gap: 9px; padding: 0 0 0 13px; border: 0; border-left: 1px solid var(--border); background: transparent; color: #cdc6e0; font-size: 15px; }
.user-button > svg { width: 12px; color: var(--subtle); }
.avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid rgba(207, 186, 255, .18); border-radius: 50%; background: linear-gradient(145deg, #46365f, #28243e); color: #cfc0f4; font-size: 14px; font-weight: 650; }
.avatar.small { width: 26px; height: 26px; font-size: 12px; }
main#content { max-width: 1550px; margin: 0 auto; padding: 33px 34px 42px; animation: page-enter .3s ease both; }
@keyframes page-enter { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.eyebrow { margin-bottom: 8px; color: var(--purple); font-size: 12px; font-weight: 650; letter-spacing: 1.75px; text-transform: uppercase; }
.heading-actions { display: flex; flex-shrink: 0; gap: 9px; padding-bottom: 1px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 15px; border: 1px solid var(--border-strong); border-radius: 8px; color: #d6cfe6; background: #1c1b2d; font-size: 15px; font-weight: 550; line-height: 1.5; white-space: nowrap; transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
.button svg { width: 16px; height: 16px; }
.button:hover { background: #26243b; border-color: rgba(211, 207, 248, .25); transform: translateY(-1px); }
.button.primary { color: var(--muted); background: #b49af3; border-color: #b49af3; box-shadow: 0 3px 14px rgba(159, 118, 240, .09); }
.button.primary:hover { color: var(--muted); background: #c5affb; border-color: #c5affb; box-shadow: 0 5px 22px rgba(159, 118, 240, .19); }
.button.secondary { color: #d8d0ec; border-color: #3e374f; background: rgba(158, 130, 209, .08); }
.button.secondary:hover { background: rgba(158, 130, 209, .14); border-color: #5d4b78; }
.button.ghost { padding-left: 0; padding-right: 0; border-color: transparent; color: #b5a4d7; background: transparent; box-shadow: none; }
.button.ghost:hover { color: #d8c8ff; background: transparent; transform: none; }
.button.small { min-height: 31px; padding: 6px 11px; font-size: 14px; }
.button.danger { color: #ffc3cb; background: rgba(174, 71, 93, .14); border-color: rgba(220, 110, 132, .2); }
.button.danger:hover { background: rgba(174, 71, 93, .25); }
.button.full-width { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid transparent; border-radius: 5px; color: #b6b1c8; background: #242237; font-size: 12px; font-weight: 550; line-height: 1.6; white-space: nowrap; }
.badge svg { width: 11px; height: 11px; }
.badge.purple { color: #c2adf3; border-color: rgba(166, 137, 250, .15); background: rgba(166, 137, 250, .1); }
.badge.green { color: #91cdb5; border-color: rgba(130, 201, 172, .12); background: rgba(74, 152, 121, .1); }
.badge.amber { color: #dbb57c; border-color: rgba(232, 188, 125, .13); background: rgba(232, 188, 125, .08); }
.badge.neutral { color: #aaa4bd; border-color: var(--border); background: rgba(163, 154, 186, .045); }
.badge.red { color: var(--red); background: rgba(239, 156, 170, .08); border-color: rgba(239, 156, 170, .15); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); gap: 19px; margin-bottom: 20px; }
.hero-card { position: relative; display: flex; overflow: hidden; min-height: 270px; padding: 26px 27px 0; border: 1px solid rgba(177, 146, 237, .19); border-radius: var(--radius); background: radial-gradient(ellipse at 87% 20%, rgba(139, 96, 204, .17), transparent 59%), linear-gradient(120deg, #1c182b, #191525 60%, #1f1931); }
.hero-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(210, 172, 255, .4), transparent); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; width: 67%; padding-bottom: 23px; }
.hero-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.hero-title { max-width: 360px; margin: 0 0 11px; font-size: clamp(22px, 2vw, 30px); font-weight: 550; line-height: 1.25; letter-spacing: -.6px; }
.hero-copy > p { max-width: 305px; margin-bottom: 20px; color: #a59ab9; font-size: 15px; line-height: 1.65; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 21px; color: #b7accb; font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta svg { width: 13px; height: 13px; color: var(--muted); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: auto; }
.hero-actions .button.ghost { font-size: 14px; }
.hero-art { position: absolute; z-index: 1; right: -8px; top: 26px; width: 43%; height: 205px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.hero-art > svg { width: 100%; height: 100%; filter: drop-shadow(0 15px 28px rgba(0, 0, 0, .2)); }
.hero-art > img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hero-foot { position: absolute; left: 27px; right: 27px; bottom: 17px; padding-top: 12px; border-top: 1px solid rgba(211, 184, 255, .08); color: var(--muted); font-size: 13px; }
.hero-card:has(.hero-foot) .hero-copy { padding-bottom: 53px; }
.compass-card { position: relative; overflow: hidden; padding: 22px 22px 17px; border: 1px solid var(--border); border-radius: var(--radius); background: radial-gradient(ellipse at 50% 72%, rgba(127, 99, 185, .07), transparent 66%), var(--surface); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-header h3 { margin: 0; font-size: 16px; }
.card-header > span { color: var(--subtle); font-size: 13px; }
.compass-visual { position: relative; height: 177px; margin: 8px auto 0; display: flex; align-items: center; justify-content: center; }
.compass-visual > svg { width: 230px; max-width: 100%; height: 182px; overflow: visible; }
.compass-label { color: #aaa1bd; text-align: center; font-size: 13px; }
.compass-label strong { font-weight: 550; color: #cfc0e7; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card { display: grid; grid-template-columns: 1fr auto; align-content: start; padding: 21px 22px 20px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.stat-icon { grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(166, 137, 250, .075); color: #ad95d5; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { display: flex; align-items: baseline; gap: 6px; color: #ebe5fb; font-size: 32px; font-weight: 510; line-height: 1.2; letter-spacing: -.8px; }
.stat-value small { font-size: 16px; letter-spacing: -.1px; color: var(--muted); font-weight: 450; }
.stat-label { margin-top: 5px; color: #a69eb8; font-size: 14px; }
.stat-change { grid-column: 1 / -1; margin-top: 17px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.stat-change strong { margin-right: 5px; color: #91c3ab; font-size: 13px; font-weight: 550; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(285px, 1fr); gap: 20px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 13px; min-height: 65px; padding: 20px 22px 17px; border-bottom: 1px solid var(--border); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 16px; font-weight: 550; letter-spacing: -.1px; }
.panel-header .button.ghost { min-height: 0; padding: 0; font-size: 13px; }
.panel-header > p, .panel-header > span { margin: 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 21px 22px; }
.panel-body > :last-child { margin-bottom: 0; }
.report-row { display: flex; align-items: center; gap: 13px; min-height: 84px; padding: 16px 22px; border-bottom: 1px solid var(--border); transition: background .18s; }
.report-row:last-child { border-bottom: 0; }
.report-row:hover { background: rgba(166, 137, 250, .035); }
.report-row[data-action], button.report-row { cursor: pointer; }
button.report-row { width: 100%; border-top: 0; border-left: 0; border-right: 0; color: inherit; background: none; text-align: left; }
.report-icon { display: grid; place-items: center; flex-shrink: 0; width: 39px; height: 42px; border: 1px solid rgba(166, 137, 250, .11); border-radius: 8px; background: rgba(166, 137, 250, .07); color: #ad95d8; }
.report-icon svg { width: 19px; height: 19px; }
.report-info { flex: 1; min-width: 0; }
.report-info h3, .report-info strong { display: block; margin: 0 0 3px; color: #d8d0e7; font-size: 15px; font-weight: 500; }
.report-info p, .report-info small { display: block; margin: 0; color: var(--muted); font-size: 13px; }
.report-score { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid rgba(130, 201, 172, .17); border-radius: 50%; color: #9fceb7; background: rgba(130, 201, 172, .04); font-size: 15px; font-weight: 600; }
.report-score.amber { color: var(--amber); border-color: rgba(232, 188, 125, .2); background: rgba(232, 188, 125, .04); }
.row-arrow { margin-left: 3px; color: var(--muted); }
.row-arrow svg { width: 15px; height: 15px; }
.skill-row { margin-bottom: 18px; }
.skill-row:last-child { margin-bottom: 0; }
.skill-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; color: #b4aac7; }
.skill-row strong { color: #d6c5ee; font-size: 13px; font-weight: 500; }
.progress-track { overflow: hidden; width: 100%; height: 5px; border-radius: 5px; background: #272235; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8f6ec6, #c1a3f0); transition: width .45s ease; }
.progress-track.green > span { background: linear-gradient(90deg, #548d7b, #8cc3aa); }
.progress-note { margin: 19px 0 0; padding-top: 17px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; line-height: 1.7; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 26px 0 16px; }
.section-title h2, h2.section-title { margin: 0; font-size: 16px; letter-spacing: -.2px; }
.section-title p { margin: 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; align-items: center; gap: 6px; width: fit-content; padding: 4px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 10px; background: #11111e; }
.tab { min-height: 32px; padding: 7px 15px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; transition: .18s; white-space: nowrap; }
.tab:hover { color: #d7cceb; }
.tab.active { border-color: rgba(166, 137, 250, .13); color: #d2c3ee; background: #272136; box-shadow: 0 2px 7px rgba(0, 0, 0, .1); }
.tab .count { margin-left: 5px; color: var(--muted); font-size: 12px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.case-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: transform .2s, border-color .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-3px); border-color: rgba(166, 137, 250, .25); box-shadow: var(--shadow); }
.case-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 145px; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(ellipse at 50% 100%, rgba(123, 85, 184, .15), transparent 60%), #181523; }
.case-visual > svg { width: 100%; height: 145px; }
.case-visual .badge { position: absolute; top: 15px; left: 16px; }
.case-visual.chips { background: radial-gradient(ellipse at 70% 40%, #3e2b3a, #211726 60%, #191521); }
.case-visual.cloud { background: radial-gradient(ellipse at 60% 30%, #252d45, #171b2a 65%); }
.case-visual.people { background: radial-gradient(ellipse at 50% 35%, #2a2345, #1a152b 65%); }
.case-body { flex: 1; padding: 20px; }
.case-body h3 { margin-bottom: 9px; font-size: 16px; }
.case-body p { margin-bottom: 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.case-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.case-meta span { display: inline-flex; align-items: center; gap: 4px; }
.case-meta svg { width: 12px; height: 12px; color: var(--muted); }
.case-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--border); }
.case-footer > span { color: var(--muted); font-size: 13px; }
.list-card { padding: 20px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.session-list { display: grid; gap: 12px; }
.session-row { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.session-row .session-date { display: flex; align-items: center; justify-content: center; flex-direction: column; flex-shrink: 0; width: 53px; height: 57px; border: 1px solid rgba(166, 137, 250, .12); border-radius: 8px; background: rgba(166, 137, 250, .06); color: #bcaae0; font-size: 13px; line-height: 1.2; }
.session-date strong { margin-bottom: 3px; font-size: 24px; font-weight: 500; }
.session-details { flex: 1; }
.session-details h3 { margin-bottom: 6px; font-size: 16px; }
.session-details p { margin: 0; color: var(--muted); font-size: 14px; }
.session-row > .button { margin-left: auto; }
.empty-state { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; min-height: 250px; padding: 45px 25px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: rgba(166, 137, 250, .02); text-align: center; }
.empty-state > svg { width: 38px; height: 38px; margin-bottom: 12px; color: var(--muted); stroke-width: 1.3; }
.empty-state h3 { margin: 0; color: #c4b7d8; }
.empty-state p { max-width: 390px; margin: 0 0 10px; color: var(--muted); font-size: 15px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { color: #b6a9c8; font-size: 14px; font-weight: 500; }
.field label .required { color: var(--purple); }
.field input, .field select, .field textarea, .input-row input, .input-row textarea, .search-input { width: 100%; min-width: 0; min-height: 41px; padding: 10px 12px; color: #ded3ed; border: 1px solid #383044; border-radius: 7px; background: #12101d; font-size: 15px; transition: border-color .18s, box-shadow .18s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #4b3e5c; }
.field input:focus, .field select:focus, .field textarea:focus, .input-row input:focus, .input-row textarea:focus { border-color: #9472bd; box-shadow: 0 0 0 3px rgba(166, 137, 250, .06); }
.field input::placeholder, .field textarea::placeholder, .input-row input::placeholder, .input-row textarea::placeholder, .search-input::placeholder { color: var(--muted); }
.field textarea { min-height: 90px; resize: vertical; }
.field select { padding-right: 28px; }
.field small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.field input[type="checkbox"], .field input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--purple); }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 14px; }
.checkbox-label input { margin-top: 3px; accent-color: var(--purple); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4, 3, 10, .74); backdrop-filter: blur(7px); animation: modal-backdrop .18s ease both; }
@keyframes modal-backdrop { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 575px; max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid #3c2d4b; border-radius: 17px; background: radial-gradient(ellipse at 100% 0%, rgba(142, 91, 193, .1), transparent 55%), #18131f; box-shadow: 0 35px 140px rgba(0, 0, 0, .65); animation: modal-enter .22s ease both; }
@keyframes modal-enter { from { transform: translateY(12px) scale(.99); } to { transform: none; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 19px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin-bottom: 6px; font-size: 24px; letter-spacing: -.5px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 15px; }
.modal-header .icon-button { margin: -4px -7px 0 0; }
.modal-body { padding: 24px 26px; }
.modal-body > p { color: var(--muted); font-size: 15px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 26px; border-top: 1px solid var(--border); background: rgba(0, 0, 0, .07); }
.toast { position: fixed; right: 28px; bottom: 27px; z-index: 150; display: flex; align-items: center; gap: 10px; max-width: min(430px, calc(100vw - 40px)); padding: 14px 18px; border: 1px solid rgba(166, 137, 250, .3); border-radius: 11px; color: #ddd0f1; background: #252035; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); font-size: 15px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 17px; height: 17px; color: #b89fdb; }
.toast.success { border-color: rgba(130, 201, 172, .3); }
.toast.success svg { color: var(--green); }

.brief-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.brief-content { padding: 27px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.brief-section { margin-bottom: 27px; padding-bottom: 25px; border-bottom: 1px solid var(--border); }
.brief-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.brief-section h2 { margin-bottom: 13px; font-size: 18px; }
.brief-section h3 { margin-bottom: 10px; font-size: 16px; }
.brief-section p, .brief-section li { color: #a49ab7; font-size: 15px; line-height: 1.85; }
.brief-section strong { color: #c7b8de; font-weight: 550; }
.brief-section ul { padding-left: 17px; margin-bottom: 0; }
.role-card { padding: 22px; border: 1px solid rgba(166, 137, 250, .2); border-radius: var(--radius); background: linear-gradient(140deg, rgba(166, 137, 250, .08), transparent 75%), var(--surface); }
.role-card .eyebrow { margin-bottom: 12px; }
.role-card h3 { margin-bottom: 9px; font-size: 20px; }
.role-card p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.role-card .button { width: 100%; margin-top: 12px; }
.info-box { display: flex; align-items: flex-start; gap: 10px; padding: 14px 15px; border: 1px solid rgba(166, 137, 250, .13); border-radius: 9px; color: var(--muted); background: rgba(166, 137, 250, .045); font-size: 14px; line-height: 1.75; }
.info-box svg { width: 16px; height: 16px; margin-top: 2px; color: #ad94d0; }
.info-box p { margin: 0; }
.info-box.amber { color: #bfa887; border-color: rgba(232, 188, 125, .15); background: rgba(232, 188, 125, .04); }
.info-box.amber svg { color: var(--amber); }
.key-value { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.key-value:last-child { border-bottom: 0; }
.key-value strong { max-width: 65%; color: #c7b9d9; font-weight: 500; text-align: right; }
.goal-list { display: grid; gap: 11px; list-style: none; padding: 0; margin: 0; }
.goal-list li { display: flex; align-items: flex-start; gap: 8px; color: #aaa0bb; font-size: 15px; line-height: 1.7; }
.goal-list li::before { content: "✓"; margin-top: 1px; color: var(--muted); font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 0; margin: 0 0 24px; }
.step { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; padding: 14px 10px 14px 0; border-bottom: 2px solid #292132; color: var(--muted); font-size: 14px; }
.step span:first-child, .step .step-number { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #3c3049; border-radius: 50%; color: var(--muted); background: #1c1625; font-size: 13px; }
.step.active { color: #d4c0ee; border-bottom-color: #af8cd9; }
.step.active span:first-child, .step.active .step-number { color: var(--muted); border-color: #b89adf; background: #b89adf; }
.step.done { color: #9baa9f; border-bottom-color: #5b8674; }
.step.done span:first-child, .step.done .step-number { color: #9fc7b0; border-color: #456756; background: #1e2c24; }

.room-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.video-tile { position: relative; display: flex; align-items: center; justify-content: center; min-height: 300px; overflow: hidden; border: 1px solid #3d304d; border-radius: 15px; background: radial-gradient(ellipse at 40% 35%, #30233e, #17121e 75%); }
.video-tile:nth-child(2) { background: radial-gradient(ellipse at 60% 35%, #232c3c, #111721 75%); border-color: #2b3b48; }
.video-person { display: flex; align-items: center; justify-content: center; width: 94px; height: 94px; border: 1px solid rgba(208, 178, 245, .14); border-radius: 50%; color: #c0a1dc; background: linear-gradient(140deg, #50385c, #32233c); box-shadow: 0 0 0 17px rgba(153, 110, 181, .035), 0 15px 55px rgba(0, 0, 0, .2); font-size: 32px; font-weight: 400; }
.video-tile:nth-child(2) .video-person { border-color: rgba(157, 192, 219, .15); background: linear-gradient(140deg, #344957, #24313f); color: #9cb9cd; box-shadow: 0 0 0 17px rgba(110, 151, 181, .035), 0 15px 55px rgba(0, 0, 0, .2); }
.video-person svg { width: 60px; height: 60px; }
.video-name { position: absolute; left: 13px; bottom: 13px; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 5px; color: #c9b6d6; background: rgba(11, 8, 17, .6); font-size: 13px; }
.video-name svg { width: 12px; height: 12px; }
.video-status { position: absolute; top: 13px; right: 13px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.video-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #89b79c; box-shadow: 0 0 10px rgba(130, 201, 172, .15); }
.room-controls { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 14px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: #14101d; }
.room-controls .icon-button { width: 39px; height: 37px; border: 1px solid #34293e; background: #211a2b; color: #bba8ce; }
.room-controls .icon-button.off { color: #d398a7; border-color: #593443; background: #33202a; }
.room-controls .button { margin-left: 8px; }
.room-controls .separator { width: 1px; height: 24px; margin: 0 6px; background: #382c42; }
.room-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 15px 1px; color: var(--muted); font-size: 13px; }
.room-status > span { display: flex; align-items: center; gap: 6px; }
.recording-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #df8e9d; box-shadow: 0 0 0 3px rgba(223, 142, 157, .07); animation: recording-pulse 2s infinite; }
@keyframes recording-pulse { 50% { opacity: .45; } }
.room-side { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.room-tabs { display: flex; border-bottom: 1px solid var(--border); }
.room-tab { flex: 1; padding: 16px 7px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 13px; }
.room-tab:hover { color: #c7b4db; }
.room-tab.active { color: #c8a9e6; border-bottom-color: #ac8ad1; background: rgba(166, 137, 250, .035); }
.room-side-content { padding: 20px; }
.note-list { display: grid; gap: 12px; padding: 18px; }
.note-item { padding: 13px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: #18131f; font-size: 14px; line-height: 1.75; }
.note-item strong { display: block; margin-bottom: 5px; color: #c3acd5; font-size: 14px; font-weight: 550; }
.note-item .note-time { margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.chat-messages { display: flex; flex-direction: column; gap: 12px; min-height: 282px; max-height: 400px; padding: 20px; overflow-y: auto; }
.chat-message { align-self: flex-start; max-width: 90%; padding: 11px 13px; border: 1px solid #302639; border-radius: 1px 10px 10px 10px; background: #1e1726; color: #b7a3c6; font-size: 14px; line-height: 1.75; }
.chat-message.mine { align-self: flex-end; border-color: #4e385e; border-radius: 10px 1px 10px 10px; background: #2c1f39; color: #d0b8e6; }
.chat-message small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.chat-message.mine small { color: var(--muted); }
.chat-message p { margin: 0; }
.input-row { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-top: 1px solid var(--border); }
.input-row .button { width: 35px; min-height: 37px; padding: 8px; }
.input-row .button svg { width: 15px; height: 15px; }
.input-row textarea { resize: none; }

.contract-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.contract-fields { display: grid; gap: 0; padding: 4px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.contract-field { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 1.2fr); align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contract-field:last-child { border-bottom: 0; }
.contract-field > label, .contract-field > div:first-child { color: #b3a2c5; font-size: 15px; }
.contract-field small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.contract-field input, .contract-field select { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #3d2e49; border-radius: 7px; color: #d7bce9; background: #120d18; font-size: 15px; }
.contract-field .field { gap: 4px; }
.approval-card { padding: 22px; border: 1px solid rgba(166, 137, 250, .16); border-radius: var(--radius); background: linear-gradient(160deg, rgba(166, 137, 250, .06), transparent 70%), var(--surface); }
.approval-card h3 { margin-bottom: 17px; font-size: 16px; }
.approval-row { display: flex; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.approval-row .avatar { width: 29px; height: 29px; font-size: 13px; }
.approval-row > div:not(.avatar):not(.status-icon) { flex: 1; font-size: 14px; color: #c0a6d1; }
.approval-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.status-icon { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #3c2c47; border-radius: 50%; color: var(--muted); }
.status-icon svg { width: 12px; height: 12px; }
.status-icon.done { border-color: #42634f; color: #9fceb3; background: rgba(130, 201, 172, .07); }
.approval-card .button { width: 100%; margin-top: 20px; }
.approval-card .info-box { margin-top: 15px; font-size: 13px; }

.report-hero { display: flex; align-items: center; gap: 28px; padding: 27px 30px; margin-bottom: 23px; overflow: hidden; border: 1px solid rgba(166, 137, 250, .18); border-radius: var(--radius); background: radial-gradient(ellipse at 100% 10%, rgba(138, 87, 190, .12), transparent 60%), #1b1424; }
.report-hero .report-hero-copy { flex: 1; }
.report-hero h2 { margin: 7px 0 8px; font-size: 24px; letter-spacing: -.6px; }
.report-hero p { max-width: 660px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.score-circle { display: flex; align-items: center; justify-content: center; flex-direction: column; flex-shrink: 0; width: 105px; height: 105px; border: 5px solid #b79add; border-right-color: #382944; border-radius: 50%; color: #e7d7f7; background: rgba(166, 137, 250, .025); font-size: 34px; font-weight: 450; line-height: 1.2; transform: rotate(-30deg); }
.score-circle > * { transform: rotate(30deg); }
.score-circle span { font-size: 34px; letter-spacing: -1.8px; }
.score-circle small { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(285px, 1fr); gap: 21px; align-items: start; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.metric { padding: 18px 17px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.metric label, .metric > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-bottom: 6px; color: #dfcbee; font-size: 26px; font-weight: 450; line-height: 1.2; letter-spacing: -.6px; }
.metric small { color: var(--muted); font-size: 12px; }
.evidence-card { margin-bottom: 13px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.evidence-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 15px; }
.evidence-card p { margin-bottom: 11px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.evidence-card blockquote { margin: 13px 0; padding: 10px 13px; border-left: 2px solid #8d6aab; border-radius: 0 6px 6px 0; color: #baa1cd; background: rgba(166, 137, 250, .04); font-size: 14px; font-style: italic; line-height: 1.8; }
.evidence-card .evidence-footer { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 12px; }
.timeline-item { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.time-code { flex-shrink: 0; margin-top: 1px; padding: 3px 6px; border: 1px solid #3a2947; border-radius: 4px; color: #b493cc; background: rgba(166, 137, 250, .055); font-size: 13px; font-variant-numeric: tabular-nums; }
.timeline-item h4 { margin-bottom: 5px; color: #cbb1dc; font-size: 14px; font-weight: 500; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.chart-panel { padding: 22px 24px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.chart-panel h3 { margin-bottom: 22px; font-size: 16px; }
.chart-panel > svg, .chart-container > svg { display: block; width: 100%; height: auto; min-height: 190px; overflow: visible; }
.chart-container { min-width: 0; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding-top: 17px; color: var(--muted); font-size: 13px; }
.chart-legend > span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; background: #bc91db; }
.learning-card { display: flex; align-items: center; gap: 18px; padding: 20px 22px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .18s, background .18s; }
.learning-card:hover { border-color: rgba(166, 137, 250, .24); background: #1a1422; }
.learning-card > .learning-icon { display: grid; place-items: center; flex-shrink: 0; width: 47px; height: 49px; border: 1px solid #3a2949; border-radius: 9px; background: #241a2f; color: var(--muted); }
.learning-card > div:not(.learning-icon) { flex: 1; min-width: 0; }
.learning-card h3 { margin-bottom: 6px; font-size: 15px; }
.learning-card p { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.learning-card small { color: var(--muted); font-size: 13px; }
.learning-card .button { flex-shrink: 0; }
.test-card { padding: 23px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.test-card.done { border-color: rgba(130, 201, 172, .17); background: linear-gradient(140deg, rgba(130, 201, 172, .04), transparent), var(--surface); }
.test-card .badge { margin-bottom: 15px; }
.test-card h3 { margin-bottom: 10px; font-size: 16px; line-height: 1.45; }
.test-card p { min-height: 49px; margin-bottom: 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.test-card .test-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; color: var(--muted); font-size: 13px; }
.test-options { display: grid; gap: 10px; }
.test-options button, .test-options label { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 15px; border: 1px solid #3a2a45; border-radius: 8px; color: #b79dc9; background: #1d1525; font-size: 15px; text-align: left; transition: .18s; cursor: pointer; }
.test-options button:hover, .test-options label:hover { border-color: #806091; background: #2a1c35; }
.test-options button.selected, .test-options label:has(input:checked) { border-color: #b58ad2; color: #dcc2ee; background: #34203f; }
.test-options input { accent-color: var(--purple); }
.admin-table { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.admin-table table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.admin-table th { padding: 14px 19px; border-bottom: 1px solid var(--border); color: var(--muted); background: rgba(0, 0, 0, .08); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .8px; }
.admin-table td { padding: 16px 19px; border-bottom: 1px solid var(--border); color: #b39dc3; font-size: 14px; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(166, 137, 250, .025); }
.admin-table td strong { color: #d0b8df; font-weight: 500; }
.admin-table .avatar { margin-right: 8px; }
.admin-table .button { font-size: 13px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.filter-bar .tabs { margin: 0; }
.search-input { width: 250px; min-height: 38px; border-color: var(--border-strong); background: var(--surface); font-size: 14px; }

.muted { color: var(--muted) !important; }
.accent { color: var(--purple) !important; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.flex { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 19px; min-width: 0; }
.hidden, [hidden] { display: none !important; }
.full-width { width: 100%; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-small { font-size: 14px; }
.text-center { text-align: center; }
.divider { height: 1px; margin: 20px 0; background: var(--border); }
.kbd { padding: 2px 5px; border: 1px solid #45324f; border-radius: 4px; color: var(--muted); font-size: 12px; }
.mobile-menu { display: none; }

@media (min-width: 1600px) {
  .sidebar { width: 242px; padding-left: 23px; padding-right: 23px; }
  .main-area { width: calc(100% - 242px); margin-left: 242px; }
  .nav-button.active::before { left: -24px; }
  .topbar { padding-left: 42px; padding-right: 42px; }
  main#content { padding: 38px 42px 55px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(310px, 1fr); }
  .hero-card { min-height: 292px; padding: 30px 32px 0; }
  .hero-title { max-width: 430px; font-size: 32px; }
  .hero-copy > p { max-width: 390px; font-size: 15px; }
  .hero-art { top: 30px; height: 227px; }
  .compass-visual { height: 199px; }
  .compass-visual > svg { height: 198px; }
  .stats-grid { margin-bottom: 30px; }
  .stat-card { padding: 24px; }
  .stat-value { font-size: 34px; }
  .stat-label { font-size: 15px; }
}

@media (max-width: 1180px) {
  .sidebar { width: 244px; padding-left: 12px; padding-right: 12px; }
  .brand { padding-left: 13px; padding-right: 7px; font-size: 26px; gap: 7px; }
  .brand-mark, .brand-mark svg { width: 29px; }
  .nav-button { gap: 11px; padding-left: 13px; padding-right: 10px; font-size: 15px; }
  .nav-button.active::before { left: -13px; }
  .main-area { width: calc(100% - 244px); margin-left: 244px; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  main#content { padding-left: 26px; padding-right: 26px; }
  .hero-card { padding-left: 23px; }
  .hero-title { font-size: 28px; }
  .hero-copy { width: 72%; }
  .hero-art { width: 41%; right: -18px; opacity: .9; }
  .hero-actions { gap: 7px; }
  .hero-actions .button { font-size: 13px; }
  .dashboard-grid { gap: 15px; grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); }
  .compass-card { padding-left: 18px; padding-right: 18px; }
  .stats-grid { gap: 14px; }
  .stat-card { padding-left: 18px; padding-right: 18px; }
  .lower-grid { grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); gap: 15px; }
  .panel-header, .panel-body { padding-left: 19px; padding-right: 19px; }
  .report-row { padding-left: 19px; padding-right: 19px; gap: 10px; }
  .report-info h3, .report-info strong { font-size: 14px; }
  .report-score { width: 34px; height: 34px; font-size: 14px; }
  .row-arrow { display: none; }
  .cards-grid { gap: 15px; }
  .case-body { padding: 17px; }
  .case-body h3 { font-size: 16px; }
  .case-footer { padding: 13px 17px; }
  .case-footer .button { font-size: 13px; padding: 6px 9px; }
  .case-footer > span { font-size: 12px; }
  .brief-layout, .report-grid { gap: 17px; grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); }
  .brief-content { padding: 23px; }
  .room-layout, .contract-layout { gap: 17px; grid-template-columns: minmax(0, 1.45fr) minmax(275px, 1fr); }
  .video-tile { min-height: 285px; }
  .room-controls { gap: 7px; }
  .room-controls .icon-button { width: 35px; }
  .contract-fields { padding-left: 19px; padding-right: 19px; }
  .contract-field { gap: 12px; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.2fr); }
}

@media (max-width: 980px) {
  .sidebar { width: 76px; padding: 28px 10px 18px; }
  .brand { justify-content: center; padding: 0 0 37px; }
  .brand-name, .brand-version, .brand > span:not(.brand-mark), .nav-group-label, .nav-button span:not(.nav-count), .sidebar-note, .workspace-pill > div, .workspace-pill > span, .workspace-pill > small { display: none; }
  .brand-mark, .brand-mark svg { width: 31px; height: 34px; }
  .nav-button { justify-content: center; gap: 0; height: 47px; min-height: 47px; margin-bottom: 8px; padding: 12px; font-size: 0; }
  .nav-button svg { width: 21px; height: 21px; }
  .nav-button .nav-count { display: none; }
  .nav-button.active::before { left: -11px; top: 12px; bottom: 12px; }
  .workspace-pill { justify-content: center; margin-left: 0; margin-right: 0; padding-top: 19px; }
  .main-area { width: calc(100% - 76px); margin-left: 76px; }
  .topbar { height: 72px; padding-left: 25px; padding-right: 25px; }
  main#content { padding: 27px 25px 40px; }
  .page-heading { gap: 16px; }
  .heading-actions { gap: 7px; }
  .heading-actions .button { padding: 8px 12px; font-size: 14px; }
  .hero-title { font-size: 28px; }
  .stats-grid { margin-bottom: 23px; }
  .brief-layout { grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); }
}

@media (max-width: 760px) {
  h1 { font-size: 30px; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .topbar-right { gap: 10px; }
  .user-button { padding-left: 10px; }
  .user-button > span:not(.avatar) { display: none; }
  .demo-badge { font-size: 12px; }
  main#content { padding: 26px 22px 38px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; margin-bottom: 23px; }
  .heading-actions { width: 100%; }
  .page-heading p { font-size: 15px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card { min-height: 275px; padding: 25px 25px 0; }
  .hero-copy { width: 68%; }
  .hero-title { font-size: 30px; }
  .hero-art { width: 39%; right: 0; opacity: 1; }
  .hero-actions .button { font-size: 14px; }
  .compass-card { display: grid; grid-template-columns: 1fr 190px; align-items: center; min-height: 150px; padding: 20px 23px; }
  .compass-card .card-header { align-items: flex-start; flex-direction: column; align-self: end; padding-bottom: 14px; }
  .compass-visual { grid-column: 2; grid-row: 1 / 3; width: 190px; height: 135px; margin: 0; }
  .compass-visual > svg { width: 185px; height: 150px; }
  .compass-label { align-self: start; font-size: 13px; text-align: left; }
  .stats-grid { gap: 10px; }
  .stat-card { display: block; position: relative; padding: 18px 15px 14px; }
  .stat-icon { width: 27px; height: 27px; margin-bottom: 13px; border-radius: 7px; }
  .stat-icon svg { width: 15px; height: 15px; }
  .stat-value { font-size: 30px; }
  .stat-value small { font-size: 15px; }
  .stat-label { min-height: 33px; max-width: 100px; font-size: 13px; }
  .stat-change { margin-top: 10px; padding-top: 10px; font-size: 12px; line-height: 1.6; }
  .stat-change strong { font-size: 12px; }
  .lower-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-body h3 { font-size: 16px; }
  .case-footer { flex-wrap: wrap; gap: 10px; }
  .case-footer .button { font-size: 14px; }
  .session-row { flex-wrap: wrap; gap: 14px; padding: 17px; }
  .session-details { min-width: calc(100% - 90px); }
  .session-row > .button { margin-left: 67px; }
  .brief-layout, .contract-layout, .report-grid, .room-layout { grid-template-columns: 1fr; }
  .role-card { order: -1; }
  .brief-layout > .stack { order: -1; }
  .brief-content { padding: 25px; }
  .room-side { margin-top: 1px; }
  .room-side-content { min-height: 200px; }
  .video-tile { min-height: 290px; }
  .room-controls .icon-button { width: 39px; }
  .chat-messages { min-height: 190px; }
  .contract-field { grid-template-columns: minmax(150px, 1fr) minmax(0, 1.3fr); }
  .report-hero { gap: 22px; padding: 24px; }
  .report-hero h2 { font-size: 22px; }
  .score-circle { width: 90px; height: 90px; border-width: 4px; }
  .score-circle span { font-size: 32px; }
  .metric-grid { gap: 10px; }
  .metric { padding: 16px 14px; }
  .metric strong { font-size: 24px; }
  .learning-card { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .learning-card > div:not(.learning-icon) { min-width: calc(100% - 65px); }
  .learning-card .button { margin-left: 61px; }
  .filter-bar { flex-wrap: wrap; gap: 13px; }
  .search-input { width: 100%; }
  .chart-panel { padding: 20px; }
  .chart-panel > svg, .chart-container > svg { min-height: 165px; }
  .step { font-size: 13px; gap: 6px; }
  .step span:first-child, .step .step-number { width: 21px; height: 21px; }
}

@media (max-width: 520px) {
  html { min-width: 360px; }
  .sidebar { inset: auto 0 0 0; z-index: 60; flex-direction: row; align-items: center; justify-content: space-around; width: 100%; height: 66px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-strong); border-right: 0; background: rgba(16, 12, 24, .96); backdrop-filter: blur(18px); }
  .sidebar > nav { display: contents; }
  .sidebar .brand, .sidebar-bottom { display: none; }
  .nav-button { flex: 1; flex-direction: column; width: auto; height: 50px; min-height: 50px; max-width: 61px; padding: 7px 2px; gap: 4px; margin: 0; border-radius: 7px; }
  .nav-button > span:not(.nav-count) { display: block; max-width: 58px; font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-button svg { width: 18px; height: 18px; }
  .nav-button.active::before { content: none; }
  .nav-button.active { border-color: transparent; background: rgba(166, 137, 250, .095); }
  .sidebar > .nav-group-label { display: none; }
  .main-area { width: 100%; margin-left: 0; padding-bottom: 66px; }
  .topbar { height: 63px; padding-left: 20px; padding-right: 20px; }
  .breadcrumb { gap: 6px; font-size: 14px; }
  .topbar-right { gap: 7px; }
  .demo-badge { padding: 3px 5px; font-size: 12px; }
  .topbar-right > .icon-button { display: none; }
  .user-button { padding-left: 8px; }
  .user-button > svg { display: none; }
  .avatar { width: 28px; height: 28px; font-size: 13px; }
  main#content { padding: 26px 19px 28px; }
  .page-heading { margin-bottom: 22px; gap: 17px; }
  h1 { font-size: 30px; letter-spacing: -.7px; }
  .eyebrow { margin-bottom: 7px; font-size: 12px; letter-spacing: 1.5px; }
  .page-heading p { font-size: 14px; }
  .heading-actions { gap: 7px; }
  .heading-actions .button { flex: 1; min-height: 38px; font-size: 13px; padding-left: 9px; padding-right: 9px; }
  .hero-card { min-height: 290px; padding: 23px 21px 0; }
  .hero-copy { width: 75%; }
  .hero-badges { gap: 5px; margin-bottom: 19px; }
  .hero-badges .badge { font-size: 12px; }
  .hero-title { max-width: 230px; font-size: 28px; }
  .hero-copy > p { max-width: 225px; font-size: 13px; }
  .hero-meta { max-width: 210px; gap: 9px; margin-bottom: 18px; font-size: 12px; }
  .hero-art { top: 58px; right: -31px; width: 41%; height: 170px; opacity: .64; }
  .hero-actions { min-width: 280px; gap: 9px; }
  .hero-actions .button { min-height: 36px; padding: 8px 11px; font-size: 13px; }
  .hero-actions .button.ghost { font-size: 12px; }
  .hero-card:has(.hero-foot) { min-height: 325px; }
  .hero-foot { left: 21px; right: 21px; bottom: 16px; font-size: 12px; }
  .compass-card { min-height: 143px; grid-template-columns: 1fr 151px; padding: 17px 18px; }
  .compass-card .card-header h3 { max-width: 150px; font-size: 15px; line-height: 1.5; }
  .compass-card .card-header > span { font-size: 12px; }
  .compass-visual { width: 151px; height: 127px; }
  .compass-visual > svg { height: 140px; }
  .compass-label { max-width: 155px; font-size: 12px; line-height: 1.7; }
  .stats-grid { gap: 8px; margin-bottom: 23px; }
  .stat-card { padding: 14px 12px 12px; border-radius: 11px; }
  .stat-value { font-size: 28px; }
  .stat-value small { font-size: 15px; }
  .stat-label { font-size: 12px; }
  .stat-change { font-size: 12px; }
  .stat-change strong { display: block; font-size: 12px; }
  .panel-header { padding: 18px 18px 15px; min-height: 58px; }
  .panel-header h2, .panel-header h3 { font-size: 15px; }
  .panel-body { padding: 18px; }
  .report-row { padding: 16px 17px; gap: 11px; }
  .report-icon { width: 34px; height: 38px; }
  .report-icon svg { width: 17px; height: 17px; }
  .report-info h3, .report-info strong { font-size: 14px; }
  .report-info p, .report-info small { font-size: 12px; }
  .report-score { width: 32px; height: 32px; font-size: 13px; }
  .cards-grid { grid-template-columns: 1fr; gap: 17px; }
  .case-visual, .case-visual > svg { min-height: 153px; height: 153px; }
  .case-body { padding: 20px; }
  .case-body h3 { font-size: 18px; }
  .case-body p { font-size: 15px; }
  .case-meta { gap: 14px; font-size: 13px; }
  .case-footer { padding: 15px 20px; }
  .case-footer > span { font-size: 13px; }
  .case-footer .button { min-height: 34px; padding: 7px 12px; }
  .tabs { width: 100%; gap: 3px; padding: 3px; overflow-x: auto; }
  .tab { flex: 1; padding: 7px 9px; font-size: 13px; }
  .tab .count { font-size: 12px; margin-left: 3px; }
  .section-title h2, h2.section-title { font-size: 16px; }
  .section-title p { font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .field.full { grid-column: auto; }
  .modal-backdrop { align-items: flex-end; padding: 13px 10px; }
  .modal { max-height: calc(100dvh - 28px); border-radius: 15px; }
  .modal-header { padding: 22px 21px 18px; }
  .modal-header h2 { font-size: 22px; }
  .modal-header p { font-size: 14px; }
  .modal-body { padding: 21px; }
  .modal-footer { padding: 17px 21px; }
  .modal-footer .button { flex: 1; }
  .toast { right: 15px; left: 15px; bottom: 81px; max-width: none; padding: 13px 15px; font-size: 14px; }
  .brief-content { padding: 22px 20px; }
  .brief-section h2 { font-size: 16px; }
  .brief-section p, .brief-section li { font-size: 14px; }
  .role-card { padding: 21px; }
  .stepper { margin-bottom: 20px; }
  .step { flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px 4px 11px 0; font-size: 12px; }
  .step span:first-child, .step .step-number { width: 23px; height: 23px; font-size: 13px; }
  .video-grid { gap: 10px; }
  .video-tile { min-height: 245px; border-radius: 12px; }
  .video-person { width: 67px; height: 67px; font-size: 26px; box-shadow: 0 0 0 10px rgba(153, 110, 181, .035); }
  .video-person svg { width: 44px; height: 44px; }
  .video-tile:nth-child(2) .video-person { box-shadow: 0 0 0 10px rgba(110, 151, 181, .035); }
  .video-name { left: 8px; bottom: 8px; gap: 4px; padding: 4px 6px; font-size: 12px; }
  .video-name svg { width: 10px; height: 10px; }
  .video-status { top: 9px; right: 9px; font-size: 12px; }
  .room-controls { padding: 10px 9px; gap: 7px; }
  .room-controls .icon-button { width: 35px; height: 34px; }
  .room-controls .button { padding: 8px 10px; min-height: 34px; margin-left: 2px; font-size: 13px; }
  .room-controls .separator { margin: 0 2px; }
  .room-status { flex-wrap: wrap; gap: 9px; font-size: 12px; }
  .room-tab { padding: 14px 5px; font-size: 13px; }
  .contract-fields { padding: 4px 19px; }
  .contract-field { grid-template-columns: 1fr; gap: 10px; padding: 17px 0; }
  .contract-field > label, .contract-field > div:first-child { font-size: 14px; }
  .report-hero { align-items: flex-start; gap: 17px; padding: 23px 20px; }
  .report-hero h2 { font-size: 20px; }
  .report-hero p { font-size: 13px; }
  .score-circle { width: 74px; height: 74px; margin-top: 4px; border-width: 3px; }
  .score-circle span { font-size: 28px; }
  .score-circle small { font-size: 12px; }
  .metric-grid { gap: 8px; }
  .metric { padding: 14px 12px; border-radius: 10px; }
  .metric label, .metric > span { min-height: 28px; margin-bottom: 7px; font-size: 12px; }
  .metric strong { font-size: 22px; }
  .metric small { font-size: 12px; }
  .evidence-card { padding: 18px; }
  .evidence-card h3 { font-size: 15px; align-items: flex-start; }
  .evidence-card p { font-size: 13px; }
  .evidence-card blockquote { font-size: 13px; }
  .evidence-card .evidence-footer { font-size: 12px; }
  .chart-panel { padding: 19px 17px; }
  .chart-panel h3 { font-size: 15px; margin-bottom: 19px; }
  .chart-legend { gap: 12px; font-size: 12px; }
  .learning-card h3 { font-size: 15px; }
  .learning-card p { font-size: 13px; }
  .learning-card small { font-size: 12px; }
  .test-card { padding: 21px; }
  .test-card h3 { font-size: 16px; }
  .test-card p { min-height: 0; font-size: 15px; }
  .admin-table th { padding: 13px 16px; }
  .admin-table td { padding: 15px 16px; }
}

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

@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: var(--muted); }
  .sidebar, .topbar, .heading-actions, .toast, .modal-backdrop, .button { display: none !important; }
  .main-area { width: 100%; margin: 0; background: none; }
  main#content { max-width: none; padding: 0; }
  h1, h2, h3, h4, p, .metric strong, .report-hero p, .report-info h3 { color: var(--muted); }
  .panel, .metric, .evidence-card, .report-hero, .chart-panel { break-inside: avoid; background: #fff; border-color: #ded8e5; }
}

/* Premium foundation: readable type, an indigo canvas and a restrained lavender action. */
body { background: var(--bg); font-size: 16px; line-height: 1.65; font-kerning: normal; }
html { min-width: 320px; scroll-padding-top: 108px; }
h1 { font-size: clamp(28px, 2.25vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -.8px; }
h2 { font-size: 22px; line-height: 1.35; font-weight: 580; letter-spacing: -.35px; }
h3 { font-size: 18px; line-height: 1.45; font-weight: 570; letter-spacing: -.2px; }
h4 { font-size: 16px; line-height: 1.5; font-weight: 570; }
p { font-size: var(--font-body); line-height: 1.75; }
small { font-size: 13px; line-height: 1.6; }
button, a, input, select, textarea { outline-color: var(--purple); }
button, input, select, textarea { letter-spacing: inherit; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline-width: 2px; outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
button:disabled { opacity: .52; }
.sidebar { width: 244px; padding: 30px 17px 22px; background: radial-gradient(ellipse at 0 0, rgba(143, 110, 215, .1), transparent 53%), var(--sidebar); box-shadow: 1px 0 0 rgba(4, 9, 23, .24); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.main-area { min-width: 0; width: calc(100% - 244px); margin-left: 244px; background: radial-gradient(ellipse 750px 520px at 6% 0%, rgba(125, 99, 190, .075), transparent 74%), var(--bg); }
.brand { font-size: 27px; font-weight: 520; letter-spacing: -.7px; padding-left: 12px; }
.brand-version { font-size: 12px; padding: 5px 6px; border-radius: 5px; }
.nav-group-label { color: var(--subtle); font-size: 12px; font-weight: 560; letter-spacing: 1.1px; margin-top: 18px; margin-bottom: 13px; }
.nav-button { min-height: 49px; gap: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.45; font-weight: 480; color: var(--muted); border-radius: 10px; }
.nav-button svg { width: 20px; height: 20px; opacity: .86; }
.nav-button:hover { color: var(--text); background: rgba(173, 157, 219, .07); }
.nav-button.active { color: #e0d5ff; border-color: rgba(186, 165, 239, .23); background: linear-gradient(100deg, rgba(163, 136, 224, .18), rgba(163, 136, 224, .075)); box-shadow: 0 1px 0 rgba(224, 210, 255, .025) inset; }
.nav-button.active::before { left: -18px; top: 15px; bottom: 15px; width: 2px; box-shadow: 0 0 16px rgba(166, 137, 250, .17); }
.nav-button .nav-count { font-size: 12px; min-width: 24px; background: rgba(188, 172, 243, .12); color: #d5c6fc; }
.workspace-pill { font-size: 14px; color: var(--text-secondary); }
.workspace-pill small, .sidebar-note { color: var(--subtle); font-size: 12px; }
.topbar { height: 84px; padding: 0 var(--space-page); background: rgba(11, 17, 35, .88); border-bottom-color: var(--border); backdrop-filter: blur(20px) saturate(130%); }
.breadcrumb { font-size: 14px; gap: 11px; line-height: 1.5; min-width: 0; }
.breadcrumb span, .breadcrumb strong { color: var(--text-secondary); }
.topbar-right { gap: 17px; flex-shrink: 0; }
.demo-badge { color: #c4b3eb; background: rgba(167, 139, 225, .07); border-color: rgba(167, 139, 225, .2); font-size: 12px; padding: 5px 9px; border-radius: 7px; }
.icon-button { width: 40px; height: 40px; border-radius: 9px; color: var(--muted); }
.icon-button:hover { color: var(--text); background: var(--surface-raised); border-color: var(--border-strong); }
.user-button { font-size: 14px; color: var(--text-secondary); gap: 11px; }
.avatar { width: 36px; height: 36px; font-size: 13px; color: #e0d6fc; background: linear-gradient(145deg, #483d69, #2a3150); border-color: rgba(190, 177, 232, .26); }
.avatar.small { font-size: 12px; width: 28px; height: 28px; }
main#content { max-width: 1540px; padding: 36px var(--space-page) 48px; }
.page-heading { align-items: flex-end; margin-bottom: 30px; gap: 24px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p { max-width: 790px; font-size: 15px; line-height: 1.75; color: var(--muted); }
.eyebrow { color: #bdabeb; font-size: 12px; line-height: 1.5; letter-spacing: 1.3px; font-weight: 600; margin-bottom: 10px; }
.heading-actions { gap: 11px; flex-wrap: wrap; }
.button { min-height: 44px; padding: 10px 17px; gap: 9px; font-size: 15px; line-height: 1.45; font-weight: 550; border-radius: 10px; border-color: var(--border-strong); background: var(--surface-raised); color: var(--text-secondary); }
.button:hover { background: var(--surface-hover); border-color: rgba(196, 201, 235, .34); box-shadow: 0 5px 16px rgba(0, 4, 15, .12); }
.button.primary { color: var(--on-accent); background: linear-gradient(135deg, #c3b2f6, #b5a0ee); border-color: #c0aef0; box-shadow: 0 3px 14px rgba(159, 126, 218, .13), 0 1px 0 rgba(255, 255, 255, .18) inset; }
.button.primary:hover { color: var(--on-accent); background: linear-gradient(135deg, #d0c1fc, #c2aff7); border-color: #d0bdf8; box-shadow: 0 5px 22px rgba(159, 126, 218, .2); }
.button.secondary { color: #d7d4ec; background: rgba(163, 145, 211, .075); border-color: rgba(175, 160, 217, .29); }
.button.secondary:hover { color: var(--text); background: rgba(163, 145, 211, .13); border-color: rgba(191, 171, 235, .44); }
.button.ghost { color: #c6b4ec; background: transparent; box-shadow: none; }
.button.ghost:hover { color: #e0d0ff; background: transparent; box-shadow: none; }
.button.small { min-height: 38px; padding: 8px 12px; font-size: 14px; border-radius: 9px; }
.button.danger { color: #f4bcc7; background: rgba(193, 105, 130, .1); border-color: rgba(220, 139, 158, .26); }
.badge { font-size: 12px; font-weight: 500; line-height: 1.5; padding: 4px 8px; border-radius: 6px; max-width: 100%; }
.badge.neutral { color: #bbc2d7; border-color: var(--border); background: rgba(173, 181, 207, .055); }
.badge.purple { color: #d5c4fa; border-color: rgba(187, 161, 236, .24); background: rgba(169, 139, 221, .1); }
.badge.green { color: #a8d8c3; border-color: rgba(155, 210, 186, .2); background: rgba(116, 181, 153, .075); }
.badge.amber { color: #e8c694; border-color: rgba(237, 199, 143, .22); background: rgba(237, 199, 143, .065); }
.panel, .stat-card, .case-card, .test-card, .list-card, .room-side, .chart-panel, .evidence-card, .metric { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow); }
.panel, .case-card, .test-card, .chart-panel { border-radius: var(--radius); }
.panel-header { min-height: 78px; padding: 22px 24px 20px; gap: 16px; align-items: center; }
.panel-header h2, .panel-header h3 { color: var(--text); font-size: 18px; font-weight: 560; line-height: 1.45; letter-spacing: -.2px; }
.panel-header p, .panel-header > p, .panel-header > span { color: var(--muted); font-size: 14px; line-height: 1.65; }
.panel-header .button.ghost { font-size: 14px; }
.panel-body { padding: 24px; }
.dashboard-grid, .lower-grid, .cards-grid, .brief-layout, .room-layout, .contract-layout, .report-grid { gap: 24px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); margin-bottom: 24px; }
.stats-grid { gap: 20px; margin-bottom: 30px; }
.stat-card { padding: 24px; border-radius: 15px; min-width: 0; }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; }
.stat-value { font-size: 32px; line-height: 1.2; font-weight: 540; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 16px; color: var(--muted); }
.stat-label { color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.stat-change, .stat-change strong { color: var(--muted); font-size: 13px; line-height: 1.7; }
.stat-change strong { color: var(--green); }
.lower-grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); }
.report-row { padding: 20px 24px; gap: 15px; min-height: 99px; }
.report-row:hover { background: rgba(174, 158, 218, .045); }
.report-info h3, .report-info strong { font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.report-info p, .report-info small { font-size: 13px; line-height: 1.65; color: var(--muted); }
.report-score { width: 42px; height: 42px; font-size: 15px; flex-shrink: 0; }
.skill-row > div:first-child { font-size: 14px; line-height: 1.65; align-items: baseline; }
.skill-row strong { font-size: 14px; color: var(--text-secondary); }
.progress-track { height: 5px; background: #29334d; }
.progress-track > span { background: linear-gradient(90deg, #927bc9, #c3a9ef); }
.section-title h2, h2.section-title { font-size: 20px; line-height: 1.45; }
.section-title p { font-size: 14px; color: var(--muted); }
.tabs { padding: 5px; gap: 5px; background: #101a30; border-radius: 11px; max-width: 100%; overflow-x: auto; }
.tab { min-height: 40px; padding: 9px 17px; font-size: 14px; border-radius: 8px; color: var(--muted); }
.tab.active { background: #2b2d4b; border-color: rgba(186, 165, 229, .24); color: #e2d8f5; }
.tab .count { color: var(--subtle); font-size: 12px; }
.cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-card:hover { transform: translateY(-2px); border-color: rgba(185, 164, 229, .35); box-shadow: 0 19px 45px rgba(1, 7, 20, .25); }
.case-body { padding: 24px; }
.case-body h3 { font-size: 20px; line-height: 1.4; }
.case-body p { color: var(--muted); font-size: 15px; line-height: 1.75; }
.case-meta { font-size: 13px; line-height: 1.6; gap: 13px; color: var(--muted); }
.case-footer { padding: 17px 24px; flex-wrap: wrap; gap: 12px; }
.case-footer > span { color: var(--muted); font-size: 13px; }
.session-row { padding: 23px 24px; gap: 18px; }
.session-details h3 { font-size: 18px; }
.session-details p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.session-date strong { font-size: 26px; }
.session-row .session-date { width: 63px; min-height: 67px; font-size: 12px; background: rgba(161, 138, 211, .07); }
.form-grid { gap: 22px; }
.field { gap: 9px; }
.field label { font-size: 14px; line-height: 1.6; color: var(--text-secondary); font-weight: 500; }
.field input, .field select, .field textarea, .input-row input, .input-row textarea, .search-input, .contract-field input, .contract-field select { min-height: 46px; padding: 11px 14px; font-size: 16px; line-height: 1.5; color: var(--text); border: 1px solid rgba(166, 180, 221, .28); border-radius: 9px; background: var(--surface-input); box-shadow: 0 1px 2px rgba(0, 4, 16, .08) inset; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(185, 173, 224, .43); }
.field input:focus, .field select:focus, .field textarea:focus, .input-row input:focus, .input-row textarea:focus { border-color: #ac92dc; box-shadow: 0 0 0 3px rgba(168, 143, 217, .1); }
.field input::placeholder, .field textarea::placeholder, .input-row input::placeholder, .input-row textarea::placeholder, .search-input::placeholder { color: #929fbd; opacity: 1; }
.field small { font-size: 13px; line-height: 1.7; color: var(--muted); }
.field input[type="checkbox"], .field input[type="radio"] { width: 17px; height: 17px; min-height: 0; box-shadow: none; }
.checkbox-label { font-size: 14px; line-height: 1.75; color: var(--text-secondary); gap: 10px; }
.checkbox-label input { width: 17px; height: 17px; flex-shrink: 0; margin-top: 4px; }
.info-box { padding: 17px 18px; border-radius: 11px; color: var(--text-secondary); font-size: 14px; line-height: 1.8; background: rgba(167, 142, 213, .055); border-color: rgba(174, 150, 216, .22); }
.info-box.amber { color: #dcc19a; }
.key-value { font-size: 14px; line-height: 1.7; color: var(--muted); gap: 16px; padding: 14px 0; }
.key-value strong { color: var(--text-secondary); overflow-wrap: anywhere; }
.brief-section p, .brief-section li, .role-card p, .goal-list li { color: var(--text-secondary); font-size: 15px; line-height: 1.85; }
.brief-section h2 { font-size: 21px; }
.brief-section h3 { font-size: 18px; }
.role-card, .approval-card { border-color: rgba(178, 152, 225, .24); background: linear-gradient(135deg, rgba(146, 118, 197, .065), transparent 80%), var(--surface); }
.stepper { flex-wrap: wrap; gap: 0; row-gap: 12px; }
.step { min-width: 125px; font-size: 14px; line-height: 1.5; color: var(--muted); padding-top: 17px; padding-bottom: 17px; gap: 10px; border-color: #2d3751; }
.step span:first-child, .step .step-number { width: 29px; height: 29px; font-size: 12px; flex-shrink: 0; background: var(--surface); border-color: #4a5271; color: var(--muted); }
.step.active { color: #d8c8fa; }
.step.active span:first-child, .step.active .step-number { color: var(--on-accent); }
.room-controls { flex-wrap: wrap; gap: 12px; padding: 17px 14px; background: #111a30; }
.room-side, .room-workspace, .video-panel { min-width: 0; }
.room-tab { min-height: 52px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.room-tab.active { color: #dfcef8; }
.note-item { padding: 17px; color: var(--text-secondary); background: #18213a; border-radius: 10px; font-size: 15px; }
.note-item strong, .chat-message { font-size: 15px; color: var(--text-secondary); }
.chat-message { line-height: 1.8; padding: 14px 16px; background: #19213a; border-color: #33405a; }
.chat-message.mine { color: #e0d6f3; background: #2b2848; border-color: #52476c; }
.chat-message small, .note-item .note-time { font-size: 12px; color: var(--muted); }
.contract-field { grid-template-columns: minmax(160px, 1fr) minmax(0, 1.2fr); gap: 22px; padding: 22px 0; }
.contract-field > label, .contract-field > div:first-child { color: var(--text-secondary); font-size: 15px; line-height: 1.65; }
.contract-field small { font-size: 13px; color: var(--muted); }
.approval-card h3 { font-size: 18px; }
.approval-row > div:not(.avatar):not(.status-icon) { font-size: 15px; color: var(--text-secondary); }
.approval-row small { font-size: 13px; line-height: 1.6; color: var(--muted); }
.report-hero { gap: 24px; padding: 29px 30px; background: radial-gradient(ellipse at 92% 0%, rgba(146, 111, 201, .12), transparent 66%), #182039; border-color: rgba(184, 159, 225, .24); }
.report-hero h2 { font-size: 27px; line-height: 1.4; }
.report-hero p { color: var(--text-secondary); font-size: 15px; line-height: 1.8; }
.score-circle, .score-circle span { font-size: 34px; }
.score-circle small { font-size: 12px; color: var(--muted); }
.metric label, .metric > span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.metric strong { color: var(--text); font-size: 32px; line-height: 1.25; }
.metric small { color: var(--muted); font-size: 13px; line-height: 1.65; }
.evidence-card p, .evidence-card blockquote, .timeline-item p { color: var(--text-secondary); font-size: 15px; line-height: 1.85; }
.evidence-card h3 { font-size: 17px; line-height: 1.6; }
.evidence-card blockquote { background: rgba(172, 145, 214, .05); border-color: #aa8dc8; font-style: normal; padding: 15px 17px; }
.evidence-card .evidence-footer, .time-code { color: var(--muted); font-size: 13px; }
.timeline-item h4 { font-size: 16px; }
.chart-legend { font-size: 14px; line-height: 1.7; color: var(--muted); }
.learning-card h3 { font-size: 19px; line-height: 1.5; }
.learning-card p, .test-card p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.learning-card small, .test-card .test-meta { color: var(--muted); font-size: 13px; }
.test-card h3 { font-size: 20px; line-height: 1.45; }
.test-options button, .test-options label { padding: 17px 18px; min-height: 58px; font-size: 15px; line-height: 1.8; color: var(--text-secondary); background: #17213a; border-color: #3a4561; border-radius: 10px; }
.test-options button:hover, .test-options label:hover { background: #222b48; border-color: #8e77b4; }
.test-options button.selected, .test-options label:has(input:checked) { color: #eee5fc; background: #302d50; border-color: #af93d8; }
.admin-table, .table-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
.admin-table table { min-width: 720px; }
.admin-table th { padding: 17px 22px; color: var(--muted); font-size: 12px; letter-spacing: .85px; background: rgba(5, 12, 28, .18); }
.admin-table td { padding: 20px 22px; color: var(--text-secondary); font-size: 14px; }
.admin-table td strong { color: var(--text); }
.modal { max-width: 640px; border-radius: 19px; border-color: rgba(186, 161, 222, .3); background: radial-gradient(ellipse at 100% 0%, rgba(141, 107, 194, .1), transparent 60%), #151f36; }
.modal-header { padding: 28px 28px 23px; }
.modal-header h2 { font-size: 26px; line-height: 1.35; }
.modal-header p { color: var(--muted); font-size: 15px; line-height: 1.75; }
.modal-body { padding: 26px 28px; }
.modal-body > p { color: var(--text-secondary); font-size: 15px; }
.modal-footer { padding: 21px 28px; gap: 12px; }
.toast { font-size: 14px; line-height: 1.7; padding: 16px 19px; border-color: rgba(177, 151, 223, .35); background: #24304b; color: var(--text); }
.empty-state p { font-size: 15px; line-height: 1.8; }
.empty-state h3 { color: var(--text-secondary); font-size: 21px; }
.muted { color: var(--muted); }
.negative { color: var(--red); }
.positive { color: var(--green); }

@media (min-width: 1600px) {
  :root { --space-page: 40px; }
  main#content { padding-top: 40px; }
  .stat-value { font-size: 34px; }
}
@media (max-width: 1180px) {
  :root { --space-page: 26px; }
  .sidebar { width: 244px; padding-left: 15px; padding-right: 15px; }
  .main-area { width: calc(100% - 244px); margin-left: 244px; }
  .topbar { padding-left: var(--space-page); padding-right: var(--space-page); }
  main#content { padding-left: var(--space-page); padding-right: var(--space-page); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; }
  .lower-grid { grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 20px; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-layout, .contract-layout, .report-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 20px; }
  .room-layout { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { width: 80px; padding: 27px 12px 20px; }
  .main-area { width: calc(100% - 80px); margin-left: 80px; }
  .nav-button { min-height: 48px; padding: 12px; }
  .topbar { height: 76px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
  .brief-layout, .contract-layout, .report-grid, .lower-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 16px; }
  .stat-card { padding: 22px; }
}
@media (max-width: 760px) {
  :root { --space-page: 23px; }
  .topbar { padding-left: var(--space-page); padding-right: var(--space-page); }
  main#content { padding: 28px var(--space-page) 40px; }
  .page-heading { gap: 20px; margin-bottom: 26px; }
  .page-heading p { font-size: 15px; }
  .heading-actions .button { font-size: 14px; min-height: 42px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .lower-grid, .room-layout, .report-grid, .brief-layout, .contract-layout { grid-template-columns: 1fr; }
  .panel-header { padding: 21px 22px 18px; }
  .panel-body { padding: 22px; }
  .report-row { padding: 20px 22px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric strong { font-size: 30px; }
  .metric { padding: 20px 17px; }
  .room-controls { gap: 10px; }
  .step { min-width: 130px; font-size: 13px; }
}
@media (max-width: 520px) {
  html { min-width: 320px; }
  :root { --space-page: 20px; }
  body { font-size: 16px; }
  .main-area { width: 100%; margin-left: 0; padding-bottom: 0; }
  .topbar { height: 70px; padding-left: 18px; padding-right: 18px; }
  .breadcrumb { font-size: 13px; }
  .topbar-right { gap: 10px; }
  .demo-badge { font-size: 12px; padding: 4px 7px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }
  main#content { padding: 28px var(--space-page) 36px; }
  h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.7px; }
  .page-heading p { font-size: 15px; }
  .eyebrow { font-size: 12px; letter-spacing: 1.15px; }
  .heading-actions { gap: 10px; flex-wrap: wrap; }
  .heading-actions .button { flex: 0 1 auto; min-height: 44px; padding: 10px 14px; font-size: 14px; white-space: normal; }
  .button { min-height: 44px; font-size: 15px; padding: 10px 15px; }
  .button.small { font-size: 14px; min-height: 40px; }
  .badge { font-size: 12px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .stats-grid > .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-card { padding: 20px 17px; border-radius: 14px; }
  .stat-value { font-size: 32px; }
  .stat-value small { font-size: 15px; }
  .stat-label { max-width: none; min-height: 0; font-size: 14px; line-height: 1.6; }
  .stat-change, .stat-change strong { font-size: 13px; line-height: 1.75; }
  .stat-icon { width: 29px; height: 29px; }
  .cards-grid { grid-template-columns: 1fr; gap: 20px; }
  .case-body { padding: 22px; }
  .case-body h3 { font-size: 21px; }
  .case-body p { font-size: 15px; }
  .case-meta { font-size: 13px; }
  .case-footer { padding: 17px 22px; }
  .case-footer .button { min-height: 42px; font-size: 14px; }
  .panel-header { min-height: 74px; gap: 13px; padding: 21px 20px 19px; flex-wrap: wrap; }
  .panel-header h2, .panel-header h3 { font-size: 18px; line-height: 1.5; }
  .panel-header p, .panel-header > p, .panel-header > span { font-size: 14px; }
  .panel-body { padding: 21px 20px; }
  .report-row { padding: 21px 19px; gap: 12px; align-items: center; }
  .report-info h3, .report-info strong { font-size: 15px; }
  .report-info p, .report-info small { font-size: 13px; }
  .report-score { width: 38px; height: 38px; font-size: 14px; }
  .report-icon { width: 35px; height: 40px; }
  .form-grid { grid-template-columns: 1fr; gap: 20px; }
  .field label { font-size: 14px; }
  .field input, .field select, .field textarea, .contract-field input, .contract-field select, .input-row input, .input-row textarea, .search-input { font-size: 16px; min-height: 48px; }
  .field small { font-size: 13px; }
  .checkbox-label { font-size: 14px; }
  .info-box { font-size: 14px; padding: 16px; }
  .tabs { padding: 5px; gap: 5px; }
  .tab { font-size: 14px; min-height: 40px; padding: 9px 13px; flex: 0 0 auto; }
  .tab .count { font-size: 12px; }
  .step { flex-direction: row; align-items: center; flex: 1 1 42%; font-size: 13px; gap: 9px; padding: 13px 8px 13px 0; min-width: 0; }
  .step span:first-child, .step .step-number { width: 28px; height: 28px; font-size: 12px; }
  .room-controls { padding: 15px 10px; gap: 12px; }
  .room-controls .button { margin: 0; min-height: 44px; font-size: 14px; white-space: normal; }
  .room-tab { font-size: 14px; min-height: 50px; }
  .room-status { font-size: 13px; line-height: 1.75; }
  .video-status, .video-name { font-size: 12px; }
  .contract-field { grid-template-columns: 1fr; padding: 21px 0; gap: 12px; }
  .contract-field > label, .contract-field > div:first-child { font-size: 15px; }
  .contract-field small { font-size: 13px; }
  .key-value { font-size: 14px; }
  .key-value strong { max-width: 62%; }
  .report-hero { padding: 24px 21px; }
  .report-hero h2 { font-size: 25px; }
  .report-hero p { font-size: 15px; }
  .metric-grid { grid-template-columns: 1fr; gap: 0; }
  .metric { padding: 20px; }
  .metric label, .metric > span, .metric small { font-size: 13px; min-height: 0; }
  .metric strong { font-size: 32px; }
  .evidence-card h3 { font-size: 17px; }
  .evidence-card p, .evidence-card blockquote, .timeline-item p { font-size: 15px; }
  .evidence-card .evidence-footer { font-size: 12px; }
  .time-code { font-size: 13px; }
  .learning-card h3, .test-card h3 { font-size: 20px; }
  .learning-card p, .test-card p { font-size: 15px; }
  .learning-card small, .test-card .test-meta { font-size: 13px; }
  .test-options button, .test-options label { font-size: 15px; }
  .modal-backdrop { padding: 12px; }
  .modal { border-radius: 17px; max-height: calc(100dvh - 24px); }
  .modal-header, .modal-body { padding: 24px 21px; }
  .modal-header h2 { font-size: 25px; }
  .modal-header p { font-size: 15px; }
  .modal-footer { padding: 20px 21px; }
  .modal-footer .button { min-height: 44px; font-size: 14px; }
  .toast { bottom: 20px; left: 16px; right: 16px; font-size: 14px; }
}
