[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --bg: #f1eee8;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --ink: #161d22;
  --ink-2: #3a444b;
  --muted: #737b80;
  --line: #e4dfd5;
  --brand: #172229;
  --accent: #f5b80b;
  --accent-ink: #1a1a1a;
  --accent-soft: #fdf1cc;
  --major: #c8322f;
  --safety: #e6702a;
  --minor: #2f6fb7;
  --note: #737b80;
  --ok: #2e8b57;
  --warn: #c98a00;
  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 1px 2px rgba(22,29,34,.05), 0 4px 16px rgba(22,29,34,.05);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --bar: 56px;
  --nav: calc(64px + var(--sb));
  --rail: 0px;
}
@media (min-width: 900px) { :root { --nav: 0px; --rail: calc(92px + var(--sl)); } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
}
input, textarea, select, .selectable { -webkit-user-select: text; user-select: text; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; }

/* ---------- Shell ---------- */
#rail {
  position: fixed; z-index: 40; background: var(--brand); color: #c9cfd2;
  inset: auto 0 0 0; height: var(--nav); padding: 0 6px var(--sb);
  display: flex; align-items: stretch;
}
#rail .brand { display: none; }
#rail a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 550; border-radius: 14px; }
#rail a.on { color: var(--accent); }
#rail a.new { color: var(--accent-ink); }
#rail a.new .disc { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(245,184,11,.35); }
#rail a.new span { display: none; }
#rail .dotb { position: absolute; margin: -18px 0 0 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--major); }
#rail a { position: relative; }
@media (min-width: 900px) {
  #rail { inset: 0 auto 0 0; width: var(--rail); height: auto; flex-direction: column; padding: calc(var(--st) + 14px) 10px 18px calc(10px + var(--sl)); gap: 6px; }
  #rail .brand { display: grid; place-items: center; margin-bottom: 14px; }
  #rail .brand img { width: 46px; height: 46px; border-radius: 12px; }
  #rail a { flex: none; height: 64px; }
  #rail a:not(.new):hover { background: rgba(255,255,255,.06); }
  #rail a.on { background: rgba(245,184,11,.12); }
  #rail a.new { order: -1; margin-bottom: 8px; }
  #rail .sp { flex: 1; }
}

#page { margin-left: var(--rail); padding-bottom: calc(var(--nav) + 28px); min-height: 100vh; }
#bar {
  position: sticky; top: 0; z-index: 30; padding: var(--st) 16px 0; height: calc(var(--bar) + var(--st));
  display: flex; align-items: center; gap: 10px;
  background: rgba(241,238,232,.86); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
#bar.scrolled { border-bottom-color: var(--line); }
#bar .back { display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px 0 2px; margin-left: -6px; border-radius: 10px; color: var(--ink-2); font-weight: 550; }
#bar .back:active { background: rgba(0,0,0,.05); }
#bar .ttl { flex: 1; min-width: 0; }
#bar .ttl .t1 { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: var(--tt, 1); transition: opacity .2s; }
#bar .ttl .t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar .acts { display: flex; gap: 8px; align-items: center; }

