* { box-sizing: border-box; }

/* Every interactive element gets a visible keyboard focus state. Before this
   rule, only three selectors in the whole product styled focus, all of them
   text inputs - buttons, pills, nav tabs and job cards had none. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

/* Dense components opt out. A 30-minute week-grid slot is 24px tall
   (WORKSHOP_ROW_PX = 48 per hour, app.js:1743) and stacks time, subtitle,
   customer, mechanic and a status badge. At --leading-body they overflow. */
.wk-job-block, .wk-job-block *, .job-card, .job-card *, .badge, .month-job-chip, .day-job-row {
  line-height: var(--leading-tight);
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

button {
  font-family: inherit;
  cursor: pointer;
}

input, select {
  font-family: inherit;
}

/* Number fields are edited by typing a new value, not by nudging tiny
   spinner arrows - hide them everywhere. */
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Header / nav ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--accent-dark);
  color: var(--on-brand);
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: 0.2px;
}

.brand .logo { font-size: var(--text-2xl); }

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav button {
  background: transparent;
  border: none;
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
}

/* Hover lifts to the primary; the current tab wears the highlight,
   always with dark text. */
.nav button:hover { background: var(--accent); }

.nav button.active {
  background: var(--highlight);
  color: var(--on-highlight);
}

.clock { font-size: var(--text-sm); color: var(--on-accent-muted); }
.shop-info { font-size: var(--text-sm); color: var(--on-accent-muted); }
.topbar .btn-ghost { color: var(--on-brand); border-color: rgba(255,255,255,0.35); }
.topbar .btn-ghost:hover { background: rgba(255,255,255,0.12); }

main {
  flex: 1;
  padding: 20px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- Cards / panels ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-header h2 { margin: 0; font-size: var(--text-lg); }
.panel-body { padding: 16px 18px; }

h1 { font-size: var(--text-2xl); margin: 0 0 14px; }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-base); margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

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

/* ---------- Buttons ---------- */

.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
}

.btn:hover { background: var(--hover-bg); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

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

.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-brand); }
.btn-accent:hover { background: var(--accent-dark); }

/* Outlined, never a solid red fill (Soft sand, decision 53). */
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }

.btn-sm { padding: 5px 10px; font-size: var(--text-sm); border-radius: 6px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--hover-bg); }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: 9px 10px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  background: var(--panel);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 140px; }
.field-error { font-size: var(--text-sm); color: var(--danger); margin-top: 4px; }

.inline-subform {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.inline-subform .field-row:last-of-type { margin-bottom: 0; }
.inline-subform-actions { display: flex; justify-content: flex-end; gap: 8px; }

.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 2px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.weekday-check:has(input:checked) { background: var(--ok-bg); border-color: var(--accent); color: var(--accent-dark); }

.search-input {
  padding: 9px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  min-width: 220px;
}

/* ---------- Till layout ---------- */

.till-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1100px;
}

.cart-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 700px) {
  .cart-split { grid-template-columns: 1fr; }
}
.cart-items-col { min-width: 0; }
.cart-summary-col { min-width: 0; }

.till-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-wrap .search-input { width: 100%; min-width: 0; }

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 420px;
  overflow-y: auto;
  z-index: 20;
}

.search-dropdown.open { display: block; }

.search-dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
}

.search-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  text-align: left;
}
.search-dropdown-item:last-of-type { border-bottom: none; }
.search-dropdown-item:hover { background: var(--hover-subtle); }
.search-dropdown-item:disabled { opacity: 0.4; cursor: not-allowed; }

/* Right-click quick-actions menu on a workshop job card - positioned at the
   cursor via JS (left/top set inline), not anchored to a parent element
   like .search-dropdown is, since a right-click can happen anywhere in the
   grid. z-index above modals (50) so it still works from the Day Jobs modal. */
