/* ============================================================================
   Workshop Command Centre — app.css
   Dark, professional command-centre theme. One accent, semantic status colours.
   ========================================================================== */

:root {
  /* base ink/slate */
  --bg:            #0d1117;
  --bg-2:          #121823;
  --panel:         #161d2a;
  --panel-2:       #1b2433;
  --panel-hi:      #202b3c;
  --line:          #2a3547;
  --line-soft:     #222c3c;

  /* text */
  --ink:           #e8edf4;
  --ink-2:         #aeb9c8;
  --ink-3:         #7c8799;
  --muted:         #6b7686;

  /* accent (cool steel-blue) */
  --accent:        #3fa7d6;
  --accent-2:      #2f86b0;
  --accent-soft:   rgba(63,167,214,.14);

  /* status palette (lifecycle) */
  --s-booked:      #5b7ca8;
  --s-progress:    #3fa7d6;
  --s-waiting:     #e0a13c;
  --s-ready:       #3fb27f;
  --s-payment:     #d9655b;
  --s-done:        #6b7686;

  /* semantic */
  --ok:            #3fb27f;
  --warn:          #e0a13c;
  --bad:           #d9655b;

  --radius:        11px;
  --radius-sm:     8px;
  --shadow:        0 2px 10px rgba(0,0,0,.28);
  --shadow-lg:     0 8px 30px rgba(0,0,0,.40);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--accent-soft); }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c3850; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== DEMO BANNER ===================== */
.demo-banner {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(90deg, #2a1f12, #2a2415);
  color: #f0d9a8;
  border-bottom: 1px solid #4a3a1c;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 7px 18px;
}
.demo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn); box-shadow: 0 0 0 3px rgba(224,161,60,.22);
}

/* ===================== SHELL ===================== */
.app-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: calc(100vh - 34px);
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  background: linear-gradient(180deg, #0f151f, #0c1119);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  position: sticky; top: 34px; height: calc(100vh - 34px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px; }
.brand-mark { display: grid; place-items: center; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .14em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500; font-size: 13.5px;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.nav-ico { width: 18px; text-align: center; color: var(--accent); opacity: .9; font-size: 14px; }
.nav-item.active .nav-ico { opacity: 1; }

.nav-spacer { flex: 1; }

.lifecycle-legend { padding: 12px 8px; border-top: 1px solid var(--line-soft); margin-top: 12px; }
.ll-title { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-bottom: 8px; }
.ll-chain { display: flex; flex-direction: column; gap: 4px; }
.ll-step {
  font-size: 11px; padding: 3px 8px; border-radius: 5px;
  border-left: 3px solid var(--line); color: var(--ink-2); background: var(--panel);
}
.ll-step.s-booked { border-left-color: var(--s-booked); }
.ll-step.s-in-progress { border-left-color: var(--s-progress); }
.ll-step.s-waiting-on-parts { border-left-color: var(--s-waiting); }
.ll-step.s-ready { border-left-color: var(--s-ready); }
.ll-step.s-payment-due { border-left-color: var(--s-payment); }
.ll-step.s-done { border-left-color: var(--s-done); }

.sidebar-foot { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px 2px; font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line-soft); margin-top: 8px; }

/* ===================== MAIN / SCREEN ===================== */
.main { padding: 22px 26px 60px; max-width: 1500px; }
.screen-mount { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.screen-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.screen-title { font-size: 22px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.01em; }
.screen-sub { margin: 0; color: var(--ink-3); font-size: 13px; }
.pill-date {
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px;
  padding: 7px 15px; font-size: 12.5px; color: var(--ink-2); font-weight: 600;
}

/* ===================== PANELS ===================== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255,255,255,.015), transparent);
}
.panel-title { font-size: 14px; font-weight: 650; margin: 0; }
.panel-sub { font-size: 12px; color: var(--ink-3); }
.panel-body { padding: 14px 16px; }
.panel-body.muted, .muted { color: var(--muted); }
.panel-ok { border-color: rgba(63,178,127,.28); }
.panel-warn { border-color: rgba(224,161,60,.32); }

/* ===================== METRIC STRIP ===================== */
.metric-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
}
.metric {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; position: relative; overflow: hidden;
}
.metric::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink-3); opacity: .5; }
.metric.warn::before { background: var(--warn); opacity: 1; }
.metric.bad::before { background: var(--bad); opacity: 1; }
.metric-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.metric-label { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ===================== TODAY ===================== */
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1080px) { .today-grid { grid-template-columns: 1fr; } }

.pcard-count {
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px 11px;
}
.pcard-warn .panel-head { box-shadow: inset 0 -2px 0 rgba(224,161,60,.4); }
.pcard-bad .panel-head { box-shadow: inset 0 -2px 0 rgba(217,101,91,.45); }
.pcard-accent .panel-head { box-shadow: inset 0 -2px 0 rgba(63,167,214,.4); }
.pcard-body { padding: 6px 0; max-height: 360px; overflow-y: auto; }

