/* CAGE — mobile-first. Rugged, hi-vis, thumb-reachable. */
:root {
  --bg: #0d1014;
  --bg-elev: #161b22;
  --bg-card: #1b2129;
  --line: #2a323d;
  --ink: #f2f5f8;
  --ink-dim: #93a1b0;
  --ink-mute: #5f6c7b;
  --amber: #ffb800;     /* hi-vis safety accent */
  --amber-ink: #1a1407;
  --green: #2ecc71;
  --red: #ff5a4d;
  --blue: #3da5ff;
  --r: 16px;
  --tap: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font: inherit; }

/* ---------- login ---------- */
.auth-screen {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(120% 90% at 50% 0%, #12161c, var(--bg));
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 22px calc(24px + var(--safe-b));
}
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand .mark {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: var(--amber); color: var(--amber-ink);
  display: grid; place-items: center; font-weight: 900; font-size: 22px;
  box-shadow: 0 0 0 3px rgba(255,184,0,.15);
}
.auth-brand span { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.auth-sub { color: var(--ink-mute); font-weight: 600; margin: -4px 0 8px; }
.auth-card .field { margin-bottom: 0; }
.auth-error {
  color: var(--red); font-size: 13px; font-weight: 700;
  background: rgba(255,90,77,.12); border-radius: 10px; padding: 10px 12px;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, #11161d, #0d1014);
  border-bottom: 1px solid var(--line);
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brandtext { flex: 1; min-width: 0; }
.userchip { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px; }
.userchip:active { transform: scale(.97); }
.uc-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--ink-mute); color: #04121f; }
.uc-avatar.admin { background: var(--amber); color: var(--amber-ink); }
.uc-avatar.manager { background: var(--blue); color: #04121f; }
.uc-avatar.mechanic { background: var(--green); color: #04210f; }
.uc-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.uc-name { font-weight: 800; font-size: 13px; }
.uc-role { font-size: 11px; color: var(--ink-mute); font-weight: 700; }

/* user switcher rows */
.userrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.userrow.on { border-color: var(--amber); }
.ur-meta { flex: 1; display: flex; flex-direction: column; }
.ur-name { font-weight: 800; font-size: 15px; }
.ur-scope { font-size: 12px; color: var(--ink-mute); }
.rolepill { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 8px; border-radius: 7px; }
.rolepill.admin { background: rgba(255,184,0,.16); color: var(--amber); }
.rolepill.manager { background: rgba(61,165,255,.16); color: var(--blue); }
.rolepill.mechanic { background: rgba(46,204,113,.16); color: var(--green); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--amber); color: var(--amber-ink);
  display: grid; place-items: center; font-weight: 900; font-size: 18px;
  box-shadow: 0 0 0 3px rgba(255,184,0,.15);
}
.brand h1 { font-size: 18px; margin: 0; letter-spacing: .5px; font-weight: 800; }
.brand small { display: block; color: var(--ink-mute); font-weight: 600; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip { flex: none; max-width: 46%; }
.uc-meta { min-width: 0; }
.uc-name, .uc-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 88px; }
.selectrow { display: flex; gap: 8px; margin-top: 12px; }
.selectrow .loc-select { margin-top: 0; }
.selectrow #locSelect { flex: 1.1; }
.selectrow #placeSelect { flex: 1; }
.loc-select {
  margin-top: 12px; width: 100%; height: 44px; padding: 0 14px; min-width: 0;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-weight: 700;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2393a1b0' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* ---------- screen + scroll ---------- */
main { padding: 16px 16px calc(96px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
.screen { display: none; }
.screen.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- search + filters ---------- */
.search {
  display: flex; align-items: center; gap: 10px; height: var(--tap);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 16px; margin-bottom: 12px;
}
.search input { flex: 1; background: none; border: 0; color: var(--ink); outline: none; font-size: 17px; }
.search svg { flex: none; opacity: .6; }
.chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 16px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--ink-dim);
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.chip.on { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.chip .n { opacity: .6; font-weight: 800; margin-left: 4px; }

/* ---------- item grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-align: left; position: relative; transition: transform .08s;
}
.card:active { transform: scale(.975); }
.card .pic { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; background: var(--bg-elev); }
.card .body { padding: 10px 12px 12px; }
.card .nm { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.card .sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-mute); }
.qty {
  font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 14px;
  padding: 3px 9px; border-radius: 999px; background: rgba(46,204,113,.14); color: var(--green);
}
.qty.low { background: rgba(255,90,77,.16); color: var(--red); }
.qty.tool { background: rgba(61,165,255,.15); color: var(--blue); }
.tag-low {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .5px;
  padding: 3px 7px; border-radius: 6px; text-transform: uppercase;
}
.kindpill {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(4px);
}
.kindpill.tool { background: rgba(61,165,255,.85); color: #04121f; }
.kindpill.part { background: rgba(0,0,0,.45); color: #fff; }

/* ---------- bottom nav ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(13,16,20,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.nav button {
  height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-mute); font-size: 10px; font-weight: 700;
}
.nav button.on { color: var(--amber); }
.nav button svg { width: 23px; height: 23px; }

/* ---------- add FAB + form ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(84px + var(--safe-b)); z-index: 35;
  width: 56px; height: 56px; border-radius: 18px; background: var(--amber); color: var(--amber-ink);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 4px rgba(255,184,0,.14);
  transition: transform .08s;
}
.fab:active { transform: scale(.93); }
.seg { display: flex; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; height: 46px; border-radius: 10px; font-weight: 800; color: var(--ink-dim); }
.seg button.on { background: var(--amber); color: var(--amber-ink); }
.addphoto {
  width: 100%; height: 96px; border-radius: 14px; border: 1.5px dashed var(--line);
  background: var(--bg-card) center/cover no-repeat; color: var(--ink-mute); font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.addphoto span { background: rgba(13,16,20,.55); padding: 6px 12px; border-radius: 999px; }

/* ---------- sheet (item detail / receipt) ---------- */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 40; display: none;
  background: rgba(0,0,0,.55); align-items: flex-end;
}
.sheet-wrap.open { display: flex; animation: fade .15s ease; }
.sheet {
  width: 100%; max-height: 92vh; overflow-y: auto; max-width: 720px; margin: 0 auto;
  background: var(--bg-elev); border-radius: 22px 22px 0 0; border: 1px solid var(--line);
  padding: 8px 18px calc(28px + var(--safe-b));
  animation: rise .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translateY(12%); } to { transform: none; } }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 14px; }
.sheet .hero { display: flex; gap: 14px; align-items: center; }
.sheet .hero img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: var(--bg-card); flex: none; }
.sheet h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; }
.sheet .sub { color: var(--ink-dim); font-size: 14px; }
.kv { display: flex; gap: 18px; margin: 16px 0; flex-wrap: wrap; }
.kv div { font-size: 13px; color: var(--ink-mute); }
.kv b { display: block; color: var(--ink); font-size: 17px; font-weight: 800; font-family: ui-monospace, Menlo, monospace; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 0; margin: 8px 0 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stepper button { width: 60px; height: var(--tap); font-size: 28px; font-weight: 700; color: var(--amber); }
.stepper button:active { background: rgba(255,184,0,.1); }
.stepper input { flex: 1; height: var(--tap); text-align: center; background: none; border: 0; color: var(--ink); font-size: 24px; font-weight: 800; outline: none; font-family: ui-monospace, Menlo, monospace; }

.field { width: 100%; height: var(--tap); padding: 0 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); outline: none; margin-bottom: 12px; }
.field::placeholder { color: var(--ink-mute); }

.btn {
  width: 100%; height: var(--tap); border-radius: 14px; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-amber:active { filter: brightness(.92); }
.btn-ghost { background: var(--bg-card); border: 1px solid var(--line); color: var(--ink); }
.btn-blue { background: var(--blue); color: #04121f; }
.btn-red { background: rgba(255,90,77,.15); color: var(--red); }
.btn:disabled { opacity: .4; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* tool units */
.unit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.unit .tag { font-family: ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 700; }
.unit .who { font-size: 12px; color: var(--ink-mute); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.in { background: var(--green); } .dot.out { background: var(--amber); }
.unit .spacer { flex: 1; }
.unit button { padding: 0 16px; height: 40px; border-radius: 10px; font-weight: 800; font-size: 14px; }

/* ---------- scan ---------- */
.scan-hero { text-align: center; padding: 14px 0 6px; }
.scan-hero h2 { font-size: 22px; margin: 0 0 6px; }
.scan-hero p { color: var(--ink-dim); margin: 0 0 22px; }
.camera-btn {
  width: 100%; aspect-ratio: 16/10; border-radius: 22px; border: 2px dashed var(--line);
  background: radial-gradient(120% 120% at 50% 0%, #1c2330, #12161c);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--ink-dim); font-weight: 700; cursor: pointer; text-align: center; padding: 12px;
  transition: border-color .12s, background .12s, transform .06s;
  outline: none;
}
.camera-btn:active { transform: scale(.99); }
.camera-btn:focus-visible { border-color: var(--amber); }
.camera-btn.drag { border-color: var(--amber); border-style: solid; background: radial-gradient(120% 120% at 50% 0%, #2c2712, #14181e); }
.camera-btn.drag .ring { transform: scale(1.06); }
.camera-btn .ring { width: 76px; height: 76px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(255,184,0,.12); transition: transform .12s; }
.scan-cta { font-size: 16px; }
.scan-alt { font-size: 13px; font-weight: 600; color: var(--ink-mute); }
.linkbtn { color: var(--amber); font-weight: 700; text-decoration: underline; padding: 0; font-size: inherit; }
.receipt-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: 16px; }
.receipt-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.receipt-head b { font-size: 17px; }
.receipt-head .tot { font-family: ui-monospace, Menlo, monospace; font-weight: 800; color: var(--amber); }
.rline { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.rline .desc { flex: 1; min-width: 0; }
.rline .desc .d1 { font-size: 13px; color: var(--ink-mute); font-family: ui-monospace, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rline select { width: 100%; height: 40px; margin-top: 4px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 0 8px; }
.rline select.unmatched { border-color: var(--red); }
.rline .q { font-family: ui-monospace, Menlo, monospace; font-weight: 800; white-space: nowrap; }
.thumb { width: 100%; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--line); }

/* ---------- activity ---------- */
.act { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.act .ic { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 18px; }
.act .ic.receive { background: rgba(46,204,113,.14); }
.act .ic.use { background: rgba(255,90,77,.14); }
.act .ic.checkout, .act .ic.checkin { background: rgba(61,165,255,.14); }
.act .t1 { font-weight: 700; font-size: 15px; }
.act .t2 { color: var(--ink-mute); font-size: 12px; }
.act .amt { margin-left: auto; font-family: ui-monospace, Menlo, monospace; font-weight: 800; }
.amt.minus { color: var(--red); } .amt.plus { color: var(--green); }

.empty { text-align: center; color: var(--ink-mute); padding: 60px 20px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); font-weight: 800; padding: 12px 20px; border-radius: 999px;
  z-index: 60; opacity: 0; transition: all .25s; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 8px; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.good { background: var(--green); color: #04210f; }
.toast.bad { background: var(--red); color: #2a0703; }

.spinner { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--amber-ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sec-label { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-mute); margin: 18px 0 10px; }

.dot.truck { background: var(--blue); }

/* part "where it's stocked" list */
.wherelist { display: flex; flex-direction: column; gap: 8px; }
.whererow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; }
.whererow > span:first-child { flex: 1; font-weight: 600; font-size: 14px; }
.whererow .binlab { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--ink-mute); }
.whererow b { font-family: ui-monospace, Menlo, monospace; font-size: 16px; min-width: 28px; text-align: right; }

/* tool unit "move to" select */
.unit select.move { height: 40px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink); padding: 0 8px; max-width: 44%; font-weight: 600; }

/* places screen */
.place-list { display: flex; flex-direction: column; gap: 10px; }
.placecard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-dim); }
.placecard:active { transform: scale(.99); }
.pcicon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; flex: none; background: var(--bg-elev); border: 1px solid var(--line); }
.pcicon.truck { box-shadow: inset 0 0 0 2px rgba(61,165,255,.35); }
.pcbody { flex: 1; }
.pcname { font-weight: 800; font-size: 16px; color: var(--ink); }
.pclabel { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink-mute); margin-top: 2px; }

/* scannable label card */
.labelcard { background: #fff; border-radius: 16px; padding: 16px 18px 14px; margin: 6px 0 12px; color: #000; }
.lc-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.lc-kind { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #666; font-weight: 800; }
.barcode { display: block; width: 100%; height: 64px; }
.lc-code { text-align: center; font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 18px; letter-spacing: 3px; margin-top: 8px; color: #000; }

/* print: only the label sheet */
#printArea { display: none; }
.print-label { text-align: center; padding: 24px; }
.print-label .pl-name { font-size: 30px; font-weight: 800; margin-bottom: 2px; }
.print-label .pl-sub { font-size: 14px; color: #555; margin-bottom: 20px; }
.print-label .barcode { height: 90px; }
.print-label .pl-code { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 26px; letter-spacing: 5px; margin-top: 12px; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  .barcode rect { fill: #000 !important; }
}

/* ---------- settings ---------- */
.setcard { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; }
.acct { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.acct .av { width: 54px; height: 54px; font-size: 19px; flex: none; }
.acct-meta { min-width: 0; }
.acct .an { font-weight: 800; font-size: 18px; line-height: 1.2; }
.acct .ae { font-size: 13px; color: var(--ink-mute); margin: 2px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-scope { display: flex; align-items: center; gap: 8px; }
.acct-scope .ss { font-size: 12px; color: var(--ink-dim); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat .v { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 22px; line-height: 1.1; }
.stat .k { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-mute); margin-top: 5px; }
.stat.warn { border-color: rgba(255,90,77,.4); }
.stat.warn .v { color: var(--red); }

.setrow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.setrow:first-child { border-top: 0; }
.setrow .srlabel { flex: 1; min-width: 0; }
.setrow .srlabel .t1 { font-weight: 700; font-size: 15px; }
.setrow .srlabel .t2 { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.setrow select.field { width: auto; min-width: 128px; height: 44px; margin: 0; }
.about .ver { font-family: ui-monospace, Menlo, monospace; font-weight: 800; color: var(--amber); }

/* tappable navigation row (e.g. Settings → Places) */
.setnav { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r); }
.setnav:active { transform: scale(.99); }
.setnav .srlabel { flex: 1; min-width: 0; }
.setnav .srlabel .t1 { font-weight: 700; font-size: 15px; color: var(--ink); }
.setnav .srlabel .t2 { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.setnav svg { color: var(--ink-mute); flex: none; }

/* back link on sub-screens surfaced from Settings */
.backlink { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-dim); font-weight: 700; font-size: 15px; padding: 4px 8px 4px 2px; margin-bottom: 4px; }
.backlink:active { color: var(--ink); }

/* team / user management */
.team-list { display: flex; flex-direction: column; }
.team-list .userrow { margin-bottom: 8px; }
.ur-name .you { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; background: var(--line); color: var(--ink-dim); padding: 2px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.chkrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; }
.chkrow span { font-weight: 600; font-size: 14px; min-width: 0; }
.chkrow input { width: 22px; height: 22px; flex: none; accent-color: var(--amber); }
.scopenote { padding: 13px 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-dim); font-size: 14px; }
.scopehint { color: var(--ink-mute); font-size: 12px; margin-bottom: 10px; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line); transition: .15s; }
.switch .slider::before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; border-radius: 50%; background: var(--ink-mute); transition: .15s; }
.switch input:checked + .slider { background: var(--amber); border-color: var(--amber); }
.switch input:checked + .slider::before { transform: translateX(22px); background: var(--amber-ink); }
