html, body { -webkit-tap-highlight-color: transparent; }
/* Team App v2 — design tokens. One sheet, every screen. Dark-first by brand
   (chocolate + amber); semantic colors are separate from the accent. */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap');

:root {
  /* ground + surfaces */
  --bg: #0f0b08; --panel: #1a1411; --panel-2: #221a15; --line: #2f2622; --line-strong: #4a3b31;
  /* text */
  --ink: #f5efe8; --muted: #a89c92; --dim: #6f655d; --on-accent: #1a1000;
  /* brand accent */
  --accent: #f2a33a; --accent-soft: rgba(242,163,58,.16); --accent-ring: rgba(242,163,58,.45);
  /* semantic (never the accent) */
  --ok: #3ecf8e; --ok-bg: #0f2a20; --warn: #f6c453; --warn-bg: #3a2e0e; --danger: #ff6b6b; --danger-bg: #3a1414; --info: #5cb8ff; --info-bg: #0e2334;
  /* store colors are DATA (locations.color); these are the defaults seeded for the first two */
  --store-santa-clara: #3ecf8e; --store-fremont: #5cb8ff;
  /* type */
  --font: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 11px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 26px;
  /* shape + space */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 28px;
  --tabbar-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 8px 24px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-md); line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font-size: 16px; } /* prevents iOS zoom on focus */
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 20; background: rgba(15,11,8,.92); backdrop-filter: blur(10px); padding: calc(var(--safe-t) + 8px) var(--sp-4) var(--sp-3); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.app-header h1 { font-size: var(--fs-xl); font-weight: 800; margin: 0; letter-spacing: -.01em; }
.app-header .sub { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 6px; align-items: center; }
.app-main { flex: 1; padding: 0 var(--sp-4) calc(var(--tabbar-h) + var(--safe-b) + var(--sp-5)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + var(--safe-b)); padding: 6px 6px var(--safe-b); border-top: 1px solid var(--line); background: rgba(15,11,8,.96); backdrop-filter: blur(10px); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: var(--fs-xs); font-weight: 600; color: var(--dim); position: relative; border-radius: var(--r-md); }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab .badge { position: absolute; top: 2px; right: calc(50% - 22px); }