.context-menu {
  position: fixed;
  z-index: 200;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 4px;
}
.context-menu-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.context-menu-item:hover:not(:disabled) { background: var(--bg); }
.context-menu-item:disabled { opacity: 0.4; cursor: not-allowed; }

/* Hover summary on a job card - same positioning approach as .context-menu
   (fixed, JS-placed, above modals), shown after JOB_TOOLTIP_DELAY_MS. */
.job-tooltip {
  position: fixed;
  z-index: 200;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  pointer-events: none;
}
.job-tooltip-bike { font-size: var(--text-sm); font-weight: 700; margin-bottom: 4px; }
.job-tooltip-row { font-size: var(--text-sm); color: var(--ink); line-height: 1.5; }

.sdi-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sdi-name { font-weight: 600; font-size: var(--text-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdi-sku { font-size: var(--text-xs); color: var(--muted); font-family: var(--font-mono); font-weight: 500; }

.sdi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.sdi-price { font-family: var(--font-mono); font-weight: 500; color: var(--brand-dark); font-size: var(--text-base); }
.sdi-stock { font-size: var(--text-xs); color: var(--muted); }
.sdi-stock.low { color: var(--danger); font-weight: 600; }

.search-dropdown-more {
  padding: 8px 14px;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
}

.category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cashier-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cashier-select-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.cashier-select-row .category-pills { margin-bottom: 0; }

.pill {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.pill.active { background: var(--accent); border-color: var(--accent); color: var(--on-brand); }

.payment-split-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.payment-split-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-pill {
  border: 2px solid var(--border);
  background: var(--panel);
  padding: 14px 12px;
  border-radius: 12px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  width: 100%;
}
.payment-pill:hover { border-color: var(--accent); }
.payment-pill-extra { border-style: dashed; }
.payment-pill-extra:hover { border-color: var(--danger); }
.payment-pill-x { opacity: 0.55; font-weight: 400; }
.payment-amount-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  font-size: var(--text-base);
  background: var(--panel);
  text-align: center;
}

.tender-extra-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tender-extra-pill {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.tender-extra-pill:hover { border-color: var(--accent); color: var(--accent); }

.subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.subnav-dropdown { position: relative; }
/* Bridges the gap between the pill and the menu below it (margin-top on
   .subnav-dropdown-menu) so moving the cursor there in a straight line
   doesn't briefly leave both boxes and close the menu before it arrives. */
.subnav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}
.subnav-dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  padding: 6px;
  min-width: 150px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.subnav-dropdown:hover .subnav-dropdown-menu,
.subnav-dropdown:focus-within .subnav-dropdown-menu {
  display: flex;
}
.subnav-dropdown-item {
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  width: 100%;
}
.subnav-dropdown-item:hover { background: var(--bg); }
.subnav-dropdown-item.active { background: var(--accent); color: var(--on-brand); }

.cart-panel { width: 100%; }
.tender-panel { max-width: 700px; margin: 0 auto; }

.cart-items { max-height: 620px; overflow-y: auto; }

.cart-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line:last-child { border-bottom: none; }

.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info .name { font-size: var(--text-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line .info .unit { font-size: var(--text-sm); color: var(--muted); display: flex; align-items: center; gap: 3px; }
.price-input {
  width: 64px;
  padding: 3px 5px;
  border: 1px solid var(--input-border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--panel);
}
.price-input:disabled { background: var(--surface-disabled); color: var(--muted); cursor: not-allowed; }
.price-input:focus { outline: none; border-color: var(--accent); }

.line-discount-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-bg);
  padding: 1px 6px;
  border-radius: 999px;
}

.qty-control { display: flex; align-items: center; gap: 6px; }
.qty-control button {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-weight: 700;
  line-height: 1;
}
.qty-control span { min-width: 20px; text-align: center; font-weight: 600; }

.line-total { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-sm); min-width: 60px; text-align: right; }

.remove-btn {
  border: none;
  background: none;
  color: var(--danger);
  font-size: var(--text-lg);
  padding: 2px 4px;
  line-height: 1;
}

.totals-table { width: 100%; font-size: var(--text-base); border-collapse: collapse; margin-top: 10px; }
.totals-table td { padding: 4px 0; }
.totals-table td:last-child { text-align: right; font-family: var(--font-mono); font-weight: 500; }
.totals-table tr.grand td { font-size: var(--text-xl); font-weight: 800; padding-top: 10px; border-top: 1px solid var(--border); }

.empty-cart { color: var(--muted); text-align: center; padding: 30px 0; font-size: var(--text-base); }

.cart-alt-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.cart-alt-actions .btn { flex: 1; min-width: 0; }

.order-fulfill-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--status-scheduled-bg);
  border: 1px solid var(--status-scheduled-border);
  color: var(--status-scheduled-ink);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 12px;
}
.order-fulfill-banner .btn { flex-shrink: 0; }

