/* DockProof — self-contained stylesheet. No external fonts, no CDN, no network. */

:root {
  --bg: #0e1116;
  --panel: #161b23;
  --panel-2: #1d242e;
  --line: #2a3340;
  --text: #e6ebf2;
  --muted: #93a1b5;
  --accent: #4c9aff;
  --accent-ink: #0b1220;
  --good: #3ecf8e;
  --warn: #f5a524;
  --bad: #f2555a;
  --radius: 10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --panel-2: #f0f3f7;
    --line: #d9e0ea;
    --text: #16202c;
    --muted: #5c6b7f;
    --accent: #1f6feb;
    --accent-ink: #ffffff;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 9px; }

.mark {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--panel), 0 0 0 2px var(--accent);
  display: inline-block;
}

.wordmark { font-weight: 700; letter-spacing: -0.2px; font-size: 17px; }

.tabs { display: flex; gap: 4px; margin-left: 8px; }

.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.active { color: var(--text); background: var(--panel-2); border-color: var(--line); }

.offline-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--good);
  border: 1px solid var(--good);
  padding: 4px 8px;
  border-radius: 999px;
  opacity: 0.85;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- layout */
main { padding: 18px 16px 60px; max-width: 1180px; margin: 0 auto; }
.view.hidden, .pane.hidden, .hidden { display: none !important; }

.pane-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.pane-head h1 { font-size: 21px; margin: 0; letter-spacing: -0.3px; }
.pane-head .btn { margin-left: auto; }
.pane-head .toolbar { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.hint { color: var(--muted); margin: 6px 0 16px; max-width: 68ch; }
.hint.tiny { font-size: 12.5px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 15px;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn.wide { display: block; width: 100%; text-align: center; }
.btn.tiny { padding: 5px 10px; font-size: 12px; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }

/* ---------------------------------------------------------------- forms */
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
  margin: 0 0 16px;
}
fieldset.critical { border-color: var(--warn); }

legend {
  font-weight: 700;
  padding: 0 8px;
  font-size: 13.5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.flag {
  background: var(--warn);
  color: #1a1206;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10.5px;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 12px; }

input[type=text], input:not([type]), input[type=search], select, textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  font: inherit;
  font-weight: 400;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }

.radiorow { display: flex; gap: 8px; flex-wrap: wrap; }
.radiocol { display: flex; flex-direction: column; gap: 8px; }

.chip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 13px;
  background: var(--panel-2);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-weight: 600;
}
.chip.block { width: 100%; }
.chip input { margin: 3px 0 0; }
.chip span { display: block; }
.chip em { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }

.checkline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  margin: 12px 0;
}
.checkline input { margin: 3px 0 0; }
.checkline em { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.formactions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- photos */
.shotgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.shot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--panel-2);
}
.shot.done { border-color: var(--good); color: var(--good); }

.filebtn { margin-bottom: 14px; }

.photostrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

.thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
  position: relative;
}
.thumb img { display: block; width: 100%; height: 110px; object-fit: cover; }
.thumb .meta { padding: 7px 8px; font-size: 11px; color: var(--muted); word-break: break-all; }
.thumb .rm {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,0.65); color: #fff;
  border: 0; border-radius: 6px; cursor: pointer;
  width: 24px; height: 24px; font-size: 15px; line-height: 1;
}

/* ---------------------------------------------------------------- cards */
.cardlist { display: grid; gap: 10px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 13px 15px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.card:hover { border-color: var(--accent); }
.card .id { font-weight: 700; }
.card .sub { color: var(--muted); font-size: 12.5px; }
.card .spacer { margin-left: auto; }

.pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.pill.good { color: var(--good); border-color: var(--good); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.bad  { color: var(--bad);  border-color: var(--bad); }

/* ---------------------------------------------------------------- console */
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 13px 15px; }
.stat .n { font-size: 25px; font-weight: 700; letter-spacing: -0.5px; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat.bad .n { color: var(--bad); }
.stat.warn .n { color: var(--warn); }
.stat.good .n { color: var(--good); }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel-2); }
tbody tr:last-child td { border-bottom: 0; }

