/* Zontes Workshop — workshop UI (dark-first, dual density) */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

/* —— Dark theme tokens (default) — near-black charcoal, not blue —— */
:root {
  --brand: #F59E0B;
  --brand-soft: #3B2F1A;
  --brand-hover: #FBBF24;
  --brand-ink: #111827;
  --ink: #F3F4F6;
  --ink-soft: #D1D5DB;
  --ink-muted: #A3A3A3;
  --bg: #121212;
  --bg-soft: #1A1A1A;
  --surface: #1C1C1C;
  --surface-2: #262626;
  --input-bg: #0A0A0A;
  --input-ink: #F5F5F5;
  --line: #333333;
  --line-strong: #404040;
  --ok: #10B981;
  --ok-soft: #064E3B;
  --ok-border: #047857;
  --ok-ink: #A7F3D0;
  --warn: #FBBF24;
  --warn-soft: #78350F;
  --warn-border: #B45309;
  --warn-ink: #FDE68A;
  --danger: #EF4444;
  --danger-soft: #7F1D1D;
  --danger-border: #B91C1C;
  --danger-ink: #FECACA;
  --picking: #FB923C;
  --picking-soft: #7C2D12;
  --picking-ink: #FED7AA;
  --completed: #34D399;
  --completed-soft: #064E3B;
  --completed-ink: #A7F3D0;
  --rejected: #F87171;
  --rejected-soft: #7F1D1D;
  --rejected-ink: #FECACA;
  --converted: #60A5FA;
  --converted-soft: #1E3A5F;
  --converted-ink: #BFDBFE;
  --focus-ring: rgba(245, 158, 11, 0.28);
  --radius: 14px;
  --radius-sm: 10px;
  --touch: 48px;
  --font: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.5);
  --space-page: 24px 22px 48px;
  --space-panel: 20px;
  --title-size: clamp(1.55rem, 3vw, 1.95rem);
  --cell-pad: 12px 14px;
  color-scheme: dark;
}

/* —— Light theme override —— */
body.theme-light {
  --brand: #D97706;
  --brand-soft: #FEF3C7;
  --brand-hover: #B45309;
  --brand-ink: #FFFFFF;
  --ink: #1F2937;
  --ink-soft: #4B5563;
  --ink-muted: #6B7280;
  --bg: #F1F5F9;
  --bg-soft: #E2E8F0;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --input-bg: #FFFFFF;
  --input-ink: #111827;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --ok: #059669;
  --ok-soft: #D1FAE5;
  --ok-border: #A7F3D0;
  --ok-ink: #065F46;
  --warn: #D97706;
  --warn-soft: #FEF3C7;
  --warn-border: #FDE68A;
  --warn-ink: #92400E;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --danger-border: #FECACA;
  --danger-ink: #991B1B;
  --picking: #C2410C;
  --picking-soft: #FFEDD5;
  --picking-ink: #9A3412;
  --completed: #047857;
  --completed-soft: #ECFDF5;
  --completed-ink: #065F46;
  --rejected: #B91C1C;
  --rejected-soft: #FEE2E2;
  --rejected-ink: #7F1D1D;
  --converted: #1D4ED8;
  --converted-soft: #DBEAFE;
  --converted-ink: #1E40AF;
  --focus-ring: rgba(217, 119, 6, 0.2);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  color-scheme: light;
}

/* —— Dual density —— */
.shell-mechanic,
body:not(.shell-admin) {
  --touch: 48px;
  --radius: 14px;
  --radius-sm: 10px;
  --space-page: 24px 22px 48px;
  --space-panel: 20px;
  --title-size: clamp(1.55rem, 3vw, 1.95rem);
  --cell-pad: 12px 14px;
}

.shell-admin {
  --touch: 36px;
  --radius: 10px;
  --radius-sm: 8px;
  --space-page: 16px 18px 32px;
  --space-panel: 14px;
  --title-size: clamp(1.2rem, 2vw, 1.45rem);
  --cell-pad: 8px 10px;
}

.shell-admin .admin-main {
  font-size: 15px;
  line-height: 1.4;
  padding: 16px 18px 28px;
}

