/* Shop Assistant - "Night Shift" theme: deep navy + signal green. Big buttons, plain words.
 * Colors live in :root below; theme mockups: /workspace/shop-assistant-themes (theme 4). */

/* Theme 4: NIGHT SHIFT - deep navy + signal green, calm and easy on the eyes for long days */
:root {
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Roboto, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;
  --bg: #0a1626; --surface: #112640; --high: #183253; --text: #f1f6fc; --muted: #a9bbd1; --outline: #2f4c70;
  --placeholder: #7690b0; --link: #3ee08f;
  --accent: #2ee88a; --on-accent: #032112; --accent-text: #3ee08f; --accent-shadow: 0 4px 0 #13834b;
  --green: #2ee88a; --on-green: #032112; --amber: #ffcc4d; --red: #ff6b61; --blue: #5fb4ff; --on-blue: #04152a;
  --open: #ffcc4d; --good: #2ee88a;
  --top-bg: #07111e; --top-text: #ffffff; --top-muted: #a9bbd1; --top-link: #3ee08f; --top-border: 1px solid #1f3a5c;
  --brand-em: #2ee88a; --brand-spacing: 0;
  --radius: 22px; --radius-btn: 18px; --pill-radius: 999px;
  --card-border: 1px solid #1f3a5c; --card-shadow: 0 6px 18px rgba(0,0,0,.25); --done-border: 1px solid #1f3a5c;
  --btn2-bg: #183253; --btn2-text: #ffffff; --btn2-border: 2px solid #2f4c70; --btn-case: none;
  --fix-bg: #ffffff; --fix-text: #0a6b3d; --fix-border: 3px solid #2ee88a;
  --input-bg: #0a1626; --input-border: 2px solid #2f4c70;
  --code-bg: #183253; --code-text: #ffffff; --code-border: 2px solid #5fb4ff;
  --next-label: #3ee08f; --start-edge: #2ee88a; --start-bg: #0d3b33; --start-label: #3ee08f; --start-text: #ffffff;
  --why-bg: #142c4a; --why-label: #5fb4ff; --fixed-bg: #0d3b33; --guest-bg: #2b2410;
  --tool-bg: #183253; --tool-text: #ffffff; --tool-border: 2px solid #2f4c70;
  --live-bg: #2ee88a; --live-text: #032112; --live-border: 2px solid #2ee88a; --live-dot: #e0263c;
  --toast-bg: #183253; --toast-text: #fff;
  --h2: #ffffff; --h2-case: none; --h2-spacing: 0;
}

