/* Northwest Workforce Dashboard — SRG Global theme
   Palette mirrors Southwest Shutdowns for consistency. */

:root {
  /* Brand */
  --srg-red: #E30613;
  --srg-red-dark: #B50510;
  --srg-red-soft: #FDECEE;
  --srg-blue: #1D4ED8;
  --srg-blue-soft: #EFF6FF;

  /* Text */
  --srg-dark: #1A1A1A;
  --srg-grey: #595959;
  --srg-grey-2: #8C8C8C;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --srg-light: #F5F5F5;
  --srg-border: #E5E5E5;

  /* Status */
  --ok: #16A34A;       --ok-soft: #E7F6EC;
  --warn: #F59E0B;     --warn-soft: #FEF3D7;
  --bad: #DC2626;      --bad-soft: #FDECEE;

  /* Company identity (Southwest siblings) */
  --co-covalent: #3A7849;
  --co-tronox: #3D4250;
  --co-csbp: #1F4E79;

  /* Callout (dashed "next" tiles) */
  --callout-fill: #EAF6F5;
  --callout-line: #23B1A5;

  /* Northwest-specific client dots */
  --fortescue: #6B3E8C;
  --rio: #C0392B;
  --bhp: #0E7C4A;
  --royhill: #1F4E79;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-2);
  color: var(--srg-dark);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--srg-red); text-decoration: none; }
a:hover { color: var(--srg-red-dark); text-decoration: underline; }

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 0;
  padding: 20px 32px 0;
}
.site-header .brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}
.site-header .brand-block { flex: 1; min-width: 0; }
.site-header .breadcrumb {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--srg-blue);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.site-header .breadcrumb .sep { color: var(--srg-blue); opacity: 0.35; }
.site-header h1 {
  font-size: 44px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--srg-dark);
  line-height: 1;
}
.site-header .subtitle {
  color: var(--srg-grey);
  font-size: 13px;
}
.site-header .srg-logo-img {
  height: 52px;
  width: auto;
  display: block;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Horizontal meta strip below brand row */
.meta-strip {
  display: flex;
  gap: 0;
  padding: 10px 0;
  border-top: 1px solid var(--srg-border);
  border-bottom: 1px solid var(--srg-border);
  flex-wrap: wrap;
}
.meta-item {
  padding: 4px 24px 4px 0;
  margin-right: 24px;
  border-right: 1px solid var(--srg-border);
}
.meta-item:last-child { border-right: 0; }
.meta-item .meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--srg-grey-2);
  margin-bottom: 2px;
}
.meta-item .meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--srg-dark);
}

/* ---------- Page navigation (tab underline style) ---------- */

.page-nav {
  display: flex;
  gap: 0;
  margin-top: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--srg-border);
}
.page-nav a,
.page-nav-active {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 18px;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  background: transparent;
  display: inline-block;
}
.page-nav a {
  color: var(--srg-grey);
}
.page-nav a:hover {
  color: var(--srg-dark);
  border-bottom-color: var(--srg-border);
  text-decoration: none;
}
.page-nav-active {
  color: var(--srg-dark);
  border-bottom-color: var(--srg-red);
  cursor: default;
  font-weight: 700;
}

/* ---------- Filter strip ---------- */

.filter-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--srg-border);
  padding: 12px 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srg-grey);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--srg-border);
  border-radius: 3px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}
.filter-chip:hover { border-color: var(--srg-red); color: var(--srg-red); }
.filter-chip.active {
  background: var(--srg-red);
  border-color: var(--srg-red);
  color: #fff;
  font-weight: 600;
}
.filter-strip select {
  padding: 4px 8px;
  border: 1px solid var(--srg-border);
  border-radius: 4px;
  font: inherit;
  background: var(--surface);
}
.filter-strip .toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--srg-grey);
  cursor: pointer;
}
.search-input {
  padding: 4px 8px;
  border: 1px solid var(--srg-border);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  background: var(--surface);
  width: 160px;
}
.search-input:focus {
  outline: none;
  border-color: var(--srg-red);
}

/* ---------- Stale data banner ---------- */

.stale-banner {
  display: none;
  background: var(--warn-soft);
  border-bottom: 1px solid var(--warn);
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 32px;
  text-align: center;
}

/* ---------- Main layout ---------- */

main {
  padding: 24px 32px 64px;
  max-width: 1600px;
  margin: 0 auto;
}

section.card {
  background: var(--surface);
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  overflow: hidden;
}

section.card > header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--srg-border);
  border-left: 3px solid var(--srg-blue);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
