/* work.css — the workspace around the builder: the app bar, the dashboard,
   the calendar and the board. None of it ever prints. */

/* The workspace navigation lives down the left as a sidebar. */
.appbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 210px;
  height: 100%;
  padding: 14px 10px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  overflow-y: auto;
}

.brand { display: flex; align-items: baseline; gap: 6px; padding: 2px 8px 6px; }
.brand-mark { color: var(--brand); font-size: 15px; }
.brand-name { font-weight: 800; letter-spacing: .01em; }
.brand-sub { color: var(--faint); font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.nav-btn:hover { background: var(--panel-2); color: var(--text); }
.nav-btn.on { background: var(--panel-2); color: var(--text); border-color: var(--line); box-shadow: inset 2px 0 0 var(--brand); }
.nav-icon { font-size: 14px; width: 18px; text-align: center; flex: none; }

.nav-badge {
  display: none;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.nav-badge.on { display: inline-block; }
.nav-badge.bad { background: var(--danger); }

/* The search box and the small controls sit at the foot of the sidebar: the
   search spans the width, the icon buttons wrap into a row beneath it. */
.appbar-right {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.searchbar { flex: 0 0 100%; overflow: hidden; }
.appbar-right .who { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.conn { font-size: 11px; color: var(--faint); cursor: default; }
.conn.ok { color: var(--good); }
.conn.warn { color: var(--warn); }
.conn.bad { color: var(--danger); }

.view { flex: 1; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body { display: flex; flex-direction: row; }

.builder { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.builder .shell { height: auto; flex: 1; min-height: 0; }

.boot-error {
  margin: 40px;
  padding: 20px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--danger);
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 12px;
}

/* ─────────── dashboard ─────────── */

.dash { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }

.dash-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto 20px;
}
.dash-title { margin: 0; font-size: 24px; font-weight: 800; }
.dash-sub { margin: 4px 0 0; color: var(--dim); font-size: 13px; }
.dash-actions { margin-left: auto; display: flex; gap: 8px; }

.dash-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 700; }
.card-hint { color: var(--faint); font-size: 11px; }
.card-head .link-btn { margin-left: auto; }
.card-body { padding: 8px; }
.card-empty { margin: 0; padding: 18px 8px; color: var(--faint); font-size: 12px; text-align: center; }

.link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
}
.link-btn:hover { background: var(--panel); text-decoration: underline; }
.link-btn.more { display: block; width: 100%; margin-top: 4px; }

.row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.row:hover { background: var(--panel-2); }
.row-icon { width: 16px; text-align: center; font-size: 12px; }
.row-main { flex: 1; min-width: 0; }
.row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
  color: var(--faint);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-when { color: var(--faint); font-size: 11px; white-space: nowrap; }
.row-when.urgent { color: var(--danger); font-weight: 700; }
.row.task .row-main { cursor: pointer; }
.pri { font-size: 10px; font-weight: 700; }

.tick { accent-color: var(--brand); cursor: pointer; }

.tag {
  padding: 0 5px;
  border-radius: 3px;
  background: var(--line);
  color: var(--dim);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag.bad { background: var(--danger); color: #fff; }

.warn-strip {
  margin: 2px 0 8px;
  padding: 7px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--warn);
  background: rgba(183, 121, 31, .1);
  color: var(--warn);
  cursor: pointer;
  font-size: 11.5px;
}
.warn-strip:hover { background: rgba(183, 121, 31, .18); }

.stat-row { display: flex; gap: 8px; margin-bottom: 10px; }
.stat-box {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
}
.stat-box.bad { border-color: var(--danger); }
.stat-box.warn { border-color: var(--warn); }
.stat-n { display: block; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-l { display: block; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.stat-box.bad .stat-n { color: var(--danger); }
.stat-box.warn .stat-n { color: var(--warn); }

.load { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.load-row { display: flex; align-items: center; gap: 8px; }
.load-n { color: var(--faint); font-size: 11px; }

.quick .field { font-size: 12px; }

.pipe-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.pipe-label { width: 62px; color: var(--dim); font-size: 11.5px; }
.pipe-track { flex: 1; height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.pipe-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.pipe-fill.draft { background: #9aa5b1; }
.pipe-fill.sent { background: #3d5a80; }
.pipe-fill.accepted { background: var(--good); }
.pipe-val { width: 108px; text-align: right; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pipe-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.pipe-total b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pipe-rate { margin-left: auto; color: var(--faint); font-size: 11px; }

/* ─────────── chips ─────────── */

.chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--dim);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip.sm { padding: 0 6px; font-size: 9.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip.pick {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--dim);
  cursor: pointer;
  padding: 3px 10px;
}
.chip.pick.on { color: #fff; border-color: transparent; }

/* ─────────── calendar ─────────── */

.cal { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.cal-bar, .board-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex: 0 0 auto;
}
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-title { margin: 0 0 0 8px; font-size: 15px; font-weight: 700; }

.clash-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(192, 57, 43, .12);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

.month {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 1px;
  padding: 1px;
  background: var(--line);
  overflow: auto;
  min-height: 0;
}
.dow {
  padding: 6px;
  background: var(--panel-2);
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: center;
}
.month .dow { grid-row: 1; }

.day {
  min-height: 96px;
  padding: 4px;
  background: var(--panel);
  overflow: hidden;
}
.day.out { background: var(--panel-2); opacity: .55; }
.day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.day.clash { background: rgba(192, 57, 43, .06); }
.day.over { box-shadow: inset 0 0 0 2px var(--sel); }
.day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.day-n { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.day.today .day-n { color: var(--brand); }
.day-clash { color: var(--danger); font-size: 10px; }
.day-more {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
  padding: 1px 4px;
}
.day-more:hover { color: var(--text); text-decoration: underline; }

.ev {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  padding: 2px 5px;
  border-left: 3px solid var(--dim);
  border-radius: 3px;
  background: var(--panel-2);
  cursor: pointer;
  font-size: 10.5px;
  overflow: hidden;
}
.ev:hover { background: var(--line); }
.ev.derived { border-left-style: dashed; }
.ev-icon { flex: 0 0 auto; font-size: 9px; }
.ev-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-auto {
  flex: 0 0 auto;
  padding: 0 3px;
  border-radius: 2px;
  background: var(--line);
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.ev.task { background: transparent; border-left-style: dotted; }

.week {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  padding: 1px;
  background: var(--line);
  overflow: auto;
  min-height: 0;
}
.week-col { padding: 6px; background: var(--panel); min-height: 200px; }
.week-col.today { box-shadow: inset 0 0 0 2px var(--brand); }
.week-col.clash { background: rgba(192, 57, 43, .06); }
.week-head {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.week-dow { color: var(--faint); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.week-n { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.week-empty { margin: 0; color: var(--faint); font-size: 11px; text-align: center; padding: 10px 0; }

.agenda { flex: 1; overflow-y: auto; padding: 14px 22px 40px; max-width: 900px; width: 100%; margin: 0 auto; }
.agenda-month {
  margin: 16px 0 6px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.agenda-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 5px;
  background: var(--panel);
  cursor: pointer;
}
.agenda-row:hover { border-color: var(--brand); }
.agenda-row.clash { border-left: 3px solid var(--danger); }
.agenda-date { width: 40px; text-align: center; }
.ad-day { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ad-dow { display: block; color: var(--faint); font-size: 9.5px; text-transform: uppercase; }
.agenda-main { flex: 1; min-width: 0; }
.agenda-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.agenda-sub { margin-top: 2px; color: var(--faint); font-size: 11.5px; }
.agenda-total { font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; }

.day-list { display: flex; flex-direction: column; gap: 4px; }
.day-list .ev { font-size: 12px; padding: 6px 8px; }

/* ─────────── the board ─────────── */

.board-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.board-bar .search { width: 180px; }
.board-bar .pick { width: 140px; }

.board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px;
  overflow-x: auto;
  min-height: 0;
}

.col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.col.over { border-color: var(--brand); background: var(--panel); }
.col-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
}
.col-name { font-size: 12px; font-weight: 700; }
.col-count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--line);
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.col-head .icon-btn { margin-left: auto; }
.col-body { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.col-empty { margin: 0; padding: 24px 8px; color: var(--faint); font-size: 11.5px; text-align: center; }

.note {
  position: relative;
  padding: 9px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .16);
  color: #1f2933;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.note:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 24, 40, .18); }
.note.dragging { opacity: .45; }
.note.done { opacity: .62; }
.note.done .note-title { text-decoration: line-through; }
.note.late { box-shadow: 0 0 0 2px var(--danger), 0 1px 3px rgba(16, 24, 40, .16); }

.note-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.note-pri { width: 8px; height: 8px; border-radius: 50%; }
.note-tools { margin-left: auto; opacity: 0; }
.note:hover .note-tools { opacity: 1; }
.note-tools .icon-btn { color: #5a6472; }
.note-tools .icon-btn:hover { background: rgba(0, 0, 0, .1); }

.note-title { font-size: 12.5px; font-weight: 700; line-height: 1.35; word-break: break-word; }
.note-body {
  margin-top: 3px;
  color: #4a5460;
  font-size: 11px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-check { margin-top: 4px; color: #5a6472; font-size: 10.5px; }
.note-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 7px; }
.note-ev {
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .07);
  color: #4a5460;
  font-size: 9.5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-due { margin-left: auto; color: #5a6472; font-size: 10px; font-weight: 600; white-space: nowrap; }
.note-due.urgent { color: var(--danger); font-weight: 800; }

.checklist { display: flex; flex-direction: column; gap: 4px; }
.check-row { display: flex; align-items: center; gap: 6px; }
.check-row .field { flex: 1; padding: 3px 6px; font-size: 12px; }
.check-col { display: flex; flex-direction: column; gap: 5px; }

/* ─────────── reminders dialog ─────────── */

.rem-status {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}
.rem-line { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.ok { background: var(--good); }
.dot.off { background: var(--danger); }
.rem-line .link-btn { margin-left: auto; }

@media print {
  .appbar, .cal, .dash, .board-wrap { display: none !important; }
}

/* ─────────── games: the run sheet ─────────── */

.games-wrap, .inv-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pick.wide { width: 260px; }

.game-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.gh-main { flex: 1; min-width: 0; }
.gh-main h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.gh-sub { margin: 3px 0 9px; color: var(--dim); font-size: 12px; }
.gh-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.prog { display: flex; align-items: center; gap: 9px; max-width: 380px; }
.prog-track { flex: 1; height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.prog-fill { height: 100%; background: var(--good); border-radius: 4px; transition: width .3s; }
.prog-text { color: var(--faint); font-size: 11px; white-space: nowrap; }

.now {
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(193, 82, 29, .1);
  border: 1px solid rgba(193, 82, 29, .3);
  text-align: right;
}
.now.next { background: var(--panel-2); border-color: var(--line); }
.now.idle { background: transparent; border-color: transparent; }
.now-label {
  display: block;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.now-game { display: block; font-size: 13px; font-weight: 700; }
.now-strip {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(193, 82, 29, .12);
  color: #c1521d;
  font-size: 11.5px;
}
.risk { color: var(--danger); font-size: 11px; font-weight: 700; }

.sheet { flex: 1; overflow-y: auto; padding: 12px 18px 40px; }

.grow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--dim);
  border-radius: 8px;
  background: var(--panel);
}
.grow:hover { border-color: var(--brand); }
.grow.done { opacity: .66; }
.grow.done .grow-title { text-decoration: line-through; }
.grow.running { box-shadow: 0 0 0 2px rgba(193, 82, 29, .2); }
.grow.cancelled { opacity: .45; }
.grow.notready { background: rgba(192, 57, 43, .03); }

.grow-slot { width: 54px; text-align: center; flex: 0 0 54px; }
.slot { display: block; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dur { display: block; color: var(--faint); font-size: 10px; }

.grow-main { flex: 1; min-width: 0; cursor: pointer; }
.grow-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; }
.gstat { font-size: 12px; }
.grow-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 3px; }
.kit {
  padding: 0 6px;
  border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
}
.kit.missing { border-color: var(--danger); color: var(--danger); }
.grow-why { margin-top: 4px; color: var(--danger); font-size: 11px; }
.grow-result { display: flex; gap: 10px; margin-top: 4px; font-size: 11.5px; }
.grow-act { display: flex; align-items: center; gap: 4px; }

.note.game { color: #1f2933; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.check.sug { display: flex; align-items: baseline; gap: 8px; padding: 5px 2px; }

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  text-align: center;
  color: var(--dim);
}
.empty-state p { margin: 0; }

/* ─────────── inventory ─────────── */

.on-date { display: flex; align-items: center; gap: 6px; }
.on-date .field { width: 140px; }
.on-date .f-label { white-space: nowrap; }

.over-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: rgba(192, 57, 43, .1);
  border-bottom: 1px solid rgba(192, 57, 43, .25);
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
}
.over-strip:hover { background: rgba(192, 57, 43, .16); }
.over-strip .link-btn { margin-left: auto; color: var(--danger); }
.warn-strip.bad {
  border-left-color: var(--danger);
  background: rgba(192, 57, 43, .1);
  color: var(--danger);
}

.inv-body { flex: 1; display: grid; grid-template-columns: 1fr 320px; min-height: 0; }
.inv-main { overflow-y: auto; padding: 14px; }
.inv-side {
  overflow-y: auto;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 11px;
}

.prod {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  cursor: pointer;
}
.prod:hover { border-color: var(--brand); }
.prod.over { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.prod.low { border-color: var(--warn); }
.prod.off { opacity: .58; }

.prod-top { display: flex; align-items: flex-start; gap: 8px; }
.prod-cat { font-size: 15px; color: var(--brand); }
.prod-name { flex: 1; min-width: 0; }
.pn { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.psku { color: var(--faint); font-size: 10.5px; margin-top: 1px; }

.prod-avail { margin: 9px 0 8px; }
.avail-n { font-size: 11.5px; color: var(--dim); }
.avail-n b { font-size: 19px; font-variant-numeric: tabular-nums; color: var(--text); }
.avail-n.good b { color: var(--good); }
.avail-n.warn b { color: var(--warn); }
.avail-n.bad b, .avail-n.none b { color: var(--danger); }
.avail-bar { height: 5px; margin: 5px 0 4px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.avail-fill { height: 100%; background: var(--sel); border-radius: 3px; }
.avail-fill.warn { background: var(--warn); }
.avail-fill.bad { background: var(--danger); }
.avail-sub { color: var(--faint); font-size: 10.5px; }
.avail-sub .bad { color: var(--danger); font-weight: 700; }

.prod-foot { display: flex; align-items: center; gap: 7px; }
.prod-rate { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.prod-cost { color: var(--warn); font-size: 10.5px; }
.prod-foot .btn { margin-left: auto; }

.verdict {
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.verdict.ok { background: rgba(47, 133, 90, .12); color: var(--good); }
.verdict.bad { background: rgba(192, 57, 43, .1); color: var(--danger); }

.kit-list { display: flex; flex-direction: column; gap: 5px; }
.kit-row { display: flex; gap: 6px; align-items: center; }
.kit-row .field { flex: 1; }
.field.qty { width: 64px; flex: 0 0 64px; }
.field.mini { padding: 2px 5px; font-size: 11px; width: auto; }

.over-allocs { margin-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.over-alloc { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.oa-ev { flex: 1; color: var(--dim); }

/* ─────────── reports ─────────── */
.reports { padding: 18px 22px; }
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.rep-kpi { background: var(--panel, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 12px 14px; }
.rep-kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim, #6b7280); }
.rep-kpi-value { font-size: 22px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.rep-kpi-sub { font-size: 11px; color: var(--dim, #9aa5b1); }
.rep-section { margin-bottom: 26px; }
.rep-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim, #52606d); margin: 0 0 10px; }
.rep-empty { color: var(--dim, #9aa5b1); font-size: 13px; padding: 8px 0; }
.rep-bars { display: flex; flex-direction: column; gap: 7px; }
.rep-bar-row { display: grid; grid-template-columns: 90px 1fr 110px; align-items: center; gap: 10px; }
.rep-bar-label { font-size: 12px; color: var(--dim, #52606d); }
.rep-bar-track { position: relative; height: 16px; background: var(--soft, #f2f5f8); border-radius: 4px; overflow: hidden; }
.rep-bar { position: absolute; top: 0; left: 0; height: 100%; border-radius: 4px; }
.rep-bar.billed { background: #b7c7d8; }
.rep-bar.received { background: #2f6b4f; }
.rep-bar.pipe-accepted { background: #2f6b4f; }
.rep-bar.pipe-sent { background: #3d5a80; }
.rep-bar.pipe-draft { background: #b7c0cc; }
.rep-bar.pipe-rejected { background: #c0392b; }
.rep-bar-val { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text, #1f2933); }
.rep-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rep-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--line, #e5e7eb); color: var(--dim, #52606d); font-weight: 600; }
.rep-table td { padding: 6px 8px; border-bottom: 1px solid var(--line, #eef1f4); }
.rep-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rep-table td.good { color: #2f6b4f; }
.rep-table td.bad { color: #c0392b; }
.rep-click { cursor: pointer; }
.rep-click:hover { background: var(--soft, #f6f8fa); }

/* ─────────── crew roster ─────────── */
.crew { padding: 18px 22px; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.crew-card { background: var(--panel, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 14px; }
.crew-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.crew-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.crew-who { flex: 1; }
.crew-name { font-weight: 700; }
.crew-role { font-size: 11px; color: var(--dim, #6b7280); }
.crew-load { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.crew-load-track { flex: 1; height: 8px; background: var(--soft, #f2f5f8); border-radius: 4px; overflow: hidden; }
.crew-load-bar { height: 100%; background: #2f6b4f; border-radius: 4px; }
.crew-load-bar.hot { background: #c0392b; }
.crew-load-pct { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--dim); width: 36px; text-align: right; }
.crew-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
.crew-stat { text-align: center; }
.crew-stat-v { font-weight: 700; font-size: 15px; }
.crew-stat-v.bad { color: #c0392b; }
.crew-stat-l { font-size: 10px; color: var(--dim, #9aa5b1); text-transform: uppercase; }
.crew-strip { display: flex; gap: 2px; margin-bottom: 8px; }
.crew-day { flex: 1; height: 14px; border-radius: 2px; background: var(--soft, #eef1f4); }
.crew-day.on { background: #3d5a80; }
.crew-day.leave { background: #b7c0cc; }
.crew-day.clash { outline: 2px solid #c0392b; outline-offset: -2px; }
.crew-leaves { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; border-top: 1px solid var(--line, #eef1f4); padding-top: 6px; }
.crew-leave { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--dim, #52606d); }

/* ─────────── client CRM ─────────── */
.crm { display: grid; grid-template-columns: 260px 1fr; gap: 0; height: 100%; }
.crm-list { border-right: 1px solid var(--line, #e5e7eb); padding: 14px; overflow: auto; }
.crm-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; }
.crm-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.crm-item:hover { background: var(--soft, #f6f8fa); }
.crm-item.on { background: var(--soft, #eef3f0); box-shadow: inset 3px 0 0 #2f6b4f; }
.crm-item-co { font-weight: 600; font-size: 13px; }
.crm-item-sub { font-size: 11px; color: var(--dim, #9aa5b1); }
.crm-detail { padding: 20px 24px; overflow: auto; }
.crm-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.crm-detail-head h2 { flex: 1; margin: 0; }
.crm-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--dim, #52606d); font-size: 12.5px; margin-bottom: 16px; }
.crm-detail .rep-kpis { grid-template-columns: repeat(5, 1fr); }

.invoices { padding: 18px 22px; }

.expenses { padding: 18px 22px; }
.exp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.exp-top .rep-kpis { flex: 1; margin-bottom: 0; }

/* ─────────── activity log ─────────── */
.activity { padding: 18px 22px; }
.act-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.act-head .rep-title { margin: 0; }
.act-list { display: flex; flex-direction: column; }
.act-row { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line, #eef1f4); font-size: 13px; }
.act-ico { text-align: center; color: var(--dim, #7b8794); }
.act-ico.add { color: #2f6b4f; }
.act-ico.remove { color: #c0392b; }
.act-detail { color: var(--text, #1f2933); }
.act-who { color: var(--dim, #52606d); font-size: 12px; }
.act-when { color: var(--dim, #9aa5b1); font-size: 11px; font-variant-numeric: tabular-nums; }

.dispatch-row { display: flex; gap: 8px; }

/* brand logo — an uploaded logo replaces the text mark when present */
.brand-logo { max-width: 100%; height: auto; display: block; }
.brand.has-logo .brand-mark, .brand.has-logo .brand-name, .brand.has-logo .brand-sub { display: none; }
