/* The Sandbox: the TARMAC screens drawn the way unifiequipment.com draws them.
 * Theme tokens are copied from the app's src/app/globals.css (light under
 * :root, dark under .dark; the app starts dark). Component rules follow the
 * Tailwind classes of the components they mirror, named in each section. */

:root {
  --background: oklch(0.99 0 0);
  --foreground: oklch(0.21 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.21 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.21 0 0);
  --primary: #B42025;
  --primary-foreground: oklch(0.99 0 0);
  --secondary: oklch(0.962 0 0);
  --secondary-foreground: oklch(0.25 0 0);
  --muted: oklch(0.965 0 0);
  --muted-foreground: oklch(0.45 0 0);
  --accent: oklch(0.962 0 0);
  --accent-foreground: oklch(0.25 0 0);
  --border: oklch(0.9 0 0);
  --input: oklch(0.87 0 0);
  --ring: #B42025;
  --success: #0F7B45;
  --success-foreground: #ffffff;
  --warning: #A16207;
  --warning-foreground: #ffffff;
  --danger: #B91C1C;
  --danger-foreground: #ffffff;
  --info: #0369A1;
  --info-foreground: #ffffff;
  --parts: #2E7D5B;
  --parts-foreground: #ffffff;
  --hazard: #FACC15;
  --hazard-foreground: #111111;
  --destructive: var(--danger);
  --logo-red-hi: #E52637;
  --logo-red-mid: #C3212A;
  --logo-red-lo: #B01E24;
  --logo-gold-hi: #F1E99F;
  --logo-gold-mid: #B6AB72;
  --logo-gold-lo: #83764C;
  --logo-word-hi: #C9B669;
  --logo-word-lo: #AE9A55;
  --amber: #f59e0b;
  --amber-text: #92400e;
  --radius: 0.625rem;
  --r-md: calc(var(--radius) - 2px);
  --r-lg: var(--radius);
  --r-xl: calc(var(--radius) + 4px);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --success: #34D399;
  --success-foreground: #05261A;
  --warning: #FBBF24;
  --warning-foreground: #2A1E00;
  --danger: #F87171;
  --danger-foreground: #3A0D0D;
  --info: #38BDF8;
  --info-foreground: #062A3A;
  --parts: #52A277;
  --parts-foreground: #06261A;
  --logo-red-hi: #EE2A3B;
  --logo-red-mid: #CC2430;
  --logo-red-lo: #BE2129;
  --logo-gold-hi: #F3EBA6;
  --logo-gold-mid: #C0B47B;
  --logo-gold-lo: #8E8155;
  --logo-word-hi: #D3C070;
  --logo-word-lo: #B8A159;
  --amber-text: #fcd34d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-foreground); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.95); } }
@keyframes ping { 75%, 100% { transform: scale(2.5); opacity: 0; } }

/* ------------------------------------------------------------- navbar
 * Navbar.tsx: a floating bar, the wordmark in its own capsule, the six
 * section tabs that spell it in another, the account menu beside them. */
.nav {
  position: sticky; top: 0; z-index: 40; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--background) 90%, transparent), transparent);
}
.nav-row { margin: 0 auto; display: flex; height: 64px; max-width: 80rem; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px; }
.capsule {
  border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: color-mix(in oklab, var(--card) 85%, transparent);
  box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}
