/* =========================================================================
   workshop.css — Car Workshop Management module
   Bootstrap 5.3 add-on layer. Design tokens + app shell + shared components.
   No framework other than Bootstrap. Icons: Bootstrap Icons.
   ========================================================================= */

:root {
  /* --- Brand / accent --------------------------------------------------- */
  --ws-accent:        #2456d6;   /* deep blue primary */
  --ws-accent-600:    #1e49b8;
  --ws-accent-700:    #183a94;
  --ws-accent-050:    #eef3ff;
  --ws-accent-100:    #dbe6ff;

  /* --- Neutrals --------------------------------------------------------- */
  --ws-ink:           #1b2333;   /* primary text */
  --ws-ink-soft:      #55607a;   /* secondary text */
  --ws-ink-faint:     #8a93a8;   /* muted / meta */
  --ws-line:          #e6e9f0;   /* borders */
  --ws-line-soft:     #eef0f5;
  --ws-bg:            #f4f6fb;   /* app canvas */
  --ws-surface:       #ffffff;   /* cards */
  --ws-surface-2:     #f8fafc;   /* subtle fills */

  /* --- Status palette (spec-locked) ------------------------------------- */
  --st-received:      #6c757d;   /* secondary */
  --st-diagnosing:    #0aa2c0;   /* info (cyan) */
  --st-awaitingappr:  #d9a406;   /* warning (amber-gold) */
  --st-inprogress:    #2456d6;   /* primary */
  --st-awaitingparts: #f59e0b;   /* amber */
  --st-readypickup:   #14b8a6;   /* teal */
  --st-delivered:     #16a34a;   /* success (green) */
  --st-cancelled:     #dc3545;   /* danger */

  /* --- Radius / shadow / spacing scale ---------------------------------- */
  --ws-r-sm: 6px;
  --ws-r:    8px;
  --ws-r-lg: 12px;
  --ws-r-xl: 16px;
  --ws-shadow-xs: 0 1px 2px rgba(20,30,60,.06);
  --ws-shadow-sm: 0 1px 3px rgba(20,30,60,.08), 0 1px 2px rgba(20,30,60,.04);
  --ws-shadow:    0 4px 14px rgba(20,30,60,.08);
  --ws-shadow-lg: 0 12px 32px rgba(20,30,60,.14);

  --ws-sidebar-w:      256px;
  --ws-sidebar-w-mini: 74px;
  --ws-topbar-h:       60px;

  /* Bootstrap primary override to accent */
  --bs-primary: var(--ws-accent);
  --bs-primary-rgb: 36, 86, 214;
  --bs-body-color: var(--ws-ink);
  --bs-body-bg: var(--ws-bg);
  --bs-border-color: var(--ws-line);
  --bs-link-color: var(--ws-accent);
  --bs-link-hover-color: var(--ws-accent-700);
}

* { -webkit-font-smoothing: antialiased; }

