/* JAGCOR Project Coordinator
   Design tokens mirror the JAGCOR Operations Hub (unchanged from the Supervisor Performance build). */
:root {
  --brand: #B12F32;          /* JAGCOR red, as used in the Operations Hub */
  --brand-dark: #8E2428;
  --brand-soft: #FAECEC;
  --ink: #1A1C1E;
  --ink-muted: #5F6670;
  --ink-subtle: #8A9099;
  --line: #E6E8EB;
  --canvas: #F6F7F8;
  --card: #FFFFFF;
  --ok: #22C55E;  --ok-text: #1F7A4D;  --ok-soft: #E7F4EC;
  --warn: #F59E0B; --warn-text: #9A6200; --warn-soft: #FDF3E1;
  --risk: #EF4444; --risk-text: #B42318; --risk-soft: #FDECEA;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --gap: 20px;
  --pad: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.tabular, .kpi-value, .ops-val, .dev-big { font-variant-numeric: tabular-nums; }
svg.lucide { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 32px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; justify-self: start; }
.brand-mark { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-word { font-size: 26px; font-weight: 700; line-height: 1; color: var(--ink); letter-spacing: -0.01em; }
.brand-sub { margin-top: 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-muted); white-space: nowrap; line-height: 1; }

.main-nav { display: flex; align-items: stretch; gap: 40px; }
.main-nav a {
  position: relative; display: flex; align-items: center;
  font-size: 15px; font-weight: 500; color: var(--ink-muted);
  transition: color .15s;
  white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--brand); transform: scaleX(0); transition: transform .2s ease-out;
}
.main-nav a:hover { color: var(--brand); }
.main-nav a:hover::after { transform: scaleX(1); opacity: .35; }
.main-nav a[aria-current="page"] { color: var(--brand); }
.main-nav a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }

.site-location { justify-self: end; align-self: center; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.proto-bar {
  border-top: 1px solid var(--line);
  text-align: center; font-size: 11.5px; color: var(--ink-subtle);
  padding: 6px 16px; background: #fff;
}

/* ---------- Shell & page head ---------- */
.shell { max-width: 1440px; margin: 0 auto; padding: 40px 32px 48px; }
.page > * + * { margin-top: 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-title { font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); }
.page-sub { margin-top: 8px; font-size: 18px; font-weight: 500; color: var(--brand); }
.page-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.date-nav { position: relative; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; color: var(--ink-muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--canvas); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.date-display {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 8px; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.date-display:hover { background: #fff; }
.date-display svg { color: var(--ink-subtle); }
.shift-chip { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 2px 6px; }

.popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--risk-text); }
.btn.danger.armed { background: var(--risk-text); border-color: var(--risk-text); color: #fff; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--brand); }
.link-btn:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }
.link-btn svg { width: 14px; height: 14px; }
.link-btn.danger { color: var(--risk-text); }

.data-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-muted); margin-top: 12px !important; }
.data-note svg { width: 14px; height: 14px; margin-top: 1px; color: var(--ink-subtle); }
.data-note strong { color: var(--ink); font-weight: 600; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--pad);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
.card-sub { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--brand); }
.head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); flex-shrink: 0;
}

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tag-demo { background: #F0F1F3; color: var(--ink-muted); }
.tag-user { background: var(--ok-soft); color: var(--ok-text); }
.tag-mixed { background: var(--warn-soft); color: var(--warn-text); }

/* KPI grid */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--gap); }
.kpi {
  display: grid; grid-template-rows: auto 1fr auto; min-height: 168px; padding: 22px 24px;
}
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kpi-title { font-size: 15px; font-weight: 500; color: var(--ink-muted); line-height: 1.3; }
.kpi-title .tag { margin-left: 6px; vertical-align: 1px; }
.kpi-mid { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; align-self: end; margin-top: 14px; }
.kpi-value { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.kpi-value .of { color: var(--ink-subtle); font-weight: 600; }
.kpi-value.empty { color: var(--ink-subtle); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok-text); } .status.ok::before { background: var(--ok); }
.status.warn { color: var(--warn-text); } .status.warn::before { background: var(--warn); }
.status.risk { color: var(--risk-text); } .status.risk::before { background: var(--risk); }
.status.none::before { background: var(--ink-subtle); }
.kpi-sub { margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--brand); }

/* Charts */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.chart-card { display: flex; flex-direction: column; height: 452px; }
.chart-box { position: relative; flex: 1; min-height: 260px; margin-top: 12px; }
.chart-box canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.chart-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: var(--ink-subtle); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; min-height: 22px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.legend-item b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.swatch.box { width: 10px; height: 10px; border-radius: 3px; }
.swatch.dash { background: repeating-linear-gradient(90deg, var(--c, var(--ink-subtle)) 0 4px, transparent 4px 7px) !important; }

.ops-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.ops-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ops-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-val { margin-top: 4px; font-size: 20px; font-weight: 700; line-height: 1.1; }
.ops-val small { font-size: 12px; font-weight: 500; color: var(--ink-subtle); }

.segmented { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.segmented button { height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.segmented.small button { height: 24px; padding: 0 9px; font-size: 12px; }
.segmented button[aria-checked="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.segmented.full { display: flex; width: 100%; }
.segmented.full button { flex: 1; height: 34px; }

/* Panels */
.panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.panel { display: flex; flex-direction: column; min-height: 300px; }
.panel-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); min-height: 44px; }

.prio-list, .action-list { margin: 16px 0 14px; display: flex; flex-direction: column; }
.prio-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prio-item:last-child { border-bottom: 0; }
.check {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex-shrink: 0;
  border: 1.5px solid #C7CBD1; border-radius: 6px; background: #fff; cursor: pointer; display: grid; place-content: center;
  transition: background .15s, border-color .15s;
}
.check::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check:checked { background: var(--brand); border-color: var(--brand); }
.check:checked::after { opacity: 1; }
.prio-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); line-height: 1.35; }
.prio-item.done .prio-text { color: var(--ink-subtle); text-decoration: line-through; }
.prio-state { font-size: 11px; font-weight: 600; white-space: nowrap; }
.prio-state.done { color: var(--ok-text); }
.prio-state.open { color: var(--warn-text); }
.prio-empty { font-size: 13px; color: var(--ink-subtle); padding: 10px 0; }
.foot-meta { font-size: 12px; color: var(--ink-muted); }