.nav-brand { display: flex; height: 42px; align-items: center; gap: 4px; border-radius: var(--r-xl); padding: 0 12px 0 4px; }
.nav-brand .logo { height: 24px; width: auto; display: block; }
.nav-burger { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: var(--r-lg); color: var(--muted-foreground); }
.nav-burger:hover { background: var(--muted); color: var(--foreground); }
.nav-burger svg { width: 20px; height: 20px; }
.nav-right { display: none; align-items: center; gap: 8px; pointer-events: auto; }
.nav-tabs { display: flex; align-items: center; gap: 2px; border-radius: var(--r-xl); padding: 4px; }
.nav-tab-wrap { position: relative; }
.nav-tab {
  display: inline-flex; height: 32px; align-items: center; gap: 6px; white-space: nowrap; border-radius: var(--r-lg);
  padding: 0 8px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-foreground); transition: background-color .15s, color .15s;
}
.nav-tab:hover, .nav-tab[aria-expanded="true"] { background: color-mix(in oklab, var(--muted) 60%, transparent); color: var(--foreground); }
.nav-tab.active { background: var(--muted); color: var(--foreground); }
.nav-tab .initial { font-weight: 700; color: var(--logo-word-hi); }
.nav-tab.active .initial { color: var(--logo-red-hi); }
.nav-tab.off { cursor: not-allowed; opacity: .4; }
.nav-tab.off:hover { background: transparent; color: var(--muted-foreground); }
.nav-tab svg { width: 14px; height: 14px; }
.nav-submit {
  margin-left: 4px; display: inline-flex; height: 32px; align-items: center; gap: 6px; white-space: nowrap; border-radius: var(--r-lg);
  background: var(--primary); padding: 0 10px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--primary-foreground);
}
.nav-submit:hover { background: color-mix(in oklab, var(--primary) 85%, transparent); }
.nav-submit svg { width: 14px; height: 14px; }
.nav-submit-bar { display: inline-flex; height: 42px; border-radius: var(--r-xl); padding: 0 14px; pointer-events: auto; margin-left: auto; }
.nav-account { position: relative; }
.nav-account > button { display: flex; height: 42px; white-space: nowrap; align-items: center; gap: 8px; border-radius: var(--r-xl); padding: 0 10px 0 6px; font-size: 14px; font-weight: 500; }
.nav-account .avatar { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 9999px; background: var(--muted); font-size: 12px; font-weight: 600; }
.pop {
  position: absolute; top: calc(100% + 8px); z-index: 60; min-width: 12rem; display: flex; flex-direction: column;
  border-radius: var(--r-lg); background: var(--popover); color: var(--popover-foreground); padding: 4px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
}
.pop.right { right: 0; }
.pop-item { display: flex; height: 36px; align-items: center; gap: 8px; border-radius: var(--r-lg); padding: 0 12px; font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap; }
.pop-item:hover { background: var(--muted); }
.pop-item.current { color: var(--primary); }
.pop-item.off { cursor: not-allowed; color: var(--muted-foreground); opacity: .5; }
.pop-item.off:hover { background: transparent; }
.pop-head { padding: 8px 12px 4px; font-size: 12px; color: var(--muted-foreground); }
.pop-sep { height: 1px; margin: 4px -4px; background: var(--border); }
.mobile-menu { pointer-events: auto; margin: 0 auto; max-width: 80rem; padding: 0 16px 8px; }
.mobile-menu .capsule { border-radius: var(--r-xl); padding: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.mobile-menu .sec { padding: 8px 12px 2px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
@media (min-width: 1024px) {
  .nav-burger, .nav-submit-bar, .mobile-menu { display: none !important; }
  .nav-right { display: flex; }
  .nav-brand { padding-left: 12px; }
}
@media (min-width: 1280px) { .nav-tab { padding: 0 12px; } .nav-submit { padding: 0 12px; } }

/* The Sandbox strip under the bar, cut like the app's "Viewing as" strip. */
.strip-row { pointer-events: auto; margin: 0 auto; max-width: 80rem; padding: 0 16px 8px; }
.strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  border-radius: var(--r-xl); border: 1px solid color-mix(in oklab, var(--amber) 40%, transparent);
  background: color-mix(in oklab, var(--amber) 10%, var(--background)); padding: 6px 12px; font-size: 13px; color: var(--amber-text);
}
.strip .lead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.strip strong { font-weight: 600; }
.strip a { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.strip .reset { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ primitives
 * components/ui: Button, Input, Textarea, Select, Card, Badge, Dialog. */
.btn {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px;
  border-radius: var(--r-lg); border: 1px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s; user-select: none;
}
.btn:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 85%, transparent); }
.btn-outline { border-color: var(--border); background: var(--background); }
.btn-outline:hover { background: var(--muted); }
.dark .btn-outline { border-color: var(--input); background: color-mix(in oklab, var(--input) 30%, transparent); }
.dark .btn-outline:hover { background: color-mix(in oklab, var(--input) 50%, transparent); }
.btn-ghost:hover { background: var(--muted); }
.dark .btn-ghost:hover { background: color-mix(in oklab, var(--muted) 50%, transparent); }
.btn-sm { height: 28px; padding: 0 10px; border-radius: var(--r-md); font-size: 13px; gap: 4px; }
.btn-icon { width: 28px; height: 28px; padding: 0; }
.btn-tall { height: 48px; font-size: 16px; padding: 0 16px; }
.btn-dialog { height: 44px; padding: 0 16px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-shadow { box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
@media (min-width: 640px) { .btn-tall { height: 44px; } .btn-tall.sm-short { height: 40px; font-size: 14px; } }

.input, .textarea, .select-trigger {
  width: 100%; min-width: 0; border-radius: var(--r-lg); border: 1px solid var(--input); background: transparent;
  font-size: 16px; transition: border-color .15s, box-shadow .15s; outline: none;
}
.input { height: 32px; padding: 4px 10px; }
.textarea { display: flex; min-height: 64px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.input:focus-visible, .textarea:focus-visible, .select-trigger:focus-visible {
  border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}
.input:disabled, .textarea:disabled, .select-trigger:disabled { cursor: not-allowed; opacity: .5; background: color-mix(in oklab, var(--input) 50%, transparent); }
.input[aria-invalid="true"] { border-color: var(--destructive); box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent); }
.dark .input, .dark .textarea, .dark .select-trigger { background: color-mix(in oklab, var(--input) 30%, transparent); }
.dark .select-trigger:hover:not(:disabled) { background: color-mix(in oklab, var(--input) 50%, transparent); }
.dark .input:disabled, .dark .textarea:disabled { background: color-mix(in oklab, var(--input) 80%, transparent); }
.input.tall, .select-trigger.tall { height: 48px; }
.input.search { padding-left: 32px; }
@media (min-width: 768px) { .input, .textarea, .select-trigger { font-size: 14px; } }
@media (min-width: 640px) { .input.tall, .select-trigger.tall { height: 44px; } }
.field-icon { position: relative; }
.field-icon > svg { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.field-icon > svg.right { left: auto; right: 12px; color: var(--success); }

.select { position: relative; }
.select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 32px; padding: 8px 8px 8px 10px; white-space: nowrap; text-align: left; font-size: 14px; }
.select-trigger .value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.select-trigger.placeholder .value { color: var(--muted-foreground); }
.select-trigger svg { color: var(--muted-foreground); }
.select-list {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; width: 100%; min-width: 9rem; max-height: min(60vh, 22rem); overflow-y: auto;
  border-radius: var(--r-lg); background: var(--popover); color: var(--popover-foreground); padding: 4px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / .1);
}
.select-list.fit { width: max-content; max-width: 90vw; }
.select-label { padding: 4px 6px; font-size: 12px; color: var(--muted-foreground); }
.select-item {
  position: relative; display: flex; width: 100%; align-items: center; gap: 6px; border-radius: var(--r-md);
  padding: 4px 32px 4px 6px; font-size: 14px; text-align: left; min-height: 30px;
}
.select-item:hover, .select-item:focus-visible { background: var(--accent); outline: none; }
.select-item svg { position: absolute; right: 8px; }

.card {
  display: flex; flex-direction: column; gap: 16px; overflow: hidden; border-radius: var(--r-xl); background: var(--card);
  color: var(--card-foreground); padding: 16px 0; font-size: 14px; box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
}
.card-pad { padding: 0 16px; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.card-desc { font-size: 14px; color: var(--muted-foreground); }
.card-xl { box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); }

.badge {
  display: inline-flex; height: 20px; width: fit-content; flex-shrink: 0; align-items: center; justify-content: center; gap: 4px;
  overflow: hidden; border-radius: 9999px; border: 1px solid transparent; padding: 2px 8px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge.secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge.outline { border-color: var(--border); }
.badge .trunc { overflow: hidden; text-overflow: ellipsis; }

.overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; overflow-y: auto; padding: 16px;
  background: rgb(0 0 0 / .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.dialog {
  position: relative; width: 100%; max-width: 28rem; border: 1px solid var(--border); background: var(--background);
  padding: 24px; border-radius: var(--r-xl); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
}
.dialog.sm { max-width: 24rem; }
.dialog.lg { max-width: 36rem; }
.dialog-title { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0; }
.dialog-desc { margin-top: 8px; font-size: 14px; color: var(--muted-foreground); }
.dialog-desc .em-danger { font-weight: 600; color: var(--destructive); }
.dialog-desc .em { font-weight: 500; color: var(--foreground); }
.dialog-footer { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.alert-row { display: flex; align-items: flex-start; gap: 12px; }
.alert-icon { display: flex; width: 40px; height: 40px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 9999px; }
.alert-icon svg { width: 20px; height: 20px; }
.alert-icon.danger { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }
.alert-icon.warning { background: color-mix(in oklab, var(--warning) 10%, transparent); color: var(--warning); }
.on-file { margin-top: 12px; border-radius: var(--r-md); border: 1px solid color-mix(in oklab, var(--border) 40%, transparent); background: color-mix(in oklab, var(--muted) 30%, transparent); padding: 8px; font-size: 12px; color: var(--muted-foreground); }
.on-file b { font-weight: 600; color: var(--foreground); }

.error-box { padding: 12px; font-size: 14px; font-weight: 500; color: var(--destructive); background: color-mix(in oklab, var(--destructive) 10%, transparent); border: 1px solid color-mix(in oklab, var(--destructive) 20%, transparent); border-radius: var(--r-md); }

.page { margin: 0 auto; width: 100%; padding: 24px 16px; }
.page.w-2xl { max-width: 42rem; }
.page.w-4xl { max-width: 56rem; padding-top: 32px; padding-bottom: 32px; }
.page.w-5xl { max-width: 64rem; }
@media (min-width: 640px) { .page { padding-top: 40px; padding-bottom: 40px; } }

/* --------------------------------------------------------- submit page
 * app/submit/page.tsx */
.form { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 640px) { .form { gap: 24px; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.eq-list {
  position: absolute; z-index: 20; margin-top: 4px; width: 100%; max-height: 16rem; overflow-y: auto; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--popover); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}
.eq-item { display: flex; width: 100%; align-items: center; gap: 8px; padding: 12px; text-align: left; font-size: 14px; }
.eq-item:hover { background: var(--muted); }
.eq-item .id { font-family: var(--font-mono); font-weight: 500; }
.eq-item .desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-foreground); }
.eq-empty { padding: 8px 12px; font-size: 14px; color: var(--muted-foreground); }
@media (min-width: 640px) { .eq-item { padding: 8px 12px; } }
.success { text-align: center; padding: 24px 0; }
.success .emoji { font-size: 60px; line-height: 1; margin-bottom: 16px; }
.success-title { font-size: 20px; font-weight: 600; }
.success-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
@media (min-width: 640px) { .success-title { font-size: 24px; } .success-actions { flex-direction: row; justify-content: center; } }

/* ---------------------------------------------------- equipment status
 * components/TicketsBoard.tsx, StatPanel.tsx, glowing-badge.tsx */
.statpanel { gap: 0; padding: 0; margin-bottom: 20px; }
@media (min-width: 640px) { .statpanel { margin-bottom: 32px; } }
.statpanel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); background: color-mix(in oklab, var(--muted) 30%, transparent); padding: 8px 12px; }
@media (min-width: 640px) { .statpanel-head { padding: 10px 16px; } }
.switcher { display: inline-flex; align-items: center; gap: 2px; border-radius: var(--r-lg); border: 1px solid color-mix(in oklab, var(--border) 60%, transparent); background: color-mix(in oklab, var(--muted) 40%, transparent); padding: 2px; }
.switcher button { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-md); padding: 4px 10px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.switcher button svg { width: 14px; height: 14px; }
.switcher button.on { background: var(--background); color: var(--foreground); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / .05); }
.switcher button:disabled { opacity: .5; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: color-mix(in oklab, var(--border) 60%, transparent); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; min-height: 5.25rem; flex-direction: column; background: var(--card); padding: 12px; }
@media (min-width: 640px) { .stat { min-height: 10rem; padding: 16px; } }
@media (min-width: 1024px) { .stat { min-height: 9rem; } }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.stat-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.stat-top svg { opacity: .7; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .stat-label { font-size: 12px; } .stat-top { margin-bottom: 8px; } .stat-value { font-size: 30px; } }
.t-info { color: var(--info); } .t-warning { color: var(--warning); } .t-parts { color: var(--parts); } .t-success { color: var(--success); }
.stat .none { font-size: 14px; color: color-mix(in oklab, var(--success) 60%, transparent); }
.board-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); background: color-mix(in oklab, var(--muted) 30%, transparent); padding: 6px; }
@media (min-width: 640px) { .board-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.board-tab { display: flex; min-height: 44px; flex: 1 0 auto; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; border-radius: var(--r-lg); padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); transition: all .15s; }
.board-tab:hover:not(:disabled) { color: var(--foreground); }
.board-tab.on { background: var(--background); color: var(--foreground); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / .05); }
.board-tab:disabled { opacity: .45; }
.count { border-radius: 9999px; padding: 2px 6px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: color-mix(in oklab, var(--muted-foreground) 10%, transparent); color: var(--muted-foreground); }
.on > .count, .count.on { background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); }
.board-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); padding: 12px; }
.board-filters .full { grid-column: span 2; }
.board-filters .search-cell { grid-column: span 2; order: -1; }
.board-filters .input, .board-filters .select-trigger { min-height: 40px; }
.layout-toggle { display: inline-flex; min-height: 40px; width: 40px; align-items: center; justify-content: center; border-radius: var(--r-lg); border: 1px solid var(--input); color: var(--muted-foreground); }
.layout-toggle:hover, .layout-toggle[aria-pressed="true"] { background: var(--muted); color: var(--foreground); }
.dark .layout-toggle { background: color-mix(in oklab, var(--input) 30%, transparent); }
.dark .layout-toggle[aria-pressed="true"] { background: color-mix(in oklab, var(--input) 60%, transparent); }
@media (min-width: 640px) {
  .board-filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .board-filters .full { grid-column: auto; }
  .board-filters .search-cell { order: 0; flex: 1; min-width: 200px; }
  .board-filters .input, .board-filters .select-trigger { min-height: 0; }
  .board-filters .select-trigger { width: auto; min-width: 9rem; }
  .layout-toggle { min-height: 0; width: 32px; height: 32px; }
}
.picker-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.picker-row .select-trigger { width: auto; font-weight: 600; }

