/* ═══════════════════════════════════════════════════════════════
   Vehicle Check System — Main Stylesheet
   Brand colour: #005e85
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #005e85;
  --brand-dark:   #004669;
  --brand-light:  #e8f4fd;
  --accent:       #00a8e0;
  --success:      #1a8c4e;
  --success-bg:   #d1e7dd;
  --warn:         #856404;
  --warn-bg:      #fff3cd;
  --danger:       #842029;
  --danger-bg:    #f8d7da;
  --text:         #1a1a2e;
  --text-muted:   #6b7280;
  --border:       #dde1e7;
  --bg:           #f4f6f9;
  --card-bg:      #ffffff;
  --header-h:     60px;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.12);
  font-size: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── App Header ───────────────────────────────────────────────── */
.app-header {
  background: var(--brand);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img  { height: 40px; }
.logo-text {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.header-user {
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  display: none;
}
@media (min-width: 480px) { .header-user { display: block; } }
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background .15s;
}
.btn-icon:hover { background: rgba(255,255,255,.15); text-decoration: none; }

/* ── Main ─────────────────────────────────────────────────────── */
.app-main {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1rem 5rem;
}

/* ── Footer ───────────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  padding: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
  font-weight: 500;
}
.alert-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-left: 4px solid var(--danger); }
.alert-info    { background: var(--brand-light); color: var(--brand);  border-left: 4px solid var(--brand); }
.alert-warn    { background: var(--warn-bg);     color: var(--warn);   border-left: 4px solid #ffc107; }
.alert-warn a  { color: var(--warn); font-weight: 700; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, transform .1s, opacity .15s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active  { transform: scale(.97); }
.btn:hover   { text-decoration: none; }

.btn-primary  { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-outline  { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }

.btn-danger   { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: #f5c2c7; }

.btn-block    { width: 100%; }
.btn-lg       { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-sm       { padding: .45rem .9rem; font-size: .85rem; }
.btn-xs       { padding: .3rem .6rem; font-size: .78rem; border-radius: 4px; }

/* ── Form Controls ────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--text);
}
.form-control {
  display: block;
  width: 100%;
  padding: .7rem .9rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,94,133,.15);
}
.form-control--sm { padding: .45rem .75rem; font-size: .875rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }

.required { color: var(--danger); margin-left: 2px; }
.help-text { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; display: block; }

.input-group { position: relative; display: flex; }
.input-group .form-control { padding-right: 3rem; }
.input-toggle-pw {
  position: absolute;
  right: .6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: .25rem;
}

/* ── Registration input (big and clear) ───────────────────────── */
.reg-input {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Yes / No Toggle ──────────────────────────────────────────── */
.yn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .35rem;
}
.yn-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.yn-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .85rem .5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all .15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.yn-yes span { color: var(--success); }
.yn-no  span { color: var(--danger); }
.yn-option input:checked + span { border-width: 2px; }
.yn-yes input:checked + span { background: var(--success-bg); border-color: var(--success); }
.yn-no  input:checked + span  { background: var(--danger-bg);  border-color: var(--danger); }
.yn-option span:hover { background: var(--bg); }

/* ── Vehicle Type / Trailer toggles ──────────────────────────── */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: .35rem;
}
.toggle-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .85rem .5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  transition: all .15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.toggle-option input:checked + span {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}
.toggle-option span:hover { background: var(--bg); }

/* ── Radio group (multi-option) ───────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: .4rem; margin-top: .35rem; }
.radio-option { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.radio-option input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.radio-option span { font-size: .95rem; }

/* ── Form Sections ────────────────────────────────────────────── */
.form-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--brand-light);
}
.question-heading { font-size: .95rem; font-weight: 700; color: var(--text-muted); margin: .75rem 0 .25rem; }
.question-wrap { margin-bottom: .75rem; }
.question-label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.flag-note { font-size: .72rem; color: var(--warn); font-weight: 600; margin-left: .5rem; }