.action-item { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.action-item:last-child { border-bottom: 0; }
.prio-bar { width: 4px; align-self: stretch; border-radius: 2px; }
.prio-bar.high { background: var(--risk); } .prio-bar.medium { background: var(--warn); } .prio-bar.low { background: var(--ink-subtle); }
.action-desc { font-size: 14px; color: var(--ink); line-height: 1.35; }
.action-meta { margin-top: 3px; font-size: 12px; color: var(--ink-muted); }
.action-due { font-size: 12px; font-weight: 600; white-space: nowrap; text-align: right; }
.action-due.overdue { color: var(--risk-text); } .action-due.today { color: var(--warn-text); } .action-due.later { color: var(--ink-muted); }
.action-due small { display: block; font-weight: 500; color: var(--ink-subtle); }

.dev-body { margin: 16px 0 14px; display: flex; flex-direction: column; gap: 14px; }
.dev-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dev-stat .lbl { font-size: 12px; color: var(--ink-muted); }
.dev-big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-top: 2px; }
.dev-big .of { font-size: 18px; color: var(--ink-subtle); font-weight: 600; }
.progress { position: relative; height: 6px; border-radius: 3px; background: #EEF0F2; overflow: visible; }
.progress .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--brand); }
.progress .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.progress-cap { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-muted); margin-top: 6px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.spark span { flex: 1; border-radius: 3px 3px 0 0; background: #E9D3D4; min-height: 3px; }
.spark span.today { background: var(--brand); }
.goal { display: flex; gap: 10px; align-items: flex-start; background: var(--canvas); border-radius: 10px; padding: 10px 12px; }
.goal svg { color: var(--brand); margin-top: 2px; }
.goal .lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); }
.goal p { font-size: 13.5px; color: var(--ink); line-height: 1.4; }