/* ---------- primitives ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--panel); display: grid; place-items: center; color: var(--muted); position: relative; }
.icon-btn svg { width: 18px; height: 18px; }
.dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.store { color: var(--store-color, var(--muted)); background: color-mix(in srgb, var(--store-color, #888) 16%, transparent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); }
.card.tap:active { background: var(--panel-2); }
.section-title { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: var(--sp-5) 0 var(--sp-2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.stack { display: flex; flex-direction: column; gap: var(--sp-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-md); font-weight: 700; background: var(--panel-2); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { padding: 6px 12px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; min-height: 46px; width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.empty { text-align: center; color: var(--muted); padding: var(--sp-6) var(--sp-4); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--ink); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; box-shadow: var(--shadow); z-index: 40; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: var(--panel); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--sp-3) var(--sp-4) calc(var(--sp-5) + var(--safe-b)); max-height: 88dvh; overflow: auto; box-shadow: var(--shadow); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto var(--sp-3); }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4); padding: var(--sp-5); background: radial-gradient(120% 60% at 50% 0%, #5a2e12 0%, var(--bg) 60%); }
.login .brand { font-size: var(--fs-2xl); font-weight: 800; color: #f6dfb6; }
.login .tag { letter-spacing: .3em; font-size: var(--fs-xs); color: #b98d5a; text-transform: uppercase; }
.pin-dots { display: flex; gap: 12px; margin: var(--sp-2) 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); }
.pin-dots i.on { background: var(--accent); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 340px; }
.keypad button { height: 64px; border-radius: var(--r-lg); background: #2a2320; font-size: 26px; font-weight: 700; }
.keypad button.go { background: var(--accent); color: var(--on-accent); font-size: var(--fs-lg); }
.keypad button:active { background: #3a2f2a; }

/* ---------- forms (hub + runners) ---------- */
.progress { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s; }
.progress.ok > i { background: var(--ok); }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.state.due { background: var(--accent-soft); color: var(--accent); }
.state.progress-on { background: var(--info-bg); color: var(--info); }
.state.done { background: var(--ok-bg); color: var(--ok); }
.state.later { background: var(--panel-2); color: var(--dim); }
.tile { display: flex; align-items: center; gap: 14px; color: inherit; width: 100%; text-align: left; }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-2); color: var(--accent); display: grid; place-items: center; flex: none; }
.tile .ico svg { width: 24px; height: 24px; }
.tile .ico.info { color: var(--info); } .tile .ico.ok { color: var(--ok); } .tile .ico.warn { color: var(--warn); }
.tile .body { flex: 1; min-width: 0; }
.tile .body .t { font-weight: 700; }
.tile .body .s { font-size: var(--fs-sm); color: var(--muted); }
.tile .chev { color: var(--dim); flex: none; }
.tile .chev svg { width: 20px; height: 20px; }
.today-card { background: linear-gradient(135deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-strong); }
.today-card.due { border-color: var(--accent); }
.today-card.done { border-color: var(--ok); }
.sub-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.sub-head .back { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--panel); display: grid; place-items: center; color: var(--muted); flex: none; }
.sub-head .back svg { width: 20px; height: 20px; }
.sub-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.sub-head .meta { font-size: var(--fs-xs); color: var(--muted); }
.foot-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 25; background: rgba(15,11,8,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 8px var(--sp-4); }
.foot-bar .hint { font-size: var(--fs-xs); text-align: center; margin: 0 0 6px; color: var(--muted); }
.foot-bar .hint.warn { color: var(--warn); } .foot-bar .hint.ok { color: var(--ok); }
.foot-bar .btns { display: flex; gap: 8px; }
.foot-bar .btns .btn { flex: 1; }
.has-foot { padding-bottom: 96px; }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.check-row.on { border-color: var(--line-strong); }
.check-row .box { width: 26px; height: 26px; min-width: 26px; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--on-accent); margin-top: 1px; flex: none; }
.check-row.on .box { background: var(--accent); border-color: var(--accent); }
.check-row .box svg { width: 16px; height: 16px; }
.check-row .txt { flex: 1; min-width: 0; }
.check-row.on .txt .title { color: var(--muted); text-decoration: line-through; }
.check-row .desc { font-size: var(--fs-xs); color: var(--muted); white-space: pre-wrap; margin-top: 2px; }
.check-row .note { font-size: var(--fs-xs); color: var(--accent); margin-top: 4px; }
.check-row .note-btn { font-size: var(--fs-xs); color: var(--dim); padding: 6px 8px; min-height: 32px; border-radius: var(--r-sm); flex: none; }
.check-row .note-btn.on { color: var(--accent); }
.select { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 6px 8px; min-height: 36px; max-width: 48%; font-size: var(--fs-sm); color: var(--ink); }
.select.unset { border-color: var(--accent-ring); color: var(--accent); background: var(--accent-soft); }
.issues-card { border: 2px solid var(--accent-ring); background: linear-gradient(135deg, var(--warn-bg), var(--panel)); border-radius: var(--r-lg); padding: var(--sp-4); }
.issues-card .kicker { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.issues-card h3 { margin: 2px 0 4px; font-size: var(--fs-lg); }
.issues-card .lead { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 12px; }
.issues-card .off { opacity: .45; pointer-events: none; }
.issue { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; }
.dashed { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 12px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.btn.dashed-btn { background: transparent; border: 1px dashed var(--accent-ring); color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.photo-grid .ph { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .ph button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; display: grid; place-items: center; }
.photo-grid .ph button svg { width: 14px; height: 14px; }
.textarea { width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px 12px; min-height: 64px; resize: vertical; }
.textarea:focus, .num-input:focus, .search input:focus { border-color: var(--accent); outline: none; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 40px; height: 44px; min-width: 40px; border-radius: var(--r-sm); background: var(--panel-2); font-size: 22px; line-height: 1; }
.stepper button:active { background: var(--line-strong); }
.num-input { width: 100%; min-width: 0; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 6px; min-height: 44px; text-align: center; font-weight: 600; }
.num-input.miss { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.num-input.low { border-color: var(--danger); }
.num-input::placeholder { color: var(--dim); font-weight: 500; }
.lbl { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tick { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); min-height: 32px; cursor: pointer; }
.tick .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--on-accent); flex: none; }
.tick.on .box { background: var(--accent); border-color: var(--accent); }
.tick .box svg { width: 13px; height: 13px; }
.tag { font-size: 10px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); text-transform: lowercase; }
.tag.carry { border-color: var(--info); color: var(--info); }
.tag.next { border-color: var(--warn); color: var(--warn); }
.card.carry { border-color: color-mix(in srgb, var(--info) 45%, transparent); background: var(--info-bg); }
.card.prep { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.search { position: relative; }
.search input { width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 40px 12px 14px; min-height: 46px; }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: var(--r-sm); color: var(--muted); display: grid; place-items: center; }
.search .clear svg { width: 16px; height: 16px; }
.sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sec > .sec-h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; font-weight: 700; text-align: left; }
.sec > .sec-h .n { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.sec > .sec-h svg { width: 16px; height: 16px; color: var(--dim); margin-right: 8px; transition: transform .15s; }
.sec > .sec-h.open svg { transform: rotate(90deg); }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.inv-row .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.inv-row .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-row .nm .ok-ic { color: var(--ok); flex: none; } .inv-row .nm .ok-ic svg { width: 16px; height: 16px; }
.inv-row .meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.inv-row .num-input { width: 92px; flex: none; text-align: right; font-size: var(--fs-lg); }
.pill-danger { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); flex: none; }
.hidden { display: none !important; }