/* ---------- Tables ---------- */

table.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
table.data-table th {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
table.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:hover td { background: var(--hover-subtle); }
table.data-table td.num, table.data-table th.num { text-align: right; }

.filter-row th {
  padding: 6px 10px 10px;
  border-bottom: 2px solid var(--border);
  text-transform: none;
  letter-spacing: normal;
}
.filter-row .col-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: var(--text-sm);
  background: var(--panel);
  font-weight: 400;
  color: var(--ink);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}
.badge.low { background: var(--danger-bg); color: var(--danger); }
.badge.ok { background: var(--ok-bg); color: var(--accent-dark); }
.badge.cash { background: var(--ok-bg); color: var(--accent-dark); }
.badge.card { background: var(--badge-card-bg); color: var(--badge-card-ink); }
.badge.split { background: var(--warn-bg); color: var(--warn-ink); }
.badge.other { background: var(--badge-other-bg); color: var(--badge-other-ink); }
.badge.type-order { background: var(--ok-bg); color: var(--accent-dark); }
.badge.type-workshop { background: var(--status-scheduled-bg); color: var(--status-scheduled-ink); }
.badge.type-quote { background: var(--warn-bg); color: var(--warn-ink); }
.badge.role-mechanic { background: var(--status-scheduled-bg); color: var(--status-scheduled-ink); }
.badge.role-cashier { background: var(--badge-card-bg); color: var(--badge-card-ink); }
.badge.status-new { background: var(--warn-bg); color: var(--warn-ink); }
.badge.status-imported { background: var(--ok-bg); color: var(--accent-dark); }
.badge.status-ignored { background: var(--danger-bg); color: var(--danger); }
.badge.status-pending { background: var(--status-pending-bg); color: var(--status-pending-ink); }
/* The online booking pages' My Bookings renders one of these for every job
   status. Only .status-pending existed, so four of the five showed as bare
   text. Tokens are the staff diary's own (.job-card.status-* uses the same
   pairs) and design-contrast.test.js already gates each ink/bg pair for AA. */
.badge.status-scheduled { background: var(--status-scheduled-bg); color: var(--status-scheduled-ink); }
.badge.status-waiting_parts { background: var(--status-waiting_parts-bg); color: var(--status-waiting_parts-ink); }
.badge.status-on_hold { background: var(--status-on_hold-bg); color: var(--status-on_hold-ink); }
.badge.status-complete { background: var(--status-complete-bg); color: var(--status-complete-ink); }

.table-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ---------- Dashboard ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat-card .label { font-size: var(--text-sm); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-size: var(--text-3xl); font-weight: 800; margin-top: 6px; }

