@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;700&display=swap');

/* OCOS Field — NAC brand tokens */
:root {
  --dark:   #080A07;
  --green:  #5EE830;
  --amber:  #E8A830;
  --white:  #FFFFFF;
  --grey-1: #1A1C19;
  --grey-2: #2E302C;
  --grey-3: #5A5C57;
  --grey-4: #9EA09A;
  --grey-5: #D4D6D0;
  --red:    #E84830;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  --radius: 8px;
  --radius-sm: 4px;
  --tap-target: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { -webkit-appearance: none; appearance: none; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: none;
  overscroll-behavior: none;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ── Screen system ─────────────────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--grey-1);
  border-bottom: 1px solid var(--grey-2);
  flex-shrink: 0;
}
.app-logo {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--green);
  letter-spacing: 0.5px;
}
.sync-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--grey-2);
  color: var(--grey-4);
}
.sync-chip.synced   { color: var(--green); background: rgba(94,232,48,0.12); }
.sync-chip.syncing  { color: var(--amber); background: rgba(232,168,48,0.12); }
.sync-chip.offline  { color: var(--grey-4); }
.sync-chip.error    { color: var(--red);   background: rgba(232,72,48,0.12); }

/* ── Onboarding ──────────────────────────────────────────────────────────── */
.onboard-screen {
  padding: 40px 28px;
  justify-content: center;
  gap: 24px;
}
.onboard-tagline {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: 0.5px;
}
.onboard-tagline em { color: var(--green); font-style: normal; }
.onboard-sub {
  font-size: 16px;
  color: var(--grey-4);
  line-height: 1.6;
}
.perm-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-2);
}
.perm-row:last-of-type { border-bottom: none; }
.perm-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.perm-label { font-weight: 600; font-size: 15px; }
.perm-desc  { font-size: 13px; color: var(--grey-4); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  padding: 0 24px;
}
.btn:active { transform: scale(0.97); opacity: 0.85; }
.btn-primary {
  background: var(--green);
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(94,232,48,0.32), 0 1px 0 rgba(255,255,255,0.12) inset;
}
.btn-primary:active { box-shadow: 0 2px 8px rgba(94,232,48,0.2); }
.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-danger { background: var(--red); color: var(--white); }
.btn-full { width: 100%; }

/* ── Camera capture button ───────────────────────────────────────────────── */
.capture-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green);
  border: 4px solid var(--dark);
  box-shadow: 0 0 0 3px var(--green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.capture-btn:active { transform: scale(0.92); }

/* ── Tag picker ──────────────────────────────────────────────────────────── */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
}
.tag-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--grey-2);
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--grey-4);
  background: var(--grey-1);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tag-chip--selected {
  border-color: var(--green);
  color: var(--dark);
  background: var(--green);
  font-weight: 600;
}
.tag-chip.high    { border-color: var(--red);   color: var(--red);   }
.tag-chip.med     { border-color: var(--amber);  color: var(--amber); }

/* ── Severity selector ───────────────────────────────────────────────────── */
.severity-row {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.severity-row::-webkit-scrollbar { display: none; }
.sev-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--grey-2);
  background: var(--grey-1);
  color: var(--grey-4);
  cursor: pointer;
}
.sev-btn.active[data-sev="Info"]     { border-color: var(--grey-5); background: var(--grey-2); color: var(--grey-5); font-weight: 700; }
.sev-btn.active[data-sev="Low"]      { border-color: var(--green);  background: var(--green);  color: var(--dark);  font-weight: 700; }
.sev-btn.active[data-sev="Med"]      { border-color: var(--amber);  background: var(--amber);  color: var(--dark);  font-weight: 700; }
.sev-btn.active[data-sev="High"]     { border-color: var(--red);    background: var(--red);    color: var(--white); font-weight: 700; }
.sev-btn.active[data-sev="Critical"] { border-color: var(--red); background: var(--red); color: var(--white); font-weight: 700; box-shadow: 0 0 12px rgba(232,72,48,0.5); }

/* ── Photo grid ──────────────────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0;
}
.photo-thumb {
  aspect-ratio: 1;
  background: var(--grey-2);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.photo-badge.hazard  { background: var(--red); }
.photo-badge.routine { background: var(--green); }
.photo-badge.incident{ background: var(--amber); }

/* ── Voice note ──────────────────────────────────────────────────────────── */
.voice-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--grey-2);
  border: 2px solid var(--grey-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.voice-btn.recording { background: var(--red); border-color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,72,48,0.4); } 50% { box-shadow: 0 0 0 12px rgba(232,72,48,0); } }

