/* team.scoopsavor.com: the crew app's screens. Visual system from the design canvas. */
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/fonts/plus-jakarta-sans.woff') format('woff');
  font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk.woff') format('woff');
  font-weight: 300 700; font-display: swap; }

:root {
  --bg: #f4f5f8; --card: #ffffff; --line: #e2e4ea; --ink: #14151a; --quiet: #575b66; --faint: #9aa0ac;
  --accent: #c8205c; --accent-deep: #9e1546; --accent-soft: #fce8ef; --accent-ink: #ffffff; --accent-text: #5e1230;
  --good: #0b7a75; --good-soft: #e2f3f1; --bad: #8a1c1c; --bad-soft: #fbe4e4;
  --info: #2f4aa8; --info-soft: #e8edfc; --pts: #7a4d00; --pts-soft: #fff1cc;
  --grab: #d9b44a; --grab-soft: #fffbef; --grab-ink: #5c4300;
  --night: #14151a; --night-ink: #ffffff; --night-quiet: #c9cce5; --night-head: #f7b9cf; --night-line: #3a3d47;
  --ring: #f1e3e8; --chip: #ecEEF2;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --num: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111216; --card: #1a1c22; --line: #2c2f38; --ink: #f2f3f5; --quiet: #a9adb8; --faint: #6b7080;
    --accent: #e0457c; --accent-deep: #f07aa3; --accent-soft: #3a1626; --accent-text: #f7c6d8;
    --good: #3fbfb6; --good-soft: #10302e; --bad: #f08a8a; --bad-soft: #3a1818;
    --info: #9db0f5; --info-soft: #1c2440; --pts: #ffd27a; --pts-soft: #3a2c0c;
    --grab: #a88a33; --grab-soft: #2a2413; --grab-ink: #f1d993; --ring: #3a2630; --chip: #262932;
    --night: #0b0c0f; --night-line: #2a2d36;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 var(--sans); -webkit-text-size-adjust: 100%; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--num); font-weight: 700; font-variant-numeric: tabular-nums; }
.quiet { color: var(--quiet); }
.err { color: var(--bad); font-weight: 600; min-height: 1.4em; margin: 0; }
.ok { color: var(--good); font-weight: 700; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Page frame */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.page.wide { max-width: 1240px; padding: 18px 24px 16px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.meta { font-size: 13px; font-weight: 600; color: var(--quiet); }
h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
h2 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .03em; color: var(--quiet); text-transform: uppercase; }
h2.hot { color: var(--accent); }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* Cards and pills */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.good { color: var(--good); background: var(--good-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.hot { color: var(--accent-deep); background: var(--accent-soft); }
.pill.info { color: var(--info); background: var(--info-soft); }
.pill.pts { color: var(--pts); background: var(--pts-soft); font-family: var(--num); font-size: 13px; }
.pill.dark { color: var(--night-ink); background: var(--night); }
.pill.line { color: var(--ink); background: var(--card); border: 1px solid var(--line); }

/* Buttons */
.btn { min-height: 52px; border-radius: 14px; border: 0; padding: 0 18px; font-size: 16px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.soft { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 700; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: 999px; }
.link { background: none; border: 0; color: var(--accent); font-weight: 700; min-height: 44px; padding: 0; text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); padding: 0 16px; font-size: 15px; font-weight: 700; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.switch { min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); padding: 0 14px; font-size: 14px; font-weight: 700; color: var(--ink); }

/* Name grid and PIN pad */
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.name { min-height: 64px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); text-align: left; padding: 10px 14px; font-size: 16px; font-weight: 800; }
.name small { display: block; font-size: 12.5px; font-weight: 600; color: var(--quiet); }
.dots { display: flex; gap: 14px; justify-content: center; margin: 6px 0; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--quiet); }
.dot.on { background: var(--ink); border-color: var(--ink); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 330px; margin: 0 auto; }
.pad button { min-height: 60px; border-radius: 14px; border: 0; background: var(--card); font-family: var(--num); font-size: 24px; font-weight: 700; box-shadow: 0 0 0 1px var(--line) inset; }
.pad .del { font-family: var(--sans); font-size: 15px; color: var(--quiet); background: transparent; box-shadow: none; }

/* Inputs */
.field { width: 100%; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); padding: 10px 14px; font-size: 18px; }
textarea.field { min-height: 110px; resize: vertical; font-family: inherit; font-size: 16px; line-height: 1.4; }
.field.code { font-family: var(--num); font-size: 28px; letter-spacing: .15em; text-transform: uppercase; text-align: center; }
.field:focus { border-color: var(--accent); outline: none; }
label.lbl { font-size: 13.5px; font-weight: 700; }

/* My Shift */
.clock { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-family: var(--num); font-weight: 700; font-size: 15px; white-space: nowrap; }
.progress { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { display: block; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--num); font-weight: 700; font-size: 22px; }
.big { font-family: var(--num); font-weight: 700; font-size: 26px; letter-spacing: -.01em; }
.big small { font-size: 16px; color: var(--quiet); font-weight: 500; }
.tip { background: var(--accent-soft); color: var(--accent-text); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.4; }
.task { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 10px 10px; }
.task.overdue { border-color: var(--bad); }
.task.done { opacity: .62; }
.task .tick { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 2px solid #c9ccd5; background: var(--card); display: flex; align-items: center; justify-content: center; }
.task.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.task .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; background: none; border: 0; padding: 0; text-align: left; }
.task .t { font-size: 15px; font-weight: 700; line-height: 1.25; }
.task .s { font-size: 12.5px; color: var(--quiet); line-height: 1.3; }
.task.done .t { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.grabs { background: var(--grab-soft); border: 1.5px dashed var(--grab); border-radius: 14px; padding: 12px 12px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.grabs h2 { color: var(--pts); }
.grab { display: flex; align-items: center; gap: 12px; }
.grab + .grab { border-top: 1px solid var(--grab); padding-top: 10px; }
.grab .s { font-size: 12.5px; color: var(--grab-ink); }
.nav { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-top: 1px solid var(--line); background: var(--card); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
.nav button { min-height: 48px; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--quiet); }
.nav button[aria-current="page"] { color: var(--accent); font-weight: 800; }
.foot { font-size: 12.5px; color: var(--quiet); display: flex; align-items: center; gap: 8px; }

/* Dark panels: standings */
.night { background: var(--night); color: var(--night-ink); border: 1px solid var(--night-line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.night h2 { color: var(--night-head); }
.rankrow { display: flex; align-items: center; gap: 10px; }
.rankrow .r { width: 26px; font-family: var(--num); font-weight: 700; font-size: 17px; color: var(--night-quiet); }
.rankrow .r.g1 { color: #ffd166; } .rankrow .r.g2 { color: #e4e6eb; } .rankrow .r.g3 { color: #e8b07a; }
.rankrow .n { flex: 1; font-size: 15px; font-weight: 700; }
.rankrow.me { background: rgba(255, 255, 255, .1); border-radius: 10px; margin: 0 -8px; padding: 6px 8px; }
.night p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--night-quiet); }
.night .sep { height: 1px; background: var(--night-line); }

/* Huddle */
.rem { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 14px; }
.rem .t { font-size: 15px; font-weight: 700; }
.rem .s { font-size: 13px; line-height: 1.35; color: var(--quiet); }
.got { flex: none; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); padding: 0 14px; font-weight: 800; font-size: 14px; }
.got[aria-pressed="true"] { background: var(--good-soft); color: var(--good); border-color: transparent; }
.note { background: var(--grab-soft); border: 1px solid #f0dda0; border-radius: 14px; padding: 12px 14px; }
.note .h { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--pts); text-transform: uppercase; }
.note p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.4; }

/* Shift Board (tablet) */
.board { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 16px; flex: 1; min-height: 0; align-items: start; }
.col { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--card); text-align: left; width: 100%; }
.person.off { background: var(--good-soft); border-color: transparent; }
.person .n { font-size: 17px; font-weight: 800; }
.bar { height: 10px; border-radius: 999px; background: var(--ring); overflow: hidden; }
.bar > i { display: block; height: 10px; background: var(--accent); border-radius: 999px; }
.person.off .bar > i { background: var(--good); }
.att { display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 12px; background: var(--bg); }
.att.bad { background: var(--bad-soft); } .att.hot { background: var(--accent-soft); } .att.info { background: var(--info-soft); }
.att .tag { flex: none; font-size: 11.5px; font-weight: 800; background: var(--card); border-radius: 999px; padding: 4px 9px; color: var(--quiet); }
.att.bad .tag { color: var(--bad); } .att.hot .tag { color: var(--accent-deep); } .att.info .tag { color: var(--info); }
.att .t { font-size: 15px; font-weight: 700; } .att .s { font-size: 12.5px; color: var(--quiet); }
.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.quick .btn { min-height: 52px; }
.phoneqr { display: flex; gap: 14px; align-items: center; background: var(--card); color: var(--ink); border-radius: 14px; padding: 10px; }
.phoneqr canvas { flex: none; width: 128px; height: 128px; image-rendering: pixelated; background: #fff; border-radius: 8px; }
.phoneqr .code { font-family: var(--num); font-weight: 700; font-size: 22px; letter-spacing: .12em; }
@media (max-width: 980px) {
  .board { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sheets (task steps, QR for a phone) */
.sheet { position: fixed; inset: 0; background: rgba(20, 21, 26, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet > .panel { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet > .panel { border-radius: 22px; } }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.45; }
.bigqr { display: flex; justify-content: center; }
.bigqr canvas { width: min(70vw, 300px); height: min(70vw, 300px); image-rendering: pixelated; background: #fff; border-radius: 12px; padding: 0; }

/* Finish */
.finish { background: var(--night); color: var(--night-ink); border-radius: 22px; padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.finish .pct { font-family: var(--num); font-weight: 700; font-size: 56px; line-height: 1; color: #ffd166; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.podium > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.podium .p1 { min-height: 120px; } .podium .p2 { min-height: 100px; } .podium .p3 { min-height: 84px; }
.podium .me { border-color: var(--accent); background: var(--accent-soft); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); text-align: center; }

/* Morning Prep */
.board.opener { grid-template-columns: 1.15fr 1fr .9fr; }
@media (max-width: 980px) { .board.opener { grid-template-columns: 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--card); }
.tile.promo { border-style: dashed; }
.tile .code { font-family: var(--num); font-weight: 700; font-size: 18px; }
.tile .s { font-size: 12px; color: var(--quiet); line-height: 1.25; min-height: 2.5em; }
.tile .pill { align-self: flex-start; }
.field.cnt { min-height: 44px; width: 72px; padding: 6px 8px; font-size: 18px; text-align: center; }
.prow { display: grid; grid-template-columns: 1fr 44px 72px 44px 74px; gap: 8px; align-items: center; font-size: 14px; }
.prow.three { grid-template-columns: 1fr 52px 72px 74px; }
.prow.head span { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: var(--quiet); text-transform: uppercase; }
.prow .t { font-weight: 700; }
.prow .hot, .num.hot { color: var(--accent); }
.batch { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--card); }
.batch .n { width: 22px; color: var(--quiet); }
.batch .t { font-weight: 700; } .batch .s { font-size: 12.5px; color: var(--quiet); }
.batch.done { background: var(--good-soft); border-color: transparent; }
.tries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tries .field.cnt { width: 100%; }