.shell-admin .page-title {
  font-size: var(--title-size);
  margin-bottom: 4px;
}

.shell-admin .page-sub {
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.shell-admin .btn,
.shell-admin .field input,
.shell-admin .field select,
.shell-admin .field textarea,
.shell-admin .parts-toolbar input,
.shell-admin .parts-toolbar select,
.shell-admin .nav-link,
.shell-admin .tab-btn,
.shell-admin .chip,
.shell-admin .input-lg,
.shell-admin .form-grid .field input,
.shell-admin .form-grid .field select,
.shell-admin .form-grid .field textarea,
.shell-admin input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.shell-admin select,
.shell-admin textarea {
  min-height: var(--touch);
}

.shell-admin .btn {
  font-size: 0.9rem;
  padding: 0 14px;
}

.shell-admin .btn-lg {
  min-height: 42px;
  font-size: 0.95rem;
  padding: 0 18px;
}

.shell-admin .form-grid .field input,
.shell-admin .form-grid .field select,
.shell-admin .form-grid .field textarea,
.shell-admin .input-lg {
  min-height: var(--touch) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 0.9rem !important;
  padding: 6px 10px !important;
}

.shell-admin .panel,
.shell-admin .form-card,
.shell-admin .queue-card,
.shell-admin .stat {
  padding: var(--space-panel);
  border-radius: var(--radius);
}

.shell-admin table.data th,
.shell-admin table.data td {
  padding: var(--cell-pad);
  font-size: 0.9rem;
}

.shell-admin .sidebar {
  padding: 12px 8px;
}

.shell-admin .nav-link {
  min-height: 36px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.shell-admin .form-grid {
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.shell-admin .settings-section h3 {
  font-size: 0.95rem;
}

.shell-admin .tabs-bar .tab-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* Global form controls — fix white-on-white in dark mode (incl. table inputs) */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
select,
textarea {
  background: var(--input-bg);
  color: var(--input-ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  caret-color: var(--input-ink);
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}
option {
  background: var(--surface);
  color: var(--ink);
}

.app-shell { min-height: 100vh; }
[hidden] { display: none !important; }

/* —— Offline banner —— */
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--warn-soft);
  border-bottom: 1px solid var(--warn-border);
  color: var(--warn-ink);
}

/* —— Floating theme control (mechanic) —— */
.theme-switch.theme-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--brand-ink);
  flex-shrink: 0;
}
.brand-text { min-width: 0; }
.brand-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.brand-text span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-spacer { flex: 1; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch a {
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.lang-switch a.active {
  background: var(--brand);
  color: var(--brand-ink);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.user-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

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

.btn-ok {
  background: var(--ok);
  color: #fff;
  border-color: transparent;
}
.btn-ok:hover { filter: brightness(1.08); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
.btn-danger:hover { filter: brightness(1.08); }

.btn-cancel {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.btn-cancel:hover {
  background: var(--bg-soft);
  color: var(--ink);
  border-color: var(--ink-muted);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.btn-lg {
  min-height: 56px;
  font-size: 1.05rem;
  padding: 0 24px;
  border-radius: 14px;
}
.btn-block { width: 100%; }
.btn-icon {
  width: var(--touch);
  min-width: var(--touch);
  padding: 0;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
  padding: 0 16px;
  background: var(--brand-soft);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
  color: var(--brand-hover);
  font-weight: 700;
  font-size: 0.95rem;
}
.cart-btn .badge {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* —— Page —— */
.page {
  padding: var(--space-page);
  max-width: 1200px;
  margin: 0 auto;
}
.page-title {
  font-size: var(--title-size);
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.page-sub {
  color: var(--ink-muted);
  margin: 0 0 22px;
  font-size: 1rem;
}

/* —— Cards / grids —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.tile:active { transform: scale(0.985); }
.tile:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow);
}
.tile-media {
  flex: 1;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 18px;
  min-height: 140px;
}
.tile-media img {
  max-height: 140px;
  object-fit: contain;
}
.tile-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}
.tile-body h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.tile-body p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* —— Model strip (recent / favorites) —— */
.model-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.model-strip::-webkit-scrollbar { height: 6px; }
.model-strip::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}
.model-strip .tile,
.model-strip .strip-tile {
  flex: 0 0 auto;
  width: 140px;
  min-height: 0;
  scroll-snap-align: start;
}
.model-strip .tile-media {
  min-height: 88px;
  padding: 10px;
}
.model-strip .tile-media img { max-height: 72px; }
.model-strip .tile-body {
  padding: 10px 12px 12px;
}
.model-strip .tile-body h3 {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-strip .tile-body p {
  font-size: 0.78rem;
}

/* —— Login (mechanic density) —— */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  --touch: 48px;
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(245, 158, 11, 0.14), transparent 55%),
    radial-gradient(700px 360px at 90% 100%, rgba(16, 185, 129, 0.08), transparent 50%),
    var(--bg);
}
.login-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: var(--shadow);
}
.login-hero { text-align: center; margin-bottom: 24px; }
.login-hero .brand-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  font-size: 1.2rem;
  border-radius: 16px;
}
.login-hero h1 {
  font-size: 1.65rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-hero p {
  color: var(--ink-muted);
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 600;
}
.field select,
.field input,
.field textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  color: var(--input-ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.field select:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.pin-display {
  letter-spacing: 0.45em;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--brand-hover);
  margin-bottom: 12px;
  min-height: 60px;
}
.pin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pin-btn {
  min-height: 60px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.1s ease;
}
.pin-btn:active { background: var(--brand-soft); }
.pin-btn.action {
  font-size: 1rem;
  color: var(--ink-muted);
  background: var(--surface-2);
}
.error-text {
  color: var(--danger);
  font-weight: 600;
  min-height: 1.4em;
  text-align: center;
  margin: 8px 0 12px;
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.tab {
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.tab.active {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: transparent;
}

/* —— Parts split —— */
.parts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: calc(100vh - 120px);
  min-height: 480px;
}
.diagram-panel,
.parts-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1;
  color: var(--ink);
}
.diagram-viewport {
  flex: 1;
  overflow: auto;
  background: var(--surface-2);
  position: relative;
  touch-action: pan-x pan-y pinch-zoom;
}
.diagram-viewport img {
  width: 100%;
  height: auto;
  transform-origin: center center;
  transition: transform 0.1s ease;
}
.parts-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.parts-toolbar input,
.parts-toolbar select {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  color: var(--input-ink);
  padding: 0 12px;
  font-size: 0.95rem;
}
.parts-toolbar input { flex: 1; }
.parts-list {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-soft);
}
.part-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.part-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.part-meta h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.part-meta .pn {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.part-meta .price {
  color: var(--brand-hover);
  font-weight: 700;
  margin-top: 4px;
  font-size: 1.05rem;
}
.part-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 120px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.qty-row button {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
.qty-row input {
  width: 48px;
  height: 44px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.stock-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--ok-soft);
  color: var(--ok);
}
.stock-pill.low {
  background: var(--danger-soft);
  color: var(--danger);
}

/* —— Bundle part checklist —— */
.part-checklist {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 6px 0;
}
.part-checklist .check-row,
.part-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.part-checklist .check-row:last-child,
.part-checklist label:last-child { border-bottom: none; }
.part-checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.part-checklist .check-label {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
}
.part-checklist .check-qty {
  width: 64px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* —— Cart wizard —— */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.step {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.step.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-hover);
}
.step.done {
  color: var(--ok);
  border-color: var(--ok-border);
  background: var(--ok-soft);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.labour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.labour-card {
  min-height: 92px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.labour-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
  font-weight: 600;
}
.labour-card span {
  color: var(--brand-hover);
  font-weight: 700;
  font-size: 1.15rem;
}
.labour-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.chip:active,
.chip.on {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.cart-line img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.cart-line h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}
.cart-line .meta {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.cart-line .line-total {
  font-weight: 700;
  color: var(--brand-hover);
  font-size: 1.1rem;
  text-align: right;
  min-width: 90px;
}
.cart-line .line-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.line-table { width: 100%; border-collapse: collapse; }
.line-table th,
.line-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}
.line-table th {
  color: var(--ink-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.totals { text-align: right; margin-top: 14px; color: var(--ink-soft); }
.totals .grand {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 6px;
  letter-spacing: -0.02em;
}

/* —— Admin / warehouse —— */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand-mark { margin-bottom: 20px; padding: 0 8px; }
.sidebar-footer {
  margin-top: 24px;
  padding: 0 6px 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.sidebar-hub-link {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  font-weight: 600;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.nav-link:hover,
.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-hover);
}
.admin-main { padding: 24px; background: var(--bg); }

/* Admin sticky toolbar */
.admin-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 0 14px;
  margin-bottom: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.admin-toolbar .search,
.admin-toolbar input[type="search"],
.admin-toolbar input[type="text"],
.admin-toolbar select {
  flex: 1 1 220px;
  min-height: var(--touch);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  color: var(--input-ink);
}
.admin-toolbar select { flex: 0 1 auto; }
.admin-toolbar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

/* Disclosure */
details.admin-disclose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
details.admin-disclose summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-2);
  border-bottom: 1px solid transparent;
  user-select: none;
}
details.admin-disclose summary::-webkit-details-marker { display: none; }
details.admin-disclose summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 0.85rem;
  transition: transform 0.15s ease;
}
details.admin-disclose[open] summary {
  border-bottom-color: var(--line);
}
details.admin-disclose[open] summary::after {
  transform: rotate(180deg);
}
details.admin-disclose .disclose-body {
  padding: var(--space-panel);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat .label {
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.stat .value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.queue-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.queue-card {
  background: #fff;
  border: 1px solid var(--za-line, var(--line));
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
}
[data-theme="dark"] .queue-card,
.theme-dark .queue-card {
  background: var(--za-surface, var(--surface));
  box-shadow: var(--za-shadow-sm, var(--shadow));
}
.queue-card + .queue-card { margin-top: 0; }
.queue-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.queue-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Warehouse keeps larger action buttons */
.admin-main .queue-actions .btn-lg,
.queue-actions .wh-act.btn-lg {
  min-height: 52px;
  font-size: 1.02rem;
}

.status-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pending { background: var(--warn-soft); color: var(--warn); }
.status-picking { background: var(--picking-soft); color: var(--picking-ink); }
.status-ready { background: var(--ok-soft); color: var(--ok); }
.status-completed { background: var(--completed-soft); color: var(--completed-ink); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.status-amended { background: var(--warn-soft); color: var(--warn); }
.status-rejected { background: var(--rejected-soft); color: var(--rejected-ink); }
.status-converted { background: var(--converted-soft); color: var(--converted-ink); }

.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.queue-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.queue-actions-divider {
  width: 1px;
  align-self: stretch;
  min-height: 36px;
  background: var(--line-strong);
  margin: 0 4px;
}
.queue-action-menu { margin-left: auto; position: relative; display: inline-block; }
.queue-action-menu .admin-action-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 40;
  min-width: 180px;
  background: var(--za-surface, #fff);
  border: 1px solid var(--za-line, var(--line));
  border-radius: 10px;
  box-shadow: var(--za-shadow, 0 8px 24px rgba(15,23,42,.12));
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.queue-action-menu .admin-action-panel[hidden] { display: none !important; }
.queue-action-menu .admin-action-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--za-ink, var(--ink));
  cursor: pointer;
}
.queue-action-menu .admin-action-panel button:hover {
  background: var(--za-surface-2, var(--surface-2, #f1f5f9));
}
.print-menu {
  position: relative;
  display: inline-flex;
}
.print-menu summary {
  list-style: none;
  cursor: pointer;
}
.print-menu summary::-webkit-details-marker { display: none; }
.print-menu-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.print-menu-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.print-menu-panel a:hover {
  background: var(--surface-2);
}
.status-select {
  min-height: var(--touch);
  padding: 0 10px;
  font-weight: 600;
  max-width: 160px;
}
.return-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.nav-link.nav-pos {
  margin-top: 10px;
  justify-content: center;
  background: var(--brand);
  color: var(--brand-ink) !important;
  border: 1px solid transparent;
  font-weight: 700;
}
.nav-link.nav-pos:hover,
.nav-link.nav-pos.active {
  background: var(--brand-hover);
  color: var(--brand-ink) !important;
}
.option-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: 12px;
  overflow: hidden;
}
.option-card > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  user-select: none;
}
.option-card > summary::-webkit-details-marker { display: none; }
.option-card > summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--ink-muted);
}
.option-card[open] > summary {
  border-bottom: 1px solid var(--line);
}
.option-card .option-body {
  padding: 14px 16px 16px;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.catalog-menu {
  position: relative;
  display: inline-flex;
  margin-left: auto;
}
.catalog-menu summary {
  list-style: none;
  cursor: pointer;
}
.catalog-menu summary::-webkit-details-marker { display: none; }
.catalog-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.catalog-menu-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--ink);
}
.catalog-menu-panel a:hover,
.catalog-menu-panel a.active {
  background: var(--brand-soft);
  color: var(--brand-hover);
}
.tabs-bar.catalog-bar {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 18px;
}
.shell-admin .tabs-bar.catalog-bar {
  margin-top: 14px;
}
.stock-photo-cell {
  min-width: 110px;
  vertical-align: middle;
}
.stock-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin-bottom: 6px;
  display: block;
}
.stock-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-weight: 600;
}
.stock-photo-cell input[type="file"] {
  width: 100%;
  max-width: 130px;
  font-size: 0.75rem;
  min-height: 0 !important;
  padding: 4px 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--ink-muted);
}
.item-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
  color: var(--ink);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
table.data th,
table.data td {
  padding: var(--cell-pad);
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
  font-size: 0.95rem;
}
table.data th {
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Sticky thead */
.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
}

/* Dirty row hint */
tr.is-dirty {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  box-shadow: inset 3px 0 0 var(--brand);
  background: var(--brand-soft);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.alert-ok {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}
.alert-warn {
  background: var(--warn-soft);
  border-color: var(--warn-border);
  color: var(--warn-ink);
}
.alert-danger {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger-ink);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-state h3 { margin: 0 0 8px; font-size: 1.25rem; }
.empty-state p { color: var(--ink-muted); margin: 0 0 20px; }

.theme-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}
.theme-switch a {
  min-height: 40px;
  min-width: 44px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.theme-switch a.active {
  background: var(--brand);
  color: var(--brand-ink);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.form-grid .field input,
.form-grid .field select,
.form-grid .field textarea,
.input-lg {
  min-height: 52px;
  border-radius: 12px;
  font-size: 1rem;
}

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tabs-bar .tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
  box-sizing: border-box;
}
.tabs-bar .tab-btn.active {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-soft);
}
.toggle input {
  width: 44px;
  height: 24px;
  accent-color: var(--brand);
}

.data-card-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.data-card-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 0 14px 4px;
  font-weight: 600;
}
.data-card-table td {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px;
  vertical-align: middle;
}
.data-card-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 12px 0 0 12px;
}
.data-card-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
}
.data-card-table input,
.data-card-table select {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  color: var(--input-ink);
  padding: 0 10px;
  width: 100%;
  max-width: 140px;
}
.shell-admin .data-card-table td { padding: 8px 10px; }
.shell-admin .data-card-table input,
.shell-admin .data-card-table select {
  min-height: var(--touch);
  max-width: 120px;
}

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
  margin-bottom: 16px;
  font-weight: 600;
}