/* ── Report card ─────────────────────────────────────────────────────────── */
.report-card {
  background: #111310;
  border-radius: var(--radius);
  padding: 18px 16px;
  margin: 0 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 4px 16px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
}
.report-card-title { font-weight: 700; font-size: 15px; }
.report-card-meta  { font-family: var(--font-mono); font-size: 12px; color: var(--grey-4); }
.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--dark);
  background: var(--amber);
  padding: 3px 8px;
  border-radius: 10px;
}

/* ── Form controls ───────────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; padding: 0 20px 16px; }
label { font-size: 13px; font-weight: 600; color: var(--grey-4); }
input, textarea, select {
  background: var(--grey-1);
  border: 1.5px solid var(--grey-2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--green); }
textarea { min-height: 100px; resize: vertical; }

/* ── Section heading ─────────────────────────────────────────────────────── */
.section-head {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  padding: 20px 20px 4px;
  color: var(--white);
  letter-spacing: 0.3px;
}
.section-sub {
  font-size: 14px;
  color: var(--grey-4);
  padding: 0 20px 20px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 28px;
  text-align: center;
  color: var(--grey-4);
}
.empty-state h2 { font-size: 20px; color: var(--white); }
.empty-state p  { font-size: 14px; line-height: 1.6; }

/* ── Toast / error strip ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  max-width: 448px;
  margin: 0 auto;
  background: var(--grey-1);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideUp 0.25s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.toast.error { border-color: var(--red); }
.toast.success { border-color: var(--green); }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 2px; }
.toast-msg { color: var(--grey-4); font-size: 13px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Sign-off canvas ─────────────────────────────────────────────────────── */
.sig-canvas {
  width: 100%;
  height: 200px;
  background: var(--grey-1);
  border: 1.5px solid var(--grey-2);
  border-radius: var(--radius);
  touch-action: none;
  cursor: crosshair;
}

/* ── Version history ─────────────────────────────────────────────────────── */
.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--grey-2);
}
.version-label { font-family: var(--font-mono); font-size: 13px; color: var(--grey-4); }

/* ── Style sample card ───────────────────────────────────────────────────── */
.sample-card {
  background: #111310;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
}
.sample-card-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.sample-card-meta  { font-family: var(--font-mono); font-size: 11px; color: var(--grey-4); }

/* ── Checklist ───────────────────────────────────────────────────────────── */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--grey-2);
}
.cl-check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--grey-2);
  background: transparent;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.cl-check.done    { background: var(--green); border-color: var(--green); }
.cl-check.flagged { background: var(--amber); border-color: var(--amber); }
.cl-prompt { font-size: 14px; line-height: 1.5; }
.cl-ref { font-family: var(--font-mono); font-size: 11px; color: var(--grey-4); margin-top: 2px; }

/* ── Filter chips ────────────────────────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--grey-2);
  background: transparent;
  color: var(--grey-4);
  cursor: pointer;
}
.filter-chip.active { border-color: var(--green); color: var(--dark); background: var(--green); font-weight: 700; }

/* ── Branding preview ────────────────────────────────────────────────────── */
.brand-preview {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 20px;
  border: 1px solid var(--grey-2);
}
.brand-preview-header {
  padding: 14px 16px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.privacy-line {
  font-size: 12px;
  color: var(--grey-4);
  padding: 0 20px 16px;
  line-height: 1.6;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 8px; }
.row   { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.px-20 { padding: 0 20px; }
.pb-safe { padding-bottom: calc(20px + var(--safe-bottom)); }
.text-mono  { font-family: var(--font-mono); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red   { color: var(--red); }
.text-dim   { color: var(--grey-4); }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 11px; }

/* ── App header additions ────────────────────────────────────────────────── */
.back-btn {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 12px 0 0;
  min-height: var(--tap-target);
  min-width: var(--tap-target);
  -webkit-tap-highlight-color: transparent;
}
.app-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  flex: 1;
  letter-spacing: 0.5px;
}

/* ── Sync chip state classes ─────────────────────────────────────────────── */
.sync--synced  { color: var(--green) !important; background: rgba(94,232,48,0.12) !important; }
.sync--syncing { color: var(--amber) !important; background: rgba(232,168,48,0.12) !important; }
.sync--offline { color: var(--grey-4) !important; }
.sync--error   { color: var(--red) !important;   background: rgba(232,72,48,0.12) !important; cursor: pointer; }

/* ── Screen content wrapper ──────────────────────────────────────────────── */
.screen-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(80px + var(--safe-bottom));
}
.screen-content.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding-top: 40px;
}

