:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #172033;
  --muted: #667085;
  --blue: #1d4ed8;
  --green: #12805c;
  --red: #b42318;
  --amber: #a15c07;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 12px; cursor: pointer; min-height: 42px; }
button.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
button.blue { background: var(--blue); color: #fff; border-color: var(--blue); }
button.danger { background: #fff1f0; color: var(--red); border-color: #f3b5ae; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 42px; background: #fff; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.app { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
aside { background: #151b2d; color: #fff; padding: 18px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.nav { display: grid; gap: 8px; }
.nav button { width: 100%; text-align: left; background: transparent; color: #d8e0ef; border-color: #30384d; }
.nav button.active { background: #24304a; color: #fff; }
.profile { margin-top: 18px; color: #c7d0df; font-size: 13px; line-height: 1.6; }
main { padding: 20px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.title { margin: 0; font-size: 26px; }
.subtle { color: var(--muted); font-size: 14px; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 14px; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grow { flex: 1 1 260px; }
.pill { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 10px; }
.pill.good { color: var(--green); border-color: #a8dfc8; background: #effaf5; }
.pill.bad { color: var(--red); border-color: #f3b5ae; background: #fff1f0; }
.notice { border: 1px solid #b8cef9; background: #eef4ff; color: #183b7a; border-radius: 8px; padding: 12px; margin-top: 10px; }
.notice.bad { border-color: #f3b5ae; background: #fff1f0; color: var(--red); }
.empty { border: 1px dashed var(--line); color: var(--muted); border-radius: 8px; padding: 22px; text-align: center; }
.event-button { min-height: 96px; text-align: left; display: grid; gap: 8px; align-content: center; }
.event-button strong { font-size: 20px; }
.timer { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.timebox { font-size: 52px; font-weight: 800; letter-spacing: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.student-card { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 12px; min-height: 180px; display: grid; gap: 10px; }
.student-card.done { background: #effaf5; border-color: #a8dfc8; }
.tap-area { display: grid; place-items: center; min-height: 90px; border: 1px solid #ccd5e1; border-radius: 8px; background: #f8fafc; cursor: pointer; user-select: none; }
.count { font-size: 44px; font-weight: 900; }
.small { min-height: 32px; padding: 6px 8px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 9px; white-space: nowrap; }
th { color: var(--muted); font-size: 13px; }
.compare { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 6px; }
.good { color: var(--green); }
.bad { color: var(--red); }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  aside { height: auto; position: relative; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 12px; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .timer { grid-template-columns: 1fr; }
  .timebox { font-size: 42px; }
}