/* ── File Upload ──────────────────────────────────────────────── */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s;
}
.file-upload-area:hover { border-color: var(--brand); }
.file-input { display: none; }
.file-label { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.file-icon  { font-size: 2rem; }
.file-label span:not(.file-icon) { font-weight: 600; color: var(--brand); }
.file-sub   { font-size: .78rem; color: var(--text-muted); }
.file-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; justify-content: center; }
.file-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }

/* ── Signature ────────────────────────────────────────────────── */
.sig-wrap { display: flex; flex-direction: column; gap: .5rem; }
.sig-canvas {
  width: 100%;
  max-width: 600px;
  height: 150px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.sig-canvas.has-sig { border-color: var(--success); }
.sig-actions { display: flex; align-items: center; gap: .75rem; }
.sig-hint { font-size: .8rem; color: var(--text-muted); }
.declaration-text { font-size: .9rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; }

/* ── Submit bar ───────────────────────────────────────────────── */
.submit-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  padding: 1rem 0 .5rem;
  margin-top: .5rem;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ── Page Hero / headings ─────────────────────────────────────── */
.page-hero { text-align: center; padding: 1.5rem 0 .5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.page-sub   { color: var(--text-muted); margin-top: .35rem; }
.form-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.form-header .page-title { margin: 0; }
.back-link  { color: var(--brand); font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* ── Vehicle pre-selection banner (QR scan) ───────────────────── */
.vehicle-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--brand-light);
  border: 1px solid #b3d7ee;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-top: 1rem;
}
.vehicle-banner__icon { font-size: 1.5rem; flex-shrink: 0; }
.vehicle-banner__text { flex: 1; }
.vehicle-banner__text strong { display: block; font-size: 1rem; font-weight: 700; color: var(--brand); }
.vehicle-banner__text span   { font-size: .85rem; color: var(--text-muted); }
.vehicle-banner__badge {
  font-size: .75rem; font-weight: 700; color: var(--brand);
  background: #fff; border: 1px solid #b3d7ee;
  border-radius: 20px; padding: .2rem .7rem;
  white-space: nowrap;
}

/* ── Dashboard form cards ─────────────────────────────────────── */
.form-cards { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.form-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-left: 5px solid var(--brand);
  transition: box-shadow .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.form-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; }
.form-card--defect   { border-color: #e67e22; }
.form-card--incident { border-color: #c0392b; }
.form-card__icon { font-size: 2rem; flex-shrink: 0; }
.form-card__body { flex: 1; }
.form-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: .2rem; }
.form-card__desc  { font-size: .85rem; color: var(--text-muted); }
.form-card__arrow { font-size: 1.5rem; color: var(--text-muted); }

/* ── Recent submissions ───────────────────────────────────────── */
.recent-section { margin-top: 2rem; }
.section-heading { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; color: var(--text-muted); }
.submission-list { display: flex; flex-direction: column; gap: .5rem; }
.submission-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  box-shadow: var(--shadow);
}
.submission-item__main { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.submission-item__form { font-size: .85rem; color: var(--text-muted); }
.submission-item__reg  { font-weight: 700; font-size: .95rem; }
.submission-item__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.submission-item__date { font-size: .8rem; color: var(--text-muted); }

/* ── Login page ───────────────────────────────────────────────── */
.login-page { background: var(--brand); }
.login-page .app-footer { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.5); }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 420px;
}
.login-logo { text-align: center; margin-bottom: 1.25rem; }
.login-logo img { max-height: 60px; }
.login-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .02em;
}
.login-title { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: .25rem; }
.login-sub   { text-align: center; color: var(--text-muted); margin-bottom: 1.25rem; font-size: .9rem; }

/* ── Admin layout ─────────────────────────────────────────────── */
.admin-wrap {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--header-h));
}
.app-main.admin-page-main { max-width: 100%; padding: 0; }
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--brand-dark);
  min-height: calc(100vh - var(--header-h));
}
.admin-content {
  flex: 1;
  padding: 1.5rem;
  max-width: calc(1100px - 220px);
  overflow-x: auto;
}
.sidebar-brand {
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 1.25rem 1rem .6rem;
}
.sidebar-nav ul { list-style: none; }
.sidebar-nav li a {
  display: block;
  padding: .7rem 1rem;
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: var(--accent);
}
.sidebar-divider { border-top: 1px solid rgba(255,255,255,.1); margin: .5rem 0; }

