:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #222636;
  --border: #2e3345;
  --border2: #3a4060;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --text-dim: #5a6478;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  /* Dedicated link color. Browser-default link blue (#0000EE) is unreadable
     on this dark background; sky-300 has WCAG AA contrast against --bg
     (~7:1) and stays distinct from --text-muted. */
  --link: #7dd3fc;
  --link-hover: #bae6fd;
  --link-visited: #c4b5fd;
  --orange: #f97316;
  --purple: #8b5cf6;
  --gray: #6b7280;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --score1: #ef4444;
  --score2: #f97316;
  --score3: #eab308;
  --score4: #22c55e;
  --score5: #4ade80;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* Default anchor styling for dark theme. Components that look like buttons
   (.btn, .tab-btn, .role-card, .header-logo-link, etc.) declare their own
   color and override this. Plain prose / table / cell anchors pick this up. */
a, a:link { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:visited { color: var(--link-visited); }
/* Visited state inside dashboard tables / form copy is noisy — opt out. */
.users-table a:visited,
.profile-page a:visited,
.tag-item a:visited,
.empty-state a:visited { color: var(--link); }

/* ── Header ── */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.header-logo span {
  color: var(--blue);
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 12px;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-week {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 24px;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  /* Anchor reset: tabs are <a> elements so users can cmd-click to open in a
     new tab, right-click to copy link, etc. Strip anchor defaults so they
     look identical to when they were <button>s. */
  text-decoration: none;
  display: inline-block;
  user-select: none;
}

.tab-btn:hover { color: var(--text); text-decoration: none; }
.tab-btn:visited { color: var(--text-muted); }
.tab-btn.active:visited { color: var(--blue); }
.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* ── Main layout ── */
.main { padding: 24px; max-width: 1400px; margin: 0 auto; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Summary strip ── */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-value.good { color: var(--green); }
.stat-value.warn { color: var(--yellow); }
.stat-value.bad { color: var(--red); }

/* ── Chart cards ── */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) { .chart-row { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.chart-wrap { position: relative; height: 220px; }
.chart-wrap canvas { width: 100% !important; }

/* ── Domain table ── */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.table-header-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.table-header-row h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

thead th:first-child { padding-left: 20px; }
thead th:last-child { padding-right: 20px; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  cursor: pointer;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }

/* Domain grouping — rows for the same domain form a band. Continuation rows
   (2nd+ PE under the same domain) suppress the top border so the group
   reads as one block; the first row of a multi-PE group gets a slightly
   stronger top edge so the band is visible. */
tbody tr.group-cont { border-top: none; }
tbody tr.group-cont td { border-top: 1px dashed var(--border); }
tbody tr.group-first td { border-top: 2px solid var(--border); }

tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

tbody td:first-child { padding-left: 20px; }
tbody td:last-child { padding-right: 20px; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-inactive { background: rgba(107, 114, 128, 0.15); color: var(--gray); }
.badge-tbd { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}

.score-0 { background: rgba(107,114,128,0.2); color: var(--gray); }
.score-1 { background: rgba(239,68,68,0.2); color: var(--score1); }
.score-2 { background: rgba(249,115,22,0.2); color: var(--score2); }
.score-3 { background: rgba(234,179,8,0.2); color: var(--score3); }
.score-4 { background: rgba(34,197,94,0.2); color: var(--score4); }
.score-5 { background: rgba(74,222,128,0.25); color: var(--score5); }

.just-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.just-yes { color: var(--green); }
.just-no { color: var(--red); }
.just-na { color: var(--text-dim); }

/* ── Mini stacked bar ── */
.mini-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 1px;
  min-width: 80px;
  background: var(--surface2);
}

.mini-bar-seg { border-radius: 2px; }

/* ── Output dots ── */
.output-nums {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.output-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.tag-feature { background: rgba(59,130,246,0.15); color: var(--blue); }
.tag-improvement { background: rgba(6,182,212,0.15); color: var(--cyan); }
.tag-bugfix { background: rgba(249,115,22,0.15); color: var(--orange); }
.tag-refactoring { background: rgba(139,92,246,0.15); color: var(--purple); }
.tag-chore { background: rgba(107,114,128,0.15); color: var(--gray); }

/* ── Expandable rows ── */
.expand-row {
  display: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.expand-row.open { display: table-row; }

.expand-content {
  padding: 16px 20px;
}

.assessment-text {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
  /* Preserve the per-domain "Domain — text\n\n…" structure used by the
     PE Deep Dive merge so each domain's block reads as its own paragraph. */
  white-space: pre-wrap;
}

.summaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.summary-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.summary-section ul {
  padding-left: 14px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.commits-list {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.commits-list h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.commit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.commit-item:last-child { border-bottom: none; }

.commit-hash {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--blue);
  white-space: nowrap;
  min-width: 72px;
}

.commit-msg {
  flex: 1;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-summary {
  color: var(--text-dim);
  font-size: 11px;
  flex: 1;
  white-space: normal;
}

.commit-stats {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: #2563eb; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-sm { padding: 4px 10px; font-size: 11px; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── PE Deep Dive ── */
.pe-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.pe-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  min-width: 260px;
  cursor: pointer;
}

.pe-select:focus { outline: 1px solid var(--blue); }

/* Searchable combobox replacing the native <select> for engineer pick.
   The input is the visual anchor; the panel floats below. */
.pe-combo {
  position: relative;
  min-width: 260px;
}
.pe-combo-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 32px 8px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.pe-combo-input::placeholder { color: var(--text-dim, #71717a); }
.pe-combo-input:focus { outline: none; border-color: var(--blue, #60a5fa); }
.pe-combo.open .pe-combo-input { border-color: var(--blue, #60a5fa); }
.pe-combo-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--text-dim, #71717a);
  font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.pe-combo-clear:hover { background: rgba(255,255,255,0.06); color: var(--text, #fafafa); }
.pe-combo-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 320px; overflow-y: auto;
  background: var(--bg-elev, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 6px; padding: 4px 0; z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.pe-combo-option {
  padding: 8px 12px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.pe-combo-option-name { font-size: 13px; color: var(--text, #fafafa); }
.pe-combo-option-email { font-size: 11px; color: var(--text-dim, #a1a1aa); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pe-combo-option:hover, .pe-combo-option.active { background: rgba(96,165,250,0.12); }
.pe-combo-empty { padding: 12px; text-align: center; color: var(--text-dim, #a1a1aa); font-size: 13px; }

.pe-range-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.pe-range-controls[hidden] { display: none; }
.pe-range-label {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pe-range-select { min-width: 170px; }
.pe-range-sep { color: var(--text-dim); font-size: 12px; }
.pe-range-reset {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 12px;
  padding: 7px 12px;
  cursor: pointer;
}
.pe-range-reset:hover { color: var(--text); border-color: var(--text-dim); }

.pe-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.week-timeline { display: flex; flex-direction: column; gap: 2px; }

.week-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.week-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.1s;
}

.week-header:hover { background: var(--surface2); }

.week-dates {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 140px;
}

.week-content {
  display: none;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.week-content.open { display: block; }

/* ── Heatmap ── */
.heatmap-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.heatmap {
  display: flex;
  gap: 3px;
  align-items: flex-start;
}

.heatmap-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--surface2);
}

.heatmap-cell.level-1 { background: rgba(59,130,246,0.25); }
.heatmap-cell.level-2 { background: rgba(59,130,246,0.45); }
.heatmap-cell.level-3 { background: rgba(59,130,246,0.65); }
.heatmap-cell.level-4 { background: var(--blue); }
.heatmap-cell { cursor: help; transition: outline 0.1s; }
.heatmap-cell:hover { outline: 1px solid rgba(255,255,255,0.6); outline-offset: 1px; }
.heatmap-cell.empty { visibility: hidden; cursor: default; }
.heatmap-cell.empty:hover { outline: none; }

/* Custom floating tooltip for heatmap cells (native title is too slow on
   tiny targets, and many browsers suppress it entirely on <16px squares). */
.heatmap-tooltip {
  position: fixed;
  z-index: 2000;
  background: #1a1d29;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-line;
  min-width: 240px;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.1s, transform 0.1s;
}
.heatmap-tooltip.visible { opacity: 1; transform: translateY(0); }

/* ── Weekly Report & Overview controls ── */
.report-controls,
.overview-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.overview-week-label {
  font-size: 12px;
  color: var(--text-dim);
}

.week-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.alert-banner {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: none;
}

.alert-banner.visible { display: block; }

.alert-banner h4 {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.alert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-list li {
  font-size: 12px;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Trend line ── */
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--text-dim); }

/* ── Loading / empty states ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ── Analyze button states ── */
.btn-analyzing {
  background: rgba(59,130,246,0.2) !important;
  color: var(--blue) !important;
  border-color: rgba(59,130,246,0.4) !important;
  pointer-events: none;
}

.analyze-status {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4a5370; }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Reasoning collapse ── */
.reasoning-toggle {
  font-size: 11px;
  color: var(--blue);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.reasoning-text {
  display: none;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--surface2);
  border-radius: 6px;
  /* Per-domain reasons are joined with \n\n in the PE Deep Dive merge. */
  white-space: pre-wrap;
}

.reasoning-text.open { display: block; }

/* ── Sort controls ── */
.sort-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sort-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.sort-btn:hover { border-color: var(--border2); color: var(--text); }
.sort-btn.active { border-color: var(--blue); color: var(--blue); }

/* ── No data ── */
.no-data-cell {
  text-align: center;
  color: var(--text-dim);
  padding: 32px;
  font-size: 13px;
}

/* ── Settings layout ── */
.settings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  min-height: calc(100vh - 160px);
}

@media (max-width: 700px) { .settings-layout { grid-template-columns: 1fr; } }

.settings-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  align-self: start;
}

.settings-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-domain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  font-size: 13px;
}

.settings-domain-item:last-child { border-bottom: none; }
.settings-domain-item:hover { background: var(--surface2); }
.settings-domain-item.active { background: rgba(59,130,246,0.1); border-left: 2px solid var(--blue); }

.settings-domain-item-name { flex: 1; font-weight: 500; }
.settings-domain-item-status { font-size: 10px; }

/* BambooHR integration panel */
.settings-integration {
  margin-top: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  font-size: 12px;
}
.settings-integration-title {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  margin-bottom: 6px;
}
.settings-integration-body { margin-bottom: 8px; line-height: 1.4; }
.settings-integration-body code {
  background: var(--bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
}
.settings-integration-actions { display: flex; gap: 6px; }

.bamboohr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
}
.bamboohr-table th,
.bamboohr-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.bamboohr-table th {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface2);
}

.settings-editor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
}

.settings-editor h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section {
  margin-bottom: 28px;
}

.settings-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 10px;
}

.settings-field {
  margin-bottom: 14px;
}

.settings-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.settings-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s;
  font-family: inherit;
}

.settings-input:focus { outline: none; border-color: var(--blue); }
.settings-input:disabled { opacity: 0.5; cursor: not-allowed; }

.settings-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* Repo + engineer tag list */
.tag-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-list-empty {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
}

.tag-item-content { flex: 1; min-width: 0; }
.tag-item-name { font-weight: 500; color: var(--text); }
.tag-item-sub { color: var(--text-muted); font-size: 11px; margin-top: 1px; }

.tag-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.1s;
  flex-shrink: 0;
}
.tag-remove:hover { color: var(--red); }

/* Add-row inline form */
.add-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.add-row .settings-input { flex: 1; min-width: 120px; }

/* Settings action bar */
.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.settings-save-msg {
  font-size: 12px;
  color: var(--green);
  display: none;
}

.settings-save-msg.visible { display: inline; }

.settings-delete-btn {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 6px;
  padding: 6px 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.settings-delete-btn:hover { background: rgba(239,68,68,0.1); }

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  cursor: help;
  margin-left: 4px;
  position: relative;
  vertical-align: middle;
}
.info-icon:hover { background: rgba(99,102,241,0.25); color: var(--text); }
.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1d29;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 400;
  white-space: pre-line;
  min-width: 260px;
  max-width: 320px;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.info-icon:hover::after { opacity: 1; }

.email-chip-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,0.12);
  color: var(--text);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
}
.email-chip-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}
.email-chip-remove:hover { color: var(--red, #ef4444); }
.email-chip.email-chip-readonly { background: rgba(255,255,255,0.06); color: var(--text-dim, #a1a1aa); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1500;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 95vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(0,0,0,0.4);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  z-index: 1600;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-title { font-size: 14px; font-weight: 600; color: var(--text); }
.drawer-subtitle { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.drawer-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.drawer-close:hover { color: var(--text); }
.drawer-body { overflow-y: auto; padding: 8px 0; flex: 1; }

.drawer-commit {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.drawer-commit:hover { background: rgba(255,255,255,0.03); }
.drawer-commit-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.drawer-commit-hash {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  color: var(--blue, #6366f1);
  background: rgba(99,102,241,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.drawer-commit-repo {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
}
.drawer-commit-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}
.drawer-commit-msg {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.drawer-commit-author {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
.commits-link {
  color: var(--blue, #6366f1);
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.commits-link:hover { color: var(--text); }

/* Analysis progress modal */
.progress-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.72);
  backdrop-filter: blur(3px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 150ms ease-out;
}
.progress-backdrop.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.progress-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  background: var(--card, #12151d);
  border: 1px solid var(--border, #262a35);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.progress-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.progress-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  animation: progressSpin 0.9s linear infinite;
}
.progress-spinner.done { border-color: rgba(34, 197, 94, 0.25); border-top-color: #22c55e; animation-play-state: paused; }
.progress-spinner.error { border-color: rgba(239, 68, 68, 0.3); border-top-color: #ef4444; animation-play-state: paused; }
@keyframes progressSpin { to { transform: rotate(360deg); } }
.progress-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #e8eaed);
}
.progress-subtitle {
  font-size: 12px;
  color: var(--text-dim, #8b93a1);
  margin-top: 2px;
}
.progress-elapsed {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-dim, #8b93a1);
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.progress-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 3px;
  transition: width 300ms ease-out;
}
.progress-bar.indeterminate {
  width: 40% !important;
  animation: progressSlide 1.6s ease-in-out infinite;
}
@keyframes progressSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
.progress-bar.done { background: #22c55e; width: 100% !important; animation: none; }
.progress-bar.error { background: #ef4444; animation: none; }
.progress-phase {
  font-size: 13px;
  color: var(--text, #e8eaed);
  font-weight: 500;
}
.progress-log {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border, #262a35);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--text-dim, #8b93a1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.progress-log li {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.progress-log li .t {
  color: rgba(255,255,255,0.25);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.progress-log li.latest { color: var(--text, #e8eaed); }
.progress-log li.err { color: #ef4444; }
.progress-log li.ok { color: #22c55e; }
.progress-log li.warn { color: #f59e0b; }
.progress-error-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fecaca;
  font-size: 13px;
  display: none;
}
.progress-error-banner.show { display: block; }
.progress-error-banner strong { color: #fca5a5; }
.progress-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-analyzing {
  position: relative;
  color: transparent !important;
}
.btn-analyzing::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #e8eaed);
  font-size: 11px;
  content: '⋯';
}

/* ── Pipeline panel ─────────────────────────────────────────────────────── */
.pipeline-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pipeline-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e8eaed);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.pipeline-health {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.pipeline-health.health-ok { background: rgba(34,197,94,0.15); color: #86efac; }
.pipeline-health.health-warn { background: rgba(251,146,60,0.15); color: #fdba74; }
.pipeline-health.health-dim { background: rgba(148,163,184,0.12); color: #cbd5e1; }

.pipeline-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.pipeline-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted, #a1a1aa);
}
.pipeline-bar-label {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}
.pipeline-bar-count {
  color: var(--text, #e8eaed);
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}
.pipeline-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.pipeline-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 200ms ease;
}
.pipeline-bar-fill.stage-production { background: #22c55e; }
.pipeline-bar-fill.stage-staging { background: #3b82f6; }
.pipeline-bar-fill.stage-testing { background: #a855f7; }
.pipeline-bar-fill.stage-review { background: #f59e0b; }

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.stage-card {
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
}
.stage-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}
.stage-card-header strong {
  color: var(--text, #e8eaed);
  font-size: 13px;
}
.stage-card-header .stage-sub {
  color: var(--text-dim, #71717a);
  font-size: 11px;
  flex: 1;
}
.stage-card-header .stage-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, #e8eaed);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  font-size: 11px;
}
.stage-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.stage-dot.stage-production { background: #22c55e; }
.stage-dot.stage-staging { background: #3b82f6; }
.stage-dot.stage-testing { background: #a855f7; }
.stage-dot.stage-review { background: #f59e0b; }

.stage-summary {
  font-size: 12px;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.5;
  margin-bottom: 8px;
}
.stage-list h5 {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.stage-list ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted, #a1a1aa);
}
.stage-list li { margin-bottom: 3px; line-height: 1.4; }
.stage-empty {
  font-size: 12px;
  color: var(--text-dim, #71717a);
  font-style: italic;
}
.stage-commits {
  margin-top: 6px;
  font-size: 11px;
}
.stage-commits summary {
  cursor: pointer;
  color: var(--text-muted, #a1a1aa);
  font-size: 11px;
  padding: 4px 0;
}
.stage-commits ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stage-commits li {
  font-size: 11px;
  color: var(--text-muted, #a1a1aa);
  padding: 4px 6px;
  background: rgba(255,255,255,0.02);
  border-radius: 4px;
}
.stage-commits li code {
  color: #67e8f9;
  font-size: 10px;
  background: rgba(255,255,255,0.04);
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
}
.stage-commit-link {
  text-decoration: none;
}
.stage-commit-link code {
  transition: background 120ms, color 120ms;
  cursor: pointer;
}
.stage-commit-link:hover code {
  background: rgba(103, 232, 249, 0.18);
  color: #a5f3fc;
  text-decoration: underline;
}
.stage-cat {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin-right: 4px;
  text-transform: uppercase;
}
.stage-repo {
  color: var(--text-dim, #71717a);
  font-size: 10px;
  margin-left: 4px;
}

/* ── Engagement config in Settings editor ─────────────────────────────── */
.engagement-config {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.engagement-config-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.engagement-config-label {
  flex: 0 0 80px;
  color: var(--text-dim, #71717a);
  font-size: 11px;
  padding-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.workday-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.workday-btn {
  min-width: 40px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--text-dim, #a1a1aa);
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 120ms;
}
.workday-btn:hover {
  border-color: rgba(255,255,255,0.2);
}
.workday-btn.on {
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.5);
  color: #93c5fd;
}
.timeoff-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.timeoff-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.timeoff-row .timeoff-date {
  max-width: 140px;
  font-size: 11px;
  padding: 4px 6px;
}
.timeoff-row .timeoff-note {
  max-width: 180px;
  font-size: 11px;
  padding: 4px 6px;
}

/* ── Engagement badge / sparkline / gap callout ──────────────────────── */
.engagement-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  vertical-align: middle;
}
.engagement-badge .eng-score {
  font-weight: 700;
}
.engagement-badge.eng-5 { background: rgba(34,197,94,0.18); color: #86efac; }
.engagement-badge.eng-4 { background: rgba(34,197,94,0.12); color: #4ade80; }
.engagement-badge.eng-3 { background: rgba(234,179,8,0.16); color: #fde047; }
.engagement-badge.eng-2 { background: rgba(249,115,22,0.18); color: #fdba74; }
.engagement-badge.eng-1 { background: rgba(239,68,68,0.18); color: #fca5a5; }
.engagement-badge.eng-0 { background: rgba(107,114,128,0.18); color: #9ca3af; }
.engagement-flag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 8px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.engagement-flag.flag-concentrated { background: rgba(249,115,22,0.16); color: #fb923c; }
.engagement-flag.flag-sparse { background: rgba(234,179,8,0.16); color: #facc15; }
.engagement-flag.flag-absent { background: rgba(239,68,68,0.18); color: #f87171; }
.engagement-flag.flag-none { display: none; }

.eng-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  margin: 10px 0;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  flex-wrap: wrap;
}
.eng-panel-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eng-panel-title {
  font-size: 10px;
  color: var(--text-dim, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.eng-panel-value {
  font-size: 13px;
  color: var(--text, #e5e7eb);
  font-weight: 600;
}
.eng-sparkline {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 56px;
  flex: 1;
  min-width: 140px;
}
.eng-spark-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  position: relative;
  cursor: default;
}
.eng-spark-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim, #71717a);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.eng-spark-day.is-zero .eng-spark-count {
  opacity: 0.35;
}
.eng-spark-bar {
  width: 100%;
  max-width: 22px;
  min-height: 2px;
  background: rgba(59,130,246,0.75);
  border-radius: 2px 2px 0 0;
  transition: background 120ms ease;
}
.eng-spark-day:hover .eng-spark-bar { background: rgba(59,130,246,1); }
.eng-spark-bar.chore-only {
  background: rgba(148,163,184,0.55);
}
.eng-spark-day:hover .eng-spark-bar.chore-only { background: rgba(148,163,184,0.85); }
.eng-spark-bar.zero {
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.08);
  min-height: 4px;
}
.eng-spark-bar.zero.expected {
  /* Workday with no commits — the "should have shipped something" state. */
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.08);
}
.eng-spark-bar.zero.upcoming {
  /* Future workday — neutral, not penalized. */
  border-color: rgba(148,163,184,0.3);
  background: rgba(148,163,184,0.05);
  border-style: dotted;
}
.eng-spark-bar.zero.pto {
  /* Time off — distinct amber so it doesn't read as "skipped a workday". */
  border-color: rgba(245,158,11,0.45);
  background: rgba(245,158,11,0.08);
}
.eng-spark-bar.zero.nonworkday {
  /* Weekend / not-in-anyone's-workday-config — quiet, no signal. */
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.eng-spark-bar.zero.prestart {
  /* Day before the domain's start_date — the domain didn't exist yet, so the
     engineer can't have "missed" it. Render as a struck-through placeholder. */
  border-color: rgba(148,163,184,0.18);
  background: repeating-linear-gradient(
    135deg,
    rgba(148,163,184,0.05) 0,
    rgba(148,163,184,0.05) 3px,
    transparent 3px,
    transparent 6px
  );
}
/* Tone the day-label too, so weekends and PTO read at a glance. */
.eng-spark-day.kind-pto .eng-spark-label { color: rgba(245,158,11,0.85); }
.eng-spark-day.kind-upcoming .eng-spark-label { color: rgba(148,163,184,0.55); }
.eng-spark-day.kind-nonworkday .eng-spark-label { color: rgba(148,163,184,0.45); }
.eng-spark-day.kind-prestart .eng-spark-label {
  color: rgba(148,163,184,0.35);
  text-decoration: line-through;
}

/* Slack presence marker — a small dot inset on days the engineer was active on
   Slack. Useful for disambiguating "absent" (no commits, no Slack) from
   "lurking" (on Slack but no commits). Only shown on zero-commit expected
   days — on a day with commits the bar height already tells the story. */
.eng-spark-day.slack-active.is-zero.kind-expected .eng-spark-bar::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a154b; /* Slack aubergine */
  border: 1px solid rgba(255,255,255,0.35);
}
.eng-spark-day .eng-spark-bar { position: relative; }
.eng-spark-label {
  font-size: 9px;
  color: var(--text-dim, #71717a);
}
.eng-spark-day.today .eng-spark-label {
  color: #60a5fa;
  font-weight: 600;
}

/* Custom hover tooltip for each day cell — richer than the native title,
   uses the same visual pattern as .info-icon[data-tooltip]. */
.eng-spark-day[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1d29;
  color: var(--text, #e5e7eb);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 400;
  white-space: pre-line;
  min-width: 150px;
  max-width: 220px;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.eng-spark-day[data-tooltip]:hover::after { opacity: 1; }
.eng-panel-reasoning {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--text-muted, #a1a1aa);
  margin-top: 4px;
  line-height: 1.4;
}

/* Overall/meaningfulness/engagement mini-scoreboard in table rows */
.score-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.score-stack .score-sub {
  font-size: 9px;
  color: var(--text-dim, #71717a);
  line-height: 1;
}

/* ══════════════════════ Splash / role picker ══════════════════════ */
.header-logo-link {
  color: inherit;
  text-decoration: none;
}
.header-logo-link:hover { opacity: 0.9; }

/* Role views are hidden by default; JS adds .visible when a role is picked. */
.role-view { display: none; }
.role-view.visible { display: block; }

.splash-screen {
  display: none;
  padding: 48px 24px 64px;
}
.splash-screen.visible { display: block; }

.splash-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.splash-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 8px;
}

.splash-lead {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
  max-width: 640px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.role-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.role-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--border2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.role-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.role-card-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.role-card-icon {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.role-card-body {
  padding: 16px 18px 20px;
}

.role-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.role-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.role-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.role-card-bullets li {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.45;
}
.role-card-bullets li::before {
  content: '•';
  color: var(--blue);
  position: absolute;
  left: 2px;
  top: 3px;
}

.role-card-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.3px;
}

/* HD-specific: explanatory banner at top of the HD dashboard. */
.phase-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(249, 115, 22, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 20px;
}
.phase-banner code {
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--cyan);
}

/* HD: metric-design panels (used in Agent Deep Dive + Settings before data sync). */
.metric-design {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}
.metric-design-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.metric-group {
  border-top: 1px solid var(--border);
  padding: 14px 0 6px;
}
.metric-group:first-of-type { border-top: none; padding-top: 0; }
.metric-group h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.metric-group ul {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}
.metric-group ul li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 2px 0 2px 14px;
  position: relative;
}
.metric-group ul li::before {
  content: '›';
  color: var(--text-dim);
  position: absolute;
  left: 2px;
  top: 1px;
  font-weight: 700;
}
.metric-group ul li strong { color: var(--text); }
.metric-group ul li code,
.phase-banner code,
.metric-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.metric-note {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
}

.checks-list {
  padding-left: 20px;
  margin: 0;
}
.checks-list li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 2px 0;
}
.checks-list li code {
  font-size: 11px;
  background: var(--surface2);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--cyan);
}

.justified-yes,
.justified-no {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.2px;
}
.justified-yes {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.justified-no {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* ───────── Help button + Help page ───────── */
.btn-help {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-help:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.help-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 0 48px;
}
.help-page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}
.help-page-lead {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}
.help-para {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 10px;
}
.help-para strong { color: var(--text); }
.help-para em { color: var(--text-dim); font-style: italic; }

.metric-group h4 .just-badge,
.metric-group h4 .pipeline-health {
  text-transform: none;
  letter-spacing: normal;
  vertical-align: middle;
}


/* ───────── Auth: user menu + Profile + Users ───────── */
.user-menu { position: relative; }
.user-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 180px; background: var(--bg-elev, #18181b);
  border: 1px solid var(--border, #27272a); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); padding: 4px 0; z-index: 200;
}
.user-menu-dropdown a {
  display: block; padding: 8px 14px; color: var(--text, #fafafa);
  font-size: 13px; text-decoration: none;
}
.user-menu-dropdown a:hover { background: rgba(255,255,255,0.05); }

.profile-page, .users-page { max-width: 880px; margin: 0 auto; padding: 24px 0; }
.profile-page-title, .users-page-title { font-size: 20px; font-weight: 600; margin: 0 0 4px 0; color: var(--text, #fafafa); }
.users-page-sub { color: var(--text-dim, #a1a1aa); font-size: 13px; margin: 0 0 20px 0; }
.users-page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

.profile-section { background: var(--bg-elev, #18181b); border: 1px solid var(--border, #27272a); border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.profile-section-title { font-size: 15px; font-weight: 600; margin: 0 0 12px 0; color: var(--text, #fafafa); }
.profile-row { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.04); }
.profile-row:first-child { border-top: 0; }
.profile-row-emails { grid-template-columns: 160px 1fr; align-items: start; }
.profile-label { font-size: 12px; color: var(--text-dim, #a1a1aa); padding-top: 4px; }
.profile-value { color: var(--text, #fafafa); font-size: 13px; }
.profile-emails { width: 100%; padding: 8px 10px; background: var(--bg, #0a0a0a); color: var(--text, #fafafa); border: 1px solid var(--border, #27272a); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; box-sizing: border-box; resize: vertical; min-height: 80px; }
.profile-name-input { width: 100%; max-width: 360px; padding: 8px 10px; background: var(--bg, #0a0a0a); color: var(--text, #fafafa); border: 1px solid var(--border, #27272a); border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.profile-name-input:focus { outline: none; border-color: #60a5fa; }
.profile-msg { font-size: 12px; margin-left: 8px; }

.role-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; margin-right: 6px; border: 1px solid currentColor; }
.role-pill.role-owner { color: #fbbf24; background: rgba(251,191,36,0.08); }
.role-pill.role-contributor { color: #93c5fd; background: rgba(59,130,246,0.08); }
.role-pill.role-admin { color: #c4b5fd; background: rgba(139,92,246,0.08); }
.role-pill.role-super_admin { color: #86efac; background: rgba(34,197,94,0.08); }

.users-table { width: 100%; border-collapse: collapse; background: var(--bg-elev, #18181b); border: 1px solid var(--border, #27272a); border-radius: 8px; overflow: hidden; }
.users-table th, .users-table td { padding: 10px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.users-table th { background: rgba(255,255,255,0.02); color: var(--text-dim, #a1a1aa); font-weight: 500; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table select { background: var(--bg, #0a0a0a); color: var(--text, #fafafa); border: 1px solid var(--border, #27272a); border-radius: 4px; padding: 4px 6px; font-size: 12px; }
.text-dim { color: var(--text-dim, #a1a1aa); }

/* User picker for Settings → Domains "add engineer" */
.user-picker { position: relative; }
.user-picker-input {
  width: 100%; box-sizing: border-box;
  padding: 8px 12px;
  background: var(--surface, #18181b); color: var(--text, #fafafa);
  border: 1px solid var(--border, #27272a); border-radius: 6px;
  font-size: 13px; font-family: inherit;
}
.user-picker-input:focus { outline: none; border-color: var(--blue, #60a5fa); }
.user-picker.open .user-picker-input { border-color: var(--blue, #60a5fa); }
.user-picker-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 360px; overflow-y: auto;
  background: var(--bg-elev, #18181b); border: 1px solid var(--border, #27272a);
  border-radius: 6px; padding: 4px 0; z-index: 60;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.user-picker-option { padding: 8px 12px; cursor: pointer; border-top: 1px solid rgba(255,255,255,0.03); }
.user-picker-option:first-child { border-top: 0; }
.user-picker-option:hover, .user-picker-option.active { background: rgba(96,165,250,0.12); }
.user-picker-option.assigned { opacity: 0.55; }
.user-picker-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.user-picker-name { font-size: 13px; color: var(--text, #fafafa); }
.user-picker-email { font-size: 11px; color: var(--text-dim, #a1a1aa); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 2px; }
.user-picker-meta { color: var(--text-dim, #a1a1aa); font-size: 11px; }
.user-picker-tags { display: flex; gap: 4px; flex-shrink: 0; }
.user-picker-tag { font-size: 10px; padding: 2px 6px; border-radius: 999px; border: 1px solid currentColor; }
.user-picker-tag.tag-owner { color: #fbbf24; background: rgba(251,191,36,0.06); }
.user-picker-tag.tag-contributor { color: #93c5fd; background: rgba(59,130,246,0.06); }
.user-picker-tag.tag-admin { color: #c4b5fd; background: rgba(139,92,246,0.06); }
.user-picker-tag.tag-super_admin { color: #86efac; background: rgba(34,197,94,0.06); }
.user-picker-empty { padding: 14px; text-align: center; color: var(--text-dim, #a1a1aa); font-size: 13px; }

/* Settings → repository chip becomes a link to Bitbucket. */
.repo-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text, #fafafa); text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.repo-link:hover { color: var(--blue, #60a5fa); border-bottom-color: var(--blue, #60a5fa); }
.repo-link-arrow { color: var(--text-dim, #a1a1aa); font-size: 11px; }
.repo-link:hover .repo-link-arrow { color: inherit; }

/* Profile page: editable email row + role grid (admin viewing other user). */
.profile-roles-grid { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-roles-grid label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim, #a1a1aa); }
.profile-roles-grid select { background: var(--bg, #0a0a0a); color: var(--text, #fafafa); border: 1px solid var(--border, #27272a); border-radius: 4px; padding: 4px 6px; font-size: 12px; }
.profile-row[data-row="email"] .profile-value { display: flex; flex-direction: column; gap: 4px; }

.profile-domains { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-domains li { padding: 4px 0; color: var(--text, #fafafa); font-size: 13px; border-top: 1px solid rgba(255,255,255,0.04); }
.profile-domains li:first-child { border-top: 0; }

/* Read-only login-email input on self profile — visually distinct from the
   active editable inputs so it's clearly informational. */
.profile-name-input[readonly] {
  background: rgba(255,255,255,0.02);
  color: var(--text-muted, #8892a4);
  cursor: default;
}
.profile-name-input[readonly]:focus { border-color: var(--border, #27272a); }

/* Authored / Shipped dual cell on the per-engineer dashboard row. */
.output-dual { display: flex; flex-direction: column; gap: 4px; }
.output-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.output-line-label {
  font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim, #a1a1aa); min-width: 56px;
  border-right: 1px solid rgba(255,255,255,0.06); padding-right: 6px;
}

/* ── PE Plans tab + plan-due banner ──────────────────────────────────────── */
/* Scope display:flex to NOT-hidden so the [hidden] attribute actually hides
   the banner. Without :not([hidden]), our class rule overrode the browser's
   default `[hidden] { display: none }` and the banner stayed visible as an
   empty amber strip whenever the user had no missing plans to surface. */
.plan-banner:not([hidden]) {
  display: flex; align-items: center; gap: 14px;
}
.plan-banner {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 14px 0;
  font-size: 13px;
}
.plan-banner a.btn, .plan-banner button.btn { margin-left: auto; }

.plans-section { margin-bottom: 28px; }
.plans-section h2 { font-size: 16px; margin: 0 0 6px 0; }
.plans-section h3 { font-size: 13px; margin: 0; letter-spacing: 0.02em; }
.plans-section-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.plans-section-meta { display: flex; gap: 6px; }

.plan-pill {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.plan-pill.submitted { background: rgba(34,197,94,0.16); color: #86efac; border: 1px solid rgba(34,197,94,0.4); }
.plan-pill.missing   { background: rgba(239,68,68,0.16); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }

.plans-bucket { margin: 14px 0; }
.plans-bucket-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }

.plan-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.plan-card-highlight { border-color: rgba(96, 165, 250, 0.6); background: rgba(59, 130, 246, 0.08); }
.plan-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.plan-card-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.plan-textarea {
  width: 100%; min-height: 84px;
  background: var(--bg, #0a0a0a); color: var(--text, #fafafa);
  border: 1px solid var(--border, #27272a); border-radius: 6px;
  padding: 8px 10px; font: inherit; resize: vertical;
}
.plan-readonly {
  white-space: pre-wrap;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border, #27272a); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; color: var(--text, #fafafa);
}
.plan-lock-note {
  font-size: 11px;
  color: var(--text-dim, #a1a1aa);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 8px;
}

.plan-team-user { border-top: 1px solid rgba(255,255,255,0.05); padding: 10px 0; }
.plan-team-user-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.plan-team-user-dot { font-size: 11px; }
.plan-team-row {
  display: grid; grid-template-columns: 220px 140px 1fr; gap: 12px;
  padding: 4px 0; align-items: start; font-size: 12px;
}
.plan-team-domain { color: var(--text, #fafafa); font-weight: 500; }
.plan-team-text { color: var(--text-dim, #a1a1aa); white-space: pre-wrap; word-break: break-word; }
.plan-team-row-clickable { cursor: pointer; border-radius: 4px; }
.plan-team-row-clickable:hover { background: rgba(255,255,255,0.03); }
.plan-team-expand-hint { color: var(--text-muted, #6b7280); font-size: 11px; margin-left: 4px; }
.plan-team-meta {
  font-size: 11px; color: var(--text-dim, #a1a1aa);
  margin-top: 6px;
}
.plan-team-full .plan-readonly { margin-top: 4px; }
.week-select {
  background: var(--bg, #0a0a0a); color: var(--text, #fafafa);
  border: 1px solid var(--border, #27272a); border-radius: 4px;
  padding: 3px 6px; font-size: 12px;
}
/* Typeable filter input (datalist-backed) — matches week-select chrome so
   the trio of selectors reads as one row of controls. */
.combo-input {
  background: var(--bg, #0a0a0a); color: var(--text, #fafafa);
  border: 1px solid var(--border, #27272a); border-radius: 4px;
  padding: 3px 8px; font-size: 12px;
  min-width: 160px;
  font-family: inherit;
}
.combo-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(59, 130, 246, 0.04);
}
.combo-input::placeholder { color: var(--text-muted, #6b7280); }

/* ── Feedback modal ──────────────────────────────────────────────────────── */
.feedback-backdrop:not([hidden]) {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
.feedback-modal {
  background: var(--bg-elevated, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 10px;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}
.feedback-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border, #27272a);
}
.feedback-title { font-size: 15px; font-weight: 600; color: var(--text, #fafafa); }
.feedback-close {
  background: transparent; border: 0; color: var(--text-dim, #a1a1aa);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 6px;
}
.feedback-close:hover { color: var(--text, #fafafa); }
.feedback-body { padding: 14px 18px; overflow-y: auto; }
.feedback-label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim, #a1a1aa); margin-bottom: 4px;
}
.feedback-textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg, #0a0a0a); color: var(--text, #fafafa);
  border: 1px solid var(--border, #27272a); border-radius: 6px;
  padding: 10px 12px; font: inherit; resize: vertical;
}
.feedback-textarea:focus { outline: none; border-color: rgba(96,165,250,0.6); }
.feedback-files {
  font-size: 12px; color: var(--text-dim, #a1a1aa);
}
.feedback-files-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.feedback-file-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; background: rgba(255,255,255,0.03);
  border-radius: 4px; font-size: 12px;
}
.feedback-file-name { flex: 1; color: var(--text, #fafafa); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback-file-size { color: var(--text-dim, #a1a1aa); font-variant-numeric: tabular-nums; }
.feedback-file-remove {
  background: transparent; border: 0; color: var(--text-dim, #a1a1aa);
  cursor: pointer; font-size: 12px; padding: 2px 6px;
}
.feedback-file-remove:hover { color: #fca5a5; }
.feedback-msg { margin-top: 10px; font-size: 12px; min-height: 16px; }
.feedback-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--border, #27272a);
}

/* Plan + delivery panel inside Deep Dive week rows. */
.plan-delivery-panel {
  margin-top: 10px;
  background: rgba(96,165,250,0.06);
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 8px;
  padding: 10px 12px;
}
.plan-delivery-header { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 6px; }
.plan-delivery-header strong { font-size: 13px; }
.plan-delivery-bar {
  height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px;
  overflow: hidden; flex: 1; min-width: 100px;
}
.plan-delivery-bar-fill { height: 100%; background: linear-gradient(90deg, #f59e0b, #22c55e); }
.plan-delivery-text { white-space: pre-wrap; font-size: 12px; color: var(--text, #fafafa); }
.plan-delivery-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim, #a1a1aa); margin-top: 6px;
}

.plan-reminder-controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 6px 0;
}
.plan-reminder-output {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border, #27272a);
  border-radius: 6px;
  padding: 10px 12px;
  white-space: pre-wrap;
  font-size: 11px;
  color: var(--text-dim, #a1a1aa);
  max-height: 320px; overflow: auto;
  margin: 0 0 12px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
