/* ==========================================================================
   FS-Toolkit Tracker — Merged Shared Components & Layout
   Reused across all 7 screens and the index.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  background: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
}

body.is-phone-page {
  background: var(--bg-stage);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Mockup Navigation Bar (top of every page)
   -------------------------------------------------------------------------- */
.mockup-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.mockup-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
}

.mockup-bar__brand:hover {
  text-decoration: none;
}

.mockup-bar__tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.mockup-bar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.mockup-bar__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.mockup-bar__link:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  text-decoration: none;
}

.mockup-bar__link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.mockup-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
}

/* Optional sub-bar for screen-specific mockup controls (e.g. QR visibility mode) */
.mockup-controls {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Phone Frame (390px wide) & Desktop Stage
   -------------------------------------------------------------------------- */
.phone-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px 48px;
}

.phone-frame {
  width: 390px;
  max-width: 100%;
  min-height: 760px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-frame--embedded {
  min-height: 700px;
  border-radius: 24px;
  flex-shrink: 0;
}

@media (max-width: 430px) {
  .phone-stage {
    padding: 0;
  }
  .phone-frame {
    width: 100%;
    min-height: calc(100vh - 61px);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
}

.desktop-stage {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

@media (max-width: 640px) {
  .desktop-stage {
    padding: 20px 16px 48px;
  }
}

/* --------------------------------------------------------------------------
   App Header & Navigation inside Phone
   -------------------------------------------------------------------------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-header__title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header__subtitle {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-surface-2);
}

.phone-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phone-body--flush-top {
  padding-top: 0;
}

/* Bottom Navigation Bar (4-tab mobile navigation) */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 4px 4px 8px;
  margin-top: auto;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.bottom-nav__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav__badge {
  position: absolute;
  top: -5px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.bottom-nav__item:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  text-decoration: none;
}

.bottom-nav__item[aria-current="page"] {
  color: var(--accent-text);
}

/* --------------------------------------------------------------------------
   Maker Logo Placeholder
   -------------------------------------------------------------------------- */
.maker-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Typography Helpers
   -------------------------------------------------------------------------- */
.h1 {
  margin: 0;
  font-size: var(--text-2xl);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h2 {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.h3 {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.3;
  font-weight: 700;
}

.section-label {
  margin: 0 0 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-sm {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

/* --------------------------------------------------------------------------
   Cards & Surfaces
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card--tight {
  padding: 12px 14px;
}

.card--interactive {
  display: block;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.card--interactive:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.row-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Buttons (all >= 44px touch target)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 20px;
  font-size: var(--text-base);
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-2);
}

.btn-danger {
  background: var(--sev-safety-solid);
  color: var(--sev-safety-solid-ink);
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(0.92);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-text);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Status Labels (5 gear states)
   -------------------------------------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge--in-service {
  background: var(--status-in-service-bg);
  color: var(--status-in-service-text);
}
.status-badge--in-service .status-badge__dot {
  background: var(--status-in-service-dot);
}

.status-badge--handed-over {
  background: var(--status-handed-over-bg);
  color: var(--status-handed-over-text);
}
.status-badge--handed-over .status-badge__dot {
  background: var(--status-handed-over-dot);
}

.status-badge--docs-missing {
  background: var(--status-docs-missing-bg);
  color: var(--status-docs-missing-text);
}
.status-badge--docs-missing .status-badge__dot {
  background: var(--status-docs-missing-dot);
}

.status-badge--at-factory {
  background: var(--status-at-factory-bg);
  color: var(--status-at-factory-text);
}
.status-badge--at-factory .status-badge__dot {
  background: var(--status-at-factory-dot);
}

.status-badge--shipped {
  background: var(--status-shipped-bg);
  color: var(--status-shipped-text);
}
.status-badge--shipped .status-badge__dot {
  background: var(--status-shipped-dot);
}

.status-badge--tested {
  background: var(--status-at-factory-bg);
  color: var(--status-at-factory-text);
}
.status-badge--tested .status-badge__dot {
  background: var(--accent);
}

.status-badge--commissioning {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.status-badge--commissioning .status-badge__dot {
  background: var(--accent);
}

.status-badge--retired {
  background: var(--status-at-factory-bg);
  color: var(--status-at-factory-text);
}
.status-badge--retired .status-badge__dot {
  background: transparent;
  border: 1.5px solid var(--status-at-factory-dot);
}

/* --------------------------------------------------------------------------
   Severity Labels (4 issue severities)
   -------------------------------------------------------------------------- */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.severity-badge--safety {
  background: var(--sev-safety-bg);
  color: var(--sev-safety-text);
  border-color: var(--sev-safety-border);
}

.severity-badge--not-working {
  background: var(--sev-not-working-bg);
  color: var(--sev-not-working-text);
  border-color: var(--sev-not-working-border);
}

.severity-badge--missing {
  background: var(--sev-missing-bg);
  color: var(--sev-missing-text);
  border-color: var(--sev-missing-border);
}

.severity-badge--cosmetic {
  background: var(--sev-cosmetic-bg);
  color: var(--sev-cosmetic-text);
  border-color: var(--sev-cosmetic-border);
}

/* --------------------------------------------------------------------------
   Form Inputs, Textareas, Selects, Toggle Switches
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.field__req {
  color: var(--sev-safety-text);
  margin-left: 2px;
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.field__error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--sev-safety-text);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: var(--tap-min);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.4;
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.input--error {
  border-color: var(--sev-safety-solid);
}

/* Toggle Switch (44px tap row) */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap-min);
  padding: 8px 0;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-switch__track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-3);
  border: 1px solid var(--border-strong);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.toggle-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.toggle-switch input:checked + .toggle-switch__track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-switch__track::after {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-switch__track {
  box-shadow: var(--focus-ring);
}

/* --------------------------------------------------------------------------
   Tabs (44px min height)
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  min-height: var(--tap-min);
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tab-btn[aria-selected="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-btn__count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-2);
  color: var(--text-secondary);
}

.tab-btn[aria-selected="true"] .tab-btn__count {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* --------------------------------------------------------------------------
   Offline Banner
   -------------------------------------------------------------------------- */
.offline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--offline-bg);
  color: var(--offline-text);
  border-bottom: 1px solid var(--offline-border);
  border-left: 4px solid var(--offline-border);
  font-size: var(--text-xs);
  font-weight: 700;
}

.offline-banner__btn {
  min-height: 36px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--offline-border);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Issue Card + Customer-Facing Status Stepper
   -------------------------------------------------------------------------- */
.issue-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.issue-card__title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.issue-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.issue-card__photos {
  display: flex;
  gap: 8px;
}

.photo-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.photo-thumb--evidence {
  border-color: var(--status-in-service-dot);
  background: var(--status-in-service-bg);
  color: var(--status-in-service-text);
}

/* Customer-facing 4-step status track: Received -> Viewed -> Addressed -> Resolved */
.progress-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.progress-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-step__bar {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-3);
}

.progress-step--done .progress-step__bar {
  background: var(--accent);
}

.progress-step--current .progress-step__bar {
  background: var(--accent);
}

.progress-step__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-step--done .progress-step__label,
.progress-step--current .progress-step__label {
  color: var(--text-primary);
}

.resolution-box {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--status-in-service-bg);
  color: var(--status-in-service-text);
  font-size: var(--text-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Compact customer-facing status row on individual punch cards */
.issue-card__actions {
  display: flex;
  gap: var(--space-2);
}
.issue-card__actions .btn-primary { flex: 1; }

.doc-alert {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--status-docs-missing-bg);
  color: var(--status-docs-missing-text);
  font-size: var(--text-sm);
  font-weight: 600;
}
.doc-row--missing .doc-row__icon { color: var(--status-docs-missing-text); }
.doc-row--missing .doc-row__meta { color: var(--status-docs-missing-text); font-weight: 600; }

.issue-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
}

.issue-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.issue-status-pill--addressed {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: transparent;
}

.issue-status-pill--resolved {
  background: var(--status-in-service-bg);
  color: var(--status-in-service-text);
  border-color: transparent;
}

/* Main gear lifecycle progress bar (shown once for the gear as a whole) */
.gear-lifecycle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
}

.gear-lifecycle__track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.gear-lifecycle__step {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gear-lifecycle__bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-3);
}

