:root {
  --bg: #061b2c;
  --bg-deep: #041421;
  --surface: #0c293e;
  --surface-2: #11354d;
  --surface-3: #173f59;
  --line: rgba(222, 235, 236, .14);
  --line-strong: rgba(222, 235, 236, .22);
  --text: #f2f1ea;
  --muted: #91a6b5;
  --dim: #688092;
  --accent: #57e2c5;
  --accent-ink: #082333;
  --accent-2: #ff8b65;
  --accent-soft: rgba(87, 226, 197, .12);
  --success: #57d4aa;
  --warning: #f1c15b;
  --danger: #ff857c;
  --radius: 18px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

body[data-theme="gold"] {
  --accent: #f2c75c;
  --accent-ink: #132331;
  --accent-2: #51cfb0;
  --accent-soft: rgba(242, 199, 92, .12);
  --success: #5bd0ad;
  --warning: #f2c75c;
  --danger: #ff897a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.muted { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px 12px 12px 4px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 20px;
  font-style: italic;
  font-weight: 900;
}
.brand > span:last-child { display: flex; flex-direction: column; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.btn, .btn-soft, .btn-accent {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}
.btn { color: var(--text); border: 1px solid var(--line-strong); background: var(--surface-2); }
.btn-soft { color: var(--text); border: 1px solid var(--line); background: transparent; }
.btn-accent { color: var(--accent-ink); border: 1px solid var(--accent); background: var(--accent); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pill { display: inline-flex; padding: 4px 9px; border-radius: 99px; font-size: 9px; font-weight: 800; }
.pill.success { color: var(--success); background: rgba(87, 212, 170, .1); }
.pill.warning { color: var(--warning); background: rgba(241, 193, 91, .1); }
.pill.neutral { color: #a8bac6; background: rgba(255,255,255,.06); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--accent-ink); background: var(--accent); font-weight: 900; }
.track { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.theme-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-deep); }
.theme-switch a { padding: 4px 8px; border-radius: 5px; color: var(--muted); font-size: 9px; }
.theme-switch a.active { color: var(--accent-ink); background: var(--accent); }

/* Public landing */
.public-page {
  min-height: 100vh;
  padding: 18px;
  background:
    radial-gradient(circle at 85% 15%, rgba(87,226,197,.08), transparent 28%),
    radial-gradient(circle at 5% 90%, rgba(255,139,101,.05), transparent 26%),
    var(--bg);
}
body[data-theme="gold"] .public-page {
  background:
    radial-gradient(circle at 85% 15%, rgba(242,199,92,.09), transparent 28%),
    radial-gradient(circle at 5% 90%, rgba(81,207,176,.05), transparent 26%),
    var(--bg);
}
.public-frame { min-height: calc(100vh - 36px); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); }
.public-nav { display: flex; height: 82px; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid var(--line); }
.nav-actions { display: flex; align-items: center; gap: 17px; color: #afbec9; font-size: 11px; font-weight: 700; }
.public-hero { display: grid; grid-template-columns: 1.16fr .84fr; min-height: 640px; }
.public-copy { display: flex; justify-content: center; flex-direction: column; padding: 60px 72px; }
.public-copy h1 { max-width: 780px; margin: 15px 0 20px; font-size: clamp(50px, 5.2vw, 76px); line-height: 1.12; color: var(--text); }
.public-copy h1 em { color: var(--accent); font-style: normal; }
.public-copy > p { max-width: 620px; color: var(--muted); font-size: 17px; }
.public-actions { display: flex; gap: 11px; margin-top: 24px; }
.public-actions .btn-accent { min-height: 54px; padding: 13px 23px; font-size: 14px; }
.public-actions .btn-soft { min-height: 54px; padding: 13px 22px; }
.registration-panel {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 52px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface), var(--bg-deep));
}
.registration-panel::before {
  content: "";
  position: absolute;
  right: -160px;
  top: -160px;
  width: 500px;
  height: 500px;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(255,255,255,.018), 0 0 0 150px rgba(255,255,255,.012);
}
.state-card { position: relative; z-index: 1; }
.open-label { display: inline-flex; width: fit-content; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--accent); border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.open-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.state-card h2 { margin: 30px 0 5px; font-size: 31px; }
.state-card > p { color: var(--muted); font-size: 12px; }
.materials { display: grid; gap: 1px; margin-top: 40px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.materials div { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 15px; background: rgba(6,27,44,.7); }
.materials b { font-size: 9px; color: var(--accent); }
.materials span { color: #d8e2e7; font-size: 11px; }
.materials small { color: var(--dim); font-size: 9px; }
.public-bottom { display: flex; justify-content: space-between; padding: 18px 48px; border-top: 1px solid var(--line); color: var(--dim); font-size: 9px; }

/* Login */
.login-page { display: grid; min-height: 100vh; grid-template-columns: 1fr 1fr; background: var(--bg); }
.login-visual { position: relative; display: flex; justify-content: space-between; flex-direction: column; padding: 48px; overflow: hidden; border-right: 1px solid var(--line); }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.login-visual::before { width: 560px; height: 560px; left: -300px; bottom: -230px; box-shadow: 0 0 0 90px rgba(255,255,255,.016), 0 0 0 180px rgba(255,255,255,.012); }
.login-visual::after { width: 220px; height: 220px; right: 60px; top: 75px; }
.login-copy { position: relative; z-index: 1; max-width: 540px; }
.login-copy h1 { margin: 16px 0; font-size: 58px; line-height: 1.16; }
.login-copy h1 em { color: var(--accent); font-style: normal; }
.login-copy p { color: var(--muted); }
.login-zone { display: flex; justify-content: center; flex-direction: column; padding: 10vw; background: var(--bg-deep); }
.login-form { width: min(410px, 100%); }
.login-form h2 { margin: 9px 0 5px; font-size: 36px; }
.login-form > p { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; color: #aebdc7; font-size: 10px; font-weight: 700; }
.field input, .field select {
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: var(--surface);
}
.field input::placeholder { color: #61788a; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-form .btn-accent { width: 100%; min-height: 49px; margin-top: 24px; }
.login-footer { margin-top: 17px; color: var(--dim); font-size: 9px; text-align: center; }
.login-footer a { color: var(--accent); font-weight: 800; }

/* Admin */
.admin-v3 { min-height: 100vh; background: var(--bg); }
.nav-rail {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  width: 218px;
  flex-direction: column;
  padding: 25px 17px 18px;
  border-right: 1px solid var(--line);
  background: var(--bg-deep);
}
.nav-rail .brand { padding: 0 9px 27px; }
.nav-list { display: grid; gap: 4px; }
.nav-list a { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-radius: 9px; color: #8498a6; font-size: 11px; font-weight: 700; }
.nav-list a:hover, .nav-list a.active { color: var(--text); background: var(--surface); }
.nav-list a.active { box-shadow: inset 3px 0 0 var(--accent); }
.nav-list i { color: #526a7c; font-size: 8px; font-style: normal; }
.nav-list a.active i { color: var(--accent); }
.rail-user { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.rail-user > span:nth-child(2) { display: flex; flex-direction: column; }
.rail-user strong { font-size: 10px; }
.rail-user small { color: var(--dim); font-size: 8px; }
.main { margin-left: 218px; }
.topbar { display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(6,27,44,.94); }
.topbar strong { display: block; font-size: 15px; }
.content { padding: 28px 31px 45px; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.title-row h1 { margin: 5px 0; font-size: 39px; }
.title-row p { margin: 0; color: var(--muted); font-size: 11px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 15px; }
.metric { padding: 17px 18px; }
.metric span { color: var(--muted); font-size: 9px; }
.metric strong { display: block; margin: 4px 0; font-size: 27px; color: var(--text); }
.metric small { color: var(--dim); font-size: 8px; }
.metric.highlight { background: linear-gradient(145deg, var(--surface-2), var(--surface)); border-color: var(--line-strong); }
.metric.highlight strong { color: var(--accent); }
.class-grid { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 14px; }
.toolbar { display: flex; gap: 8px; padding: 11px; margin-bottom: 13px; }
.toolbar input, .toolbar select {
  min-height: 39px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}
.toolbar input { flex: 1; }
.toolbar input::placeholder { color: #61788a; }
.class-table { overflow: hidden; }
.class-head, .class-row { display: grid; grid-template-columns: 1.4fr 85px 80px 82px 76px 64px; align-items: center; gap: 9px; padding: 12px 15px; }
.class-head { color: var(--dim); background: rgba(255,255,255,.022); font-size: 8px; }
.class-row { border-top: 1px solid var(--line); color: #c5d1d8; font-size: 9px; }
.class-row > div:first-child { display: flex; flex-direction: column; }
.class-row strong { color: var(--text); font-size: 10px; }
.class-row small { color: var(--dim); font-size: 8px; }
.class-row a { color: var(--accent); font-size: 8px; font-weight: 800; }
.side { display: grid; gap: 13px; }
.side-card { padding: 18px; }
.side-card h2 { margin: 3px 0 12px; font-size: 18px; }
.todo { display: grid; gap: 1px; overflow: hidden; border-radius: 9px; background: var(--line); }
.todo a { display: flex; justify-content: space-between; padding: 11px; color: #c7d2d8; background: var(--surface-2); font-size: 9px; }
.todo b { color: var(--accent); font-size: 15px; }
.recent-list { display: grid; gap: 11px; }
.recent-list > div { display: grid; grid-template-columns: 27px 1fr; gap: 9px; align-items: center; }
.recent-list i { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 8px; font-style: normal; font-weight: 900; }
.recent-list span { display: flex; flex-direction: column; }
.recent-list strong { color: #d5dfe4; font-size: 9px; }
.recent-list small { color: var(--dim); font-size: 8px; }
.bottom-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 13px; margin-top: 13px; }
.bottom-card { padding: 18px; }
.funnel { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; margin-top: 15px; overflow: hidden; border-radius: 9px; background: var(--line); }
.funnel div { display: flex; flex-direction: column; padding: 12px; background: var(--surface-2); }
.funnel span, .funnel small { color: var(--dim); font-size: 8px; }
.funnel strong { color: var(--accent); font-size: 19px; }
.milestones { display: grid; gap: 8px; margin-top: 13px; }
.milestones div { display: grid; grid-template-columns: 54px 1fr; gap: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.milestones time { color: var(--accent); font-size: 8px; font-weight: 800; }
.milestones span { color: #c8d3d9; font-size: 8px; }

/* Analytics */
.selector { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); }
.overview-strip { display: grid; grid-template-columns: 1.35fr repeat(3,.65fr); gap: 1px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.overview-strip > div { display: flex; justify-content: center; flex-direction: column; padding: 20px; background: var(--surface); }
.overview-strip > div:first-child { background: var(--accent); color: var(--accent-ink); }
.overview-strip h2 { margin: 4px 0; font-size: 25px; }
.overview-strip p, .overview-strip span, .overview-strip small { font-size: 9px; }
.overview-strip > div:first-child p { opacity: .7; }
.overview-strip strong { font-size: 27px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card { padding: 19px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.chart-head h2 { margin: 3px 0 0; font-size: 20px; }
.chart-head span { color: var(--dim); font-size: 8px; }
.bar-list { display: grid; gap: 16px; padding: 20px 0; }
.bar-list > div { display: grid; grid-template-columns: 94px 1fr 30px; align-items: center; gap: 10px; color: #bfccd3; font-size: 9px; }
.bar-list i { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.bar-list b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bar-list > div:nth-child(2) b { background: var(--accent-2); }
.bar-list > div:nth-child(3) b { background: #8eabc0; }
.vertical-bars { display: flex; height: 180px; align-items: flex-end; justify-content: space-around; gap: 12px; padding-top: 18px; }
.vertical-bars > div { display: flex; height: 100%; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.vertical-bars b { width: 29px; min-height: 5px; border-radius: 6px 6px 2px 2px; background: var(--accent); }
.vertical-bars div:nth-child(2) b, .vertical-bars div:nth-child(4) b { background: var(--accent-2); }
.vertical-bars span, .vertical-bars strong { color: #aabac3; font-size: 8px; }
.opc-card { margin-top: 14px; padding: 21px; }
.opc-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.opc-head h2 { margin: 3px 0; font-size: 22px; }
.opc-head p { margin: 0; color: var(--muted); font-size: 9px; }
.opc-totals { display: flex; gap: 25px; }
.opc-totals span { display: flex; flex-direction: column; color: var(--muted); font-size: 8px; }
.opc-totals strong { color: var(--accent); font-size: 23px; }
.opc-map { display: grid; grid-template-columns: 210px 40px 1fr; align-items: center; }
.peak-node { display: flex; min-height: 104px; justify-content: center; flex-direction: column; padding: 17px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-2); }
.peak-node strong { color: var(--accent); }
.peak-node small { color: var(--muted); font-size: 8px; }
.line { height: 1px; background: var(--line-strong); }
.companies { display: grid; gap: 8px; }
.company {
  display: grid;
  grid-template-columns: 1.4fr 100px 85px 90px;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
  font-size: 9px;
}
.company > div { display: flex; flex-direction: column; }
.company small { color: var(--dim); font-size: 8px; }
.company b { color: var(--text); font-size: 12px; }
.opc-foot { margin-top: 15px; color: var(--dim); font-size: 8px; }

/* Palette */
.palette-page { min-height: 100vh; padding: 48px; }
.palette-page h1 { margin: 7px 0; font-size: 44px; }
.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.palette-card { overflow: hidden; }
.palette-canvas { min-height: 320px; padding: 30px; background: var(--bg); }
.palette-canvas.alt { background: #071d30; }
.palette-card h2 { margin: 0; padding: 22px; border-top: 1px solid var(--line); font-size: 21px; }
.palette-card p { margin: -12px 22px 22px; color: var(--muted); font-size: 11px; }
.palette-swatches { display: flex; gap: 10px; margin-top: 24px; }
.palette-swatches span { width: 52px; height: 52px; border-radius: 13px; }
.specimen { display: grid; gap: 12px; }
.specimen h3 { margin: 0; font-size: 28px; }
.specimen p { margin: 0; color: var(--muted); }
.specimen .mini-row { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); }
.specimen .btn-accent { width: fit-content; }

/* Review index */
.review-page { min-height: 100vh; padding: 46px; }
.review-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.review-head h1 { margin: 7px 0; font-size: 48px; }
.review-head p { margin: 0; color: var(--muted); }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.review-panel { overflow: hidden; }
.review-panel img { display: block; width: 100%; border-bottom: 1px solid var(--line); }
.review-panel-body { padding: 21px; }
.review-panel h2 { margin: 4px 0 6px; font-size: 23px; }
.review-panel p { color: var(--muted); font-size: 11px; }
.review-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.review-panel.gold-preview .eyebrow { color: #f2c75c; }
.review-panel.gold-preview .btn-accent { color: #132331; border-color: #f2c75c; background: #f2c75c; }

@media (max-width: 1000px) {
  .public-hero { grid-template-columns: 1fr; }
  .public-copy { padding: 50px 34px; }
  .registration-panel { min-height: 470px; border-top: 1px solid var(--line); border-left: 0; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 360px; }
  .login-zone { padding: 60px 30px; }
  .nav-rail { position: static; width: auto; flex-direction: row; align-items: center; padding: 12px 18px; }
  .nav-list { display: none; }
  .rail-user { display: none; }
  .main { margin-left: 0; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .class-grid { grid-template-columns: 1fr; }
  .opc-map { grid-template-columns: 1fr; gap: 8px; }
  .line { width: 1px; height: 24px; margin-left: 35px; }
  .chart-grid, .bottom-grid, .palette-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .public-page { padding: 8px; }
  .public-nav { height: 72px; padding: 0 16px; }
  .nav-actions > a:first-child { display: none; }
  .public-copy h1 { font-size: 40px; }
  .public-copy, .registration-panel { padding: 32px 22px; }
  .public-actions { flex-direction: column; }
  .public-bottom { flex-direction: column; gap: 4px; padding: 15px 20px; }
  .login-visual { padding: 27px; }
  .login-copy h1 { font-size: 40px; }
  .content { padding: 18px 13px 35px; }
  .title-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-wrap: wrap; }
  .class-table { overflow-x: auto; }
  .class-head, .class-row { min-width: 740px; }
  .funnel { grid-template-columns: 1fr 1fr; }
  .overview-strip { grid-template-columns: 1fr 1fr; }
  .company { grid-template-columns: 1fr 80px; }
  .company > :nth-child(2), .company > :nth-child(3) { display: none; }
  .palette-page { padding: 24px 14px; }
  .review-page { padding: 24px 14px; }
}

/* Application theme integration */
body,
.admin-shell,
.learner-shell {
  color: var(--text);
  background: var(--bg);
}
.public-page > .flash-stack,
.login-page > .flash-stack {
  position: fixed;
  z-index: 50;
  top: 18px;
  left: 50%;
  width: min(660px, calc(100% - 36px));
  transform: translateX(-50%);
}
.muted { color: var(--muted); }
.brand { color: var(--text); }
.brand-dark { color: var(--text); }
.brand-dark small { color: var(--muted); }
.primary-btn,
.light-btn {
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}
.primary-btn:hover,
.light-btn:hover {
  color: var(--accent-ink);
  background: var(--accent);
  filter: brightness(1.05);
}
.soft-btn,
.ghost-light-btn {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.soft-btn:hover,
.ghost-light-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
}
.panel {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}
.pill.green { color: var(--success); background: rgba(87, 212, 170, .11); }
.pill.amber { color: var(--warning); background: rgba(241, 193, 91, .11); }
.pill.red { color: var(--danger); background: rgba(255, 133, 124, .11); }
.pill.gray { color: #9cabb5; background: rgba(255,255,255,.06); }
.flash {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}
.flash.success { border-color: rgba(87,212,170,.35); background: rgba(87,212,170,.08); }
.flash.error { border-color: rgba(255,133,124,.35); background: rgba(255,133,124,.08); }
.flash.warning { border-color: rgba(241,193,91,.35); background: rgba(241,193,91,.08); }
.field > span,
.field small,
.registration-form label,
.registration-hero + * { color: #a7b6bf; }
.field input,
.field select,
.field textarea,
.filter-bar input,
.filter-bar select,
.inline-form input,
.compact-filter select,
.enrollment-toolbar input,
.trajectory-filter input,
.trajectory-filter select {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-2);
}
.field input::placeholder,
.field textarea::placeholder,
.filter-bar input::placeholder,
.enrollment-toolbar input::placeholder,
.trajectory-filter input::placeholder { color: #6f8492; }
.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.inline-form input:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.breadcrumb { color: var(--muted); }
.breadcrumb a { color: var(--accent); }
.notice {
  color: #c8d3d9;
  border-color: var(--line);
  background: var(--surface-2);
}
.notice.amber { color: #e8c878; border-color: rgba(241,193,91,.28); background: rgba(241,193,91,.07); }
.notice.red { color: #ffaaa3; border-color: rgba(255,133,124,.3); background: rgba(255,133,124,.07); }
.notice.gray { color: var(--muted); background: rgba(255,255,255,.04); }
.notice.green-soft { color: #83e2c8; border-color: rgba(87,226,197,.26); background: rgba(87,226,197,.07); }
.empty-state { color: var(--text); }
.empty-icon { color: var(--accent-ink); background: var(--accent); }
.track { background: rgba(255,255,255,.08); }
.track i { background: var(--accent); }

/* Navigation and shell */
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-deep);
}
.side-nav a { color: #8498a6; }
.side-nav a:hover,
.side-nav a.active { color: var(--text); background: var(--surface); }
.side-nav a.active i { color: var(--accent); }
.side-user { border-top-color: var(--line); }
.side-user .avatar { color: var(--accent-ink); background: var(--accent); }
.side-user small { color: var(--dim); }
.admin-main,
.admin-main > .page { background: var(--bg); }
.admin-topbar,
.learner-nav {
  color: var(--text);
  border-color: var(--line);
  background: rgba(6,27,44,.95);
  backdrop-filter: blur(14px);
}
.env-pill { color: #9eb0bb; background: rgba(255,255,255,.06); }
.learner-nav nav { color: #aabac4; }
.site-footer { color: var(--dim); border-color: var(--line); background: var(--bg); }
.page-heading p,
.section-head p,
.section-head .muted { color: var(--muted); }

/* Student learning */
.program-card,
.class-hero,
.course-section,
.reader-card,
.profile-side .panel,
.employee-badge {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}
.program-card:hover { box-shadow: 0 18px 42px rgba(0,0,0,.2); }
.class-hero,
.learner-hero { background: linear-gradient(135deg, var(--surface-2), var(--bg-deep)); }
.learner-hero p,
.class-hero > div > p { color: var(--muted); }
.hero-profile { border-color: var(--line); background: rgba(255,255,255,.035); }
.hero-profile span { color: var(--accent); }
.hero-profile small { color: var(--muted); }
.date-line { color: var(--muted); }
.ring { background: conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255,255,255,.08) 0); }
.ring::before { background: var(--surface); }
.course-head { border-color: var(--line); }
.course-number { color: #5d7586; }
.material-row:hover { background: var(--surface-2); }
.material-row.done { background: rgba(87,226,197,.055); }
.type-text,
.type-image,
.type-video,
.type-ppt,
.type-document { color: var(--accent); background: var(--surface-2); }
.material-progress { background: rgba(255,255,255,.08); }
.material-progress span { background: var(--accent); }
.done-mark { color: var(--success); background: rgba(87,212,170,.1); }
.reader-card { box-shadow: none; }
.rich-text,
.rich-text p { color: #d4dfe4; }
.rich-text h2,
.rich-text h3 { color: var(--text); }
.learning-status dl > div { border-color: var(--line); }
.side-tip { background: var(--surface-2); }
.complete-banner { color: var(--success); background: rgba(87,212,170,.1); }
.next-link { color: var(--text); border-color: var(--line); background: var(--surface); }
.section-title h2,
.identity-card h2 { color: var(--text); }
.identity-card dl > div { border-color: var(--line); }
.avatar { color: var(--accent-ink); background: var(--accent); }
.privacy-note { color: #b9c7ce; background: var(--surface-2); }
.profile-match-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #c6d1d7;
  background: var(--surface-2);
  font-size: 11px;
}
.profile-match-panel,
.match-confirm-card,
.commitment-card { padding: 22px; }
.match-confirm-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  border-color: rgba(87,226,197,.3);
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
}
.match-confirm-card h2 { margin: 4px 0 12px; }
.matched-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 20px;
  color: var(--muted);
  font-size: 9px;
}
.matched-meta span { display: flex; flex-direction: column; }
.matched-meta b { color: var(--text); font-size: 11px; }
.profile-match-panel { margin-bottom: 16px; }
.full-profile-layout { align-items: start; }
.field input[readonly] { color: var(--muted); background: rgba(255,255,255,.03); }
.commitment-card h2 { margin: 4px 0 8px; }
.commitment-card > p { color: var(--muted); font-size: 10px; }
.commitment-status {
  display: flex;
  flex-direction: column;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.commitment-status strong { font-size: 12px; }
.commitment-status span,
.commitment-status small { color: var(--muted); font-size: 8px; }
.commitment-status.status-approved { border-color: rgba(87,212,170,.35); }
.commitment-status.status-rejected { border-color: rgba(255,133,124,.35); }
.commitment-card .field { margin: 12px 0; }
.commitment-card .field input[type="file"] {
  padding: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  background: var(--bg-deep);
}
.profile-change-summary { padding: 20px; }
.profile-change-summary h2 { margin: 4px 0 10px; font-size: 19px; }
.profile-change-summary > div { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.profile-change-summary strong { color: var(--text); font-size: 9px; }

/* Unified public landing and login */
.public-hero {
  position: relative;
  display: block;
  min-height: 650px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 87% 22%, rgba(87,226,197,.1), transparent 25%),
    radial-gradient(circle at 7% 95%, rgba(87,226,197,.06), transparent 24%);
}
.public-hero::before,
.public-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}
.public-hero::before {
  width: 620px;
  height: 620px;
  top: -260px;
  right: -180px;
  box-shadow: 0 0 0 90px rgba(255,255,255,.012), 0 0 0 180px rgba(255,255,255,.01);
}
.public-hero::after {
  width: 310px;
  height: 310px;
  bottom: -220px;
  left: 6%;
}
.public-copy {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 72px));
  margin: 0 auto;
  padding: 84px 0 58px;
}
.public-copy h1 {
  max-width: 980px;
  margin: 15px 0 20px;
  font-size: clamp(48px, 5.3vw, 76px);
}
.public-copy > p {
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
}
.public-actions { margin-top: 24px; }
.public-materials-strip {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 1px;
  margin-top: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}
.public-materials-strip > div {
  display: flex;
  min-height: 90px;
  justify-content: center;
  flex-direction: column;
  padding: 15px 18px;
  background: rgba(12,41,62,.74);
}
.public-materials-strip > div:not(.material-strip-title) {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-content: center;
  column-gap: 10px;
}
.public-materials-strip b {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--accent);
  font-size: 9px;
}
.public-materials-strip span {
  color: #d7e0e4;
  font-size: 11px;
}
.public-materials-strip small { color: var(--dim); font-size: 8px; }
.material-strip-title strong { margin-top: 4px; font-size: 14px; }

.login-page {
  display: block;
  min-height: 100vh;
  background: var(--bg);
}
.login-stage {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 34px 44px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(87,226,197,.075), transparent 24%),
    radial-gradient(circle at 15% 100%, rgba(87,226,197,.045), transparent 28%);
}
.login-stage::before {
  content: "";
  position: absolute;
  top: 6%;
  left: 50%;
  width: 640px;
  height: 640px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 50%;
  box-shadow: 0 0 0 110px rgba(255,255,255,.012), 0 0 0 220px rgba(255,255,255,.009);
  transform: translateX(-50%);
  pointer-events: none;
}
.login-stage > .brand { position: relative; z-index: 1; }
.login-center {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(490px, 100%);
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  margin: auto;
  text-align: center;
}
.login-intro { max-width: 460px; }
.login-intro h1 {
  margin: 9px 0 10px;
  font-size: clamp(34px, 3.8vw, 48px);
  line-height: 1.16;
}
.login-intro p { color: var(--muted); }
.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12,41,62,.86);
  box-shadow: 0 24px 70px rgba(0,0,0,.2);
  backdrop-filter: blur(16px);
  text-align: left;
}
.login-card h2 { margin: 7px 0 5px; font-size: 29px; }
.login-card > p { color: var(--muted); font-size: 11px; }
.login-card .field { margin-top: 16px; }
.login-card .btn-accent { width: 100%; min-height: 47px; margin-top: 22px; }
.login-footer { margin-top: 13px; color: var(--dim); font-size: 9px; text-align: center; }
.login-footer a { color: var(--accent); font-weight: 800; }

/* Registration form */
.registration-main,
.success-page { color: var(--text); }
.registration-nav { color: var(--text); }
.registration-hero {
  background:
    radial-gradient(circle at 90% 0%, var(--accent-soft), transparent 32%),
    var(--surface-2);
}
.registration-note { color: #b4c2ca; border-color: var(--line); background: rgba(255,255,255,.035); }
.registration-checks label,
.registration-consent,
.upload-field {
  color: #b8c5cc;
  border-color: var(--line);
  background: var(--surface-2);
}
.registration-checks label:has(input:checked) { color: var(--accent); border-color: var(--accent); }
.upload-field input[type="file"] { color: var(--muted); background: var(--bg-deep); }
.registration-hero h1,
.registration-hero > p { color: var(--text); }
.success-page { background: var(--surface); }
.success-page > p,
.success-meta { color: var(--muted); }
.success-code { background: var(--surface-2); }

/* Admin cards, tables and class page */
.admin-hero { background: linear-gradient(125deg, var(--surface-2), var(--bg-deep)); }
.stat-strip { border-color: var(--line); background: var(--line); }
.stat-strip > div { background: var(--surface); }
.stat-strip > div.attention { background: rgba(241,193,91,.08); }
.panel-head > a,
.panel-head > span,
.panel-head p { color: var(--muted); }
.table-head { color: var(--dim); }
.table-row { border-color: var(--line); }
.activity-list i { color: var(--accent); background: var(--accent-soft); }
.class-overview { color: var(--text); border-color: var(--line); background: var(--surface); }
.class-overview:hover { box-shadow: 0 18px 42px rgba(0,0,0,.2); }
.mini-stats { background: var(--line); }
.mini-stats div { background: var(--surface-2); }
.class-dates { color: var(--muted); }
.process-note li::before { color: var(--accent-ink); background: var(--accent); }
.process-note li::after { background: var(--line); }
.class-admin-head h1,
.class-admin-head p { color: var(--text); }
.detail-tabs { border-color: var(--line); }
.detail-tabs button.active { color: var(--accent); border-color: var(--accent); }
.member-head { color: var(--dim); }
.member-row { border-color: var(--line); }
.progress-cell i { background: rgba(255,255,255,.08); }
.progress-cell b { background: var(--accent); }
.upload-card input[type="file"] { color: var(--muted); border-color: var(--line); background: var(--bg-deep); }
.upload-index { color: #5e7889; }
.content-row:nth-child(odd) { background: var(--surface-2); }
.chapter-admin { border-color: var(--line); }
.upload-field,
.registration-consent { color: #b7c3ca; }

/* New class management page */
.v3-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.v3-title-row h1 { margin: 5px 0; font-size: 39px; }
.v3-title-row p { margin: 0; color: var(--muted); font-size: 11px; }
.v3-accent-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 11px;
  font-weight: 900;
}
.v3-live-pill {
  padding: 5px 9px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255,255,255,.05);
  font-size: 9px;
}
.v3-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 15px; }
.v3-metric-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.v3-metric-card span { color: var(--muted); font-size: 9px; }
.v3-metric-card strong { display: block; margin: 4px 0; font-size: 27px; }
.v3-metric-card small { color: var(--dim); font-size: 8px; }
.v3-metric-card.highlight { background: linear-gradient(145deg, var(--surface-2), var(--surface)); }
.v3-metric-card.highlight strong { color: var(--accent); }
.v3-class-layout { display: grid; grid-template-columns: minmax(0,1fr) 286px; gap: 14px; }
.v3-toolbar { display: flex; gap: 8px; padding: 11px; margin-bottom: 13px; }
.v3-toolbar input,
.v3-toolbar select {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}
.v3-toolbar input { flex: 1; }
.v3-dark-btn { padding: 7px 16px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--surface-2); font-size: 10px; font-weight: 800; }
.v3-class-table { overflow-x: auto; }
.v3-class-head,
.v3-class-row { display: grid; min-width: 850px; grid-template-columns: 1.45fr 85px 75px 80px 75px 65px; align-items: center; gap: 9px; padding: 12px 15px; }
.v3-class-head { color: var(--dim); background: rgba(255,255,255,.022); font-size: 8px; }
.v3-class-row { border-top: 1px solid var(--line); color: #c3d0d6; font-size: 9px; }
.v3-class-row > div:first-child { display: flex; flex-direction: column; }
.v3-class-row strong { color: var(--text); font-size: 10px; }
.v3-class-row small { color: var(--dim); font-size: 8px; }
.v3-class-row a { color: var(--accent); font-size: 8px; font-weight: 800; }
.v3-empty-row { padding: 30px; color: var(--muted); text-align: center; }
.v3-side-stack { display: grid; align-content: start; gap: 13px; }
.v3-side-card { padding: 18px; }
.v3-side-card h2 { margin: 3px 0 12px; font-size: 18px; }
.v3-todo { display: grid; gap: 1px; overflow: hidden; border-radius: 9px; background: var(--line); }
.v3-todo a { display: flex; justify-content: space-between; padding: 11px; color: #c7d2d8; background: var(--surface-2); font-size: 9px; }
.v3-todo b { color: var(--accent); font-size: 15px; }
.v3-recent-list { display: grid; gap: 11px; }
.v3-recent-list a { display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 9px; }
.v3-recent-list i { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 8px; font-style: normal; font-weight: 900; }
.v3-recent-list span { display: flex; flex-direction: column; }
.v3-recent-list strong { color: #d5dfe4; font-size: 9px; }
.v3-recent-list small { color: var(--dim); font-size: 8px; }
.v3-bottom-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 13px; margin-top: 13px; }
.v3-bottom-card { padding: 18px; }
.v3-bottom-card h2 { margin-bottom: 12px; font-size: 19px; }
.v3-funnel { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; overflow: hidden; border-radius: 9px; background: var(--line); }
.v3-funnel div { display: flex; flex-direction: column; padding: 12px; background: var(--surface-2); }
.v3-funnel span,
.v3-funnel small { color: var(--dim); font-size: 8px; }
.v3-funnel strong { color: var(--accent); font-size: 20px; }
.v3-milestones { display: grid; gap: 8px; }
.v3-milestones div { display: grid; grid-template-columns: 54px 1fr; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.v3-milestones time { color: var(--accent); font-size: 8px; font-weight: 800; }
.v3-milestones span { color: #c8d3d9; font-size: 8px; }

/* Teacher workspace */
.teacher-class-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.teacher-class-card { padding: 22px; }
.teacher-class-card h2 { margin: 18px 0 5px; font-size: 22px; }
.teacher-class-card > p { color: var(--muted); font-size: 10px; }
.teacher-class-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; margin: 18px 0; border-radius: 10px; background: var(--line); }
.teacher-class-stats div { display: flex; flex-direction: column; padding: 10px; background: var(--surface-2); }
.teacher-class-stats span { color: var(--muted); font-size: 8px; }
.teacher-class-stats strong { color: var(--text); font-size: 20px; }
.attention-text { color: var(--danger) !important; }
.teacher-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.teacher-card-actions a { flex: 1; }
.teacher-reminder-panel { margin-top: 14px; padding: 20px; }
.teacher-reminder-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px 18px; }
.teacher-reminder-list > div { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.teacher-reminder-list > div > span:nth-child(2) { display: flex; flex-direction: column; }
.teacher-reminder-list small { color: var(--muted); font-size: 8px; }
.teacher-member-panel { padding: 21px; }
.teacher-member-table { overflow-x: auto; }
.teacher-member-head,
.teacher-member-row {
  display: grid;
  min-width: 820px;
  grid-template-columns: 1.4fr 110px 140px 80px 80px 120px;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
}

/* Public training intent */
.intent-shell {
  display: grid;
  min-height: calc(100vh - 82px);
  place-items: center;
  padding: 42px 20px 72px;
}
.page-back-row { display: flex; margin: -6px 0 14px; }
.global-back-row { display: flex; margin: -4px 0 14px; }
.global-back-row .soft-btn { min-height: 34px; padding: 6px 12px; font-size: 10px; }
.intent-card { width: min(620px, 100%); padding: 34px; }
.intent-card.wide { width: min(900px, 100%); }
.intent-card.compact { width: min(560px, 100%); text-align: center; }
.intent-card h1 { margin: 8px 0; font-size: 34px; }
.intent-card > p { color: var(--muted); }
.intent-form { display: grid; gap: 4px; margin-top: 20px; }
.intent-form.wide { margin-top: 24px; }
.intent-help { margin: 18px 0 0; color: var(--dim); font-size: 9px; }
.intent-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.intent-readonly {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: 9px;
}
.intent-question {
  display: grid;
  gap: 9px;
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.intent-question legend { padding: 0 7px; color: var(--text); font-size: 13px; font-weight: 800; }
.intent-question > label { display: flex; align-items: center; gap: 8px; color: #c6d2d8; font-size: 11px; }
.intent-question input[type="radio"],
.intent-question input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.intent-session-list { display: grid; gap: 8px; }
.intent-session-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}
.intent-session-list label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 10px; }
.intent-session-list select {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}
.intent-result { margin-top: 20px; }
.intent-edit-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 310px;
  gap: 15px;
  align-items: start;
}
.intent-edit-layout .form-panel { display: grid; gap: 12px; padding: 24px; }
.intent-edit-layout .field { margin-top: 4px; }
.intent-side-summary { padding: 22px; }
.intent-side-summary h2 { margin: 6px 0; }
.intent-side-summary dl { display: grid; gap: 10px; margin: 18px 0 0; }
.intent-side-summary dl div { display: flex; flex-direction: column; }
.intent-side-summary dt { color: var(--muted); font-size: 8px; }
.intent-side-summary dd { margin: 0; color: var(--text); font-size: 10px; }
.attendance-return-card { margin-top: 15px; }
.attendance-return-card h2 { margin: 6px 0 10px; }
.attendance-return-card .field { margin: 16px 0; }
.attendance-return-card .wide { width: 100%; }
.confirm-form-error[hidden] { display: none; }
.confirm-form-error { margin-bottom: 4px; }
.success-mark {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  margin: 18px auto;
  border-radius: 22px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 34px;
  font-weight: 900;
}

/* Attendance confirmation administration */
.intent-count-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 9px; margin-bottom: 14px; }
.intent-count-grid a {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.intent-count-grid span { color: var(--muted); font-size: 8px; }
.intent-count-grid strong { color: var(--accent); font-size: 23px; }
.attendance-filters {
  display: grid;
  grid-template-columns: 150px 140px 125px 115px 155px minmax(180px,1fr) auto;
  align-items: end;
  gap: 9px;
  padding: 15px;
  margin-bottom: 14px;
}
.attendance-filters label { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: var(--muted); font-size: 8px; }
.attendance-filters input,
.attendance-filters select {
  width: 100%;
  min-height: 39px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}
.attendance-table { overflow-x: auto; }
.attendance-head,
.attendance-row {
  display: grid;
  min-width: 1160px;
  grid-template-columns: 1.4fr 120px 70px 80px 1fr 100px 210px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}
.attendance-head { color: var(--dim); background: rgba(255,255,255,.022); font-size: 8px; }
.attendance-row { border-top: 1px solid var(--line); color: #c7d2d8; font-size: 9px; }
.intent-pref-list { display: flex; flex-wrap: wrap; gap: 4px; }
.intent-pref-list span { padding: 3px 6px; border-radius: 6px; color: var(--accent); background: var(--accent-soft); font-size: 8px; }
.attendance-actions form { display: flex; gap: 5px; }
.attendance-actions .primary-btn,
.attendance-actions .soft-btn { min-height: 30px; padding: 4px 8px; font-size: 8px; }
.review-history-list { display: grid; gap: 8px; }
.review-history-list > div { display: grid; grid-template-columns: auto 1fr; gap: 5px 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.review-history-list small { grid-column: 1 / -1; color: var(--muted); }

/* Account binding and practical assignment */
.inline-danger { display: inline; margin-left: 4px; }
.inline-danger button { border: 0; color: var(--danger); background: transparent; cursor: pointer; }
.binding-table { overflow-x: auto; }
.binding-head,
.binding-row {
  display: grid;
  min-width: 930px;
  grid-template-columns: 1.5fr 90px 90px 90px 80px 150px;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
}
.binding-head { color: var(--dim); font-size: 8px; }
.binding-row { border-top: 1px solid var(--line); font-size: 9px; }
.binding-row > div:first-child { display: flex; flex-direction: column; }
.binding-row small { color: var(--muted); font-size: 8px; }
.primary-btn.small,
.soft-btn.small { min-height: 30px; padding: 4px 9px; font-size: 8px; }
.assignment-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.75fr); gap: 15px; align-items: start; }
.assignment-layout > .panel { padding: 22px; }
.assignment-instructions { min-height: 300px; }
.assignment-card-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 9px;
}
.assignment-card-line strong { color: var(--text); }
.assignment-card-line a { color: var(--accent); font-weight: 800; }

@media (max-width: 900px) {
  .intent-count-grid { grid-template-columns: repeat(3,1fr); }
  .attendance-filters { grid-template-columns: 1fr 1fr; }
  .attendance-filters .wide { grid-column: 1 / -1; }
  .assignment-layout { grid-template-columns: 1fr; }
  .intent-edit-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .intent-card { padding: 24px 18px; }
  .intent-count-grid { grid-template-columns: 1fr 1fr; }
  .attendance-filters { grid-template-columns: 1fr; }
  .intent-heading,
  .intent-session-list > div { align-items: stretch; flex-direction: column; }
}
.teacher-member-head { color: var(--dim); font-size: 9px; }
.teacher-member-row { border-top: 1px solid var(--line); font-size: 9px; }
.teacher-member-row .audit-progress { width: 130px; }
.teacher-submission-list { display: grid; gap: 7px; margin-top: 16px; }
.teacher-submission-list > div {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.02);
}
.teacher-submission-list > div > span:nth-child(2) { display: flex; flex-direction: column; }
.teacher-submission-list small { color: var(--muted); font-size: 8px; }
.teacher-task-list { overflow-x: auto; }
.teacher-task-head,
.teacher-task-row {
  display: grid;
  min-width: 1080px;
  grid-template-columns: 1.4fr 80px 80px 315px 130px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}
.teacher-task-head { color: var(--dim); background: rgba(255,255,255,.022); font-size: 8px; }
.teacher-task-row { border-top: 1px solid var(--line); font-size: 9px; }
.teacher-task-row > div:first-child { display: flex; min-width: 0; flex-direction: column; }
.teacher-task-row small { color: var(--muted); font-size: 8px; }
.teacher-task-row a { color: var(--accent); font-size: 8px; }
.task-schedule-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 5px; }
.task-schedule-form label { display: flex; flex-direction: column; gap: 3px; color: var(--dim); font-size: 7px; }
.task-schedule-form input {
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 8px;
}
.task-actions { display: flex; align-items: center; gap: 7px; }
.task-actions form { margin: 0; }

/* Account administration */
.account-metric-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 9px; margin-bottom: 14px; }
.account-metric-grid a {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.account-metric-grid span { color: var(--muted); font-size: 8px; }
.account-metric-grid strong { color: var(--accent); font-size: 23px; }
.account-create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 14px; }
.account-create-card { display: grid; align-content: start; gap: 12px; padding: 20px; }
.account-create-card h2 { margin: 0; }
.account-create-card p { margin: 0; color: var(--muted); font-size: 9px; }
.account-create-card .form-grid { margin: 2px 0 5px; }
.account-filters { grid-template-columns: 130px 120px 130px 180px minmax(180px,1fr) auto; }
.account-table-panel { overflow: hidden; }
.account-table { overflow-x: auto; }
.account-head,
.account-row {
  display: grid;
  min-width: 1220px;
  grid-template-columns: 28px 150px 75px 60px 180px 150px 105px 210px;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
}
.account-head { color: var(--dim); background: rgba(255,255,255,.022); font-size: 8px; }
.account-row { border-top: 1px solid var(--line); color: #c7d2d8; font-size: 9px; }
.account-row > div:nth-child(2),
.account-row > div:nth-child(5) { display: flex; min-width: 0; flex-direction: column; }
.account-row small { color: var(--muted); font-size: 8px; }
.account-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.account-actions form { margin: 0; }
.account-actions .link-btn { font-size: 8px; }
.account-assign-form { display: flex; gap: 4px; }
.account-assign-form select {
  max-width: 120px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 8px;
}
@media (max-width: 900px) {
  .account-metric-grid { grid-template-columns: 1fr 1fr 1fr; }
  .account-create-grid { grid-template-columns: 1fr; }
  .account-filters { grid-template-columns: 1fr 1fr; }
}
.teacher-content-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(340px,.55fr); gap: 15px; align-items: start; }
.teacher-course-stack { display: grid; gap: 14px; }
.teacher-course-card { padding: 21px; }
.teacher-chapter { padding: 14px 0 8px; border-top: 1px solid var(--line); }
.teacher-chapter h3 { margin-bottom: 8px; }
.teacher-resource-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; }
.teacher-resource-row:nth-child(odd) { background: rgba(255,255,255,.025); }
.teacher-resource-row > div { display: flex; min-width: 0; flex-direction: column; }
.teacher-resource-row small { color: var(--muted); font-size: 8px; }
.teacher-content-tools { display: grid; gap: 14px; position: sticky; top: 92px; }
.teacher-content-tools .form-panel { display: grid; gap: 12px; padding: 21px; }
[data-resource-field][hidden] { display: none !important; }
.teacher-assignment-panel { margin: 15px 0; padding: 20px; }
.teacher-assignment-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.teacher-assignment-panel .inline-form select {
  flex: 1;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-2);
}
.profile-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-review-card { padding: 20px; }
.profile-review-row,
.profile-change-row { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.profile-review-row > div,
.profile-change-row > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.profile-review-row small,
.profile-change-row small { color: var(--muted); font-size: 9px; }
.profile-review-row form,
.profile-change-row form { display: flex; gap: 6px; }
.profile-review-row .soft-btn,
.profile-change-row .soft-btn { min-height: 30px; padding: 4px 8px; font-size: 8px; }

/* Analytics and OPC */
.analytics-hero { color: var(--text); background: linear-gradient(125deg, var(--surface-2), var(--bg-deep)); }
.analytics-title p,
.analytics-title small { color: var(--muted); }
.hero-numbers { background: var(--line); }
.hero-numbers div { background: var(--surface); }
.hero-numbers span,
.hero-numbers small { color: var(--muted); }
.hero-numbers strong { color: var(--accent); }
.metric-card { border-color: var(--line); background: var(--surface); }
.metric-card.accent { color: var(--text); background: var(--accent); }
.metric-card.accent .eyebrow,
.metric-card.accent p,
.metric-card.accent small { color: rgba(8,35,51,.72); }
.metric-card.accent .small-ring::before { background: var(--accent); }
.metric-main > strong { color: inherit; }
.metric-icon { color: var(--accent); background: var(--accent-soft); }
.chart-panel { background: var(--surface); }
.gender-donut { background: conic-gradient(var(--accent) var(--male), var(--accent-2) 0); }
.gender-donut::after { background: var(--surface); }
.dot { background: var(--accent); }
.dot-2 { background: var(--accent-2); }
.bar-chart i,
.horizontal-bars i,
.opc-breakdown i { background: rgba(255,255,255,.08); }
.bar-chart b,
.horizontal-bars b,
.opc-breakdown b { background: var(--accent); }
.city-detail { border-color: var(--line); }
.formula-note { color: #aebdc6; background: var(--surface-2); }
.opc-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}
.opc-summary-strip > div { display: flex; flex-direction: column; padding: 12px; background: var(--surface-2); }
.opc-summary-strip span,
.opc-summary-strip small { color: var(--muted); font-size: 8px; }
.opc-summary-strip strong { color: var(--accent); font-size: 20px; }
.opc-company-list { display: grid; gap: 7px; }
.opc-company-list > div {
  display: grid;
  grid-template-columns: 30px 1fr 105px 80px;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
}
.opc-company-list > div > span:not(.company-number) { display: flex; flex-direction: column; }
.opc-company-list strong { color: var(--text); font-size: 10px; }
.opc-company-list small { color: var(--muted); font-size: 8px; }
.company-number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 8px; font-weight: 900; }
.opc-empty { grid-template-columns: 1fr !important; color: var(--muted); text-align: center; }

/* Trajectory detail */
.trajectory-guide,
.trajectory-profile,
.courseware-audit,
.daily-audit,
.session-audit,
.event-audit { color: var(--text); }
.trajectory-profile { background: linear-gradient(125deg, var(--surface-2), var(--bg-deep)); }
.audit-kpi { border-color: var(--line); background: var(--surface); }
.audit-kpi.accent { background: var(--accent); color: var(--accent-ink); }
.audit-kpi.accent span,
.audit-kpi.accent small { color: rgba(8,35,51,.7); }
.courseware-head,
.mini-head,
.event-head { color: var(--dim); }
.courseware-row,
.mini-row,
.event-row,
.session-list > div { border-color: var(--line); }
.audit-progress { background: rgba(255,255,255,.08); }
.audit-progress b { background: var(--accent); }
.audit-progress small { color: var(--text); }
.session-mark { color: var(--accent); background: var(--accent-soft); }
.event-head { background: var(--surface-2); }
.event-open,
.event-heartbeat,
.event-complete { color: var(--accent); background: var(--accent-soft); }
.heat-cell { color: var(--muted); background: rgba(255,255,255,.05); }
.heat-cell.level-1,
.heat-legend .level-1 { color: var(--accent); background: rgba(87,226,197,.12); }
.heat-cell.level-2,
.heat-legend .level-2 { color: var(--accent-ink); background: rgba(87,226,197,.55); }
.heat-cell.level-3,
.heat-legend .level-3 { color: var(--accent-ink); background: var(--accent); }
.heat-legend i { background: rgba(255,255,255,.06); }

/* Learning center and schedules */
.learner-schedule-panel { margin: 18px 0; padding: 22px; }
.learner-schedule-list { display: grid; }
.learner-schedule-list > div {
  display: grid;
  grid-template-columns: 38px minmax(180px,1fr) 150px auto;
  align-items: center;
  gap: 12px;
  padding: 11px 5px;
  border-top: 1px solid var(--line);
}
.learner-schedule-list > div:first-child { border-top: 0; }
.learner-schedule-list > div > span:nth-child(2) { display: flex; flex-direction: column; }
.learner-schedule-list small { color: var(--muted); font-size: 9px; }
.schedule-time { display: flex; flex-direction: column; }
.schedule-time b { font-size: 9px; }
.learning-center-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 15px 0 22px; }
.learning-center-head h1 { margin: 5px 0; font-size: 42px; }
.learning-center-head p { margin: 0; color: var(--muted); }
.learning-search { display: flex; gap: 7px; }
.learning-search input {
  min-width: 280px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface-2);
}
.resource-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.resource-tabs a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 10px; font-weight: 700; }
.resource-tabs a.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.resource-card { display: flex; min-height: 245px; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.resource-card-top { display: flex; align-items: center; justify-content: space-between; }
.resource-card h2 { margin: 17px 0 4px; font-size: 18px; }
.resource-card > p { color: var(--muted); font-size: 9px; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 11px 0; color: var(--dim); font-size: 8px; }
.resource-progress { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.resource-progress .track { width: 100%; flex: 1; }
.resource-progress small { color: var(--muted); font-size: 8px; }
.resource-action { display: inline-flex; width: fit-content; margin-top: 13px; color: var(--accent); font-size: 9px; font-weight: 900; }
.resource-action.disabled { color: var(--dim); }
.no-download-note { margin-top: 16px; color: var(--dim); font-size: 9px; text-align: right; }
.document-preview-shell { overflow: hidden; border-radius: 14px; background: #fff; }
.document-preview-shell iframe { display: block; width: 100%; min-height: 620px; border: 0; background: #fff; }
.document-preview-shell p { margin: 0; padding: 10px 14px; color: #687784; background: #f4f6f4; font-size: 10px; text-align: center; }

/* Enrollment admin */
.enrollment-counts a { color: var(--text); border-color: var(--line); background: var(--surface); }
.enrollment-counts a.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.enrollment-toolbar { background: var(--surface); }
.enrollment-list,
.detail-card,
.review-card,
.convert-card { color: var(--text); }
.enrollment-head { color: var(--dim); background: var(--surface-2); }
.enrollment-row { border-color: var(--line); }
.enrollment-row:hover { background: var(--surface-2); }
.detail-dl > div { border-color: var(--line); }
.enrollment-files a,
.file-purged { color: var(--text); background: var(--surface-2); }
.enrollment-file-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}
.enrollment-file-preview > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}
.enrollment-file-preview > header > div { display: flex; min-width: 0; flex-direction: column; }
.enrollment-file-preview small { color: var(--muted); font-size: 8px; }
.enrollment-files .image-preview-link {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  background: var(--bg-deep);
  cursor: zoom-in;
}
.enrollment-files .image-preview-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}
.image-preview-link img {
  display: block;
  max-width: 100%;
  max-height: 620px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}
.enrollment-file-preview iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
  background: #fff;
}
.preview-unavailable { padding: 36px 20px; color: var(--muted); text-align: center; }
.enrollment-file-preview > footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.enrollment-files .enrollment-file-preview > footer .soft-btn { display: inline-flex; min-height: 31px; padding: 5px 9px; font-size: 8px; }
.enrollment-file-preview > footer span { margin-left: auto; color: var(--dim); font-size: 8px; }
.image-lightbox-dialog { width: min(1120px, calc(100vw - 32px)); }
.image-lightbox-dialog .app-dialog-card { width: 100%; }
.image-lightbox-body {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 18px;
  background: #06111a;
}
.image-lightbox-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 74vh;
  border-radius: 8px;
  object-fit: contain;
}
.image-lightbox-dialog .app-dialog-footer { align-items: center; }
.image-lightbox-dialog .app-dialog-footer .primary-btn { margin-left: auto; }
.material-head-actions { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 9px; }
.material-head-actions form { margin: 0; }
.material-head-actions .soft-btn { min-height: 30px; padding: 5px 9px; font-size: 9px; }
.file-purged { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 11px; }
.file-purged > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.file-purged small { color: var(--muted); font-size: 9px; }
.file-purged em { color: var(--warning); font-size: 9px; font-style: normal; }
.reset-password-card code { color: var(--accent); background: var(--bg-deep); }
.audit-head,
.credential-head { color: var(--dim); }
.audit-row,
.credential-row { border-color: var(--line); }
.credential-row code { color: var(--accent); background: var(--surface-2); }
.pagination { color: var(--muted); }
.pagination-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.pagination-summary { color: var(--muted); font-size: 9px; }
.pagination-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pagination-controls .soft-btn { min-height: 30px; padding: 4px 8px; font-size: 8px; }
.pagination-controls .soft-btn.disabled { pointer-events: none; opacity: .35; }
.pagination-page {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 800;
}
.pagination-page:hover { color: var(--text); border-color: var(--accent); }
.pagination-page.active { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.pagination-gap { padding: 0 3px; color: var(--dim); }

@media (max-width: 1100px) {
  .v3-metric-grid { grid-template-columns: 1fr 1fr; }
  .v3-class-layout { grid-template-columns: 1fr; }
  .v3-side-stack { grid-template-columns: 1fr 1fr; }
  .opc-company-list > div { grid-template-columns: 28px 1fr 100px; }
  .opc-company-list > div > :last-child { display: none; }
}

@media (max-width: 680px) {
  .v3-title-row { align-items: flex-start; flex-direction: column; }
  .v3-metric-grid { grid-template-columns: 1fr 1fr; }
  .v3-toolbar { flex-wrap: wrap; }
  .v3-side-stack,
  .v3-bottom-grid { grid-template-columns: 1fr; }
  .v3-funnel { grid-template-columns: 1fr 1fr; }
  .profile-match-callout { align-items: flex-start; flex-direction: column; }
  .match-confirm-card { align-items: flex-start; flex-direction: column; }
  .matched-meta { grid-template-columns: 1fr 1fr; }
  .opc-company-list > div { grid-template-columns: 26px 1fr; }
  .opc-company-list > div > :nth-child(3),
  .opc-company-list > div > :nth-child(4) { display: none; }
  .public-copy { width: calc(100% - 36px); padding: 50px 0 34px; }
  .public-copy h1 { font-size: 39px; }
  .public-materials-strip { grid-template-columns: 1fr 1fr; margin-top: 34px; }
  .material-strip-title { grid-column: 1 / -1; }
  .login-stage { padding: 24px 18px; }
  .login-center { align-items: stretch; flex-direction: column; gap: 28px; padding: 50px 0; }
  .login-intro { max-width: none; text-align: center; }
  .login-intro h1 { font-size: 38px; }
  .login-card { width: 100%; padding: 25px; }
  .teacher-class-grid,
  .teacher-content-tools { grid-template-columns: 1fr; }
  .profile-review-grid { grid-template-columns: 1fr; }
  .teacher-reminder-list { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .teacher-class-grid { grid-template-columns: 1fr 1fr; }
  .teacher-content-layout { grid-template-columns: 1fr; }
  .teacher-content-tools { position: static; grid-template-columns: 1fr 1fr; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .teacher-class-grid,
  .teacher-content-tools { grid-template-columns: 1fr; }
  .learning-center-head { align-items: stretch; flex-direction: column; }
  .learning-search input { min-width: 0; flex: 1; }
  .resource-grid { grid-template-columns: 1fr; }
  .learner-schedule-list > div { grid-template-columns: 36px 1fr auto; }
  .schedule-time { display: none; }
}

/* Course authoring actions and dialogs */
.content-title-row { align-items: flex-end; }
.content-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.content-head-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}
.content-flow-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -5px 0 15px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.022);
  font-size: 9px;
}
.content-flow-note > span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}
.content-flow-note > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.content-flow-note b {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 8px;
}
.content-flow-note i { color: var(--dim); font-style: normal; }
.content-workbench { width: 100%; }
.content-empty-state {
  min-height: 360px;
  align-content: center;
  justify-items: center;
  padding: 48px 24px;
  text-align: center;
}
.content-empty-state .empty-step {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 900;
}
.content-empty-state h2 { margin-bottom: 6px; font-size: 25px; }
.content-empty-state p { max-width: 480px; color: var(--muted); font-size: 11px; }
.content-empty-state .primary-btn { margin-top: 12px; }
.chapter-create-form { align-items: center; }
.chapter-create-form input { min-width: 0; }

.app-dialog {
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--text);
  background: transparent;
}
.app-dialog-wide { width: min(880px, calc(100vw - 32px)); }
.app-dialog::backdrop {
  background: rgba(2, 12, 20, .76);
  backdrop-filter: blur(5px);
}
.app-dialog[open] { animation: dialog-rise .18s ease-out; }
.app-dialog-card {
  display: flex;
  max-height: min(88vh, 900px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .42);
}
.app-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px 19px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}
.app-dialog-header h2 { margin: 5px 0 3px; font-size: 25px; }
.app-dialog-header p { margin: 0; color: var(--muted); font-size: 10px; }
.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: 20px;
  line-height: 1;
}
.dialog-close:hover { color: var(--text); border-color: var(--accent); }
.app-dialog-body {
  padding: 4px 26px 24px;
  overflow-y: auto;
}
.app-dialog-body .field:first-child { margin-top: 0; }
.app-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: rgba(4, 20, 33, .45);
}
@keyframes dialog-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  .content-title-row { align-items: stretch; flex-direction: column; }
  .content-head-actions { width: 100%; justify-content: stretch; }
  .content-head-actions .soft-btn,
  .content-head-actions .primary-btn { flex: 1; }
  .content-flow-note { align-items: flex-start; flex-direction: column; gap: 8px; }
  .chapter-create-form { align-items: stretch; flex-direction: column; }
  .chapter-create-form .soft-btn { width: 100%; }
  .app-dialog-header { padding: 20px 19px 16px; }
  .app-dialog-body { padding: 3px 19px 20px; }
  .app-dialog-footer { padding: 14px 19px; }
  .app-dialog-footer .soft-btn,
  .app-dialog-footer .primary-btn { flex: 1; }
  .app-dialog-body .form-grid { grid-template-columns: 1fr; }
}

/* Mobile public and administration navigation */
.mobile-nav-toggle,
.mobile-nav-close,
.mobile-nav-backdrop { display: none; }
.topbar-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.topbar-title > span { display: flex; flex-direction: column; min-width: 0; }
.login-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.login-home-link,
.registration-home-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.registration-nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

@media (max-width: 900px) {
  body.mobile-nav-open { overflow: hidden; }
  .admin-shell .sidebar {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 120;
    width: min(84vw, 320px);
    height: 100dvh;
    padding: 22px 18px 18px;
    flex-direction: column;
    align-items: stretch;
    border-top: 0;
    border-right: 1px solid var(--line);
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
  }
  .mobile-nav-open .sidebar { transform: translateX(0); }
  .mobile-nav-open .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    border: 0;
    background: rgba(1, 10, 17, .7);
    backdrop-filter: blur(3px);
  }
  .admin-shell .sidebar .brand {
    display: flex !important;
    justify-content: flex-start;
    padding: 0 38px 22px 4px;
  }
  .admin-shell .sidebar .brand > span:last-child { display: flex !important; }
  .admin-shell .side-nav {
    display: grid !important;
    width: 100%;
    gap: 5px;
    align-content: start;
  }
  .admin-shell .side-nav a {
    justify-content: space-between;
    min-height: 46px;
    padding: 9px 11px;
    flex-direction: row;
    text-align: left;
  }
  .admin-shell .side-nav a span {
    display: block !important;
    flex: 1;
    min-width: 0;
    font-size: 11px;
    white-space: nowrap;
  }
  .admin-shell .side-nav a i { display: block !important; }
  .admin-shell .side-user {
    display: flex !important;
    justify-content: flex-start;
    margin-top: 18px;
    padding: 14px 4px 0;
  }
  .admin-shell .side-user > div { display: flex !important; }
  .admin-shell .side-user .icon-btn { display: grid !important; margin-left: auto; }
  .mobile-nav-toggle {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-2);
    font-size: 17px;
  }
  .mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 14px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 18px;
  }
  .admin-shell .admin-main { margin-left: 0; padding-bottom: 0; }
  .admin-topbar { min-height: 64px; }
}

@media (max-width: 680px) {
  .public-nav {
    height: auto;
    min-height: 0;
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .nav-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .nav-actions > a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .nav-actions > a:first-child { grid-column: 1 / -1; }
  .public-nav > .nav-actions > a:first-child { display: inline-flex; }
  .public-copy { padding: 42px 22px; }
  .public-copy h1 { font-size: 32px; line-height: 1.22; letter-spacing: -.04em; }
  .public-copy > p { font-size: 14px; }
  .public-actions { flex-direction: column; }
  .public-actions .btn-accent,
  .public-actions .btn-soft { width: 100%; min-height: 48px; }
  .public-materials-strip { grid-template-columns: 1fr; }
  .public-materials-strip > div { min-height: 66px; }
  .registration-nav { align-items: stretch; }
  .registration-nav-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .registration-nav-actions a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    text-align: center;
  }
  .public-nav > .registration-nav-actions > a:first-child { display: inline-flex; }
  .registration-nav-actions .registration-home-link { grid-column: 1 / -1; color: var(--accent); }
  .registration-hero { padding: 25px 20px; }
  .registration-hero h1 { font-size: 29px; }
  .form-section-card { padding: 18px 15px; }
  .form-section-card .section-title { align-items: flex-start; }
  .registration-checks { grid-template-columns: 1fr; }
  .registration-submit {
    position: sticky;
    bottom: 8px;
    z-index: 10;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(6, 27, 44, .95);
    backdrop-filter: blur(8px);
  }
  .registration-submit .primary-btn,
  .registration-submit .soft-btn { min-height: 46px; flex: 1; }
  .login-stage { min-height: 100dvh; padding: 18px 14px; }
  .login-topbar { width: 100%; }
  .login-center { padding: 28px 0; }
  .login-card { width: 100%; padding: 24px 19px; }
  .login-intro { text-align: center; }
  .login-intro h1 { font-size: 34px; }
  .learner-nav {
    height: auto;
    min-height: 64px;
    padding: 11px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .learner-nav nav {
    width: 100%;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .learner-nav nav a,
  .learner-nav nav form { flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; }
  .learner-nav nav a:nth-child(3) { display: inline-flex; }
  .learner-main { margin-top: 12px; }
  .page,
  .admin-main > .page { padding-left: 12px; padding-right: 12px; }
  .v3-title-row h1 { font-size: 29px; }
  .v3-metric-grid,
  .intent-count-grid,
  .account-metric-grid,
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .head-actions { width: 100%; flex-wrap: wrap; }
  .head-actions > * { flex: 1 1 140px; }
  .attendance-filters,
  .account-filters,
  .trajectory-filter { grid-template-columns: 1fr; }
  .attendance-head,
  .account-head,
  .teacher-task-head,
  .binding-head { display: none; }
  .attendance-row,
  .account-row {
    min-width: 0;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 14px;
    margin-top: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
  }
  .attendance-row > .member-name,
  .account-row > :nth-child(2) { grid-column: 1 / -1; }
  .attendance-row [data-label]::before {
    display: block;
    margin-bottom: 2px;
    color: var(--dim);
    content: attr(data-label);
    font-size: 7px;
    font-weight: 700;
    white-space: nowrap;
  }
  .attendance-row .pill[data-label] { align-items: flex-start; }
  .attendance-row > :nth-child(5),
  .attendance-row > .attendance-actions { grid-column: 1 / -1; }
  .attendance-actions { flex-wrap: wrap; }
  .account-row > :first-child { position: absolute; }
  .account-row > :nth-child(3),
  .account-row > :nth-child(4),
  .account-row > :nth-child(5),
  .account-row > :nth-child(6),
  .account-row > :nth-child(7),
  .account-row > .account-actions { grid-column: 1 / -1; }
  .enrollment-head { display: none; }
  .enrollment-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
    padding: 14px;
    margin-top: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .enrollment-row > .member-name { grid-column: 1; }
  .enrollment-row > .pill { grid-column: 2; grid-row: 1; }
  .enrollment-row > code,
  .enrollment-row > span:nth-child(3),
  .enrollment-row > span:nth-child(4),
  .enrollment-row > span:nth-child(5) { grid-column: 1 / -1; }
  .enrollment-row > .row-link { grid-column: 2; grid-row: 2; }
  .enrollment-detail-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .enrollment-file-preview iframe { height: 65vh; min-height: 420px; }
  .enrollment-file-preview > footer span { width: 100%; margin-left: 0; }
  .pagination-buttons { align-items: stretch; flex-direction: column; }
  .pagination-controls { display: grid; grid-template-columns: repeat(4, auto); }
  .pagination-controls .soft-btn { min-height: 36px; }
  .account-create-grid,
  .assignment-layout,
  .intent-edit-layout { grid-template-columns: 1fr; }
  .app-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
  }
  .app-dialog-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .app-dialog-body { flex: 1; }
}

