/* MakeWithMohit design pack — base.css. One shared look for every teacher app.
   Colours, type and components live here. Apps link this file and use its
   classes; they do not restyle from scratch. See DESIGN.md for the rules. */
:root {
  --paper: #F7F2E7;
  --card: #FFFDF8;
  --ink: #211D19;
  --muted: #6E6455;
  --line: #E2D8C4;
  --accent: #C8401F;
  --accent-dark: #A63418;
  --good: #2E7D4F;
  --good-bg: #EDF6EF;
  --good-line: #BFDCC6;
  --danger: #A63418;
  --danger-bg: #FBEFEA;
  --danger-line: #F3C9BC;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); background: var(--paper); color: var(--ink); line-height: 1.5; }
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-family: var(--font-display); font-size: 1.9rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 1rem; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 18px; margin-bottom: 16px; box-shadow: 3px 3px 0 rgba(33, 29, 25, 0.14); }
label { font-weight: 700; display: block; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 8px; }
textarea, input[type="text"], input[type="number"] { width: 100%; padding: 12px; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 8px; }
textarea { min-height: 150px; resize: vertical; }
textarea:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 64, 31, 0.2); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.row.space { justify-content: space-between; }
.btn { appearance: none; border: 2px solid var(--ink); border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 2px 2px 0 rgba(33, 29, 25, 0.9); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-primary { background: var(--accent); border-color: var(--ink); color: #fff; flex: 1; min-width: 180px; font-size: 1.1rem; padding: 14px 20px; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #D8A08F; cursor: not-allowed; }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: #EFE7D3; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); box-shadow: 2px 2px 0 rgba(166, 52, 24, 0.35); }
.btn-danger:hover { background: #F8E2D8; }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; user-select: none; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.stats { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.92rem; margin-top: 10px; }
.stats b { color: var(--ink); }
.drawn { text-align: center; padding: 8px 4px; }
.drawn .eyebrow { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.drawn .q { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.01em; margin: 10px 0 4px; line-height: 1.25; }
.drawn .w { color: var(--muted); font-size: 0.9rem; }
.drawn.empty .q { color: #A89E8B; font-weight: 600; font-size: 1.25rem; font-family: var(--font-body); }
.done { background: var(--good-bg); border: 2px solid var(--good-line); color: var(--good); border-radius: 10px; padding: 12px; font-weight: 700; margin-top: 10px; }
.history h2 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 8px; }
.history ol { margin: 0; padding-left: 22px; }
.history li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.history li:last-child { border-bottom: 0; }
.history .meta { color: var(--muted); font-size: 0.85rem; }
.empty-note { color: var(--muted); }
.foot { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 8px; }
.foot a { color: var(--accent); }
/* Roster grid — tap-to-pick name buttons (hall pass, attendance, pickers). */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.name-btn { appearance: none; background: var(--card); border: 2px solid var(--ink); border-radius: 10px; padding: 12px 10px; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 rgba(33, 29, 25, 0.9); text-align: center; }
.name-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.name-btn:disabled { background: #EFE7D3; color: var(--muted); cursor: not-allowed; box-shadow: none; }
.name-btn .sub-line { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
/* Destination / option buttons — ghost buttons with a selected state. */
.btn-ghost.selected { background: var(--accent); border-color: var(--ink); color: #fff; }
/* Currently-out rows with a live timer. */
.out-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); margin-bottom: 10px; box-shadow: 2px 2px 0 rgba(33, 29, 25, 0.14); }
.out-row.overdue { border-color: var(--danger); background: var(--danger-bg); }
.out-row .who { font-weight: 700; }
.out-row .timer { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; white-space: nowrap; }
.out-row .overdue-note { color: var(--danger); font-weight: 700; font-size: 0.85rem; }
/* Small status chip. Radius stays 8px per the pack rule. */
.pill { display: inline-block; padding: 2px 8px; border: 2px solid var(--line); border-radius: 8px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
/* Simple log table. */
.log-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.log-table th { text-align: left; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 8px 6px 0; border-bottom: 2px solid var(--line); }
.log-table td { padding: 7px 8px 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.log-table tr:last-child td { border-bottom: 0; }
details { margin-top: 10px; }
details summary { cursor: pointer; font-weight: 700; color: var(--accent); }
details p { color: var(--muted); font-size: 0.92rem; }
code { background: #EFE7D3; padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
@media (max-width: 520px) {
  h1 { font-size: 1.55rem; }
  .drawn .q { font-size: 1.4rem; }
  .btn-primary { width: 100%; }
}
