/* ==========================================================================
   Veluca Staff Hub - "Deep Canopy" brand system
   Forest #1E3D2B  Sage #838F80  Stone #C9BFA0  Ink #191C19  Paper #F6F4EE
   Ochre #B8752E (accent: filled only, Ink text - never as text on Paper)
   ========================================================================== */
:root {
  --forest: #1E3D2B;
  --forest-deep: #15301F;
  --forest-tint: #E4EBE6;
  --sage: #838F80;
  --sage-tint: #EEF0EC;
  --stone: #C9BFA0;
  --stone-tint: #F0ECDF;
  --ink: #191C19;
  --paper: #F6F4EE;
  --ochre: #B8752E;
  --ochre-tint: #F3E3CC;

  --bg: var(--paper);
  --surface: #FFFFFF;
  --border: #E3E0D6;
  --border-strong: #CFCABC;
  --text: var(--ink);
  --text-muted: #6B7268;
  --primary: var(--forest);
  --primary-dark: var(--forest-deep);
  --primary-light: var(--forest-tint);
  --accent: var(--ochre);
  --danger: #9E3B33;
  --danger-light: #F5E4E2;
  --success: #2E6B47;
  --success-light: #E2EFE6;
  --warning: #8A5A1E;
  --warning-light: var(--ochre-tint);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(25, 28, 25, 0.04), 0 2px 8px rgba(25, 28, 25, 0.05);
  --shadow-lift: 0 4px 16px rgba(25, 28, 25, 0.10);
  --font: Calibri, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Wordmark - bold, all caps, open letter-spacing. No symbol. */
.wordmark { font-weight: 700; text-transform: uppercase; letter-spacing: 0.32em; font-size: 15px; line-height: 1; color: var(--paper); display: block; }
.wordmark-dark { color: var(--forest); font-size: 20px; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--forest);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 26px 0 20px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 0 24px 22px; border-bottom: 1px solid rgba(246,244,238,0.12); margin-bottom: 8px; }
.sidebar .brand-sub { display: block; margin-top: 8px; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }

.sidebar nav a {
  display: flex; align-items: center;
  margin: 2px 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(246,244,238,0.78);
  font-size: 14px;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.sidebar nav a:hover { background: rgba(246,244,238,0.08); text-decoration: none; color: var(--paper); }
.sidebar nav a.active { background: rgba(246,244,238,0.14); color: var(--paper); font-weight: 700; box-shadow: inset 3px 0 0 var(--ochre); }

.sidebar .section-label {
  padding: 18px 24px 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sage);
}

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 58px;
  background: rgba(246,244,238,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 15px; font-weight: 700; color: var(--forest); letter-spacing: 0.01em; }
.topbar .user-menu { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-muted); }
.topbar .user-menu .name { color: var(--text); font-weight: 700; }
.topbar .user-menu a { color: var(--forest); font-weight: 600; }

.content { padding: 28px; flex: 1; max-width: 1600px; width: 100%; }

.flash { padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.flash-error { background: var(--danger-light); color: var(--danger); border-color: #EBCFCB; }
.flash-success { background: var(--success-light); color: var(--success); border-color: #CFE0D5; }
.flash-info { background: var(--forest-tint); color: var(--forest); border-color: #CFDCD3; }

/* ---------- Cards & layout ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

.grid { display: grid; gap: 16px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card { display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--forest); opacity: .85; border-radius: 4px 0 0 4px; }
.stat-card .label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; }
.stat-card .value { font-size: 32px; font-weight: 700; color: var(--forest); line-height: 1; letter-spacing: -0.01em; }
.stat-card .sub { font-size: 12.5px; color: var(--text-muted); }
.stat-alert::after { background: var(--ochre); }
.stat-alert { border-color: var(--ochre); }

h1, h2, h3 { margin: 0 0 4px 0; color: var(--forest); letter-spacing: -0.005em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.page-header .subtitle { color: var(--text-muted); font-size: 14px; margin-top: 3px; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th { text-align: left; color: var(--text-muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; padding: 9px 10px; border-bottom: 1px solid var(--border-strong); }
table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table tr:last-child td { border-bottom: none; }
table.compact th, table.compact td { padding: 6px 8px; }
table tbody tr { transition: background .1s; }
table tbody tr:hover { background: var(--paper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--forest);
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--paper); border-color: var(--sage); text-decoration: none; }
.btn-primary { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.btn-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); box-shadow: var(--shadow-lift); }
.btn-accent { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }
.btn-accent:hover { filter: brightness(.95); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-link { border: none; background: none; color: var(--forest); padding: 0; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.badge-active, .badge-approved, .badge-paid { background: var(--success-light); color: var(--success); }
.badge-on_hold, .badge-submitted, .badge-sent { background: var(--ochre-tint); color: var(--warning); }
.badge-completed, .badge-draft { background: var(--sage-tint); color: var(--text-muted); }

/* ---------- Forms ---------- */
form .field { margin-bottom: 14px; }
form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--text-muted); letter-spacing: 0.02em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(30,61,43,0.12); }
input::placeholder, textarea::placeholder { color: #9AA096; }
textarea { resize: vertical; min-height: 70px; }
.form-row { display: flex; gap: 14px; }
.form-row > .field { flex: 1; }
.help-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-strong); margin-bottom: 18px; }
.tabs a { padding: 9px 14px; font-size: 14px; font-weight: 700; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--forest); text-decoration: none; }
.tabs a.active { color: var(--forest); border-bottom-color: var(--ochre); }

/* ---------- Timesheet grid ---------- */
.timesheet-grid { width: 100%; border-collapse: collapse; }
.timesheet-grid th, .timesheet-grid td { border: 1px solid var(--border); padding: 6px; text-align: center; }
.timesheet-grid th { background: var(--paper); font-size: 11px; }
.timesheet-grid td.proj-name { text-align: left; font-weight: 700; font-size: 13.5px; }
.timesheet-grid td.proj-name select.new-row-project { font-weight: 700; font-style: normal; }
.timesheet-grid td.proj-name select.row-task,
.timesheet-grid td.proj-name select.new-row-task,
.timesheet-grid td.proj-name div.text-muted { font-weight: 400; font-style: italic; }
.timesheet-grid input.hour-input { width: 52px; text-align: center; padding: 5px; border: 1px solid var(--border-strong); border-radius: 5px; }
.timesheet-grid td.weekend { background: var(--paper); }
.timesheet-grid tfoot td { font-weight: 700; background: var(--paper); }