.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.printer-agent-list { display: flex; flex-direction: column; gap: 10px; }
.printer-agent { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.printer-agent-name { font-weight: 600; min-width: 160px; }
.printer-agent-printers { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Workshop calendar ---------- */

.workshop-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.workshop-main { flex: 1; min-width: 0; }

.workshop-feed {
  flex: 0 0 260px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.workshop-feed-title {
  margin: 0 0 10px;
  font-size: var(--text-base);
  color: var(--muted);
}

.waiting-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 8px;
  cursor: pointer;
  font-family: inherit;
}
.waiting-card:hover { filter: brightness(0.97); }
.waiting-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 2px;
}
.tone-new .waiting-tag { background: var(--status-pending-bg); color: var(--status-pending-ink); }
.tone-change .waiting-tag { background: var(--warn-bg); color: var(--warn-ink); }
.tone-cancelled .waiting-tag { background: var(--surface-sunken); color: var(--muted); }
.waiting-who { font-weight: 600; font-size: var(--text-sm); }
.waiting-line { font-size: var(--text-sm); }
.waiting-line.muted { color: var(--muted); }

@keyframes workshop-flash-highlight {
  0%, 100% { box-shadow: 0 0 0 3px var(--status-pending-border); }
  50% { box-shadow: 0 0 0 3px transparent; }
}
.flash-highlight { animation: workshop-flash-highlight 0.5s ease-in-out 3; }

@media (max-width: 980px) {
  .workshop-layout { flex-direction: column; }
  .workshop-feed { position: static; max-height: none; width: 100%; flex-basis: auto; }
}

.workshop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.workshop-header h1 { margin: 0; }

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

.week-label { font-size: var(--text-sm); color: var(--muted); font-weight: 600; margin-left: 4px; }

.wk-placing-hint {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-ink);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 14px;
}

.week-grid-scroll { overflow-x: auto; }

.week-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 760px;
}

.wk-corner { background: var(--panel); }

.wk-day-header {
  background: var(--panel);
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wk-day-header.today { background: var(--ok-bg); }
.wk-day-header .wd-name { font-weight: 700; font-size: var(--text-sm); }
.wk-day-header .wd-date { font-size: var(--text-xs); color: var(--muted); }
.wk-day-header.today .wd-name { color: var(--accent-dark); }
.wk-day-header.day-off { background: var(--surface-sunken); opacity: 0.65; }
.wk-day-header.day-full { background: var(--warn-bg); }
.wd-full-badge {
  display: none;
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--warn-ink);
}
.wk-day-header.day-full .wd-full-badge { display: block; }