section.card > header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srg-dark);
}
section.card > header h2 .section-number {
  color: var(--srg-blue);
  margin-right: 6px;
  font-weight: 800;
}
section.card > header .hint {
  font-size: 12px;
  color: var(--srg-grey-2);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
section.card > header .section-desc {
  flex-basis: 100%;
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--srg-grey);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
}
section.card > .body { padding: 18px 20px 20px; }

/* ---------- KPI tiles ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  padding: 14px 16px 16px;
  position: relative;
  overflow: hidden;
}
.kpi-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--srg-blue);
}
.kpi-tile .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srg-grey);
  font-weight: 700;
}
.kpi-tile .value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin: 4px 0 2px;
  color: var(--srg-dark);
}
.kpi-tile .unit { font-size: 14px; font-weight: 600; color: var(--srg-grey); margin-left: 4px; }
.kpi-tile .delta { font-size: 12px; color: var(--srg-grey); }
.kpi-tile .delta.up { color: var(--ok); }
.kpi-tile .delta.down { color: var(--bad); }
.kpi-tile.clickable { cursor: pointer; }
.kpi-tile.clickable:hover { border-color: var(--srg-red); box-shadow: var(--shadow-md); }
.kpi-tile.alert::before { background: var(--bad); }
.kpi-tile.alert .value { color: var(--bad); }

/* ---------- Tables ---------- */

.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tbl th, .tbl td {
  text-align: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--srg-border);
  vertical-align: middle;
}
.tbl td.pos-name, .tbl td.worker-name, .tbl td.subtotal-label,
.tbl tr.disc-group-header td, .tbl td.cell-left, .tbl th.cell-left { text-align: left; }
.tbl thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--srg-grey);
  font-weight: 700;
  background: var(--surface-2);
  border-bottom: 1px solid var(--srg-border);
  position: sticky;
  top: 0;
}
.tbl tbody tr:hover { background: var(--srg-light); }
.tbl td.num, .tbl th.num { text-align: center; font-variant-numeric: tabular-nums; }
.tbl td.pos-name { font-weight: 600; white-space: nowrap; }
.tbl tr.disc-group-header { background: var(--srg-light); }
.tbl tr.disc-group-header td.disc-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srg-grey);
  padding: 6px 10px 5px;
  border-top: 1px solid var(--srg-border);
}
.tbl td.clickable-pos { cursor: pointer; user-select: none; }
.tbl tr:hover td.clickable-pos { color: var(--srg-red); }
.pos-toggle { display: inline-block; width: 12px; margin-right: 4px; color: var(--srg-grey-2); }
.tbl tr.disc-worker-row td { background: #fcfcfc; }
.tbl td.worker-ret-cell .hc { font-size: 12px; }
.tbl tr.disc-subtotal { background: var(--srg-light); border-top: 1px solid var(--srg-border); }
.tbl tr.disc-subtotal td { border-top: 1px solid var(--srg-border); font-style: normal; }
.tbl tr.disc-subtotal td.subtotal-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--srg-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-left: 10px;
}
.tbl tr.disc-subtotal .hc { font-weight: 700; color: var(--srg-dark); }
.tbl tr.disc-subtotal .hrs { color: var(--srg-grey-2); }
.tbl td.pos-indent { padding-left: 22px; }
.tbl td.pos-indent-2 { padding-left: 38px; }
.tbl td.worker-name { font-weight: 600; }
.tbl td.worker-name a { color: var(--srg-dark); }
.tbl td.worker-name a:hover { color: var(--srg-red); }