/* ---------- Placeholder pages ---------- */
.stage-note { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px dashed #D5D9DE; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: var(--ink-muted); }
.stage-note svg { color: var(--brand); margin-top: 2px; }
.stage-note strong { color: var(--ink); }
.preview-grid { display: grid; gap: var(--gap); }
.preview-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.preview-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.preview { min-height: 128px; display: flex; flex-direction: column; }
.preview-count { font-size: 32px; font-weight: 700; line-height: 1; color: var(--ink); }
.preview-count.muted { color: #C7CBD1; }
.preview h3 { margin-top: auto; padding-top: 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.preview p { font-size: 13px; color: var(--brand); font-weight: 500; }
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.scope-list { margin-top: 14px; display: grid; gap: 8px; }
.scope-list li { position: relative; padding-left: 16px; font-size: 14px; color: var(--ink-muted); }
.scope-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .55; }
.chip-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li { font-size: 13px; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.rule-note { margin-top: 14px; display: flex; gap: 8px; font-size: 13px; color: var(--risk-text); align-items: flex-start; }
.rule-note svg { margin-top: 2px; }

.site-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-subtle); }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(26,28,30,.32); }
.modal-card {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; background: #fff; border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.modal-body { padding: 16px 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.foot-right { display: flex; gap: 8px; margin-left: auto; }

.fs { border: 0; margin-top: 16px; }
.fs legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 8px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-muted); margin-bottom: 6px; }
.field-label.mt, .mt { margin-top: 12px; }
.input {
  width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 14px; color: var(--ink); transition: border-color .15s;
}
.input:focus { outline: none; border-color: color-mix(in srgb, var(--brand) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.input.invalid { border-color: var(--risk-text); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.prio-inputs { display: grid; gap: 8px; }
.prio-input { display: flex; align-items: center; gap: 10px; }
.prio-input input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.record-status { margin-top: 10px; font-size: 12px; color: var(--ink-muted); }
.calc-line { margin-top: 10px; font-size: 13px; color: var(--ink-muted); }
.calc-line b { color: var(--ink); }
.form-error { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--risk-text); }
.form-msg { min-height: 18px; margin-top: 14px; font-size: 13px; color: var(--ok-text); }
.form-msg.err { color: var(--risk-text); }
.help { font-size: 13px; color: var(--ink-muted); margin-bottom: 10px; }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.file-input { display: block; font-size: 13px; margin-bottom: 8px; max-width: 100%; }
#d-export-box { margin-top: 10px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 16px; border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,.15); max-width: calc(100vw - 32px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main-nav { gap: 28px; }
  .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
  .header-inner { grid-template-columns: 1fr auto; padding: 0 24px; min-height: 64px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 0; border-top: 1px solid var(--line); }
  .main-nav a { flex: 1; justify-content: center; height: 46px; font-size: 14px; }
  .shell { padding: 32px 24px 40px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-card { height: 440px; }
  .preview-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .panel-grid { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-controls { width: 100%; justify-content: space-between; }
}
@media (max-width: 639px) {
  :root { --gap: 12px; --pad: 18px; }
  .header-inner { padding: 0 16px; min-height: 60px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand { gap: 10px; }
  .brand-word { font-size: 23px; }
  .brand-sub { font-size: 9.5px; letter-spacing: .12em; }
  .site-location { font-size: 14px; }
  .main-nav a { font-size: 12.5px; height: 44px; letter-spacing: -0.01em; }
  .proto-bar { font-size: 10.5px; padding: 5px 12px; }
  .shell { padding: 24px 16px 32px; }
  .page > * + * { margin-top: 20px; }
  .page-title { font-size: 30px; }
  .page-sub { font-size: 16px; }
  .page-controls { gap: 10px; }
  .date-nav { width: 100%; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
  .date-display { font-size: 14px; flex: 1; justify-content: center; }
  .popover { left: 0; right: 0; width: auto; }
  #open-entry { width: 100%; }
  .kpi { padding: 16px; min-height: 140px; }
  .kpi-title { font-size: 13px; }
  .kpi-value { font-size: 28px; }
  .kpi-mid { margin-top: 10px; gap: 6px 10px; }
  .kpi-sub { font-size: 12.5px; margin-top: 10px; }
  .kpi .icon-pill { width: 28px; height: 28px; }
  .kpi .icon-pill svg { width: 14px; height: 14px; }
  .kpi-title .tag { display: table; margin: 4px 0 0; }
  .chart-card { height: 440px; }
  .chart-box { min-height: 200px; }
  .ops-summary { gap: 8px; }
  .ops-item { padding: 8px 10px; }
  .ops-val { font-size: 17px; }
  .ops-val small { display: none; }
  .preview-grid.three, .preview-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview { min-height: 112px; }
  .preview-count { font-size: 26px; }
  .preview h3 { font-size: 13.5px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .site-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .kpi-value { font-size: 25px; }
  .main-nav a { font-size: 12px; }
  .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =====================================================================
   Project Coordinator additions — same tokens, radii, borders and type
   ===================================================================== */
#page:focus { outline: none; }
.dl-short { display: none; }
.loading { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 120px 0; color: var(--ink-muted); font-size: 14px; }
.demo-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--ink-muted); margin-bottom: 20px; }
.demo-banner svg { color: var(--brand); }
.demo-banner strong { color: var(--ink); }
.demo-banner span { flex: 1; min-width: 220px; }
.demo-banner.error { border-left-color: var(--risk-text); }
.data-note svg { width: 14px; height: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.two-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.head-right.wrap { flex-wrap: wrap; justify-content: flex-end; }
.muted { color: var(--ink-subtle); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mt0 { margin-top: 0; }
.kpi .link-sub { display: inline-flex; align-items: center; gap: 4px; text-align: left; justify-self: start; padding: 0; }
.kpi .link-sub svg { width: 13px; height: 13px; opacity: 0; transition: opacity .15s, transform .15s; }
.kpi .link-sub:hover svg { opacity: 1; transform: translateX(2px); }
.kpi .link-sub:hover { color: var(--brand-dark); }
.toast.err { background: var(--risk-text); }
.chart-foot { margin-top: 10px; }
.chart-card .head-right .segmented { flex-shrink: 0; }

/* badges & small status */
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #F0F1F3; color: var(--ink-muted); vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.badge.risk { background: var(--risk-soft); color: var(--risk-text); }
.badge.info { background: #E8EFFA; color: #2856A3; }
.prio-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink); }
.prio-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-subtle); }
.prio-dot.high::before { background: var(--risk); } .prio-dot.medium::before { background: var(--warn); }
.due { font-weight: 600; font-size: 12.5px; }
.due.overdue, .due.risk { color: var(--risk-text); } .due.today, .due.warn { color: var(--warn-text); } .due.open { color: var(--ink); }
.issue { color: var(--warn-text); font-size: 12.5px; font-weight: 500; }
.neg { color: var(--risk-text) !important; } .pos { color: var(--ok-text) !important; }
.gap-pill { flex-shrink: 0; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #F0F1F3; color: var(--ink-muted); }
.gap-pill.neg { background: var(--risk-soft); } .gap-pill.pos { background: var(--ok-soft); }

/* toolbars, tabs */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 12px; }
.toolbar .input { width: auto; height: 34px; font-size: 13px; }
.toolbar > p { flex: 1; min-width: 200px; }
.toolbar-end { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-subtle); width: 15px; height: 15px; }
.search .input { width: 100%; padding-left: 32px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.tabs button svg { width: 15px; height: 15px; }
.tabs button:hover { color: var(--brand); }
.tabs button[aria-selected="true"] { color: var(--brand); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--brand); }
.count { margin: -2px 0 8px; }
.more { margin-top: 10px; }

/* tables */
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-subtle); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.grp { text-align: center; border-bottom: 0; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td .sub, .sub { display: block; font-size: 12px; color: var(--ink-subtle); font-weight: 400; margin-top: 1px; }
.tbl.compact td { padding: 7px 8px; }
.tbl.compact th { padding: 6px 8px; }
.tbl tr.total td { font-weight: 600; border-top: 1px solid var(--line); }
.tbl.register tr.row { cursor: pointer; transition: background .12s; }
.tbl.register tr.row:hover, .tbl.register tr.row.open { background: #FAFAFB; }
.tbl.register tr.archived td { color: var(--ink-subtle); }
.tbl.register tr.done td b { color: var(--ink-muted); }
.tbl .chev { width: 28px; color: var(--ink-subtle); }
.tbl .row-btns { text-align: right; white-space: nowrap; }
.tbl .row-btns .link-btn + .link-btn { margin-left: 10px; }
.tbl td.pbar { width: 4px; padding: 0; }
.tbl td.pbar::before { content: ""; display: block; width: 4px; height: 34px; border-radius: 2px; background: var(--ink-subtle); }
.tbl td.pbar.high::before { background: var(--risk); } .tbl td.pbar.medium::before { background: var(--warn); }
.detail-row > td { background: #FAFAFB; padding: 0 10px 16px; }
.detail { padding: 6px 4px 0; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.detail-grid span { display: block; font-size: 11.5px; color: var(--ink-subtle); }
.detail-grid b { font-size: 13.5px; font-weight: 500; }
.detail h4, .req-grid h4, .modal-body h4 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); margin: 16px 0 8px; }
.detail-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.detail-cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail-actions .btn { height: 32px; font-size: 13px; }
.flag-line { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--warn-text); }
.notes { margin-top: 12px; color: var(--ink-muted); }
.mini-list { display: grid; gap: 6px; font-size: 13px; }
.mini-list li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.link-row { text-align: left; color: var(--ink); font-size: 13px; padding: 0; }
.link-row:hover { color: var(--brand); }
.roster-strip-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.rs-key { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-weight: 400; color: var(--ink-subtle); align-items: center; }
.rs-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -4px; }
.roster-strip { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); gap: 3px; margin-top: 8px; }
.rs { height: 26px; border-radius: 4px; background: #EEF0F2; display: flex; align-items: flex-end; justify-content: center; }
.rs i { font-style: normal; font-size: 9px; color: rgba(255,255,255,.85); padding-bottom: 2px; }
.rs.on { background: var(--brand); } .rs.off { background: #E6E8EB; } .rs.off i { color: var(--ink-subtle); }
.rs.rdo { background: #7FA2DB; } .rs.abs { background: #C9CDD3; } .rs.xfer { background: #5F6670; } .rs.warn { background: var(--warn); }
.rs.exc { box-shadow: inset 0 0 0 2px var(--ink); }
.history { margin-top: 14px; }
.history summary, .alloc-lists summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-muted); padding: 6px 0; }
.history summary b, .alloc-lists summary b { color: var(--ink); margin-left: 4px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 16px; color: var(--ink-subtle); font-size: 13.5px; }
.empty-state svg { width: 22px; height: 22px; }
.empty-state p { max-width: 420px; }

/* allocation */
.alloc { display: flex; flex-direction: column; }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 12px; }
.mini-stats div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.mini-stats span { display: block; font-size: 12px; color: var(--ink-muted); }
.mini-stats b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.recon { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warn-text); margin-bottom: 8px; }
.alloc-lists { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.alloc-lists ul { display: grid; gap: 4px; font-size: 13px; padding: 2px 0 8px 14px; }
.records { padding-bottom: 18px; }

/* forms in modals */
.modal-card.wide { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fld { display: block; min-width: 0; }
.fld.full, .form-grid .full { grid-column: 1 / -1; }
.fld + .fld.full, .form-grid + .fld { margin-top: 12px; display: block; }
.fld small { font-weight: 400; color: var(--ink-subtle); }
select.input { padding-right: 28px; appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A9099' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.help svg { width: 14px; height: 14px; vertical-align: -2px; }
.warn-box { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ink); margin-bottom: 14px; }
.warn-box svg { color: var(--warn-text); margin-top: 2px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.chk input { accent-color: var(--brand); }
.row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-split .help { margin-bottom: 8px; }
.trade-list { display: grid; gap: 8px; margin-bottom: 14px; }
.trade-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.inline-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.inline-sel .input { width: auto; height: 32px; font-size: 13px; }
.btn.armed { background: var(--risk-text) !important; border-color: var(--risk-text) !important; color: #fff !important; }
.link-btn.armed { color: var(--risk-text); font-weight: 600; }

/* daily update */
.du-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.du-steps span { font-size: 11.5px; font-weight: 500; color: var(--ink-muted); background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.du-group { margin-top: 16px; }
.du-group-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.du-group-head h3 { font-size: 14px; font-weight: 600; }
.du-group-head span { font-size: 12px; color: var(--ink-subtle); }
.du-list { max-height: 300px; overflow-y: auto; }
.du-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 210px; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid #F0F1F3; }
.du-row.changed { background: #FFF8F8; }
.du-who b { display: block; font-size: 13.5px; font-weight: 500; }
.du-who span { display: block; font-size: 12px; color: var(--ink-subtle); }
.du-who .du-flag { color: var(--warn-text); }
.du-select { height: 32px; font-size: 12.5px; }
.du-add { margin-top: 12px; }
.du-add .input { height: 34px; font-size: 13px; }
.du-confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.du-confirm-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; }
.du-calc { font-size: 13px; color: var(--ink-muted); }
.du-calc b { color: var(--ink); font-size: 16px; }
.du-reason { margin-top: 8px; }

/* look ahead */
.controls-bar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; padding: 16px 20px; }
.ctl .field-label { margin-bottom: 6px; }
.ctl .input { height: 36px; min-width: 170px; }
.req-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.req-grid h4 { margin-top: 4px; }
.num-in { width: 72px; height: 32px; text-align: right; padding: 0 8px; }
.ov-list { display: grid; gap: 8px; }
.ov-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ov-list li.conflict { border-color: color-mix(in srgb, var(--risk-text) 40%, transparent); background: #FFFAFA; }
.move-list { display: grid; margin-top: 8px; }
.move-list li { display: grid; grid-template-columns: 64px 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.move-list li:last-child { border-bottom: 0; }
.mv-date { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.mv-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.mv-ico svg { width: 14px; height: 14px; }
.mv-main { min-width: 0; font-size: 13.5px; }

/* overview */
.alert-list { display: grid; margin: 12px 0 14px; }
.alert-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alert-list li:last-child { border-bottom: 0; }
.alert-list b { font-size: 14px; font-weight: 500; }
.al-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #F0F1F3; color: var(--ink-muted); }
.al-ico svg { width: 15px; height: 15px; }
.alert-list li.high .al-ico { background: var(--brand-soft); color: var(--brand); }
.pbar-dot { justify-self: center; width: 4px; height: 30px; border-radius: 2px; background: var(--ink-subtle); }
.pbar-dot.high { background: var(--risk); } .pbar-dot.medium { background: var(--warn); }
.mv-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.mv-col { border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.mv-col-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-muted); margin-bottom: 10px; }
.mv-col-head svg { color: var(--brand); }
.mv-col-head b { margin-left: auto; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; }
.mv-col ul { display: grid; gap: 6px; margin-bottom: 6px; }
.mv-col li { display: flex; gap: 8px; align-items: center; font-size: 13px; min-width: 0; flex-wrap: wrap; }
.mv-col li span { color: var(--ink-subtle); font-size: 12px; min-width: 44px; }
.mv-col li b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* action centre */
.fu-list { display: grid; gap: 10px; }
.fu-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; font-size: 13px; }
.fu-date { font-weight: 600; color: var(--ink-muted); font-size: 12.5px; }
.fu-form .form-grid { margin-bottom: 10px; }
.fu-form .fld.full { margin-bottom: 10px; }
.hist-list { display: grid; margin: 12px 0 10px; }
.hist-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hist-list li:last-child { border-bottom: 0; }
.hist-list .link-row b { font-weight: 500; font-size: 13.5px; }
.hist-meta { font-size: 12px; color: var(--ink-muted); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.compact-chart { height: auto; min-height: 400px; }

/* responsive additions */
@media (max-width: 1180px) {
  .detail-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none; }
}
@media (max-width: 1023px) {
  .two-grid { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page-controls .btn { flex: 1; }
  .modal-card.wide { max-width: none; }
  .du-row { grid-template-columns: minmax(0, 1fr) auto; }
  .du-row .du-select { grid-column: 1 / -1; }
  .du-confirm-grid, .row-split { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .dl-long { display: none; } .dl-short { display: inline; }
  .page-controls .btn { width: 100%; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-stats b { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid, .detail-cols, .detail-cols.two { grid-template-columns: 1fr; }
  .mv-cols { grid-template-columns: 1fr; }
  .toolbar .input, .toolbar .search { flex: 1 1 140px; max-width: none; }
  .toolbar-end { margin-left: 0; width: 100%; }
  .toolbar-end .btn { flex: 1; }
  .controls-bar { padding: 14px; gap: 12px; }
  .ctl { width: 100%; }
  .ctl .segmented { display: flex; width: 100%; }
  .ctl .segmented button { flex: 1; padding: 0 6px; }
  .ctl .input { width: 100%; }
  .move-list li { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .move-list .mv-ico { display: none; }
  .move-list li > .link-btn { grid-column: 2 / -1; justify-self: start; }
  .roster-strip { grid-template-columns: repeat(14, minmax(0, 1fr)); }
  .chart-card .card-head { flex-wrap: wrap; }
  .chart-card .head-right { width: 100%; justify-content: flex-start; }
  .section-head { flex-wrap: wrap; }
  .tbl { font-size: 13px; }
  .trade-row { grid-template-columns: 1fr auto; }
  .trade-row .muted { display: none; }
  .tabs button span { font-size: 13px; }
}
@media (max-width: 639px) { .hide-sm { display: none; } .tbl.register td, .tbl.register th { padding-left: 6px; padding-right: 6px; } }

/* =====================================================================
   Project Coordinator Framework (component) — uses existing JAGCOR tokens
   ===================================================================== */
.pcf-main { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 24px; }
.pcf-chart { display: flex; justify-content: center; }
.pcf-donut { display: block; width: 100%; max-width: 240px; aspect-ratio: 1 / 1; height: auto; }
.pcf-perf { padding-top: 12px; max-width: 720px; }
.pcf-perf-head { display: flex; align-items: center; gap: 12px; }
.pcf-perf-head h3 { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1.3; }
.pcf-rating { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border: 1.5px solid var(--brand); border-radius: 6px; background: #fff; color: var(--brand); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pcf-intro, .pcf-more p { font-size: 14.5px; line-height: 1.7; color: #3F444B; }
.pcf-intro { margin-top: 12px; }
.pcf-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease-out; }
.pcf-more.open { grid-template-rows: 1fr; }
.pcf-more-inner { overflow: hidden; min-height: 0; }
.pcf-more h4 { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pcf-more p { margin-top: 4px; }
.pcf-toggle { margin-top: 12px; padding: 2px 0; font-size: 13.5px; font-weight: 600; color: var(--brand); }
.pcf-toggle:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }
.pcf-divider { border: 0; border-top: 1px solid var(--brand); margin: 24px 0 18px; opacity: .85; }
.pcf-alloc-title { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.pcf-alloc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 14px; }
.pcf-alloc ul { display: grid; gap: 14px; }
.pcf-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pcf-row-title { font-size: 14px; font-weight: 500; color: var(--ink); min-width: 0; }
.pcf-row-pct { font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 48px; text-align: right; }
.pcf-track { margin-top: 6px; height: 8px; border-radius: 999px; background: #EEF0F2; overflow: hidden; }
.pcf-fill { display: block; height: 100%; border-radius: 999px; }
@media (max-width: 860px) {
  .pcf-main { grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
  .pcf-chart { padding: 4px 0; }
  .pcf-donut { max-width: 210px; }
  .pcf-perf { padding-top: 0; max-width: none; }
  .pcf-alloc { grid-template-columns: 1fr; }
  .pcf-alloc ul + ul { margin-top: 14px; }
}
@media (max-width: 639px) { .pcf-intro, .pcf-more p { font-size: 14px; line-height: 1.65; } .pcf-donut { max-width: 190px; } }

/* Overview — automatic date (replaces date navigation on this page only) */
.ov-date { font-size: 16px; font-weight: 500; color: var(--ink); white-space: nowrap; padding-bottom: 3px; }
@media (max-width: 760px) {
  .page-head:has(.ov-date) { gap: 10px; }
  .page-head .page-controls:has(.ov-date) { justify-content: flex-end; }
  .ov-date { font-size: 14.5px; color: var(--ink-muted); padding-bottom: 0; }
}

/* Workforce Stage 1 — header action + date, unconfirmed states, RDO detail */
.wf-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.wf-head-right .wf-date { padding-bottom: 0; }
.chart-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; color: var(--ink-subtle); font-size: 13.5px; background: rgba(255,255,255,.88); }
.chart-empty strong { color: var(--ink-muted); }
.chart-empty svg { width: 22px; height: 22px; }
.rs.unk { background: repeating-linear-gradient(135deg, #EEF0F2 0 4px, #F7F8F9 4px 8px); }
.rs.unk i { color: var(--ink-subtle); }
.tbl-note { margin-top: 8px; }
.mini-list.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; margin-top: 8px; }
.mini-list .grow { flex: 1; }
.review-list { list-style: disc; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--ink-muted); margin-top: 6px; }
@media (max-width: 760px) {
  .wf-head-right { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .wf-head-right .btn { width: auto; flex: 0 0 auto; }
  .wf-head-right .wf-date { margin-left: auto; text-align: right; }
}
@media (max-width: 639px) {
  .wf-head-right { flex-direction: column; align-items: stretch; }
  .wf-head-right .btn { width: 100%; }
  .wf-head-right .wf-date { margin-left: 0; text-align: right; }
  .mini-list.cols { grid-template-columns: 1fr; }
}

/* Roster categories — ad hoc work dates; static (non-selectable) fields */
.adhoc-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.adhoc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.static-field { height: 38px; display: flex; align-items: center; font-size: 14px; color: var(--ink); }

/* ---------- roster import: data status pills, Items to Confirm, outlook ---------- */
.st-pill { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; vertical-align: middle; background: #F0F1F3; color: var(--ink-muted); }
.st-pill.st-confirmed { background: var(--ok-soft); color: var(--ok-text); }
.st-pill.st-projected { background: #E8EFFA; color: #2856A3; }
.st-pill.st-unverified, .st-pill.st-proposed { background: var(--warn-soft); color: var(--warn-text); }
.st-pill.st-conflict { background: var(--risk-soft); color: var(--risk-text); }
.st-pill.st-not_set { background: #F0F1F3; color: var(--ink-subtle); }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: 8px; font-size: 12.5px; background: #F5F6F7; color: var(--ink-muted); }
.note.warn { background: var(--warn-soft); color: var(--warn-text); }
.note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.check-fld { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check-fld input { width: 16px; height: 16px; accent-color: var(--brand); }
.rv-group { border-top: 1px solid var(--line, #E6E8EB); padding: 10px 0 4px; }
.rv-group > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; list-style: none; }
.rv-group > summary::-webkit-details-marker { display: none; }
.rv-group > summary .count { margin-left: auto; }
.rv-item { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px dashed #ECEEF0; font-size: 13px; }
.rv-item:last-child { border-bottom: 0; }
.rv-item .q { font-weight: 600; color: var(--ink); }
.rv-item .meta { color: var(--ink-muted); font-size: 12.5px; }
.rv-item .meta b { font-weight: 600; color: var(--ink-subtle); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.rv-item .btns { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.rv-item.done { opacity: .6; }
.rv-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-size: 13px; margin: 4px 0 4px; }
.ol-grid > div { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-bottom: 1px solid #F0F1F3; }
.ol-grid > div > span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-subtle); font-weight: 600; }
.rep-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: #F0F1F3; color: var(--ink-muted); margin-left: 4px; }
tr.discrepancy td { background: #FFF8EC; }
.rs.travel { background: repeating-linear-gradient(135deg, var(--brand) 0 4px, #E7A7AB 4px 8px); }
.rs.sd { background: #B8BDC4; }
.rs.rdop { background: #A9C0E8; }
@media (max-width: 640px) { .ol-grid { grid-template-columns: 1fr; } }

/* ---------- refinement: four-card rows, Needs Attention, person record, daily update ---------- */
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpi-grid.four { grid-template-columns: 1fr; } }
.wf-head-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wf-head-btns .btn b { margin-left: 4px; font-weight: 600; color: var(--brand); }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.small svg { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 12.5px; color: var(--ink-muted); cursor: pointer; }
.chip b { font-weight: 600; color: var(--ink); }
.chip.on { border-color: var(--brand); color: var(--brand); background: #FFF6F6; }
.chip.on b { color: var(--brand); }
.chip:disabled { opacity: .45; cursor: default; }
.na-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.na-toolbar { margin-bottom: 6px; }
.na-search { flex: 1; max-width: 420px; }
.na-tbl td { vertical-align: top; }
.na-tbl .sub { margin-top: 2px; }
.na-btns { white-space: normal; min-width: 150px; }
.na-btns .link-btn { margin: 0 8px 2px 0; }
.pr-sec { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.pr-sec:first-of-type { border-top: 0; padding-top: 4px; }
.pr-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.pr-sec-head h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.pr-sec-head h3 svg { width: 16px; height: 16px; color: var(--brand); }
.pr-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin-bottom: 8px; }
.pr-grid span { display: block; font-size: 11.5px; color: var(--ink-subtle); }
.pr-grid b { font-size: 13.5px; font-weight: 500; }
.pr-sub { font-size: 12px; font-weight: 600; color: var(--ink-subtle); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 4px; }
.pr-notes { color: var(--ink-muted); margin: 4px 0; }
.pr-attn { margin-bottom: 6px; }
.pr-foot { display: flex; gap: 6px; }
.rs-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--ink-subtle); margin: 6px 0 2px; align-items: center; }
.rs-key .rs { width: 10px; height: 10px; display: inline-block; vertical-align: middle; margin-right: 3px; }
@media (max-width: 700px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fl-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; padding: 6px 2px; font-size: 13px; }
.fl-detail span { display: block; font-size: 11.5px; color: var(--ink-subtle); }
.fl-detail b { font-weight: 500; }
.fl-detail .full { grid-column: 1 / -1; }
.fl-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.du-step { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; margin: 18px 0 2px; }
.du-step > span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; }
.du-step .du-count { font-size: 12px; font-weight: 600; color: var(--ink-muted); background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.du-date { margin-bottom: 8px; }
.du-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.du-sum-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.du-sum-card > span { font-size: 12px; color: var(--ink-subtle); display: block; }
.du-sum-card b { font-size: 22px; font-weight: 600; margin-right: 6px; }
.du-sum-card em { font-style: normal; font-size: 12px; color: var(--ink-muted); }
.du-sub { font-size: 12px; color: var(--ink-subtle); margin: 8px 0 0; }
.du-fine { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 4px; border-bottom: 1px solid #F0F1F3; }
.du-signed { font-size: 13px; display: flex; gap: 8px; align-items: center; }
.du-signed input { width: 16px; height: 16px; accent-color: var(--brand); }
.du-disc { display: grid; gap: 4px; font-size: 13px; margin: 6px 0; }
.du-disc li { padding: 6px 10px; border-radius: 6px; background: #F5F6F7; }
.du-disc li.warn { background: var(--warn-soft); }
@media (max-width: 640px) { .du-sum { grid-template-columns: 1fr; } .fl-detail { grid-template-columns: 1fr; } }
.ov-alerts .alert-list li { cursor: default; }
.pr-grid b .st-pill, .pr-grid b .badge, .pr-grid b .tag { display: inline-flex; width: auto; margin-top: 0; }
.modal-card.xwide { max-width: 1120px; width: calc(100vw - 40px); }
.na-tbl th:nth-child(1) { width: 17%; } .na-tbl th:nth-child(2) { width: 38%; } .na-tbl th:nth-child(3) { width: 8%; } .na-tbl th:nth-child(4) { width: 9%; } .na-tbl th:nth-child(6) { width: 13%; }
.na-tbl .sub { font-size: 12px; }

/* ---------- Overview & Workforce refinement (Daily Focus, sign-on, Take 5s) ---------- */
.kpi-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpi-grid.three { grid-template-columns: 1fr; } }
.chart-box.short { min-height: 220px; height: 220px; flex: none; }
.mv-col li.rdo-warn > span:first-child { color: var(--warn-text); font-weight: 600; }
.mv-col .link-btn { margin-top: 2px; }

/* Personnel register: compact, ~5 rows, internal scroll with a sticky header */
.tbl-wrap.scroll5 { max-height: 322px; overflow: auto; border-top: 1px solid var(--line); }
.tbl-wrap.scroll5 thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: 0 1px 0 var(--line); }
.so-bar { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 8px 12px; margin: 6px 0 8px; background: #F7F8F9; border-radius: 8px; font-size: 13px; }
.so-bar .btn { margin-left: auto; }
.so-cell { display: inline-flex; align-items: center; gap: 6px; }
.so-select { height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 26px 0 9px; font: inherit; font-size: 12.5px; color: var(--ink-muted); font-style: italic; background: #fff; min-width: 112px; }
.so-cell.confirmed .so-select { color: var(--ink); font-style: normal; border-color: #D5D9DE; }
.so-ok { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #D5D9DE; background: #fff; color: #B9BEC5; cursor: pointer; }
.so-ok svg { width: 14px; height: 14px; }
.so-ok:hover { border-color: var(--brand); color: var(--brand); }
.so-cell.confirmed .so-ok { background: var(--brand); border-color: var(--brand); color: #fff; }
.so-tag { font-size: 11px; color: var(--warn-text); }
.so-tag.muted { color: var(--ink-subtle); }

/* Workforce allocation: registered vs available */
.alloc-card .card-head { margin-bottom: 6px; }
.alloc-total { text-align: right; }
.alloc-total b { display: block; font-size: 22px; font-weight: 600; line-height: 1.1; }
.alloc-total span { font-size: 11.5px; color: var(--ink-subtle); }
.alloc-tbl td, .alloc-tbl th { padding-top: 7px; padding-bottom: 7px; }
.alloc-tbl .bar-col { width: 32%; }
.alloc-track { display: block; height: 6px; border-radius: 3px; background: #EEF0F2; overflow: hidden; }
.alloc-fill { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

/* Take 5 entry */
.t5-row { display: grid; grid-template-columns: 1fr 150px 110px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #F0F1F3; }
.t5-area b { display: block; font-size: 14px; }
.t5-area span { display: block; font-size: 12.5px; color: var(--ink-muted); }
.t5-input span { display: block; font-size: 11.5px; color: var(--ink-subtle); margin-bottom: 3px; }
.t5-pct { font-size: 20px; font-weight: 600; text-align: right; }
.t5-over { display: block; font-size: 11px; font-weight: 500; color: var(--warn-text); }
.t5-total { border-bottom: 0; }
@media (max-width: 560px) { .t5-row { grid-template-columns: 1fr 1fr; } .t5-pct { grid-column: 1 / -1; text-align: left; } }

/* Daily Focus */
.df-card .head-right { align-items: center; gap: 14px; }
.df-progress { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-muted); }
.df-bar { width: 80px; height: 5px; border-radius: 3px; background: #EEF0F2; overflow: hidden; display: inline-block; }
.df-bar span { display: block; height: 100%; background: var(--brand); }
.df-add { display: flex; gap: 8px; margin: 4px 0 10px; }
.df-add .input[name=title] { flex: 1; }
.df-add .df-pri { width: 120px; }
.df-list { display: grid; }
.df-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start; padding: 10px 2px; border-top: 1px solid #F0F1F3; }
.df-check { width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid #C6CBD1; background: #fff; display: grid; place-items: center; cursor: pointer; color: #fff; padding: 0; }
.df-check:hover { border-color: var(--brand); }
.df-check svg { width: 13px; height: 13px; }
.df-item.is-done .df-check { background: var(--brand); border-color: var(--brand); }
.df-title { font-size: 14px; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.df-item.is-done .df-title { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: #C6CBD1; }
.df-notes { display: block; font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; white-space: pre-line; }
.df-meta { display: block; font-size: 11.5px; color: var(--ink-subtle); margin-top: 2px; }
.df-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.df-dot.p-high { background: var(--brand); } .df-dot.p-medium { background: #D08A0B; } .df-dot.p-low { background: #A4AAB2; }
.df-btns { display: flex; gap: 2px; align-items: center; }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.df-tools { margin-bottom: 6px; }
@media (max-width: 640px) { .df-add { flex-wrap: wrap; } .df-add .input[name=title] { flex-basis: 100%; } }
@media (max-width: 640px) {
  .df-card .card-head, .chart-card .card-head { flex-wrap: wrap; }
  .df-card .head-right, .chart-card .head-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .so-bar .btn { margin-left: 0; }
}
.alloc-card { min-width: 0; }
.alloc-tbl { width: 100%; table-layout: fixed; }
.alloc-tbl th:first-child, .alloc-tbl td:first-child { width: auto; overflow: hidden; text-overflow: ellipsis; }
.alloc-tbl th.num, .alloc-tbl td.num { width: 96px; } .alloc-tbl th.num:nth-child(4), .alloc-tbl td.num:nth-child(4) { width: 56px; }
@media (max-width: 640px) { .alloc-tbl th.num, .alloc-tbl td.num { width: 52px; } .alloc-tbl .bar-col { width: 18%; } .alloc-tbl th { font-size: 10px; letter-spacing: 0; } }

/* ---------- Upcoming Movements on Workforce: On-Site RDOs + RDO Notification System ---------- */
.mv-scroll { max-height: 118px; overflow-y: auto; padding-right: 2px; }
.notify-col { display: flex; flex-direction: column; gap: 8px; }
.notify-col > p { margin: 0; }
.notify-btn { align-self: flex-start; }
.notify-hist { display: grid; gap: 4px; margin-top: 2px; }
.notify-hist li { display: flex; gap: 6px; align-items: baseline; font-size: 12px; min-width: 0; }
.notify-hist li span { color: var(--ink-subtle); min-width: 40px; }
.notify-hist li b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.notify-hist li em { white-space: nowrap; }
.rn-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-subtle); margin: 4px 0 8px; }
.rn-list { display: grid; gap: 6px; }
.rn-row { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; }
.rn-row.on { border-color: #E8B4B7; background: #FFFAFA; }
.rn-pick { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.rn-pick input, .rn-ok input { width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.rn-pick .sub { display: block; }
.rn-dates { display: flex; gap: 6px; align-items: center; }
.rn-dates .input { width: 138px; height: 32px; font-size: 12.5px; }
.rn-stat { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rn-ok { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-muted); }
.rn-add { margin: 8px 0 14px; max-width: 360px; }
.rn-body { font-family: inherit; line-height: 1.5; }
.rn-block { color: var(--warn-text); }
.rn-foot { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .rn-row { grid-template-columns: 1fr; } }

/* ---------- roster workbook import, four-row register ---------- */
.tbl-wrap.scroll4 { max-height: 268px; overflow: auto; border-top: 1px solid var(--line); }
.tbl-wrap.scroll4 thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: 0 1px 0 var(--line); }
.ri-slot { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.ri-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ri-head h3 { font-size: 15px; font-weight: 600; }
.ri-head label.btn { cursor: pointer; }
.ri-active { display: flex; gap: 6px; align-items: center; color: var(--ink-muted); margin: 8px 0 4px; flex-wrap: wrap; }
.ri-active svg { width: 14px; height: 14px; }
.ri-preview { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.ri-preview h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ri-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin-bottom: 8px; }
.ri-stats span { display: block; font-size: 11.5px; color: var(--ink-subtle); }
.ri-stats b { font-size: 13px; font-weight: 500; }
.ri-preview .note { margin: 6px 0; }
.ri-codes .tbl select { height: 30px; font-size: 12.5px; }
.rn-rc { margin-top: -4px; }
@media (max-width: 700px) { .ri-stats { grid-template-columns: 1fr; } .ri-head { flex-wrap: wrap; } }

/* ---------- Look Ahead roster matrix ---------- */
.rm-card { padding-bottom: 16px; }
.rm-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-muted); margin: -4px 0 10px; }
.rm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-muted); margin-bottom: 10px; }
.rm-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rm-key { display: inline-flex; align-items: center; justify-content: center; position: relative; min-width: 28px; height: 20px; border-radius: 4px; font-style: normal; font-size: 11px; font-weight: 600; }
.rm-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--warn-text); background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.rm-notes svg { width: 16px; height: 16px; flex: none; }
.rm-wrap { overflow: auto; max-height: max(380px, calc(100vh - 230px)); border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.rm-table { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.rm-table th, .rm-table td { border-bottom: 1px solid #EEF0F2; white-space: nowrap; }
.rm-table thead th { position: sticky; top: 0; z-index: 3; background: #fff; font-size: 11px; font-weight: 600; color: var(--ink-muted); text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.rm-table thead th.rm-d { text-align: center; padding: 6px 2px; line-height: 1.25; min-width: 46px; }
.rm-table thead th.rm-d span { display: block; font-size: 10px; letter-spacing: .04em; color: var(--ink-subtle); }
.rm-table thead th.rm-d b { display: block; font-size: 11px; font-weight: 600; color: var(--ink); }
.rm-table thead th.rm-d.wknd span, .rm-table thead th.rm-d.wknd b { color: var(--ink-subtle); }
.rm-table thead th.rm-d.today { box-shadow: inset 0 -2px 0 var(--brand); }
.rm-table thead th.rm-d.today b, .rm-table thead th.rm-d.today span { color: var(--brand); }
.rm-fix { position: sticky; z-index: 2; background: #fff; overflow: hidden; text-overflow: ellipsis; }
.rm-table thead th.rm-fix { z-index: 4; }
.rm-fix.f1 { left: 0; width: 76px; min-width: 76px; max-width: 76px; }
.rm-fix.f2 { left: 76px; width: 160px; min-width: 160px; max-width: 160px; }
.rm-fix.f3 { left: 236px; width: 190px; min-width: 190px; max-width: 190px; box-shadow: 1px 0 0 var(--line), 6px 0 8px -6px rgba(16,24,40,.12); }
.rm-row td.rm-fix { padding: 4px 8px; vertical-align: middle; }
.rm-row td.f1 { font-weight: 600; color: var(--ink); }
.rm-row td.f1.muted { font-weight: 400; color: var(--ink-subtle); }
.rm-row td.f2 { color: var(--ink-muted); }
.rm-row td.f3 .link-row { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; font-size: 12.5px; line-height: 1.25; }
.rm-row td.f3 .sub { display: inline; font-size: 10.5px; color: var(--ink-subtle); line-height: 1.2; }
.rm-row:hover td { background-color: #FAFBFB; }
.rm-group th, .rm-area th, .rm-none td { padding: 0; text-align: left; }
.rm-sticky { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; }
.rm-group th { background: #F1F2F4; border-bottom: 1px solid var(--line); }
.rm-toggle { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.rm-toggle svg { width: 14px; height: 14px; color: var(--ink-subtle); }
.rm-count { font-weight: 500; color: var(--ink-muted); }
.rm-group.flagged th { background: var(--warn-soft); }
.rm-group.flagged .rm-toggle { color: var(--warn-text); }
.rm-area th { background: #fff; border-bottom: 1px solid var(--line); }
.rm-area .rm-sticky { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--brand); padding: 12px 10px 6px; }
.rm-c { position: relative; text-align: center; font-weight: 600; font-size: 11px; height: 30px; min-width: 46px; padding: 0 2px; background-clip: padding-box; border-left: 2px solid #fff; border-right: 2px solid #fff; }
.rm-c.c-ds, .rm-key.c-ds { background: #F5F6F7; color: var(--ink); }
.rm-c.c-in, .rm-key.c-in { background: #EAF1FB; color: #1E3A6E; }
.rm-c.c-drv, .rm-key.c-drv { background: #F2F7FD; color: #1E3A6E; }
.rm-c.c-rr, .rm-key.c-rr { background: #EDEEF0; color: var(--ink-subtle); font-weight: 500; }
.rm-c.c-flag, .rm-key.c-flag { background: var(--warn-soft); color: var(--warn-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.rm-c.c-miss, .rm-key.c-miss { background: repeating-linear-gradient(135deg, #fff 0 4px, #F3F4F6 4px 6px); }
.rm-key.c-miss { border: 1px solid var(--line); }
.rm-c.c-conf { box-shadow: inset 0 0 0 1.5px var(--risk); }
.rm-c.c-away { opacity: .4; }
.rm-c.today { box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand); }
.rm-c.today.c-conf { box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand), inset 0 0 0 1.5px var(--risk); }
.rm-dot { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.rm-key .rm-dot { top: 2px; right: 2px; }
.rm-flag { display: inline-block; margin-top: 2px; font-size: 10.5px; font-weight: 600; color: var(--warn-text); background: var(--warn-soft); border-radius: 4px; padding: 0 5px; }
.rm-tag { display: inline-block; font-size: 10.5px; color: #1E3A6E; background: #EAF1FB; border-radius: 4px; padding: 0 5px; }
.rm-table.d28 .rm-c, .rm-table.d28 thead th.rm-d { min-width: 42px; }
.rm-cls { display: grid; gap: 10px; }
.rm-cls-row { display: grid; grid-template-columns: 1fr minmax(180px, 240px); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rm-cls-row .sub { display: block; font-size: 12px; color: var(--ink-muted); }
.rm-cls-row .warn-t { color: var(--warn-text); }
@media (max-width: 720px) {
  .rm-fix.f1 { width: 46px; min-width: 46px; max-width: 46px; }
  .rm-fix.f2 { left: 46px; width: 84px; min-width: 84px; max-width: 84px; }
  .rm-fix.f3 { left: 130px; width: 112px; min-width: 112px; max-width: 112px; }
  .rm-row td.rm-fix { padding: 4px 6px; font-size: 11px; }
  .rm-table thead th.rm-fix { padding: 8px 6px; font-size: 10px; white-space: normal; line-height: 1.2; }
  .rm-row td.f3 .link-row { font-size: 11.5px; }
  .rm-cls-row { grid-template-columns: 1fr; }
  .rm-wrap { max-height: 70vh; }
}
.rm-table thead th.rm-fix.f1 { white-space: normal; line-height: 1.2; }
.rm-row td.rm-fix { padding-top: 3px; padding-bottom: 3px; line-height: 1.15; }
.rm-row td.f3 .sub { display: block; }
.rm-row td.f3 .rm-flag, .rm-row td.f3 .rm-tag { margin-top: 0; vertical-align: 1px; }
.rm-c { height: 34px; }
.rm-meta { margin: 10px 0 10px; }
@media (max-width: 720px) {
  .rm-fix.f1, .rm-fix.f2 { position: static; }
  .rm-fix.f3 { left: 0; }
  .rm-table thead th.rm-fix.f1, .rm-table thead th.rm-fix.f2 { position: sticky; left: auto; }
}

/* roster matrix — clearer days, travel/RR, group day counts (23 Nov) */
.rm-c { border-left: 0; border-right: 1px solid #E2E4E8; }
.rm-table thead th.rm-d { border-right: 1px solid #E2E4E8; }
.rm-c.c-ds, .rm-key.c-ds { background: #F6F7F8; color: var(--ink); }
.rm-c.c-in, .rm-key.c-in { background: #E6EEFA; color: #1E3A6E; font-weight: 700; }
.rm-c.c-rr, .rm-key.c-rr { background: repeating-linear-gradient(135deg, #FCF3F3 0 5px, #F6DEDF 5px 7px); color: var(--brand); font-weight: 600; }
.rm-legend .rm-key + .rm-key { margin-left: -3px; }
.rm-group th.rm-gl { position: sticky; left: 0; z-index: 2; background: #F1F2F4; padding: 0 8px; width: 426px; min-width: 426px; max-width: 426px; box-shadow: 1px 0 0 var(--line), 6px 0 8px -6px rgba(16,24,40,.12); }
.rm-gl .rm-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; }
.rm-cnt-lbl { float: right; margin-top: 8px; font-size: 10px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-subtle); }
.rm-cnt { background: #F1F2F4; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-muted); border-right: 1px solid #E2E4E8; border-bottom: 1px solid var(--line); }
.rm-cnt.low { background: var(--warn-soft); color: var(--warn-text); }
.rm-cnt.zero { background: var(--risk-soft); color: var(--risk-text); }
.rm-cnt.today { box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand); }
.rm-key.rm-cnt-key { background: #F1F2F4; color: var(--ink-muted); }
.rm-k-low { color: var(--warn-text); } .rm-k-zero { color: var(--risk-text); }
.rm-group.flagged th.rm-gl, .rm-group.flagged .rm-cnt { background: var(--warn-soft); }
@media (max-width: 720px) {
  .rm-group th.rm-gl { width: 242px; min-width: 242px; max-width: 242px; }
  .rm-cnt-lbl { display: none; }
}

/* DS light blue (23 Nov): lighter and softer than FI/FO; runs of day shift read as one band */
.rm-c.c-ds, .rm-key.c-ds { background: #EAF4FC; color: #244B70; font-weight: 500; }
.rm-c.c-ds.run { border-right-color: #EAF4FC; }   /* consecutive day shifts join into one band */
.rm-key.c-ds { border: 1px solid #D9E8F5; }

/* ---------- Look Ahead: Live Permits + Staffing Shortfalls requests (23 Nov) ---------- */
.hide { display: none !important; }
.warn-t { color: var(--warn-text); } .risk-t { color: var(--risk-text); } .ok-t { color: var(--ok-text); }
.pm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: -2px 0 10px; }
.pm-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-muted); }
.pm-sum b { font-weight: 700; margin-right: 3px; color: inherit; }
.pm-sum span:first-child b { color: var(--ink); }
.pm-tools { display: flex; align-items: center; gap: 10px; }
.pm-tools select.input { height: 32px; font-size: 12.5px; padding-top: 0; padding-bottom: 0; width: auto; }
.pm-tbl td, .pm-tbl th { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
.pm-tbl td.pm-left { font-weight: 600; white-space: nowrap; }
.pm-tbl td.pm-left:not([class*="-t"]) { color: var(--ink-muted); }
.pm-row.st-closed td { color: var(--ink-muted); }
.pm-acts { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.pm-note { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.pm-note svg { width: 14px; height: 14px; flex: none; }
.sr-card .head-right { gap: 12px; }
.sr-scroll { max-height: 420px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.sr-item { grid-template-columns: 24px 1fr auto; }
.sr-area { font-weight: 400; color: var(--ink-muted); }
.sr-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.sr-fill { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; }
.sr-fill b { color: var(--ink); font-size: 13.5px; }
.sr-fill .icon-btn:disabled { opacity: .35; cursor: default; }
.sr-out { font-size: 12.5px; font-weight: 600; color: var(--risk-text); white-space: nowrap; min-width: 86px; text-align: right; }
.sr-out.zero { color: var(--ok-text); }
.sr-foot { margin: 10px 0 0; }
@media (max-width: 720px) {
  .pm-bar { margin-top: 0; }
  .sr-item { grid-template-columns: 24px 1fr; }
  .sr-side { grid-column: 2; justify-content: flex-start; }
  .sr-out { min-width: 0; text-align: left; }
  .sr-card .card-head { flex-wrap: wrap; }
  .sr-card .head-right { width: 100%; justify-content: flex-start; }
}

/* Action Centre — "viewing as" (no sign-in yet) */
.ac-user { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11.5px; color: var(--ink-subtle); }
.ac-user > span:first-child { text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; }
.ac-user select.input { height: 32px; font-size: 12.5px; padding-top: 0; padding-bottom: 0; width: auto; min-width: 170px; }
.ac-user-note { display: inline-flex; align-items: center; gap: 4px; }
.ac-user-note svg { width: 12px; height: 12px; }
@media (max-width: 720px) { .records .card-head { flex-wrap: wrap; } .ac-user { align-items: flex-start; } }
.rdo-col .mv-scroll li.rdo-sub { display: block; padding: 6px 0 2px; font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; }
.rn-sent { margin: 8px 0 4px; } .rn-sent summary { cursor: pointer; } .rn-sent .notify-hist li { align-items: center; }
.proto-bar.warn { color: var(--warn-text); background: var(--warn-soft); }
