/* The teacher page: mobile first, system fonts, tap targets of at least 44px, no images. */
:root {
  --bg: #f6f6f4;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: #dedede;
  --held: #1f7a4d;
  --cancel: #9a3b3b;
  --move: #35589a;
  --focus: #35589a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --card: #1e1e21;
    --ink: #f1f1f1;
    --muted: #a7a7ad;
    --line: #34343a;
    --held: #4fbf86;
    --cancel: #e08585;
    --move: #8fb0f0;
    --focus: #8fb0f0;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

header { margin-bottom: 12px; }
.brand { margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; }
h1 { margin: 4px 0 0; font-size: 1.5rem; }
h2 { margin: 24px 0 8px; font-size: 1.1rem; }
.ro, .more, .note, .empty { color: var(--muted); margin: 4px 0 8px; }
.progress { margin: 8px 0 0; font-weight: 600; }
.msg { margin: 24px 0 16px; font-size: 1.1rem; }

.lesson {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 10px;
}
.lesson.working, .recent.working { opacity: 0.6; }
.who { margin: 0; font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.when { margin: 2px 0 10px; color: var(--muted); }
.time { unicode-bidi: isolate; direction: ltr; margin-inline-start: 0.75em; font-weight: 600; color: var(--ink); }

.acts { display: flex; flex-wrap: wrap; gap: 8px; }

.act {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  flex: 1 1 0;
}
.act:focus-visible, .date:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.act:disabled { opacity: 0.5; cursor: default; }
.act-held { border-color: var(--held); color: var(--held); font-weight: 600; }
.act-cancelled { border-color: var(--cancel); color: var(--cancel); }
.act-postpone_open, .act-save, .act-unknown { border-color: var(--move); color: var(--move); }
.act-undo, .act-reload { flex: 0 0 auto; }

.postpone { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.q { display: block; margin-bottom: 8px; }
.date {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.recent-list ul { list-style: none; margin: 0; padding: 0; }
.recent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.recent .who { font-size: 1rem; }
.recent .dm { color: var(--muted); }
.recent .st { font-weight: 600; }
.recent .edited { color: var(--muted); font-size: 0.9rem; }
.recent .act-undo { margin-inline-start: auto; min-height: 44px; padding: 6px 12px; }

.students table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.students th, .students td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.students th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.students tr:last-child td { border-bottom: 0; }
.students .mk { width: 7em; font-variant-numeric: tabular-nums; }

footer { margin-top: 32px; color: var(--muted); font-size: 0.85rem; }

#status {
  position: fixed;
  inset-inline: 12px;
  bottom: 12px;
  max-width: 536px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