/* ---------- profile / notifications / onboarding ---------- */
.link { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); background: none; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-danger { color: var(--danger); } .t-info { color: var(--info); }
.pill { display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.danger { background: var(--danger-bg); color: var(--danger); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.card.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.card.accent { border-color: var(--accent); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 12px 0; border-top: 1px solid var(--line); min-height: 48px; }
.list-row:first-child { border-top: 0; }
.list-row.tap { width: 100%; text-align: left; color: inherit; }
.list-row.tap:active { background: var(--panel-2); }
.list-row .main { flex: 1; min-width: 0; } .list-row .main b { display: block; }
.list-row .sub { font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 18px; height: 18px; color: var(--dim); flex: none; }
.sheet h2 { font-size: var(--fs-lg); font-weight: 800; margin: 0 0 var(--sp-3); }
.sheet .actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); } .sheet .actions .btn { flex: 1; }
.doc-body { background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: var(--sp-3); max-height: 50dvh; overflow: auto; white-space: pre-wrap; font-size: var(--fs-sm); line-height: 1.5; }
.avatar.xl { width: 112px; height: 112px; font-size: 44px; }
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: var(--sp-3) 0 var(--sp-2); }
.avatar-wrap { position: relative; }
.avatar-wrap .fab { position: absolute; right: -2px; bottom: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: var(--shadow); border: 3px solid var(--bg); }
.avatar-wrap .fab svg { width: 18px; height: 18px; }
.points { font-size: 40px; font-weight: 800; line-height: 1; }
.points.p0 { color: var(--ok); } .points.p6 { color: var(--warn); } .points.p10 { color: var(--accent); } .points.p15 { color: #ff9f43; } .points.p20 { color: var(--danger); }
.thresholds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: var(--sp-3); }
.thresholds div { background: var(--panel-2); border-radius: var(--r-sm); padding: 8px 6px; text-align: center; font-size: var(--fs-xs); color: var(--muted); }
.thresholds div b { display: block; font-size: var(--fs-lg); color: var(--ink); }
.thresholds div.hit { outline: 1px solid var(--danger); color: var(--danger); }
.fullscreen { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; }
.fullscreen .top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 12px) var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--line); }
.fullscreen .top b { font-size: var(--fs-md); }
.fullscreen .mid { flex: 1; display: grid; place-items: center; padding: var(--sp-4); }
.fullscreen .bottom { padding: var(--sp-4) var(--sp-4) calc(var(--sp-5) + var(--safe-b)); border-top: 1px solid var(--line); }
.crop { position: relative; width: 300px; height: 300px; overflow: hidden; background: #000; border-radius: var(--r-md); touch-action: none; user-select: none; -webkit-user-select: none; }
.crop img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop .mask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 150px 150px, transparent 149px, rgba(0,0,0,.65) 150px); }
.crop .ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; border: 2px solid var(--accent-ring); }
input[type="range"].zoom { width: 100%; accent-color: var(--accent); }
.onboard { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4); padding: calc(var(--safe-t) + var(--sp-5)) var(--sp-5) calc(var(--safe-b) + var(--sp-5)); text-align: center; max-width: 420px; margin: 0 auto; }
.onboard .glyph { width: 80px; height: 80px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.onboard .glyph svg { width: 36px; height: 36px; }
.onboard h1 { font-size: var(--fs-2xl); font-weight: 800; margin: 0; }
.onboard p { color: var(--muted); margin: 0; }
.onboard .btn { width: 100%; }
.pin-input { text-align: center; font-size: 24px; letter-spacing: .4em; }
.notif { display: flex; gap: var(--sp-3); align-items: flex-start; }
.notif .body { flex: 1; min-width: 0; text-align: left; color: inherit; }
.notif .body p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--muted); white-space: pre-line; }
.notif .title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.notif .title i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.notif .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.store-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.hidden-input { display: none; }
.err { color: var(--danger); font-size: var(--fs-sm); font-weight: 600; }
.ok-msg { color: var(--ok); font-size: var(--fs-sm); font-weight: 600; }
.stat-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }

/* ---------- forms / reports primitives (shift report + review) ---------- */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
.stepper button { width: 46px; min-height: 46px; font-size: 22px; font-weight: 700; color: var(--accent); background: var(--panel-2); }
.stepper button:active { background: var(--line); }
.stepper output { min-width: 52px; display: grid; place-items: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper.block { display: flex; width: 100%; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-md); }
.check input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.check.muted { color: var(--muted); font-size: var(--fs-sm); }
.hint { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--sp-2); }
.notice { border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-sm); border: 1px solid transparent; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.notice.danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.card.required { border-color: var(--accent); }
.card h2 { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--sp-2); }
.card h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin: var(--sp-3) 0 var(--sp-1); }
.subrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.subrow > * { flex: 1; min-width: 0; }
.subrow > .x { flex: none; }
.subrow input, .subrow select { background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; width: 100%; }
.add-btn svg { width: 22px; height: 22px; flex: none; }
.add-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; margin-top: 8px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--accent); font-size: var(--fs-sm); font-weight: 600; }
.x-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--danger); }
.x-btn svg { width: 18px; height: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 8px 0; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel-2); display: grid; place-items: center; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; }
.thumb .del svg { width: 14px; height: 14px; }
.thumb.tap:active { opacity: .8; }
.kv { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 6px 12px; font-size: var(--fs-sm); }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--ink); font-size: var(--fs-xs); font-weight: 700; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.pill.info { background: var(--info-bg); color: var(--info); }
.list-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 2px; border-bottom: 1px solid var(--line); color: inherit; min-height: 56px; }
.list-row:active { background: var(--panel); }
.list-row .main { flex: 1; min-width: 0; }
.list-row .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .s { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-lg); font-weight: 800; }
.sheet .field { margin-top: var(--sp-2); }
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; flex-direction: column; }
.viewer .img { flex: 1; display: grid; place-items: center; min-height: 0; padding: var(--sp-3); }
.viewer .img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }
.viewer .bar { display: flex; gap: 10px; padding: var(--sp-3) var(--sp-4) calc(var(--sp-4) + var(--safe-b)); }
.viewer .top { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--safe-t) + 10px) var(--sp-4) 6px; color: var(--muted); font-size: var(--fs-sm); }
.entry-card { display: flex; align-items: center; gap: 14px; color: inherit; border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--panel) 70%); }
.entry-card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.entry-card .ico svg { width: 24px; height: 24px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.status-dot.done { background: var(--ok); }
.summary { white-space: pre-wrap; word-break: break-word; font-size: var(--fs-md); line-height: 1.5; }

/* ---------- chat thread ---------- */
.thread { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); display: flex; flex-direction: column; background: var(--bg); z-index: 35; } /* above the tab bar (30); sized to the VISUAL viewport so the composer rides above the keyboard on iOS (vars set in app.tsx) */
.thread-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 8px) var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--line); background: rgba(15,11,8,.96); }
.thread-body { flex: 1; overflow-y: auto; padding: var(--sp-3) var(--sp-3) var(--sp-4); -webkit-overflow-scrolling: touch; overflow-anchor: none; }
.thread-day { text-align: center; font-size: var(--fs-xs); color: var(--dim); margin: 14px 0 8px; letter-spacing: .04em; text-transform: uppercase; }
.msg { display: flex; gap: 8px; margin: 6px 0; align-items: flex-end; }
.msg.mine { flex-direction: row-reverse; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; background: var(--panel-2); color: var(--muted); }
.bubble-wrap { max-width: 82%; position: relative; }
.who { font-size: var(--fs-xs); color: var(--muted); margin: 0 0 3px 6px; font-weight: 600; }
.bubble { background: var(--panel-2); border-radius: 16px 16px 16px 4px; padding: 9px 12px; font-size: var(--fs-md); }
.msg.mine .bubble { background: #4a2f14; border-radius: 16px 16px 4px 16px; }
.bubble.offer { border: 1px solid var(--info); } .bubble.ack { border: 1px solid var(--accent); }
.bubble .att { display: block; max-width: 100%; border-radius: 10px; margin-bottom: 6px; }
.bubble .meta { font-size: 10.5px; color: var(--dim); margin-top: 4px; text-align: right; }
.reacts { display: flex; gap: 4px; margin: 3px 0 0 6px; flex-wrap: wrap; }
.msg.mine .reacts { justify-content: flex-end; margin-right: 6px; }
.react { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 8px; font-size: 12px; }
.react.mine { border-color: var(--accent); }
.picker { position: absolute; bottom: calc(100% + 4px); left: 0; display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 6px; box-shadow: var(--shadow); z-index: 5; }
.msg.mine .picker { left: auto; right: 0; }
.picker button { font-size: 20px; padding: 4px 6px; }
.composer { border-top: 1px solid var(--line); background: rgba(15,11,8,.96); padding: 8px var(--sp-3) calc(8px + var(--safe-b)); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; resize: none; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 22px; padding: 11px 14px; min-height: 44px; max-height: calc(var(--vvh, 100dvh) * 0.4); overflow-y: auto; }
.att-row { display: flex; gap: 8px; margin-bottom: 8px; }
.att-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 14px; line-height: 1; }
.quiz { margin-top: 8px; background: var(--bg); border-radius: 10px; padding: 10px; }
.quiz-title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.quiz-q { margin-bottom: 10px; }
.quiz-choice { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 4px; font-size: var(--fs-sm); }
.quiz-choice.on { border-color: var(--accent); } .quiz-choice.wrong { border-color: var(--danger); }
.quiz-done { margin-top: 6px; font-size: var(--fs-sm); color: var(--ok); font-weight: 600; }