/* Position × month cells */
.tbl td.ret-cell {
  text-align: center;
  min-width: 80px;
  border-right: 1px solid var(--srg-border);
}
.ret-cell .hc {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ret-cell .hrs {
  font-size: 11px;
  color: var(--srg-grey);
  font-variant-numeric: tabular-nums;
}
.ret-cell.future {
  background-color: var(--callout-fill);
  font-style: italic;
}
.ret-cell.future .hc { color: var(--srg-grey); }
.ret-cell.current { border-left: 2px solid var(--srg-red); border-right: 2px solid var(--srg-red); }
.ret-cell.is-ok   { background-color: rgba(22,163,74,0.10); }
.ret-cell.is-warn { background-color: rgba(245,158,11,0.12); }
.ret-cell.is-risk { background-color: rgba(220,38,38,0.10); }

.tbl th.month-past  { color: var(--srg-grey); }
.tbl th.month-cur   { color: var(--srg-red); }
.tbl th.month-future { color: var(--srg-grey-2); font-style: italic; }
.tbl th.div-future { border-left: 2px solid var(--srg-red); }
.tbl td.div-future { border-left: 2px solid var(--srg-red); }

/* ---------- Churn badge / traffic lights ---------- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.ok   { background: var(--ok-soft); color: #14532d; }
.badge.warn { background: var(--warn-soft); color: #78350f; }
.badge.risk { background: var(--bad-soft); color: #7f1d1d; }
.badge.muted { background: var(--srg-light); color: var(--srg-grey); }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.dot.fortescue { background: var(--fortescue); }
.dot.rio { background: var(--rio); }
.dot.bhp { background: var(--bhp); }
.dot.royhill { background: var(--royhill); }

/* Sparkline inline SVG */
.spark { display: inline-block; vertical-align: middle; }
.spark path { fill: none; stroke: var(--srg-red); stroke-width: 1.5; }
.spark .dot { fill: var(--srg-red); }

/* ---------- Per-client tables ---------- */

details.client-block {
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  margin-top: 12px;
  overflow: hidden;
}
details.client-block[open] { box-shadow: var(--shadow-sm); }
details.client-block summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  background: var(--surface-2);
  border-bottom: 1px solid var(--srg-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
details.client-block summary::-webkit-details-marker { display: none; }
details.client-block summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--srg-grey-2);
  transition: transform 0.15s;
}
details.client-block[open] summary::after { transform: rotate(90deg); }
details.client-block .body { padding: 14px 16px 18px; overflow-x: auto; }

/* ---------- Compliance table ---------- */

.compliance-cell-over  { background: rgba(220,38,38,0.14); color: #7f1d1d; }
.compliance-cell-warn  { background: rgba(245,158,11,0.14); color: #78350f; }
.compliance-cell-dim   { color: var(--srg-grey-2); }
td.compliance-total    { font-variant-numeric: tabular-nums; }
tr.compliance-over td  { border-left-color: transparent; }
tr.compliance-over     { border-left: 3px solid var(--bad); }
tr.compliance-warn     { border-left: 3px solid var(--warn); }

/* ---------- Retention matrix ---------- */
.matrix-worked { color: #166534; font-weight: 800; background: rgba(22,163,74,0.10); }
.matrix-declined { color: #991b1b; font-weight: 800; background: rgba(220,38,38,0.12); }
.matrix-empty { color: var(--srg-grey-2); }

/* ---------- Fulfilment fill-rate cell tints ---------- */
.ful-cell-ok   { background-color: rgba(22,163,74,0.10);  }
.ful-cell-warn { background-color: rgba(245,158,11,0.12); }
.ful-cell-risk { background-color: rgba(220,38,38,0.10);  }

/* ---------- Charts ---------- */

.chart-box { position: relative; height: 320px; }
.chart-box.small { height: 220px; }

/* ---------- Buttons / controls ---------- */

button, .btn {
  background: var(--surface);
  border: 1px solid var(--srg-border);
  border-radius: 4px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
button:hover, .btn:hover {
  border-color: var(--srg-red);
  color: var(--srg-red);
}
button.primary, .btn.primary {
  background: var(--srg-red);
  color: #fff;
  border-color: var(--srg-red);
}
button.primary:hover, .btn.primary:hover { background: var(--srg-red-dark); color: #fff; }

.table-scroll { overflow-x: auto; }

/* ---------- Worker page ---------- */

.worker-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  border-left: 4px solid var(--srg-red);
  margin-bottom: 20px;
}
.worker-head .who h1 { margin: 0 0 4px; font-size: 24px; }
.worker-head .who .meta { color: var(--srg-grey); font-size: 13px; }
.worker-head .back { margin-left: auto; }

.worker-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .worker-kpis { grid-template-columns: repeat(2, 1fr); } }

.client-timeline {
  display: grid;
  gap: 2px;
  margin-top: 6px;
}
.client-timeline .row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
}
.client-timeline .cell {
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.client-timeline .cell.none { background: var(--srg-light); color: var(--srg-grey-2); }
.client-timeline .cell.fortescue { background: var(--fortescue); }
.client-timeline .cell.rio { background: var(--rio); }
.client-timeline .cell.bhp { background: var(--bhp); }
.client-timeline .cell.royhill { background: var(--royhill); }
.client-timeline .cell.committed { opacity: 0.65; }
.client-timeline .labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--srg-grey-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- Discipline rollup (fatigue page) ---------- */

.discipline-rollup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.disc-rollup-tile {
  background: var(--surface-2);
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  padding: 8px 14px;
  min-width: 180px;
  flex: 1 1 180px;
}
.disc-rollup-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--srg-dark);
  margin-bottom: 5px;
}
.disc-rollup-counts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- Worker detail page ---------- */

.back-link {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--srg-grey);
}
.back-link:hover { color: var(--srg-red); }
.worker-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--srg-grey);
  margin-top: 4px;
}
.worker-meta-row .sep { color: var(--srg-border); }
.worker-flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.worker-info-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--srg-border);
}
.section-subhead {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--srg-grey);
  margin: 0 0 6px;
}