.tabs { position: sticky; top: calc(var(--bar) + var(--st)); z-index: 25; background: rgba(241,238,232,.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); padding: 2px 16px 10px; }
.tabs-in { display: flex; gap: 4px; padding: 4px; background: #e6e1d8; border-radius: 13px; overflow-x: auto; scrollbar-width: none; max-width: 1100px; margin: 0 auto; }
.tabs-in::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tabs a .n { min-width: 20px; padding: 0 6px; border-radius: 10px; background: rgba(0,0,0,.08); font-size: 12px; text-align: center; }
.tabs a.on .n { background: var(--accent); color: var(--accent-ink); }

main { max-width: 1100px; margin: 0 auto; padding: 8px 16px 0; }
main.narrow { max-width: 760px; }
.large { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 6px 2px 4px; }
.kicker { font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 8px 2px 0; }
.h { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 28px 4px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.h .c { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 13.5px; }
.lead { color: var(--muted); margin: 4px 2px 14px; font-size: 15.5px; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r); font-size: 15px; border: 1.5px dashed var(--line); }
.empty svg { width: 34px; height: 34px; color: #c3bcb0; display: block; margin: 0 auto 8px; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.stack > * + * { margin-top: 14px; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.pad { padding: 16px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
a.row:active, .tap:active { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .sub { font-size: 13.5px; color: var(--muted); }
.row .chev { width: 18px; height: 18px; color: #bdb6aa; }
.row b.t { font-weight: 600; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Fields ---------- */
.field { display: block; padding: 10px 16px 11px; border-bottom: 1px solid var(--line); position: relative; }
.field:last-child { border-bottom: 0; }
.field > span, .flabel { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; letter-spacing: .01em; }
.field input:not([type=checkbox]), .field textarea, .field select {
  width: 100%; border: 0; padding: 3px 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.field:focus-within { background: #fffdf5; }
.field:focus-within > span { color: var(--warn); }
.field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737b80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 18px; padding-right: 24px; }
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #b9b2a6; }
.field.inline { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.field.inline > span { flex: 1; margin: 0; font-size: 16px; font-weight: 450; color: var(--ink); }
.cols { display: grid; grid-template-columns: 1fr 1fr; }
.cols > .field:nth-child(odd) { border-right: 1px solid var(--line); }
@media (min-width: 760px) { .cols.c3 { grid-template-columns: 1fr 1fr 1fr; } .cols.c3 > .field { border-right: 1px solid var(--line); } .cols.c3 > .field:nth-child(3n) { border-right: 0; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ftool { display: flex; justify-content: space-between; align-items: center; }
.ftool .lnk { font-size: 13px; font-weight: 600; color: var(--minor); background: none; border: 0; padding: 2px 0; }

input[type=checkbox].sw { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 16px; background: #ddd7cc; position: relative; transition: background .2s; flex: none; margin: 0; }
input[type=checkbox].sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
input[type=checkbox].sw:checked { background: var(--ok); }
input[type=checkbox].sw:checked::after { transform: translateX(20px); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 15px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.sm { min-height: 32px; padding: 4px 11px; font-size: 13.5px; }
.chip .n { font-size: 12px; opacity: .7; }
.chip.c-major.on { background: var(--major); border-color: var(--major); }
.chip.c-safety.on { background: var(--safety); border-color: var(--safety); }
.chip.c-minor.on { background: var(--minor); border-color: var(--minor); }
.chip.c-note.on { background: var(--note); border-color: var(--note); }
.chipbox { padding: 12px 16px 14px; border-bottom: 1px solid var(--line); }
.chipbox:last-child { border-bottom: 0; }

/* Category picker — big tiles */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(4, 1fr); } }
.cat { text-align: left; padding: 12px 14px; border-radius: 13px; border: 2px solid var(--line); background: var(--surface); min-height: 68px; }
.cat b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.cat b::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cat small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.3; }
.cat.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, white); }
.c-major { --c: var(--major); } .c-safety { --c: var(--safety); } .c-minor { --c: var(--minor); } .c-note { --c: var(--note); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 13px; font-weight: 650; font-size: 16px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(245,184,11,.3); }
.btn.dark { background: var(--brand); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.danger { color: var(--major); }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 15px; border-radius: 11px; }
.btn.xs { min-height: 32px; padding: 4px 11px; font-size: 13.5px; border-radius: 9px; }
.btn.icon { width: 42px; min-height: 42px; padding: 0; border-radius: 12px; }
.btn[disabled], fieldset[disabled] .btn, fieldset[disabled] .chip, fieldset[disabled] .cat { opacity: .45; pointer-events: none; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.btns .btn { flex: 1 1 170px; }

/* Pills, tags */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: #e7e2d9; color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-scheduled { background: #e2ecf6; color: #275a86; }
.s-in_progress { background: #fdf1cc; color: #8a5b00; }
.s-completed { background: #ebe5f6; color: #573f97; }
.s-review { background: #fbe4d6; color: #9a4512; }
.s-issued { background: #dcefe4; color: #23653f; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 7px; font-size: 12px; font-weight: 750; color: #fff; background: var(--c, var(--note)); letter-spacing: .01em; }
.tags { display: inline-flex; gap: 4px; }
.sev { display: inline-flex; gap: 3px; }
.sev i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---------- Today ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.week { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; margin: 14px -2px 0; }
.week::-webkit-scrollbar { display: none; }
.day { flex: none; width: 58px; padding: 9px 0 10px; border-radius: 15px; background: var(--surface); text-align: center; border: 0; box-shadow: var(--shadow); }
.day .w { font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.day .d { font-size: 21px; font-weight: 750; margin: 1px 0 3px; }
.day .dots { display: flex; justify-content: center; gap: 3px; height: 6px; }
.day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.day.today .d { color: var(--warn); }
.day.on { background: var(--brand); color: #fff; }
.day.on .w { color: #aab3b8; }
.day.on .d { color: #fff; }

.hero { position: relative; border-radius: 22px; overflow: hidden; background: var(--brand); color: #fff; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 10px 30px rgba(23,34,41,.18); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,34,41,.15) 0%, rgba(23,34,41,.35) 40%, rgba(23,34,41,.92) 100%); z-index: 1; }
.hero .art { position: absolute; inset: 0; background:
  radial-gradient(circle at 85% 15%, rgba(245,184,11,.35), transparent 45%),
  repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 14px), var(--brand); }
.hero .art svg { position: absolute; right: 24px; top: 22px; width: 120px; height: 120px; color: rgba(255,255,255,.12); stroke-width: 1.2; }
.hero .in { position: relative; z-index: 2; padding: 20px 22px 20px; }
.hero .when { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.hero h2 { font-size: 28px; line-height: 1.15; margin: 6px 0 2px; letter-spacing: -.01em; }
.hero .who { color: #d4dadd; font-size: 15px; }
.hero .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hero .acts .btn:not(.primary) { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 550; }
.kpi.alert b { color: var(--major); }

.flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .flow { grid-template-columns: repeat(5, 1fr); } }
.flow a { background: var(--surface); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.flow a b { font-size: 26px; font-weight: 800; }
.flow a .pill { align-self: flex-start; }

/* Job cards */
.jobs { display: grid; gap: 12px; }
@media (min-width: 760px) { .jobs { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .jobs.three { grid-template-columns: 1fr 1fr 1fr; } }
.job { display: flex; gap: 14px; padding: 12px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); align-items: center; }
.job:active { transform: scale(.99); }
.job .ph { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; flex: none; background: linear-gradient(135deg, #2a3843, #172229); display: grid; place-items: center; color: rgba(255,255,255,.35); }
.job .ph img { width: 100%; height: 100%; object-fit: cover; }
.job .ph svg { width: 30px; height: 30px; }
.job .main { flex: 1; min-width: 0; }
.job .t { font-weight: 700; font-size: 16.5px; }
.job .s { color: var(--muted); font-size: 14px; }
.job .m { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--muted); }
.job .prog { width: 44px; flex: none; text-align: center; font-size: 11px; color: var(--muted); }

.ring { display: block; }
.ring circle { fill: none; stroke-width: 4; }
.ring .bg { stroke: #e7e2d9; }
.ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .4s; }
.ringwrap { position: relative; display: grid; place-items: center; }
.ringwrap > span { position: absolute; font-size: 11.5px; font-weight: 750; }

.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--surface); border-radius: 13px; box-shadow: var(--shadow); }
.search svg { color: var(--muted); width: 20px; height: 20px; }
.search input { flex: 1; border: 0; outline: none; background: none; font: inherit; font-size: 17px; padding: 13px 0; min-width: 0; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--accent-soft); color: #6b4c00; font-size: 14.5px; margin-top: 14px; }
.banner .grow { flex: 1; }
.banner.info { background: #e5eef7; color: #24496b; }
.banner.ok { background: #dcefe4; color: #23653f; }
.banner.bad { background: #f9e0dd; color: #8c2420; }

/* ---------- Inspection workspace ---------- */
.ihero { position: relative; border-radius: 20px; overflow: hidden; min-height: 210px; display: flex; align-items: flex-end; background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.ihero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ihero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 20%, rgba(23,34,41,.88)); }
.ihero .in { position: relative; z-index: 2; padding: 18px 20px; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ihero h2 { font-size: 26px; line-height: 1.15; }
.ihero .sub { color: #cfd6da; font-size: 14.5px; }
.ihero .photo-btn { background: rgba(255,255,255,.16); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; margin-top: 14px; }
.quick a, .quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; background: var(--surface); border: 0; border-radius: var(--r); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.quick svg { color: var(--ink); }
.quick .off { opacity: .4; pointer-events: none; }

.progress { display: flex; align-items: center; gap: 16px; padding: 16px; }
.progress .bars { flex: 1; }
.bar { height: 8px; border-radius: 4px; background: #ece7de; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.split { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 330px 1fr; align-items: start; }
  .split > .side { position: sticky; top: calc(var(--bar) + var(--st) + 70px); max-height: calc(100vh - var(--bar) - var(--st) - 90px); overflow: auto; border-radius: var(--r); }
  .split.focus > .side { display: block; }
}
@media (max-width: 899px) { .split.focus > .side { display: none; } .split:not(.focus) > .detail { display: none; } }

.alist .grp { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 16px 6px; background: var(--surface-2); }
.alist a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; border-bottom: 1px solid var(--line); background: var(--surface); }
.alist a.on { background: #fff8e1; box-shadow: inset 3px 0 0 var(--accent); }
.alist a .nm { flex: 1; min-width: 0; font-weight: 600; }
.alist a .nm small { display: block; font-weight: 450; color: var(--muted); font-size: 12.5px; }
.st { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid #d6d0c5; color: #fff; }
.st svg { width: 15px; height: 15px; stroke-width: 3; }
.st.inspected { background: var(--ok); border-color: var(--ok); }
.st.restricted { background: var(--warn); border-color: var(--warn); }
.st.not_inspected { background: var(--major); border-color: var(--major); }

.areahead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 2px 12px; flex-wrap: wrap; }
.areahead h2 { font-size: 28px; font-weight: 800; letter-spacing: -.015em; }
.areahead .grp { font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.status3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status3 button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); text-align: left; }
.status3 button b { font-size: 15px; }
.status3 button small { color: var(--muted); font-size: 12px; }
.status3 button.on.inspected { border-color: var(--ok); background: #eaf5ee; }
.status3 button.on.restricted { border-color: var(--warn); background: #fdf3dc; }
.status3 button.on.not_inspected { border-color: var(--major); background: #fbe7e5; }

.checklist .el { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; min-height: 58px; border-bottom: 1px solid var(--line); }
.checklist .el:last-child { border-bottom: 0; }
.checklist .el .nm { flex: 1; min-width: 0; font-weight: 550; }
.checklist .el .nm small { display: block; color: var(--muted); font-weight: 450; font-size: 12.5px; }
.tri { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 12px; flex: none; }
.tri button { min-width: 46px; height: 40px; border-radius: 9px; border: 0; background: transparent; font-size: 13px; font-weight: 700; color: var(--muted); display: grid; place-items: center; padding: 0 8px; }
.tri button svg { width: 18px; height: 18px; stroke-width: 2.4; }
.tri button.on.ok { background: var(--ok); color: #fff; }
.tri button.on.defect { background: var(--major); color: #fff; }
.tri button.on.nv { background: var(--warn); color: #fff; }
.tri button.on.na { background: #8b9296; color: #fff; }
@media (max-width: 480px) { .tri button { min-width: 40px; padding: 0 4px; } .tri button .lbl { display: none; } }
.el-finds { padding: 0 12px 10px 16px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); margin-top: -1px; background: #fffaf3; }
.el-finds a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.el-finds a img, .el-finds a .noimg { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: #ece7de; }

.frow { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.frow:last-child { border-bottom: 0; }
.frow .th { width: 64px; height: 64px; border-radius: 11px; object-fit: cover; flex: none; background: #ece7de; display: grid; place-items: center; color: #bdb6aa; }
.frow .main { flex: 1; min-width: 0; }
.frow .main .t { font-weight: 650; }
.frow .main .d { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.frow .no { font-weight: 750; color: var(--muted); font-size: 13px; }
.fgroup-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; font-weight: 750; font-size: 15px; }
.fgroup-h::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }

/* Photos */
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 14px 16px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip .ph { flex: none; width: 150px; height: 150px; border-radius: 13px; overflow: hidden; background: #ece7de; border: 0; padding: 0; position: relative; }
.strip .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip .ph .cap { position: absolute; inset: auto 0 0 0; padding: 14px 8px 6px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .add { flex: none; width: 150px; height: 150px; border-radius: 13px; border: 2px dashed #d3ccbf; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.strip .add svg { width: 30px; height: 30px; }
.tray { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.tray button { flex: none; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: #ece7de; }
.tray img { width: 100%; height: 100%; object-fit: cover; }

/* Overall condition */
.overall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.overall button { padding: 16px 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); text-align: center; }
.overall button .ic { font-size: 26px; display: block; margin-bottom: 4px; }
.overall button b { display: block; font-size: 16px; }
.overall button small { color: var(--muted); font-size: 12px; }
.overall button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.overall button.on small { color: #c9cfd2; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r); padding: 14px 10px 12px; text-align: center; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.stat b { display: block; font-size: 30px; line-height: 1.1; font-weight: 800; color: var(--c); }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 550; }

.checks .row { min-height: 48px; font-size: 15px; }
.checks .ck { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.checks .ck.ok { background: var(--ok); color: #fff; }
.checks .ck.bad { border: 2px solid #d6d0c5; }
.checks .ck svg { width: 14px; height: 14px; stroke-width: 3; }
.checks .row .k { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.std .row { align-items: flex-start; }
.std .k { flex: none; width: 96px; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.std .k.req { color: var(--major); } .std .k.rec { color: var(--warn); } .std .k.opt { color: var(--minor); }
.note { padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: #6b4c00; font-size: 14.5px; margin: 10px 0; }
.note.info { background: #e5eef7; color: #24496b; }

/* Timer */
.timer { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #fdf1cc; color: #8a5b00; font-weight: 750; font-size: 13px; font-variant-numeric: tabular-nums; }
.timer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e0a100; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* FAB */
#fab { position: fixed; z-index: 35; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(var(--nav) + 18px); width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(23,34,41,.28); display: grid; place-items: center; }
#fab svg { width: 28px; height: 28px; stroke-width: 2; }
#fab:active { transform: scale(.94); }

/* Sheets */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(15,20,24,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
@media (min-width: 700px) { .sheet-bg { align-items: center; padding: 24px; } }
.sheet { width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + var(--sb)); animation: up .24s cubic-bezier(.2,.9,.3,1); -webkit-overflow-scrolling: touch; }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #cfc8bc; margin: 0 auto 10px; }
@media (min-width: 700px) { .sheet { border-radius: 22px; } .sheet::before { display: none; } .sheet { padding-top: 16px; } }
.sheet.wide { max-width: 1000px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; position: sticky; top: -10px; z-index: 2; background: var(--bg); padding: 6px 0; }
.sheet-h b { font-size: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.viewer { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 14px; background: #0d1114; display: block; }
.markup-wrap { background: #0d1114; border-radius: 14px; overflow: hidden; touch-action: none; }
.markup-wrap canvas { display: block; width: 100%; height: auto; max-height: 66vh; object-fit: contain; touch-action: none; }
.mk-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.sigpad { width: 100%; aspect-ratio: 3 / 1; background: #fff; display: block; touch-action: none; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.sigline { position: relative; }
.sigline::after { content: "Sign here"; position: absolute; left: 18px; right: 18px; bottom: 22%; border-top: 1.5px dashed #cfc8bc; font-size: 11px; color: #b9b2a6; padding-top: 4px; pointer-events: none; }
.sig-img { max-width: 100%; height: 80px; display: block; }
.prose { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; max-height: 40vh; overflow: auto; padding: 14px 16px; }

.saved { position: fixed; z-index: 50; top: calc(var(--st) + 14px); left: 50%; transform: translateX(-50%) translateY(-6px); padding: 5px 12px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 650; opacity: 0; transition: all .25s; pointer-events: none; display: flex; align-items: center; gap: 6px; }
.saved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6fd39b; }
.saved.on { opacity: 1; transform: translateX(-50%); }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--nav) + 20px); transform: translateX(-50%) translateY(10px); max-width: min(92vw, 520px); padding: 13px 18px; border-radius: 14px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 550; opacity: 0; transition: all .25s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.on { opacity: 1; transform: translateX(-50%); }
@media (min-width: 900px) { .toast { margin-left: calc(var(--rail) / 2); } }

.lock { position: fixed; inset: 0; z-index: 100; background: var(--brand); display: grid; place-items: center; }
.lock-box { text-align: center; color: #fff; }
.lock-box img { border-radius: 16px; }
.lock-t { margin: 16px 0 14px; font-size: 19px; font-weight: 650; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 26px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #8a969d; }
.pin-dots i.f { background: var(--accent); border-color: var(--accent); }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; }
.keypad button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 28px; font-weight: 500; }
.keypad button:active { background: rgba(255,255,255,.25); }
.keypad button.blank { visibility: hidden; }
.lock-err { min-height: 22px; margin-top: 16px; color: #ffb4a8; font-size: 14px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

/* fixes */
.split > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 330px minmax(0, 1fr); } }
@media (min-width: 900px) and (max-width: 1299px) { .detail .cats { grid-template-columns: repeat(2, 1fr); } }
.hacts { display: flex; gap: 8px; flex: none; align-items: center; }