.prow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--line-soft);
  transition: background .1s;
}
.prow:last-child { border-bottom: none; }
.prow:hover { background: var(--panel-hi); }
.prow-empty, .prow-empty:hover { cursor: default; color: var(--muted); background: none; font-style: italic; justify-content: flex-start; }
.prow-reminder { background: rgba(63,167,214,.05); }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-weight: 600; font-size: 13.5px; }
.row-meta { font-size: 12px; color: var(--ink-3); }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }

/* pipeline (D3) */
.pipeline-panel { padding-bottom: 6px; }
.pipeline-host { padding: 10px 14px 6px; }
.pipeline-svg { display: block; overflow: visible; }
.pipeline-svg .bar { transition: opacity .12s; }
.pipeline-svg .bar:hover { opacity: .82; }

/* ===================== WIP BOARD ===================== */
.wip-legend { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); align-self: center; }
.wip-board {
  display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); gap: 12px;
  align-items: start; overflow-x: auto; padding-bottom: 8px;
}
.wip-col {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; min-height: 140px;
}
.wip-col-head {
  display: flex; align-items: center; gap: 7px; padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 650;
}
.wip-col-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex-shrink: 0; }
.wip-col-title { flex: 1; }
.wip-col-count { background: var(--panel-2); border-radius: 99px; padding: 1px 8px; font-size: 11px; color: var(--ink-2); }
.wip-col-sum { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.col-booked .wip-col-dot { background: var(--s-booked); }
.col-in-progress .wip-col-dot { background: var(--s-progress); }
.col-waiting-on-parts .wip-col-dot { background: var(--s-waiting); }
.col-ready .wip-col-dot { background: var(--s-ready); }
.col-payment-due .wip-col-dot { background: var(--s-payment); }
.col-done .wip-col-dot { background: var(--s-done); }

.wip-col-body { padding: 9px; display: flex; flex-direction: column; gap: 9px; min-height: 80px; flex: 1; border-radius: 0 0 var(--radius) var(--radius); transition: background .12s; }
.wip-col-body.drag-over { background: var(--accent-soft); outline: 1.5px dashed var(--accent-2); outline-offset: -5px; }
.wip-col-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 18px 6px; border: 1px dashed var(--line); border-radius: var(--radius-sm); font-style: italic; }

.wip-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px; cursor: pointer; box-shadow: var(--shadow);
  border-left: 3px solid var(--ink-3); transition: transform .08s, border-color .12s, box-shadow .12s;
}
.wip-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-color: var(--accent-2); }
.wip-card.dragging { opacity: .45; }
.wip-card.is-blocked { border-left-color: var(--warn); }
.col-booked .wip-card { border-left-color: var(--s-booked); }
.col-in-progress .wip-card { border-left-color: var(--s-progress); }
.col-ready .wip-card { border-left-color: var(--s-ready); }
.col-payment-due .wip-card { border-left-color: var(--s-payment); }
.col-done .wip-card { border-left-color: var(--s-done); opacity: .82; }