/* ---------- shared layout (same class names as the live app.css) ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.4 var(--font); }
a { color: var(--link); }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 460px; padding-top: 12vh; }
.brand { font-size: 34px; font-weight: 900; margin: 0 0 18px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 14px; align-items: center; padding: 12px 16px;
  background: var(--top-bg); color: var(--top-text); border-bottom: var(--top-border); }
.brand-sm { color: var(--top-text); font-weight: 900; font-size: 20px; text-decoration: none; letter-spacing: var(--brand-spacing); }
.brand-sm em { font-style: normal; color: var(--brand-em); }
.top .muted { flex: 1; font-size: 15px; color: var(--top-muted); }
.logout { margin: 0; }
.link { background: none; border: 0; color: var(--link); font: inherit; font-weight: 700; cursor: pointer; padding: 6px; }
.top .link { color: var(--top-link); }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; display: flex;
  flex-direction: column; gap: 10px; border: var(--card-border); box-shadow: var(--card-shadow); }
.card.done { border: var(--done-border); }
.card.fixed { background: var(--fixed-bg); }
h1 { font-size: 28px; margin: 6px 0 14px; }
h2 { font-size: 22px; margin: 22px 0 10px; color: var(--h2); text-transform: var(--h2-case); letter-spacing: var(--h2-spacing); }
.lbl { color: var(--muted); font-size: 14px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.err { color: var(--red); font-weight: 700; margin: 0; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px;
  border: 0; border-radius: var(--radius-btn); font: inherit; font-size: 22px; font-weight: 900; letter-spacing: .5px;
  cursor: pointer; padding: 12px 18px; text-decoration: none; text-transform: var(--btn-case); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-orange { background: var(--accent); color: var(--on-accent); box-shadow: var(--accent-shadow); }
.btn-green { background: var(--fix-bg); color: var(--fix-text); min-height: 76px; font-size: 26px; border: var(--fix-border); }
.btn-2 { background: var(--btn2-bg); color: var(--btn2-text); font-size: 19px; min-height: 56px; border: var(--btn2-border); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; }
.row > .pill { flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
input, textarea, select { width: 100%; background: var(--input-bg); color: var(--text); border: var(--input-border);
  border-radius: calc(var(--radius) * .6); padding: 14px; font: inherit; font-size: 19px; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--accent); border-color: transparent; }
.big-input { font-size: 22px; min-height: 60px; }
.pill { display: inline-block; border-radius: var(--pill-radius); padding: 5px 14px; font-weight: 800; font-size: 15px; color: #111; }
.p-green { background: var(--green); color: var(--on-green); } .p-amber { background: var(--amber); color: #1a1200; }
.p-red { background: var(--red); color: #fff; } .p-blue { background: var(--blue); color: var(--on-blue); }
.p-gray { background: var(--code-bg); color: var(--code-text); border: var(--code-border); }
.case-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); cursor: pointer; }
.case-item:hover { outline: 2px solid var(--outline); }
.veh { font-size: 21px; font-weight: 800; }
.next-label { color: var(--next-label); font-size: 15px; font-weight: 900; letter-spacing: 1px; }
.next-test { font-size: 26px; font-weight: 800; line-height: 1.25; }
.box { border-radius: calc(var(--radius) * .7); padding: 12px; background: var(--high); }
.box .lbl { display: block; margin-bottom: 4px; }
.expected .lbl { color: var(--good); }
.expected div { font-weight: 600; font-size: 19px; }
.why { background: var(--why-bg); } .why .lbl { color: var(--why-label); }
.start-here { border-left: 6px solid var(--start-edge); background: var(--start-bg); }
.start-here .lbl { color: var(--start-label); }
.start-here div { font-weight: 700; font-size: 20px; color: var(--start-text); }
.pid-head { display: flex; justify-content: space-between; font-weight: 900; }
.pid-head span:last-child { color: var(--accent-text); }
.pre { white-space: pre-wrap; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ph { position: relative; border-radius: 14px; overflow: hidden; background: var(--high); border: 3px solid transparent; cursor: pointer; }
.ph.sel { border-color: var(--accent); }
.ph img { display: block; width: 100%; height: 130px; object-fit: cover; }
.ph .tag { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 700; }
.ph .chk { position: absolute; right: 6px; top: 6px; background: var(--accent); color: var(--on-accent); border-radius: 8px; padding: 0 8px; font-weight: 900; }
.choice { display: flex; gap: 12px; align-items: flex-start; background: var(--high); border-radius: 14px; padding: 14px; cursor: pointer; }
.choice.sel { background: var(--fixed-bg); }
.choice input { width: 26px; height: 26px; flex: none; margin: 2px 0 0; accent-color: var(--green); }
.tabs { display: flex; gap: 8px; }
.tabs button { flex: 1; min-height: 50px; border-radius: calc(var(--radius) * .7); border: var(--btn2-border); background: var(--btn2-bg);
  color: var(--btn2-text); font: inherit; font-weight: 800; cursor: pointer; }
.tabs button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.busy::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 10px; border: 3px solid var(--muted);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-text);
  padding: 14px 22px; border-radius: 14px; font-weight: 700; box-shadow: 0 6px 24px rgba(0,0,0,.5); max-width: 90vw; z-index: 10; }
.si { border-left: 4px solid var(--green); }
a.btn-green, .card.fixed { margin-bottom: 14px; }
@media (max-width: 560px) { .top .muted { visibility: hidden; } }

/* status is information, not a button */
.status { font-size: 16px; color: var(--muted); cursor: default; user-select: none; }
.status b { font-weight: 800; }
.st-open b { color: var(--open); } .st-fixed b { color: var(--good); } .st-closed b { color: var(--muted); }
.pill { cursor: default; user-select: none; }
.btn-danger { color: var(--red); border-color: var(--red); }
.delete-zone { margin-top: 28px; }
.plan ol { padding-left: 22px; margin: 6px 0; } .plan li { margin-bottom: 10px; }
.step-off { opacity: .6; }
.good b { color: var(--good); } .bad b { color: var(--red); }
.code { margin-bottom: 8px; }