/* ── Onboarding screens ───────────────────────────────────────────────────── */
.onboarding-screen { padding: 0; }
.onboarding-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 48px 28px calc(48px + var(--safe-bottom));
  min-height: 100%;
}
.onboarding-headline {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: 0.5px;
}
.onboarding-sub { font-size: 15px; color: var(--grey-4); line-height: 1.6; }
.perm-list { list-style: none; display: flex; flex-direction: column; }
.logo-mark {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--green);
  letter-spacing: 3px;
  line-height: 1;
}
.logo-mark-field {
  display: block;
  font-size: 18px;
  color: var(--grey-4);
  letter-spacing: 6px;
  margin-top: -4px;
}
.logo-mark--small {
  font-size: 20px;
  letter-spacing: 4px;
}

/* ── Settings sections ───────────────────────────────────────────────────── */
.settings-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey-3);
  padding: 20px 20px 6px;
}
.settings-row--static {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-2);
  color: var(--white); font-size: 15px;
}
.settings-chevron { font-size: 18px; color: var(--grey-3); font-family: var(--font-sans); }
.settings-footer {
  font-size: 11px;
  color: var(--grey-3);
  text-align: center;
  padding: 28px 20px 40px;
  line-height: 1.8;
}

/* ── Bottom navigation ───────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  background: var(--grey-1);
  border-top: 1px solid var(--grey-2);
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--grey-4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.nav-btn.nav-btn--active { color: var(--green); }

/* ── Capture screen ──────────────────────────────────────────────────────── */
.capture-screen { display: flex; flex-direction: column; }
.dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 0;
  flex-shrink: 0;
}
.dossier-counts { font-family: var(--font-mono); font-size: 11px; color: var(--grey-4); }
.site-switch-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
  min-height: var(--tap-target);
  padding: 0 4px;
}
.capture-btn {
  position: absolute;
  bottom: calc(72px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green);
  border: 4px solid var(--dark);
  box-shadow: 0 0 0 3px var(--green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}
.capture-btn svg { width: 28px; height: 28px; stroke: var(--dark); }
.capture-btn:active { transform: translateX(-50%) scale(0.92); }

.library-btn {
  position: absolute;
  bottom: calc(83px + var(--safe-bottom));
  left: calc(50% + 52px);
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grey-1);
  border: 1.5px solid var(--grey-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, border-color 0.1s;
}
.library-btn svg { width: 20px; height: 20px; stroke: var(--grey-5); color: var(--grey-5); }
.library-btn:active { transform: scale(0.92); }
.library-btn:hover  { border-color: var(--green); }

/* ── Bottom sheet ────────────────────────────────────────────────────────── */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--grey-1);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--grey-2);
  padding: 12px 20px calc(24px + var(--safe-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bottom-sheet-handle {
  width: 36px; height: 4px;
  background: var(--grey-3);
  border-radius: 2px;
  margin: 0 auto 4px;
}

/* ── Full overlay ────────────────────────────────────────────────────────── */
.full-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,10,7,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 500;
  font-size: 15px;
  color: var(--grey-4);
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--grey-2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8,10,7,0.75);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 400;
}
.modal {
  background: var(--grey-1);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 24px 24px calc(32px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-headline { font-family: var(--font-display); font-size: 32px; letter-spacing: 0.3px; }
.modal-body { font-size: 14px; color: var(--grey-4); line-height: 1.6; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* ── Option list ─────────────────────────────────────────────────────────── */
.option-list { display: flex; flex-direction: column; }
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--grey-2);
  background: transparent;
  border-left: none; border-right: none; border-top: none;
  color: var(--white);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
.option-row:active { background: var(--grey-1); }
.option-row.option-row--active { color: var(--green); }
.option-row.option-row--active::after { content: '✓'; color: var(--green); }

/* ── Settings ────────────────────────────────────────────────────────────── */
.settings-list { display: flex; flex-direction: column; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-2);
  background: transparent;
  border-left: none; border-right: none; border-top: none;
  color: var(--white); font-size: 15px; cursor: pointer; width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.settings-value { font-family: var(--font-mono); font-size: 12px; color: var(--grey-4); }

/* ── Form controls ───────────────────────────────────────────────────────── */
.form-input {
  background: var(--grey-1); border: 1.5px solid var(--grey-2);
  border-radius: var(--radius-sm); color: var(--white);
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 14px; width: 100%; outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--green); }
.form-select {
  background: var(--grey-1); border: 1.5px solid var(--grey-2);
  border-radius: var(--radius-sm); color: var(--white);
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 14px; width: 100%; outline: none;
}
.form-group { display: flex; flex-direction: column; gap: 6px; padding: 0 20px 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--grey-4); }
.form-hint  { font-size: 12px; color: var(--grey-3); font-weight: 400; }