.success-screen {
  max-width: 520px;
  margin: 48px auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
}
.success-screen .big-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-hover);
  margin: 12px 0 8px;
}
.scanner-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin: 10px 0 14px;
  max-width: 420px;
}
.scanner-box video { width: 100%; display: block; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.photo-grid figure {
  margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.photo-grid img { width: 100%; height: 120px; object-fit: cover; }
.photo-grid figcaption { padding: 8px; font-size: 0.8rem; color: var(--ink-muted); }

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  display: inline-block;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.settings-section {
  margin-bottom: 20px;
}
.settings-section h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* —— Responsive —— */
@media (max-width: 980px) {
  .parts-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .diagram-viewport { min-height: 280px; max-height: 40vh; }
  .parts-panel { min-height: 48vh; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .part-card { grid-template-columns: 72px 1fr; }
  .part-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line .line-controls {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  .steps { grid-template-columns: 1fr 1fr; }
  .theme-fab { right: 14px; bottom: 14px; }
}

@media print {
  .topbar,
  .sidebar,
  .theme-fab,
  .offline-banner,
  .no-print { display: none !important; }
  body {
    background: #fff;
    color: #000;
  }
  .panel,
  .queue-card,
  .table-wrap {
    box-shadow: none;
    border-color: #ccc;
  }
}

/* —— Vehicle lookup result (cart job step) —— */
.vehicle-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.vehicle-card--ok {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok-ink);
}
.vehicle-card--missing {
  background: var(--warn-soft);
  border-color: var(--warn-border);
  color: var(--warn-ink);
}
.vehicle-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}
.vehicle-card__tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.vehicle-card__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  margin: 10px 0 0;
}
.vehicle-card__grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}
.vehicle-card__grid dd { margin: 2px 0 0; font-weight: 700; word-break: break-word; }