.cards { display: grid; gap: 12px; }
.cards.list { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) { .cards { gap: 16px; } }
@media (min-width: 768px) { .cards:not(.list) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tcard {
  position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; min-width: 0; overflow: hidden; cursor: pointer;
  border-radius: var(--r-xl); background: linear-gradient(to bottom, var(--card), color-mix(in oklab, var(--card) 80%, transparent));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  transition: transform .2s, box-shadow .2s; font-size: 14px;
}
.dark .tcard { box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .4); }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 20%, transparent), 0 20px 25px -5px rgb(0 0 0 / .15), 0 8px 10px -6px rgb(0 0 0 / .15); }
.rail { pointer-events: none; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; }
.wash { pointer-events: none; position: absolute; left: 0; right: 0; top: 0; height: 80px; }
.tone-OPEN { --tone: var(--info); }
.tone-IN_PROGRESS { --tone: var(--warning); }
.tone-WAITING_ON_PARTS { --tone: var(--parts); }
.tone-COMPLETED { --tone: var(--success); }
.rail { background: var(--tone); box-shadow: 0 0 8px 0 color-mix(in oklab, var(--tone) 35%, transparent); }
.wash { background: linear-gradient(to bottom, color-mix(in oklab, var(--tone) 6%, transparent), transparent); }
.tcard-head { position: relative; border-bottom: 1px solid color-mix(in oklab, var(--border) 10%, transparent); padding: 16px 16px 8px 20px; }
.tcard-head-row { display: flex; min-height: 56px; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tcard-left { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.tcard-right { margin-left: auto; display: flex; min-width: 0; flex-direction: column; align-items: flex-end; gap: 4px; }
.tcard-ids { display: flex; max-width: 100%; flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
@media (min-width: 640px) { .tcard-ids { flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; } }
.unit-pill {
  display: inline-flex; height: 28px; flex-shrink: 0; align-items: center; border-radius: 9999px; border: 1px solid color-mix(in oklab, var(--tone) 45%, transparent);
  background: color-mix(in oklab, var(--tone) 15%, transparent); color: var(--tone); padding: 0 10px; font-family: var(--font-mono);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.025em; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
}
.eqtype { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.eqtype svg { width: 12px; height: 12px; }
.eqtype span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-body { position: relative; flex: 1; padding: 4px 16px 0 20px; }
.tcard-body p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.625; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 768px) { .tcard-body p { min-height: 2.875rem; } }
.tcard-chat { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 16px 4px 20px; }
.tcard-chat .last { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted-foreground); }
.tcard-chat .last b { font-weight: 600; }
.chat-btn { display: flex; align-items: center; gap: 6px; border-radius: var(--r-md); padding: 6px 10px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); border: 1px solid transparent; }
.chat-btn:hover { color: var(--foreground); background: color-mix(in oklab, var(--muted) 50%, transparent); }
.chat-btn .n { display: inline-flex; height: 16px; min-width: 16px; align-items: center; justify-content: center; border-radius: 9999px; padding: 0 4px; font-size: 10px; font-weight: 700; background: var(--muted); }
.tcard-foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; border-top: 1px solid color-mix(in oklab, var(--border) 20%, transparent); background: color-mix(in oklab, var(--muted) 30%, transparent); padding: 8px 16px 8px 20px; font-size: 11px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.tcard-foot .loc { display: flex; min-width: 0; align-items: center; gap: 4px; }
.tcard-foot .loc svg { width: 14px; height: 14px; }
.tcard-foot .loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trow { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; border-radius: var(--r-xl); border: 1px solid color-mix(in oklab, var(--border) 70%, transparent); background: var(--card); padding: 10px 12px 10px 16px; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .05); transition: border-color .15s, transform .15s; }
.trow:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--primary) 40%, transparent); }
.trow .main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.trow .chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.trow .desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.trow .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted-foreground); }
.trow .meta .loc { display: flex; align-items: center; gap: 4px; }
.trow .meta svg { width: 14px; height: 14px; }
.trow .side { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11px; color: var(--muted-foreground); }