body {
  background: var(--ws-bg);
  color: var(--ws-ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  letter-spacing: -0.05px;
}

/* =========================================================================
   APP SHELL
   ========================================================================= */
.ws-app { min-height: 100vh; }

/* ---- Sidebar ---------------------------------------------------------- */
.ws-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--ws-sidebar-w);
  background: #0f1830;
  color: #c6cfe4;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: width .18s ease;
  overflow: hidden;
}
.ws-sidebar__brand {
  height: var(--ws-topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
.ws-sidebar__logo {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--ws-accent) 0%, #4f7cff 100%);
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.ws-sidebar__title { font-weight: 700; font-size: 15px; color: #fff; line-height: 1.05; }
.ws-sidebar__title small { display:block; font-weight: 500; font-size: 11px; color: #7d89a8; letter-spacing: .3px; }

.ws-nav { flex: 1 1 auto; overflow-y: auto; padding: 12px 12px 24px; }
.ws-nav::-webkit-scrollbar { width: 8px; }
.ws-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 8px; }
.ws-nav__label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: #5c688a; padding: 16px 12px 6px;
}
.ws-nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: var(--ws-r);
  color: #b6c0da; text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.ws-nav__item i { font-size: 17px; width: 22px; text-align: center; flex: 0 0 22px; }
.ws-nav__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.ws-nav__item.active { background: var(--ws-accent); color: #fff; box-shadow: var(--ws-shadow-sm); }
.ws-nav__item .badge { margin-left: auto; font-size: 10.5px; }
.ws-nav__item .ws-nav__chev { margin-left: auto; font-size: 12px; transition: transform .15s; }
.ws-nav__item[aria-expanded="true"] .ws-nav__chev { transform: rotate(90deg); }
.ws-nav__sub { padding-left: 18px; }
.ws-nav__sub .ws-nav__item { font-size: 13px; padding: 7px 12px; }

/* Collapsed (mini) state */
.ws-collapsed .ws-sidebar { width: var(--ws-sidebar-w-mini); }
.ws-collapsed .ws-sidebar__title,
.ws-collapsed .ws-nav__label,
.ws-collapsed .ws-nav__item span,
.ws-collapsed .ws-nav__item .badge,
.ws-collapsed .ws-nav__chev { display: none; }
.ws-collapsed .ws-nav__item { justify-content: center; padding: 11px 0; }
.ws-collapsed .ws-nav__sub { display: none; }
.ws-collapsed .ws-main { margin-left: var(--ws-sidebar-w-mini); }
.ws-collapsed .ws-topbar { left: var(--ws-sidebar-w-mini); }

/* ---- Main + topbar ---------------------------------------------------- */
.ws-main {
  margin-left: var(--ws-sidebar-w);
  transition: margin .18s ease;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.ws-topbar {
  position: fixed; top: 0; right: 0; left: var(--ws-sidebar-w);
  height: var(--ws-topbar-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--ws-line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  z-index: 1030;
  transition: left .18s ease;
}
.ws-iconbtn {
  width: 38px; height: 38px; border-radius: var(--ws-r);
  border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: var(--ws-ink-soft);
  font-size: 18px; cursor: pointer; position: relative;
  transition: background .12s, color .12s;
}
.ws-iconbtn:hover { background: var(--ws-surface-2); color: var(--ws-ink); }
.ws-iconbtn .ws-dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--st-cancelled); border: 2px solid #fff;
}

.ws-search {
  position: relative; flex: 0 1 460px; max-width: 460px;
}
.ws-search input {
  height: 40px; border-radius: 10px; border: 1px solid var(--ws-line);
  background: var(--ws-surface-2); padding-left: 40px; font-size: 13.5px;
}
.ws-search input:focus { background: #fff; box-shadow: 0 0 0 3px var(--ws-accent-050); border-color: var(--ws-accent-100); }
.ws-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ws-ink-faint); font-size: 16px; }
.ws-search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; background: #fff; border: 1px solid var(--ws-line);
  border-radius: 5px; padding: 1px 6px; color: var(--ws-ink-faint);
}

.ws-usermenu { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 40px; }
.ws-usermenu:hover { background: var(--ws-surface-2); }
.ws-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg,#2456d6,#4f7cff); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}

/* ---- Page container --------------------------------------------------- */
.ws-page { padding: calc(var(--ws-topbar-h) + 22px) 26px 34px; flex: 1 1 auto; }
.ws-page--wide { max-width: none; }

.ws-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ws-pagehead__title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin: 2px 0 0; }
.ws-breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ws-ink-faint); }
.ws-breadcrumb a { color: var(--ws-ink-faint); text-decoration: none; }
.ws-breadcrumb a:hover { color: var(--ws-accent); }
.ws-breadcrumb i { font-size: 11px; opacity: .6; }

/* =========================================================================
   CARDS
   ========================================================================= */
.ws-card {
  background: var(--ws-surface);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-r-lg);
  box-shadow: var(--ws-shadow-xs);
}
.ws-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--ws-line-soft);
}
.ws-card__title { font-size: 14.5px; font-weight: 650; margin: 0; display:flex; align-items:center; gap:9px; }
.ws-card__body { padding: 18px; }
.ws-card__body--flush { padding: 0; }

