/* B3 Portal — one stylesheet, no build step, no script. Brand as the console: navy #1E3163, teal #3A9E92.
   Follows the phone's light / dark setting: there's no theme button, since a button needs a script
   and the portal runs none (its Content-Security-Policy allows no script at all). */

:root {
  color-scheme: light;
  --navy: #1E3163;
  --teal: #2f8a7f;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #dfe3ea;
  --text: #1b2333;
  --muted: #5d6879;
  --danger: #b42318;
  --ok: #17734b;
  --ok-bg: #e7f5ee;
  --warn: #8a5a00;
  --warn-bg: #fdf3dc;
  --action: #1E3163;
  --action-bg: #e6ebf6;
  --quiet-bg: #eef0f4;
  --shed: #3b5bdb;
  --shed-bg: #e8edff;
  --csb: #c2410c;
  --csb-bg: #fdeee5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #12151c;
    --surface: #1a1f2b;
    --border: #2b3242;
    --text: #e6e9f0;
    --muted: #a3adbf;
    --danger: #f97066;
    --ok: #4ade80;
    --ok-bg: rgba(74, 222, 128, .12);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, .13);
    --action: #a9bdf5;
    --action-bg: rgba(129, 158, 240, .16);
    --quiet-bg: #242a38;
    --shed: #a5b8ff;
    --shed-bg: rgba(91, 124, 250, .18);
    --csb: #fdba8c;
    --csb-bg: rgba(234, 88, 12, .18);
    --teal: #5cc4b7;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--teal); }

/* ── shell: a top bar and one column, phone first ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--navy); color: #ffffff;
}
.topbar a { color: #ffffff; text-decoration: none; }
.mark {
  display: inline-grid; place-items: center; height: 34px; padding: 5px 7px;
  border-radius: 9px; background: #ffffff;
}
.mark img { display: block; height: 22px; width: auto; }
.topbar .who { font-size: 13px; color: #c9d3e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
.page h1 { font-size: 22px; margin: 4px 0 16px; }
.page h2 { font-size: 17px; margin: 24px 0 10px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
  margin-bottom: 14px;
}

.muted { color: var(--muted); }
.small { font-size: 14px; }
/* No style="" anywhere: the Content-Security-Policy refuses inline styles, so spacing is a class. */
.spaced { margin-top: 14px; }

/* ── forms ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--muted); }

.text-input {
  width: 100%; padding: 12px 13px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: 16px; /* 16px: phones don't zoom in */
}
.text-input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }

.button {
  display: inline-block; padding: 12px 18px; border-radius: 9px; cursor: pointer;
  font-size: 16px; font-weight: 600; text-align: center; text-decoration: none;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.button.primary { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.button.block { display: block; width: 100%; }
.button.link { border: none; background: none; padding: 8px 0; font-weight: 400; color: var(--teal); text-decoration: underline; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button-row form { margin: 0; }

.notice, .error {
  padding: 11px 14px; border-radius: 9px; font-size: 15px; margin-bottom: 16px;
}
.notice { background: rgba(58, 158, 146, .12); border: 1px solid var(--teal); }
.error { background: rgba(180, 35, 24, .1); border: 1px solid var(--danger); color: var(--danger); }

/* ── signing in ── */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 26px 22px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand .mark { border: 1px solid var(--border); }
.auth-brand h1 { font-size: 18px; margin: 0; }
.auth-brand p { font-size: 14px; margin: 2px 0 0; color: var(--muted); }
.auth-card p { margin: 0 0 14px; }

/* ── lists ── */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: none; }

/* ── tabs under the top bar, and the foot of every signed-in page ── */
.tabs { display: flex; gap: 4px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs a {
  padding: 12px 14px 10px; color: var(--muted); text-decoration: none; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--navy); }
@media (prefers-color-scheme: dark) { .tabs a[aria-current="page"] { border-bottom-color: var(--teal); } }

.foot { padding-top: 0; }
.foot .button-row { margin-bottom: 8px; }
.small-button { padding: 8px 14px; font-size: 15px; }
.back { margin: 0 0 4px; font-size: 15px; }
.back a { text-decoration: none; }

/* ── coach chips (the preview account sees several coaches) ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip {
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 15px;
}
.chip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #ffffff; }

/* ── the "hours are ready" banner ── */
.banner {
  display: block; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--action-bg); border: 1px solid var(--action); color: var(--text); text-decoration: none;
}
.banner strong { display: block; }
.banner span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ── a schedule, or a period's days: day headings, then one row per session or shift ── */
.schedule { padding: 4px 18px; }
.day { padding: 12px 0; border-bottom: 1px solid var(--border); }
.day:last-child { border-bottom: none; }
.day-head { display: flex; justify-content: space-between; font-size: 15px; margin: 0 0 8px; }
.day-hours { font-weight: 600; color: var(--muted); }
.session { display: grid; grid-template-columns: 8.2em 1fr; gap: 10px; padding: 4px 0; font-size: 15px; }
.session .when { font-variant-numeric: tabular-nums; color: var(--muted); }
.session .what { min-width: 0; }

.fac {
  display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 12px; font-weight: 600;
  vertical-align: 1px; margin-right: 4px; background: var(--quiet-bg); color: var(--muted);
}
.fac-shed { background: var(--shed-bg); color: var(--shed); }
.fac-csb { background: var(--csb-bg); color: var(--csb); }

/* ── pay periods ── */
.period-list { display: grid; gap: 10px; }
.period-row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  margin: 0; color: var(--text); text-decoration: none;
}
.period-dates { font-weight: 600; }
.period-hours { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

.pill {
  display: inline-block; justify-self: start; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--quiet-bg); color: var(--muted);
}
.tone-action { background: var(--action-bg); color: var(--action); }
.tone-ok { background: var(--ok-bg); color: var(--ok); }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-done { background: var(--quiet-bg); color: var(--text); }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0 0 12px; }
.totals div { padding: 10px 12px; border-radius: 9px; background: var(--bg); }
.totals dt { font-size: 13px; color: var(--muted); }
.totals dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.totals .total { background: var(--action-bg); }
.card p:last-child { margin-bottom: 0; }
.quote { white-space: pre-wrap; border-left: 3px solid var(--border); padding-left: 12px; }

/* ── answering: Looks right, or Something's wrong (a <details>: no script needed to open it) ── */
.answer form { margin: 0; }
.wrong { margin-top: 10px; }
.wrong summary { list-style: none; }
.wrong summary::-webkit-details-marker { display: none; }
.wrong[open] summary { margin-bottom: 14px; border-color: var(--danger); color: var(--danger); }
textarea.text-input { resize: vertical; font: inherit; min-height: 6em; }