.timesheet-grid td.day-cell { position: relative; }
.timesheet-grid .comment-toggle {
  position: absolute; bottom: 2px; right: 2px;
  width: 16px; height: 16px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; color: var(--sage); cursor: pointer;
}
.timesheet-grid .comment-toggle:hover { color: var(--forest); border-color: var(--forest); }
.timesheet-grid .comment-toggle.has-note { background: var(--forest); border-color: var(--forest); color: #fff; }
.timesheet-grid .day-comment {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  z-index: 20; width: 160px; margin-top: 6px; padding: 6px; font-size: 12px; text-align: left;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  box-shadow: var(--shadow-lift); resize: vertical; min-height: 54px;
}
.timesheet-grid .day-comment.open { display: block; }
.timesheet-grid .day-comment-readonly { position: absolute; bottom: 2px; right: 2px; width: 14px; height: 14px; color: var(--forest); }

.util-bar-track { background: var(--sage-tint); border-radius: 100px; height: 8px; width: 100%; overflow: hidden; }
.util-bar-fill { height: 100%; border-radius: 100px; background: var(--forest); }
.util-bar-fill.over { background: var(--danger); }
.util-bar-fill.under { background: var(--ochre); }

.budget-widget { background: var(--forest-tint); border-color: #CFDCD3; }
.budget-widget-value { font-size: 30px; font-weight: 700; margin: 6px 0 14px; color: var(--forest); }
.budget-widget-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.budget-widget .util-bar-track { background: #ffffffa0; }
.budget-widget-subrow { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

.col-picker { position: relative; }
.col-picker-menu {
  position: absolute; top: 100%; right: 0; margin-top: 6px; z-index: 20;
  min-width: 170px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-lift);
}
.col-picker-menu label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; white-space: nowrap; cursor: pointer; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--forest); background-image: radial-gradient(ellipse at 30% 0%, rgba(131,143,128,0.25), transparent 60%); }
.login-card { width: 380px; background: var(--paper); border: none; border-radius: 14px; padding: 40px 36px 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.login-card .wordmark-dark { text-align: center; margin-bottom: 6px; }
.login-card .subtitle { text-align: center; color: var(--text-muted); font-size: 13px; font-style: italic; margin-bottom: 28px; }

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.chart-legend .item { display: flex; align-items: center; gap: 6px; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* --- Data viz: reference palette (see dataviz skill) --- */
.viz-root {
  --viz-surface: #fcfcfb;
  --viz-text-primary: #0b0b0b;
  --viz-text-secondary: #52514e;
  --viz-muted: #898781;
  --viz-grid: #e1e0d9;
  --viz-series-1: #2a78d6;   /* blue - sequential / primary magnitude */
  --viz-series-2: #eb6834;   /* orange - second series */
  --viz-good: #0ca30c;
  --viz-critical: #d03b3b;
}

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-list-row { display: grid; grid-template-columns: 130px 1fr 70px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-list-row .bl-label { color: var(--viz-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-list-row .bl-track { background: var(--viz-grid); border-radius: 4px; height: 10px; overflow: hidden; display: flex; }
.bar-list-row .bl-fill { height: 100%; border-radius: 4px; background: var(--viz-series-1); }
.bar-list-row .bl-fill.series-2 { background: var(--viz-series-2); }
.bar-list-row .bl-fill.critical { background: var(--viz-critical); }
.bar-list-row .bl-value { text-align: right; color: var(--viz-text-secondary); font-variant-numeric: tabular-nums; }
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--viz-text-secondary); }
.viz-legend .item { display: flex; align-items: center; gap: 6px; }
.viz-legend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ------------------------------------------------------------------------
   CRM: pipeline, resources register, activity log, Today page
   ------------------------------------------------------------------------ */
.badge-stage-lead { background: var(--sage-tint); color: var(--text-muted); }
.badge-stage-discussing { background: var(--forest-tint); color: var(--forest); }
.badge-stage-proposal { background: var(--warning-light); color: var(--warning); }
.badge-stage-active { background: var(--success-light); color: var(--success); }
.badge-stage-dormant { background: var(--stone-tint); color: #6E6247; }

.badge-res-available { background: var(--success-light); color: var(--success); }
.badge-res-placed { background: var(--forest-tint); color: var(--forest); }
.badge-res-unavailable { background: var(--warning-light); color: var(--warning); }
.badge-res-archived { background: var(--sage-tint); color: var(--text-muted); }

.badge-kind-call { background: var(--forest-tint); color: var(--forest); }
.badge-kind-email { background: var(--primary-light); color: var(--primary-dark); }
.badge-kind-meeting { background: var(--warning-light); color: var(--warning); }
.badge-kind-note { background: var(--sage-tint); color: var(--text-muted); }

.tabs .count { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 100px; background: var(--sage-tint); font-size: 11px; color: var(--text-muted); }
.tabs a.active .count { background: var(--primary-light); color: var(--primary); }

.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar input[type=text], .filter-bar select { margin: 0; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.check-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }

.pill { display: inline-block; padding: 2px 7px; margin-right: 4px; border-radius: 4px; background: var(--forest-tint); color: var(--forest); font-size: 11px; font-weight: 600; }
.flag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { padding: 4px 10px; border-radius: 100px; background: var(--primary-light); color: var(--primary-dark); font-size: 12.5px; font-weight: 500; }
.tag-alt { background: var(--stone-tint); color: var(--text); }

.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 8px 0 0; font-size: 13.5px; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; }

.activity-form { margin: 12px 0 16px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.activity-form .field { margin-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { padding: 10px 0 10px 14px; border-left: 2px solid var(--border); position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--forest); }
.timeline-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
.timeline-body { font-size: 13.5px; white-space: pre-wrap; }
.timeline-followup { margin-top: 4px; font-size: 12px; color: var(--warning); font-weight: 600; }
.timeline-followup.overdue { color: var(--danger); }
.timeline-followup.done { color: var(--success); font-weight: 500; }
.timeline.compact .timeline-item { padding-top: 7px; padding-bottom: 7px; }

.todo { list-style: none; margin: 10px 0 0; padding: 0; }
.todo li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); }
.todo li:first-child { border-top: none; }
.todo .tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: transparent; cursor: pointer; flex-shrink: 0; font-size: 13px; }
.todo .tick:hover { border-color: var(--success); color: var(--success); }
.todo-title { font-size: 13.5px; font-weight: 600; }
.todo-date { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.todo li.due .todo-date { color: var(--warning); }
.todo li.overdue .todo-date { color: var(--danger); }
.stat-alert { border-color: var(--danger); }

.pipeline { display: flex; gap: 6px; margin-top: 10px; }
.pipeline-step { flex: 1; text-align: center; padding: 10px 4px; border-radius: 6px; background: var(--paper); color: var(--text); }
.pipeline-step:hover { background: var(--primary-light); text-decoration: none; }
.pipeline-count { font-size: 20px; font-weight: 700; }
.pipeline-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; }
.plain-list li { padding: 7px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.plain-list li:first-child { border-top: none; }
.filter-bar select { width: auto; flex: 1 1 160px; }
.filter-bar input[type=text] { flex: 2 1 260px; width: auto; }
.grid > .card + .card { margin-top: 0; }
.badge-rel-new { background: var(--sage-tint); color: var(--text-muted); }
.badge-rel-warm { background: var(--ochre-tint); color: var(--warning); }
.badge-rel-strong { background: var(--success-light); color: var(--success); }
.badge-rel-client { background: var(--forest-tint); color: var(--forest); }
.badge-rel-dormant { background: var(--stone-tint); color: #6E6247; }
.badge-kind-coffee { background: var(--ochre-tint); color: var(--warning); }
.personal-card { background: #FBF7EE; border-color: var(--stone); }
.personal-card textarea { background: #fff; }
.select-sm { width: auto; padding: 4px 8px; font-size: 12.5px; }
.badge-co-prospect { background: var(--stone-tint); color: #6E6247; }
.badge-co-client { background: var(--success-light); color: var(--success); }
.badge-co-dormant { background: var(--sage-tint); color: var(--text-muted); }
.badge-opp-open { background: var(--forest-tint); color: var(--forest); }
.badge-opp-won { background: var(--success-light); color: var(--success); }
.badge-opp-lost { background: var(--danger-light); color: var(--danger); }
.badge-opp-parked { background: var(--sage-tint); color: var(--text-muted); }
.logo-sm, .logo-md, .logo-lg { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #fff; border: 1px solid var(--border); object-fit: contain; vertical-align: middle; }
.logo-sm { width: 26px; height: 26px; padding: 2px; }
.logo-md { width: 36px; height: 36px; padding: 3px; }
.logo-lg { width: 52px; height: 52px; padding: 4px; }
.logo-blank { color: var(--text-muted); font-weight: 700; }
.logo-lg.logo-blank { font-size: 20px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.contact-card { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface); }
.contact-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow); }
.contact-personal { margin-top: 6px; padding: 6px 8px; background: #FBF7EE; border: 1px solid var(--stone); border-radius: 5px; font-size: 12px; color: #5A4A2A; white-space: pre-wrap; }
.smart-hint { margin-top: 6px; padding: 8px 10px; border-radius: 6px; background: var(--primary-light); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.smart-hint.warn { background: var(--warning-light); }
.company-chip { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper); }
.filter-table thead tr.filter-row th { padding: 4px 8px 12px; background: transparent; border-bottom: 1px solid var(--border-strong); }
.filter-table thead tr:first-child th { border-bottom: none; padding-bottom: 2px; }
.filter-table .filter-row input[type=text], .filter-table .filter-row select { width: 100%; margin: 0; padding: 6px 8px; font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; }
th.sortable a { color: var(--text-muted); text-decoration: none; white-space: nowrap; }
th.sortable a:hover, th.sortable.sorted a { color: var(--primary); }
th.sortable .sort-arrow { font-size: 10px; opacity: 0.55; margin-left: 2px; }
th.sortable.sorted .sort-arrow { opacity: 1; }
.sort-btn { display: inline-block; min-width: 34px; text-align: center; padding: 5px 9px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 11px; color: var(--text-muted); text-decoration: none; line-height: 1.4; }
.sort-btn:hover { background: var(--paper); color: var(--primary); text-decoration: none; }
.sort-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-table thead tr:first-child th { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
.quiet-line { font-size: 13px; color: var(--text-muted); margin: -6px 0 14px 4px; }
.risk-text { color: var(--warning); font-weight: 700; }
.risk-dot { color: var(--ochre); font-size: 12px; margin-left: 4px; }
.company-chip.risk { border-color: var(--ochre); background: var(--ochre-tint); }
.notice { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.notice-icon { font-size: 18px; line-height: 1; }
.notice-body { flex: 1; }
.notice-info { background: var(--stone-tint); border-color: var(--stone); color: var(--ink); }
.notice-risk { background: var(--ochre-tint); border-color: var(--ochre); color: var(--ink); }
.notice .btn { white-space: nowrap; }
.cand-add { margin-top: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.suggest-row { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest-chip { padding: 5px 11px; border-radius: 100px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--forest); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.suggest-chip:hover { background: var(--forest-tint); border-color: var(--forest); }
.suggest-chip.risk { border-color: var(--ochre); background: var(--ochre-tint); color: var(--ink); }
.cand-badge-shortlisted { background: var(--sage-tint); color: var(--text-muted); }
.cand-badge-approached { background: var(--forest-tint); color: var(--forest); }
.cand-badge-interested { background: var(--ochre-tint); color: var(--warning); }
.cand-badge-submitted { background: #E6EEF8; color: #2B5797; }
.cand-badge-placed { background: var(--success-light); color: var(--success); }
.cand-badge-declined { background: var(--danger-light); color: var(--danger); }
.age { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.age-fresh { background: var(--success-light); color: var(--success); }
.age-mid { background: var(--ochre-tint); color: var(--warning); }
.age-old { background: var(--danger-light); color: var(--danger); }
/* multi-select dropdown with checkboxes */
details.multi { position: relative; }
details.multi > summary { list-style: none; cursor: pointer; padding: 6px 28px 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.multi > summary::-webkit-details-marker { display: none; }
details.multi > summary::after { content: "▾"; position: absolute; right: 9px; top: 6px; color: var(--text-muted); }
details.multi[open] > summary { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(30,61,43,0.12); }
.multi-menu { position: absolute; z-index: 40; top: 100%; left: 0; margin-top: 4px; min-width: 300px; max-height: 320px; overflow-y: auto; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); text-align: left; }
.multi-menu label { display: flex; gap: 8px; align-items: center; padding: 4px 2px; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; white-space: nowrap; }
.multi-menu label:hover { color: var(--forest); }
.match-why { margin-top: 3px; font-size: 11.5px; color: var(--forest); font-weight: 600; }
.match-snip { display: block; font-weight: 400; color: var(--text-muted); font-style: italic; margin-top: 1px; }
.plain-ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.plain-ul li { margin-bottom: 3px; }
.cv-text { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; line-height: 1.5; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; max-height: 480px; overflow: auto; margin-top: 8px; }
.fit-strong { background: var(--success-light); color: var(--success); }
.fit-possible { background: var(--ochre-tint); color: var(--warning); }
.fit-stretch { background: var(--sage-tint); color: var(--text-muted); }
/* intel log notes + "What we've learned" card */
.timeline-notes { margin-top: 5px; padding: 7px 10px; font-size: 13px; white-space: pre-wrap; background: var(--ochre-tint); border-left: 3px solid var(--warning); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.intel-summary { margin-top: 8px; font-size: 13.5px; line-height: 1.5; }
.intel-summary h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 12px 0 4px; }
.intel-summary h3:first-child { margin-top: 4px; }
.intel-summary p { margin: 0 0 6px; }
.intel-bullet { padding-left: 14px; position: relative; margin-bottom: 3px; }
.intel-bullet::before { content: "•"; position: absolute; left: 2px; color: var(--forest); }
.intel-suggestions { width: 100%; margin-top: 6px; font-size: 13px; }
.intel-suggestions td { padding: 7px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.intel-suggestions tr:first-child td { border-top: none; }

/* competency expiry states */
.comp-expired { color: var(--danger); font-weight: 700; }
.comp-expiring { color: var(--warning); font-weight: 700; }
.comp-ok { color: var(--success); }
.text-warning { color: var(--warning); }

/* read-only key/value rows on profiles */
.kv { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { flex: 0 0 150px; color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; padding-top: 1px; }
.kv .v { white-space: pre-wrap; }

/* done-today items on the to-do list */
.todo li.done .todo-title, .todo li.done > div > div:not(.todo-title) { text-decoration: line-through; color: var(--text-muted); }
.todo li.done .todo-title a { color: var(--text-muted); }
.todo li.done .todo-done { text-decoration: none; display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 500; color: var(--success); }
.todo .tick.ticked { background: var(--success); border-color: var(--success); color: #fff; }
.todo li.done .todo-date { color: var(--text-muted); }
tr.row-done td { color: var(--text-muted); }

/* onboarding stepper + items */
.onb-item { padding: 12px 0 14px; border-top: 1px solid var(--border); }
.onb-item:first-of-type { border-top: none; }
.onb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.stepper .step { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border: 1px solid var(--border); border-radius: 100px; background: var(--surface); font-size: 12.5px; color: var(--text-muted); }
.stepper .step .dot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--paper); color: var(--text-muted); border: 1px solid var(--border-strong); }
.stepper .step.done { border-color: var(--success); color: var(--success); background: var(--success-light); }
.stepper .step.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.stepper .step.current { border-color: var(--forest); color: var(--text); background: #fff; box-shadow: 0 0 0 3px rgba(30,61,43,0.12); font-weight: 700; }
.stepper .step.current .dot { background: var(--forest); border-color: var(--forest); color: #fff; }
.stepper .arrow { color: var(--border-strong); font-size: 16px; }
.stepper .arrow.done { color: var(--success); }
.onb-next { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
/* quality: severity badges */
.sev-major { background: var(--danger-light); color: var(--danger); font-weight: 700; }
.sev-minor { background: var(--ochre-tint); color: var(--warning); font-weight: 700; }
.sev-observation { background: var(--sage-tint); color: var(--text-muted); font-weight: 700; }
.sev-positive { background: var(--success-light); color: var(--success); font-weight: 700; }

tr.row-current td { background: var(--paper); }


/* Follow-ups & actions v2 */
.todo-group { display:flex; justify-content:space-between; align-items:baseline; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color: var(--text-muted); padding: 10px 0 4px; border-bottom: 2px solid var(--border-strong); }
.todo-group .text-muted { font-weight:500; letter-spacing:0; text-transform:none; }
.todo-v2 li { gap: 10px; padding: 10px 0; }
.todo-v2 .todo-main { flex: 1; min-width: 0; }
.todo-v2 .todo-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.todo-v2 .todo-with { font-size: 12.5px; margin-top: 2px; }
.todo-v2 .todo-with a { font-weight: 600; }
.todo-v2 .todo-context { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.todo-v2 .todo-side { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex-shrink:0; }
.due-chip { flex-shrink:0; min-width: 78px; text-align:center; font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; line-height: 1.2; margin-top: 2px; background: var(--surface-2, #f1f1ee); color: var(--text-muted); border: 1px solid var(--border); }
.due-chip.due-overdue { background: var(--danger-light); color: var(--danger); border-color: #EBCFCB; }
.due-chip.due-today { background: #FFF3DF; color: #9A5B00; border-color: #F0D9B5; }
.due-chip.due-soon { background: var(--forest-tint, #EAF1EC); color: var(--forest, #2E6B45); border-color: #CFDCD3; }
.due-chip.due-done { background: var(--success-light); color: var(--success); border-color: #CFE0D5; }
.todo-v2 li.state-overdue .todo-title { color: var(--danger); }
.todo-v2 li.state-done .todo-title, .todo-v2 li.state-done .todo-with, .todo-v2 li.state-done .todo-context { text-decoration: line-through; color: var(--text-muted); }
.badge-soft { background: var(--surface-2, #f1f1ee); color: var(--text-muted); font-weight: 600; font-size: 10.5px; }
.badge-person { background: var(--forest-tint, #EAF1EC); color: var(--forest, #2E6B45); font-weight: 600; }

/* Today v2 */
.today-head { margin-bottom: 18px; }
.today-head h1 { margin-bottom: 4px; }
.today-head .subtitle { margin-bottom: 16px; }
.me-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; max-width: 1040px; }
.me-stat { display:block; padding: 16px 18px; background: var(--surface); border:1px solid var(--border); border-radius:12px; color:inherit; text-decoration:none; min-height: 112px; }
a.me-stat:hover { border-color: var(--border-strong); }
.me-stat .label { font-size:11px; font-weight:700; color: var(--text-muted); text-transform:uppercase; letter-spacing:.1em; }
.me-stat .value { font-size:30px; font-weight:700; color: var(--forest); line-height:1.15; margin-top:6px; }
.me-stat .value .of { font-size:13px; font-weight:500; color: var(--text-muted); margin-left:6px; }
.me-stat .sub { font-size:12.5px; color: var(--text-muted); margin-top:4px; line-height:1.4; }
.me-stat .bar { height:5px; background: var(--border); border-radius:3px; margin-top:8px; overflow:hidden; }
.me-stat .bar span { display:block; height:100%; background: var(--forest); border-radius:3px; }
.me-stat .bar span.ok { background: var(--success); }
.me-stat .bar span.warn { background: var(--danger); }
.me-stat-alert { border-left: 4px solid var(--ochre); }
.today-line { font-size:13px; padding:10px 14px; margin:0 0 16px; background: var(--surface); border:1px solid var(--border); border-left:3px solid var(--ochre); border-radius:8px; }
.today-grid { display:grid; grid-template-columns: 3fr 2fr; gap:16px; align-items:start; }
@media (max-width: 900px) { .today-grid { grid-template-columns: 1fr; } }
.today-side .card + .card { margin-top:16px; }
.today-foot { font-size:12px; color: var(--text-muted); padding-top:10px; margin-top:6px; border-top:1px solid var(--border); }
.compact-list li { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:8px 0; border-top:1px solid var(--border); }
.compact-list li:first-child { border-top:none; }
.num-row { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.num { flex:1; min-width:90px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; color:inherit; text-decoration:none; }
a.num:hover { border-color: var(--border-strong); }
.num .value { font-size:20px; font-weight:700; color: var(--forest); line-height:1.1; }
.num .label { font-size:11px; color: var(--text-muted); margin-top:2px; }


/* Avatar menu (top right) */
.avatar-menu { position: relative; }
.avatar-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.avatar-menu summary::-webkit-details-marker { display: none; }
.avatar { display:inline-flex; align-items:center; justify-content:center; width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; border: 2px solid transparent; }
.avatar-menu summary:hover .avatar, .avatar-menu[open] .avatar { border-color: var(--ochre); }
.avatar-menu .menu { position: absolute; right: 0; top: 42px; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 6px; z-index: 50; }
.avatar-menu .menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 13.5px; color: var(--text); }
.avatar-menu .menu a { display: block; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--text); font-weight: 500; }
.avatar-menu .menu a:hover { background: var(--forest-tint, #EAF1EC); text-decoration: none; }
.avatar-menu .menu a.menu-out { color: var(--danger); border-top: 1px solid var(--border); margin-top: 4px; border-radius: 0 0 6px 6px; }


/* Project setup + commercials */
.stepped .step { margin-bottom: 16px; }
.step-head { display:flex; align-items:center; gap:10px; margin-bottom: 10px; }
.step-head h2 { margin: 0; }
.step-no { display:inline-flex; width:24px; height:24px; border-radius:50%; background: var(--forest); color:#fff; font-size:12px; font-weight:700; align-items:center; justify-content:center; }
.model-pick { display:grid; grid-template-columns: repeat(3, 1fr); gap:10px; margin-bottom: 14px; }
.model-opt { display:block; padding:12px 14px; border:1.5px solid var(--border); border-radius:10px; cursor:pointer; background: var(--surface); }
.model-opt input { display:none; }
.model-opt strong { display:block; margin-bottom:4px; }
.model-opt span { font-size:12.5px; color: var(--text-muted); line-height:1.4; }
.model-opt.on { border-color: var(--forest); background: var(--forest-tint, #EAF1EC); }
.model-fields { padding: 4px 0 0; }
@media (max-width: 800px) { .model-pick { grid-template-columns: 1fr; } }
.cm-card.cm-warn { border-left: 4px solid var(--ochre); }
.cm-card.cm-over { border-left: 4px solid var(--danger); }
.cm-bar { position:relative; height:10px; background: var(--border); border-radius:5px; margin:12px 0 10px; overflow:hidden; }
.cm-bar span { position:absolute; left:0; top:0; height:100%; border-radius:5px; }
.cm-bar .cm-forecast { background: #CFDCD3; }
.cm-bar .cm-burn { background: var(--forest); }
.cm-bar .cm-burn.warn { background: var(--ochre); }
.cm-bar .cm-burn.over { background: var(--danger); }
.cm-bar .cm-mark { position:absolute; top:-2px; bottom:-2px; width:2px; background: var(--text-muted); opacity:.6; }
.cm-nums { display:grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap:12px; }
.cm-nums .label { font-size:10.5px; font-weight:700; color: var(--text-muted); text-transform:uppercase; letter-spacing:.08em; }
.cm-nums .value { font-size:20px; font-weight:700; color: var(--forest); margin-top:2px; }
.cm-nums .sub { font-size:11.5px; color: var(--text-muted); margin-top:2px; }
.cm-alert { margin-top:10px; font-size:13px; font-weight:600; color: var(--danger); }


/* ==========================================================================
   Facelift - the Resource Cost Calculator finish, applied app-wide.
   Inter Tight for display, Source Sans 3 for body, warm stone lines, no shadows,
   small-caps labels, tabular numbers, forest hero for the one number that matters.
   ========================================================================== */
:root {
  --font-d: "Inter Tight", "Calibri", "Helvetica Neue", Arial, sans-serif;
  --font-b: "Source Sans 3", "Calibri", "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-b);
  --border: #D9D2BD;
  --border-strong: #C9BFA0;
  --text-muted: #7D857A;
  --text-2: #4A5248;
  --surface-2: #EFEBDF;
  --head-sub: #A9B5A5;
  --shadow: none;
  --shadow-lift: none;
}
html, body { font-family: var(--font-b); font-size: 15px; line-height: 1.5; }
h1, h2, h3, .stat-card .value, .me-stat .value, .cm-nums .value, .num .value, .budget-widget-value, .tile .v {
  font-family: var(--font-d); letter-spacing: -0.01em; text-wrap: balance;
}
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14.5px; font-weight: 600; }
.page-header .subtitle, .help-text, .text-muted { color: var(--text-muted); }
.page-header { margin-bottom: 22px; }
td, .value, .num, .me-stat .value, .cm-nums .value, .stat-card .value, .due-chip, .todo-date { font-variant-numeric: tabular-nums; }

/* shell */
.sidebar { padding-top: 30px; }
.wordmark { font-family: var(--font-d); font-size: 18px; letter-spacing: 0.42em; }
.sidebar .brand-sub { font-family: var(--font-b); color: var(--head-sub); font-size: 11px; letter-spacing: .12em; }
.sidebar nav a { font-size: 14.5px; font-weight: 600; color: rgba(246,244,238,0.74); }
.sidebar .section-label { color: var(--head-sub); opacity: .8; }
.topbar { background: var(--paper); backdrop-filter: none; height: 56px; }
.topbar .page-title { font-family: var(--font-d); font-size: 15px; letter-spacing: 0; }
.content { padding: 26px 32px 56px; }

/* cards & tables */
.card { padding: 18px 20px; box-shadow: none; }
.card > h2:first-child, .card .flex-between:first-child h2 { color: var(--forest); }
table { font-size: 14px; }
table th { font-size: 12px; letter-spacing: .06em; font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--border); }
table td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
table tbody tr:hover { background: #FBFAF6; }
tr.total td, tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; }

/* buttons */
.btn { font-family: var(--font-b); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 6px; }
.btn-primary { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.btn-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.btn-accent { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-link { font-weight: 600; }
.btn:focus-visible, .btn-link:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }

/* forms */
form label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
  font-family: var(--font-b); font-size: 15px; border-color: var(--border-strong); border-radius: 6px; background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 2px color-mix(in srgb, var(--forest) 25%, transparent); }
input[type=number] { font-variant-numeric: tabular-nums; font-weight: 600; }
.help-text { font-size: 12.5px; line-height: 1.45; }

/* badges & chips */
.badge { font-family: var(--font-b); font-weight: 600; font-size: 12px; padding: 2px 8px; }
.pill { font-weight: 600; }
.flash { font-size: 14px; }

/* labels on tiles */
.stat-card .label, .me-stat .label, .cm-nums .label, .num .label, .today-foot, .todo-group { font-family: var(--font-b); }
.me-stat .label, .cm-nums .label, .stat-card .label { font-size: 12px; letter-spacing: .08em; font-weight: 600; }

/* Today: the first tile is the hero, like the calculator's key number */
.me-stats .me-stat:first-child { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.me-stats .me-stat:first-child .label, .me-stats .me-stat:first-child .sub, .me-stats .me-stat:first-child .value .of { color: var(--head-sub); }
.me-stats .me-stat:first-child .value { color: var(--paper); font-size: 34px; }
.me-stats .me-stat:first-child .bar { background: rgba(255,255,255,.15); }
.me-stats .me-stat:first-child .bar span { background: var(--paper); }
.me-stats .me-stat:first-child .bar span.ok { background: #7FC29A; }
.me-stats .me-stat:first-child .bar span.warn { background: #E08A7C; }
.me-stat .value { font-size: 28px; }
.today-line { border-left-color: var(--ochre); }

/* commercial card: ceiling as the hero number */
.cm-nums > div:first-child .value { font-size: 24px; }

/* avatar */
.avatar { font-family: var(--font-d); }

/* sidebar groups: tighter, clearer */
.sidebar nav a { margin: 1px 12px; padding: 8px 12px; }
.sidebar .section-label { padding: 16px 24px 5px; font-size: 10.5px; letter-spacing: .16em; color: var(--head-sub); opacity: 1; }
.sidebar .section-label::after { content: ""; display: block; height: 1px; background: rgba(246,244,238,0.10); margin-top: 5px; }

/* ---- Opportunity statuses added with Go / No-Go ---- */
.badge-opp-assessing { background: var(--stone-tint); color: var(--warning); }
.badge-opp-bidding { background: var(--forest); color: var(--paper); }
.badge-opp-conditional { background: var(--ochre-tint); color: var(--warning); }
.badge-opp-declined { background: var(--sage-tint); color: var(--text-muted); text-decoration: line-through; }

/* ==========================================================================
   Go / No-Go assessment (templates/tenders/assessment.html)
   Forest header band, Paper page, Stone table fills, Sage captions, Ochre
   only for status chips / flags with Ink text.
   ========================================================================== */
.gng { max-width: 1240px; margin: 0 auto; }
.gng-band { background: var(--forest); color: var(--paper); border-radius: var(--radius); padding: 22px 26px 20px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; }
.gng-band .wordmark { color: var(--paper); }
.gng-tag { display: block; font-style: italic; font-size: 12px; opacity: .85; margin-top: 8px; }
.gng-band-r { text-align: right; }
.gng-band-r h1 { margin: 2px 0 0; font-size: 22px; color: var(--paper); line-height: 1.15; }
.gng-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.gng-meta { font-size: 12px; opacity: .85; margin-top: 4px; }
.gng-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }

.gng-title { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 18px 0 14px; border-bottom: 2px solid var(--forest); flex-wrap: wrap; }
.gng-title-main { flex: 1 1 560px; min-width: 0; }
.gng-title h2 { margin: 0; color: var(--forest); font-size: 26px; line-height: 1.12; font-weight: 700; text-wrap: balance; }
.gng-client { font-size: 15px; margin-top: 6px; }
.gng-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gng-chip { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 4px; background: var(--stone-tint); color: var(--ink); }
.gng-chip-forest { background: var(--forest); color: var(--paper); }
.gng-chip-ochre { background: var(--ochre); color: var(--ink); }
.gng-score-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; min-width: 170px; text-align: right; }
.gng-score-tile .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.gng-score-tile .n { font-size: 30px; font-weight: 700; color: var(--forest); line-height: 1.1; font-variant-numeric: tabular-nums; }
.gng-score-tile .of { font-size: 15px; color: var(--text-muted); margin-left: 4px; font-weight: 600; }
.gng-score-tile .sub { font-size: 12px; color: var(--text-muted); }

.gng-section { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; margin-top: 26px; align-items: start; }
.gng-section-plain { grid-template-columns: 1fr; }
.gng-body { min-width: 0; }
.gng h3 { color: var(--forest); font-size: 17px; margin: 0 0 10px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.gng h3 .n { font-size: 11px; letter-spacing: .14em; color: var(--sage); font-weight: 700; }
.gng-fordisc { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--ochre); color: var(--ink); padding: 2px 8px; border-radius: 3px; margin-left: 4px; }
.gng-cap { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.gng-p { margin: 0 0 10px; font-size: 14.5px; max-width: 75ch; }

.gng-params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.gng-params .cell { padding: 10px 14px; border-bottom: 1px solid var(--border); min-width: 0; }
.gng-params .cell:nth-child(odd) { border-right: 1px solid var(--border); }
.gng-params .cell:nth-last-child(-n+2) { border-bottom: 0; }
.gng-params .cell.full { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.gng-params .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.gng-params .v { margin-top: 2px; font-size: 14.5px; }
.gng-params .sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.gng-params .ns { color: var(--text-muted); font-style: italic; }

.gng-tbl { overflow-x: auto; }
.gng-tbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.gng-tbl th { background: var(--forest); color: var(--paper); text-align: left; padding: 8px 10px; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.gng-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.gng-tbl tbody tr:nth-child(even) td { background: var(--stone-tint); }
.gng-tbl td.num, .gng-tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gng-bar { height: 8px; background: var(--border); border-radius: 2px; position: relative; min-width: 100px; }
.gng-bar span { position: absolute; inset: 0 auto 0 0; background: var(--forest); border-radius: 2px; }

.gng-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gng-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--surface); min-width: 0; }
.gng-box h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--forest); }
.gng-box ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.gng-box li { margin: 3px 0; }
.gng-box li.flag::marker { color: var(--ochre); }
.gng-box li.flag { font-weight: 600; }

.gng-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gng-timeline .tl { border-top: 3px solid var(--forest); padding-top: 8px; min-width: 0; }
.gng-timeline .tl.hot { border-top-color: var(--ochre); }
.gng-timeline .d { font-weight: 700; font-size: 14.5px; }
.gng-timeline .l { font-size: 12.5px; color: var(--text-muted); }

/* notes rail */
.gng-notes { background: var(--surface); border: 1px dashed var(--sage); border-radius: var(--radius-sm); padding: 10px 12px 10px; position: sticky; top: 72px; }
.gng-notes-head { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--forest); margin-bottom: 6px; }
.gng-notes-head .text-muted { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.gng-notes-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.gng-note { background: var(--stone-tint); border-radius: 6px; padding: 7px 9px 5px; font-size: 13px; }
.gng-note-body { white-space: pre-wrap; outline: none; border-radius: 4px; min-height: 18px; }
.gng-note-body:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--forest-tint); padding: 2px 4px; margin: -2px -4px; }
.gng-note-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; justify-content: space-between; align-items: center; }
.gng-note-del { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.gng-note-del:hover { color: var(--danger); }
.gng-note-new { width: 100%; font-size: 13px; padding: 6px 8px; resize: vertical; }
.gng-notes-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.gng-saved { font-size: 11.5px; color: var(--success); }

/* checklist */
.gng-items tr.st-done td { color: var(--text-muted); }
.gng-items tr.st-done td:first-child { text-decoration: line-through; }
.gng-items tr.st-na td { color: var(--text-muted); opacity: .7; }
.gng-items tfoot td { background: var(--surface); padding: 8px 10px; }
.gng-items .select-sm { width: 100%; }

/* scorecard */
.gng-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.gng-seg button { border: 0; border-right: 1px solid var(--border); background: transparent; width: 36px; height: 30px; font: inherit; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.gng-seg button:last-child { border-right: 0; }
.gng-seg button:hover { background: var(--forest-tint); color: var(--forest); }
.gng-seg button.on { background: var(--forest); color: var(--paper); }
.gng-score .sc-note { width: 100%; font-size: 13px; padding: 5px 8px; }

/* our read vs client criteria */
.gng-expected { font-size: 13.5px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 12px; }
.gng-expected .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-right: 4px; }
.gng-expected strong { font-size: 17px; color: var(--forest); font-variant-numeric: tabular-nums; }
.gng-expected .pct { color: var(--text-muted); }
.gng-eval .ev-note { width: 100%; min-width: 180px; font-size: 13px; padding: 5px 8px; }
.gng-eval tr.rd-1 td:first-child, .gng-eval tr.rd-2 td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
.gng-eval tr.rd-3 td:first-child { box-shadow: inset 4px 0 0 var(--ochre); }
.gng-eval tr.rd-4 td:first-child, .gng-eval tr.rd-5 td:first-child { box-shadow: inset 4px 0 0 var(--success); }

/* traffic lights: Strong >=80 / Competitive >=65 / Marginal >=50 / Weak; pending = grey until every criterion is rated */
.gng-light-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin-left: 6px; }
.gng-light-pending { background: var(--sage-tint) !important; border-color: var(--border-strong) !important; }
.gng-light-pending .gng-light-label, .gng-light-pending strong, .gng-light-pending .n { color: var(--text-muted) !important; }
.gng-light-strong { background: #CDEFD3 !important; border-color: #2E8B4F !important; }
.gng-light-strong .gng-light-label, .gng-light-strong strong, .gng-light-strong .n { color: #1F6B3A !important; }
.gng-light-competitive { background: var(--success-light) !important; border-color: var(--forest) !important; }
.gng-light-competitive .gng-light-label, .gng-light-competitive strong, .gng-light-competitive .n { color: var(--forest) !important; }
.gng-light-marginal { background: var(--ochre-tint) !important; border-color: var(--ochre) !important; }
.gng-light-marginal .gng-light-label, .gng-light-marginal strong, .gng-light-marginal .n { color: var(--warning) !important; }
.gng-light-weak { background: var(--danger-light) !important; border-color: var(--danger) !important; }
.gng-light-weak .gng-light-label, .gng-light-weak strong, .gng-light-weak .n { color: var(--danger) !important; }
.gng-chip.gng-light-strong, .gng-chip.gng-light-competitive, .gng-chip.gng-light-marginal, .gng-chip.gng-light-weak { border: 1px solid; }

/* decision */
.gng-decide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.gng-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 8px; }
.gng-btn { border: 2px solid var(--forest); background: var(--surface); color: var(--forest); font: inherit; font-weight: 700; letter-spacing: .08em; font-size: 15px; padding: 16px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: transform .05s ease; }
.gng-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.gng-btn-go { background: var(--forest); color: var(--paper); }
.gng-btn-cond { border-color: var(--ochre); background: var(--ochre); color: var(--ink); }
.gng-btn-nogo { border-color: var(--danger); color: var(--danger); }
.gng-btn-park { border-color: var(--sage); color: var(--text-muted); }

.gng-decided { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border: 2px solid var(--forest); border-radius: var(--radius); padding: 14px 18px; margin-top: 12px; background: var(--surface); font-size: 14px; }
.gng-decided-label { font-size: 22px; font-weight: 700; letter-spacing: .1em; color: var(--forest); margin-bottom: 4px; }
.gng-decided-conditional { border-color: var(--ochre); } .gng-decided-conditional .gng-decided-label { color: var(--warning); }
.gng-decided-no_go { border-color: var(--danger); } .gng-decided-no_go .gng-decided-label { color: var(--danger); }
.gng-decided-parked { border-color: var(--sage); } .gng-decided-parked .gng-decided-label { color: var(--text-muted); }
.gng-decided-cond { margin-top: 6px; font-size: 13.5px; }

.gng-sources { margin: 0; padding-left: 18px; font-size: 13.5px; }
.gng-foot { margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--sage); }

.gng-toast { position: fixed; right: 22px; bottom: 22px; background: var(--forest); color: var(--paper); padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lift); z-index: 50; }
.gng-toast.bad { background: var(--danger); }

/* Presenting: boardroom mode hides the app chrome */
body:has(.gng-present) .sidebar, body:has(.gng-present) .topbar { display: none; }
body:has(.gng-present) .content { padding-top: 18px; }
.gng-present { max-width: 1400px; font-size: 16px; }
.gng-present .gng-tbl table, .gng-present .gng-box ul, .gng-present .gng-params .v { font-size: 15px; }

@media (max-width: 1000px) {
  .gng-section { grid-template-columns: 1fr; }
  .gng-notes { position: static; }
  .gng-buttons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .gng-params, .gng-two, .gng-decide-grid { grid-template-columns: 1fr; }
  .gng-params .cell:nth-child(odd) { border-right: 0; }
  .gng-band-r { text-align: left; }
}

/* tender pack upload + documents on file */
.gng-drop { border: 2px dashed var(--sage); border-radius: var(--radius-sm); padding: 18px; text-align: center; background: var(--surface); transition: background .1s; }
.gng-drop.over { background: var(--forest-tint); border-color: var(--forest); }
.gng-drop.has { border-style: solid; border-color: var(--forest); }
.gng-drop-main { font-size: 14px; margin-bottom: 10px; }
.gng-drop-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gng-drop-list { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; word-break: break-word; }
.gng-docs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gng-docs .k { width: 100%; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.gng-doc { display: inline-block; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 13px; }

/* email the brief */
.gng-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(640px, calc(100vw - 32px)); box-shadow: var(--shadow-lift); background: var(--surface); color: var(--text); }
.gng-dialog::backdrop { background: rgba(25, 28, 25, .45); }
.gng-dialog form { padding: 18px 22px 20px; }
.gng-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.gng-dialog-head h2 { margin: 0; color: var(--forest); }
.gng-recips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 160px; overflow-y: auto; }
.gng-dialog textarea { font-size: 13px; }

/* ==========================================================================
   Marketing > LinkedIn (app/marketing.py, templates/marketing/)
   ========================================================================== */
input[type=month] { font: inherit; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; width: 100%; }
.mk-tabs { flex-wrap: wrap; }
.mk-stat { color: inherit; }
.mk-stat:hover { text-decoration: none; box-shadow: var(--shadow-lift); }
.mk-meter { height: 6px; background: var(--sage-tint); border-radius: 100px; overflow: hidden; }
.mk-meter i { display: block; height: 100%; background: var(--forest); border-radius: 100px; }
.mk-when { font-size: 12px; font-weight: 700; color: var(--sage); text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
.mk-st-planned { background: var(--sage-tint); color: var(--text-muted); }
.mk-st-drafted { background: var(--forest-tint); color: var(--forest); }
.mk-st-scheduled { background: var(--ochre-tint); color: var(--warning); }
.mk-st-posted { background: var(--success-light); color: var(--success); }
select.mk-st-select { width: auto; font-weight: 700; font-size: 12.5px; border-radius: 100px; padding: 4px 10px; border-color: transparent; }
.mk-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 100px; overflow: hidden; flex-shrink: 0; }
.mk-seg a { padding: 5px 14px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.mk-seg a.active { background: var(--forest); color: var(--paper); }
.mk-seg a:hover { text-decoration: none; }
.mk-week { margin-bottom: 18px; }
.mk-week-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin: 0 0 8px 2px; }
.mk-post { display: flex; gap: 16px; padding: 14px; }
.card.mk-post + .card.mk-post { margin-top: 10px; }
.mk-thumb { flex: 0 0 96px; height: 120px; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.mk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mk-doc { font-weight: 700; font-size: 12px; letter-spacing: .1em; color: var(--sage); }
.mk-post-body { flex: 1; min-width: 0; }
.mk-caption { white-space: pre-line; font-size: 13.5px; margin: 8px 0 6px; color: var(--ink); }
.mk-more { color: var(--text-muted); font-weight: 700; }
.mk-post-foot { font-size: 12.5px; }
.mk-post-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.mk-post-grid .card + .card { margin-top: 16px; }
.mk-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.mk-fieldset[disabled] input, .mk-fieldset[disabled] select, .mk-fieldset[disabled] textarea { background: var(--paper); color: var(--ink); }
.mk-preview { white-space: pre-line; font-size: 13.5px; background: var(--paper); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; }
.mk-count { font-size: 12px; }
.mk-hero { width: 100%; max-height: 420px; object-fit: contain; background: var(--paper); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.mk-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mk-savebar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.mk-group .mk-task { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.mk-task-text { flex: 1; min-width: 0; }
.mk-task.done .mk-task-text { color: var(--text-muted); text-decoration: line-through; }
.mk-task.done .mk-task-text .text-muted { text-decoration: none; }
.mk-tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: #fff; color: var(--paper); font-weight: 700; cursor: pointer; line-height: 1; padding: 0; }
.mk-task.done .mk-tick { background: var(--forest); border-color: var(--forest); }
.mk-tick:disabled { cursor: default; opacity: .7; }
.mk-edit > summary { list-style: none; cursor: pointer; }
.mk-edit > summary::-webkit-details-marker { display: none; }
.mk-edit[open] { flex-basis: 100%; }
.mk-edit-form { margin-top: 10px; padding: 12px; background: var(--paper); border-radius: var(--radius-sm); }
.mk-group .mk-task { flex-wrap: wrap; }
.mk-person { display: flex; gap: 16px; }
.mk-face { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mk-face-blank { display: flex; align-items: center; justify-content: center; background: var(--forest-tint); color: var(--forest); font-weight: 700; font-size: 26px; }
.mk-person-body { flex: 1; min-width: 0; }
.mk-toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mk-toggles form { margin: 0; }
.mk-tog { font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 100px; border: 1px solid var(--border-strong); background: #fff; color: var(--text-muted); cursor: pointer; }
.mk-tog.on { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.mk-tog.on::before { content: "\2713  "; }
.mk-tog:disabled { cursor: default; }
.mk-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mk-copyfield + .mk-copyfield { margin-top: 14px; }
.mk-bars { display: flex; flex-direction: column; gap: 6px; }
.mk-bar-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 52px; gap: 10px; align-items: center; color: inherit; font-size: 13px; }
.mk-bar-row:hover { text-decoration: none; background: var(--paper); }
.mk-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-bar { position: relative; height: 12px; background: var(--sage-tint); border-radius: 4px; }
.mk-bar i { display: block; height: 100%; background: var(--forest); border-radius: 4px; }
.mk-bar i.below { background: var(--sage); }
.mk-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ochre); }
.mk-bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mk-swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mk-swatch { display: flex; gap: 10px; align-items: center; }
.mk-swatch > span { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.mk-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.mk-thumb-card { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column; }
.mk-thumb-img { display: flex; align-items: center; justify-content: center; height: 150px; background: var(--paper); }
.mk-thumb-img.dark { background: var(--forest); }
.mk-thumb-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mk-thumb-meta { padding: 8px 10px; font-size: 13px; }
.mk-rule { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.mk-rule:first-child { border-top: 0; padding-top: 0; }
.mk-rule h3 { margin: 0 0 4px; }
.mk-rule p { margin: 4px 0; font-size: 14px; }
.mk-rule-n { font-weight: 700; color: var(--ochre); font-size: 20px; font-variant-numeric: tabular-nums; }
.mk-repost { padding: 10px 0; border-top: 1px solid var(--border); }
.mk-repost:first-of-type { border-top: 0; }
.mk-quote { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--ochre); background: var(--paper); font-size: 13.5px; white-space: pre-line; }
@media (max-width: 900px) {
  .mk-post-grid { grid-template-columns: 1fr; }
  .mk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-post { flex-direction: column; }
  .mk-thumb { flex-basis: auto; width: 96px; }
}

/* ---- Timesheet week summary, row totals, caps (Oct 2026) ---- */
.week-summary { padding: 14px 18px; }
.week-summary .ws-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.week-summary .ws-total { font-size: 22px; font-weight: 700; color: var(--forest); }
.week-summary .ws-total .text-muted { font-size: 13px; font-weight: 400; }
.week-summary .ws-msg { font-size: 13.5px; }
.week-summary .ws-msg.ok { color: var(--success); }
.week-summary .ws-msg.warn { color: var(--warning); }
.week-summary .ws-msg.muted { color: var(--text-muted); }
.ws-bar { position: relative; height: 12px; background: var(--sage-tint); border-radius: 100px; margin: 12px 0 18px; }
.ws-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--forest); border-radius: 100px 0 0 100px; transition: width .3s; }
.ws-ot { position: absolute; top: 0; bottom: 0; background: var(--ochre); transition: left .3s, width .3s; }
.ws-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .45; }
.ws-mark span { position: absolute; top: 15px; left: -10px; font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.ws-mark-ot { background: var(--ochre); opacity: .9; }
.ws-mark-ot span { color: var(--warning); font-weight: 700; }
.ws-notes { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-muted); }
.ws-notes:empty { display: none; }
.cap-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--stone-tint); color: var(--text-muted); font-size: 10.5px; font-weight: 600; vertical-align: middle; }
.timesheet-grid td.row-total { font-weight: 700; color: var(--forest); min-width: 44px; }

/* ---- Overtime review ---- */
.ot-key { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-muted); padding: 12px 16px; }
.ot-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.ot-dot.ot-pay { background: var(--forest); }
.ot-dot.ot-wo { background: var(--ochre); }
.ot-dot.ot-cap { background: var(--sage); }
.ot-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ot-table th, .ot-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.ot-table td:last-child { white-space: normal; }
.ot-table th { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.ot-decide { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.ot-decide input[type=text] { flex: 1; min-width: 220px; }

/* ---- Resourcing: actuals and overtime warnings ---- */
.res-actual { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.res-actual.over { color: var(--danger); font-weight: 700; }
.res-flag { display: block; font-size: 10.5px; color: var(--warning); font-weight: 700; }

/* ---- Grids on small screens: keep the name column in view and the inputs thumb-sized ---- */
@media (max-width: 800px) {
  .timesheet-grid th:first-child, .timesheet-grid td.proj-name { position: sticky; left: 0; z-index: 2; background: var(--surface); min-width: 140px !important; }
  .timesheet-grid input.hour-input { width: 46px; padding: 8px 3px; font-size: 15px; }
  .week-summary .ws-total { font-size: 19px; }
}

/* ---- Resourcing grid (rebuilt 31 Oct 2026) - strong Deep Canopy contrast ------------------------ */
.rg-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rg-seg { display: inline-flex; border: 1.5px solid var(--forest); border-radius: 8px; overflow: hidden; background: #fff; }
.rg-seg button { border: 0; background: transparent; color: var(--forest); padding: 7px 11px; font-weight: 600; font-size: 13px; cursor: pointer; }
.rg-seg button + button { border-left: 1px solid var(--border-strong); }
.rg-seg button.on { background: var(--forest); color: var(--paper); }
.rg-seg button:hover:not(.on) { background: var(--forest-tint); }
.rg-status { font-size: 12.5px; color: var(--text-muted); margin-left: auto; }
.rg-status.bad { color: var(--danger); font-weight: 600; }
.rg-alert { background: #fff; border: 1px solid var(--border-strong); border-left: 4px solid var(--sage); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.rg-alert b { margin-right: 6px; color: var(--ink); }
.rg-alert.over { border-left-color: var(--danger); background: var(--danger-light); }
.rg-alert.clash { border-left-color: var(--ochre); background: var(--ochre-tint); }
.rg-card { padding: 0; overflow: hidden; }
.rg-scroll { overflow: auto; max-height: calc(100vh - 230px); }
table.rg { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; color: var(--ink); }
table.rg th { position: sticky; top: 0; z-index: 3; background: var(--forest); color: var(--paper); font-weight: 600; font-size: 12px; padding: 7px 4px; min-width: 64px; text-align: center; white-space: nowrap; }
table.rg th span { display: block; font-size: 10.5px; font-weight: 400; opacity: .75; min-height: 12px; }
table.rg th.cur { background: var(--ochre); }
table.rg th.past { background: #3a5544; }
table.rg td { border-bottom: 1px solid var(--border); border-left: 1px solid #EEEAE0; padding: 4px; text-align: center; vertical-align: middle; height: 40px; }
table.rg .rg-name { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; min-width: 250px; max-width: 320px; padding: 6px 10px; border-left: 0; border-right: 2px solid var(--border-strong); }
table.rg th.rg-name { z-index: 4; background: var(--forest); }
table.rg .rg-fut { font-weight: 700; color: var(--forest); min-width: 58px; background: #FBFAF6; }
table.rg th.rg-fut { background: var(--forest-deep); color: var(--paper); }
.rg-person td { background: var(--stone-tint); font-weight: 700; border-top: 2px solid var(--border-strong); }
.rg-person td.rg-name { background: var(--stone-tint); font-size: 14px; }
.rg-person td.rg-name a { color: var(--forest); }
.rg-person td.rg-fut { background: var(--stone-tint); }
.rg-tog { border: 0; background: none; color: var(--forest); font-size: 13px; cursor: pointer; padding: 0 6px 0 0; }
.rg-sum { font-size: 13px; }
.rg-sum small { display: block; font-weight: 500; font-size: 10.5px; color: #4a5247; }
.rg-sum.b-under { background: #FBF1DC; }
.rg-sum.b-full { background: #CFE0CC; }
.rg-sum.b-over { background: #F2C7C1; color: #7a1f17; }
.rg-sum.b-over small { color: #7a1f17; font-weight: 700; }
.rg-sum.past { opacity: .7; }
.rg-line td.rg-name { padding-left: 26px; }
.rg-proj { display: block; font-weight: 700; color: var(--ink); line-height: 1.25; }
.rg-who { font-weight: 700; color: var(--ink); }
.rg-name small { display: block; color: #4F574C; font-size: 11.5px; }
.rg-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 10px; background: var(--forest-tint); color: var(--forest); vertical-align: 1px; }
.rg-ten-tag { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 700; color: #7b4a14; background: var(--ochre-tint); border-radius: 10px; padding: 1px 8px; }
.rg-chance { width: 46px; padding: 1px 3px; border: 1px solid var(--ochre); border-radius: 4px; font-weight: 700; text-align: right; }
.rg-move, .rg-assign { display: block; margin-top: 4px; font-size: 12px; max-width: 230px; }
.rg-del { float: right; border: 0; background: none; color: #9b9a92; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.rg-del:hover { color: var(--danger); }
.rg-sell { color: var(--forest) !important; font-weight: 700; }
.rg-cell { position: relative; }
.rg-cell input { width: 54px; text-align: center; padding: 5px 2px; border: 1.5px solid var(--border-strong); border-radius: 6px; font-weight: 700; font-size: 13px; color: var(--ink); background: #fff; }
.rg-cell input:not(:placeholder-shown) { border-color: var(--forest); background: var(--forest-tint); }
.rg-cell input:focus { outline: 2px solid var(--ochre); outline-offset: 1px; }
.rg-cell.outside input { background: #F3F1EA; border-style: dashed; }
.rg-cell.past input { color: #555; }
.rg-cell.has-note::after { content: ""; position: absolute; top: 3px; right: 3px; border: 5px solid transparent; border-top-color: var(--ochre); border-right-color: var(--ochre); }
.rg-line.is-tender .rg-cell input:not(:placeholder-shown) { background: repeating-linear-gradient(45deg, #F6E3C9, #F6E3C9 5px, #EFD2AB 5px, #EFD2AB 10px); border-color: var(--ochre); }
.rg-line.is-tender td.rg-name { background: #FFFBF4; }
.rg-cell small, .rg-leave small { display: block; font-size: 10.5px; line-height: 1.2; margin-top: 2px; }
.rg-lost { color: #8a5413; font-weight: 700; }
.rg-act { color: #4F574C; }
.rg-act.hi { color: var(--danger); font-weight: 700; }
.rg-ro { font-weight: 700; }
.rg-leave td { background: #F7F5EF; color: #5b4a2a; font-weight: 700; height: 32px; }
.rg-leave td.rg-name { background: #F7F5EF; padding-left: 26px; }
.rg-leave .rg-proj { color: #5b4a2a; font-weight: 600; }
.rg-pend { color: var(--ochre); font-style: italic; }
.rg-hol { color: var(--forest); }
.rg-group td.rg-name small { display: inline; margin-left: 4px; }
.rg-group td.rg-name small.rg-sell { display: block; margin-left: 20px; }
.rg-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 14px; font-size: 12.5px; border-top: 1px solid var(--border); }
.rg-legend .lg { display: inline-block; width: 20px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; border: 1px solid rgba(0,0,0,.08); }
.lg-under { background: #FBF1DC; } .lg-full { background: #CFE0CC; } .lg-over { background: #F2C7C1; }
.lg-ten { background: repeating-linear-gradient(45deg, #F6E3C9, #F6E3C9 4px, #EFD2AB 4px, #EFD2AB 8px); }
.lg-leave { background: #F7F5EF; border-color: #c9bfa0 !important; }
.rg-cell-tools { position: absolute; z-index: 20; display: flex; gap: 2px; background: var(--ink); border-radius: 8px; padding: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.rg-cell-tools button { border: 0; background: transparent; color: var(--paper); font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 5px; cursor: pointer; }
.rg-cell-tools button:hover { background: var(--forest); }
.rg-dialog { border: 0; border-radius: 12px; padding: 20px; width: min(520px, 94vw); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.rg-dialog::backdrop { background: rgba(25,28,25,.45); }
.rg-dialog label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.rg-dialog select, .rg-dialog input[type=text], .rg-dialog input[type=date], .rg-dialog input[type=number] { display: block; width: 100%; margin-top: 4px; }
.rg-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rg-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
@media (max-width: 700px) { table.rg .rg-name { min-width: 170px; max-width: 190px; } .rg-status { margin-left: 0; } }
/* Leave pages */
.lv-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.lv-form label { font-weight: 600; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.lv-form .lv-notes { flex: 1 1 220px; }
.lv-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
table.rg input.rg-chance { display: inline-block; width: 48px; margin: 0 2px; padding: 1px 4px; font-size: 12px; height: auto; }
table.rg select.rg-move, table.rg select.rg-assign { width: auto; padding: 2px 4px; height: auto; }
.rg-dialog [hidden], .rg-cell-tools[hidden] { display: none !important; }
.rg-tabs { margin-bottom: 12px; }
.rg-addrow td { height: 38px; background: #FCFBF8; border-bottom: 1px solid var(--border); }
.rg-addrow td.rg-name { padding-left: 26px; background: #FCFBF8; }
table.rg select.rg-add-proj, table.rg select.rg-add-person { width: auto; max-width: 280px; padding: 4px 8px; height: auto; font-size: 12.5px; font-weight: 600;
  color: var(--forest); border: 1.5px dashed var(--forest); border-radius: 6px; background: #fff; cursor: pointer; }
.rg-name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--sage); }
.rg-name a:hover { color: var(--forest); border-bottom-color: var(--forest); }

/* ---- Resourcing: calmer look (1 Nov 2026) - neutral grid, colour only for under / full / over -------- */
table.rg th.cur { background: var(--forest); box-shadow: inset 0 -4px 0 var(--ochre); }
table.rg th.past { background: #2f4a39; }
.rg-person td, .rg-person td.rg-name, .rg-person td.rg-fut { background: #F3F1EB; }
.rg-sum { padding: 6px 6px 5px; }
.rg-sum .rg-sum-n { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.rg-sum .rg-sum-s { font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.rg-bar { height: 4px; background: #E2DED3; border-radius: 2px; margin: 4px 2px 0; overflow: hidden; }
.rg-bar i { display: block; height: 100%; border-radius: 2px; }
.rg-sum.s-under .rg-sum-s { color: #9A5B12; }
.rg-sum.s-under .rg-bar i { background: var(--ochre); }
.rg-sum.s-full .rg-sum-s { color: var(--forest); }
.rg-sum.s-full .rg-bar i { background: var(--forest); }
.rg-person td.rg-sum.s-over { background: #F9E1DE; }
.rg-sum.s-over .rg-sum-n, .rg-sum.s-over .rg-sum-s { color: #A3261E; }
.rg-sum.s-over .rg-bar i { background: #B3332A; }
.rg-sum.s-none .rg-sum-s { color: var(--text-muted); font-weight: 500; }
.rg-sum.past { opacity: .6; }
/* booking cells: plain, spreadsheet-like */
.rg-cell input, .rg-cell input.has-v { width: 58px; border: 1px solid transparent; background: transparent; border-radius: 5px; font-weight: 600; color: var(--ink); box-shadow: none; }
.rg-cell input.has-v { font-weight: 700; background: #F4F2EC; }
.rg-cell input::placeholder { color: #C9C5BA; font-weight: 400; }
.rg-cell input:hover { border-color: var(--border-strong); background: #fff; }
.rg-cell input:focus { border-color: var(--forest); background: #fff; outline: none; box-shadow: 0 0 0 2px rgba(30,61,43,.15); }
.rg-cell.outside { background: #FAF9F6; }
.rg-cell.outside input, .rg-cell.outside input.has-v { border-style: solid; }
.rg-line.is-tender .rg-cell input.has-v { background: transparent; color: #8A520F; font-style: italic; border: 1px solid transparent; }
.rg-line.is-tender .rg-cell input.has-v:hover, .rg-line.is-tender .rg-cell input.has-v:focus { border-color: var(--ochre); background: #fff; }
.rg-line.is-tender td.rg-name { background: #fff; }
.rg-ten-tag { background: none; padding: 0; color: #8A520F; font-weight: 600; }
table.rg input.rg-chance { border: 0; border-bottom: 1px solid var(--ochre); border-radius: 0; background: transparent; width: 40px; color: #8A520F; font-weight: 700; padding: 0 2px; }
.rg-lost { color: #8A6A3A; font-weight: 600; }
.rg-act { color: var(--text-muted); }
.rg-leave td, .rg-leave td.rg-name { background: #fff; color: var(--text-muted); font-weight: 600; font-size: 12px; height: 28px; }
.rg-leave .rg-proj { color: var(--text-muted); font-weight: 500; font-size: 12.5px; }
.rg-hol { color: var(--text-muted); font-weight: 500; }
/* "+ add" rows: a plain link, no box */
.rg-addrow td, .rg-addrow td.rg-name { background: #fff; height: 30px; }
table.rg select.rg-add-proj, table.rg select.rg-add-person { border: 0; background: transparent; color: var(--forest); font-weight: 600; font-size: 12.5px;
  padding: 2px 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
table.rg select.rg-add-proj:hover, table.rg select.rg-add-person:hover { text-decoration: underline; }
table.rg select.rg-add-proj:focus, table.rg select.rg-add-person:focus { outline: none; text-decoration: underline; }
/* legend */
.rg-legend .lg { width: 22px; height: 4px; border: 0; border-radius: 2px; vertical-align: 3px; }
.lg-under { background: var(--ochre); } .lg-full { background: var(--forest); } .lg-over { background: #B3332A; }
.lg-ten-t { color: #8A520F; font-weight: 700; margin-right: 2px; }
.rg-cell.outside input, .rg-cell.outside input.has-v { background: transparent; border-color: transparent; }
.rg-cell.outside input:hover, .rg-cell.outside input:focus { background: #fff; border-color: var(--border-strong); }

/* ---- Resourcing v3 (1 Nov 2026): white sheet on the beige page, one % + bar per person-month ---------- */
.rg-card, table.rg td, table.rg .rg-name, table.rg .rg-fut,
.rg-person td, .rg-person td.rg-name, .rg-person td.rg-fut,
.rg-leave td, .rg-leave td.rg-name, .rg-addrow td, .rg-addrow td.rg-name, .rg-line.is-tender td.rg-name { background: #fff; }
table.rg td { border-left: 0; border-bottom: 1px solid #EFECE4; }
table.rg .rg-name { border-right: 1px solid #E4E0D5; }
.rg-person td { border-top: 1px solid #DCD7CA; }
.rg-person td.rg-name { font-size: 14px; }
.rg-person td.rg-name a { color: var(--forest); font-weight: 700; border-bottom: 0; }
table.rg .rg-fut { color: var(--ink); font-weight: 600; background: #fff; }
table.rg th.rg-fut { background: var(--forest); }
/* the person-month figure */
.rg-sum2 { padding: 6px 8px; vertical-align: middle; }
.rg-sum2 .rg-pct { display: block; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.rg-bar2 { display: block; height: 5px; background: #EDEAE2; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.rg-bar2 i { display: block; height: 100%; border-radius: 3px; }
.u-under .rg-bar2 i { background: #D9A441; }
.u-full .rg-bar2 i { background: #2E7D4F; }
.u-over .rg-bar2 i { background: #C0392B; }
.u-over .rg-pct { color: #C0392B; }
.u-none .rg-pct { color: var(--text-muted); font-weight: 500; }
.rg-sum2.past { opacity: .55; }
/* booking cells: white boxes like a timesheet */
.rg-cell input, .rg-cell input.has-v { width: 58px; height: 30px; background: #fff; border: 1px solid #DDD8CC; border-radius: 5px; font-weight: 600; color: var(--ink); box-shadow: none; font-style: normal; }
.rg-cell input.has-v { font-weight: 700; border-color: #BFB9A9; }
.rg-cell input::placeholder { color: transparent; }
.rg-cell input:hover { border-color: #A9A392; }
.rg-cell input:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 2px rgba(30,61,43,.15); }
.rg-cell.outside { background: #fff; }
.rg-cell.outside input, .rg-cell.outside input.has-v { border-color: #F0EDE6; background: #FBFAF7; }
.rg-line.is-tender .rg-cell input, .rg-line.is-tender .rg-cell input.has-v { border-style: dashed; border-color: #D9B98A; color: #8A520F; font-style: normal; background: #fff; }
.rg-wt { color: #8A520F; font-weight: 600; }
.rg-lost { color: var(--text-muted); font-weight: 500; }
/* tender switch */
.rg-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none; }
.rg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rg-switch-ui { width: 34px; height: 20px; border-radius: 10px; background: #CFCABC; position: relative; transition: background .15s; flex: none; }
.rg-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.rg-switch input:checked + .rg-switch-ui { background: var(--ochre); }
.rg-switch input:checked + .rg-switch-ui::after { left: 17px; }
.rg-switch input:focus-visible + .rg-switch-ui { outline: 2px solid var(--forest); outline-offset: 2px; }
/* legend */
.lg2 { display: inline-block; width: 22px; height: 5px; border-radius: 3px; vertical-align: 3px; margin-right: 6px; }
.lg2-under { background: #D9A441; } .lg2-full { background: #2E7D4F; } .lg2-over { background: #C0392B; }
.rg-legend { background: #fff; }
.rg-cell.outside input, .rg-cell.outside input.has-v { border-color: transparent; background: transparent; }
.rg-cell.outside input:hover, .rg-cell.outside input:focus { border-color: #DDD8CC; background: #fff; }
.rg-line.is-tender .rg-cell input:not(.has-v) { border-style: solid; border-color: #EEE9DF; }
.rg-alert, .rg-alert.over, .rg-alert.clash { background: #fff; border: 1px solid #E4E0D5; border-left-width: 4px; padding: 7px 12px; font-size: 12.5px; margin-bottom: 6px; }
.rg-alert.over { border-left-color: #C0392B; } .rg-alert.clash { border-left-color: #D9A441; }
.rg-won { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--forest); }

/* ---- Timesheet (2 Nov 2026): sleeker sheet; required-hours check moved to the approver ------------ */
.ts-card { padding: 0; overflow: hidden; }
.ts-card > div:first-child { overflow-x: auto; }
.ts-card .timesheet-grid { border-collapse: separate; border-spacing: 0; }
.ts-card .timesheet-grid th, .ts-card .timesheet-grid td { border: 0; border-bottom: 1px solid #EFECE4; padding: 8px 6px; background: #fff; }
.ts-card .timesheet-grid th { background: var(--forest); color: var(--paper); font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 9px 6px; }
.ts-card .timesheet-grid th span { display: block; font-size: 10.5px; font-weight: 400; opacity: .75; margin-top: 1px; }
.ts-card .timesheet-grid th.ts-name-h { text-align: left; padding-left: 16px; min-width: 260px; }
.ts-card .timesheet-grid th.today { box-shadow: inset 0 -4px 0 var(--ochre); }
.ts-card .timesheet-grid th.weekend { background: #2f4a39; }
.ts-card .timesheet-grid td.weekend { background: #FAF9F6; }
.ts-card .timesheet-grid td.proj-name { padding-left: 16px; font-size: 14px; font-weight: 700; color: var(--ink); }
.ts-card .timesheet-grid td.proj-name select { width: 100%; border: 1px solid transparent; background: transparent; padding: 4px 6px; margin-left: -6px; border-radius: 5px; color: var(--ink); }
.ts-card .timesheet-grid td.proj-name select:hover, .ts-card .timesheet-grid td.proj-name select:focus { border-color: #DDD8CC; background: #fff; }
.ts-card .timesheet-grid td.proj-name select.new-row-project { font-weight: 700; font-size: 14px; }
.ts-card .timesheet-grid td.proj-name select.row-task, .ts-card .timesheet-grid td.proj-name select.new-row-task { font-weight: 400; font-style: normal; font-size: 12.5px; color: #4F574C; margin-top: 2px; }
.ts-card .timesheet-grid td.proj-name div.text-muted { font-style: normal; font-size: 12.5px; }
.ts-card .timesheet-grid td.day-cell { position: relative; text-align: center; }
.ts-card .timesheet-grid input.hour-input { width: 66px; height: 34px; padding: 4px 6px; font-size: 14px; font-weight: 700; text-align: center; color: var(--ink);
  background: #fff; border: 1px solid #DDD8CC; border-radius: 6px; -moz-appearance: textfield; appearance: textfield; }
.ts-card .timesheet-grid input.hour-input::-webkit-outer-spin-button, .ts-card .timesheet-grid input.hour-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ts-card .timesheet-grid input.hour-input:hover { border-color: #A9A392; }
.ts-card .timesheet-grid input.hour-input:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 2px rgba(30,61,43,.15); }
.ts-card .timesheet-grid input.hour-input[readonly] { background: #F7F6F2; border-color: #EEEAE1; color: #555; }
.ts-card .timesheet-grid .comment-toggle { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; opacity: 0; border: 0; background: transparent; color: #A9A392; transition: opacity .1s; }
.ts-card .timesheet-grid td.day-cell:hover .comment-toggle, .ts-card .timesheet-grid .comment-toggle:focus { opacity: 1; }
.ts-card .timesheet-grid .comment-toggle.has-note { opacity: 1; background: transparent; color: var(--ochre); border: 0; }
.ts-card .timesheet-grid td.row-total { font-weight: 700; font-size: 14px; color: var(--ink); }
.ts-card .timesheet-grid tfoot td { background: #F7F6F2; font-weight: 700; font-size: 13.5px; border-bottom: 0; }
.ts-card .timesheet-grid tfoot td:first-child { text-align: left; padding-left: 16px; }
.ts-card .remove-row { border: 0; background: transparent; color: #B5B0A3; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.ts-card .remove-row:hover { color: var(--danger); background: var(--danger-light); }
.ts-card > .flex-between { padding: 12px 16px; margin-top: 0 !important; border-top: 1px solid #EFECE4; }
/* status line */
.ts-status { margin-bottom: 14px; }
.ts-status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink); }
.ts-inline { display: inline; margin: 0; }
.ts-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: #ECE9E1; color: #4F574C; }
.ts-pill-ok { background: #DCEBDF; color: #22603C; }
.ts-pill-wait { background: #F5E6CC; color: #8A520F; }
.ts-pill-bad { background: #F7DCD8; color: #A3261E; }
.ts-proj-status { margin-top: 8px; width: 100%; max-width: 760px; background: #fff; border: 1px solid #E4E0D5; border-radius: 8px; font-size: 13px; }
.ts-proj-status td { padding: 7px 12px; border-bottom: 1px solid #EFECE4; }
.ts-proj-status tr:last-child td { border-bottom: 0; }
/* approver's week check */
.ts-check { background: #fff; border: 1px solid #E4E0D5; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; }
.ts-check-main, .ts-check-ot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-check-ot { margin-top: 6px; font-size: 13px; }
.ts-mini { margin: 3px 0 1px; display: flex; gap: 4px; }
/* timesheet: the X / 40 figure */
.ts-figure { margin-left: auto; margin-right: 18px; text-align: right; line-height: 1; align-self: center; }
.ts-figure .ts-fig-x { font-size: 34px; font-weight: 800; color: #9A5B12; letter-spacing: -.01em; }
.ts-figure .ts-fig-of { font-size: 22px; font-weight: 600; color: var(--text-muted); }
.ts-figure.met .ts-fig-x { color: #22603C; }
.ts-figure .ts-fig-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 700px) { .ts-figure { margin: 8px 0; text-align: left; } }

/* ---- Invoicing (2 Nov 2026) ----------------------------------------------------------------------- */
.inv-ready { margin-top: 10px; }
.inv-warn { color: #9A5B12; font-weight: 600; }
.inv-warnings { border-left: 4px solid #D9A441; font-size: 13px; }
.inv-warnings div + div { margin-top: 4px; }
.inv-card { padding: 0; overflow: hidden; }
.inv-lines { width: 100%; border-collapse: collapse; }
.inv-lines th { background: var(--forest); color: var(--paper); font-size: 12px; padding: 9px 14px; text-align: left; }
.inv-lines td { padding: 9px 14px; border-bottom: 1px solid #EFECE4; font-size: 13.5px; }
.inv-lines tr.inv-cap td, .inv-lines tr.inv-ot_writeoff td { color: #9A5B12; }
.inv-lines tr.inv-overtime td:first-child { font-weight: 600; }
.inv-lines tfoot td { border-bottom: 0; padding: 6px 14px; }
.inv-lines tr.inv-total td { font-size: 16px; font-weight: 800; color: var(--forest); border-top: 2px solid var(--forest); padding-top: 10px; }
.inv-saving { margin: 0 14px 12px; padding: 8px 12px; background: #FBF1DC; border-radius: 6px; color: #8A520F; font-weight: 600; font-size: 13px; }
.inv-add { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #EFECE4; flex-wrap: wrap; }
.inv-add input[name=description] { flex: 1 1 320px; }
.inv-add input[name=quantity] { width: 80px; } .inv-add input[name=rate] { width: 110px; }
.inv-x { border: 0; background: none; color: #B5B0A3; font-size: 16px; cursor: pointer; }
.inv-x:hover { color: var(--danger); }
.badge-approved { background: var(--success-light); color: var(--success); }
/* Xero panel on an invoice */
.xero-card { border-left: 4px solid #13B5EA; }
.xero-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.xero-badge { background: #13B5EA; color: #fff; font-weight: 800; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.xero-send { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; }
.xero-send .btn { margin-left: auto; }
.xero-preview { display: block; margin: 4px 0; padding: 6px 10px; background: #F4F2EC; border-radius: 6px; font-size: 12px; color: #4F574C; }
.xero-conn { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.danger-zone { border-left: 4px solid var(--danger); }
.del-list { margin: 6px 0 12px 18px; font-size: 14px; line-height: 1.7; }
.imp-table { width: 100%; border-collapse: collapse; }
.imp-table th { background: var(--forest); color: var(--paper); font-size: 12px; text-align: left; padding: 9px 12px; }
.imp-table td { padding: 10px 12px; border-bottom: 1px solid #EFECE4; vertical-align: top; font-size: 13.5px; }

/* ---- Projects list (Nov 2026: matches the import preview) ---- */
.prj-head { flex-wrap: wrap; }
.prj-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.prj-tools select { min-width: 170px; }
.prj-card { padding: 0; overflow: hidden; }
.imp-table.prj-table { width: 100%; }
.prj-table th.prj-hrs, .prj-table td.prj-hrs { text-align: right; white-space: nowrap; }
.prj-table td.prj-bill { white-space: nowrap; }
.prj-table tbody tr.prj-row { cursor: pointer; transition: background .12s; }
.prj-table tbody tr.prj-row:hover { background: #FAF8F3; }
.prj-table tbody tr.prj-row:last-child td { border-bottom: 0; }
.prj-table tr.is-done td { color: var(--text-muted); }
.prj-name { font-weight: 700; color: var(--ink, #191C19); }
.prj-row:hover .prj-name { color: var(--forest); text-decoration: none; }
.prj-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }
.prj-team { display: flex; }
.prj-av { width: 26px; height: 26px; border-radius: 50%; background: #E3E8E0; color: var(--forest); font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; margin-left: -6px; }
.prj-av:first-child { margin-left: 0; }
.prj-av-more { background: #ECE9E1; color: #4F574C; }
.prj-burn { height: 5px; background: #ECE9E1; border-radius: 3px; overflow: hidden; margin: 5px 0 0 auto; width: 110px; }
.prj-burn span { display: block; height: 100%; background: var(--forest); border-radius: 3px; }
.prj-burn span.near { background: var(--ochre, #B8752E); }
.prj-burn span.over { background: #A3261E; }


/* ---- Project documents (Nov 2026) ---- */
.doc-layout { display: grid; grid-template-columns: 420px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } }
.doc-upload input[type=file] { width: 100%; }
.doc-upload select, .doc-upload input[type=text], .doc-upload input[type=date], .doc-upload textarea { width: 100%; }
.doc-list { padding: 0; overflow: hidden; }
.doc-list .empty-state { padding: 28px; }
.imp-table tr.doc-group td { background: #F3F1EA; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--forest); padding: 7px 12px; }


/* ---- Contract tab, register, client feedback (Nov 2026) ---- */
.setup-card { margin-bottom: 16px; border-left: 4px solid var(--ochre, #B8752E); }
.setup-card.is-done { border-left-color: var(--forest); }
.setup-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.setup-title { font-weight: 700; font-size: 16px; color: var(--forest); }
.setup-ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--forest) calc(var(--p) * 1%), #E7E3D8 0); }
.setup-ring span { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: var(--forest); }
.setup-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .setup-list { grid-template-columns: 1fr; } }
.setup-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.setup-list .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #D5CFC0; flex: none; display: grid; place-items: center; font-size: 11px; color: #fff; }
.setup-list li.ok .tick { background: var(--forest); border-color: var(--forest); }
.rem-live { margin-bottom: 16px; padding: 10px 16px; }
.rem-row { padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid #EFECE4; }
.rem-row:last-child { border-bottom: 0; }
.rem-row.urgent { font-weight: 700; }
.rem-add { display: grid; grid-template-columns: 150px 1fr 1fr auto; gap: 8px; margin-bottom: 10px; }
@media (max-width: 900px) { .rem-add { grid-template-columns: 1fr; } }
.rem-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rem-table td { padding: 8px 6px; border-top: 1px solid #EFECE4; vertical-align: middle; }
.rem-table tr.done td { color: var(--text-muted); text-decoration: line-through; }
.opt-table td { padding: 6px 4px; }
.reg-rem { margin-bottom: 3px; }
.reg-rem.urgent { color: #A3261E; }
.fb-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.fb-kpis .k { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.fb-kpis .v { font-size: 26px; font-weight: 700; color: var(--forest); }
.fb-kpis .v span { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.fb-answers { width: 100%; border-collapse: collapse; margin-top: 12px; }
.fb-answers td { padding: 10px 8px; border-top: 1px solid #EFECE4; vertical-align: top; font-size: 13.5px; }
.fb-answers td.q { width: 45%; color: var(--text-muted); }
.fb-stars b { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #E7E3D8; margin-right: 2px; }
.fb-stars b.on { background: var(--ochre, #B8752E); }
.fb-preview li { margin-bottom: 6px; font-size: 13.5px; }
/* the client's form */
body.fbf-page { background: var(--paper, #F6F4EE); margin: 0; }
.fbf-wrap { max-width: 680px; margin: 0 auto; padding: 32px 16px 48px; }
.fbf-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 40px rgba(25,28,25,.08); }
.fbf-band { background: var(--forest, #1E3D2B); padding: 22px 28px; }
.fbf-band .wordmark { color: var(--paper, #F6F4EE); }
.fbf-body { padding: 26px 28px 30px; }
.fbf-body h1 { margin: 0 0 6px; color: var(--forest, #1E3D2B); font-size: 26px; }
.fbf-intro { margin: 0 0 18px; }
.fbf-muted { color: #6B7268; font-size: 13px; }
.fbf-error { background: #F7DCD8; color: #A3261E; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.fbf-q { padding: 16px 0; border-top: 1px solid #EFECE4; }
.fbf-label { font-weight: 700; font-size: 14.5px; margin-bottom: 9px; color: var(--ink, #191C19); }
.fbf-scale { display: flex; gap: 8px; flex-wrap: wrap; }
.fbf-scale label { cursor: pointer; }
.fbf-scale input { position: absolute; opacity: 0; pointer-events: none; }
.fbf-scale span { display: grid; place-items: center; min-width: 46px; height: 42px; padding: 0 10px; border: 1.5px solid #D5CFC0; border-radius: 9px; font-weight: 700; color: #4F574C; background: #fff; transition: all .12s; }
.fbf-nps span { min-width: 38px; }
.fbf-scale input:checked + span { background: var(--forest, #1E3D2B); border-color: var(--forest, #1E3D2B); color: #fff; }
.fbf-scale input:focus-visible + span { outline: 2px solid var(--ochre, #B8752E); outline-offset: 2px; }
.fbf-ends { display: flex; justify-content: space-between; max-width: 270px; font-size: 11.5px; color: #8A9087; margin-top: 4px; }
.fbf-nps + .fbf-ends { max-width: 520px; }
.fbf-body textarea, .fbf-body input[type=text] { width: 100%; box-sizing: border-box; border: 1.5px solid #D5CFC0; border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14px; }
.fbf-who { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid #EFECE4; }
@media (max-width: 560px) { .fbf-who { grid-template-columns: 1fr; } }
.fbf-submit { background: var(--forest, #1E3D2B); color: #fff; border: 0; border-radius: 10px; padding: 13px 26px; font-weight: 700; font-size: 15px; cursor: pointer; }
.fbf-submit:hover { background: #2A5239; }
.fbf-foot { text-align: center; font-size: 12px; color: #8A9087; margin-top: 16px; }
.setup-nudge { display: flex; align-items: center; gap: 12px; background: #FBF3E6; border: 1px solid #EBD3AE; border-radius: 10px; padding: 8px 14px; margin: -6px 0 16px; color: #6A4512; font-size: 13.5px; }
.setup-nudge:hover { text-decoration: none; background: #F8ECD8; }
.imp-table td .ts-pill { white-space: nowrap; }
.opt-table tr.opt-head td { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border-top: 0; padding-bottom: 2px; }
.opt-table td { font-size: 12.5px; }
.rg-peek-foot td { padding: 4px 12px 10px 34px !important; font-size: 12.5px; background: #FBFAF6; }
.rg-peek-foot a { font-weight: 700; }
.opt-table input[type=date] { width: 100%; min-width: 0; padding: 5px 6px; font-size: 12.5px; }
.opt-table td { padding: 5px 3px; }
.opt-table .opt-x { padding: 2px 8px; }
.opt-table tr.opt-new td { border-top: 1px dashed #DDD8CB; }
.opt-table td.opt-act { text-align: right; width: 1%; }
.opt-table td.opt-act .btn { display: block; width: 100%; margin: 2px 0; padding: 2px 8px; font-size: 11.5px; white-space: nowrap; }
.opt-table td.opt-act .opt-x { display: inline-block; width: auto; }
.rem-table tr.rem-auto td { color: #3E463C; }
.rem-table tr.rem-auto td:first-child { color: var(--forest); font-weight: 700; }
.var-add { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.var-add .var-wide { grid-column: span 2; }
.var-add button { grid-column: span 4; justify-self: start; }
@media (max-width: 900px) { .var-add { grid-template-columns: 1fr 1fr; } .var-add .var-wide, .var-add button { grid-column: span 2; } }
.rate-changes { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.hist-table tr.hist-orig td { background: #FBFAF6; }
.hist-table tr.hist-orig td:first-child strong { color: var(--forest); }
.hist-tag { font-size: 10.5px !important; padding: 1px 7px !important; vertical-align: 1px; }
/* Contract tab: the contract and variations as line items across the page, options as hold points (3 Nov 2026) */
.ci-card { margin-bottom: 16px; }
.ci-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ci-kpis { display: grid; grid-template-columns: repeat(4, minmax(150px, auto)); gap: 10px 28px; }
.ci-kpis > div { display: flex; flex-direction: column; }
.ci-kpis span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ci-kpis strong { font-size: 15.5px; color: var(--forest); margin-top: 2px; }
.ci-kpis em { font-style: normal; font-size: 12px; color: var(--text-muted); }
@media (max-width: 900px) { .ci-kpis { grid-template-columns: 1fr 1fr; } }
.ci-h { margin: 20px 0 8px; font-size: 14px; color: var(--forest); text-transform: uppercase; letter-spacing: .05em; }
.ci-h-note { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; color: var(--text-muted); margin-left: 6px; }
.ci-table th.ci-num, .ci-table td.ci-num { text-align: right; white-space: nowrap; }
.ci-table td.ci-sum { font-size: 12.5px; color: #3E463C; max-width: 340px; }
.ci-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: help; }
.ci-table tr:hover .ci-clamp { -webkit-line-clamp: unset; }
.ci-table td.ci-act { text-align: right; white-space: nowrap; width: 1%; }
.ci-table td.ci-act form { display: inline; }
.ci-ref { color: var(--forest); }
.ci-empty { padding: 12px 14px; background: #FBFAF6; border: 1px dashed #DDD8CB; border-radius: 8px; font-size: 13px; color: #4F574C; }
.ci-hold tr.is-live td { background: #FBF3E6; }
.ci-hold tr.is-off td { color: var(--text-muted); }
.ci-hold tr.ci-end td { border-top: 2px solid #E6E1D5; }
.ci-dialog { width: min(760px, calc(100vw - 32px)); }
.ci-intro { font-size: 12.5px; margin: -4px 0 12px; }
.ci-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .ci-grid { grid-template-columns: 1fr; } }
.ci-opts { margin-top: 6px; padding: 12px 14px; background: #FBFAF6; border: 1px solid #EFECE4; border-radius: 8px; }
.ci-opts-head { font-size: 13px; margin-bottom: 6px; }
.ci-opt-table { width: 100%; margin-bottom: 8px; }
.ci-opt-table td.ci-opt-n { font-weight: 700; font-size: 12.5px; white-space: nowrap; color: var(--forest); }
.ci-opt-add { align-items: center; flex-wrap: wrap; }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .doc-cols { grid-template-columns: 1fr; } }
.fb-settings { margin: 4px 0 10px; font-size: 12.5px; }
.fb-settings summary { cursor: pointer; color: var(--forest); font-weight: 600; }
.fb-set-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.fb-set-form .check-inline, .fb-set-form button { grid-column: span 2; justify-self: start; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 12px; }
.doc-list .doc-note { margin: 0; padding: 10px 20px 14px; }
.doc-head h3 { margin: 0; }
.doc-dialog { width: min(600px, calc(100vw - 32px)); }
/* Contract / Variations / hold points share one column grid so they line up (3 Nov 2026) */
.ci-table { table-layout: fixed; }
.ci-table col.c-ref { width: 11%; } .ci-table col.c-per { width: 13%; } .ci-table col.c-val { width: 9%; }
.ci-table col.c-tot { width: 9%; } .ci-table col.c-rate { width: 13%; } .ci-table col.c-opt { width: 10%; }
.ci-table col.c-sum { width: 17%; } .ci-table col.c-doc { width: 12%; } .ci-table col.c-act { width: 96px; }
.ci-table td { overflow-wrap: anywhere; }
.ci-table td.ci-doc a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; }
.ci-table td.ci-act { width: auto; }
.ci-hold td.ci-act { text-align: left; }
.ci-hold td.ci-act form + form { margin-left: 4px; }
@media (max-width: 1100px) { .ci-table { table-layout: auto; } }
/* Budget tab: PO drawdown (embedded) and the Team & budget table (3 Nov 2026) */
.po-bar { display: flex; height: 10px; border-radius: 6px; background: #E9E5DA; overflow: hidden; margin: 14px 0 14px; }
.po-bar .po-inv { background: var(--forest); }
.po-bar .po-pend { background: var(--sage, #838F80); }
.po-kpis { grid-template-columns: repeat(5, minmax(140px, 1fr)); margin-bottom: 14px; }
@media (max-width: 1000px) { .po-kpis { grid-template-columns: 1fr 1fr; } }
.po-table tr.po-pending td { background: #FBFAF6; color: #3E463C; }
.tb-table { margin-top: 12px; }
.tb-table th.ci-num, .tb-table td.ci-num { text-align: right; white-space: nowrap; }
.tb-table td.ci-act { text-align: right; white-space: nowrap; width: 1%; }
.tb-table td.ci-act form { display: inline; }
.tb-table th.tb-left, .tb-table td.tb-left { width: 150px; }
.tb-table td.tb-left .prj-burn { margin-top: 4px; }
.tb-leftnum { font-variant-numeric: tabular-nums; }
.tb-table tr.tb-role td { background: #FBFAF6; }
.tb-table tfoot td { border-top: 2px solid #E6E1D5; background: #F6F4EE; }
.tb-note { margin-top: 10px; font-size: 13px; color: #3E463C; }
.tb-more summary { cursor: pointer; color: var(--forest); font-size: 13.5px; }
details.tb-more { margin-top: 12px; }
details.card.tb-more summary { font-size: 14px; }
.tb-dialog { width: min(620px, calc(100vw - 32px)); }
.tb-name { font-weight: 700; color: var(--forest); padding: 6px 0; }
.tb-newrate { margin-top: 6px; padding: 12px 14px; background: #FBFAF6; border: 1px solid #EFECE4; border-radius: 8px; }
.po-table th.ci-num, .po-table td.ci-num { text-align: right; white-space: nowrap; }
/* Users list: outstanding profile items collapsed behind a count (3 Nov 2026) */
.gap-pop { position: relative; margin-top: 4px; font-size: 12px; }
.gap-pop summary { cursor: pointer; color: var(--ochre, #B8752E); font-weight: 600; list-style: none; }
.gap-pop summary::-webkit-details-marker { display: none; }
.gap-pop summary::after { content: " \25BE"; }
.gap-pop[open] summary::after { content: " \25B4"; }
.gap-pop ul { position: absolute; z-index: 20; left: 0; top: 20px; width: 280px; margin: 0; padding: 10px 14px 10px 28px; background: #fff;
  border: 1px solid #E6E1D5; border-radius: 10px; box-shadow: 0 8px 24px rgba(25,28,25,.14); color: #3E463C; line-height: 1.55; }
.gap-flags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
/* Resourcing > By project: project name in a rounded frame, team initials as on the Projects list, client column (4 Nov 2026) */
.rg-pcard { display: flex; align-items: center; gap: 6px; }
.rg-pcard .rg-tog { padding: 0 2px; }
.rg-pbody { min-width: 0; flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.rg-pframe { display: inline-block; max-width: 230px; box-sizing: border-box; padding: 4px 11px; border: 1.5px solid #D9D3C3; border-radius: 9px;
  background: #fff; font-weight: 700; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-pframe a { color: var(--ink); }
.rg-group:hover .rg-pframe { border-color: var(--forest); }
.rg-group.is-tender .rg-pframe { border-style: dashed; border-color: var(--ochre); }
.rg-pmeta { display: flex; align-items: center; gap: 8px; }
table.rg tr.rg-group td { height: 52px; }
.rg-pmeta .prj-av { font-size: 10px; }
table.rg td.rg-fut small.rg-ahead { display: block; font-size: 10.5px; font-weight: 600; color: #5B6358; margin-top: 1px; }
.rg-pmeta .rg-ten-tag { margin-top: 0; }
table.rg .rg-client { text-align: left; min-width: 150px; max-width: 220px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
table.rg th.rg-client { background: var(--forest); color: var(--paper); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
table.rg td.rg-client small { display: block; font-weight: 500; font-size: 11.5px; color: #5B6358; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-person td.rg-client, .rg-line td.rg-client { background: #fff; }
.rg-line td.rg-client { border-right: 1px solid #EFECE4; }
table.rg tr.rg-group td.rg-client { border-right: 1px solid #EFECE4; }
/* Budget tab: day rate check (4 Nov 2026) */
.dr-table { margin-top: 12px; }
.dr-table th.ci-num, .dr-table td.ci-num { text-align: right; white-space: nowrap; }
.dr-table tr.dr-flag td { background: #FBF1EE; }
.dr-table td.dr-all { font-size: 12.5px; color: #3E463C; }
.dr-up { color: var(--danger) !important; font-weight: 700; }
.inv-info { background: #F3F6F2; border-left: 4px solid var(--forest); font-size: 13px; color: #2B3A2F; padding: 10px 14px; }
/* Resourcing > By project as a roll-off view (4 Nov 2026) */
table.rg th.ro-ends, table.rg td.ro-ends { text-align: left; min-width: 190px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
table.rg td.ro-ends small { display: block; font-size: 11.5px; color: #5B6358; white-space: normal; max-width: 230px; }
table.rg td.ro-ends small.ro-opt-txt { color: #8a5413; }
table.rg tr.ro-row td { height: 54px; background: #fff; }
table.rg tr.ro-row td.rg-name { padding: 8px 10px; }
table.rg td.ro-cell { padding: 0; position: relative; }
table.rg td.ro-cell.cur { background: #FBFAF6; }
.ro-bar { position: absolute; left: 0; right: 0; top: 50%; height: 14px; margin-top: -7px; display: block; }
.ro-bar.on { background: var(--forest); }
.ro-bar.on.first { left: 4px; border-radius: 7px 0 0 7px; }
.ro-bar.on.last { right: 4px; border-radius: 0 7px 7px 0; }
.ro-bar.on.first.last { border-radius: 7px; }
.ro-bar.on.bad { background: var(--danger, #A93226); }
.ro-bar.opt { background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(184,117,46,.18) 6px 7px); border: 1.5px dashed var(--ochre); border-left: 0; border-right: 0; height: 12px; margin-top: -6px; }
.ro-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: #EEF2EC; color: var(--forest); }
.ro-pill.warn { background: var(--ochre-tint); color: #7b4a14; }
.ro-pill.bad { background: #F6DCD8; color: #8A2318; }
.ro-key { display: inline-block; width: 26px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: -1px; }
.ro-key-on { background: var(--forest); }
.ro-key-opt { border: 1.5px dashed var(--ochre); border-radius: 0; height: 8px; }
.ro-key-bad { background: var(--danger, #A93226); }
.ro-row .rg-tag { font-size: 10.5px; }
/* Resourcing people bands (4 Nov 2026): amber < 90%, green 90-100%, light red 100-110%, dark red > 110% */
.u-over .rg-bar2 i { background: #E0796B; }
.u-over .rg-pct { color: #C0392B; }
.u-over2 .rg-bar2 i { background: #8E1B12; }
.u-over2 .rg-pct { color: #8E1B12; }
table.rg td.rg-sum2.u-over2 { background: #FBE6E3; }
.lg2-over { background: #E0796B; } .lg2-over2 { background: #8E1B12; }

/* ---- v42 consistency pass: shared card head, pop-ups, logos ---- */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; color: var(--forest); display: flex; align-items: center; gap: 8px; }
.card-head .card-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.card-head .card-tools { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.card-count { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 100px; background: var(--sage-tint); color: var(--text-muted); font-size: 11.5px; font-weight: 700; text-align: center; }
.log-dialog { width: min(640px, calc(100vw - 32px)); }
.log-dialog .form-row { display: flex; gap: 12px; }
.log-dialog .form-row > .field { flex: 1; min-width: 0; }
.log-dialog-sub { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--border); }
img.logo-sm.logo-failed { display: none; }
.co-cell { display: flex; align-items: center; gap: 8px; }
.co-cell > .logo-sm { flex-shrink: 0; }
.logo-sm.logo-blank { font-size: 12px; background: var(--sage-tint); border-color: transparent; color: var(--forest); }
.logo-md.logo-blank, .logo-lg.logo-blank { background: var(--sage-tint); border-color: transparent; color: var(--forest); }
.log-dialog .field { margin-bottom: 12px; }
.nowrap, td.nowrap { white-space: nowrap; }
.req-details > summary { list-style: none; cursor: pointer; }
.req-details > summary::-webkit-details-marker { display: none; }
.req-details[open] .req-toggle { visibility: hidden; }
.lv-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.lv-grid > .card + .card { margin-top: 0; }
.lv-grid + .card { margin-top: 16px; }
.lv-hols { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.lv-hols li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.lv-hols li:first-child { border-top: 0; padding-top: 0; }
.lv-decide { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.lv-decide input { width: 180px; font-size: 12.5px; padding: 5px 8px; }
.lv-count-wait { background: var(--ochre-tint); color: var(--warning); }
@media (max-width: 900px) { .lv-grid { grid-template-columns: 1fr; } }
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.set-grid .card + .card, .set-col .card + .card { margin-top: 16px; }
.set-grid > .card { margin-top: 0; }
.set-status { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: var(--sage-tint); color: var(--text-muted); white-space: nowrap; }
.set-status.on { background: var(--success-light); color: var(--success); }
.set-conn { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; padding: 10px 12px; margin-bottom: 14px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.set-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.set-save { display: flex; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 1000px) { .set-grid { grid-template-columns: 1fr; } }
/* Reports: brand palette, bands matching Resourcing */
.viz-root { --viz-series-1: var(--forest); --viz-series-2: var(--stone); --viz-critical: #8E1B12; --viz-grid: var(--sage-tint); }
.rg-seg a { display: inline-block; color: var(--forest); padding: 7px 13px; font-weight: 600; font-size: 13px; text-decoration: none; }
.rg-seg a + a { border-left: 1px solid var(--border-strong); }
.rg-seg a.active { background: var(--forest); color: var(--paper); }
.rg-seg a:hover:not(.active) { background: var(--forest-tint); }
.rp-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.rp-legend span { white-space: nowrap; }
.bar-list-row.rp-row { grid-template-columns: 170px 1fr 150px; }
.rp-row .bl-value strong { color: var(--ink); margin-left: 6px; display: inline-block; min-width: 38px; }
.rp-under .bl-fill { background: #D9A441; }
.rp-full .bl-fill { background: #2E7D4F; }
.rp-over .bl-fill { background: #E0796B; }
.rp-over2 .bl-fill { background: #8E1B12; }
.rp-over .bl-value strong { color: #C0392B; }
.rp-over2 .bl-value strong { color: #8E1B12; }
.rp-none .bl-value strong { color: var(--text-muted); font-weight: 500; }
.rp-split { display: flex; gap: 24px; margin-bottom: 10px; font-size: 13px; color: var(--text-muted); }
.rp-split strong { color: var(--ink); font-size: 18px; margin-right: 2px; }
.rp-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--forest); margin-right: 6px; }
.rp-swatch-2 { background: var(--stone); }
.rp-split-bar { height: 14px; border-radius: 7px; background: var(--sage-tint); display: flex; overflow: hidden; }
.rp-split-bar .bl-fill { height: 100%; background: var(--forest); }
.rp-split-bar .bl-fill.series-2 { background: var(--stone); }
.rp-margin { font-weight: 700; color: var(--success); }
.rp-margin.neg { color: var(--danger); }
.rp-margin.nil { color: var(--text-muted); font-weight: 500; }
/* Today: three tiles fill the row; Waiting on you is a list */
.me-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
@media (max-width: 900px) { .me-stats { grid-template-columns: 1fr; } }
.today-side > .card + .card { margin-top: 16px; }
.wait-card { border-left: 4px solid var(--ochre); }
.wait-count { background: var(--ochre-tint); color: var(--warning); }
.wait-list { list-style: none; margin: 0; padding: 0; }
.wait-list li + li { border-top: 1px solid var(--border); }
.wait-list a { display: flex; align-items: center; gap: 10px; padding: 8px 2px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.35; }
.wait-list a:hover { color: var(--forest); }
.wait-list a:hover .wait-go { transform: translateX(2px); }
.wait-n { flex: 0 0 auto; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--forest-tint); color: var(--forest); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.wait-what { flex: 1; }
.wait-go { color: var(--text-muted); font-size: 18px; line-height: 1; transition: transform .15s; }
.hol-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.hol-tabs a { padding: 6px 12px; border-radius: 8px; border: 1.5px solid var(--border-strong); background: #fff; color: var(--forest); font-weight: 700; font-size: 13px; text-decoration: none; }
.hol-tabs a.active { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.hol-tabs a:hover:not(.active) { background: var(--forest-tint); }
.hol-n { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--sage-tint); color: var(--text-muted); font-size: 11px; }
.hol-tabs a.active .hol-n { background: rgba(255,255,255,.18); color: var(--paper); }
/* Timesheet: approved leave and public holidays as locked rows */
.ts-fixed tr td { background: var(--paper); }
.ts-fixed tr:first-child td { border-top: 2px solid var(--border-strong); }
.ts-fixed .proj-name { color: var(--text-muted); font-weight: 600; }
.ts-fixed-sub { font-size: 11.5px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
.ts-lock { font-size: 11px; opacity: .6; }
.ts-fixed-h { display: inline-block; min-width: 44px; padding: 5px 6px; border-radius: 6px; background: var(--sage-tint); color: var(--forest); font-weight: 700; font-size: 13px; text-align: center; }
.ts-fixed-holiday .ts-fixed-h { background: var(--stone-tint); color: #6E6247; }
.ts-fixed-name { font-weight: 500; font-size: 11px; line-height: 1.2; max-width: 90px; white-space: normal; }
.ts-fixed .row-total { color: var(--text-muted); }
.page-header .btn { white-space: nowrap; }
.pilot-bar { background: var(--ochre); color: #fff; font-size: 12.5px; padding: 6px 24px; letter-spacing: .01em; }
.pilot-bar strong { letter-spacing: .12em; margin-right: 4px; }

/* ---- Delivery workspace (advisory projects; from Joe's Veluca Engage) ---- */
.eg-band { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.eg-stages { display: flex; gap: 6px; flex-wrap: wrap; }
.eg-stage { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 100px; color: var(--text-muted); text-decoration: none; font-size: 13px; border: 1px solid transparent; }
.eg-stage b { display: block; color: var(--ink); font-size: 13px; line-height: 1.1; }
.eg-stage-sub { display: block; font-size: 11px; }
.eg-stage-n { width: 24px; height: 24px; border-radius: 50%; background: var(--sage-tint); color: var(--forest); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.eg-stage.done .eg-stage-n { background: var(--forest); color: var(--paper); }
.eg-stage.cur { border-color: var(--forest); background: var(--forest-tint); }
.eg-stage.cur .eg-stage-n { background: var(--ochre); color: #fff; }
.eg-rag { display: flex; gap: 6px; }
.eg-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 100px; background: var(--paper); border: 1px solid var(--border); }
.eg-chip i, .eg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--sage); }
.rag-G i, .eg-dot.rag-G { background: #2E7D4F; }
.rag-A i, .eg-dot.rag-A { background: #D9A441; }
.rag-R i, .eg-dot.rag-R { background: #C0392B; }
.eg-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.eg-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.eg-nav a { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 13px; }
.eg-nav a:hover { background: var(--paper); }
.eg-nav a.active { background: var(--forest); color: var(--paper); font-weight: 600; }
.eg-nav-grp { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding: 10px 10px 4px; }
.eg-cnt { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 100px; background: var(--sage-tint); color: var(--text-muted); }
.eg-cnt.od { background: var(--danger-light); color: var(--danger); }
.eg-nav a.active .eg-cnt { background: rgba(255,255,255,.18); color: var(--paper); }
.eg-body > .card + .card, .eg-body > .eg-g2 + .card, .eg-body > .card + .eg-g2, .eg-body > .eg-g2 + .eg-g2 { margin-top: 16px; }
.eg-sechead { margin-bottom: 14px; }
.eg-sechead h2 { font-size: 20px; }
.eg-card { padding: 16px 18px; }
.eg-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.eg-g2 > .card { margin-top: 0; }
.eg-health { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.eg-hcard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--sage); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.eg-hcard b { font-size: 18px; color: var(--ink); }
.eg-hcard.rag-G { border-left-color: #2E7D4F; } .eg-hcard.rag-A { border-left-color: #D9A441; } .eg-hcard.rag-R { border-left-color: #C0392B; }
.eg-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.eg-sub { font-size: 12px; color: var(--text-muted); }
.eg-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--text-muted); margin-right: 4px; }
.eg-title { font-weight: 600; color: var(--ink); }
.eg-struck { text-decoration: line-through; color: var(--text-muted); font-weight: 400; }
.eg-person { white-space: nowrap; }
.eg-table { width: 100%; }
.eg-table th { white-space: nowrap; }
.eg-row { cursor: pointer; }
.eg-row:hover td { background: var(--paper); }
.eg-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 100px; background: var(--sage-tint); color: var(--text-muted); white-space: nowrap; }
.eg-pill.ok { background: var(--success-light); color: var(--success); }
.eg-pill.warn { background: var(--ochre-tint); color: var(--warning); }
.eg-pill.bad { background: var(--danger-light); color: var(--danger); }
.eg-score { display: inline-block; min-width: 26px; text-align: center; font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 6px; margin-right: 6px; }
.eg-score.ok { background: var(--success-light); color: var(--success); } .eg-score.warn { background: var(--ochre-tint); color: var(--warning); } .eg-score.bad { background: var(--danger-light); color: var(--danger); }
.eg-pbar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--sage-tint); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.eg-pbar i { display: block; height: 100%; background: var(--forest); }
.eg-signs { display: inline-flex; gap: 4px; }
.eg-signs i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: inline-block; }
.eg-signs i.d { background: var(--forest); border-color: var(--forest); }
.eg-signed { color: var(--success); font-weight: 600; font-size: 12.5px; }
.eg-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.eg-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.eg-list li:first-child { border-top: 0; padding-top: 0; }
.eg-list .eg-title { flex: 1; min-width: 0; }
.eg-kind { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; min-width: 86px; }
.eg-mini-h { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.eg-gates { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.eg-gate { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; background: var(--paper); }
.eg-gate.cur { border-color: var(--forest); background: #fff; box-shadow: 0 0 0 1px var(--forest) inset; }
.eg-gate-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.eg-check { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; padding: 4px 0; font-weight: 400; color: var(--ink); }
.eg-check.done span { color: var(--text-muted); }
.eg-check input { margin-top: 2px; }
.eg-auto { color: var(--forest); font-size: 11px; width: 13px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.eg-kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; font-size: 13.5px; }
.eg-kv dt { color: var(--text-muted); }
.eg-kv dd { margin: 0; }
.eg-pre { white-space: pre-wrap; margin: 0; font-size: 13.5px; line-height: 1.5; }
.eg-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.eg-form .field.full { grid-column: 1 / -1; }
.eg-form .field { margin-bottom: 10px; }
.eg-dlg { width: min(680px, calc(100vw - 32px)); }
.eg-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.eg-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.eg-kpi span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.eg-kpi b { font-size: 20px; color: var(--forest); }
.eg-kpi em { font-style: normal; font-size: 12px; color: var(--text-muted); }
.eg-note { font-size: 12.5px; color: var(--text-muted); background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; }
.eg-heat-wrap { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; }
.eg-heat { border-collapse: separate; border-spacing: 3px; }
.eg-heat td { width: 64px; height: 34px; border-radius: 5px; font-size: 11px; font-weight: 700; text-align: center; color: var(--ink); }
.eg-heat td.ok { background: #E2EFE6; } .eg-heat td.warn { background: #F3E3CC; } .eg-heat td.bad { background: #F5D5D1; }
.eg-heat th { font-size: 11px; color: var(--text-muted); font-weight: 600; padding: 0 4px; }
.eg-heat-key { font-size: 12px; max-width: 260px; }
.eg-smap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; }
.eg-smap-row { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.eg-smap-k { font-size: 11.5px; color: var(--text-muted); font-weight: 600; align-self: center; }
.eg-smap-cell { background: var(--paper); border-radius: 6px; min-height: 38px; padding: 5px; display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.eg-smap-foot div { font-size: 11px; color: var(--text-muted); text-align: center; }
.eg-chip-s { font-size: 11.5px; padding: 2px 8px; border-radius: 100px; background: var(--sage-tint); color: var(--ink); }
.eg-chip-s.st-champion, .eg-chip-s.st-supporter { background: var(--success-light); color: var(--success); }
.eg-chip-s.st-sceptic { background: var(--danger-light); color: var(--danger); }
.eg-gantt { margin-bottom: 12px; overflow-x: auto; }
.eg-gantt-head { position: relative; height: 18px; margin-left: 280px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.eg-gantt-head span { position: absolute; font-size: 10.5px; color: var(--text-muted); transform: translateX(2px); white-space: nowrap; }
.eg-gantt-row { display: flex; align-items: center; min-height: 22px; }
.eg-gantt-lbl { width: 280px; flex-shrink: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; }
.eg-gantt-track { position: relative; flex: 1; height: 22px; min-width: 420px; border-left: 1px solid var(--border); }
.eg-bar { position: absolute; top: 6px; height: 10px; border-radius: 4px; background: var(--sage); overflow: hidden; }
.eg-bar i { display: block; height: 100%; background: var(--forest); }
.eg-bar.done { background: var(--forest); } .eg-bar.late { background: #E0796B; }
.eg-ms { position: absolute; top: 5px; width: 11px; height: 11px; background: var(--ochre); transform: translateX(-5px) rotate(45deg); }
.eg-ms.late { background: #C0392B; }
.eg-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ochre); opacity: .6; }
.eg-approve { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.eg-approve input[type=text] { width: 200px; font-size: 12.5px; padding: 5px 8px; }
.eg-approve select { font-size: 12.5px; padding: 4px 6px; width: auto; }
@media (max-width: 1100px) { .eg-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); } .eg-health { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .eg-layout { grid-template-columns: 1fr; } .eg-nav { position: static; } .eg-g2, .eg-kpis, .eg-form { grid-template-columns: 1fr; } }
.eg-heat { width: auto; margin: 0; }
.eg-heat th, .eg-heat td { border: 0 !important; padding: 0; background: none; }
.eg-heat th { width: 18px; text-align: center; }
.eg-heat tr:hover td { background: inherit; }
.eg-table td:has(.eg-pbar) { white-space: nowrap; }
.eg-gate-h + .eg-check { padding-top: 0; }
.card-tools .btn { white-space: nowrap; }
.eg-heat td.ok { background: #E2EFE6 !important; } .eg-heat td.warn { background: #F3E3CC !important; } .eg-heat td.bad { background: #F5D5D1 !important; }
