/* TMSS theme.css — auto-generated, do not edit directly */
/* Light default vars */
:root {
  --bg: #f8f9fb;
  --bg2: #f1f3f7;
  --surface: #ffffff;
  --surface2: #f3f5f9;
  --card-hdr: #e8ecf2;
  --card-hdr-text: #374151;
  --feature-bg: #fff8e7;
  --border: #e2e6ed;
  --border2: #c8d0dc;
  --muted-border: #d1d5db;
  --text: #0f1117;
  --text2: #374151;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --nav-h: 52px;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --font-body: 'Barlow', sans-serif;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* Light mode explicit class (portal toggle) */
html.light, [data-theme="light"] {
  --bg: #f8f9fb;
  --bg2: #f1f3f7;
  --surface: #ffffff;
  --surface2: #f3f5f9;
  --card-hdr: #e8ecf2;
  --card-hdr-text: #374151;
  --feature-bg: #fff8e7;
  --border: #e2e6ed;
  --border2: #c8d0dc;
  --muted-border: #d1d5db;
  --text: #0f1117;
  --text2: #374151;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info: #2563eb;
  --info-bg: #eff6ff;
}

/* Dark mode — supports both html.dark class (admin) and data-theme="dark" (portal) */
html.dark, [data-theme="dark"] {
  --bg: #f8f9fb;
  --bg2: #dde4f3;
  --surface: #ffffff;
  --surface2: #e9effb;
  --card-hdr: #e0edff;
  --card-hdr-text: #374151;
  --feature-bg: #fff1d1;
  --border: #e2e6ed;
  --border2: #c8d0dc;
  --muted-border: #d1d5db;
  --text: #0f1117;
  --text2: #374151;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info: #2563eb;
  --info-bg: #e2eaf3;
  --shadow: none;
  --shadow-md: none;
}

/* Accent palettes (data-theme on <html>) */
:root                           { --accent-btn: #fff; }
html.dark                       { --accent-btn: #000; }
:root[data-theme="green"]       { --accent:#16a34a; --accent2:#0d9488; --accent-btn:#fff; }
html.dark[data-theme="green"]   { --accent:#4ade80; --accent2:#2dd4bf; --accent-btn:#000; }
:root[data-theme="teal"]        { --accent:#0d9488; --accent2:#0369a1; --accent-btn:#fff; }
html.dark[data-theme="teal"]    { --accent:#2dd4bf; --accent2:#38bdf8; --accent-btn:#000; }
:root[data-theme="slate"]       { --accent:#2563eb; --accent2:#0ea5e9; --accent-btn:#fff; }
html.dark[data-theme="slate"]   { --accent:#60a5fa; --accent2:#38bdf8; --accent-btn:#000; }
:root[data-theme="slate-blue"]  { --accent:#4f46e5; --accent2:#0284c7; --accent-btn:#fff; }
html.dark[data-theme="slate-blue"] { --accent:#818cf8; --accent2:#38bdf8; --accent-btn:#000; }
:root[data-theme="crimson"]     { --accent:#dc2626; --accent2:#d97706; --accent-btn:#fff; }
html.dark[data-theme="crimson"] { --accent:#f87171; --accent2:#fbbf24; --accent-btn:#000; }
:root[data-theme="amber"]       { --accent:#d97706; --accent2:#059669; --accent-btn:#fff; }
html.dark[data-theme="amber"]   { --accent:#fbbf24; --accent2:#34d399; --accent-btn:#000; }
:root[data-theme="violet"]      { --accent:#7c3aed; --accent2:#0d9488; --accent-btn:#fff; }
html.dark[data-theme="violet"]  { --accent:#a78bfa; --accent2:#2dd4bf; --accent-btn:#000; }
:root[data-theme="steel"]       { --accent:#0369a1; --accent2:#b45309; --accent-btn:#fff; }
html.dark[data-theme="steel"]   { --accent:#38bdf8; --accent2:#fbbf24; --accent-btn:#000; }

/* Status badge colors — light mode (default) */
.badge-new           { background:#dbeafe; color:#1e40af; }
.badge-checked_in    { background:#e0f2fe; color:#0c4a6e; }
.badge-diagnosed     { background:#f3e8ff; color:#6b21a8; }
.badge-waiting_parts { background:#fff7ed; color:#9a3412; }
.badge-in_repair     { background:#ccfbf1; color:#134e4a; }
.badge-qc            { background:#d1fae5; color:#065f46; }
.badge-ready         { background:#dcfce7; color:#14532d; }
.badge-invoiced      { background:#fef9c3; color:#713f12; }
.badge-closed        { background:#f3f4f6; color:#4b5563; }
.badge-cancelled     { background:#fee2e2; color:#7f1d1d; }
.badge-low           { background:#dbeafe; color:#1e40af; }
.badge-normal        { background:#f3f4f6; color:#4b5563; }
.badge-high          { background:#fff7ed; color:#9a3412; }
.badge-urgent        { background:#fee2e2; color:#7f1d1d; }

/* Status badge colors — dark mode */
html.dark .badge-new           { background:#1a2535; color:#64b5f6; }
html.dark .badge-checked_in    { background:#1a2040; color:#90caf9; }
html.dark .badge-diagnosed     { background:#251a35; color:#ce93d8; }
html.dark .badge-waiting_parts { background:#2a1f10; color:#ffb74d; }
html.dark .badge-in_repair     { background:#102520; color:#4db6ac; }
html.dark .badge-qc            { background:#1a2820; color:#80cbc4; }
html.dark .badge-ready         { background:#1a2a1a; color:#81c784; }
html.dark .badge-invoiced      { background:#252015; color:#ffd54f; }
html.dark .badge-closed        { background:#252525; color:#9e9e9e; }
html.dark .badge-cancelled     { background:#2a1515; color:#ef9a9a; }
html.dark .badge-low           { background:#1a2535; color:#64b5f6; }
html.dark .badge-normal        { background:#252525; color:#9e9e9e; }
html.dark .badge-high          { background:#2a1f10; color:#ffb74d; }
html.dark .badge-urgent        { background:#2a1515; color:#ef9a9a; }

/* Portal theme toggle button */
.theme-toggle {
  position:fixed; bottom:1rem; right:1rem;
  background:var(--surface); border:1px solid var(--border);
  border-radius:20px; padding:.35rem .85rem;
  font-size:11px; font-family:'IBM Plex Mono',monospace;
  cursor:pointer; color:var(--muted); z-index:100;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
  transition:color .15s,border-color .15s;
}
.theme-toggle:hover { color:var(--accent); border-color:var(--accent); }