.week-diaries {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.week-diary { flex: 1 1 auto; min-width: 0; }

/* Two mechanics selected: side by side, shrunk to fit the page width with no
   horizontal scroll. Every pair after that wraps to a new row below; once
   there are more rows than fit on screen, the page just scrolls vertically
   like normal - no special handling needed for that. */
.week-diaries.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.week-diaries.split .week-diary { min-width: 0; }
.week-diaries.split .week-grid-scroll { overflow-x: visible; }
.week-diaries.split .week-grid {
  min-width: 0;
  width: 100%;
  grid-template-columns: 46px repeat(7, minmax(0, 1fr));
}

.week-diary-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.wk-time-label {
  background: var(--panel);
  padding: 6px 8px;
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: right;
  white-space: nowrap;
}

.wk-cell {
  background: var(--panel);
  min-height: 44px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: default;
}
.wk-cell.today { background: var(--surface-today); }
.week-diaries.placing .wk-cell { cursor: crosshair; }
.week-diaries.placing .wk-cell:hover { background: var(--ok-bg); }

.wk-cell.day-off {
  background: repeating-linear-gradient(45deg, var(--hatch-a), var(--hatch-a) 7px, var(--hatch-b) 7px, var(--hatch-b) 14px);
  cursor: not-allowed;
  pointer-events: none;
}
.week-diaries.placing .wk-cell.day-off { cursor: not-allowed; }
.week-diaries.placing .wk-cell.day-off:hover { background: repeating-linear-gradient(45deg, var(--hatch-a), var(--hatch-a) 7px, var(--hatch-b) 7px, var(--hatch-b) 14px); }

.job-card {
  background: var(--status-scheduled-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--status-scheduled-border);
  border-radius: 7px;
  padding: 5px 7px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.job-card:hover { border-color: var(--accent); }
.job-card.status-pending { background: var(--status-pending-bg); border-left-color: var(--status-pending-border); }
.job-card.status-waiting_parts { background: var(--status-waiting_parts-bg); border-left-color: var(--status-waiting_parts-border); }
.job-card.status-on_hold { background: var(--status-on_hold-bg); border-left-color: var(--status-on_hold-border); }
.job-card.status-complete { background: var(--status-complete-bg); border-left-color: var(--status-complete-border); }
.job-card.status-complete.paid { background: var(--status-complete-paid-bg); border-left-color: var(--status-complete-paid-border); }
.job-card.mark-move-requested { background: var(--status-on_hold-bg); border-left-color: var(--status-on_hold-border); color: var(--status-on_hold-ink); }
.job-card.mark-cancelled-unseen { background: var(--surface-sunken); border-left-color: var(--border); color: var(--muted); cursor: pointer; }
.job-card.mark-cancelled-unseen .job-title { text-decoration: line-through; }

.job-time { font-size: var(--text-xs); font-weight: 700; color: var(--accent-dark); }
.job-title-line { display: block; line-height: 1.3; }
.job-title { font-size: var(--text-sm); font-weight: 700; }
.job-subtitle { font-size: var(--text-xs); font-weight: 500; color: var(--muted); margin-left: 5px; }
.job-customer { font-size: var(--text-xs); color: var(--muted); }
.job-mechanic { font-size: var(--text-xs); color: var(--accent-dark); font-weight: 600; }
.job-status-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--status-scheduled-border);
  color: var(--on-brand);
}
.status-pending .job-status-badge { background: var(--status-pending-border); }
.status-waiting_parts .job-status-badge { background: var(--status-waiting_parts-border); }
.status-on_hold .job-status-badge { background: var(--status-on_hold-border); }
.status-complete .job-status-badge { background: var(--status-complete-border); }

.job-mark-label {
  display: block;
  flex-shrink: 0;
  font-size: var(--text-2xs);
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wk-hour-labels {
  position: relative;
  background: var(--panel);
}

.wk-hour-label {
  position: absolute;
  left: 0;
  right: 6px;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.wk-day-col {
  position: relative;
  background-color: var(--panel);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--border) 0,
    var(--border) 1px,
    transparent 1px,
    transparent 48px
  );
  cursor: default;
}
.week-diaries.placing .wk-day-col { cursor: crosshair; }
.wk-day-col.today { background-color: var(--surface-today); }
.wk-day-col.drop-target { background-color: var(--ok-bg); box-shadow: 0 0 0 2px var(--accent) inset; }

.wk-day-col.day-off {
  background-color: var(--hatch-a);
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 7px,
      var(--hatch-b) 7px,
      var(--hatch-b) 14px
    ),
    repeating-linear-gradient(to bottom, var(--border) 0, var(--border) 1px, transparent 1px, transparent 48px);
  cursor: not-allowed;
  pointer-events: none;
}

/* Distinct from day-off (closed) - the shop is open, this mechanic's day
   is just already booked past workshop_settings.full_day_threshold_minutes.
   Portal-only: staff's own diary never applies this class. */
.wk-day-col.day-full {
  background-color: var(--warn-bg);
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 7px,
      var(--hatch-full) 7px,
      var(--hatch-full) 14px
    ),
    repeating-linear-gradient(to bottom, var(--border) 0, var(--border) 1px, transparent 1px, transparent 48px);
  cursor: not-allowed;
  pointer-events: none;
}