/* big sticky back button at the top of the case page */
.backbar { position: sticky; top: 50px; z-index: 4; background: var(--bg); padding: 8px 0; margin: -8px 0 8px; }
.back-btn { min-height: 56px; font-size: 20px; justify-content: flex-start; padding-left: 18px; }

/* ---- iPhone / home-screen app ---- */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; padding-bottom: env(safe-area-inset-bottom); }
a, button, input, select, textarea, label { touch-action: manipulation; }
.top { padding-top: max(12px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right)); }
.top .link { min-height: 44px; min-width: 44px; }
.wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.backbar { top: calc(50px + env(safe-area-inset-top)); }
.hint ol { margin: 4px 0 0; padding-left: 22px; } .hint li { margin-bottom: 4px; }
.guest { background: var(--guest-bg); border: 1px solid var(--amber); }
.photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.photo-btns .btn { font-size: 19px; min-height: 60px; }
.codes { display: flex; flex-wrap: wrap; gap: 8px; }
.codes .pill { font-size: 18px; padding: 6px 14px; font-family: var(--mono); letter-spacing: .5px; }
.codes .pill.pending { background: transparent; border: 2px dashed var(--open); color: var(--open); }
.codes-add input { flex: 3; }
.codes-add .btn { flex: 1; min-height: 52px; width: auto; }
.rec-card .btn + .btn { margin-top: 0; }
.no-scroll { overflow: hidden; }
.rec-overlay { position: fixed; inset: 0; z-index: 20; background: #000; display: flex; flex-direction: column; }
.rec-overlay.review { background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: env(safe-area-inset-top); }
.rec-overlay.review .wrap { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.rec-video { flex: 1; width: 100%; min-height: 0; object-fit: contain; background: #000; }
.rec-controls { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom)); background: var(--top-bg); }
.rec-status { font-weight: 900; font-size: 20px; text-align: center; color: var(--top-text); }
.btn-stop { background: var(--red); color: #fff; }
.rec-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.rec-strip img { width: 100%; height: 70px; object-fit: cover; border-radius: 8px; }
.rec-hidden { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }
@media (max-width: 560px) {
  .top { gap: 8px; }
  .brand-sm { font-size: 18px; }
  .top .muted { visibility: visible; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  h1 { font-size: 25px; }
  .card { padding: 14px; }
  .next-test { font-size: 23px; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .ph img { height: 110px; }
}
.mt10 { margin-top: 10px; }

/* ---------- job screen: tool row, header, Do this next ---------- */
/* One row of three big tool buttons on the job screen: Upload scan data / Live / Record scanner */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px;
  padding: 10px 6px; border-radius: var(--radius-btn); border: var(--tool-border); background: var(--tool-bg);
  color: var(--tool-text); font: inherit; font-size: 16px; font-weight: 900; line-height: 1.15; text-align: center;
  cursor: pointer; text-transform: var(--btn-case); box-shadow: var(--card-shadow); }
.tool .ic { font-size: 28px; line-height: 1; }
.tool.tool-live { background: var(--live-bg); color: var(--live-text); border: var(--live-border); }
.tool.tool-live .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--live-dot); margin-right: 5px; vertical-align: 1px; }
.veh-card .veh { font-size: 23px; line-height: 1.2; }
.veh-card .meta { font-size: 16px; color: var(--muted); font-weight: 600; }
.veh-card .complaint { font-size: 17px; }
.status-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; color: var(--muted); }
.status-tag::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: currentColor; }
.status-tag.st-open { color: var(--open); } .status-tag.st-fixed { color: var(--good); } .status-tag.st-closed { color: var(--muted); }
.case-item .top-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.case-item .codes .pill { font-size: 15px; padding: 3px 10px; }
.ask-row .btn { min-height: 60px; }
.vmeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.codes .pill small { font-family: var(--font); font-size: 13px; font-weight: 800; letter-spacing: 0; }
.card .row > .pill { font-size: 14px; padding: 4px 12px; }
.start-here.pinned { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); }
.start-here.pinned .lbl { font-size: 15px; }
.start-here.pinned div { font-size: 21px; line-height: 1.3; }
.veh-card .codes .pill { font-size: 17px; padding: 4px 11px; }
.veh-card { gap: 8px; }