/* ── btn-ghost + btn-xs ──────────────────────────────────────────────────── */
.btn-ghost { background: transparent; color: var(--grey-4); }
.btn-ghost:hover { color: var(--white); }
.btn-xs { min-height: 28px; font-size: 12px; padding: 0 8px; }

/* ── Signature pad ───────────────────────────────────────────────────────── */
.sig-canvas-wrap { position: relative; padding: 0 20px; }
.sig-clear-btn {
  position: absolute; top: 8px; right: 28px;
  background: transparent; border: none;
  color: var(--grey-4); font-size: 12px; cursor: pointer;
}

/* ── PIN pad ─────────────────────────────────────────────────────────────── */
.pin-dots { display: flex; justify-content: center; gap: 16px; padding: 24px 0; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--grey-3); }
.pin-dot.pin-dot--filled { background: var(--green); border-color: var(--green); }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 40px; }
.pin-key {
  aspect-ratio: 1; border-radius: 50%;
  background: var(--grey-1); border: 1.5px solid var(--grey-2);
  color: var(--white); font-size: 22px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 64px;
}
.pin-key:active { background: var(--grey-2); }

/* ── Voice screen ────────────────────────────────────────────────────────── */
.voice-screen-content {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 0; gap: 24px;
}
.voice-btn--large { width: 96px; height: 96px; font-size: 40px; }
.voice-btn--large.recording { background: var(--red); border-color: var(--red); animation: pulse 1s infinite; }

.voice-recording-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(232,72,48,0.12); border: 1.5px solid var(--red);
  border-radius: 20px; padding: 6px 16px;
}
.voice-rec-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); animation: blink 1s step-start infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
.voice-timer { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--red); font-weight: 600; }
.voice-timer--warn     { color: var(--amber) !important; }
.voice-timer--critical { color: var(--red) !important; animation: blink 0.5s step-start infinite; }

.voice-controls { display: flex; gap: 12px; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:active { opacity: 0.8; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Photo context strip on voice screen */
.voice-context {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 0 20px;
}
.voice-thumb {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover;
  border: 1.5px solid var(--grey-3); flex-shrink: 0;
}
.voice-thumb-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* Review panel */
.voice-review {
  width: 100%; padding: 0 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.voice-playback-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--grey-1); border: 1.5px solid var(--grey-3);
  border-radius: var(--radius); padding: 10px 14px;
}
.voice-play-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); border: none; color: var(--dark);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.voice-play-btn:active { opacity: 0.8; }
.voice-playback-info { display: flex; flex-direction: column; flex: 1; }
.voice-playback-label { font-size: 13px; color: var(--grey-4); }
.voice-playback-dur { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--grey-5); }
.voice-transcript-preview {
  font-size: 14px; line-height: 1.6; color: var(--grey-5);
  background: var(--grey-1); border-radius: 8px; padding: 10px 12px;
  margin: 0;
}
.voice-notes-label { font-size: 12px; font-weight: 600; color: var(--grey-4); text-transform: uppercase; letter-spacing: 0.05em; }

.voice-btn-wrap { display: flex; align-items: center; gap: 12px; padding: 0 20px; }

