/* ============ Base ============ */
:root {
  --blue: #1554d1;
  --blue-dark: #0f3f9e;
  --blue-soft: #e8effc;
  --ink: #16202e;
  --ink-soft: #5b6878;
  --line: #e3e8ef;
  --bg: #f2f4f8;
  --card: #ffffff;
  --green: #14804a;
  --green-soft: #e1f4ea;
  --amber: #9a6700;
  --amber-soft: #fff3d1;
  --gray-soft: #e9edf2;
  --danger: #c62838;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(22, 32, 46, 0.08), 0 4px 14px rgba(22, 32, 46, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
}

button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ============ App bar ============ */
.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 12px 12px;
}
.appbar-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar-back {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 32px; line-height: 1;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
}
.appbar-spacer { width: 44px; height: 44px; }
.appbar-user button {
  width: 44px; height: 44px;
  border: 0; background: none;
  display: grid; place-items: center;
}
.appbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
}

/* ============ Page ============ */
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 96px);
}

.greeting { font-size: 17px; font-weight: 600; margin-bottom: 12px; }

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.list-count { color: var(--ink-soft); font-size: 14px; }

.empty-state {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 20px;
  text-align: center;
  color: var(--ink-soft);
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-bottom: 16px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-xl { min-height: 60px; font-size: 19px; letter-spacing: 0.4px; }

.sticky-actions {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 64px);
  padding: 12px 16px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  max-width: 560px;
  margin: 0 auto;
  z-index: 40;
}

/* ============ Status badges ============ */
.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-not_started { background: var(--gray-soft); color: var(--ink-soft); }
.status-in_progress { background: var(--amber-soft); color: var(--amber); }
.status-completed   { background: var(--green-soft); color: var(--green); }

.status-big {
  font-size: 20px;
  font-weight: 800;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

/* ============ Site cards ============ */
.card-list { display: grid; gap: 12px; }

.site-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  -webkit-tap-highlight-color: transparent;
}
.site-card:active { background: var(--blue-soft); }
.site-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.site-card-name { font-size: 17px; font-weight: 700; }
.site-card-address { color: var(--ink-soft); font-size: 14px; line-height: 1.45; margin-bottom: 10px; }
.site-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ============ Panels / info list ============ */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.panel-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.info-list { display: grid; gap: 12px; }
.info-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.info-row dt { color: var(--ink-soft); font-size: 14px; }
.info-row dd { font-weight: 600; font-size: 15px; line-height: 1.4; }

/* ============ Forms ============ */
.form { display: grid; gap: 14px; }
.page > .form { padding-bottom: 72px; } /* clear the fixed sticky-actions bar */
.form-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.form-status-label { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select {
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 16px; /* prevents iOS zoom */
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.field-row { display: grid; grid-template-columns: 1fr 90px; gap: 12px; }

.file-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}
.file-trigger {
  display: grid;
  place-items: center;
  min-height: 56px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  color: var(--blue);
  font-weight: 700;
  background: var(--blue-soft);
}

/* ============ Login ============ */
/* The login screen is chromeless: no app bar, the page is the brand surface */
body:has(.page-login) .appbar { display: none; }

.page-login {
  position: relative;
  min-height: 100dvh;
  padding-top: max(9dvh, 48px);
}
/* Soft brand glow behind the hero */
.page-login::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 520px;
  background: radial-gradient(closest-side, rgba(21, 84, 209, 0.16), transparent 72%);
  z-index: -1;
  pointer-events: none;
}

.login-hero {
  text-align: center;
  margin-bottom: 30px;
  animation: login-rise 0.45s ease both;
}
.login-logo img {
  display: block;
  margin: 0 auto;
  height: 42px;
  width: auto;
  max-width: min(260px, 70vw);
}
.login-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin-top: 22px;
}
.login-sub { color: var(--ink-soft); margin-top: 5px; font-size: 15px; }

.login-form {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(22, 32, 46, 0.05), 0 16px 40px rgba(22, 32, 46, 0.1);
  padding: 26px 20px;
  animation: login-rise 0.45s 0.08s ease both;
}
.page > .login-form { padding-bottom: 26px; } /* login submit is inline, not sticky */

