:root{
  --paper:#f7f6f2;
  --surface:#ffffff;
  --ink:#1b1e22;
  --slate:#6a7079;
  --line:#e2dfd6;
  --line-strong:#cfccc1;
  --accent:#1f4e6b;
  --accent-soft:#eaf1f5;
  --accent-ink:#173a50;

  --under-bg:#fbf1d9; --under-ink:#8a6212;
  --mid-bg:#f1f0ec;   --mid-ink:#5a606a;
  --full-bg:#e2f0e7;  --full-ink:#236247;
  --over-bg:#f9e2df;  --over-ink:#9e2820;

  --danger:#9e2820;
  --radius:7px;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--sans);
  color:var(--ink);
  background:
    linear-gradient(var(--paper),var(--paper)),
    repeating-linear-gradient(0deg,transparent,transparent 31px,#00000008 31px,#00000008 32px);
  background-blend-mode:normal;
  font-size:14px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}

/* ===== Top bar ===== */
.topbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:12px 20px;
  background:var(--accent);
  color:#fff;
  flex-wrap:wrap;
}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{
  width:26px;height:26px;border-radius:4px;flex:none;
  background:
    linear-gradient(#fff,#fff) 0 0/100% 2px no-repeat,
    linear-gradient(#fff,#fff) 0 100%/100% 2px no-repeat,
    linear-gradient(#fff,#fff) 0 0/2px 100% no-repeat,
    linear-gradient(#fff,#fff) 100% 0/2px 100% no-repeat,
    linear-gradient(#fff,#fff) 50% 0/2px 100% no-repeat,
    linear-gradient(#fff,#fff) 0 50%/100% 2px no-repeat;
  opacity:.92;
}
.brand-text{display:flex;flex-direction:column;line-height:1.1}
.brand-text strong{font-size:15px;letter-spacing:.2px}
.brand-text small{font-size:11px;opacity:.78}

.file-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.file-state{
  font-size:11.5px;opacity:.85;font-family:var(--mono);
  padding:4px 8px;border:1px solid rgba(255,255,255,.3);border-radius:5px;
  max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.file-state.linked{background:rgba(255,255,255,.14)}
.exp-dir-state{font-family:var(--mono);font-size:11.5px}
.exp-dir-state.is-set{color:var(--accent-ink);font-weight:600}

/* ===== Buttons ===== */
.btn{
  font-family:var(--sans);font-size:13px;
  padding:7px 12px;border-radius:6px;cursor:pointer;
  border:1px solid var(--line-strong);background:var(--surface);color:var(--ink);
  transition:background .12s,border-color .12s,transform .04s;
}
.btn:hover{background:#f3f1ec}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-ink)}
.btn-danger{border-color:#d8b3ae;color:var(--danger)}
.btn-danger:hover{background:#fbeeec}
.topbar .btn{border-color:rgba(255,255,255,.4);background:rgba(255,255,255,.1);color:#fff}
.topbar .btn:hover{background:rgba(255,255,255,.2)}
.topbar .btn-primary{background:#fff;color:var(--accent-ink);border-color:#fff}
.topbar .btn-primary:hover{background:#eef3f6}
.btn-mini{font-size:11px;padding:3px 8px;border-radius:5px}

/* ===== Tabs ===== */
.tabs{
  position:sticky;top:54px;z-index:20;
  display:flex;gap:2px;
  padding:0 14px;
  background:var(--paper);
  border-bottom:1px solid var(--line-strong);
  overflow-x:auto;
}
.tab{
  font-family:var(--sans);font-size:13px;
  padding:11px 14px;border:none;background:none;cursor:pointer;
  color:var(--slate);white-space:nowrap;
  border-bottom:2px solid transparent;
}
.tab:hover{color:var(--ink)}
.tab.is-active{color:var(--accent-ink);border-bottom-color:var(--accent);font-weight:600}

/* Within-panel sub-view switcher (Staff → Staff info / Assigned holidays / Rates) */
.subtabs{display:flex;gap:2px;margin-top:10px;border-bottom:1px solid var(--line-strong)}
.subtab{
  font-family:var(--sans);font-size:12.5px;
  padding:7px 13px;border:none;background:none;cursor:pointer;
  color:var(--slate);white-space:nowrap;
  border-bottom:2px solid transparent;margin-bottom:-1px;
}
.subtab:hover{color:var(--ink)}
.subtab.is-active{color:var(--accent-ink);border-bottom-color:var(--accent);font-weight:600}
.subpanel{display:none;animation:fade .15s ease}
.subpanel.is-active{display:block}
.subpanel>.muted:first-child,.subpanel>.ph-top:first-child{margin-top:12px}
.subpanel .table-wrap{margin-top:14px}

/* ===== Content ===== */
.content{padding:22px 20px 60px;max-width:1500px;margin:0 auto}
.panel{display:none;animation:fade .15s ease}
.panel.is-active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}

.panel-head{margin-bottom:16px}
.panel-head h1{font-size:20px;margin:0 0 3px;letter-spacing:-.2px}
.panel-head h2{font-size:14px;margin:0 0 8px}
.muted{color:var(--slate);font-size:13px;margin:0 0 4px}
.tbd{color:#c0392b;font-weight:600}
.actions{display:flex;gap:8px;align-items:center;margin-top:10px}
/* A labelled control is taller than a button (the label sits above it), so centring the
   row leaves the two misaligned. Line them up on their bottom edge instead — the select
   and the button share the same height (13px text, 7px padding, 1px border). */
.actions.actions-end{align-items:flex-end}
.actions.wrap{flex-wrap:wrap}
code{font-family:var(--mono);background:#eceae3;padding:1px 5px;border-radius:4px;font-size:12px}

/* ===== Tables ===== */
.table-wrap{
  overflow:auto;border:1px solid var(--line-strong);border-radius:var(--radius);
  background:var(--surface);
}
table.grid{border-collapse:collapse;width:100%;font-size:13px}
table.grid th,table.grid td{
  border-bottom:1px solid var(--line);
  border-right:1px solid var(--line);
  padding:0;text-align:left;vertical-align:middle;
}
table.grid th:last-child,table.grid td:last-child{border-right:none}
table.grid thead th{
  position:sticky;top:0;z-index:5;
  background:#f0eee8;color:var(--accent-ink);
  font-size:11px;text-transform:uppercase;letter-spacing:.5px;
  padding:8px 10px;border-bottom:1px solid var(--line-strong);
  white-space:nowrap;
}
table.grid tbody tr:hover{background:#faf9f5}
table.grid tbody tr:last-child td{border-bottom:none}

/* Keep the column titles visible while scrolling a long table: these panels get their own
   bounded scroll area, so the body scrolls *inside* the wrapper and the sticky <thead>
   (top:0) stays pinned. (Without a height cap the whole page scrolls and the header scrolls
   away with it.) */
#staffsub-info .table-wrap,
#projsub-staging .table-wrap{max-height:calc(100vh - 250px)}

/* inline editable cells */
.grid input,.grid select{
  font-family:var(--sans);font-size:13px;
  width:100%;border:none;background:transparent;color:var(--ink);
  padding:7px 10px;outline:none;
}
.grid input.num,.grid td.num{font-family:var(--mono);text-align:right}
.grid input:focus,.grid select:focus{background:var(--accent-soft);box-shadow:inset 0 0 0 1.5px var(--accent)}
.grid input[type=checkbox]{width:auto;margin:7px 10px;accent-color:var(--accent)}
.grid select{appearance:none;cursor:pointer;padding-right:10px}
.grid td.cell-pad{padding:7px 10px}
.grid td.action-cell{text-align:center;white-space:nowrap;padding:4px 6px}
.row-del{
  border:none;background:none;cursor:pointer;color:var(--slate);
  font-size:15px;line-height:1;padding:4px 7px;border-radius:5px;
}
.row-del:hover{background:#fbeeec;color:var(--danger)}

/* Projects tab: delete ✕ plus a stacked ▲/▼ reorder control, sitting in the sticky column */
.cell-actions{display:flex;align-items:center;justify-content:center;gap:3px}
.row-move{display:inline-flex;flex-direction:column;gap:1px}
.row-mv{
  border:1px solid var(--line-strong);background:var(--surface);cursor:pointer;color:var(--slate);
  font-size:8px;line-height:1;padding:1px 4px;border-radius:3px;
}
.row-mv:hover:not(:disabled){background:#eef3ec;color:var(--accent-ink);border-color:var(--accent)}
.row-mv:disabled{opacity:.28;cursor:default}

.derived{font-family:var(--mono);color:var(--slate);text-align:right;padding:7px 10px;font-size:12.5px}

/* ===== Cards ===== */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:20px}
.metric{
  background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);
  padding:14px 16px;
}
.metric .k{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--slate)}
.metric .v{font-family:var(--mono);font-size:23px;font-weight:600;margin-top:4px;color:var(--accent-ink)}
.metric .sub{font-size:11.5px;color:var(--slate);margin-top:2px}

.split{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.card-block{
  background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);padding:16px;
}
.card-block h2{font-size:13px;text-transform:uppercase;letter-spacing:.5px;color:var(--accent-ink);margin:0 0 10px}

.mini-list{list-style:none;margin:0;padding:0}
.mini-list li{
  display:flex;justify-content:space-between;gap:10px;
  padding:7px 0;border-bottom:1px dashed var(--line);font-size:13px;
}
.mini-list li:last-child{border-bottom:none}
.mini-list .num{font-family:var(--mono)}
.warn-item{display:flex;gap:8px;padding:7px 0;border-bottom:1px dashed var(--line);font-size:13px}
.warn-item:last-child{border-bottom:none}
.warn-item::before{content:"▲";color:var(--under-ink);font-size:11px;line-height:1.5}
.empty{color:var(--slate);font-style:italic;font-size:13px;padding:6px 0}

/* ===== Badges ===== */
.badge{font-size:11px;font-family:var(--mono);padding:2px 7px;border-radius:20px;border:1px solid transparent;white-space:nowrap}
.st-pipeline{background:#eef2f4;color:#4a5b66}
.st-proposal{background:#fbf1d9;color:var(--under-ink)}
.st-live{background:var(--full-bg);color:var(--full-ink)}
.st-on-hold{background:#f0eadf;color:#7a6a45}
.st-completed{background:#e9e7e0;color:#5a606a}
.st-cancelled{background:#f4e6e4;color:#9e2820}

/* ===== Apply / filter bars ===== */
.apply-bar{
  display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;
  background:var(--accent-soft);border:1px solid #cdddE6;border-radius:var(--radius);
  padding:14px 16px;margin-bottom:14px;
}
/* Shared "Date from" control (identical on every page) and its month popup. */
.date-from-field{display:flex;flex-direction:column;gap:4px}
.df-cap{font-size:11px;color:var(--slate);text-transform:uppercase;letter-spacing:.4px}
.mp-btn{
  font-family:var(--sans);font-size:13px;padding:7px 9px;border:1px solid var(--line-strong);
  border-radius:6px;background:var(--surface);color:var(--ink);min-width:150px;cursor:pointer;
  display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;
}
.mp-btn::after{content:"▾";color:var(--slate);font-size:11px;line-height:1}
.mp-btn:hover{border-color:var(--accent)}
.mp-btn:focus{outline:none;box-shadow:0 0 0 2px var(--accent-soft),0 0 0 3px var(--accent)}
.mp-pop{
  position:absolute;z-index:60;background:var(--surface);border:1px solid var(--line-strong);
  border-radius:10px;box-shadow:0 10px 30px rgba(20,30,45,.18);padding:8px;width:264px;
  max-height:340px;overflow-y:auto;
}
.mp-year{border-bottom:1px solid var(--line)}
.mp-year:last-child{border-bottom:none}
.mp-yhead{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;
  background:none;border:none;cursor:pointer;padding:8px 6px;font-family:var(--sans);
  font-size:13px;font-weight:600;color:var(--ink);
}
.mp-yhead:hover{color:var(--accent-ink)}
.mp-caret{color:var(--slate);font-size:11px}
.mp-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:2px 2px 10px}
.mp-mon{
  border:1px solid var(--line-strong);background:var(--surface);border-radius:6px;cursor:pointer;
  padding:7px 0;font-family:var(--sans);font-size:12px;color:var(--ink);
}
.mp-mon:hover{border-color:var(--accent);background:var(--accent-soft)}
.mp-mon.is-sel{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}

/* Projects sub-tab top row: Add project, Apply a template, then the Show filter — left to right. */
.proj-top{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-top:12px}
.proj-top>.btn{margin-bottom:0}
.proj-top .proj-filter{margin-left:auto}
.apply-bar.apply-inline{margin-bottom:0;flex:0 1 auto}
.proj-hint{margin-top:10px}
.apply-bar strong{font-size:13px;color:var(--accent-ink);align-self:center}
.apply-bar label,.util-controls label,.inline-filter,.proj-filter{
  display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--slate);text-transform:uppercase;letter-spacing:.4px;
}
.apply-bar select,.apply-bar input,.util-controls input,.inline-filter select,.proj-filter select{
  font-family:var(--sans);font-size:13px;padding:7px 9px;border:1px solid var(--line-strong);
  border-radius:6px;background:var(--surface);color:var(--ink);text-transform:none;letter-spacing:0;min-width:140px;
}
.allocations-actions{justify-content:space-between;flex-wrap:wrap}
.inline-filter{flex-direction:row;align-items:center;gap:8px}
.util-controls{display:flex;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-top:12px}

/* ===== Working week row ===== */
.week-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:10px}
.week-field{display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--slate);text-transform:uppercase;letter-spacing:.4px}
.week-field input{font-family:var(--mono);font-size:14px;padding:6px 9px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);color:var(--ink);width:90px;text-align:right}
.week-note{font-size:12px}

/* ===== Allocation groups (by staff / by project) ===== */
.btn-sm{font-size:12px;padding:5px 11px;border-radius:6px}
.alloc-group{margin:0 0 18px;scroll-margin-top:108px}
.alloc-group-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 6px}
.alloc-group-head .ag-title{font-size:15px;font-weight:600;color:var(--ink);flex:1 1 auto;min-width:160px}
.alloc-group-head .ag-meta{font-family:var(--mono);font-size:11px;font-weight:400;color:var(--slate);margin-left:8px}
.alloc-group-head .inline-filter{font-size:10px}
.alloc-group-head .inline-filter select{min-width:150px}
.alloc-group-head .ag-right{margin-left:auto}
.alloc-group-prov .ag-title{color:var(--accent-ink)}
.alloc-group-prov .table-wrap{border-style:dashed}
.add-picker{
  font-family:var(--sans);font-size:13px;font-weight:600;padding:7px 11px;
  border:1px solid var(--accent);border-radius:6px;background:var(--accent);color:#fff;
  cursor:pointer;min-width:160px;
}
.add-picker:hover{background:var(--accent-ink);border-color:var(--accent-ink)}
.add-picker:focus{outline:none;box-shadow:0 0 0 2px var(--accent-soft),0 0 0 3px var(--accent)}
.add-picker option{background:var(--surface);color:var(--ink);font-weight:400}

/* ===== Legend / utilisation ===== */
.legend{display:flex;flex-direction:column;gap:3px}
.util-scale{
  display:block;width:230px;height:12px;border-radius:3px;border:1px solid var(--line-strong);
  background:linear-gradient(to right,
    rgb(255,175,175) 0%,
    rgb(255,235,132) 38%,
    rgb(84,184,110) 70%,
    rgb(60,125,34) 70%,
    rgb(60,125,34) 100%);
}
.util-scale-labels{display:flex;justify-content:space-between;width:230px;font-family:var(--mono);font-size:10px;color:var(--slate)}
.chip{font-size:11px;font-family:var(--mono);padding:3px 8px;border-radius:5px}
.chip-under{background:var(--under-bg);color:var(--under-ink)}
.chip-mid{background:var(--mid-bg);color:var(--mid-ink)}
.chip-full{background:var(--full-bg);color:var(--full-ink)}
.chip-over{background:var(--over-bg);color:var(--over-ink)}

table.util td.label-cell{
  position:sticky;left:0;z-index:4;background:var(--surface);
  padding:7px 10px;min-width:180px;font-weight:500;
}
table.util tbody tr:hover td.label-cell{background:#faf9f5}
table.util td.label-cell small{display:block;color:var(--slate);font-weight:400;font-family:var(--mono);font-size:11px}
table.util thead th:first-child{left:0;z-index:6}
.u-cell{position:relative;font-family:var(--mono);text-align:center;vertical-align:bottom;padding:17px 4px 6px;min-width:62px;font-size:16.9px;font-weight:600}
.u-pct{display:block;width:100%;text-align:center}
.u-pct.u-over125{color:#ff5a5f;font-weight:700}

/* Monthly utilisation (single-month team sheet) */
.mu-monthnav{display:flex;align-items:center;gap:8px}
.mu-step{
  border:1px solid var(--line-strong);background:var(--surface);border-radius:6px;cursor:pointer;
  font-size:13px;line-height:1;padding:7px 11px;color:var(--ink);
}
.mu-step:hover{border-color:var(--accent);background:var(--accent-soft)}
.mu-month{font-family:var(--sans);font-size:14px;font-weight:600;min-width:150px;text-align:center}
table.mu{font-size:12px}
table.mu th,table.mu td{border:1px solid var(--line);padding:6px 8px;white-space:nowrap}
table.mu thead th{background:#595959;color:#fff;font-weight:600;position:sticky;top:0;text-align:center;vertical-align:bottom}
table.mu th.mu-name,table.mu td.mu-name{text-align:left;min-width:160px}
table.mu th.mu-proj{writing-mode:vertical-rl;transform:rotate(180deg);height:120px;text-align:left;font-weight:600}
table.mu td.mu-num,table.mu td.mu-util{text-align:center;font-family:var(--mono)}
table.mu td.mu-idx,table.mu td.mu-id,table.mu td.mu-loc,table.mu td.mu-pos{text-align:center;color:var(--slate)}
table.mu td.mu-util{font-weight:600}
table.mu td.mu-util.mu-over{color:#c0392b;font-weight:700}
table.mu td.mu-prop,table.mu th.mu-prop{background:var(--accent-soft)}
table.mu td.mu-leave{background:#f4f2ec;color:var(--slate)}
table.mu tr.mu-ph td{background:#fbf4cf}
table.mu tr.mu-ph td.mu-leave{background:#efe9c4}
table.mu tr.mu-totrow td{background:#eef0f2;font-weight:700;border-top:2px solid var(--line-strong)}
table.mu tr.mu-totrow td.mu-name{text-align:right;text-transform:uppercase;letter-spacing:.4px;font-size:11px}
/* Assigned-holiday marker: blue disc with a white H, centred in the month (or on the
   line between months when the holiday spans two), sitting above the percentage. */
.u-holiday{position:absolute;top:3px;transform:translateX(-50%);width:17px;height:17px;border-radius:50%;
  background:#1f6fd6;color:#fff;font-family:var(--sans,'Inter',system-ui,sans-serif);font-weight:700;
  font-size:11px;line-height:17px;text-align:center;z-index:5;pointer-events:none;box-shadow:0 1px 2px rgba(0,0,0,.28)}
.util .total-row td{background:#f0eee8;font-weight:700;border-top:2px solid var(--line-strong)}

/* Utilisation drill-down (click a resource name to isolate it) */
table.util td.label-cell.u-clickable{cursor:pointer}
table.util td.label-cell.u-clickable:hover{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}
table.util tr.u-iso-head td{background:var(--accent-soft);font-weight:700;border-bottom:1px solid var(--line-strong)}
table.util tr.u-iso-head td.label-cell{background:var(--accent-soft)}
table.util tr.u-iso-row td.label-cell.u-iso-proj{padding-left:26px;font-weight:500}
table.util tr.u-iso-row td.label-cell.u-iso-proj::before{content:"↳";color:var(--slate);margin-right:6px}

/* ===== Project status row strips ===== */
#projectsTable tr.proj-gray td,#stagingTable tr.proj-gray td{background:#e9e8e3}
/* Cancelled: every bit of text in the row is struck through (inputs and selects included). */
#projectsTable tr.proj-cancelled td,
#projectsTable tr.proj-cancelled td input,
#projectsTable tr.proj-cancelled td select,
#stagingTable tr.proj-cancelled td,
#stagingTable tr.proj-cancelled td select{text-decoration:line-through}
#projectsTable tr.proj-cancelled td.action-cell input[type="checkbox"],
#projectsTable tr.proj-cancelled td.row-del-cell button{text-decoration:none}
#projectsTable tr.proj-on-hold td,#stagingTable tr.proj-on-hold td{background:#f4ad54}
#projectsTable tr.proj-gray td input,
#projectsTable tr.proj-gray td select,
#projectsTable tr.proj-on-hold td input,
#projectsTable tr.proj-on-hold td select,
#stagingTable tr.proj-gray td select,
#stagingTable tr.proj-on-hold td select{background:transparent}

/* Pipeline rows: the pipeline blue-grey (#eef2f4) taken to half its lightness so speculative
   pipeline work reads clearly darker than confirmed rows. Light text + transparent inputs keep
   the editable cells legible; the pinned identity/delete columns are darkened to match so the
   whole strip is one colour rather than white-then-blue. */
#projectsTable tr.proj-pipeline td,#stagingTable tr.proj-pipeline td{background:#5f8192;color:#fff}
#projectsTable tr.proj-pipeline td input,
#projectsTable tr.proj-pipeline td select,
#stagingTable tr.proj-pipeline td input,
#stagingTable tr.proj-pipeline td select{background:transparent;color:#fff}
#projectsTable tr.proj-pipeline td input::placeholder,
#stagingTable tr.proj-pipeline td input::placeholder{color:rgba(255,255,255,.7)}
#projectsTable tr.proj-pipeline td.pin1,
#projectsTable tr.proj-pipeline td.pin2,
#projectsTable tr.proj-pipeline td.pin3,
#projectsTable tr.proj-pipeline td.row-del-cell{background:#5f8192}

/* All Stage columns share one fixed width (uniform, like Stage 0); the
   RIBA/AIA/Other column matches them, with its header allowed to wrap. */
#projectsTable th.stagecol,#projectsTable td.stagecol,
#stagingTable th.stagecol,#stagingTable td.stagecol{width:80px;min-width:80px;max-width:80px}
#projectsTable th.stagecol,#stagingTable th.stagecol{white-space:normal;line-height:1.25}
#projectsTable td.stagecol select,#stagingTable td.stagecol select{width:100%}
/* Wider columns */
#projectsTable th.namecol,#projectsTable td.namecol{min-width:230px}
/* The Notes combo's "Select" prompt sits lighter than the slate used elsewhere. */
#projectsTable td.notescol input::placeholder{color:#a9adb4;opacity:1}
/* Staging: the name is a read-only mirror, so it needs half the room (230 → 115px),
   and the date columns get 20% more than the app's standard 98px date field (→ 118px). */
#stagingTable th.namecol,#stagingTable td.namecol{width:138px;min-width:138px;max-width:138px}
#stagingTable th.datecol,#stagingTable td.datecol{width:59px;min-width:59px;max-width:59px}
#stagingTable th.twcol,#stagingTable td.twcol{width:88px;min-width:88px;max-width:88px;text-align:center}
/* Mirrored cells are read-only but they are still names and dates, not figures: keep them
   left-aligned and let a long project name wrap inside the narrower column. */
#stagingTable td.derived{
  text-align:left;font-family:var(--sans);color:var(--ink);font-size:13px;
  white-space:normal;word-break:break-word;line-height:1.3;
}
#projectsTable th.feecol,#projectsTable td.feecol{min-width:180px}
#projectsTable th.notescol,#projectsTable td.notescol{min-width:330px}
#projectsTable th.confcol{white-space:normal;line-height:1.25;max-width:70px}
/* Stage total vs project dates */
#projectsTable td.stagecol.stage-over,#stagingTable td.stagecol.stage-over{background:#fbd7d3}
#projectsTable td.stagecol.stage-under,#stagingTable td.stagecol.stage-under{background:#d3e5fb}
#projectsTable td.stagecol.stage-over select,
#projectsTable td.stagecol.stage-under select,
#stagingTable td.stagecol.stage-over select,
#stagingTable td.stagecol.stage-under select{background:transparent}

/* Allocations · Project: placeholder rows on a proposal/pipeline project are speculative
   staffing for unwon work — tint them light blue (rgb 221,235,247). The month cells carry
   their own white fill, so clear it and let the row colour through (but keep the greyed
   out-of-window cells grey — those still need to read as "outside the project dates"). */
tr.alloc-speculative td{background:rgb(221,235,247)}
tr.alloc-speculative td.m-out{background:#eef0f0}
tr.alloc-speculative td .m-in,
tr.alloc-speculative td input,
tr.alloc-speculative td select{background:transparent}

/* Placeholder-staff rows on the Allocations (staff & project) and Detailed-planning tables
   carry the same light-yellow fill as the Staff page (#fbf4cf). Same technique as the
   speculative rows above: fill the row, mute the out-of-window month cells, and make the
   inputs transparent so the fill shows through. */
tr.alloc-placeholder td{background:#fbf4cf}
tr.alloc-placeholder td.m-out{background:#ece7c8}
tr.alloc-placeholder td .m-in,
tr.alloc-placeholder td input,
tr.alloc-placeholder td select{background:transparent}

/* Panel head: scroll hint + stage colour key on the right */
.ph-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.ph-right{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.scroll-hint{font-size:12px;font-weight:600;color:var(--slate);display:inline-flex;align-items:center;gap:5px}
.scroll-hint .arrow{font-size:15px;animation:nudge 1.4s ease-in-out infinite}
@keyframes nudge{0%,100%{transform:translateX(0)}50%{transform:translateX(4px)}}
.stage-key{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--slate);
  border:1px solid var(--line);border-radius:var(--radius);padding:6px 9px;background:var(--surface)}
.stage-key span{display:flex;align-items:center;gap:6px;white-space:nowrap}
.stage-key i.sk{width:11px;height:11px;border-radius:3px;border:1px solid var(--line-strong);display:inline-block}
.sk-over{background:#fbd7d3}
.sk-under{background:#d3e5fb}
.sk-ok{background:#fff}

/* Keep the delete button pinned to the right edge so a row can be deleted
   without scrolling the wide Projects table. Background tracks the row colour. */
#projectsTable thead th.del-head{position:sticky;right:0;top:0;z-index:7;background:#f0eee8}
#projectsTable td.row-del-cell{position:sticky;right:0;z-index:3;background:var(--surface);border-left:1px solid var(--line-strong)}
#projectsTable tr.proj-gray td.row-del-cell{background:#e9e8e3}
#projectsTable tr.proj-on-hold td.row-del-cell{background:#f4ad54}
#projectsTable tbody tr:hover td.row-del-cell{background:#faf9f5}

/* ===== Summary cards ===== */
.summary-card{
  background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);
  padding:0;margin-bottom:14px;overflow:hidden;
}
.summary-card .sc-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:14px 16px;background:#f6f4ee;border-bottom:1px solid var(--line);
}
.sc-head .sc-title{display:flex;flex-direction:column;gap:2px}
.sc-title b{font-size:15px}
.sc-title small{color:var(--slate);font-family:var(--mono);font-size:11.5px}
.sc-body{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1px;background:var(--line)}
.sc-cell{background:var(--surface);padding:11px 14px}
.sc-cell .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--slate)}
.sc-cell .v{font-family:var(--mono);font-size:15px;margin-top:3px}
.sc-cell .v.pos{color:var(--full-ink)}
.sc-cell .v.neg{color:var(--over-ink)}
.sc-team{padding:11px 16px;border-top:1px solid var(--line);font-size:12.5px;color:var(--slate)}
.sc-team b{color:var(--ink)}
.sc-warn{padding:10px 16px;background:var(--under-bg);border-top:1px solid var(--line);font-size:12.5px;color:var(--under-ink)}
.sc-warn b{display:block;margin-bottom:3px;text-transform:uppercase;font-size:10.5px;letter-spacing:.5px}

/* ===== Templates ===== */
.tpl-card{
  background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);
  margin-bottom:14px;overflow:hidden;
}
.tpl-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#f6f4ee;border-bottom:1px solid var(--line)}
.tpl-head input.tpl-name{font-size:14px;font-weight:600;border:none;background:transparent;flex:1;padding:4px 6px;border-radius:5px}
.tpl-head input.tpl-name:focus{background:var(--accent-soft);outline:none}
.tpl-actions{display:flex;gap:6px}
.export-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}

/* ===== Toast ===== */
.toast{
  position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);
  background:var(--ink);color:#fff;padding:10px 18px;border-radius:8px;
  font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:100;
  box-shadow:0 6px 24px rgba(0,0,0,.18);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast.err{background:var(--danger)}

/* ===== Responsive ===== */
@media (max-width:760px){
  .split,.export-grid{grid-template-columns:1fr}
  .panel-head h1{font-size:18px}
  .file-state{max-width:140px}
  .content{padding:16px 12px 50px}
  .apply-bar{padding:12px}
  .topbar{padding:10px 12px}
  .tabs{top:50px}
}
@media (max-width:480px){
  .brand-text small{display:none}
  .metric .v{font-size:20px}
}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}

/* ===== Gantt ===== */
.gantt-scroll{overflow:auto;max-height:calc(100vh - 250px);border:1px solid var(--line-strong);border-radius:8px;background:var(--surface)}
.gantt{display:flex;flex-direction:column;min-width:760px}
.gantt-row{display:flex;align-items:stretch;border-bottom:1px solid var(--line);min-height:36px}
.gantt-row:last-child{border-bottom:none}
.gantt-head{position:sticky;top:0;background:#f0eee8;z-index:2}
.gantt-label{flex:0 0 210px;width:210px;padding:7px 12px;border-right:1px solid var(--line-strong);font-size:13px;display:flex;flex-direction:column;justify-content:center;gap:2px;background:var(--surface)}
.gantt-head .gantt-label{background:#f0eee8;font-weight:600}
.gantt-label small{color:var(--slate);font-family:var(--mono);font-size:10px;font-weight:400}
.gantt-track{position:relative;flex:1 1 auto;min-width:520px}
.gantt-grid{position:absolute;inset:0;display:flex}
.gantt-cell{flex:1 1 0;border-right:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:10px;color:var(--slate);font-family:var(--mono)}
.gantt-cell:last-child{border-right:none}
.gantt-grid-head .gantt-cell{font-weight:600;color:var(--ink)}
/* "Today" marker — a vertical line down the whole chart at today's date, sharing the bars'
   day-based % scale. Sits above the month grid but behind the bars, so a bar's label stays
   readable where they cross. A small "Today" flag labels it in the sticky header row. */
.gantt-today{position:absolute;top:0;bottom:0;left:0;width:2px;margin-left:-1px;
  background:#c0392b;z-index:1;pointer-events:none}
.gantt-head .gantt-today{z-index:3}
.gantt-today-flag{position:absolute;top:2px;transform:translateX(-50%);
  background:#c0392b;color:#fff;font-size:9px;font-family:var(--mono);font-weight:700;
  padding:1px 5px;border-radius:3px;white-space:nowrap;z-index:4;pointer-events:none}

.gantt-bar{position:absolute;top:7px;bottom:7px;border-radius:4px;background:var(--accent);display:flex;align-items:center;padding:0 7px;color:#fff;font-size:10px;font-family:var(--mono);overflow:hidden;white-space:nowrap;box-shadow:0 1px 2px rgba(0,0,0,.18);z-index:2}
.gantt-bar span{overflow:hidden;text-overflow:ellipsis;position:relative;z-index:1;text-shadow:0 1px 2px rgba(0,0,0,.45)}
/* Stage segments: fill the bar left→right, graded by stage (opacity set inline) */
.gantt-segs{position:absolute;inset:0;display:flex;border-radius:inherit;overflow:hidden;z-index:0}
.gantt-seg{height:100%;display:flex;align-items:center;justify-content:center;min-width:0}
.gantt-seg + .gantt-seg{box-shadow:inset 1px 0 0 rgba(255,255,255,.6)}
.gantt-seg-label{
  font-size:9px;font-weight:600;color:#1b1e22;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  padding:0 3px;text-shadow:0 1px 1px rgba(255,255,255,.55);pointer-events:none;
}
.gantt-bar.clip-l{border-top-left-radius:0;border-bottom-left-radius:0}
.gantt-bar.clip-r{border-top-right-radius:0;border-bottom-right-radius:0}

/* ===== By-project monthly planner cells ===== */
.m-cell{padding:3px 2px}
.m-cell input{width:48px;text-align:center;padding:5px 3px;font-size:11px;color:var(--slate);background:transparent}
.m-cell.m-explicit input{color:var(--ink);font-weight:700}
/* Detailed planning ---------------------------------------------------- */
.detail-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 10px}
.detail-head .detail-meta{flex:1 1 auto}
.detail-head .detail-meta strong{font-size:15px}
.detail-head .ag-meta{font-family:var(--mono);font-size:11px;color:var(--slate);margin-left:10px}
.detail-scroll{overflow:auto}
/* Week columns don't collapse — a long project (e.g. 60 weeks) overflows and scrolls
   left/right rather than cramming every week into the viewport. */
#detailBody .detail-scroll table{width:auto;min-width:100%}
/* Delete column stays pinned to the right edge while the week grid scrolls sideways, so the
   row-remove ✕ is always reachable without scrolling to the end of a long project. */
#detailBody .detail-scroll td.row-del-cell{position:sticky;right:0;z-index:3;background:var(--surface);border-left:1px solid var(--line-strong)}
#detailBody .detail-scroll th.del-head{position:sticky;right:0;top:0;z-index:7;background:#f0eee8;border-left:1px solid var(--line-strong)}
#detailBody .detail-scroll td.row-del-cell,#detailBody .detail-scroll th.del-head{width:38px;min-width:38px}
#detailBody .wk-cell{padding:3px 1px;width:56px;min-width:56px}
/* The number is shown plainly with a % suffix (no ▾ picker) so it reads clearly. */
#detailBody .wk-in{width:100%;min-width:48px;text-align:center;color:inherit;font-size:12px;padding:5px 3px}
#detailBody .wk-cell.m-explicit .wk-in{color:inherit;font-weight:700}
#detailBody thead th{font-size:10px;white-space:nowrap;padding:6px 4px}
/* Labelled stage band above the week headers (blue graded like the Gantt). */
#detailBody tr.stage-band th{
  border-bottom:1px solid var(--line-strong);
  font-size:10px;font-weight:700;text-align:center;padding:4px 2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#detailBody tr.stage-band th.stage-band-lead{text-align:right;color:var(--slate);font-weight:600;padding-right:8px;background:transparent}
#detailBody tr.stage-band th.stage-band-none{background:transparent}
/* Editable stage name in the detailed-planning band (type over to rename; shows on the Gantt). */
.stage-name-in{
  width:100%;box-sizing:border-box;background:transparent;border:1px solid transparent;border-radius:4px;
  font:inherit;color:inherit;text-align:center;padding:2px 3px;
}
.stage-name-in:hover{border-color:rgba(255,255,255,.5)}
.stage-name-in:focus{outline:none;background:rgba(255,255,255,.9);border-color:var(--accent);color:#1b1e22}
.stage-name-in::placeholder{color:inherit;opacity:.7}
/* Total WKS column on Project staging */
#stagingTable th.stagetotcol,#stagingTable td.stagetotcol{font-weight:700;background:#eef0f2}
/* Detailed-planning fee summary */
.detail-summary{margin-top:22px}
.detail-summary h2{font-size:14px;margin:0 0 8px}
.ds-table{max-width:720px}
.ds-table th,.ds-table td{padding:6px 10px}
.ds-table td.num,.ds-table th.num{text-align:right;font-family:var(--mono)}
.ds-table tr.ds-total td{border-top:2px solid var(--line-strong);font-weight:700;background:var(--surface)}
.ds-stages{margin-top:14px}
.ds-stages-h{font-size:12.5px;font-weight:600;margin-bottom:6px}
.ds-stage-row{display:flex;flex-wrap:nowrap;gap:8px}
.ds-stage{flex:1 1 0;min-width:104px;max-width:190px;border:1px solid var(--line-strong);border-radius:var(--radius);padding:6px 12px;background:var(--surface)}
.ds-stage-k{font-size:11px;color:var(--slate)}
.ds-stage-v{font-family:var(--mono);font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The override button turns grey and shows a tick once the grid is in sync. */
.detail-push.is-done{background:#e6e4de;color:#5a6066;border-color:var(--line-strong);cursor:default}
.detail-push.is-done:hover{background:#e6e4de}
.detail-import{background:var(--surface);border-color:var(--accent);color:var(--accent-ink)}
.detail-import:hover{background:var(--accent-soft)}
.detail-export{background:var(--surface);border-color:#2e7d46;color:#2e7d46}
.detail-export:hover{background:#e7f3ea}
.m-cell.m-out{background:#e4e2dc}
.m-cell.m-out input{color:var(--slate)}
.m-cell.m-warn input{color:#c0392b;font-weight:700}

/* Month cell: value + % suffix + ▾ preset picker. The input stays freely typeable. */
.m-wrap{position:relative;display:flex;align-items:center}
.m-wrap .m-in{width:100%;text-align:right;padding-right:26px;font-family:var(--mono)}
.m-wrap .m-suf{display:none;position:absolute;right:16px;pointer-events:none;font-family:var(--mono);font-size:12px;color:inherit;opacity:.8}
.m-wrap.has-val .m-suf{display:inline}
.m-cell.m-explicit .m-suf{font-weight:700;color:var(--ink)}
.m-cell.m-warn .m-suf{color:#c0392b;font-weight:700}
.m-wrap .m-tri{display:none;position:absolute;right:2px;border:none;background:none;cursor:pointer;
  color:var(--slate);font-size:10px;line-height:1;padding:3px 2px;border-radius:3px}
.m-wrap:hover .m-tri,.m-wrap:focus-within .m-tri{display:block}
.m-wrap .m-tri:hover{background:var(--accent-soft);color:var(--accent)}
body.dragging-fill{user-select:none;cursor:ew-resize}
body.dragging-fill .m-in{cursor:ew-resize}

/* Preset percentage list opened by the ▾ */
.pct-pop{position:absolute;display:none;z-index:60;max-height:260px;overflow-y:auto;
  background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius);
  box-shadow:0 8px 22px rgba(0,0,0,.16);padding:4px;min-width:74px}
.pct-pop button{display:block;width:100%;text-align:right;border:none;background:none;cursor:pointer;
  font-family:var(--mono);font-size:12px;color:var(--ink);padding:5px 9px;border-radius:4px}
.pct-pop button:hover{background:var(--accent-soft);color:var(--accent-ink)}

/* ===== Placeholder staff rows ===== */
#staffTable tr.staff-placeholder td{background:#fbf4cf}
#staffTable tr.staff-placeholder td input,
#staffTable tr.staff-placeholder td select{background:transparent}

/* Amman staff rows */
#staffTable tr.staff-amman td{background:rgb(251,226,213)}
#staffTable tr.staff-amman td input,
#staffTable tr.staff-amman td select{background:transparent}

/* Wider, non-wrapping date columns on the by-project allocations table */
#allocProjList td.datecol{min-width:96px;white-space:nowrap}

/* Allocation-by-staff: keep the Project column compact (~30% narrower) and
   ellipsize long project names rather than letting them stretch the table. */
#allocStaffList th.pcol,#allocStaffList td.pcol{max-width:180px;width:180px}
#allocStaffList td.pcol select{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* By-staff: Location / Start / End / Total share one narrow width (~55% of the old date
   column); the space freed by dropping Notes holds the 8-month effort grid. */
/* By-staff: Location / Start / End / Total share one width; the month grid and a Notes
   column follow, and the delete column is a fixed size at the right. */
#allocStaffList th.sn-narrow,#allocStaffList td.sn-narrow{
  width:78px;min-width:78px;max-width:78px;
  text-align:center;padding:6px 4px;white-space:normal;
}
#allocStaffList td.sn-narrow.derived{text-align:center;font-size:11px;line-height:1.25}
#allocStaffList td.sn-narrow select{width:100%;max-width:100%}
/* 12-month effort cells: read-only, coloured by the utilisation scale (utilColor). */
#allocStaffList th.sm-cell{width:46px;min-width:46px;max-width:46px;text-align:center;font-size:10.5px}
#allocStaffList td.sm-cell{
  width:46px;min-width:46px;max-width:46px;
  text-align:center;font-family:var(--mono);font-size:11.5px;font-weight:600;padding:6px 3px;
}
/* Notes takes the remaining width between the months and the delete column. */
#allocStaffList th.sn-notes,#allocStaffList td.sn-notes{min-width:160px}
#allocStaffList td.sn-notes input{width:100%}
/* Fixed-size delete column. */
#allocStaffList th.del-head,#allocStaffList td.row-del-cell{width:44px;min-width:44px;max-width:44px;text-align:center}
/* Per-block monthly subtotal row. Valued cells carry an inline utilColor background (which
   overrides the white below); empty/0% cells stay white like the data cells. */
#allocStaffList tr.sn-subtot-row td{border-top:2px solid var(--line-strong)}
#allocStaffList td.sn-subtot-label{text-align:right;font-weight:600;font-size:11.5px;color:var(--slate);padding:6px 8px}
#allocStaffList td.sm-cell.sn-subtot{background:#fff;font-family:var(--mono);font-size:11.5px;font-weight:700;text-align:center;padding:6px 3px}

/* ===== Projects: the identifying columns stay pinned while scrolling right ===== */
/* Project # and Client have fixed widths so each pinned column can be offset by exactly
   the ones before it: 0 → 120 → 280. Project name is pinned too — Client sits between
   it and Project #, so pinning only "the first two" would scroll the name away. */
#projectsTable th.pin1,#projectsTable td.pin1{
  position:sticky;left:0;z-index:3;background:var(--surface);
  width:120px;min-width:120px;max-width:120px;
}
#projectsTable th.pin2,#projectsTable td.pin2{
  position:sticky;left:120px;z-index:3;background:var(--surface);
  width:160px;min-width:160px;max-width:160px;
}
#projectsTable th.pin3,#projectsTable td.pin3{
  position:sticky;left:280px;z-index:3;background:var(--surface);
  /* border-collapse drops the right border on sticky cells, so draw it as a shadow */
  box-shadow:1px 0 0 var(--line-strong);
}
/* Header cells must outrank both the sticky row (top) and the sticky column (left). */
#projectsTable thead th.pin1,#projectsTable thead th.pin2,#projectsTable thead th.pin3{z-index:8;background:#f0eee8}
/* Pinned cells carry the row's own fill, or they'd sit as white patches over it. */
#projectsTable tbody tr:hover td.pin1,#projectsTable tbody tr:hover td.pin2,#projectsTable tbody tr:hover td.pin3{background:#faf9f5}
#projectsTable tr.proj-gray td.pin1,#projectsTable tr.proj-gray td.pin2,#projectsTable tr.proj-gray td.pin3{background:#e9e8e3}
#projectsTable tr.proj-on-hold td.pin1,#projectsTable tr.proj-on-hold td.pin2,#projectsTable tr.proj-on-hold td.pin3{background:#f4ad54}

/* ===== Projects: the "Scroll right" note, in its own header row above Fee ===== */
#projectsTable thead tr.prehead th{
  position:sticky;top:0;z-index:6;height:22px;padding:0 10px;
  background:var(--surface);border:none;border-bottom:none;
  text-transform:none;letter-spacing:normal;
}
#projectsTable thead tr.prehead th.scroll-note{
  font-size:12px;font-weight:700;color:var(--slate);
  white-space:nowrap;text-align:left;
}
#projectsTable thead tr.prehead th.scroll-note .arrow{font-size:15px;animation:nudge 1.4s ease-in-out infinite;display:inline-block}
/* The real header row now sits below the note row. */
#projectsTable thead tr.headrow th{top:22px}

/* ===== Amman rate rows ===== */
/* Same fill as the Amman staff rows above — keep the two in step. */
#ratesTable tr.rate-amman td{background:rgb(251,226,213)}
#ratesTable tr.rate-amman td input,
#ratesTable tr.rate-amman td select{background:transparent}

/* ===== Custom Sunday-first date picker ===== */
.dp-field{
  font:inherit;text-align:left;background:#fff;border:1px solid var(--line);
  border-radius:6px;padding:6px 9px;min-width:98px;cursor:pointer;color:var(--ink);
}
.dp-field:hover{border-color:var(--line-strong)}
.dp-field .dp-ph{color:var(--slate)}
.dp-pop{
  position:fixed;z-index:1000;display:none;width:250px;padding:10px;
  background:#fff;border:1px solid var(--line-strong);border-radius:10px;
  box-shadow:0 14px 34px rgba(0,0,0,.18);font-size:13px;color:var(--ink);
}
.dp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.dp-title{font-weight:700}
.dp-nav{display:flex;gap:4px}
.dp-nav button,.dp-foot button{
  cursor:pointer;border:1px solid var(--line);background:#fff;border-radius:6px;
  padding:3px 9px;font:inherit;color:var(--ink);line-height:1;
}
.dp-nav button{font-size:16px;padding:1px 9px}
.dp-nav button:hover,.dp-foot button:hover{background:var(--accent-soft)}
.dp-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.dp-dow{text-align:center;font-size:11px;font-weight:600;color:var(--slate);padding:2px 0}
.dp-day{text-align:center;padding:6px 0;border-radius:6px;cursor:pointer}
.dp-day:hover{background:var(--accent-soft)}
.dp-day.dp-out{color:var(--slate);opacity:.5}
.dp-day.dp-today{outline:1.5px solid var(--line-strong)}
.dp-day.dp-sel{background:var(--accent);color:#fff;font-weight:700}
.dp-foot{display:flex;justify-content:space-between;margin-top:8px}
.dp-foot button{color:var(--accent)}

/* Department selector on the Staff page (drives the export filename) */
.dept-select{appearance:none;cursor:pointer;padding-right:26px;
  background-image:linear-gradient(45deg,transparent 50%,var(--slate) 50%),linear-gradient(135deg,var(--slate) 50%,transparent 50%);
  background-position:calc(100% - 14px) 51%,calc(100% - 9px) 51%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.dept-select.dept-unset{border-style:dashed;color:var(--slate)}
.dept-select.dept-flash{animation:deptFlash 1.1s ease-in-out 2;border-color:var(--danger);color:var(--danger)}
@keyframes deptFlash{0%,100%{box-shadow:0 0 0 0 rgba(192,57,43,0)}50%{box-shadow:0 0 0 4px rgba(192,57,43,.28)}}