.fab { position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 28px; font-weight: 800; box-shadow: 0 8px 24px rgba(242,163,58,.35); z-index: 28; }

/* ---- admin screens (#/admin/*) ---- */
.store-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; margin: 4px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.store-bar::-webkit-scrollbar { display: none; }
.store-bar button { flex: none; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.store-bar button[aria-pressed="true"] { border-color: var(--store-color, var(--accent)); color: var(--store-color, var(--accent)); background: color-mix(in srgb, var(--store-color, var(--accent)) 14%, transparent); }
.store-bar button .dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--store-color, var(--accent)); }
.count-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.count-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: inherit; min-height: 78px; text-align: left; }
.count-tile .n { font-size: var(--fs-2xl); font-weight: 800; line-height: 1; }
.count-tile .l { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.count-tile.hot { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.count-tile.hot .n { color: var(--warn); }
.count-tile:active { background: var(--panel-2); }
.inbox-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.inbox-card.pending { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.inbox-card .head { display: flex; align-items: center; gap: 10px; }
.inbox-card .head .who { flex: 1; min-width: 0; }
.inbox-card .head .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-card .head .who .s { font-size: var(--fs-sm); color: var(--muted); }
.inbox-card .quote { font-size: var(--fs-sm); color: var(--ink); background: var(--panel-2); border-radius: var(--r-sm); padding: 8px 10px; white-space: pre-wrap; }
.inbox-card .acts { display: flex; gap: 8px; }
.inbox-card .acts .btn { flex: 1; }
.pin-big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 34px; font-weight: 800; letter-spacing: .3em; text-align: center; color: var(--accent); padding: 12px 0; }
.pin-list { display: flex; flex-direction: column; gap: 6px; }
.pin-list div { display: flex; justify-content: space-between; align-items: center; background: var(--panel-2); border-radius: var(--r-sm); padding: 8px 12px; }
.pin-list code { font-size: var(--fs-lg); font-weight: 800; letter-spacing: .2em; color: var(--accent); }
.role-pill { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.role-pill.owner { background: var(--accent-soft); color: var(--accent); }
.role-pill.manager { background: var(--info-bg); color: var(--info); }
.role-pill.lead { background: var(--ok-bg); color: var(--ok); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.switch input[type="checkbox"] { appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line-strong); position: relative; flex: none; margin: 0; transition: background .15s; }
.switch input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.switch input[type="checkbox"]:checked { background: var(--ok); }
.switch input[type="checkbox"]:checked::after { left: 23px; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.legacy-link { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; min-height: 52px; }
.legacy-link:first-child { border-top: 0; }
.legacy-link .t { flex: 1; font-weight: 700; }
.legacy-link .ext { color: var(--dim); font-size: var(--fs-xs); }
.loc-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.loc-row:first-child { border-top: 0; }
.loc-row .chip { flex: none; }
.loc-row select { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 10px; min-height: 40px; }

/* ---------- pages: kudos / flavors / help / sign / 2fa / owner pages ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-3); }
.page-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.page-head p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.gate { text-align: center; padding: var(--sp-6) var(--sp-4); }
.gate .glyph { width: 64px; height: 64px; border-radius: 50%; background: var(--panel-2); color: var(--muted); display: grid; place-items: center; margin: 0 auto var(--sp-3); }
.gate .glyph svg { width: 28px; height: 28px; }
.kudo { border-left: 3px solid var(--accent); }
.kudo .from { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kudo .from b { color: var(--accent); }
.kudo .msg { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; }
.kudo .when { font-size: var(--fs-xs); color: var(--dim); }
.counter { font-size: var(--fs-xs); color: var(--dim); text-align: right; }
.counter.over { color: var(--danger); }
.flavor { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel-2); border-radius: var(--r-md); font-weight: 600; }
.flavor .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.flavor.always .sw { background: var(--ok); }
.week-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: var(--sp-3) 0 6px; }
.help-sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.help-sec > .h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; text-align: left; font-weight: 700; color: inherit; }
.help-sec > .h .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--panel-2); color: var(--accent); display: grid; place-items: center; flex: none; }
.help-sec > .h .ico svg { width: 18px; height: 18px; }
.help-sec > .h .chev { margin-left: auto; transition: transform .15s; }
.help-sec.open > .h .chev { transform: rotate(90deg); }
.help-sec .body { padding: 0 14px 14px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.help-sec .body p { margin: 0 0 8px; } .help-sec .body ol, .help-sec .body ul { margin: 4px 0 10px 18px; padding: 0; } .help-sec .body li { margin-bottom: 4px; }
.help-sec .body b { color: var(--ink); } .help-sec .body .key { color: var(--accent); font-weight: 600; }
.help-sec .body mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }
.pdf-frame { width: 100%; height: 58dvh; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel-2); }
.qr { width: min(240px, 70vw); height: min(240px, 70vw); background: #fff; border-radius: var(--r-md); padding: 6px; margin: 0 auto; display: block; }
.qr path { fill: #0f0b08; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.code-grid div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; text-align: center; font-size: var(--fs-sm); }
.otp-input { text-align: center; font-size: 28px; letter-spacing: .35em; }
.steps { counter-reset: s; } .steps .card { position: relative; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.stat-tile .k { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-tile .v { font-size: var(--fs-xl); font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-tile .s { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.stat-tile.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); } .stat-tile.warn .v { color: var(--warn); }
.stat-tile.bad { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); } .stat-tile.bad .v { color: var(--danger); }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.stat:first-child { border-top: 0; } .stat .k { color: var(--muted); } .stat .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.item { background: var(--panel-2); border-radius: var(--r-md); padding: 10px 12px; margin-top: 6px; font-size: var(--fs-sm); border-left: 3px solid transparent; }
.item.warn { border-left-color: var(--warn); } .item.bad { border-left-color: var(--danger); } .item.ok { border-left-color: var(--ok); }
.item.done { opacity: .55; }
.item .meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.item .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.item .entries { margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); } .item .entries div { padding: 2px 0; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 48px; margin: 8px 0; }
.spark i { flex: 1; min-width: 2px; background: var(--line-strong); border-radius: 2px; }
.spark i.bad { background: var(--danger); } .spark i.good { background: var(--ok); }
.kv-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.kv-table th, .kv-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.kv-table th { color: var(--muted); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.kv-table td.num, .kv-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.crew-note { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.crew-note:first-child { border-top: 0; } .crew-note .full { grid-column: 1 / -1; }
.rate { display: inline-flex; gap: 4px; } .rate button { padding: 6px 10px; border-radius: 8px; font-size: var(--fs-xs); font-weight: 700; background: var(--panel-2); color: var(--muted); min-height: 34px; }
.rate button[aria-pressed="true"].good { background: var(--ok-bg); color: var(--ok); } .rate button[aria-pressed="true"].neutral { background: var(--panel); color: var(--ink); outline: 1px solid var(--line-strong); } .rate button[aria-pressed="true"].concern { background: var(--danger-bg); color: var(--danger); }
.sms-list .row-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 4px; border-bottom: 1px solid var(--line); color: inherit; min-height: 60px; }
.sms-list .row-item:active { background: var(--panel); }
.sms-list .unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; } .sms-list .unread-dot.off { visibility: hidden; }
.bubble.in { background: var(--panel-2); } .bubble.out { background: #4a2f14; }
.bubble .tagline { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; opacity: .65; margin-bottom: 2px; }
.mms { max-width: 230px; max-height: 320px; border-radius: 12px; display: block; margin-top: 4px; }
.quick-panel { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; padding: 4px 0 8px; }
.quick-panel .qrow { display: flex; gap: 6px; } .quick-panel .qrow .chip-btn { flex: 1; text-align: left; background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink); border-radius: var(--r-md); padding: 8px 12px; font-size: var(--fs-sm); white-space: normal; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 6px; cursor: pointer; }
.pick-row.on { border-color: var(--accent); background: var(--panel); }
.pick-row input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.flag-row { background: var(--danger-bg); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 6px; font-size: var(--fs-xs); }
.thumb-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .thumb-row .thumb { width: 84px; height: 84px; }

.reads { font-size: 10.5px; color: var(--dim); margin-top: 3px; text-align: right; cursor: pointer; line-height: 1.5; }
.msg:not(.mine) .reads { text-align: left; }

/* steppers/cards inside 2-col grids must be allowed to shrink (390px phones) */
.stepper { max-width: 100%; min-width: 0; }
.stepper input, .stepper .val { min-width: 0; width: 100%; }
.grid2 > *, .count-grid > * { min-width: 0; }

.picker { flex-wrap: wrap; max-width: 88vw; }
.picker-sep { width: 1px; align-self: stretch; background: var(--line-strong); margin: 0 4px; }
.picker-act { font-size: 13px !important; font-weight: 700; padding: 4px 8px !important; }
.bubble { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* ---- chat parity (attachments, jump-to-latest, featured convos, people picker) ---- */
.att-grid { display: grid; gap: 4px; margin-bottom: 6px; } .att-grid.two { grid-template-columns: 1fr 1fr; }
.att-grid .att { margin: 0; width: 100%; max-height: 280px; object-fit: contain; background: rgba(0,0,0,.25); cursor: zoom-in; }
.att-grid.two .att { height: 120px; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; margin: 4px 0; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--line-strong); color: var(--ink); font-size: var(--fs-sm); }
.att-file svg { width: 18px; height: 18px; flex: none; color: var(--muted); } .att-file .n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .att-file .o { color: var(--muted); font-size: var(--fs-xs); flex: none; }
.att-row { flex-wrap: wrap; } .att-thumb.file { display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-strong); font-size: 10px; font-weight: 800; color: var(--muted); text-align: center; padding: 4px; }
.att-thumb.busy { display: grid; place-items: center; background: var(--panel); color: var(--muted); font-size: 10px; }
.bubble a.lnk { color: var(--accent); text-decoration: underline; word-break: break-all; }
.viewer .img .att { max-width: 100%; max-height: 100%; object-fit: contain; }
.composer { position: relative; }
.jump { position: absolute; right: 14px; top: -52px; height: 40px; min-width: 40px; padding: 0 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 800; font-size: 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; z-index: 5; }
.jump .badge { background: var(--accent); }
.convo { display: flex; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); color: inherit; }
.convo .avatar { width: 44px; height: 44px; background: var(--panel-2); color: var(--muted); }
.convo.featured { padding: 14px 10px; margin: 4px 0; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); }
.convo.featured .avatar { width: 52px; height: 52px; font-size: 24px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.convo.featured .t { font-size: var(--fs-lg); font-weight: 800; }
.convo-sep { font-size: var(--fs-xs); color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin: 12px 2px 4px; }
.noapp { font-size: var(--fs-xs); color: var(--muted); background: var(--panel-2); border-radius: 6px; padding: 1px 6px; }

/* Header bell count (legacy topBar: number, capped at 99+) */
.icon-btn .bell-count { position: absolute; top: -5px; right: -6px; border: 2px solid var(--bg); height: 18px; min-width: 18px; }
/* Login card shake on a failed attempt (legacy .shake) */
.shake { animation: shake 360ms cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%,90%{transform:translateX(-2px)} 20%,80%{transform:translateX(4px)} 30%,50%,70%{transform:translateX(-8px)} 40%,60%{transform:translateX(8px)} }

/* v1 platform fixes: kill iOS double-tap-to-zoom + 300ms delay on tap targets (fast PIN entry
   used to zoom the login screen), and stop text-selection/callout on rapid keypad taps. */
button, [role="button"], .icon-btn, .bubble, .keypad button { touch-action: manipulation; }
.keypad button { -webkit-user-select: none; user-select: none; }
