/* The teacher's page. Colours are the game's "Sunny Island" ones, as in the admin panel (../admin/style.css). */
:root {
  --bg: #EAF5FD;
  --card: #FFFFFF;
  --line: #D5E3F1;
  --edge: #C3D3E6;
  --text: #1F2D4D;
  --muted: #55627A;
  --blue: #1A6FD1;
  --blue-edge: #124E96;
  --blue-soft: #DCEBFB;
  --amber: #A86A00;
  --amber-soft: #FFF4D6;
  --green: #23863F;
  --green-soft: #E3F4E8;
  --orange: #D9772B;
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border-radius: 10px; border: 1px solid var(--edge); background: var(--card); padding: 7px 14px; }
button:hover:not(:disabled) { border-color: var(--blue); }
button:disabled { cursor: default; opacity: 0.5; }
button.primary { background: var(--blue); color: #fff; font-weight: 600; border: 0; border-bottom: 3px solid var(--blue-edge); padding: 9px 22px; }
button.ghost { background: transparent; }
button.chosen { background: var(--blue-soft); border-color: var(--blue); font-weight: 600; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 700; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.languages { display: flex; gap: 4px; }
.languages button { padding: 4px 10px; }

.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 20px 30px; }
.card { background: var(--card); border: 1px solid var(--line); border-bottom: 3px solid var(--edge); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.card h2 { margin: 0 0 10px; font-size: 18px; }
.hint { color: var(--muted); }

/* ---------- Signing in ---------- */
.sign-in { max-width: 460px; margin: 40px auto; }
.sign-in h1 { margin: 0 0 8px; font-size: 22px; }
.code-input { display: block; width: 100%; margin: 16px 0 12px; padding: 12px 14px; font-size: 28px; letter-spacing: 0.35em; text-align: center;
  border: 2px solid var(--edge); border-radius: 12px; font-variant-numeric: tabular-nums; }
.code-input:focus { outline: none; border-color: var(--blue); }
.message { min-height: 1.5em; color: var(--orange); margin: 0 0 10px; }

/* ---------- A group ---------- */
.group-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.group-head h1 { margin: 0; font-size: 26px; }
.group-head span { color: var(--muted); }
.progress { height: 14px; border-radius: 99px; background: var(--blue-soft); overflow: hidden; margin: 10px 0 6px; }
.progress > div { height: 100%; background: var(--blue); border-radius: 99px; }
.progress.done > div { background: var(--green); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
/* Headings may wrap (Kazakh ones are longer), so the table fits a computer's screen; numbers never do. */
th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 8px; border-bottom: 2px solid var(--line); vertical-align: bottom; }
th button { border: 0; background: none; padding: 0; color: inherit; font-weight: inherit; }
th button.sorted::after { content: " ▼"; font-size: 10px; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.quiet td { color: var(--muted); }
.word { display: inline-block; background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 0 7px; margin: 0 4px 3px 0; font-weight: 600; }
.badge { font-size: 12px; background: var(--blue-soft); color: var(--blue); border-radius: 99px; padding: 1px 8px; margin-left: 6px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }
.hard { list-style: none; margin: 0; padding: 0; }
.hard li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.weeks { list-style: none; margin: 0; padding: 0; }
.weeks li { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; }
.weeks .bar { height: 10px; border-radius: 99px; background: var(--blue-soft); overflow: hidden; }
.weeks .bar > div { height: 100%; background: var(--blue); }
.weeks .reached .bar > div { background: var(--green); }
.weeks .state { font-size: 13px; color: var(--muted); white-space: nowrap; }
.weeks .reached .state { color: var(--green); font-weight: 600; }
.weeks .extra { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin-top: -4px; }

/* ---------- The topic of the week and the group battle (milestone 32) ---------- */
.week-topic { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.topic-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.topic-row select { font: inherit; color: inherit; min-width: 220px; padding: 7px 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--card); }
.versus { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 6px; font-size: 18px; }
.versus b { font-size: 28px; color: var(--blue); font-variant-numeric: tabular-nums; }
/* A phone: the week, then its bar the whole width, then how it went. */
@media (max-width: 600px) {
  .weeks li { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
}

.foot { max-width: 1180px; margin: 0 auto; padding: 0 20px 24px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--blue); }
