body { min-height: 100vh; }
.appbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--stroke); }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 16px; }
.hdr-session { display: flex; align-items: center; gap: 16px; }
.code-block { display: flex; flex-direction: column; align-items: center; background: var(--brand); color: #fff; border-radius: 8px; padding: 2px 14px 4px; cursor: pointer; line-height: 1.1; user-select: none; }
:root[data-theme="dark"] .code-block { color: #000; }
.code-block span { opacity: .85; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.code-block strong { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 24px; letter-spacing: .14em; }
.hdr-meta { display: flex; flex-direction: column; line-height: 1.3; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; }
.conn.off { color: var(--orange); }
.conn .dot { width: 8px; height: 8px; }

.view { padding: 20px; max-width: 1600px; margin: 0 auto; }
.empty { max-width: 520px; margin: 60px auto; padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.small-empty { margin: 24px auto; padding: 32px; }
.hero-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.hero-ico svg { width: 32px; height: 32px; }
.hero-ico.red { background: var(--red-tint); color: var(--red); }

/* Start */
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.start-card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.recent-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.recent-list { display: flex; flex-direction: column; gap: 4px; }
.recent-item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; cursor: pointer; border: 0; background: none; text-align: left; font: inherit; color: inherit; }
.recent-item:hover { background: var(--surface-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card { font: inherit; color: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--stroke-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.mode-card[aria-pressed="true"] { border: 2px solid var(--brand); padding: 11px 13px; background: var(--brand-tint); }
.chip-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 6px; border: 1px solid var(--stroke-strong); border-radius: 4px; background: var(--surface); }
.chip-editor input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); flex: 1; min-width: 120px; padding: 2px 4px; }
.chip-editor .presets { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 4px; border-top: 1px dashed var(--stroke); }
.preset { font: inherit; font-size: 12px; border: 1px dashed var(--stroke-strong); background: none; color: var(--text-2); border-radius: 999px; padding: 1px 8px; cursor: pointer; }
.preset:hover { border-color: var(--brand); color: var(--brand); }

/* Toolbar + stats */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sel-info { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-weight: 600; font-size: 13px; }
.sel-info .btn { min-height: 24px; font-size: 12px; }
#tbFocus.toggled { background: var(--purple); border-color: var(--purple); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--stroke); border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--stroke-strong); }
.stat strong { font-size: 28px; line-height: 34px; font-variant-numeric: tabular-nums; }
.stat.green { border-top-color: var(--green); }
.stat.orange { border-top-color: var(--orange); }
.stat.red { border-top-color: var(--red); }
.bar { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--green); width: 0; transition: width .4s; }

/* Live grid */
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.filterbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 220px; background: var(--surface); border: 1px solid var(--stroke-strong); border-radius: 4px; padding: 0 10px; }
.search svg { width: 16px; height: 16px; color: var(--text-3); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); flex: 1; min-height: 30px; }
.group-h { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-weight: 600; color: var(--text-2); }
.group-h .line { flex: 1; height: 1px; background: var(--stroke); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

.scard { --st: var(--stroke-strong); background: var(--surface); border: 1px solid var(--stroke); border-left: 4px solid var(--st); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: box-shadow .12s, transform .12s; outline: none; }
.scard:hover { box-shadow: var(--shadow-16); }
.scard:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.scard.selected { background: var(--brand-tint); border-color: var(--brand); }
.scard[data-status="ontask"] { --st: var(--green); }
.scard[data-status="distracted"] { --st: var(--orange); }
.scard[data-status="help"] { --st: var(--red); animation: helpglow 2s infinite; }
.scard[data-status="offline"] { opacity: .55; }
@keyframes helpglow { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 0%, transparent) } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 25%, transparent) } }
.scard-top { display: flex; align-items: center; gap: 8px; }
.scard .sel { margin: 0; accent-color: var(--brand); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; flex: none; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.who .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 6px; padding: 6px 8px; min-height: 44px; }
.fav { flex: none; border-radius: 3px; }
.site-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.site-txt .title, .site-txt .url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-txt .title { font-size: 13px; font-weight: 600; }
.scard-foot { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.scard-foot .icon-btn { width: 28px; min-height: 28px; opacity: 0; transition: opacity .1s; }
.scard:hover .icon-btn, .scard:focus-within .icon-btn, .scard .a-help { opacity: 1; }
.scard-foot .icon-btn svg { width: 16px; height: 16px; }

/* Side */
.side-col { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 76px; }
.panel { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; }
.help-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: q; }
.help-queue li { counter-increment: q; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--red-tint); }
.help-queue li::before { content: counter(q); font-weight: 700; color: var(--red); width: 16px; }
.help-queue .info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.help-queue .btn { min-height: 26px; font-size: 12px; padding: 2px 8px; }
.site-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.site-list li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-list li > span:nth-child(3) { white-space: nowrap; }
.start-card p { margin: 0; }
.site-list .meter { grid-column: 2 / 4; height: 3px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.site-list .meter i { display: block; height: 100%; background: var(--brand); }
.site-list .blk { color: var(--red); font-size: 11px; font-weight: 600; }
.event-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; font-size: 12px; }
.event-log li { display: flex; gap: 8px; color: var(--text-2); }
.event-log time { color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.code-inline { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; color: var(--brand); }

/* Report */
.report-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.table-wrap { overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--stroke-strong); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--stroke); }
.tbl tr:hover td { background: var(--surface-2); }
.pct { display: inline-flex; align-items: center; gap: 6px; }
.pct .bar { width: 60px; margin: 0; }

/* Toasts */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-16); font-size: 13px; font-weight: 600; animation: tin .2s ease-out; }
@keyframes tin { from { transform: translateY(8px); opacity: 0 } }

@media (max-width: 1100px) {
  .live-grid, .report-grid, .start-grid { grid-template-columns: 1fr; }
  .side-col { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hdr-meta { display: none; }
}

@media print {
  .appbar, .monitor-banner, .report-head .row, .toast-host { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
  .report-grid { grid-template-columns: 1fr; }
}

/* ---------- huisstijl Atheneum GO! Geel ---------- */
.school-logo { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.school-logo.fallback { width: 32px; height: 32px; border-radius: 8px; }
.brand strong { color: var(--brand); font-size: 18px; letter-spacing: .01em; }
.code-block { background: var(--school-navy); color: #fff; }
.code-block span { color: var(--school-yellow); opacity: 1; }
:root[data-theme="dark"] .code-block { background: var(--school-navy); color: #fff; }
.start-card h1, .report-head h1, .empty h2 { color: var(--brand); }
.start-card { border-top: 4px solid var(--school-green); }
.stat { border-top-color: var(--school-navy); }
.btn.primary { background: var(--school-navy); }
.btn.primary:hover { background: var(--brand-hover); }
:root[data-theme="dark"] .btn.primary { background: var(--brand); }
#tbFocus.toggled { background: var(--school-yellow); border-color: #d9c800; color: #1b1b1b; }
.mode-card[aria-pressed="true"] { border-color: var(--school-navy); }

/* signalen: gamen / sociale media / AI */
.scard[data-flag="game"], .scard[data-flag="social"], .scard[data-flag="ai"] { --st: var(--orange); }
.scard[data-flag]:not([data-flag=""]) .status { font-size: 12.5px; }
.stat.orange .small.muted:last-child { font-size: 14px; letter-spacing: .02em; }