.wip-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wip-card-cust { font-weight: 650; font-size: 13px; }
.wip-card-val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.wip-card-veh { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.wip-card-type { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.wip-card-foot { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wip-card-date, .wip-card-wait { font-size: 11px; color: var(--ink-3); }
.wip-card-wait { color: var(--bad); font-weight: 600; }

.flag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
.flag-blocked { background: rgba(224,161,60,.16); color: #f0c069; border: 1px solid rgba(224,161,60,.3); }
.flag-pay { background: rgba(217,101,91,.16); color: #ed8a82; border: 1px solid rgba(217,101,91,.3); }
.flag-ready { background: rgba(63,178,127,.16); color: #6fd3a3; border: 1px solid rgba(63,178,127,.3); }

/* ===================== JOB CARD ===================== */
.job-crumb { font-size: 12.5px; margin-bottom: 10px; color: var(--ink-3); }
.crumb-link { font-weight: 600; }
.crumb-sep { margin: 0 8px; opacity: .5; }
.crumb-here { color: var(--ink-2); }
.job-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.job-id-chip { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; }

.status-picker { display: flex; gap: 6px; margin: 16px 0 18px; flex-wrap: wrap; }
.status-step {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--panel); color: var(--ink-3); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 13px; transition: all .12s;
}
.status-step:hover { color: var(--ink); border-color: var(--accent-2); }
.status-step.is-current { color: #fff; background: var(--accent-2); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.step-booked.is-current { background: var(--s-booked); border-color: var(--s-booked); box-shadow: 0 0 0 2px rgba(91,124,168,.25); }
.step-waiting-on-parts.is-current { background: var(--s-waiting); border-color: var(--s-waiting); color: #2a1f10; box-shadow: 0 0 0 2px rgba(224,161,60,.25); }
.step-ready.is-current { background: var(--s-ready); border-color: var(--s-ready); color: #0e2419; box-shadow: 0 0 0 2px rgba(63,178,127,.25); }
.step-payment-due.is-current { background: var(--s-payment); border-color: var(--s-payment); box-shadow: 0 0 0 2px rgba(217,101,91,.25); }
.step-done.is-current { background: var(--s-done); border-color: var(--s-done); box-shadow: 0 0 0 2px rgba(107,118,134,.25); }

.job-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .job-layout { grid-template-columns: 1fr; } }

/* blockage / diagnose */
.blockage-reason { margin: 0; font-size: 13.5px; color: #f0c069; font-weight: 500; }
.diagnose-box { padding: 0 16px 16px; border-top: 1px solid var(--line-soft); margin-top: 2px; }
.diag-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); }
.diag-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding-top: 2px; }
.diag-text { font-size: 13px; color: var(--ink); }
.diag-actions { display: flex; gap: 8px; margin-top: 12px; }

/* mini tables (parts, labour, history) */
.mini-table { display: flex; flex-direction: column; }
.mt-head, .mt-row {
  display: grid; grid-template-columns: 1.6fr 1.3fr .9fr .9fr .8fr .9fr;
  gap: 10px; padding: 9px 16px; align-items: center;
}
.mt-row-4, .labour-table .mt-head, .labour-table .mt-row { grid-template-columns: 2.4fr .8fr 1fr 1fr; }
.crm-table .mt-head, .crm-table .mt-row { grid-template-columns: 1.4fr 1fr 1.6fr 1.1fr .7fr; }
.mt-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); border-bottom: 1px solid var(--line-soft); }
.mt-row { border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.mt-row:last-child { border-bottom: none; }
.crm-row { cursor: pointer; transition: background .1s; }
.crm-row:hover, .mt-row[style*="cursor"]:hover { background: var(--panel-hi); }
.mt-strong { font-weight: 600; }
.mt-empty { padding: 16px; color: var(--muted); font-style: italic; font-size: 12.5px; }
.ta-r { text-align: right; }

/* inline add forms */
.inline-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); background: var(--bg-2); flex-wrap: wrap; align-items: center; }
.fld {
  font: inherit; font-size: 13px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 11px; flex: 1; min-width: 90px;
}
.fld:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.fld-num { flex: 0 0 80px; min-width: 70px; }
.fld-date { flex: 0 0 150px; color-scheme: dark; }
select.fld { cursor: pointer; }

/* parties / money side panels */
.kv-row { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 6px 0; font-size: 13px; }
.kv-k { color: var(--ink-3); }
.kv-v { color: var(--ink); word-break: break-word; }
.kv-divider { height: 1px; background: var(--line-soft); margin: 8px 0; }
.side-actions { margin-top: 14px; }

.money-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.money-row span:last-child { font-family: var(--mono); }
.money-total { font-weight: 700; font-size: 17px; border-bottom: none; border-top: 1.5px solid var(--line); margin-top: 4px; padding-top: 12px; }
.money-total span:last-child { color: var(--accent); }
.pay-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

.notes-body { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ===================== PARTS TRACKER ===================== */
.toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); width: 15px; height: 15px; }
.supplier-list { display: flex; flex-direction: column; gap: 14px; }
.parts-track-table .mt-head, .parts-track-table .mt-row { grid-template-columns: 1.5fr 1.6fr 1.2fr .9fr .8fr .9fr; }
.eta-rel { font-size: 11.5px; color: var(--ink-3); }
.eta-rel.is-late { color: var(--bad); font-weight: 600; }
.link { color: var(--accent); }

/* ===================== CALENDAR ===================== */
.week-nav { display: flex; gap: 6px; align-self: center; }
.booking-form { padding: 0; }
.bf-head { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-weight: 650; font-size: 13px; }
.bf-fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 14px 16px; }
@media (max-width: 1080px) { .bf-fields { grid-template-columns: repeat(2, 1fr); } }
.bf-field { display: flex; flex-direction: column; gap: 5px; }
.bf-field label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.bf-field .fld { flex: none; width: 100%; }
.bf-submit { justify-content: flex-end; }