.gbadge { position: relative; display: inline-flex; }
.gbadge .glow { position: absolute; inset: 0; border-radius: 9999px; filter: blur(6px); opacity: .6; background: var(--tone); }
.gbadge .face { position: relative; display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 4px 12px; font-size: 12px; font-weight: 500; background: var(--tone); color: var(--tone-fg); }
.gbadge .dot { position: relative; display: flex; width: 6px; height: 6px; flex-shrink: 0; }
.gbadge .dot span { position: absolute; inset: 0; border-radius: 9999px; background: var(--tone-fg); }
.gbadge .dot .ping { animation: ping 2s ease-in-out infinite; opacity: .75; }
.gbadge svg { width: 12px; height: 12px; }
.tone-OPEN { --tone-fg: var(--info-foreground); }
.tone-IN_PROGRESS { --tone-fg: var(--warning-foreground); }
.tone-WAITING_ON_PARTS { --tone-fg: var(--parts-foreground); }
.tone-COMPLETED { --tone-fg: var(--success-foreground); }
.status-btn { position: relative; border-radius: 9999px; }
.status-btn::before { content: ""; position: absolute; inset: -6px -8px; }
.status-menu { position: absolute; top: 100%; z-index: 30; margin-top: 8px; width: 14rem; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--popover); color: var(--popover-foreground); box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); }
.status-menu.end { right: 0; }
.status-menu .head { padding: 12px 16px 4px; font-size: 12px; color: var(--muted-foreground); }
.status-menu .item { display: flex; min-height: 48px; width: 100%; align-items: center; gap: 12px; padding: 0 16px; text-align: left; font-size: 16px; }
.status-menu .item:hover:not(:disabled) { background: var(--muted); }
.status-menu .item:disabled { opacity: .5; }
.status-menu .item + .item { border-top: 1px solid var(--border); }
.status-menu .item small { display: block; font-size: 12px; color: var(--muted-foreground); }