.login-form .field input {
  background: #f5f7fa;
  border-color: #e8ecf2;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-form .field input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(21, 84, 209, 0.14);
}
.login-form .field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #f5f7fa inset;
  -webkit-text-fill-color: var(--ink);
}
.login-form .field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.login-form .btn-primary {
  margin-top: 8px;
  background: linear-gradient(180deg, #2b6ae8 0%, var(--blue) 100%);
  border: 0;
  box-shadow: 0 8px 20px rgba(21, 84, 209, 0.32);
}
.login-form .btn-primary:active {
  background: var(--blue-dark);
  box-shadow: 0 4px 10px rgba(21, 84, 209, 0.3);
}
.login-form .btn-primary.is-loading {
  opacity: 0.75;
  pointer-events: none;
}
.page-login .alert-error {
  background: #fdeaec;
  border-left: 4px solid var(--danger);
  border-radius: 8px 12px 12px 8px;
}
.password-toggle {
  color: var(--ink-soft);
  display: grid;
  place-items: center;
}
.password-toggle svg { display: block; grid-area: 1 / 1; }
.password-toggle .eye-hide { visibility: hidden; }
.password-toggle.is-on .eye-show { visibility: hidden; }
.password-toggle.is-on .eye-hide { visibility: visible; }
.password-toggle:active { background: var(--gray-soft); }

.login-copy {
  text-align: center;
  margin-top: 26px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: #9aa4b2;
  animation: login-rise 0.45s 0.16s ease both;
}

.page-login .alert { animation: login-rise 0.3s ease both; }

@keyframes login-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}
.alert-error { background: #fdeaec; color: var(--danger); }

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 56px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 0;
  background: none;
  border-radius: 10px;
}