/* Checklist item note panel (shared: checked + flagged) */
.checklist-wrap { display: flex; flex-direction: column; }
.cl-item-note {
  padding: 12px 16px; display: flex; flex-direction: column; gap: 8px;
  border-left: 3px solid var(--grey-3); background: var(--grey-1);
}
.cl-item-note--done {
  border-left-color: var(--green);
  background: rgba(94,232,48,0.06);
}
.cl-item-note--flagged {
  border-left-color: var(--amber);
  background: rgba(232,168,48,0.08);
}
.cl-note-refs { display: flex; flex-wrap: wrap; gap: 4px; }
.chip--ref {
  background: var(--grey-2); border: 1px solid var(--grey-3);
  color: var(--grey-5); font-size: 11px; padding: 2px 8px; border-radius: 10px;
  font-weight: 500;
}
.cl-item-note--flagged .chip--ref { background: rgba(232,168,48,0.15); border-color: var(--amber); color: var(--amber); }
.cl-item-note--done .chip--ref { background: rgba(94,232,48,0.12); border-color: var(--green); color: var(--green); }
.cl-note-recorder { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-mic-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grey-2); border: 1.5px solid var(--grey-3);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cl-mic-btn.recording { background: var(--red); border-color: var(--red); animation: pulse 1s infinite; }
.cl-note-timer { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--red); font-weight: 600; }
.cl-note-play {
  background: none; border: 1.5px solid var(--grey-3); border-radius: 20px;
  padding: 4px 10px; font-size: 13px; color: var(--grey-5); cursor: pointer;
}
.cl-note-text { font-size: 13px; }

/* ── Photo annotate screen ───────────────────────────────────────────────── */
.ann-screen { display: flex; flex-direction: column; overflow: hidden; }

.ann-photo-wrap {
  position: relative; flex-shrink: 0;
  width: 100%; height: 42vh; min-height: 260px; max-height: 400px;
  background: var(--grey-2); overflow: hidden;
}
.ann-photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-back-btn {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.55); border: none; color: #fff;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.ann-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 0 8px;
}
.ann-section { padding: 14px 20px 4px; display: flex; flex-direction: column; gap: 8px; }
.ann-section .tag-grid { padding: 0; }
.ann-section + .ann-section { border-top: 1px solid var(--grey-2); }
.ann-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--grey-4);
}

.ann-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ann-chip {
  padding: 5px 12px; border-radius: 20px; font-size: 13px;
  border: 1.5px solid var(--grey-3); background: var(--grey-1);
  color: var(--grey-5); cursor: pointer; transition: background 0.1s, border-color 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.ann-chip--active { background: var(--dark); border-color: var(--green); color: var(--green); }
.ann-chip--sev-info     { --sev-col: var(--grey-4); }
.ann-chip--sev-low      { --sev-col: var(--green); }
.ann-chip--sev-medium   { --sev-col: var(--amber); }
.ann-chip--sev-high     { --sev-col: #E86030; }
.ann-chip--sev-critical { --sev-col: var(--red); }
.ann-chip[data-sev].ann-chip--active {
  background: var(--dark); border-color: var(--sev-col); color: var(--sev-col);
}

.ann-ba-hint { font-size: 13px; color: var(--grey-4); margin: 0; }
.ann-ba-paired { font-size: 13px; color: var(--green); margin: 0; }

.ann-voice { display: flex; flex-direction: column; gap: 10px; }

.ann-footer {
  flex-shrink: 0; padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--grey-2); background: var(--dark);
}

/* ── Photo card (bottom sheet) ───────────────────────────────────────────── */
.photo-card-preview {
  width: 100%; aspect-ratio: 4/3;
  border-radius: var(--radius); overflow: hidden; background: var(--grey-2);
}
.photo-card-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ── Success / lock icons ────────────────────────────────────────────────── */
.success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(94,232,48,0.15); border: 2px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--green); margin: 0 auto 8px;
}
.lock-icon { font-size: 48px; margin: 0 auto 8px; }

/* ── Send actions ────────────────────────────────────────────────────────── */
.send-actions { display: flex; flex-direction: column; gap: 8px; padding: 16px 0 0; }