/* ---------- Utility ---------- */

.row-expand {
  background: var(--surface-2);
  border-left: 3px solid var(--srg-red);
}
.row-expand td { padding: 6px 10px; }
.muted { color: var(--srg-grey); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--srg-light);
  color: var(--srg-grey);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.alert { background: var(--bad-soft); color: var(--bad); }
.pill.fwd { background: var(--callout-fill); color: var(--callout-line); }
.pill.now { background: var(--srg-red-soft); color: var(--srg-red-dark); }

/* ---------- Fulfilment drill-down ---------- */

.drilldown-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--srg-border);
}
.drilldown-filters .filter-group { display: flex; flex-direction: column; gap: 4px; }
.drilldown-filters label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--srg-grey-2);
}
.drilldown-filters select {
  padding: 6px 10px;
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  background: #fff;
  color: var(--srg-dark);
  font-size: 13px;
  min-width: 180px;
}

.drilldown-tree details {
  border: 1px solid var(--srg-border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}
.drilldown-tree details > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  user-select: none;
}
.drilldown-tree details > summary::-webkit-details-marker { display: none; }
.drilldown-tree details > summary::before {
  content: "\25B8";
  color: var(--srg-grey-2);
  transition: transform 0.15s ease;
  font-size: 11px;
  width: 10px;
  flex: none;
}
.drilldown-tree details[open] > summary::before { transform: rotate(90deg); }
.drilldown-tree details > summary:hover { background: var(--srg-light); }

.dd-client > summary { background: var(--srg-light); }
.dd-client-name { font-size: 14px; }
.dd-client-stat,
.dd-site-stat,
.dd-sd-stat { margin-left: auto; font-weight: 600; color: var(--srg-grey); font-size: 13px; }

.dd-sites { padding: 6px 14px 12px 26px; }
.dd-site { background: #fcfcfc; }
.dd-site-name { font-size: 13px; color: var(--srg-dark); }

.dd-shutdowns { padding: 4px 12px 10px 22px; }
.dd-shutdown { background: #fff; }
.dd-shutdown > summary { font-weight: 500; font-size: 13px; }
.dd-sd-name { font-weight: 600; }
.dd-sd-meta { color: var(--srg-grey-2); font-size: 12px; margin-left: 6px; }
.dd-sd-gap {
  display: inline-block;
  padding: 0 6px;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--srg-red-soft);
  color: var(--srg-red-dark);
  border-radius: 4px;
}

.dd-pos-list { list-style: none; margin: 0; padding: 4px 14px 12px 28px; }
.dd-position { margin: 4px 0; }
.dd-pos-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--srg-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  color: var(--srg-dark);
  font-family: inherit;
}
.dd-pos-btn:hover { border-color: var(--srg-red); color: var(--srg-red); }
.dd-pos-btn.is-open { border-color: var(--srg-red); background: var(--srg-red-soft); color: var(--srg-red-dark); }
.dd-pos-btn.is-open .dd-caret { transform: rotate(90deg); }
.dd-caret { display: inline-block; width: 10px; color: var(--srg-grey-2); transition: transform 0.15s ease; }
.dd-pos-name { font-weight: 600; flex: 1; }
.dd-pos-count { font-variant-numeric: tabular-nums; color: var(--srg-grey); }
.dd-pos-gap-tag {
  background: var(--srg-red-soft);
  color: var(--srg-red-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
}
.dd-pos-btn.dd-pos-ok .dd-pos-count { color: #0E7C4A; }

.dd-candidates {
  margin: 6px 0 4px 18px;
  padding: 10px 14px;
  background: var(--srg-light);
  border-left: 3px solid var(--srg-red);
  border-radius: 4px;
}
.dd-cand-head { margin-bottom: 8px; }
.dd-cand-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px 14px;
}
.dd-cand-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid var(--srg-border);
  border-radius: 4px;
}
.dd-cand-name { font-weight: 600; color: var(--srg-dark); }
.dd-cand-name:hover { color: var(--srg-red); text-decoration: underline; }
.dd-cand-pos { font-size: 12px; }
.dd-cand-meta { color: var(--srg-grey-2); font-size: 12px; }
.dd-cand-empty { padding: 4px 0; }