.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px; text-align: center; }

/* ---------------------------------------------------------------- detail */
.detail-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.detail-head h1 { margin: 0; font-size: 20px; }
.detail-head .spacer { margin-left: auto; }

.kv { display: grid; grid-template-columns: 210px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.kv > div { padding: 9px 13px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv > div:nth-child(odd) { background: var(--panel-2); color: var(--muted); font-weight: 600; }
.kv > div:nth-child(even) { background: var(--panel); }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 620px) { .kv { grid-template-columns: 1fr; } .kv > div:nth-last-child(2) { border-bottom: 1px solid var(--line); } }

.verdict { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); padding: 13px 16px; margin-bottom: 16px; background: var(--panel); }
.verdict.bad { border-left-color: var(--bad); }
.verdict.warn { border-left-color: var(--warn); }
.verdict.good { border-left-color: var(--good); }
.verdict h3 { margin: 0 0 6px; font-size: 14px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--muted); }
.verdict p { margin: 0 0 6px; }
.verdict ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }

.hashline { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 11.5px; color: var(--muted); word-break: break-all; }

h2.section { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin: 20px 0 10px; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 11px 18px;
  border-radius: var(--radius);
  z-index: 60;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  font-weight: 600;
}

/* ---------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 12px 16px 26px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}
.footer .btn { margin-left: 0; }
#storage-note { margin-right: auto; }

/* ---------------------------------------------------------------- print */
@media print {
  .topbar, .footer, .toolbar, .btn, .toast, .pane-head .spacer { display: none !important; }
  body { background: #fff; color: #000; }
  .kv > div, .verdict, table, .thumb { border-color: #999 !important; background: #fff !important; color: #000 !important; }
  .thumb img { height: auto; max-height: 320px; object-fit: contain; }
  .photostrip { grid-template-columns: repeat(2, 1fr); }
  main { max-width: none; padding: 0; }
}

/* ------------------------------------------------- load file, side by side */
.sidebyside { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px; }
@media (max-width: 1050px) { .sidebyside { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .sidebyside { grid-template-columns: 1fr; } }

.halfcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px 16px;
}
.halfhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.halfhead strong { font-size: 15px; }
.halfhead .pill { margin-left: auto; }
.halfcard .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 3px; }
.halfcard .sub.notes {
  border-left: 3px solid var(--line);
  padding-left: 10px;
  margin: 9px 0;
  color: var(--text);
}
.halfcard .btn { margin-top: 10px; }

.photostrip.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 10px; }
.photostrip.small .thumb img { height: 74px; }
.photostrip.small .thumb .meta { font-size: 10px; padding: 5px 6px; }

@media print {
  .sidebyside { grid-template-columns: repeat(3, 1fr); }
  .halfcard { break-inside: avoid; }
  .photostrip.small .thumb img { height: auto; max-height: 150px; object-fit: contain; }
}

/* ------------------------------------------------- split-build additions
   Added 2026-09-17 when the driver and claims apps were split apart.
   .buildtag  — names which build you are looking at, so a screenshot of the
                console can never be mistaken for the driver app.
   .authwarn  — the console demo is unauthenticated and says so. Disclosed
                rather than omitted, and deliberately NOT hidden on print:
                an exported packet from a demo build should not look official.
   .filebtn.inline — file-picker styled as a footer button. */

.buildtag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  opacity: 0.9;
}

.authwarn {
  background: var(--panel-2);
  border-bottom: 1px solid var(--warn);
  border-left: 3px solid var(--warn);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 10px 16px;
}
.authwarn strong { color: var(--text); }
.authwarn code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}

.filebtn.inline { margin-bottom: 0; display: inline-block; }