/* ── Color input ─────────────────────────────────────────────────────────── */
.color-input-wrap { display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.color-swatch { width: 48px; height: 48px; border: none; border-radius: var(--radius-sm); cursor: pointer; padding: 0; flex-shrink: 0; }
.color-hex { flex: 1; }

/* ── Logo upload ─────────────────────────────────────────────────────────── */
.logo-upload-area {
  border: 2px dashed var(--grey-2); border-radius: var(--radius);
  padding: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--grey-4); font-size: 14px;
  min-height: 100px; margin: 0 20px;
}
.logo-upload-area img { max-height: 80px; max-width: 100%; object-fit: contain; }

/* ── Sev btn active state fix ────────────────────────────────────────────── */
.sev-btn.sev-btn--active { border-color: var(--white); background: var(--grey-2); color: var(--white); font-weight: 700; }
.sev-btn.sev-btn--active[data-sev="info"]     { border-color: var(--grey-5); background: var(--grey-2); color: var(--grey-5); }
.sev-btn.sev-btn--active[data-sev="low"]      { border-color: var(--green);  background: var(--green);  color: var(--dark);  }
.sev-btn.sev-btn--active[data-sev="medium"]   { border-color: var(--amber);  background: var(--amber);  color: var(--dark);  }
.sev-btn.sev-btn--active[data-sev="high"]     { border-color: var(--red);    background: var(--red);    color: var(--white); }
.sev-btn.sev-btn--active[data-sev="critical"] { border-color: var(--red); background: var(--red); color: var(--white); box-shadow: 0 0 12px rgba(232,72,48,0.5); }

/* ── Tag chip selected fix ───────────────────────────────────────────────── */
.tag-chip.tag-chip--selected { border-color: var(--green); color: var(--dark); background: var(--green); font-weight: 600; }

/* ── Filter chip active fix ──────────────────────────────────────────────── */
.filter-chip.filter-chip--active { border-color: var(--green); color: var(--dark); background: var(--green); font-weight: 700; }

/* ── Checklist item states ───────────────────────────────────────────────── */
.checklist-item.checklist-item--checked  { background: rgba(94,232,48,0.05); }
.checklist-item.checklist-item--flagged  { background: rgba(232,168,48,0.07); }
.cl-text { flex: 1; font-size: 14px; line-height: 1.5; }
.cl-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Workers list ────────────────────────────────────────────────────────── */
.workers-list-wrap { display: flex; flex-direction: column; padding: 0 20px; gap: 8px; }
.worker-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #111310;
  border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.worker-name { font-weight: 600; font-size: 14px; }
.worker-role { font-size: 12px; color: var(--grey-4); }

/* ── Inline worker add ───────────────────────────────────────────────────── */
.worker-inline-add {
  padding: 0 20px 4px; display: flex; flex-direction: column; gap: 8px;
}
.worker-inline-name, .worker-inline-role { margin: 0; }

/* ── Recent workers ──────────────────────────────────────────────────────── */
.recent-workers-wrap { padding: 16px 20px 4px; }
.recent-workers-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--grey-4); margin-bottom: 8px;
}
.recent-workers-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-worker-chip {
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  border: 1.5px solid var(--grey-3); background: var(--grey-1);
  color: var(--grey-5); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.recent-worker-chip:active { background: var(--grey-2); }

/* ── Alone / solo sign-off ───────────────────────────────────────────────── */
.alone-wrap { padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.alone-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--grey-3); font-size: 12px;
}
.alone-divider::before, .alone-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--grey-2);
}
.alone-label { font-size: 13px; color: var(--grey-4); margin: 0; }
.alone-inline { display: flex; flex-direction: column; gap: 8px; }

/* ── Photo thumb hazard state ────────────────────────────────────────────── */
.photo-thumb.photo-thumb--hazard::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--red);
  pointer-events: none;
}