.gear-lifecycle__step--done .gear-lifecycle__bar,
.gear-lifecycle__step--current .gear-lifecycle__bar {
  background: var(--accent);
}

.gear-lifecycle__step--warn .gear-lifecycle__bar {
  background: var(--status-docs-missing-dot);
}

.gear-lifecycle__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-lifecycle__step--done .gear-lifecycle__label,
.gear-lifecycle__step--current .gear-lifecycle__label {
  color: var(--text-primary);
  font-weight: 700;
}

.gear-lifecycle__note {
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: var(--status-docs-missing-bg);
  color: var(--status-docs-missing-text);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   Key-Value Spec List (Gear Details / QR Landing)
   -------------------------------------------------------------------------- */
.spec-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.spec-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.spec-row:first-child {
  padding-top: 0;
}

.spec-row dt {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.spec-row dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Segmented Control (used in mockup controls & editor presets)
   -------------------------------------------------------------------------- */
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  gap: 2px;
}

.segmented__btn {
  min-height: 36px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.segmented__btn[aria-pressed="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Chip / Tag
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.chip--accent {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   Timeline / History Rows
   -------------------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  position: relative;
}

.timeline-item__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  flex-shrink: 0;
}

.timeline-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}

.timeline-item__line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}

.timeline-item:last-child .timeline-item__line {
  display: none;
}

.timeline-item__content {
  flex: 1;
  padding-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Scanner: Bulk toggle, banner and status picker
   -------------------------------------------------------------------------- */
.bulk-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #F1F3F5;
  font-size: var(--text-sm);
  font-weight: 700;
}
.switch {
  width: 52px;
  height: 32px;
  min-height: 32px;
  border-radius: var(--radius-pill);
  border: 0;
  padding: 3px;
  background: #46505A;
  display: flex;
  justify-content: flex-start;
  cursor: pointer;
}
.switch--on { background: var(--accent); justify-content: flex-end; }
.switch__thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.bulk-banner {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  padding: 8px 12px;
}
.status-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.status-pick__btn {
  min-height: var(--tap-min);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.status-pick__btn[aria-checked="true"] {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */
.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-bar .input { flex: 1; }
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
