:root {
  --bg: #0F1115; --card: #1A1D23; --line: #2A2F38; --text: #F4F5F7; --muted: #A9AFBB;
  --accent: #FFB020; --good: #5BD6A0; --warn: #FF8A5C; --info: #7CB8FF;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.screen { max-width: 520px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 24px) 20px 120px; }
.brand { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; margin-top: 12vh; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; margin: 0; }
h1 { font-size: 28px; margin: 2px 0 0; letter-spacing: -0.5px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 22px 0 10px; }
header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }

form { display: flex; flex-direction: column; gap: 10px; margin-top: 36px; }
label { font-size: 14px; color: var(--muted); }
input { min-height: 56px; padding: 0 16px; font-size: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; }
.primary { min-height: 56px; border: 0; border-radius: 16px; background: var(--accent); color: #141414; font-size: 16px; font-weight: 600; }
.ghost { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: none; color: var(--text); font-size: 14px; font-weight: 600; }
.link { display: block; margin: 18px auto 0; min-height: 44px; border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 14px; }
.error { color: var(--warn); font-size: 14px; min-height: 20px; margin: 4px 0; }

.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.count { padding: 12px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.count b { display: block; font-size: 24px; }
.count span { font-size: 12px; color: var(--muted); }
.count.hot b { color: var(--warn); }

.late { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #2A1B14; border: 1px solid #6B3A22; display: flex; gap: 12px; align-items: center; }
.late p { margin: 0; font-size: 14px; line-height: 1.4; flex: 1; }
.late strong { color: var(--warn); }

.list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.row .time { width: 68px; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.row .body { flex: 1; min-width: 0; }
.row .what { font-size: 15px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.row .who { font-size: 13px; color: var(--muted); margin: 4px 0 0; overflow-wrap: anywhere; }
.tag { padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.Pickup { color: var(--info); } .tag.Return { color: var(--good); } .tag.Studio { color: var(--accent); }
.wa { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; font-size: 14px; }

.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.total { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.total span { font-size: 12px; color: var(--muted); display: block; }
.total b { font-size: 22px; display: block; margin: 4px 0; }
.due { flex-direction: column; align-items: stretch; gap: 10px; }
.due .top { display: flex; justify-content: space-between; gap: 12px; }
.due .amt { text-align: right; flex-shrink: 0; }
.due .amt b { font-size: 15px; display: block; }
.due .amt span { font-size: 12px; font-weight: 600; }
.Unpaid { color: var(--warn); } .Part { color: var(--accent); }
.foot { margin-top: 20px; text-align: center; }
#pay-note { margin-top: 12px; }

nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #14171C; border-top: 1px solid var(--line); padding: 8px 8px calc(env(safe-area-inset-bottom) + 8px); }
nav button { flex: 1 1 0; min-width: 0; padding: 0 2px; min-height: 48px; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; }
nav button.on { color: var(--accent); }

button.row { width: 100%; text-align: left; color: var(--text); font: inherit; }
.late button { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; flex: 1; min-height: 44px; }
.check-what { font-size: 22px; font-weight: 700; margin: 0 0 4px; overflow-wrap: anywhere; }
.items { margin: 12px 0 0; padding: 12px 16px 12px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; line-height: 1.6; }
.progress { margin-top: 18px; font-size: 13px; font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar div { height: 8px; background: var(--accent); width: 0; transition: width .15s; }
.step { min-height: 58px; padding: 8px 14px; display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font: inherit; text-align: left; width: 100%; }
.step .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #4A515E; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #141414; font-weight: 700; }
.step[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); }
.step b { display: block; font-size: 15px; }
.step small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.done { margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: #14221C; border: 1px solid #245240; color: var(--good); font-weight: 600; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
#login .stack { margin-top: 36px; }
#login h2 { margin: 0; }
select { min-height: 52px; padding: 0 12px; font-size: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card h2 { margin: 0 0 4px; }
.card input, .card select { background: var(--bg); }
.row .what, .row .who { display: block; }
.contact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.contact:empty { display: none; }
.step small.by { color: var(--good); margin-top: 4px; }
.staff { flex-direction: column; align-items: stretch; gap: 10px; }
.staff.off { opacity: 0.6; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline { display: flex; flex-direction: column; gap: 8px; }
.inline input { background: var(--bg); }
.good { color: var(--good); }
.small.error { color: var(--warn); }
#who-am-i { margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
#login .stack { margin-top: 36px; }
#login h2 { margin: 0; }
select { min-height: 52px; padding: 0 12px; font-size: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card h2 { margin: 0 0 4px; }
.card input, .card select { background: var(--bg); }
.row .what, .row .who { display: block; }
.contact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.contact:empty { display: none; }
.step small.by { color: var(--good); margin-top: 4px; }
.staff { flex-direction: column; align-items: stretch; gap: 10px; }
.staff.off { opacity: 0.65; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline { display: flex; flex-direction: column; gap: 8px; }
.inline input { background: var(--bg); }
.good { color: var(--good); }
.small.error { color: var(--warn); }
#who-am-i { margin-top: 4px; }
nav button { font-size: 13px; }
input[type=search] { width: 100%; margin-top: 6px; font-size: 17px; }
.who.good { color: var(--good); }
.who.Unpaid { color: var(--warn); font-weight: 600; }
.who.Part { color: var(--accent); font-weight: 600; }
#view-prep h2:first-of-type { margin-top: 14px; }
.ghost:disabled { opacity: 0.6; cursor: default; }
#notice.calm { color: var(--muted); }
