/* ==========================================================================
   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); }
