/* Sweet Feet course support dashboard. Brand tokens match the course player (css/course.css). */
:root {
  --ink: #1a1b1f; --ink-2: #45474d; --muted: #6a6c72;
  --ground: #eeeeee; --surface: #ffffff; --surface-2: #f7f7f7;
  --line: #dcdddf; --line-strong: #c4c6ca;
  --teal: #0eb7a7; --teal-ink: #0a756b; --teal-wash: #e4f6f3;
  --amber: #a85600; --amber-wash: #fff2e0;
  --red: #b42318; --red-wash: #fdecea;
  --radius: 14px; --radius-btn: 10px;
  --font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--ground); color: var(--ink); font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
a { color: var(--teal-ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0 0 10px; }
code, .mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 0.95em; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker { font: 600 11px/1.3 var(--font-head); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px;
  border-radius: var(--radius-btn); border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #33353b; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-2); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #e6b3ae; }
.btn-danger:hover { background: var(--red-wash); }
.btn-sm { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--teal-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted); }
.input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.input:focus { border-color: var(--teal-ink); outline: 3px solid rgba(14,183,167,.25); outline-offset: 0; }
textarea.input { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-ink); }
.err { color: var(--red); font-size: 14px; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; padding: 32px 28px; box-shadow: 0 1px 0 var(--line); }
.signin-card img { height: 46px; display: block; margin-bottom: 22px; }
.signin-card h1 { font-size: 23px; margin-bottom: 6px; }
.signin-card .lead { color: var(--ink-2); margin-bottom: 20px; }
.code-input { letter-spacing: 10px; font-size: 24px; text-align: center; font-family: ui-monospace, Consolas, monospace; }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 62px; display: flex; align-items: center; gap: 16px; }
.top img { height: 36px; display: block; }
.top .title { border-left: 1px solid var(--line); padding-left: 14px; font: 600 16px/1.2 var(--font-head); }
.top .who { margin-left: auto; text-align: right; font-size: 14px; line-height: 1.3; }
.top .who b { display: block; font-weight: 600; }
.nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 12px 11px; color: var(--ink-2); text-decoration: none; font-weight: 600;
  border-bottom: 3px solid transparent; white-space: nowrap; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--teal); }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--amber); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.main { max-width: 1240px; margin: 0 auto; padding: 26px 20px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 70ch; }

/* ---------- cards, tiles ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card > h2 { margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
a.tile:hover { box-shadow: inset 0 0 0 2px var(--teal); }
.tile .n { font: 600 30px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.tile .l { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.tile.warn .n { color: var(--amber); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-2 > div > .card:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .grid-2 > div > .card:last-child { margin-bottom: 18px; } }

.search { display: flex; gap: 10px; }
.search .input { min-height: 50px; font-size: 17px; }
.search .btn { min-height: 50px; }

.status-line { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.status-line:first-of-type { border-top: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex: none; }
.dot.off { background: var(--red); } .dot.warn { background: var(--amber); }

/* ---------- lists ---------- */
.list { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 6px;
  border-top: 1px solid var(--line); text-decoration: none; color: inherit; border-radius: 8px; }
.item:first-child { border-top: 0; }
a.item:hover { background: var(--surface-2); }
.item .nm { font-weight: 700; }
.item .sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.item .sub .mono { white-space: nowrap; }
@media (max-width: 640px) { .item { grid-template-columns: 1fr; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.teal { background: var(--teal-wash); color: var(--teal-ink); }
.pill.amber { background: var(--amber-wash); color: var(--amber); }
.pill.red { background: var(--red-wash); color: var(--red); }
.empty { padding: 18px 6px; color: var(--muted); }

table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th { text-align: left; font: 600 12px/1.3 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line); }
.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ---------- student ---------- */
.back { display: inline-flex; gap: 6px; margin-bottom: 14px; font-weight: 600; text-decoration: none; }
.who-card h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; margin-top: 16px; }
.facts .k { font-size: 13px; color: var(--muted); }
.facts .v { font-weight: 600; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.banner { border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 15px; }
.banner.amber { background: var(--amber-wash); color: #6b3a00; }
.banner.red { background: var(--red-wash); color: #7a1a12; }
.banner.teal { background: var(--teal-wash); color: #064e47; }
.journey { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.journey li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.journey li::before { content: ""; position: absolute; left: 14px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.journey li:last-child::before { display: none; }
.journey .mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line-strong); font-size: 14px; font-weight: 700; position: relative; z-index: 1; }
.journey .done .mark { background: var(--teal); border-color: var(--teal); color: #fff; }
.journey .now .mark { border-color: var(--amber); color: var(--amber); background: #fff; }
.journey .s { font-weight: 700; }
.journey .d { font-size: 14px; color: var(--muted); }
.blockers { margin: 8px 0 0; padding-left: 20px; }
.blockers li { margin-bottom: 4px; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kv dd .muted { font-weight: 400; }
.feed { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.feed li { padding: 7px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.ok-mark { color: var(--teal-ink); font-weight: 700; }

/* ---------- orders ---------- */
.order { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.order h3 { margin-bottom: 4px; overflow-wrap: anywhere; }

/* ---------- modal, toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(26,27,31,.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; padding: 24px; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { font-size: 20px; margin-bottom: 8px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(92vw, 460px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.toast.bad { background: var(--red); }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: currentColor; border-radius: 50%; animation: sp .8s linear infinite; }
.btn-ghost .spin, .loading .spin { border-color: var(--line); border-top-color: var(--teal-ink); }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 24px 4px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- help ---------- */
.help h2 { margin: 6px 0 10px; }
.help ol, .help ul { margin: 0 0 10px; padding-left: 22px; }
.help li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .top .title { display: none; }
  .main { padding: 18px 16px 70px; }
  .card { padding: 16px; }
  h1 { font-size: 22px; }
  .search { flex-direction: column; }
  .kv { grid-template-columns: 1fr; gap: 0 0; } .kv dd { margin-bottom: 8px; }
}
@media print { .top, .nav, .actions, .toasts { display: none; } body { background: #fff; } }