@media (max-width: 640px) {
  .admin-sidebar { display: none; }
  .admin-content { padding: 1rem; }
}

/* ── Admin main ───────────────────────────────────────────────── */
.admin-wrap ~ .app-footer { display: none; }

/* Override main width for admin */
body:has(.admin-wrap) .app-main,
.admin-page .app-main {
  max-width: 100%;
  padding: 0;
}

/* ── Cards / Widgets ──────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--brand);
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.widget { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }
.widget-link  { font-size: .85rem; font-weight: 400; }

/* ── Stat cards ───────────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
  border-top: 3px solid var(--border);
}
.stat-card--primary { border-color: var(--brand); }
.stat-card--warn    { border-color: #e67e22; }
.stat-card--danger  { border-color: var(--danger); }
.stat-card__value { font-size: 2rem; font-weight: 800; color: var(--brand); line-height: 1; }
.stat-card--warn .stat-card__value   { color: #e67e22; }
.stat-card--danger .stat-card__value { color: var(--danger); }
.stat-card__label { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Weekly bar chart ─────────────────────────────────────────── */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  height: 110px;
  padding: .5rem 0 0;
}
.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  height: 100%;
  justify-content: flex-end;
}
.bar-chart__val   { font-size: .65rem; font-weight: 700; color: var(--brand); }
.bar-chart__bar   { width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 3px; transition: height .3s; }
.bar-chart__label { font-size: .6rem; color: var(--text-muted); white-space: nowrap; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th {
  background: var(--bg);
  padding: .6rem .75rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td     { background: var(--bg); }
.row-flagged td { background: #fffbf0 !important; }
.row-flagged:hover td { background: #fff8e6 !important; }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: .85rem;
  color: var(--brand);
  text-decoration: none;
  transition: background .15s;
}
.page-link.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-link:hover:not(.active) { background: var(--bg); }

/* ── Filter bar ───────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
  background: var(--card-bg);
  padding: .75rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.filter-check { display: flex; align-items: center; gap: .4rem; font-size: .875rem; white-space: nowrap; }

/* ── Form row (admin) ─────────────────────────────────────────── */
.form-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.form-row .form-group { flex: 1; min-width: 180px; }
.form-check { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.form-check input { accent-color: var(--brand); width: 16px; height: 16px; }

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.tab {
  padding: .5rem 1rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 2px solid transparent;
  border-bottom: none;
  margin-bottom: -2px;
  transition: color .15s, background .15s;
}
.tab.active { background: var(--card-bg); color: var(--brand); border-color: var(--border); }
.tab:hover:not(.active) { color: var(--brand); }

/* ── Detail view ──────────────────────────────────────────────── */
.detail-header { margin-bottom: 1rem; }
.detail-summary { margin-bottom: 1rem; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
}
.detail-grid div label {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.detail-grid div strong { font-size: 1rem; }
.answer-list  { }
.answer-item  { display: flex; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.answer-item:last-child { border-bottom: none; }
.answer-item dt { flex: 1; font-size: .875rem; color: var(--text-muted); }
.answer-item dd { flex: 1; font-size: .875rem; font-weight: 600; }
.answer-flagged { background: #fffbf0; margin: 0 -1.25rem; padding: .6rem 1.25rem; }
.answer-yes     { color: var(--success); }
.answer-no      { color: var(--danger); }
.answer-flag-marker { font-weight: 700; }
.thumb          { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); cursor: zoom-in; }
.text-muted     { color: var(--text-muted); }
.empty-msg      { color: var(--text-muted); font-style: italic; padding: 1rem 0; }

/* ── Code block ───────────────────────────────────────────────── */
.code-block {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .85rem;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  word-break: break-all;
  margin-top: .5rem;
}

/* ── Responsive tweaks ────────────────────────────────────────── */
@media (max-width: 480px) {
  .form-section { padding: 1rem .85rem; }
  .yn-group { gap: .4rem; }
  .toggle-group { gap: .4rem; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