.wochip { display: inline-flex; height: 28px; align-items: center; gap: 6px; border-radius: var(--r-md); border: 1px solid color-mix(in oklab, var(--border) 70%, transparent); background: color-mix(in oklab, var(--background) 70%, transparent); padding: 0 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; color: color-mix(in oklab, var(--foreground) 90%, transparent); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.wochip:hover { border-color: color-mix(in oklab, var(--foreground) 30%, transparent); background: var(--muted); }
.wochip svg { width: 12px; height: 12px; color: var(--muted-foreground); }
.wochip.none { border-style: dashed; background: transparent; color: var(--muted-foreground); font-family: var(--font-sans); box-shadow: none; cursor: default; }
@media (min-width: 640px) { .wochip { height: 24px; } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; text-align: center; }
.empty .ring { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 9999px; background: var(--muted); color: var(--muted-foreground); }
.empty .ring svg { width: 20px; height: 20px; }
.empty .t { font-weight: 600; }
.empty .d { font-size: 14px; color: var(--muted-foreground); }

/* Ticket detail (the card opens the chat dialog in the app). */
.thread { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; }
.msg { border-radius: var(--r-lg); background: var(--muted); padding: 8px 12px; font-size: 14px; }
.msg .who { font-size: 12px; font-weight: 600; }
.msg .when { font-size: 11px; color: var(--muted-foreground); margin-left: 6px; font-weight: 400; }
.msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.first { background: color-mix(in oklab, var(--info) 10%, transparent); }
.note { margin-top: 12px; font-size: 12px; color: var(--muted-foreground); }

/* -------------------------------------------------------- work orders
 * app/work-orders/page.tsx */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.pick {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: 8px 12px; text-align: left; transition: background-color .15s;
}
.pick:hover { background: var(--muted); }
.pick.col { flex-direction: column; align-items: flex-start; gap: 2px; }
.pick.active { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 5%, transparent); }
.pick .t { font-size: 14px; font-weight: 600; }
.pick .d { font-size: 12px; color: var(--muted-foreground); }
.pick .x { font-size: 11px; color: color-mix(in oklab, var(--muted-foreground) 70%, transparent); }
.pick .row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.pick svg { color: var(--muted-foreground); }
.pick.active svg { color: var(--primary); }
.wo-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: var(--r-xl); border: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 40%, transparent); padding: 4px; }
.wo-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r-lg); padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.wo-tabs button.on { background: var(--background); color: var(--foreground); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / .05); }
.wo-row { display: flex; width: 100%; align-items: center; gap: 12px; border-radius: var(--r-xl); border: 1px solid color-mix(in oklab, var(--border) 70%, transparent); background: var(--card); padding: 12px 16px; text-align: left; box-shadow: 0 1px 2px rgb(0 0 0 / .05); transition: all .15s; }
.wo-row:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--primary) 40%, transparent); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1); }
.wo-row .main { min-width: 0; flex: 1; }
.wo-row .l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wo-row .l2 { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.wo-row .l2 .box { border-radius: 4px; border: 1px solid var(--border); padding: 2px 6px; }
.wo-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted-foreground); }
.wo-row .side { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.wo-row > svg { color: color-mix(in oklab, var(--muted-foreground) 40%, transparent); }
.owner-chip { border-radius: 9999px; border: 1px solid; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.asset-chip { border-radius: var(--r-md); background: color-mix(in oklab, var(--primary) 10%, transparent); padding: 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .025em; color: var(--primary); font-variant-numeric: tabular-nums; }
.status-chip { display: inline-block; border-radius: 9999px; border: 1px solid color-mix(in oklab, var(--warning) 30%, transparent); background: color-mix(in oklab, var(--warning) 10%, transparent); padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--warning); }
.find-row { display: flex; gap: 8px; }

/* ------------------------------------------------------------ wizard
 * components/WorkOrderWizard.tsx */
.wiz-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgb(0 0 0 / .5); padding: 16px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.wiz { display: flex; max-height: 90vh; width: 100%; max-width: 42rem; flex-direction: column; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--background); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25); }
.wiz-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 16px 20px; }
.wiz-head .l { display: flex; min-width: 0; align-items: center; gap: 8px; }
.wiz-head .l > svg { width: 20px; height: 20px; color: var(--primary); }
.wiz-head h2 { margin: 0; flex-shrink: 0; font-size: 16px; font-weight: 600; }
.wiz-head .eq { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: var(--r-md); background: var(--muted); padding: 2px 8px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.wiz-head .eq span { opacity: .7; }
.wiz-steps { display: flex; align-items: center; gap: 4px; padding: 16px 20px 0; }
.wiz-step { display: flex; flex: 1; align-items: center; gap: 4px; }
.wiz-step .n { display: flex; width: 24px; height: 24px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 9999px; font-size: 12px; font-weight: 600; background: var(--muted); color: var(--muted-foreground); transition: background-color .15s; }
.wiz-step .n.on { background: var(--primary); color: var(--primary-foreground); }
.wiz-step .n svg { width: 14px; height: 14px; }
.wiz-step .lbl { display: none; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.wiz-step .lbl.on { color: var(--foreground); }
.wiz-step .bar { margin: 0 4px; height: 1px; flex: 1; background: var(--border); }
@media (min-width: 640px) { .wiz-step .lbl { display: inline-block; } }
.wiz-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding: 16px 20px; }
.wiz label.l, .wiz .l-label { font-size: 14px; font-weight: 500; }
.wiz .l-label .opt { font-weight: 400; color: var(--muted-foreground); }
.wiz .req { color: var(--destructive); }
.wiz .help { font-size: 12px; color: var(--muted-foreground); margin: 0; }
.wiz-error { margin-bottom: 16px; display: flex; align-items: flex-start; gap: 8px; border-radius: var(--r-lg); border: 1px solid color-mix(in oklab, var(--destructive) 30%, transparent); background: color-mix(in oklab, var(--destructive) 10%, transparent); padding: 8px 12px; font-size: 14px; color: var(--destructive); }
.wiz-error svg { margin-top: 2px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border-radius: var(--r-lg); border: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 40%, transparent); padding: 4px; }
.seg button { border-radius: var(--r-md); padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); transition: all .15s; }
.seg button:hover { color: var(--foreground); }
.seg button.on { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.chip-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: var(--r-lg); border: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 40%, transparent); padding: 8px 12px; }
.chip-row.sel { border-color: color-mix(in oklab, var(--primary) 40%, transparent); background: color-mix(in oklab, var(--primary) 5%, transparent); }
.chip-row .k { font-size: 12px; color: var(--muted-foreground); }
.chip-row .v { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-row .v span { font-weight: 400; color: var(--muted-foreground); }
.chip-row .col { display: flex; min-width: 0; flex-direction: column; }
.scroll-56 { max-height: 14rem; overflow-y: auto; }
.scroll-64 { max-height: 16rem; overflow-y: auto; }
.scroll-48 { max-height: 12rem; overflow-y: auto; }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px 0; font-size: 14px; color: var(--muted-foreground); }
.empty-row { padding: 24px 0; text-align: center; font-size: 14px; color: var(--muted-foreground); margin: 0; }
.meter-box { display: flex; flex-direction: column; gap: 6px; border-radius: var(--r-lg); border: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 30%, transparent); padding: 12px; }
.meter-box .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meter-box .cur { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.meter-box .bad { margin: 0; font-size: 12px; color: var(--destructive); }
.check-label { display: flex; cursor: pointer; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.check-label input { width: 14px; height: 14px; accent-color: var(--primary); }
.group-head { position: sticky; top: 0; background: var(--background); padding: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.review { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.review div { display: flex; gap: 12px; }
.review dt { width: 7rem; flex-shrink: 0; color: var(--muted-foreground); }
.review dd { margin: 0; flex: 1; font-weight: 500; overflow-wrap: anywhere; white-space: pre-wrap; }
.tech-block { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.pin-input { max-width: 10rem; letter-spacing: .1em; }
.sandbox-hint { margin: 0; font-size: 12px; color: var(--amber-text); }
.done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 0; text-align: center; }
.done > svg { width: 48px; height: 48px; color: var(--primary); }
.done h3 { margin: 0; font-size: 18px; font-weight: 600; }
.done p { margin: 0; font-size: 14px; color: var(--muted-foreground); }

/* Toast: the Sandbox was reset while the page was open. */
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 80; transform: translateX(-50%); max-width: calc(100vw - 32px); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--popover); padding: 10px 14px; font-size: 14px; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .2); }

/* Before the board is loaded, or when the Sandbox cannot run. */
.blocker { margin: 64px auto; max-width: 32rem; padding: 0 16px; text-align: center; }
.blocker h1 { font-size: 22px; margin: 0 0 8px; }
.blocker p { color: var(--muted-foreground); margin: 0 0 16px; }

/* ------------------------------------------------------------- helpers */
.flex { display: flex; align-items: center; }
.t-primary { color: var(--primary); }
.phone { display: inline; }
.wide { display: none; }
@media (min-width: 640px) { .phone { display: none; } .wide { display: inline; } }
/* A card whose selects open over what follows it. The app's lists float in
 * a portal; here they stay in the card, so it does not clip them. */
.card.open, .statpanel { overflow: visible; }
.statpanel-head { border-radius: var(--r-xl) var(--r-xl) 0 0; }
/* A card with its status menu open sits above the cards after it. */
.tcard.menu-open, .trow.menu-open { overflow: visible; z-index: 20; }
/* Between lg and xl the six tabs, the ticket button and the account share the
 * row, so the account shows its initials alone. */
.nav-account .who { display: none; }
@media (min-width: 1280px) { .nav-account .who { display: inline; } }

/* Animated in only when they first appear (enter() in sandbox.js). */
.overlay.enter, .wiz-back.enter { animation: fade-in .15s; }
.dialog.enter, .wiz.enter { animation: zoom-in .15s; }
.pop.enter, .select-list.enter, .status-menu.enter { animation: zoom-in .1s ease-out; }
.toast.enter { animation: fade-in .15s; }

/* ---- Work Orders page (app/work-orders/page.tsx): the heading with the two
   ways to start a job, the station + finder bar, the station's summary, the
   tabs with their filters, and the rows. ---- */
.t-gold { color: var(--logo-word-hi); }
.wo-page { padding-top: 24px; padding-bottom: 32px; }
.wo-head { margin-bottom: 20px; display: flex; flex-direction: column; gap: 16px; }
.wo-head h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.wo-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted-foreground); }
.wo-head .code, .station-tile .code { font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; color: var(--logo-word-hi); }
.wo-head-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.wo-head-actions .btn { height: 42px; padding: 0 12px; flex-grow: 1; }
.btn-gold { border-color: color-mix(in oklab, var(--logo-word-hi) 50%, transparent); color: var(--logo-word-hi); }
.dark .btn-gold { border-color: color-mix(in oklab, var(--logo-word-hi) 40%, transparent); background: color-mix(in oklab, var(--logo-word-hi) 5%, transparent); }
.btn-square { width: 42px; height: 42px; padding: 0; flex-shrink: 0; }
@media (min-width: 640px) {
  .wo-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .wo-head h1 { font-size: 30px; }
  .wo-head-actions { flex-wrap: nowrap; }
  .wo-head-actions .btn { flex-grow: 0; }
}
.bar-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); }
.bar-label svg.i { width: 14px; height: 14px; }
.wo-bar { position: relative; margin-bottom: 16px; padding: 0; gap: 0; overflow: visible; }
.wo-bar-line { display: block; height: 2px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: linear-gradient(to right, var(--primary), color-mix(in oklab, var(--logo-word-hi) 80%, transparent) 30%, transparent); }
.wo-bar-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.wo-bar-cell { min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wo-bar-cell + .wo-bar-cell { border-top: 1px solid var(--border); }
.wo-bar .select-trigger, .wo-bar .input, .wo-bar .find-row .btn, .wo-search .input { height: 42px; }
.wo-bar .select-trigger { width: 100%; letter-spacing: .06em; }
.wo-bar-outcome { border-top: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 20%, transparent); padding: 12px 16px; font-size: 14px; color: var(--muted-foreground); border-radius: 0 0 var(--r-xl) var(--r-xl); }
@media (min-width: 640px) {
  .wo-bar-grid { grid-template-columns: 15rem minmax(0, 1fr); }
  .wo-bar-cell { padding: 16px; }
  .wo-bar-cell + .wo-bar-cell { border-top: 0; border-left: 1px solid var(--border); }
}
/* No station yet: a dashed panel with one tile per station. */
.wo-choose { border: 1px dashed var(--border); border-radius: var(--r-xl); padding: 40px 16px; text-align: center; }
.wo-choose .ring, .wo-none .ring { margin: 0 auto; display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 9999px; }
.wo-choose .ring { background: color-mix(in oklab, var(--logo-word-hi) 10%, transparent); color: var(--logo-word-hi); box-shadow: 0 0 0 1px color-mix(in oklab, var(--logo-word-hi) 25%, transparent); }
.wo-choose .ring svg, .wo-none .ring svg { width: 20px; height: 20px; }
.wo-choose h2 { margin: 16px 0 0; font-size: 16px; font-weight: 600; }
.wo-choose p { margin: 4px auto 0; max-width: 28rem; font-size: 14px; color: var(--muted-foreground); }
.wo-tiles { margin: 24px auto 0; max-width: 42rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; text-align: left; }
@media (min-width: 640px) { .wo-choose { padding: 56px 16px; } .wo-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.station-tile { display: flex; align-items: center; gap: 12px; border-radius: var(--r-xl); border: 1px solid color-mix(in oklab, var(--border) 70%, transparent); background: linear-gradient(to bottom, var(--card), color-mix(in oklab, var(--card) 80%, transparent)); padding: 12px 14px; text-align: left; box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1); transition: all .15s; }
.station-tile:hover { transform: translateY(-1px); border-color: color-mix(in oklab, var(--primary) 40%, transparent); }
.station-tile .text { min-width: 0; flex: 1; }
.station-tile .code { display: block; font-size: 16px; }
.station-tile .d { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted-foreground); }
.station-tile > svg { color: color-mix(in oklab, var(--muted-foreground) 40%, transparent); }
/* The station at a glance. Left off a phone, as in the app. */
.pulse { display: none; margin: 0 0 16px; gap: 12px; }
@media (min-width: 640px) { .pulse { display: flex; } }
.pulse-stat { position: relative; min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; border-radius: var(--r-xl); border: 1px solid color-mix(in oklab, var(--border) 60%, transparent); background: linear-gradient(to bottom, var(--card), color-mix(in oklab, var(--card) 80%, transparent)); padding: 12px 16px; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1); }
.pulse-stat dt { gap: 8px; }
.pulse-stat .chip { display: flex; width: 24px; height: 24px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: var(--r-md); background: var(--muted); color: var(--muted-foreground); }
.pulse-stat dd { margin: 0; font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.pulse-stat.lit dd { color: var(--foreground); }
.pulse-stat.lit.gold .chip { background: color-mix(in oklab, var(--logo-word-hi) 15%, transparent); color: var(--logo-word-hi); }
.pulse-stat.lit.info .chip { background: color-mix(in oklab, var(--info) 15%, transparent); color: var(--info); }
.pulse-stat.lit.info dd { color: var(--info); }
.pulse-stat.lit.danger .chip { background: color-mix(in oklab, var(--danger) 15%, transparent); color: var(--danger); }
.pulse-stat.lit.danger dd { color: var(--danger); }
/* Tabs, then the tab's filters, the search and refresh. */
.wo-list-head { margin-bottom: 12px; padding: 12px; gap: 12px; display: flex; flex-direction: column; }
.wo-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.segs { display: inline-flex; flex-shrink: 0; border-radius: var(--r-lg); border: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 40%, transparent); padding: 4px; }
.segs button { white-space: nowrap; border-radius: var(--r-md); padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); transition: all .15s; }
.segs button:hover { color: var(--foreground); }
.segs button.on { background: var(--background); color: var(--foreground); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / .05); }
.wo-search { display: flex; min-width: 12rem; flex: 1; align-items: center; gap: 8px; }
.wo-tabs .count { border-radius: 9999px; padding: 2px 6px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: color-mix(in oklab, var(--muted-foreground) 10%, transparent); color: var(--muted-foreground); }
.wo-tabs .count.on { background: var(--primary); color: var(--primary-foreground); }
.wo-none { display: flex; flex-direction: column; align-items: center; gap: 12px; border: 1px dashed var(--border); border-radius: var(--r-xl); padding: 48px 16px; text-align: center; }
.wo-none .ring { background: var(--muted); color: var(--muted-foreground); }
.wo-none p { margin: 0; font-size: 14px; color: var(--muted-foreground); }
/* A row: the status stripe down its left edge, in the colour of its tag. */
.wo-row { position: relative; padding-left: 16px; --rail: var(--warning); background: linear-gradient(to right, color-mix(in oklab, var(--rail) 6%, var(--card)), var(--card) 45%); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1); }
.wo-row.parts { --rail: var(--info); }
.wo-row .rail { position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 9999px 9999px 0; background: var(--rail); box-shadow: 0 0 8px 0 color-mix(in oklab, var(--rail) 35%, transparent); }
.wo-row .num { font-weight: 600; }
.wo-row .turn { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--foreground); font-variant-numeric: tabular-nums; }
.wo-row .turn svg.i { width: 14px; height: 14px; }
.status-chip.info { border-color: color-mix(in oklab, var(--info) 30%, transparent); background: color-mix(in oklab, var(--info) 10%, transparent); color: var(--info); }