/* ── Photo Detail Screen ─────────────────────────────────────────────────── */
.photo-detail-img-wrap {
  position: relative;
  width: 100%;
  background: #111;
  min-height: 260px;
  max-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo-detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 55vh;
}
.photo-detail-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--grey-3);
  padding: 40px 0;
}
.photo-detail-img-placeholder span { font-size: 14px; }
.photo-detail-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.photo-detail-caption { font-size: 16px; color: var(--white); line-height: 1.5; margin: 0; }
.photo-detail-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-chip {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.detail-chip--tag { background: var(--grey-6); color: var(--white); }
.detail-chip--status { background: var(--grey-5); color: var(--white); }
.detail-chip--hazard---open   { background: #3d1a1a; color: var(--red); }
.detail-chip--hazard---corrected { background: #1a2d1a; color: var(--green); }
.detail-chip--routine         { background: #1a2233; color: #7eb8ff; }
.detail-chip--inspection      { background: #1e1e2e; color: #a0a0ff; }
.detail-chip--sev { background: var(--grey-5); color: var(--white); }
.detail-chip--sev-critical { background: #3d1a1a; color: var(--red); }
.detail-chip--sev-high     { background: #3d2a1a; color: #ff8c42; }
.detail-chip--sev-medium   { background: #3d3a1a; color: #ffd166; }
.detail-chip--sev-med      { background: #3d3a1a; color: #ffd166; }
.detail-chip--sev-low      { background: #1a2d1a; color: #6fcf97; }
.detail-chip--sev-info     { background: #1a2233; color: #7eb8ff; }
.photo-detail-meta { display: flex; flex-direction: column; gap: 10px; }
.photo-meta-row { display: flex; gap: 12px; align-items: flex-start; }
.photo-meta-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey-3); min-width: 68px; padding-top: 2px; }
.photo-meta-value { font-size: 14px; color: var(--grey-1); line-height: 1.5; flex: 1; }
.photo-meta-hash  { font-family: monospace; font-size: 12px; color: var(--grey-3); }
.photo-detail-audio-wrap { display: flex; flex-direction: column; gap: 8px; }
.photo-detail-audio-player { width: 100%; height: 40px; accent-color: var(--green); }
.photo-detail-transcript-wrap { display: flex; flex-direction: column; gap: 6px; }
.photo-detail-transcript-text { font-size: 14px; color: var(--grey-1); line-height: 1.6; margin: 0; font-style: italic; background: var(--grey-7); padding: 12px 14px; border-radius: 8px; }

/* ── Visual weight pass — empty state icons ──────────────────────────────── */
.empty-state {
  gap: 16px;
  padding: 56px 32px;
}
.empty-state h2 { font-family: var(--font-display); font-size: 26px; color: var(--white); letter-spacing: 0.3px; }
.empty-state p  { font-size: 15px; color: var(--grey-3); line-height: 1.65; }

.empty-state::before {
  content: '';
  display: block;
  width: 72px;
  height: 72px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

[data-screen="capture"] .empty-state::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%235EE830' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18h4l3-6h22l3 6h4a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V20a2 2 0 0 1 2-2z'/%3E%3Ccircle cx='24' cy='29' r='7'/%3E%3Ccircle cx='24' cy='29' r='2.5' fill='%235EE830' stroke='none'/%3E%3C/svg%3E");
}

[data-screen="inspections"] .empty-state::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%235EE830' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='8' width='28' height='34' rx='2'/%3E%3Cpath d='M20 8V6a4 4 0 0 1 8 0v2'/%3E%3Cline x1='16' y1='22' x2='32' y2='22'/%3E%3Cline x1='16' y1='28' x2='32' y2='28'/%3E%3Cline x1='16' y1='34' x2='24' y2='34'/%3E%3Ccircle cx='14' cy='22' r='1.5' fill='%235EE830' stroke='none'/%3E%3Ccircle cx='14' cy='28' r='1.5' fill='%235EE830' stroke='none'/%3E%3C/svg%3E");
}

[data-screen="reports"] .empty-state::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%235EE830' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h18l10 10v26a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z'/%3E%3Cpath d='M28 6v10h10'/%3E%3Cline x1='16' y1='26' x2='32' y2='26'/%3E%3Cline x1='16' y1='32' x2='32' y2='32'/%3E%3Cline x1='16' y1='20' x2='22' y2='20'/%3E%3C/svg%3E");
}

/* ── Bottom nav active indicator ─────────────────────────────────────────── */
.nav-btn.nav-btn--active {
  color: var(--green);
  position: relative;
}
.nav-btn.nav-btn--active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--green);
  border-radius: 0 0 2px 2px;
}

/* ── App header stronger separation ─────────────────────────────────────── */
.app-header {
  border-bottom: 1px solid var(--grey-2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* ── Bottom sheet elevation ──────────────────────────────────────────────── */
.bottom-sheet {
  box-shadow: 0 -8px 32px rgba(0,0,0,0.6);
  border-top: 1px solid rgba(255,255,255,0.08);
}