/* ============ Bottom nav ============ */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav-item {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.bottomnav-item.is-active { color: var(--blue); }
.bottomnav-icon { font-size: 20px; }

/* ============ Workspace ============ */
.page-workspace { padding-bottom: calc(env(safe-area-inset-bottom) + 80px); }

.site-info-strip {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.site-info-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.site-info-main strong { font-size: 17px; }
.site-info-sub { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -16px 12px;
  padding: 0 16px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--ink-soft);
  background: var(--gray-soft);
}
.tab.is-active { background: var(--ink); color: #fff; }

/* Map selector */
.map-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -16px 12px;
  padding: 2px 16px 6px;
}
.map-selector::-webkit-scrollbar { display: none; }
.map-chip {
  flex-shrink: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.map-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.map-chip-add { border-style: dashed; color: var(--blue); background: var(--blue-soft); }

/* Map viewer */
.map-shell { position: relative; }
.map-viewport {
  position: relative;
  height: min(52dvh, 500px);
  background: #dde3ea;
  border-radius: var(--radius);
  overflow: hidden;
  touch-action: none;
  box-shadow: var(--shadow);
}
.map-canvas {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.map-canvas img {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.marker-layer { position: absolute; inset: 0; }

.map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: grid;
  justify-items: center;
  gap: 0;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.map-marker-pin {
  width: 40px; height: 40px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
}
.map-marker-pin span {
  transform: rotate(45deg);
  font-size: 17px;
}
.map-marker-label {
  margin-top: 3px;
  background: rgba(22,32,46,0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-viewport.is-placing { cursor: crosshair; }
.map-viewport.is-placing .map-canvas { outline: 3px dashed var(--blue); outline-offset: -3px; }

.placement-banner {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.placement-banner button {
  border: 0;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 14px;
  min-height: 40px;
}

.map-zoom {
  position: absolute;
  right: 10px;
  bottom: 78px;
  display: grid;
  gap: 6px;
  z-index: 5;
}
.map-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4; /* below the placement banner so it can't be tapped mid-placement */
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 18px;
  box-shadow: var(--shadow);
}
.map-delete:active { background: #fdeaec; border-color: var(--danger); }
.map-zoom button {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.fab {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 5;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(21, 84, 209, 0.45);
}
.fab:active { background: var(--blue-dark); }

.map-empty { margin-top: 8px; }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(16, 24, 36, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
}
.modal h2 { font-size: 19px; margin-bottom: 16px; }
.modal-note {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: -6px 0 16px;
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

/* ============ Bottom sheet ============ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(16, 24, 36, 0.55);
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 18px);
  max-height: 80dvh;
  overflow-y: auto;
}
.sheet-handle {
  width: 42px; height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 4px auto 14px;
}
.sheet-title { font-size: 18px; margin-bottom: 14px; }
.item-options { display: grid; gap: 10px; margin-bottom: 14px; }
.item-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.item-option:active { background: var(--blue-soft); }
.item-option-icon { font-size: 24px; }

/* ============ Marker survey (questions) ============ */
.page-questions { padding-bottom: calc(env(safe-area-inset-bottom) + 180px); }

.q-context {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.q-context-icon { font-size: 28px; }
.q-context strong { display: block; font-size: 16px; }
.q-context small { color: var(--ink-soft); }

.alert-success { background: var(--green-soft); color: var(--green); }

.q-progress {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.q-progress.is-complete { background: var(--green-soft); color: var(--green); }

.q-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.q-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}
.q-required { color: var(--danger); }
.q-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin: -6px 0 10px;
}
.q-card input[type="text"], .q-card textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
}
.q-card textarea { resize: vertical; }
.q-card input:focus, .q-card textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yesno-opt input { position: absolute; opacity: 0; pointer-events: none; }
.yesno-opt span {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  -webkit-tap-highlight-color: transparent;
}
.yesno-opt input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.yesno-no input:checked + span { border-color: var(--danger); background: #fdeaec; color: var(--danger); }

.q-comment { margin-top: 10px; display: grid; gap: 6px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray-soft);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-delete {
  position: absolute;
  top: 4px; right: 4px;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 24, 36, 0.7);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.photo-add { display: grid; gap: 6px; }
.photo-add-count { font-size: 13px; font-weight: 700; color: var(--green); }

.q-form { gap: 12px; }

.sheet-status { color: var(--ink-soft); font-weight: 600; margin: -6px 0 12px; }
.sheet-questions-btn { margin-bottom: 12px; }

.map-marker-badge {
  position: absolute;
  top: -7px; right: -7px;
  transform: rotate(45deg);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  border: 2px solid #fff;
}
.map-marker-badge.is-complete { background: var(--green); color: #fff; }
.map-marker-badge.is-progress { background: #e9a13b; color: #fff; }

.general-q-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  margin-bottom: 12px;
  -webkit-tap-highlight-color: transparent;
}
.general-q-card:active { background: var(--blue-soft); }
.general-q-icon { font-size: 24px; }
.general-q-text { flex: 1; display: grid; }
.general-q-text strong { font-size: 15px; }
.general-q-text small { color: var(--ink-soft); font-weight: 600; }
.general-q-chev { font-size: 24px; color: var(--ink-soft); }

.q-maps-done { font-weight: 700; color: var(--green); margin-bottom: 10px; }
.q-card .btn-small { justify-self: start; }

.photo-doc {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-size: 28px;
  background: var(--blue-soft);
}
.photo-doc small { font-size: 11px; font-weight: 800; color: var(--blue); }

.sticky-actions-double { display: grid; gap: 8px; }
.page-questions .sticky-actions {
  position: static;
  width: 100%;
  max-width: none;
  padding: 12px 0 0;
  background: none;
}

/* ============ Answers preview ============ */
.edit-fab {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  font-size: 20px;
  flex-shrink: 0;
}
.edit-fab:active { background: var(--blue); }

.preview-list { display: grid; gap: 10px; }
.preview-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.preview-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-bottom: 8px;
}
.preview-answer {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
}
.preview-comment {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.answer-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.answer-chip.is-yes { background: var(--green-soft); color: var(--green); }
.answer-chip.is-no { background: #fdeaec; color: var(--danger); }
.answer-chip.is-empty { background: var(--gray-soft); color: var(--ink-soft); font-weight: 600; }

/* ============ Summary view ============ */
.next-btn { margin-top: 14px; }
.next-btn.is-disabled {
  background: var(--gray-soft);
  border-color: var(--gray-soft);
  color: var(--ink-soft);
  pointer-events: none;
  font-size: 15px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat-tile {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 6px;
  display: grid;
  justify-items: center;
  gap: 2px;
}
.stat-tile strong { font-size: 22px; font-weight: 800; color: var(--blue); }
.stat-tile small { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center; }

.summary-rows { display: grid; gap: 4px; }
.summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  -webkit-tap-highlight-color: transparent;
}
.summary-rows > .summary-row:last-child { border-bottom: 0; }
a.summary-row:active { background: var(--blue-soft); }
.summary-ext {
  min-width: 56px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
  padding: 8px 6px;
}
.summary-row-icon { font-size: 22px; }
.summary-row-main { flex: 1; display: grid; }
.summary-row-main strong { font-size: 15px; }
.summary-row-main small { color: var(--ink-soft); font-size: 13px; }
.summary-number { font-variant-numeric: tabular-nums; }
.summary-empty { color: var(--ink-soft); font-size: 14px; }

/* ============ Technician cards ============ */
.tech-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  -webkit-tap-highlight-color: transparent;
}
.tech-card:active { background: var(--blue-soft); }
.tech-card-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tech-card-main { flex: 1; display: grid; }
.tech-card-main strong { font-size: 16px; }
.tech-card-main small { color: var(--ink-soft); font-size: 13px; }
.tech-card-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--gray-soft);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

[hidden] { display: none !important; }