.wk-job-block {
  position: absolute;
  left: 3px;
  right: 3px;
  background: var(--status-scheduled-bg);
  border: 1px solid var(--status-scheduled-border);
  border-left: 4px solid var(--status-scheduled-border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.wk-job-block.dragging { z-index: 50; box-shadow: 0 6px 16px rgba(0,0,0,0.2); opacity: 0.92; }
.wk-job-block.status-pending { background: var(--status-pending-bg); border-color: var(--status-pending-border); }
.wk-job-block.status-waiting_parts { background: var(--status-waiting_parts-bg); border-color: var(--status-waiting_parts-border); }
.wk-job-block.status-on_hold { background: var(--status-on_hold-bg); border-color: var(--status-on_hold-border); }
.wk-job-block.status-complete { background: var(--status-complete-bg); border-color: var(--status-complete-border); }
.wk-job-block.status-complete.paid { background: var(--status-complete-paid-bg); border-color: var(--status-complete-paid-border); }
.wk-job-block.mark-move-requested { background: var(--status-on_hold-bg); border-color: var(--status-on_hold-border); color: var(--status-on_hold-ink); }
.wk-job-block.mark-cancelled-unseen { background: var(--surface-sunken); border-color: var(--border); color: var(--muted); cursor: pointer; }
.wk-job-block.mark-cancelled-unseen .job-title { text-decoration: line-through; }

.wk-request-outline {
  position: absolute;
  left: 4px;
  right: 4px;
  border: 2px dashed var(--status-on_hold-border);
  border-radius: 6px;
  background: transparent;
  color: var(--status-on_hold-ink);
  font-size: var(--text-2xs);
  cursor: pointer;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 6px;
  overflow: hidden;
}

.wk-job-block-body {
  flex: 1;
  min-height: 0;
  padding: 3px 6px;
  overflow: hidden;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wk-job-block.dragging .wk-job-block-body { cursor: grabbing; }
.wk-job-block .job-time { font-size: var(--text-2xs); }
.wk-job-block .job-title { font-size: var(--text-xs); }
.wk-job-block .job-subtitle { font-size: var(--text-2xs); }
.wk-job-block .job-customer { font-size: var(--text-2xs); }
.wk-job-block .job-mechanic { font-size: var(--text-2xs); }
.wk-job-block .job-status-badge { font-size: var(--text-2xs); padding: 0 4px; }

.wk-resize-handle {
  height: 6px;
  flex-shrink: 0;
  cursor: ns-resize;
}
.wk-resize-handle:hover { background: rgba(31, 111, 92, 0.25); }

/* ---------- Workshop: month view ---------- */

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.month-dow {
  background: var(--panel);
  padding: 6px 8px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.month-cell {
  background: var(--panel);
  min-height: 92px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: default;
}
.week-diaries.placing .month-cell { cursor: crosshair; }
.week-diaries.placing .month-cell:hover { background: var(--ok-bg); }
.month-cell.today { background: var(--surface-today); }
.month-cell.today .month-cell-date { color: var(--accent-dark); font-weight: 800; }
.month-cell.other-month { background: var(--surface-muted); }
.month-cell.other-month .month-cell-date { color: var(--muted); }

.month-cell.day-off {
  background-color: var(--hatch-a);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 7px, var(--hatch-b) 7px, var(--hatch-b) 14px);
  cursor: not-allowed;
  pointer-events: none;
}

.month-cell-date { font-size: var(--text-sm); font-weight: 700; padding: 1px 2px; }

.month-cell-jobs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

.month-job-chip {
  display: flex;
  gap: 4px;
  align-items: baseline;
  background: var(--status-scheduled-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--status-scheduled-border);
  border-radius: 5px;
  padding: 2px 5px;
  text-align: left;
  font-size: var(--text-xs);
  overflow: hidden;
}
.month-job-chip:hover { border-color: var(--accent); }
.month-job-chip.status-pending { background: var(--status-pending-bg); border-left-color: var(--status-pending-border); }
.month-job-chip.status-waiting_parts { background: var(--status-waiting_parts-bg); border-left-color: var(--status-waiting_parts-border); }
.month-job-chip.status-on_hold { background: var(--status-on_hold-bg); border-left-color: var(--status-on_hold-border); }
.month-job-chip.status-complete { background: var(--status-complete-bg); border-left-color: var(--status-complete-border); }
.month-job-chip.status-complete.paid { background: var(--status-complete-paid-bg); border-left-color: var(--status-complete-paid-border); }
.month-job-chip.mark-move-requested { background: var(--status-on_hold-bg); border-left-color: var(--status-on_hold-border); color: var(--status-on_hold-ink); }
.month-job-chip.mark-cancelled-unseen { background: var(--surface-sunken); border-left-color: var(--border); color: var(--muted); cursor: pointer; }
.month-job-chip.mark-cancelled-unseen .mjc-main { text-decoration: line-through; }
.mjc-time { font-weight: 700; color: var(--accent-dark); flex-shrink: 0; }
.mjc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mjc-main { font-weight: 700; }
.mjc-sub { font-weight: 400; color: var(--muted); }

.month-more-btn {
  border: none;
  background: none;
  padding: 1px 5px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}
.month-more-btn:hover { color: var(--accent-dark); text-decoration: underline; }

.day-job-list { display: flex; flex-direction: column; gap: 6px; }
.day-job-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--status-scheduled-border);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
  background: var(--panel);
}
.day-job-row:hover { border-color: var(--accent); }
.day-job-row.status-pending { border-left-color: var(--status-pending-border); }
.day-job-row.status-waiting_parts { border-left-color: var(--status-waiting_parts-border); }
.day-job-row.status-on_hold { border-left-color: var(--status-on_hold-border); }
.day-job-row.status-complete { border-left-color: var(--status-complete-border); }
.day-job-row.status-complete.paid { border-left-color: var(--status-complete-paid-border); }
.djr-time { font-size: var(--text-sm); font-weight: 700; color: var(--accent-dark); min-width: 66px; }
.djr-title { font-size: var(--text-sm); font-weight: 600; flex: 1; }
.djr-detail { font-size: var(--text-sm); color: var(--muted); }
.djr-status-badge {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--status-scheduled-border);
  color: var(--on-brand);
}
.status-pending .djr-status-badge { background: var(--status-pending-border); }
.status-waiting_parts .djr-status-badge { background: var(--status-waiting_parts-border); }
.status-on_hold .djr-status-badge { background: var(--status-on_hold-border); }
.status-complete .djr-status-badge { background: var(--status-complete-border); }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 30, 25, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  /* The panel colour (--modal-bg). Fields inside keep their --input-border
     edge (.field input/select/textarea), so they read as distinct boxes
     instead of blending into the modal. */
  background: var(--modal-bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.modal.wide { max-width: 640px; }

.modal.job-modal {
  max-width: 1200px;
  width: 94vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
}
.modal.job-modal form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Review pop-up (staff diary): what the customer sent, and Accept / Decline / Seen. */
.modal.review-modal {
  max-width: 560px;
  display: flex;
  flex-direction: column;
}
.review-body { padding: 16px 20px 0; overflow-y: auto; min-height: 0; flex: 1; }
.review-body p { margin: 0 0 8px; }
.review-service { font-size: var(--text-sm); font-weight: 600; margin: 14px 0 6px; }
.review-answer .muted { display: block; }
.review-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.review-photo { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.review-photo.enlarged { width: 100%; height: auto; cursor: zoom-out; }
.review-change { font-weight: 600; }
.review-message { color: var(--danger); margin: 8px 20px 0; }
.review-message:empty { display: none; }
.review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); margin-top: 14px; }
.review-confirm { flex-basis: 100%; margin: 0; }