/* —— Service History (mechanic shell) —— */
.sh-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sh-toolbar .field { flex: 1; min-width: min(100%, 240px); margin: 0; }
.sh-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sh-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  gap: 8px 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.sh-row__title { font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sh-row__meta { color: var(--ink-muted); font-size: 0.88rem; margin-top: 3px; }
.sh-row__amt { text-align: right; font-weight: 700; font-size: 1.05rem; }
.sh-row__amt .btn { margin-top: 6px; min-height: 38px; }
@media (max-width: 720px) {
  .sh-row { grid-template-columns: 1fr; }
  .sh-row__amt { text-align: left; }
}
.pay-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
}
.pay-pill--paid { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok-ink); }
.pay-pill--partial,
.pay-pill--unpaid { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn-ink); }

/* —— Mechanic top bar: secondary links collapse into "More" on small screens —— */
.topbar-more { display: contents; }
.topbar-more-toggle { display: none; }
.user-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px 12px;
  }
  .topbar-spacer { display: none; }
  .brand-badge { width: 36px; height: 36px; border-radius: 10px; font-size: 0.85rem; }
  .brand-text strong { font-size: 0.95rem; }
  .brand-text span { font-size: 0.78rem; }
  .topbar-actions {
    position: relative;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }
  .topbar-actions .lang-switch a {
    min-width: 34px;
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
  .topbar-actions .user-chip {
    min-height: 34px;
    min-width: 0;
    padding: 0 10px;
    font-size: 0.82rem;
    flex: 0 1 auto;
  }
  .topbar-actions .user-chip__name { max-width: 9ch; }
  .topbar-actions .cart-btn {
    min-height: 34px;
    padding: 0 10px;
    gap: 6px;
    font-size: 0.82rem;
    margin-left: auto;
  }
  .topbar-actions .cart-btn .badge { min-width: 22px; height: 22px; font-size: 0.75rem; }
  .topbar-more-toggle {
    display: inline-flex;
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
    gap: 4px;
  }
  .topbar-more-toggle[aria-expanded="true"] .topbar-more-caret { transform: rotate(180deg); }
  .topbar-more {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 60;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .topbar-more.is-open { display: grid; }
  .topbar-more .btn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.85rem;
    border-radius: 999px;
    white-space: normal;
    text-align: center;
  }
}
@media (max-width: 380px) {
  .topbar-actions .user-chip .dot { display: none; }
  .topbar-actions .user-chip__name { max-width: 7ch; }
}

/* Vehicle-found card title block */
.vehicle-card__head { align-items: flex-start; }
.vehicle-card__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vehicle-card__sub { font-size: 0.85rem; font-weight: 600; opacity: 0.85; word-break: break-word; }

/* Service History — vehicle identifiers */
.sh-row__ids { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sh-row__ids small { color: var(--ink-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px; }
.sh-vehicle { display: flex; flex-direction: column; gap: 6px; }
.sh-vehicle__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.9rem; }
