/* Trama: Tackora palette (slate #1E2B33, gold #E9A23B), light and dark. */
:root{
  --page:#F3F5F6; --surface:#FFFFFF; --surface2:#F3F5F6; --ink:#1E2B33; --text:#2B373E; --muted:#5B6870; --rule:#E1E5E7;
  --gold:#E9A23B; --gold-soft:rgba(233,162,59,.16); --on-gold:#1E2B33; --chip:#EEF2F4;
  --person:#3E6FD8; --person-soft:rgba(62,111,216,.12); --ok:#2E7D5B; --danger:#B3261E; color-scheme:light;
}
@media (prefers-color-scheme: dark){:root{
  --page:#172127; --surface:#1E2B33; --surface2:#26343C; --ink:#E7EDEA; --text:#D7DFE2; --muted:#97A5AB; --rule:#2F3D45;
  --gold-soft:rgba(233,162,59,.22); --chip:#2C3A42; --person:#7FA2EE; --person-soft:rgba(127,162,238,.16); --ok:#6FC79A; --danger:#F2B8B5; color-scheme:dark}}
*{box-sizing:border-box}
body{margin:0;background:var(--page);color:var(--text);font:15px/1.5 "IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif}
a{color:inherit}
h1,h2,h3{font-family:Nunito,system-ui,sans-serif;color:var(--ink)}
.app{min-height:100dvh;display:flex;flex-direction:column}
.bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:10px;padding:12px max(16px,env(safe-area-inset-left)) 10px;background:var(--surface);border-bottom:1px solid var(--rule)}
.bar h1{font:800 19px/1.2 Nunito,system-ui,sans-serif;margin:0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar img{width:28px;height:28px;border-radius:7px}
.content{flex:1;width:100%;max-width:680px;margin:0 auto;padding:16px max(16px,env(safe-area-inset-left)) 96px}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:5;display:grid;grid-template-columns:repeat(5,1fr);background:var(--surface);border-top:1px solid var(--rule);padding:6px 4px calc(8px + env(safe-area-inset-bottom))}
.tabs a{display:grid;justify-items:center;gap:2px;font-size:11px;color:var(--muted);padding:4px 0;text-decoration:none}
.tabs a.active{color:var(--ink);font-weight:600}
.tabs a.active .pill{background:var(--gold-soft)}
.pill{width:52px;height:28px;border-radius:14px;display:grid;place-items:center}
svg.i{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.card{background:var(--surface);border-radius:16px;padding:14px;margin-bottom:12px;border:1px solid var(--rule)}
.card h3{font-size:15px;margin:0 0 8px}
.label{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:18px 2px 8px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;border-radius:24px;font:600 15px "IBM Plex Sans",sans-serif;background:var(--gold);color:var(--on-gold);border:0;cursor:pointer;text-decoration:none}
.btn:disabled{opacity:.5;cursor:default}
.btn.ghost{background:var(--chip);color:var(--ink)}
.btn.block{display:flex;width:100%}
.btn.danger{background:none;color:var(--danger);padding:8px 0}
.row{display:flex;gap:10px;align-items:center}
.muted{color:var(--muted)}
.small{font-size:13px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:14px;background:var(--person-soft);font-size:13px;color:var(--ink);text-decoration:none}
.chip .role{color:var(--muted);font-size:12px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.error{color:var(--danger)}
/* capture */
.shots{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}
.shot{position:relative;width:72px;height:96px;border-radius:8px;overflow:hidden;background:var(--chip)}
.shot img{width:100%;height:100%;object-fit:cover}
.shot button{position:absolute;top:3px;right:3px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;cursor:pointer;line-height:1}
.camera{display:grid;place-items:center;gap:8px;height:96px;width:72px;border-radius:8px;border:2px dashed var(--muted);color:var(--muted);background:none;cursor:pointer;font-size:11px}
.field{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--rule)}
.field:last-child{border-bottom:0}
.field .k{font-size:12px;color:var(--muted)}
.field input,.field select{font:inherit;width:100%;min-width:0;padding:6px 8px;border-radius:8px;border:1px solid var(--rule);background:var(--surface2);color:var(--ink)}
.conf{font-size:11px;padding:2px 7px;border-radius:10px;background:var(--gold-soft);color:var(--ink)}
/* covers */
.cover{border-radius:3px 8px 8px 3px;overflow:hidden;flex:none;background:var(--chip);display:grid;place-items:center;color:var(--muted);box-shadow:inset 5px 0 0 rgba(0,0,0,.1)}
.cover img{width:100%;height:100%;object-fit:cover}
.cover span{font:800 11px/1.15 Nunito,sans-serif;padding:6px;text-align:center;color:var(--ink)}
.hero{display:flex;gap:14px}
.hero h2{font-size:21px;line-height:1.2;margin:2px 0 6px;text-wrap:balance}
.read{display:flex;align-items:center;gap:10px;padding:12px;border-radius:14px;background:var(--gold-soft);margin:14px 0}
.read input[type=date]{font:inherit;padding:6px 8px;border-radius:8px;border:1px solid var(--rule);background:var(--surface);color:var(--ink);min-width:0}
.read label{flex:1;color:var(--ink);font-weight:600;display:flex;align-items:center;gap:10px;cursor:pointer}
.read input[type=checkbox]{width:22px;height:22px;accent-color:var(--gold)}
table.ed{width:100%;border-collapse:collapse;font-size:13px}
table.ed td{padding:7px 4px;border-bottom:1px solid var(--rule);vertical-align:top}
table.ed tr:last-child td{border-bottom:0}
.na{color:var(--muted);font-style:italic}
.stores{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.store{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:12px;background:var(--chip);color:var(--ink);font-size:13px;text-decoration:none}
/* lists */
.item{display:flex;gap:12px;align-items:center;padding:10px;border-radius:14px;background:var(--surface);border:1px solid var(--rule);margin-bottom:8px;text-decoration:none;color:inherit}
.item .grow{flex:1;min-width:0}
.item .t{font-weight:600;color:var(--ink);line-height:1.25}
.item .s{font-size:12px;color:var(--muted)}
.why{font-size:12px;color:var(--muted);margin-top:3px}
.why b{color:var(--person);font-weight:600}
.badge{font-size:11px;padding:2px 8px;border-radius:10px;background:var(--gold);color:var(--on-gold);font-weight:600;white-space:nowrap}
.avatar{width:64px;height:64px;border-radius:50%;background:var(--person-soft);color:var(--person);display:grid;place-items:center;font:800 22px Nunito,sans-serif;flex:none}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.stat{background:var(--surface);border:1px solid var(--rule);border-radius:12px;padding:10px;text-align:center}
.stat b{display:block;font:800 20px Nunito,sans-serif;color:var(--ink)}
.stat span{font-size:11px;color:var(--muted)}
.seg{display:flex;background:var(--chip);border-radius:20px;padding:3px;margin-bottom:12px}
.seg button{flex:1;border:0;background:none;padding:7px 0;border-radius:17px;font:inherit;font-size:13px;color:var(--muted);cursor:pointer}
.seg button.on{background:var(--surface);color:var(--ink);font-weight:600}
.graph{height:min(70dvh,620px);border-radius:16px;background:var(--surface);border:1px solid var(--rule)}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:10px}
.sw{width:12px;height:12px;border-radius:3px;display:inline-block;vertical-align:-1px;margin-right:6px}
.empty{text-align:center;padding:40px 10px;color:var(--muted)}
.signin{max-width:420px;margin:12vh auto 0;text-align:center;padding:0 16px}
.signin img{width:96px;height:96px;border-radius:22px}
table.usage{width:100%;border-collapse:collapse;font-size:13px}
table.usage td,table.usage th{padding:6px 4px;border-bottom:1px solid var(--rule);text-align:left}
/* Scan states: a photo only on the phone must read clearly as "not online, not read by the AI". */
.state{border:1px solid var(--rule);border-left:4px solid var(--muted);border-radius:8px;padding:10px 12px;margin:0 0 12px;background:var(--surface)}
.state.device{border-left-color:var(--gold);background:var(--gold-soft)}
.state.wait{border-left-color:var(--person)}
.state.ok{border-left-color:var(--ok)}
.state.fail{border-left-color:var(--danger)}
.badge.device{background:var(--gold)}
.badge.wait{background:var(--person-soft);color:var(--person)}
.badge.ok{background:var(--chip);color:var(--ink)}
.badge.fail{background:none;border:1px solid var(--danger);color:var(--danger)}
.scan-icon{width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:var(--chip);color:var(--muted);flex:none}
.scan-icon.device{background:var(--gold-soft);color:var(--ink)}
.scan-icon.fail{color:var(--danger)}
button.link{background:none;border:0;padding:0;cursor:pointer;font:inherit}