/* ---------- Sticker printing ---------- */

.sticker-row-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.sticker-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.sticker-row-preview { flex: 0 0 auto; min-width: 96px; display: flex; align-items: center; justify-content: center; }
.sticker-row-info { flex: 1; min-width: 0; }
.sticker-row-name { font-weight: 600; }
.sticker-no-code { font-size: var(--text-sm); text-align: center; }

/* The actual print output - a single #sticker-print-root, hidden on
   screen, filled with one .sticker-page per physical label just before
   window.print() (see printStickers() in app.js). @media print swaps which
   of #app / #sticker-print-root is visible, so the browser's print preview
   shows only the label sheet, sized by the @page rule app.js injects
   dynamically (see setStickerPageSize) - not the app's own chrome. */
#sticker-print-root { display: none; }
@media print {
  #app, #modal-holder { display: none !important; }
  #sticker-print-root { display: block !important; }
}
.sticker-page {
  page-break-after: always;
  box-sizing: border-box;
  padding: 1mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.sticker-page:last-child { page-break-after: auto; }
.sticker-name {
  font-weight: 700;
  font-size: var(--text-xs);
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sticker-price { font-weight: 700; font-size: var(--text-sm); margin: 0.5mm 0; }
.sticker-barcode { line-height: 0; color: var(--ink); }
.sticker-code { font-family: ui-monospace, monospace; font-size: var(--text-2xs); letter-spacing: 0.4px; margin-top: 0.5mm; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h2 { margin: 0; }
.modal-close { border: none; background: none; font-size: var(--text-2xl); color: var(--muted); line-height: 1; padding: 4px; }
.modal-body { padding: 20px; }
.modal.job-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

.wj-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  height: 100%;
  align-items: stretch;
}
.wj-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
}
.wj-notes-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 14px;
}
.wj-items-field {
  flex: 1.2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wj-items-field .cart-items {
  flex: 1;
  min-height: 120px;
  max-height: none;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
}
.wj-items-total {
  text-align: right;
  font-size: var(--text-sm);
  font-weight: 700;
}
.wj-notes-field {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wj-notes-field textarea {
  flex: 1;
  min-height: 140px;
  resize: none;
}

.wj-attachments-field { gap: 6px; }
.attachment-list { display: flex; flex-direction: column; gap: 6px; }
.attachment-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: var(--text-sm);
}
.attachment-row a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-dark); }
.attachment-row .muted { font-size: var(--text-sm); white-space: nowrap; }
.attachment-list .empty-cart { padding: 10px 0; }

