:root {
  --brand: #0f4c81;
  --brand-dark: #0a3a63;
  --brand-soft: #e8f0f8;
  --accent: #e8751a;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1a2330;
  --muted: #647183;
  --border: #dde3ea;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --ok: #2e7d32;
  --ok-soft: #e8f5e9;
  --warn: #b26a00;
  --warn-soft: #fff4e0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --tap: 48px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--brand); color: #fff;
}
.topbar .logo { font-weight: 800; letter-spacing: .02em; font-size: 1.05rem; }
.topbar .logo span { color: #ffc58f; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: .85rem; opacity: .85; }
.topbar button, .topbar a.btn-top {
  background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 12px; font: inherit; font-size: .875rem; cursor: pointer; text-decoration: none;
}
.topbar button:hover, .topbar a.btn-top:hover { background: rgba(255,255,255,.24); }

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1200px; }

/* ---------- cards / forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; margin-right: 8px; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=search],
input[type=date], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; font-size: 16px;
  color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 10px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,76,129,.15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; font: inherit; font-weight: 600;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--brand); border-color: var(--border); }
.btn.secondary:hover { background: var(--brand-soft); }
.btn.ghost { background: transparent; color: var(--brand); padding: 0 10px; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .875rem; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #cf6310; }

.row { display: flex; gap: 10px; align-items: center; }
.row.wrap-row { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 540px) { .grid2 { grid-template-columns: 1fr; } }

.alert { padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--brand-soft); color: var(--brand-dark); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- auth ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand .logo-big { font-size: 1.8rem; font-weight: 800; color: var(--brand); letter-spacing: .02em; }
.auth-brand .logo-big span { color: var(--accent); }
.code-input { text-align: center; letter-spacing: .4em; font-size: 1.6rem !important; font-weight: 700; }

/* ---------- picker button ---------- */
.pick-btn {
  width: 100%; min-height: 56px; text-align: left; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1.5px dashed var(--brand); border-radius: 10px;
  background: var(--brand-soft); color: var(--brand); font: inherit; font-weight: 600; cursor: pointer;
}
.pick-btn.chosen { border-style: solid; background: #fff; color: var(--text); }
.pick-btn .pick-sub { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.pick-btn .chev { margin-left: auto; color: var(--muted); font-weight: 400; white-space: nowrap; }

/* ---------- full-screen picker ---------- */
.picker {
  position: fixed; inset: 0; z-index: 100; background: #fff; display: flex; flex-direction: column;
}
.picker-head {
  display: flex; gap: 8px; align-items: center; padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--border);
}
.picker-head input { flex: 1; }
.picker-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0; padding: 0; list-style: none; }
.picker-list li button {
  width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid #eef1f4;
  background: #fff; font: inherit; cursor: pointer; min-height: 52px;
}
.picker-list li button:hover, .picker-list li button:focus { background: var(--brand-soft); outline: none; }
.picker-list .sub { display: block; font-size: .8rem; color: var(--muted); }
.picker-list mark { background: #fff1c2; color: inherit; border-radius: 2px; }
.picker-foot { padding: 10px 16px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--border);
  padding-bottom: max(10px, env(safe-area-inset-bottom)); }

