/* ClasSight. Colors and shapes come from the logo: deep green tiles, one green dot, one outlined (empty) tile. */
@font-face {
  /* The wordmark is set in Outfit. Put outfit-latin.woff2 in web/fonts/ to use it for headings; without it Segoe UI is used. */
  font-family: "Outfit"; font-weight: 100 900; font-display: swap;
  src: local("Outfit"), url("/fonts/outfit-latin.woff2") format("woff2");
}
:root {
  --brand: #0b3b2e;
  --green: #16a34a;
  --lime: #b8f35a;
  --mint: #c9e3d8;

  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #ebf1ee;
  --ink: #0e2a21;
  --ink-2: #3d554c;
  --muted: #627970;
  --line: #d9e3de;
  --accent: #0f7b3a;
  --accent-soft: #e3f4e8;
  --primary: #0b3b2e;
  --primary-ink: #ffffff;
  --data: #0b3b2e;
  --danger: #c5302a;
  --danger-soft: #fcebe9;
  --ok: #16a34a;
  --ok-soft: #d6f1df;
  --disc: #b4540a;
  --disc-soft: #fdeedc;
  --paste: #8a4b08;
  --paste-soft: #fdf1cf;
  --r-lg: 12px;
  --r: 8px;
  --r-sm: 6px;
  --font-display: "Outfit", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1713;
    --surface: #10221c;
    --surface-2: #183029;
    --ink: #e8f1ed;
    --ink-2: #b9cbc3;
    --muted: #869b92;
    --line: #223c34;
    --accent: #b8f35a;
    --accent-soft: #1f3a22;
    --primary: #b8f35a;
    --primary-ink: #0b3b2e;
    --data: #7ade8f;
    --danger: #ff7a70;
    --danger-soft: #3a1c1a;
    --ok: #4ade80;
    --ok-soft: #143524;
    --disc: #fb923c;
    --disc-soft: #3b2412;
    --paste: #fcd34d;
    --paste-soft: #3a2c0b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 var(--font-text);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

/* The sidebar is the brand's dark green in both themes; it re-declares the tokens so buttons, inputs and dots adapt. */
.sidebar {
  --surface: rgba(255, 255, 255, .07);
  --surface-2: rgba(255, 255, 255, .13);
  --ink: #ffffff;
  --ink-2: #d5e6de;
  --muted: #9dbdb0;
  --line: rgba(255, 255, 255, .16);
  --accent: #b8f35a;
  --accent-soft: rgba(184, 243, 90, .16);
  --primary: #b8f35a;
  --primary-ink: #0b3b2e;
  --danger: #ff8a80;
  --danger-soft: rgba(255, 138, 128, .25);
  --ok: #b8f35a;
  --ok-soft: rgba(184, 243, 90, .22);
  --disc: #ffb86b;
  --disc-soft: rgba(255, 184, 107, .25);
  color-scheme: dark;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--brand); color: var(--ink);
  display: flex; flex-direction: column; padding: 18px 12px 12px;
}
.brand { display: block; padding: 0 6px 18px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 34px; width: auto; margin-left: -2px; }
.brand-sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; padding-left: 1px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r);
  color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.nav a.active svg { color: var(--lime); }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar-foot {
  margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 12px 10px 4px; font-size: 12.5px;
  color: var(--ink-2); border-top: 1px solid var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.alert { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

.main { padding: 28px 36px 64px; min-width: 0; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; max-width: 100ch; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head > a, .section-head > .btn-group, .section-head > .legend, .section-head > .input { margin-left: auto; }
.section-head h2 { font-size: 17px; margin: 0; }
.section-head .hint { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pad { padding: 18px; }

/* figures: one strip with dividers instead of a row of separate cards */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.kpis .kpi { padding: 14px 18px; border: 0; border-radius: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font: 600 24px/1.25 var(--font-display); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi.alert .value { color: var(--danger); }
.kpi.warn .value { color: var(--disc); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--green)); }
.btn.danger { color: var(--danger); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.input { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line);
  background: var(--surface); border-radius: var(--r); cursor: pointer; color: var(--muted);
}
.icon-btn .ic { width: 14px; height: 14px; }
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2);
}
.chip .sw { width: 8px; height: 8px; border-radius: 50%; }
.chip.live { background: var(--danger); color: #fff; }
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@media (prefers-color-scheme: dark) { .chip.live, .chip.suspicious { color: #2a0b09; } .chip.live::before { background: #2a0b09; } }
@keyframes blink { 50% { opacity: .2; } }
.chip.disc { background: var(--disc-soft); color: var(--disc); }
.chip.suspicious { background: var(--danger); color: #fff; }
.chip.ended { background: none; color: var(--muted); border: 1px dashed var(--line); }
.chip.paste { background: var(--paste-soft); color: var(--paste); }
.chip.from { background: none; color: var(--ink-2); border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-chip { cursor: pointer; border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; }
.filter-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* nothing here yet: the logo's outlined tile */
.empty { padding: 22px 20px; color: var(--ink-2); border: 1.5px dashed var(--line); border-radius: var(--r-lg); }
.empty b { display: block; color: var(--ink); font: 600 15px/1.4 var(--font-display); margin-bottom: 2px; }
.muted { color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; padding-top: 11px; padding-bottom: 9px; }
tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; }
td.tabular, td.num, td.nowrap, .who b, td.pc-cell { white-space: nowrap; }
.who b { display: block; }
.who span { color: var(--muted); font-size: 12px; }
.who a { color: inherit; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell .bar { width: 70px; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar-cell .bar i { display: block; height: 100%; background: var(--data); border-radius: 3px; }
.thumb { width: 132px; aspect-ratio: 16/10; object-fit: cover; object-position: top; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; background: var(--surface-2); cursor: zoom-in; }
.thumb-empty { display: grid; place-items: center; font-size: 11.5px; color: var(--muted); cursor: default; border-style: dashed; background: none; }
.activity-preview { color: var(--ink-2); font-size: 12.5px; max-width: 380px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
tr.row-muted td { opacity: .6; }
tr.row-suspicious td { background: var(--danger-soft); }
td.verdict { white-space: normal; min-width: 260px; max-width: 420px; font-size: 13px; }
.class-chip { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

/* ---------------------------------------------------------------- sidebar: class + recording */
.class-box { margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.class-box label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.class-box select { width: 100%; font-weight: 600; font-size: 13px; }
.sidebar .input { background: rgba(0, 0, 0, .22); }
.class-note { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.class-note.warn { color: var(--disc); font-weight: 600; }
.end-class { width: 100%; justify-content: center; margin-top: 8px; font-size: 13px; white-space: normal; text-align: center; }
.end-class.armed { background: var(--danger); border-color: var(--danger); color: #2a0b09; }
.rec-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rec-now { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.rec-now b { color: var(--ink); }
.rec-now .muted { display: block; font-size: 12px; }
.dot.rec { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); animation: pulse 1.6s infinite; }
.rec-new { width: 100%; justify-content: center; margin-top: 10px; font-size: 13px; }
.rec-form { margin-top: 10px; display: grid; gap: 6px; }
.rec-form .input { width: 100%; font-size: 13px; }
.rec-form-btns { display: flex; gap: 6px; }
.rec-form-btns .btn { flex: 1; justify-content: center; }

/* recordings strip on the daily log */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 0 0 20px; }
.rec-card { display: block; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  color: var(--ink-2); font-size: 12.5px; line-height: 1.5; position: relative; }
.rec-card:hover { border-color: var(--accent); text-decoration: none; }
.rec-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.rec-card .t { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); font-size: 14px; padding-right: 26px; }
.rec-card .n { color: var(--muted); font-weight: 500; }
.rec-card .stats { margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.rec-card .stats b { color: var(--ink); }
.rec-card .stats .bad { color: var(--danger); }
.rec-card .rename { position: absolute; top: 7px; right: 7px; border: 0; background: none; color: var(--muted);
  cursor: pointer; padding: 4px; border-radius: var(--r-sm); display: grid; }
.rec-card .rename .ic { width: 14px; height: 14px; }
.rec-card .rename:hover { background: var(--surface-2); color: var(--ink); }
.rec-head { display: flex; align-items: baseline; gap: 6px 14px; margin: 0 0 10px; flex-wrap: wrap; }
.rec-head h2 { font-size: 17px; margin: 0; }
.rec-head .hint { color: var(--muted); font-size: 13px; }
.filter-bar { display: flex; align-items: center; gap: 8px; }
.filter-bar label { font-size: 13px; color: var(--muted); }

/* class picker dialog */
.modal-back { position: fixed; inset: 0; background: rgba(4, 20, 15, .6); z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal { width: min(560px, 100%); padding: 24px; max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0 0 4px; font-size: 21px; }
.modal p { margin: 0; color: var(--ink-2); }
.modal-actions { justify-content: space-between; margin-top: 16px; }
.class-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.class-choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; width: 100%; }
.class-choice:hover, .class-choice.suggested { border-color: var(--accent); background: var(--accent-soft); }
.class-choice b { display: block; font-size: 15px; }
.class-choice span { color: var(--ink-2); font-size: 12.5px; }
.class-choice .now { color: var(--accent); font-weight: 600; font-size: 12.5px; white-space: nowrap; }

/* classes page */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.class-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.class-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.class-card h3 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.class-card .subj { color: var(--ink-2); font-size: 13px; }
.class-card .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.class-card table th, .class-card table td { padding: 5px 10px 5px 0; font-size: 12.5px; }
.class-card .stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.class-card .stats b { color: var(--ink); font: 600 17px/1.3 var(--font-display); display: block; }
.class-card .stats b.bad { color: var(--danger); }
.class-card.current { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.notice { padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--r); background: var(--surface); }
.notice.warn { border-left-color: var(--disc); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field .input { width: 100%; }
.form-sub { font-size: 17px; margin: 26px 0 10px; }
.sched-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr .9fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.sched-head { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.form-error { color: var(--danger); font-weight: 600; margin-top: 10px; }
.form-actions { margin-top: 22px; justify-content: space-between; }

/* disconnects */
.pc.disc { border-color: var(--disc); background: var(--disc-soft); }
.pc.disc .tool { color: var(--disc); font-weight: 600; font-size: 12px; }
.dot.disc { background: var(--disc); box-shadow: 0 0 0 3px var(--disc-soft); animation: pulse 1.6s infinite; }
.now-card.disc-card { border-color: color-mix(in srgb, var(--disc) 55%, var(--line)); }
.now-card.disc-card .elapsed { color: var(--disc); }
.disc-remove { margin-top: 10px; width: 100%; justify-content: center; color: var(--muted); }
.disc-remove:hover { color: var(--danger); border-color: var(--danger); }

/* charts */
.charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.chart-title { font: 600 15px/1.4 var(--font-display); margin-bottom: 12px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 130px; }
.hours .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.hours .col i { display: block; background: var(--data); border-radius: 3px 3px 0 0; min-height: 2px; }
.hours .col.zero i { background: var(--line); }
.hours .col:hover i { background: var(--green); }
.hours .col.zero:hover i { background: var(--line); }
.hours-axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: 11px; color: var(--muted); margin-top: 5px; text-align: center; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }
.hbar .track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 4px; }

/* ---------------------------------------------------------------- live lab */
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.now-card { overflow: hidden; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); display: block; color: inherit; }
.now-card:hover { text-decoration: none; border-color: var(--danger); }
.now-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; display: block; background: var(--surface-2); }
.now-card .img-clean { display: none; }
.now-card .body { padding: 12px 14px; }
.now-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.now-card .row + .row { margin-top: 4px; }
.now-card .elapsed { font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.now-card .act { color: var(--ink-2); font-size: 12.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* lab computers: the logo's grid. Filled tile = a PC that is on, outlined tile = off. */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pc {
  padding: 11px 13px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; min-height: 76px; color: inherit;
}
a.pc:hover { text-decoration: none; border-color: var(--danger); }
.pc .name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.pc .user { color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc.offline { background: none; }
.pc.offline .name, .pc.offline .user { color: var(--muted); }
.pc.offline .name { font-weight: 500; }
.pc.ai { border-color: var(--danger); background: var(--danger-soft); }
.pc.ai .tool { color: var(--danger); font-weight: 600; font-size: 12px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

/* day nav */
.day-nav { display: flex; gap: 6px; align-items: center; }
.day-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.day-strip { margin: -6px 0 22px; }
.day-pill { padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--ink-2); }
.day-pill:hover { border-color: var(--accent); text-decoration: none; }
.day-pill.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.day-pill b { margin-left: 6px; font-variant-numeric: tabular-nums; }

/* session detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.viewer { overflow: hidden; }
.viewer .stage { position: relative; background: #06110d; cursor: zoom-in; }
.viewer .stage img { display: block; width: 100%; }
.viewer .stage .stamp {
  position: absolute; left: 10px; bottom: 10px; background: rgba(4, 20, 15, .8); color: #fff;
  padding: 3px 9px; border-radius: var(--r-sm); font-size: 12px; font-variant-numeric: tabular-nums;
}
.timeline { display: flex; gap: 8px; overflow-x: auto; padding: 12px; border-top: 1px solid var(--line); }
.timeline button { flex: none; border: 2px solid transparent; border-radius: var(--r); padding: 0; background: none; cursor: pointer; text-align: center; }
.timeline button img { width: 120px; aspect-ratio: 16/10; object-fit: cover; object-position: top; border-radius: var(--r-sm); display: block; }
.timeline button span { display: block; font-size: 11.5px; color: var(--muted); padding: 3px 0 2px; font-variant-numeric: tabular-nums; }
.timeline button.on { border-color: var(--green); }
.timeline button.on span { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.side-stack { display: flex; flex-direction: column; gap: 14px; }
.side-stack h3 { font-size: 15px; margin: 0 0 10px; }
.did { max-height: 320px; overflow-y: auto; font-size: 13px; line-height: 1.5; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 10px; }
.did > div { padding: 2px 0; }
.did-note { margin: -4px 0 8px; font-size: 12.5px; color: var(--muted); }
.screen-text {
  white-space: pre-wrap; font: 12px/1.5 Consolas, "Cascadia Mono", monospace; background: var(--surface-2);
  padding: 12px; border-radius: var(--r); max-height: 340px; overflow: auto; margin: 0;
}
mark { background: var(--lime); color: #0b3b2e; border-radius: 2px; }
video { width: 100%; border-radius: var(--r); background: #000; display: block; }
.video-link { margin-top: 8px; }
.sub-note { font-size: 12px; margin-top: 3px; color: var(--muted); }

.lightbox {
  position: fixed; inset: 0; background: rgba(3, 12, 9, .94); z-index: 50; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox img { max-height: calc(100vh - 90px); object-fit: contain; border-radius: var(--r-sm); }
.lb-caption { color: #d5e6de; margin-top: 10px; font-size: 13px; }
.lb-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; background: none; border: none; border-radius: var(--r); color: #fff; cursor: pointer; }
.lb-close:hover { background: rgba(255, 255, 255, .12); }
.lb-close .ic { width: 22px; height: 22px; }

.search-box { display: flex; gap: 8px; max-width: 640px; }
.search-box .input { flex: 1; padding: 10px 12px; font-size: 15px; }
.w-find { width: 240px; }
.more-row { margin-top: 10px; }
.foot-note { margin-top: 16px; color: var(--muted); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .detail { grid-template-columns: 1fr; }
  .charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { min-width: 0; position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 8px; }
  .brand { padding: 0; }
  .brand img { height: 28px; }
  .brand-sub, .sidebar-foot { display: none; }
  .class-box { order: 3; width: 100%; margin: 4px 0 0; }
  .nav { flex-direction: row; overflow-x: auto; width: 100%; }
  .nav a { white-space: nowrap; padding: 7px 10px; }
  .main { padding: 18px 16px 50px; }
  .thumb { width: 96px; }
  .sched-row { grid-template-columns: 1fr 1fr; }
  .sched-head { display: none; }
  .class-grid { grid-template-columns: minmax(0, 1fr); }
  .w-find { width: 100%; }
}

/* ---------------------------------------------------------------- "Using AI right now" full screen */
.fs-only { display: none; }
/* full screen is always anonymous: names, PCs, AI tool names and times are never shown there */
.anon-only { display: none; }
body.now-fs .anon-only { display: inline; }
body.now-fs .priv { display: none !important; }
.now-actions { margin-left: auto; }
body.now-fs .app { grid-template-columns: 1fr; }
body.now-fs .sidebar, body.now-fs #view > :not(.now-section), body.now-fs .fs-hide { display: none; }
body.now-fs .fs-only { display: inline; }
body.now-fs .main { padding: 18px 22px; }
body.now-fs .now-section { margin: 0; }
body.now-fs .now-section .section-head { align-items: center; margin-bottom: 14px; }
body.now-fs .now-section h2 { font-size: 24px; }
body.now-fs .fs-info { color: var(--muted); font-size: 14px; }
/* full screen is for showing the class: small cards, plain screenshots, nothing about how detection works */
body.now-fs .now-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 170px)); gap: 10px; justify-content: start; }
body.now-fs .now-card .body { font-size: 12px; line-height: 1.3; padding: 6px 8px; }
body.now-fs .now-card .chip { font-size: 11px; padding: 1px 6px; }
/* small cards: PC and tool chips stack instead of being cut off */
body.now-fs .now-card .row { align-items: flex-start; flex-wrap: wrap; row-gap: 3px; }
body.now-fs .now-card .row .muted { white-space: nowrap; font-size: 11px; }
body.now-fs .now-card .chips { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
body.now-fs .now-card .img-proof, body.now-fs .now-card .act, body.now-fs .teacher-only, .ss .teacher-only { display: none !important; }
body.now-fs .now-card .img-clean { display: block; }
/* full height: the cards area and the stats column fill the screen below the title */
body.now-fs { --fs-body-h: calc(100vh - 92px); }
body.now-fs .empty { min-height: var(--fs-body-h); margin: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
body.now-fs .now-main { min-height: var(--fs-body-h); }

/* ---------------------------------------------------------------- live AI slideshow / picture-in-picture */
/* always dark, whatever the theme: it is projected to the class */
.ss, body.ss-pip-body {
  --surface: #0f231c;
  --surface-2: #183029;
  --ink: #eef5f1;
  --ink-2: #c4d6cd;
  --muted: #93aaa0;
  --line: #223c34;
  --accent: #b8f35a;
  --data: #7ade8f;
  --danger: #ff7a70;
  --danger-soft: #3a1c1a;
  --paste: #fcd34d;
  --paste-soft: #3a2c0b;
  color-scheme: dark;
}
.ss {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 18px 12px; background: #07140f; color: var(--ink);
}
.ss-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ss-title { display: flex; align-items: center; gap: 9px; font: 600 19px/1.3 var(--font-display); min-width: 0; }
.ss-count { font-variant-numeric: tabular-nums; color: var(--danger); }
.ss-class { color: var(--muted); font: 13px var(--font-text); margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-ctrl { display: flex; gap: 6px; align-items: center; }
.ss-ctrl button, .ss-ctrl select {
  display: inline-grid; place-items: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  min-width: 36px; height: 34px; padding: 0 9px; cursor: pointer; font-size: 14px;
}
.ss-ctrl button:hover { background: var(--surface-2); }
.ss-ctrl button.on { background: var(--lime); border-color: var(--lime); color: #0b3b2e; }
.ss-hidden-badge { margin-left: 8px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--lime); color: #0b3b2e; font: 600 12px var(--font-text); white-space: nowrap; }
.ss-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 380px; gap: 14px; }
.ss-side { min-height: 0; overflow-y: auto; }
.ss-stage { min-height: 0; display: grid; place-items: center; background: #000; border-radius: var(--r-lg); overflow: hidden; }
.ss-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ss-empty { text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.ss-empty b { color: var(--ink); font: 600 21px/1.3 var(--font-display); }
.ss-info { display: flex; flex-direction: column; gap: 4px; }
.ss-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ss-name { font: 600 24px/1.3 var(--font-display); }
.ss-elapsed { font-size: 24px; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }
.ss-pc { color: var(--muted); font-size: 15px; }
.ss-tools .chip { font-size: 13px; }
.ss-act { color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ss-strip:empty { display: none; }
.ss-thumb {
  flex: none; width: 112px; padding: 0; border: 2px solid transparent; border-radius: var(--r); background: var(--surface);
  color: var(--ink-2); cursor: pointer; overflow: hidden; font-size: 11.5px; text-align: center;
}
.ss-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; display: block; }
.ss-thumb span { display: block; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-thumb.on { border-color: var(--lime); color: #fff; }
/* compact layout inside the small floating window */
body.ss-pip-body { margin: 0; background: #07140f; }
.ss.ss-pip { padding: 8px 10px; gap: 6px; }
.ss.ss-pip .ss-title { font-size: 14px; }
.ss.ss-pip .ss-class { display: none; }
.ss.ss-pip .ss-ctrl button, .ss.ss-pip .ss-ctrl select { height: 28px; min-width: 28px; padding: 0 6px; font-size: 13px; }
.ss.ss-pip .ss-name, .ss.ss-pip .ss-elapsed { font-size: 16px; }
.ss.ss-pip .ss-pc, .ss.ss-pip .ss-act { font-size: 12px; }
.ss.ss-pip .ss-thumb { width: 72px; font-size: 10.5px; }
.ss.ss-pip .ss-main { grid-template-columns: 1fr; }
.ss.ss-pip .ss-side { display: none; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 70; max-width: min(560px, 90vw);
  background: #0b3b2e; color: #fff; padding: 12px 16px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .16);
}

/* ---------------------------------------------------------------- AI use summary (live page, full screen, slideshow) */
.ai-stats { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.st-head { display: flex; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.st-head b { font: 600 16px/1.3 var(--font-display); }
.st-head span { color: var(--muted); font-size: 12.5px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 20px; }
.st { display: flex; flex-direction: column; min-width: 0; }
.st span { color: var(--muted); font-size: 12.5px; }
.st b { font: 600 22px/1.3 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st small { color: var(--muted); font-size: 12px; }
.st b.txt { font-size: 16px; white-space: normal; overflow: visible; }
.st.fs-only-st { display: none; }
body.now-fs .st.fs-only-st, .ss .st.fs-only-st { display: flex; }
.st-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.st-list li { display: grid; grid-template-columns: 28px minmax(120px, 1.4fr) minmax(90px, 1fr) 48px minmax(140px, 1.2fr); gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.st-list li.hd { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.st-list li.more { display: block; padding: 8px 0; font-size: 13px; }
.st-list .tl.apps { color: var(--ink-2); font-size: 13px; }
.st-list .rk { color: var(--muted); font-variant-numeric: tabular-nums; }
.st-list .nm { font-weight: 600; display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-list .nm small { color: var(--muted); font-weight: 400; font-size: 12px; }
.st-list .tl { display: flex; flex-wrap: wrap; gap: 4px; }
.st-list .ct { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.st-list .du { display: flex; align-items: center; gap: 8px; }
.st-list .du i { display: block; height: 6px; border-radius: 3px; background: var(--data); flex: none; max-width: 60%; }
.st-list .du b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-list li.hd .du { display: block; }
.st-none { color: var(--muted); padding: 12px 0 2px; }
/* full screen: AI cards 70% | stats 30% */
body.now-fs .now-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 16px; align-items: start; }
body.now-fs .now-side { position: sticky; top: 12px; height: var(--fs-body-h); overflow-y: auto; }
body.now-fs .now-side .ai-stats:first-child { margin-top: 0; }
body.now-fs .ai-stats { padding: 12px 14px; margin-top: 12px; }
body.now-fs .ai-stats .st-grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
body.now-fs .ai-stats .st b { font-size: 18px; }
body.now-fs .ai-stats .st-list li { padding: 5px 0; font-size: 13px; }
body.now-fs .now-side .st-list li { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rk nm du" "rk tl ct"; row-gap: 2px; }
body.now-fs .now-side .st-list .rk { grid-area: rk; }
body.now-fs .now-side .st-list .nm { grid-area: nm; }
body.now-fs .now-side .st-list .tl { grid-area: tl; }
body.now-fs .now-side .st-list .ct { grid-area: ct; text-align: right; font-size: 12px; }
body.now-fs .now-side .st-list .du { grid-area: du; justify-content: flex-end; }
body.now-fs .now-side .st-list li.hd, body.now-fs .now-side .paste-stats .st-list .du i { display: none; }
/* each student is only a line: how long compared with the others, no name and no time */
body.now-fs .now-side .ai-stats:not(.paste-stats) .st-list .du { width: 160px; }
body.now-fs .now-side .ai-stats:not(.paste-stats) .st-list .du i { display: block; height: 6px; max-width: 100%; }
@media (max-width: 900px) { body.now-fs .now-split { grid-template-columns: 1fr; } body.now-fs .now-side { position: static; height: auto; } body.now-fs .now-main, body.now-fs .empty { min-height: 50vh; } }

/* slideshow: stats beside the screenshot */
.ss .ai-stats { margin: 0; padding: 14px; }
.ss .st-grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ss .st b { font-size: 20px; }
.ss .st-head { flex-direction: column; gap: 2px; }
.ss .st-list li { grid-template-columns: 22px 1fr auto; grid-template-areas: "rk nm du" "rk tl ct"; row-gap: 2px; }
.ss .st-list .rk { grid-area: rk; }
.ss .st-list .nm { grid-area: nm; }
.ss .st-list .tl { grid-area: tl; }
.ss .st-list .ct { grid-area: ct; color: var(--muted); font-size: 12px; text-align: right; }
.ss .st-list .du { grid-area: du; justify-content: flex-end; }
.ss .st-list .du i, .ss .st-list li.hd { display: none; }
.ss .paste-stats { margin-top: 10px; }
@media (max-width: 900px) {
  .ss-main { grid-template-columns: 1fr; }
  .ss-side { display: none; }
  .st-list li { grid-template-columns: 24px 1fr 90px; }
  .st-list .tl, .st-list .ct { display: none; }
}

/* possible copy-paste */
.paste-stats .st-list .du i.paste-bar { display: none; }  /* the list shows times + last time, no bar */
.paste-stats .st-list li { grid-template-columns: 28px minmax(120px, 1.4fr) minmax(90px, 1fr) minmax(90px, 1fr) 48px minmax(110px, 1fr); }
.ss .paste-stats .st-list li { grid-template-columns: 22px 1fr auto; grid-template-areas: "rk nm du" "rk tl ct"; }
.allowed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 12px; font-size: 13px; }
.allowed-bar .btn { padding: 3px 10px; font-size: 12.5px; }
.paste-sample { margin: 0; max-width: 360px; max-height: 7.5em; overflow: hidden; white-space: pre-wrap; font: 11.5px/1.25 Consolas, "Cascadia Mono", monospace; color: var(--ink-2); }
/* copy-paste panel: big numbers (also in full screen and the slideshow) */
.paste-stats .st b, body.now-fs .ai-stats.paste-stats .st b, .ss .paste-stats .st b { font-size: 30px; }
.paste-stats .st b.txt, body.now-fs .ai-stats.paste-stats .st b.txt, .ss .paste-stats .st b.txt { font-size: 16px; }

/* ---------------------------------------------------------------- share the class view to another device */
.share-steps { margin: 16px 0 10px; padding-left: 20px; display: grid; gap: 12px; }
.share-url { font: 600 17px/1.4 var(--font-display); overflow-wrap: anywhere; }
.share-code { display: block; font: 600 40px/1.2 var(--font-display); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
/* the page the other device opens (share.html) */
.join {
  --surface: rgba(255, 255, 255, .07); --surface-2: rgba(255, 255, 255, .13); --ink: #ffffff; --ink-2: #d5e6de; --muted: #9dbdb0;
  --line: rgba(255, 255, 255, .22); --accent: #b8f35a; --primary: #b8f35a; --primary-ink: #0b3b2e; --danger: #ff8a80;
  color-scheme: dark; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--brand); color: var(--ink);
}
.join-box { width: min(340px, 100%); display: grid; gap: 14px; }
.join-box img { height: 38px; width: auto; margin-bottom: 14px; }
.join-box h1 { margin: 0; font-size: 26px; }
.join-box p { margin: 0; color: var(--ink-2); }
.join-box .input { font: 600 30px/1.2 var(--font-display); letter-spacing: .12em; text-align: center; padding: 12px; background: rgba(0, 0, 0, .22); font-variant-numeric: tabular-nums; }
.join-box .btn { justify-content: center; padding: 11px; font-size: 15px; }
.join-box .form-error { margin: 0; }
body.share .section-head .btn { margin-left: auto; }
body.share .now-card { cursor: default; }
body.share .share-lost { color: var(--disc); font-weight: 600; }

/* ---------------------------------------------------------------- on the server: sign-in, accounts, read-only records */
/* records are changed on the lab PC only, so those controls are not shown here */
body.remote #class-box, body.remote [data-remove-disc], body.remote [data-remove-paste], body.remote [data-remove-session],
body.remote [data-rename], body.remote [data-edit-allowed], body.remote [data-share], body.remote [data-record],
body.remote a[href="#/classes/new"], body.remote a[href^="#/classes/edit"] { display: none !important; }
.sidebar .account { margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar .account a { color: var(--ink); min-width: 0; }
.sidebar .account a b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .account a span { color: var(--muted); font-size: 12px; }
.sidebar .account .btn { font-size: 12.5px; padding: 5px 10px; }
.sidebar .account + .sidebar-foot { margin-top: 0; }
.login-box { width: min(360px, 100%); }
.login-box .field label { color: var(--ink-2); }
.login-box .input { font: inherit; letter-spacing: 0; text-align: left; padding: 10px 12px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.check-list label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.check-list label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-list small { display: block; color: var(--muted); font-size: 12px; }
.check-list input, .check-one input { accent-color: var(--green); width: 16px; height: 16px; margin-top: 2px; flex: none; }
.check-one { display: flex; gap: 10px; align-items: center; margin-top: 20px; font-weight: 600; cursor: pointer; }
.check-one input { margin: 0; }
.narrow { max-width: 440px; display: grid; gap: 14px; }
.form-sub.first { margin-top: 0; }
@media (max-width: 760px) { .sidebar .account { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; } .sidebar .account a { display: none; } }

/* the brand in the views the class sees */
.fs-brand img { display: block; height: 34px; width: auto; }
body.now-fs .fs-brand { display: block; align-self: center; margin-right: 10px; padding-right: 18px; border-right: 1px solid var(--line); }
.ss-brand { height: 28px; width: auto; margin-right: 10px; padding-right: 16px; border-right: 1px solid var(--line); box-sizing: content-box; }
.ss.ss-pip .ss-brand { display: none; }
@media (max-width: 700px) { body.now-fs .fs-brand { border: 0; padding: 0; width: 100%; } }