/* ---- KPI stat cards --------------------------------------------------- */
.ws-stat {
  background: var(--ws-surface); border: 1px solid var(--ws-line);
  border-radius: var(--ws-r-lg); padding: 16px 16px 15px;
  box-shadow: var(--ws-shadow-xs); position: relative; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.ws-stat:hover { box-shadow: var(--ws-shadow); transform: translateY(-1px); }
.ws-stat--link { cursor: pointer; }
.ws-stat--link:hover { border-color: var(--ws-primary, #2563eb); }
.ws-stat--link:focus-visible { outline: 2px solid var(--ws-primary, #2563eb); outline-offset: 2px; }
.ws-stat__icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 20px; margin-bottom: 12px;
}
.ws-stat__label { font-size: 12px; color: var(--ws-ink-soft); font-weight: 550; letter-spacing: .1px; }
.ws-stat__value { font-size: 25px; font-weight: 750; letter-spacing: -.6px; line-height: 1.1; margin-top: 3px; }
.ws-stat__meta { font-size: 11.5px; color: var(--ws-ink-faint); margin-top: 6px; display:flex; align-items:center; gap:5px; }
.ws-stat__trend-up { color: var(--st-delivered); font-weight: 600; }
.ws-stat__trend-down { color: var(--st-cancelled); font-weight: 600; }

/* tinted icon helpers */
.tint-blue   { background: var(--ws-accent-050); color: var(--ws-accent); }
.tint-green  { background: #e7f6ec; color: var(--st-delivered); }
.tint-teal   { background: #e3f7f4; color: var(--st-readypickup); }
.tint-amber  { background: #fef3e2; color: var(--st-awaitingparts); }
.tint-cyan   { background: #e2f6fa; color: var(--st-diagnosing); }
.tint-red    { background: #fdecee; color: var(--st-cancelled); }
.tint-gray   { background: #eef0f5; color: var(--st-received); }
.tint-gold   { background: #fbf3d9; color: var(--st-awaitingappr); }

/* =========================================================================
   STATUS BADGES  (_StatusBadge)
   ========================================================================= */
.st-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 5px 10px 5px 9px; border-radius: 40px;
  border: 1px solid transparent; white-space: nowrap;
}
.st-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-received      { color: var(--st-received);      background: #eef0f5; }
.st-diagnosing    { color: var(--st-diagnosing);    background: #e2f6fa; }
.st-awaitingappr  { color: var(--st-awaitingappr);  background: #fbf3d9; }
.st-inprogress    { color: var(--st-inprogress);    background: var(--ws-accent-050); }
.st-awaitingparts { color: var(--st-awaitingparts); background: #fef3e2; }
.st-readypickup   { color: var(--st-readypickup);   background: #e3f7f4; }
.st-delivered     { color: var(--st-delivered);     background: #e7f6ec; }
.st-cancelled     { color: var(--st-cancelled);     background: #fdecee; }

/* larger pill for detail header */
.st-pill { font-size: 13px; padding: 8px 14px 8px 12px; }
.st-pill::before { width: 8px; height: 8px; }

/* promised badges */
.promise { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.promise-ok   { color: var(--st-delivered); background: #e7f6ec; }
.promise-soon { color: #a86b00; background: #fef3e2; }
.promise-late { color: var(--st-cancelled); background: #fdecee; }

/* =========================================================================
   TABLES
   ========================================================================= */
.ws-table { width: 100%; margin: 0; font-size: 13.5px; }
.ws-table thead th {
  background: var(--ws-surface-2); color: var(--ws-ink-soft);
  font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px;
  padding: 11px 16px; border-bottom: 1px solid var(--ws-line); white-space: nowrap;
}
.ws-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--ws-line-soft); vertical-align: middle; }
.ws-table tbody tr:last-child td { border-bottom: 0; }
.ws-table tbody tr { transition: background .1s; }
.ws-table tbody tr:hover { background: var(--ws-accent-050); }
.ws-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ws-table th.sortable { cursor: pointer; }
.ws-table th.sortable:hover { color: var(--ws-ink); }
.ws-table th.sortable i { opacity: .4; font-size: 11px; }

.ws-avatar-sm { width: 30px; height: 30px; border-radius: 8px; background: var(--ws-accent-050); color: var(--ws-accent); display:inline-grid; place-items:center; font-weight:600; font-size:12px; }
.plate {
  display:inline-flex; align-items:center; font-family: "Roboto Mono", ui-monospace, monospace;
  font-weight: 700; letter-spacing: 1px; font-size: 12.5px;
  border: 1.5px solid var(--ws-ink); border-radius: 5px; padding: 2px 8px; color: var(--ws-ink);
  background: #fff;
}

/* license-plate badge -- coloured country strip + coloured plate (PlateTagHelper) */
.ws-plate {
  display: inline-flex; align-items: stretch; vertical-align: middle;
  font-family: "Roboto Mono", ui-monospace, monospace; font-weight: 700;
  border: 1.5px solid var(--ws-ink); border-radius: 5px; overflow: hidden;
  line-height: 1; white-space: nowrap;
}
.ws-plate__cc {
  display: inline-flex; align-items: center; padding: 3px 6px;
  font-size: 11px; letter-spacing: .5px;
}
.ws-plate__no {
  display: inline-flex; align-items: center; padding: 3px 9px;
  font-size: 12.5px; letter-spacing: 1px;
}
.ws-plate--lg .ws-plate__cc { font-size: 14px; padding: 5px 8px; }
.ws-plate--lg .ws-plate__no { font-size: 17px; padding: 5px 12px; letter-spacing: 1.5px; }

/* filters row */
.ws-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--ws-line-soft); background: var(--ws-surface-2);
  border-radius: var(--ws-r-lg) var(--ws-r-lg) 0 0;
}
.ws-filters .form-select, .ws-filters .form-control { height: 38px; font-size: 13px; }
.ws-filters .form-select { width: auto; flex: 0 0 auto; }
.ws-filters .ws-filter-w { min-width: 150px; }

/* pagination footer */
.ws-tablefoot { display:flex; align-items:center; justify-content: space-between; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.ws-tablefoot .text-meta { font-size: 12.5px; color: var(--ws-ink-faint); }

/* =========================================================================
   FORMS
   ========================================================================= */
.form-label { font-size: 12.5px; font-weight: 600; color: var(--ws-ink-soft); margin-bottom: 5px; }
.form-control, .form-select { border-color: var(--ws-line); border-radius: var(--ws-r); font-size: 13.5px; }
.form-control:focus, .form-select:focus { border-color: var(--ws-accent-100); box-shadow: 0 0 0 3px var(--ws-accent-050); }
.input-group-text { background: var(--ws-surface-2); border-color: var(--ws-line); color: var(--ws-ink-soft); font-size: 13px; }
.btn { border-radius: var(--ws-r); font-size: 13.5px; font-weight: 550; }
.btn-primary { background: var(--ws-accent); border-color: var(--ws-accent); }
.btn-primary:hover { background: var(--ws-accent-600); border-color: var(--ws-accent-600); }
.btn-lg { border-radius: var(--ws-r-lg); }
.btn-soft {
  background: var(--ws-accent-050); color: var(--ws-accent); border: 1px solid var(--ws-accent-100);
}
.btn-soft:hover { background: var(--ws-accent-100); color: var(--ws-accent-700); }

/* =========================================================================
   TABS  (Bootstrap nav-tabs restyle)
   ========================================================================= */
.ws-tabs.nav-tabs { border-bottom: 1px solid var(--ws-line); gap: 4px; padding: 0 6px; }
.ws-tabs.nav-tabs .nav-link {
  border: 0; border-bottom: 2.5px solid transparent; border-radius: 0;
  color: var(--ws-ink-soft); font-weight: 600; font-size: 13.5px; padding: 13px 14px;
  display: flex; align-items: center; gap: 8px;
}
.ws-tabs.nav-tabs .nav-link .badge { font-size: 10.5px; font-weight: 600; }
.ws-tabs.nav-tabs .nav-link:hover { color: var(--ws-ink); border-bottom-color: var(--ws-line); }
.ws-tabs.nav-tabs .nav-link.active { color: var(--ws-accent); border-bottom-color: var(--ws-accent); background: transparent; }

/* segmented step indicator */
.ws-steps { display: flex; align-items: center; gap: 0; }
.ws-step { display: flex; align-items: center; gap: 11px; flex: 1 1 0; }
.ws-step__num {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: #fff; border: 2px solid var(--ws-line); color: var(--ws-ink-faint);
}
.ws-step__txt small { display:block; font-size: 11px; color: var(--ws-ink-faint); font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.ws-step__txt b { font-size: 14px; color: var(--ws-ink-soft); font-weight: 650; }
.ws-step__line { flex: 1 1 auto; height: 2px; background: var(--ws-line); margin: 0 6px; }
.ws-step.is-active .ws-step__num { background: var(--ws-accent); border-color: var(--ws-accent); color: #fff; box-shadow: 0 0 0 4px var(--ws-accent-050); }
.ws-step.is-active .ws-step__txt b { color: var(--ws-ink); }
.ws-step.is-done .ws-step__num { background: var(--st-delivered); border-color: var(--st-delivered); color: #fff; }
.ws-step.is-done .ws-step__line, .ws-step.is-active .ws-step__line { background: var(--ws-accent); }

/* =========================================================================
   KANBAN BOARD
   ========================================================================= */
.ws-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.ws-col { flex: 0 0 288px; width: 288px; background: var(--ws-surface-2); border: 1px solid var(--ws-line); border-radius: var(--ws-r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.ws-col__head { display:flex; align-items:center; gap:8px; padding: 12px 14px; border-bottom: 1px solid var(--ws-line); position: sticky; top: 0; }
.ws-col__head .dot { width: 9px; height: 9px; border-radius: 50%; }
.ws-col__head b { font-size: 13px; font-weight: 650; }
.ws-col__head .count { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--ws-ink-faint); background: #fff; border:1px solid var(--ws-line); border-radius: 20px; padding: 1px 9px; }
.ws-col__body { padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.ws-wo-card {
  background: #fff; border: 1px solid var(--ws-line); border-radius: var(--ws-r);
  padding: 12px; box-shadow: var(--ws-shadow-xs); cursor: grab; transition: box-shadow .12s, transform .12s;
}
.ws-wo-card:hover { box-shadow: var(--ws-shadow); }
.ws-wo-card:active { cursor: grabbing; }
.ws-wo-card__grip { color: var(--ws-line); font-size: 15px; }

/* =========================================================================
   TIMELINE
   ========================================================================= */
.ws-timeline { position: relative; padding-left: 26px; }
.ws-timeline::before { content:""; position:absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--ws-line); }
.ws-tl-item { position: relative; padding-bottom: 20px; }
.ws-tl-item:last-child { padding-bottom: 0; }
.ws-tl-dot { position: absolute; left: -26px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background:#fff; border: 3px solid var(--ws-accent); display:grid; place-items:center; }
.ws-tl-dot i { font-size: 10px; color: var(--ws-accent); }
.ws-tl-item__time { font-size: 11.5px; color: var(--ws-ink-faint); }
.ws-tl-item__title { font-size: 13.5px; font-weight: 600; margin: 2px 0; }

/* =========================================================================
   TOTALS SIDEBAR
   ========================================================================= */
.ws-totals { font-size: 13.5px; }
.ws-totals__row { display:flex; justify-content: space-between; padding: 8px 0; color: var(--ws-ink-soft); }
.ws-totals__row .val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ws-ink); }
.ws-totals__row--grand { border-top: 1.5px solid var(--ws-line); margin-top: 6px; padding-top: 12px; font-size: 15px; font-weight: 700; color: var(--ws-ink); }
.ws-totals__row--grand .val { font-size: 19px; color: var(--ws-accent); }
.perm-profit { position: relative; }
.ws-profit-band { background: #f0fbf4; border: 1px dashed #b8e6c8; border-radius: var(--ws-r); padding: 4px 12px; margin-top: 10px; }
.ws-profit-band .ws-totals__row { color: #157a3a; }
.ws-profit-band .val { color: #0f6a30; }

/* =========================================================================
   AVAILABILITY chips (part picker)
   ========================================================================= */
.avail { display:inline-flex; gap: 3px; align-items: baseline; font-size: 11.5px; font-weight: 600; }
.avail b { font-variant-numeric: tabular-nums; }
.avail-onhand { color: var(--ws-ink-soft); }
.avail-res { color: var(--st-awaitingparts); }
.avail-free { color: var(--st-delivered); }
.avail-low { color: var(--st-cancelled); }

/* =========================================================================
   EMPTY STATE
   ========================================================================= */
.ws-empty { text-align: center; padding: 46px 20px; }
.ws-empty__icon { width: 64px; height: 64px; border-radius: 18px; background: var(--ws-surface-2); color: var(--ws-ink-faint); display: grid; place-items: center; font-size: 30px; margin: 0 auto 14px; }
.ws-empty h6 { font-weight: 700; font-size: 15px; }
.ws-empty p { color: var(--ws-ink-faint); font-size: 13px; max-width: 320px; margin: 4px auto 16px; }

/* =========================================================================
   TOASTS  (notify wrapper target)
   ========================================================================= */
.ws-toast-container { z-index: 1090; }
.ws-toast { border: 0; border-radius: var(--ws-r); box-shadow: var(--ws-shadow-lg); overflow: hidden; border-left: 4px solid var(--ws-accent); }
.ws-toast .toast-body { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; }
.ws-toast__icon { font-size: 18px; margin-top: 1px; }
.ws-toast--success { border-left-color: var(--st-delivered); }
.ws-toast--success .ws-toast__icon { color: var(--st-delivered); }
.ws-toast--error { border-left-color: var(--st-cancelled); }
.ws-toast--error .ws-toast__icon { color: var(--st-cancelled); }
.ws-toast--warning { border-left-color: var(--st-awaitingparts); }
.ws-toast--warning .ws-toast__icon { color: var(--st-awaitingparts); }
.ws-toast--info { border-left-color: var(--ws-accent); }
.ws-toast--info .ws-toast__icon { color: var(--ws-accent); }
.ws-toast__title { font-weight: 650; font-size: 13.5px; }
.ws-toast__msg { font-size: 12.5px; color: var(--ws-ink-soft); }

/* =========================================================================
   Tom Select  (BS5 skin + rich rows)
   ========================================================================= */
.ts-wrapper.form-control, .ts-wrapper.form-select { padding: 0; border: 0; height: auto; box-shadow: none; }
.ts-control {
  border: 1px solid var(--ws-line) !important; border-radius: var(--ws-r) !important;
  min-height: 40px; padding: 6px 10px !important; font-size: 13.5px; box-shadow: none !important;
}
.ts-wrapper.focus .ts-control { border-color: var(--ws-accent-100) !important; box-shadow: 0 0 0 3px var(--ws-accent-050) !important; }
.ts-dropdown { border: 1px solid var(--ws-line); border-radius: var(--ws-r); box-shadow: var(--ws-shadow-lg); overflow: hidden; margin-top: 6px; }
.ts-dropdown .option { padding: 9px 12px; border-bottom: 1px solid var(--ws-line-soft); }
.ts-dropdown .option:last-child { border-bottom: 0; }
.ts-dropdown .active { background: var(--ws-accent-050); }
.ts-dropdown .create { color: var(--ws-accent); font-weight: 600; }
.ts-opt { display:flex; align-items:center; gap:10px; }
.ts-opt__main { display:flex; flex-direction:column; }
.ts-opt__name { font-weight: 600; font-size: 13.5px; color: var(--ws-ink); }
.ts-opt__sub { font-size: 11.5px; color: var(--ws-ink-faint); }
.ts-opt__right { margin-left: auto; text-align: right; }

/* =========================================================================
   flatpickr week numbers tweak
   ========================================================================= */
.flatpickr-weekwrapper .flatpickr-weekday, .flatpickr-weekwrapper span.flatpickr-day { color: var(--ws-ink-faint); }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--ws-accent); border-color: var(--ws-accent); }
.flatpickr-day.inRange { background: var(--ws-accent-050); border-color: var(--ws-accent-050); box-shadow: -5px 0 0 var(--ws-accent-050), 5px 0 0 var(--ws-accent-050); }

/* =========================================================================
   Dropzone (attachments)
   ========================================================================= */
.ws-dropzone {
  border: 2px dashed var(--ws-line); border-radius: var(--ws-r-lg); background: var(--ws-surface-2);
  padding: 26px; text-align: center; color: var(--ws-ink-faint); cursor: pointer; transition: border-color .12s, background .12s;
}
.ws-filters .ws-filter-part { min-width: 340px; flex: 1 1 340px; max-width: 560px; }
.ws-dropzone > * { pointer-events: none; } /* every click lands on the box so Dropzone opens the file dialog */
.ws-dropzone:hover { border-color: var(--ws-accent-100); background: var(--ws-accent-050); color: var(--ws-accent); }
.ws-file-row { display:flex; align-items:center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ws-line); border-radius: var(--ws-r); background:#fff; }
.ws-file-ic { width: 38px; height: 38px; border-radius: 8px; display:grid; place-items:center; font-size:18px; }

/* =========================================================================
   MISC helpers
   ========================================================================= */
.text-meta { color: var(--ws-ink-faint); font-size: 12.5px; }
.text-soft { color: var(--ws-ink-soft); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.divider { height:1px; background: var(--ws-line-soft); margin: 14px 0; }
.chip { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:4px 10px; border-radius:20px; background:var(--ws-surface-2); border:1px solid var(--ws-line); color:var(--ws-ink-soft); }
.hr-soft { border-color: var(--ws-line-soft); opacity: 1; }
.fuel-track { --pct: 50%; }

@media (max-width: 991.98px) {
  .ws-sidebar { transform: translateX(-100%); transition: transform .2s; width: var(--ws-sidebar-w); }
  .ws-sidebar-open .ws-sidebar { transform: translateX(0); box-shadow: var(--ws-shadow-lg); }
  .ws-main { margin-left: 0; }
  .ws-topbar { left: 0; }
  .ws-search { flex-basis: 200px; }
  .ws-scrim { position: fixed; inset: 0; background: rgba(10,15,30,.4); z-index: 1035; display: none; }
  .ws-sidebar-open .ws-scrim { display: block; }
}

/* print helpers referenced by print pages */
/* ---- Offerte lines (drag-and-drop) ---- */
.ws-table td.q-drag { cursor: grab; color: var(--ws-ink-faint); padding-left: 8px; padding-right: 0; width: 28px; }
.ws-table td.q-drag:hover { color: var(--ws-accent); }
.ws-table tr.q-ghost { opacity: .45; background: var(--ws-accent-050); }

/* ---- Attendance ---- */
.att-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.att-present { background: #dcf5e4; color: #14753a; }
.att-absent  { background: #fde1e1; color: #b42323; }
.att-leave   { background: #fdf0d2; color: #8a5a00; }
.att-sick    { background: #dbe6ff; color: #1e49b8; }
.att-vacation { background: #e9defa; color: #5b2fa8; }
.att-off     { background: #eef0f5; color: #8a93a8; }
.att-none    { background: transparent; }
/* Paid (excused) absence: green underline on the status colour. */
.att-paid    { box-shadow: inset 0 -3px 0 #22a06b; }
.ws-table tfoot td { padding: 13px 16px; font-weight: 700; background: var(--ws-surface-2); border-top: 2px solid var(--ws-line); vertical-align: middle; }
.att-zero { color: var(--ws-ink-faint); }
.att-bar { height: 6px; border-radius: 999px; background: var(--ws-line-soft); overflow: hidden; margin-top: 5px; }
.att-bar__fill { height: 100%; border-radius: 999px; background: #22a06b; }
.att-bar__fill.is-short { background: #e5484d; }
#attStatusGroup .btn { white-space: nowrap; font-weight: 600; }
.btn-outline-vacation { --bs-btn-color: #5b2fa8; --bs-btn-border-color: #5b2fa8; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #5b2fa8; --bs-btn-hover-border-color: #5b2fa8; --bs-btn-active-color: #fff; --bs-btn-active-bg: #5b2fa8; --bs-btn-active-border-color: #5b2fa8; }
.att-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.att-grid, .att-cal { border-collapse: separate; border-spacing: 2px; width: 100%; }
.att-grid th, .att-cal th { font-size: 12px; text-align: center; color: var(--ws-ink-soft); font-weight: 600; padding: 4px 2px; }
.att-grid .att-name { text-align: left; min-width: 150px; position: sticky; left: 0; background: var(--ws-surface); padding: 4px 8px; }
.att-dow { font-size: 10px; font-weight: 400; color: var(--ws-ink-faint); }
.att-today { color: var(--ws-accent) !important; }
.att-cell { text-align: center; min-width: 34px; height: 34px; font-size: 12px; font-weight: 600; border-radius: 6px; border: 1px solid var(--ws-line-soft); }
.att-cal .att-cell { height: 64px; min-width: 80px; font-size: 14px; }
/* Present cell: From on top, To underneath. */
.att-cell .att-t { display: block; font-size: 10px; line-height: 1.15; letter-spacing: -0.2px; }
.att-cal .att-cell .att-t { font-size: 13px; line-height: 1.3; }
.att-editable { cursor: pointer; }
.att-editable:hover { outline: 2px solid var(--ws-accent); }
.att-blank { background: transparent; }

@media print {
  .ws-sidebar, .ws-topbar, .no-print { display: none !important; }
  .ws-main { margin-left: 0 !important; }
  .ws-page { padding: 0 !important; }
}

/* =========================================================================
   Inspection checklist (work order → Inspection tab)
   ========================================================================= */
.ws-insp-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-insp-summary .badge { font-weight: 600; font-size: 12px; padding: 6px 10px; }
.ws-insp-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ws-line-soft); }
.ws-insp-row:last-child { border-bottom: 0; }
.ws-insp-toggle { display: flex; gap: 6px; flex-shrink: 0; }
.ws-insp-btn {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ws-line); background: var(--ws-surface); color: var(--ws-ink-faint); font-size: 18px; padding: 0;
}
.ws-insp-btn:hover:not(:disabled) { border-color: var(--ws-ink-faint); }
.ws-insp-btn--bad.active { background: var(--st-cancelled); border-color: var(--st-cancelled); color: #fff; }
.ws-insp-btn--ok.active  { background: var(--st-delivered); border-color: var(--st-delivered); color: #fff; }
.ws-insp-btn:disabled { opacity: 1; cursor: default; }
.ws-insp-btn:disabled:not(.active) { opacity: .35; }
.ws-insp-main { flex: 1; min-width: 0; }
.ws-insp-name { font-weight: 600; font-size: 14.5px; word-break: break-word; }
.ws-insp-tools { margin-left: auto; display: flex; gap: 2px; flex-shrink: 0; }
.ws-insp-tools .btn { padding: 2px 7px; color: var(--ws-ink-faint); }
.ws-insp-tools .btn:hover { color: var(--ws-ink); }
.ws-insp-note { resize: vertical; min-height: 34px; }
.ws-insp-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ws-insp-photo { position: relative; width: 76px; height: 76px; border-radius: var(--ws-r); overflow: hidden; border: 1px solid var(--ws-line); }
.ws-insp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-insp-photo .ws-insp-photo__del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0;
}
.ws-insp-add-photo {
  width: 76px; height: 76px; border-radius: var(--ws-r); border: 2px dashed var(--ws-line); color: var(--ws-ink-faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; margin: 0;
}
.ws-insp-add-photo:hover { border-color: var(--ws-accent); color: var(--ws-accent); }
.ws-insp-add-photo i { font-size: 20px; }
.ws-insp-row.is-saving { opacity: .7; }
/* "4 wheel values" item: car drawing with four inputs (geometry set inline from the page JS). */
.ws-insp-wheels { position: relative; margin: 6px 0 4px; max-width: 100%; }
.ws-insp-wheels > img { position: absolute; pointer-events: none; }
.ws-insp-wheels__in { position: absolute; text-align: center; font-weight: 700; font-size: 1rem; border: 1.5px solid #333; border-radius: 3px; background: #e8ece9; color: #111; padding: 0 4px; }
.ws-insp-wheels__in:focus { outline: 2px solid var(--bs-primary, #0d6efd); outline-offset: 1px; background: #fff; }
.ws-insp-wheels__in:disabled { opacity: 1; }
.ws-insp-wheels__lbl { position: absolute; display: flex; align-items: center; width: 22px; justify-content: center; font-size: .75rem; color: var(--bs-secondary-color, #777); }