.cal-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-corner { background: var(--panel-2); padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.cal-dayhead { background: var(--panel-2); padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; }
.cal-dayhead.is-today { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.cal-dow { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.cal-dom { font-size: 11px; color: var(--ink-3); }
.cal-bay { background: var(--panel-2); padding: 12px; font-weight: 600; font-size: 12.5px; display: flex; align-items: center; }
.cal-cell { background: var(--bg-2); padding: 7px; min-height: 86px; display: flex; flex-direction: column; gap: 6px; }
.cal-cell.is-today-col { background: rgba(63,167,214,.04); }
.cal-job { border-radius: var(--radius-sm); padding: 7px 9px; cursor: pointer; border-left: 3px solid var(--s-booked); background: var(--panel); display: flex; flex-direction: column; gap: 1px; transition: transform .08s, box-shadow .12s; }
.cal-job:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cal-job-type { font-size: 12px; font-weight: 600; }
.cal-job-cust { font-size: 11px; color: var(--ink-3); }
.cal-job-status { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.cal-job-booked { border-left-color: var(--s-booked); }
.cal-job-in-progress { border-left-color: var(--s-progress); }
.cal-job-waiting-on-parts { border-left-color: var(--s-waiting); }
.cal-job-ready { border-left-color: var(--s-ready); }
.cal-job-payment-due { border-left-color: var(--s-payment); }

/* ===================== CRM ===================== */
.due-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; padding: 14px 16px; }
.due-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; border-top: 3px solid var(--ink-3); transition: transform .08s, box-shadow .12s; }
.due-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.due-bad { border-top-color: var(--bad); }
.due-warn { border-top-color: var(--warn); }
.due-soft { border-top-color: var(--accent); }
.due-when { font-size: 12px; font-weight: 700; }
.due-bad .due-when { color: var(--bad); }
.due-warn .due-when { color: var(--warn); }
.due-veh { font-size: 13px; font-weight: 600; }
.due-cust { font-size: 12px; color: var(--ink-2); }
.due-date { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; }

.veh-head { align-items: flex-start; }
.veh-wof { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.veh-wof-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.veh-wof-date { font-size: 13px; font-weight: 600; }
.veh-due, .veh-history { padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.veh-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 10px; }
.due-inline { display: flex; gap: 9px; flex-wrap: wrap; }
.due-chip { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.due-chip.clickable { cursor: pointer; }
.due-chip.clickable:hover { background: var(--panel-hi); }
.due-chip-bad { border-left-color: var(--bad); }
.due-chip-warn { border-left-color: var(--warn); }
.due-chip-accent { border-left-color: var(--accent); }
.due-chip-kind { font-size: 12.5px; font-weight: 600; }
.due-chip-when { font-size: 11px; color: var(--ink-3); }
.due-chip.has-x { position: relative; padding-right: 28px; }
.due-chip-x { position: absolute; top: 4px; right: 4px; background: transparent; border: none; color: var(--ink-3); font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 5px; border-radius: 5px; transition: all .12s; }
.due-chip-x:hover { color: var(--bad); background: var(--panel-hi); }

/* ===================== TAGS ===================== */
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; line-height: 1.5; white-space: nowrap; }
.tag-lg { font-size: 12px; padding: 4px 12px; }
.tag-ok { background: rgba(63,178,127,.16); color: #6fd3a3; }
.tag-warn { background: rgba(224,161,60,.16); color: #f0c069; }
.tag-bad { background: rgba(217,101,91,.16); color: #ed8a82; }
.tag-accent { background: var(--accent-soft); color: #7cc4e6; }
.tag-booked { background: rgba(91,124,168,.18); color: #9bb6d6; }
.tag-in-progress { background: rgba(63,167,214,.16); color: #7cc4e6; }
.tag-waiting-on-parts { background: rgba(224,161,60,.16); color: #f0c069; }
.tag-ready { background: rgba(63,178,127,.16); color: #6fd3a3; }
.tag-payment-due { background: rgba(217,101,91,.16); color: #ed8a82; }
.tag-done { background: rgba(107,118,134,.2); color: #9aa6b6; }

/* ===================== BUTTONS ===================== */
.btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 14px; transition: all .12s; white-space: nowrap;
}
.btn:hover { background: var(--panel-hi); border-color: var(--accent-2); }
.btn-primary { background: var(--accent-2); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: transparent; }
.btn-add { background: transparent; border-style: dashed; color: var(--accent); }
.btn-add:hover { background: var(--accent-soft); }
.btn-sm { font-size: 12px; padding: 6px 11px; }
.btn-xs { font-size: 11px; padding: 4px 9px; }
.btn.is-queued, .btn:disabled { cursor: default; }
.btn.is-queued { color: #6fd3a3; background: transparent; border-color: var(--line); }
.btn.is-queued:hover { background: transparent; border-color: var(--line); }

/* ===================== MISC ===================== */
.empty-state { padding: 48px; text-align: center; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-spacer, .lifecycle-legend, .sidebar-foot { display: none; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
}