.wj-body-grid.wj-locked .field input,
.wj-body-grid.wj-locked .field select,
.wj-body-grid.wj-locked .field textarea {
  background: var(--surface-disabled);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}
.wj-body-grid.wj-locked .field label { color: var(--muted); }
.wj-body-grid.wj-locked .search-wrap,
.wj-body-grid.wj-locked #wj-new-customer-form,
.wj-body-grid.wj-locked #wj-new-bike-form { pointer-events: none; }

/* Receipt */
.receipt { font-family: "Courier New", Courier, monospace; font-size: var(--text-sm); }
.receipt .rline { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.receipt hr { border: none; border-top: 1px dashed var(--border); margin: 10px 0; }
.receipt .rtotal { font-weight: 800; font-size: var(--text-lg); }
.receipt-header { text-align: center; margin-bottom: 10px; }
.receipt-header .shop-name { font-weight: 800; font-size: var(--text-lg); }

.error-banner {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: var(--text-sm);
  margin-bottom: 14px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--on-brand);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: var(--text-base);
  box-shadow: var(--shadow);
  z-index: 100;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: var(--text-sm);
}

.link-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent-dark);
  text-align: left;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: var(--text-sm); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-value { font-size: var(--text-base); font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

/* ---------- Auth screen ---------- */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: var(--text-xl);
  margin-bottom: 20px;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: var(--panel);
  color: var(--muted);
  padding: 9px 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active { background: var(--accent); color: var(--on-brand); }
.auth-tab:not(.active):hover { background: var(--hover-bg); }