/* ---------- line items ---------- */
.lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.line {
  display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; background: #fbfcfd;
}
.line .qty { min-width: 64px; text-align: center; font-weight: 800; font-size: 1.15rem; color: var(--brand); line-height: 1.1; }
.line .qty small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.line .info { flex: 1; min-width: 0; }
.line .desc { font-weight: 600; overflow-wrap: anywhere; }
.line .code { font-size: .8rem; color: var(--muted); }
.line .acts { display: flex; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 1rem;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn.del:hover { background: var(--danger-soft); color: var(--danger); }
.empty { text-align: center; padding: 18px; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; font-size: .9rem; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge.damaged { background: var(--danger-soft); color: var(--danger); }
.badge.return { background: var(--brand-soft); color: var(--brand); }
.badge.trash { background: #eceff1; color: #455a64; }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.approved { background: var(--brand-soft); color: var(--brand); }
.badge.processed { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--danger-soft); color: var(--danger); }
.badge.admin { background: #ede7f6; color: #5e35b1; }
.badge.driver { background: #eceff1; color: #455a64; }
.badge.off { background: #eceff1; color: #90a4ae; }

/* ---------- segmented / chips ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { min-height: var(--tap); border: 0; background: #fff; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--brand); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.on.damaged { background: var(--danger); border-color: var(--danger); }
.chip.on.trash { background: #546e7a; border-color: #546e7a; }
.chip .count { opacity: .7; margin-left: 4px; }

.stepper { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); gap: 6px; }
.stepper button { border: 1px solid var(--border); background: #fff; border-radius: 10px; font-size: 1.4rem; cursor: pointer; color: var(--brand); }
.stepper input { text-align: center; font-weight: 700; font-size: 1.2rem; }

/* ---------- bottom sheet / modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding: 18px 16px; padding-bottom: max(18px, env(safe-area-inset-bottom));
  animation: up .18s ease-out;
}
@media (min-width: 700px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 16px; }
  .sheet.wide { max-width: 860px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 16px; }
.sheet-foot .btn { flex: 1; }

/* ---------- photos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo, .photo-add {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #eef1f4;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .rm {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; cursor: pointer; line-height: 1;
}
.photo .sz { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: absolute; left: 0; right: 0; bottom: 0; font-size: .68rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding: 12px 6px 4px; }
.photo.busy::after { content: "Compressing…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.8); font-size: .75rem; color: var(--muted); }
.photo-add {
  display: grid; place-items: center; text-align: center; cursor: pointer; border: 1.5px dashed var(--brand);
  background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .85rem;
}
.photo-add .cam { font-size: 1.7rem; display: block; line-height: 1; margin-bottom: 4px; }

/* ---------- submit bar ---------- */
.submit-bar {
  position: sticky; bottom: 0; z-index: 10; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(244, 246, 248, .96); backdrop-filter: blur(6px); border-top: 1px solid var(--border);
}
.submit-bar .inner { max-width: 720px; margin: 0 auto; }
.progress { height: 6px; border-radius: 3px; background: #e0e6ec; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.success { text-align: center; padding: 36px 16px; }
.success .check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 14px; }
.success .num { font-size: 1.6rem; font-weight: 800; color: var(--brand); margin: 6px 0; }

/* ---------- lists / tables ---------- */
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid #eef1f4; cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #fafbfc; }
.list-item .grow { flex: 1; min-width: 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid #eef1f4; vertical-align: middle; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #f7f9fb; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 10px 14px;
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.filters .field { margin: 0; }
.filters .grow { flex: 1; min-width: 200px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.9); display: grid; place-items: center; cursor: zoom-out; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .92rem; margin-bottom: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300;
  background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100% - 32px);
}
.toast.error { background: var(--danger); }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 140px; }
.stat .big { font-size: 1.6rem; font-weight: 800; color: var(--brand); }

@media print {
  .topbar, .tabs, .filters, .sheet-foot, .no-print { display: none !important; }
  .overlay { position: static; background: none; }
  .sheet { max-height: none; box-shadow: none; }
}

/* ---------- v2: roles, verification, day view, scanner ---------- */
.badge.verifier { background: #e0f2f1; color: #00695c; }
.badge.vok { background: var(--ok-soft); color: var(--ok); }
.badge.vpart { background: var(--warn-soft); color: var(--warn); }
.badge.vnone { background: #eceff1; color: #78909c; }
.rcv { display: inline-block; font-weight: 700; font-size: .85rem; padding: 1px 8px; border-radius: 6px; }
.rcv small { font-weight: 600; }
.rcv.ok { color: var(--ok); background: var(--ok-soft); }
.rcv.diff { color: var(--warn); background: var(--warn-soft); }
.rcv.no { color: var(--danger); background: var(--danger-soft); }
.rcv.extra { color: #00695c; background: #e0f2f1; }
tr.added-row td { background: #f3fbfa; }

.grid2.tight { gap: 8px; }
.date-row { display: flex; align-items: center; gap: 12px; }
.date-row input { max-width: 200px; }

.item-choose { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.scan-btn { flex-direction: column; gap: 2px; min-width: 76px; font-size: .8rem; padding: 0 10px; }

/* day navigator + day list */
.day-nav { display: flex; align-items: center; gap: 8px; }
.day-nav .day-input { flex: 1; min-width: 0; text-align: center; font-weight: 600; }
.day-label { font-weight: 700; margin: 10px 0 8px; color: var(--brand); }
.day-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.day-chips .chip { white-space: nowrap; min-height: 34px; font-size: .8rem; }
.day-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; margin-bottom: 12px;
  background: var(--brand-soft); border-radius: 10px; color: var(--brand-dark); font-size: .9rem; }
.day-driver { font-size: .95rem; margin: 16px 0 8px; }
.day-credit { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fff; }
.day-credit-head { display: flex; gap: 10px; align-items: flex-start; }
.day-credit-head .grow { flex: 1; min-width: 0; }
.day-cust { font-weight: 700; }
.day-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.day-lines { list-style: none; margin: 10px 0; padding: 0; font-size: .9rem; }
.day-lines li { padding: 5px 0; border-top: 1px dashed #e7ebef; }
.day-lines li b { display: inline-block; min-width: 34px; color: var(--brand); }
.day-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* scanner */
.scanner { position: fixed; inset: 0; z-index: 150; background: #000; display: flex; flex-direction: column; color: #fff; }
.scanner-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top)); }
.scanner-top .btn.ghost { color: #fff; }
.scanner-title { font-weight: 700; }
.scanner-view { position: relative; flex: 1; overflow: hidden; }
.scanner-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; left: 8%; right: 8%; top: 33%; height: 34%;
  border: 3px solid rgba(255,255,255,.9); border-radius: 14px; pointer-events: none; }
.scanner-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.scanner-laser { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff5252; box-shadow: 0 0 8px #ff5252;
  animation: laser 1.6s ease-in-out infinite; }
@keyframes laser { 0%, 100% { transform: translateY(-40px); } 50% { transform: translateY(40px); } }
.scanner.hit .scanner-frame { border-color: #69f0ae; }
.scanner-msg { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: .9rem; padding: 0 20px; text-shadow: 0 1px 3px #000; }
.scanner-bottom { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; background: #111; }
.scanner-hint { font-size: .85rem; opacity: .8; }
.scanner-manual { display: flex; gap: 8px; }
.scanner-manual input { flex: 1; }
.scanner-torch.on { background: #ffd54f; color: #000; }

/* verification screen */
.vline { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.vline.came { border-color: #a5d6a7; background: #f6fbf6; }
.vline.missing { border-color: #ef9a9a; background: #fdf6f6; }
.vline.added { border-color: #80cbc4; background: #f3fbfa; }
.vline-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.vline-head .grow { flex: 1; min-width: 0; }
.vline-claim { font-size: .85rem; color: var(--muted); }
.vline-claim b { color: var(--text); }
.vseg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.vseg button { min-height: 48px; border-radius: 10px; border: 1.5px solid var(--border); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.vseg button.on.yes { background: var(--ok); border-color: var(--ok); color: #fff; }
.vseg button.on.no { background: var(--danger); border-color: var(--danger); color: #fff; }
.vqty { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.vqty .stepper { grid-template-columns: 44px 1fr 44px; }
.vdiff { font-size: .85rem; font-weight: 700; color: var(--warn); }
.progress-pill { font-size: .85rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }

/* ---------- language toggle ---------- */
.lang-toggle {
  min-width: 44px; min-height: 36px; padding: 0 10px; border-radius: 8px; font: inherit; font-weight: 800;
  font-size: .8rem; letter-spacing: .06em; cursor: pointer; border: 1px solid rgba(255,255,255,.45);
  background: transparent; color: #fff;
}
.lang-toggle:hover { background: rgba(255,255,255,.15); }
.lang-float { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 5;
  color: var(--brand); border-color: var(--border); background: #fff; }
.lang-float:hover { background: var(--brand-soft); }
.storage-bar { height: 10px; border-radius: 5px; background: #e0e6ec; overflow: hidden; margin: 8px 0; }
.storage-bar > div { height: 100%; background: var(--brand); }
.storage-bar.warn > div { background: var(--warn); }
.storage-bar.full > div { background: var(--danger); }

/* ---------- voice ---------- */
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.grid3 .btn { padding: 0 8px; font-size: .92rem; }
.voice { position: fixed; inset: 0; z-index: 150; background: #0b2a47; color: #fff; display: flex; flex-direction: column; }
.voice-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.voice-top .btn.ghost, .voice-bottom .btn.ghost { color: #fff; }
.voice-title { font-weight: 700; }
.voice-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; text-align: center; }
.voice-hint { opacity: .85; max-width: 340px; }
.voice-example { font-style: italic; opacity: .7; max-width: 340px; font-size: .92rem; }
.voice-mic { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  display: grid; place-items: center; cursor: pointer; margin: 10px 0; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.voice-mic svg { position: relative; z-index: 1; }
.voice-ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(255,197,143,.6); transition: transform .08s linear; }
.voice.rec .voice-mic { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(232,117,26,.18); } }
.voice-time { font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 700; }
.voice-status { opacity: .85; min-height: 1.4em; max-width: 340px; }
.voice-bottom { padding: 12px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255,255,255,.2); border-top-color: #ffc58f; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.voice-transcript { background: var(--brand-soft); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.voice-said { font-weight: 600; margin: 4px 0; color: var(--brand-dark); }
.vrow { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.vrow.need { border-color: #ffcc80; background: #fffaf2; }
.vrow.off { opacity: .45; }
.vrow-head { display: flex; gap: 10px; align-items: flex-start; }
.vrow-head .grow { flex: 1; min-width: 0; }
.vrow-inc input { width: 22px; height: 22px; margin-top: 4px; }
.vrow-item { margin-top: 4px; font-weight: 600; }
.vrow-ctrls { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin: 8px 0; }
.vrow-ctrls input { text-align: center; font-weight: 700; }
.small-seg button { min-height: 44px; font-size: .9rem; }
.small-chips .chip { min-height: 34px; font-size: .82rem; padding: 0 10px; }

.scanner-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.scanner-photo { cursor: pointer; }