/* Theme 4 extras */
.btn { font-weight: 800; }
.btn-orange { font-size: 23px; }
.start-here { border-left: 0; border: 2px solid var(--start-edge); }
.case-item.is-open .status-tag, .case-item.is-fixed .status-tag { background: rgba(255,255,255,.06); padding: 3px 10px; border-radius: 999px; }
.veh-card { background: linear-gradient(160deg, #15304f 0%, #112640 60%); }

/* ---------- live app bits ---------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-sm { display: inline-flex; align-items: center; gap: 8px; }
.brand-sm .mark { width: 28px; height: 28px; flex: none; }
.login-mark { display: block; width: 96px; height: 96px; margin: 0 0 14px; border-radius: 22px; box-shadow: 0 0 0 2px var(--outline), 0 8px 24px rgba(0,0,0,.35); }
.status-tag { flex: none; }
.vmeta .meta { flex: 0 1 auto; }
.veh-card .veh .trans { font-weight: 700; color: var(--muted); }
.clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { -webkit-line-clamp: 2; }
.clamp3 { -webkit-line-clamp: 3; cursor: pointer; }
.clamp3.open { -webkit-line-clamp: unset; display: block; }
.pointing summary { font-size: 14px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--blue);
  cursor: pointer; min-height: 32px; list-style-position: inside; }
.pointing div { margin-top: 6px; }
.codes-block { display: flex; flex-direction: column; gap: 8px; }
.codes .code-add-btn { background: transparent; color: var(--link); border: 2px dashed var(--outline); cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 800; padding: 4px 12px; min-height: 36px; }
.codes-add[hidden] { display: none; }
.next-sub { margin: 0; color: var(--muted); }
.start-here.pinned .next-sub { font-size: 16px; font-weight: 600; }
.start-here.pinned .link { padding: 4px 0; text-align: left; color: var(--start-label); min-height: 36px; }
.tools-wrap { margin: 0 0 14px; }
.tools-wrap .tools { margin-bottom: 6px; }
.tools-wrap #scan-link-box { margin-top: 8px; }
.tools-more { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.tools-more .link { text-align: left; padding: 6px 0; min-height: 40px; }
.tool:disabled { opacity: .6; }
.tool .tl { display: block; }
.break { word-break: break-all; }
.brand em { font-style: normal; color: var(--brand-em); }

/* ---------- "Wrong? Tell us" (Night Shift: quiet outline button, amber edge so it reads as a report) ---------- */
.feedback { display: flex; flex-direction: column; gap: 8px; border-top: var(--card-border); padding-top: 10px; }
.fb-open { align-self: flex-start; background: transparent; color: var(--amber); border: 2px solid var(--amber);
  font-size: 17px; min-height: 48px; padding: 8px 16px; box-shadow: none; }
.fb-open:active { background: rgba(255, 204, 77, .12); }
.fb-text { min-height: 92px; resize: vertical; }
.fb-row { align-items: center; gap: 14px; }
.fb-send { font-size: 19px; min-height: 52px; }
.fb-thanks { color: var(--good); font-weight: 900; font-size: 17px; }
.fb-again { align-self: flex-start; font-size: 15px; padding: 2px 0; }
.fb-row > .link { flex: none; }

/* Collapsible: how to get scan files into the open job (phone / email / cloud / PC) */
.scan-help { margin: 8px 4px 4px; padding: 8px 10px; border-radius: calc(var(--radius) * .7); background: var(--high); }
.scan-help summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; }
.scan-help summary::-webkit-details-marker { display: none; }
.scan-help summary::before { content: "▸ "; color: var(--accent, #f5a623); }
.scan-help[open] summary::before { content: "▾ "; }
.scan-help-list { margin: 8px 0 0 1.1em; padding: 0; }
.scan-help-list li { margin: 0 0 6px; line-height: 1.35; }
