* { box-sizing: border-box; margin: 0; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:root {
  --bg: #111111;
  --surface: #1e1e1e;
  --surface2: #2a2a2a;
  --border: #3d3d3d;
  --text: #ececec;
  --text-muted: #909090;
  --accent: #e8833a;
  --accent-dim: rgba(232,131,58,0.12);
  --green: #4caf7d;
  --green-dim: rgba(76,175,125,0.12);
  --red: #e05252;
  --red-dim: rgba(224,82,82,0.12);
  --blue: #5b9cf6;
  --blue-dim: rgba(91,156,246,0.12);
  --orange: #e8833a;
  --orange-dim: rgba(232,131,58,0.12);
  --purple: #9b7de8;
  --purple-dim: rgba(155,125,232,0.12);
  --sidebar-w: 228px;
}

/* Body globals — apply on every page that loads app.css. */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* SPA-shell layout. Opted into via bodyClass="spa-shell" on index.php.
   Was previously unconditional on body, which broke every other
   togra_page_open page that inherited app.css and didn't have a
   sidebar+main flex layout (2026-05-10). */
body.spa-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}
.sidebar-logo h1 {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.sidebar-logo p { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.sidebar-logo img { max-width: 100%; max-height: 64px; object-fit: contain; display: block; }
.logo-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.15s;
}
.sidebar-logo:hover .logo-hint { opacity: 1; }
.logo-remove {
  position: absolute;
  top: 8px; right: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 11px;
  padding: 1px 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1.6;
}
.sidebar-logo:hover .logo-remove { opacity: 1; }
.sidebar-nav { flex: 1; padding: 10px 8px 20px; }
.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 12px 8px 4px;
  margin-top: 2px;
  opacity: 0.7;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  margin-bottom: 1px;
  border-left: 2px solid transparent;
  line-height: 1.35;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: var(--accent-dim); color: var(--accent);
  border-left-color: var(--accent); font-weight: 600;
}
.nav-item .icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.nav-item.active .nav-badge { background: rgba(201,168,76,0.2); color: var(--accent); }

/* ── MAIN ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  flex-shrink: 0;
}
.topbar h2 { font-size: 16px; font-weight: 700; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── BUTTONS ── */
.btn {
  padding: 7px 14px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent, #0f0e08); }
.btn-primary:hover { background: #d4b360; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(224,82,82,0.25); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
.stat-value { font-size: 30px; font-weight: 800; margin-top: 4px; line-height: 1; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── SLATE ANALYTICS ── */
.slate-analytics { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.analytics-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; }
.analytics-card-title { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:0.8px; color:var(--text-muted); margin-bottom:10px; }
.analytics-fin-row { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px; }
.analytics-fin-label { font-size:12px; color:var(--text-muted); }
.analytics-fin-value { font-size:13px; font-weight:700; }
.analytics-fin-bar { height:5px; border-radius:3px; background:var(--surface2); margin-bottom:12px; }
.analytics-fin-fill { height:100%; border-radius:3px; background:var(--green); transition:width 0.3s; }
.stage-bar { display:flex; height:10px; border-radius:5px; overflow:hidden; gap:2px; margin-bottom:8px; }
.stage-bar-seg { height:100%; transition:width 0.3s; border-radius:2px; }
.stage-legend { display:flex; flex-wrap:wrap; gap:6px 12px; }
.stage-legend-item { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--text-muted); }
.stage-legend-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
@media(max-width:640px) { .slate-analytics { grid-template-columns:1fr; } }

/* ── PIPELINE KANBAN ── */
.pipeline-scroll { overflow-x: auto; padding-bottom: 12px; }
.pipeline { display: flex; gap: 12px; min-width: max-content; }
.pipeline-col { width: 210px; flex-shrink: 0; }
.pipeline-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 7px 7px 0 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-bottom: none;
}
.pdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pcnt {
  margin-left: auto;
  background: rgba(0,0,0,0.25);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 11px;
}
.pipeline-cards {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 7px 7px;
  padding: 8px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.p-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.p-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.p-card-title { font-weight: 700; font-size: 13px; margin-bottom: 5px; }
.p-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}
.b-feature         { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(155,125,232,0.25); }
.b-short           { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(232,131,58,0.25); }
.b-animated-film   { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(224,82,82,0.25);  }
.b-animated-series { background: rgba(255,200,0,0.12); color: #c9a800;   border: 1px solid rgba(255,200,0,0.25); }
.b-series          { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(91,156,246,0.25); }
.b-documentary     { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(76,175,125,0.25); }
/* Documentary split (2026-05) — feature + series. Both inherit the green tone. */
.b-documentary-feature { background: var(--green-dim); color: var(--green); border: 1px solid rgba(76,175,125,0.25); }
.b-documentary-series  { background: rgba(76,175,125,0.06); color: var(--green); border: 1px solid rgba(76,175,125,0.30); }
/* Unscripted subtypes (§487A-eligible / S481-ineligible per Film Regs 2019 §6) */
.b-factual         { background: rgba(76,175,125,0.10); color: var(--green);  border: 1px solid rgba(76,175,125,0.30); }
.b-reality         { background: rgba(232,131,58,0.10); color: var(--accent); border: 1px solid rgba(232,131,58,0.30); }
.b-lifestyle       { background: rgba(232,131,58,0.10); color: var(--accent); border: 1px solid rgba(232,131,58,0.30); }
.b-entertainment   { background: rgba(255,200,0,0.10);  color: #c9a800;       border: 1px solid rgba(255,200,0,0.30); }
.b-current-affairs { background: rgba(155,125,232,0.10);color: var(--purple); border: 1px solid rgba(155,125,232,0.30); }
.b-sports          { background: rgba(91,156,246,0.10); color: var(--blue);   border: 1px solid rgba(91,156,246,0.30); }
.b-live-event      { background: rgba(224,82,82,0.10);  color: var(--red);    border: 1px solid rgba(224,82,82,0.30); }
/* Generic fallback for anything outside the canonical TYPES list */
.b-unscripted      { background: rgba(140,140,160,0.10); color: var(--text-muted); border: 1px solid rgba(140,140,160,0.30); }

/* ── Inbound Pitches ── */
.inbound-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; margin-bottom: 10px; }
.inbound-card:hover { border-color: var(--text-muted); box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.inbound-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.inbound-card-from  { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.inbound-card-meta  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inbound-status-received  { background: var(--blue-dim);   color: var(--blue);       border: 1px solid rgba(91,156,246,0.3);  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.inbound-status-reviewing { background: var(--orange-dim); color: var(--orange);     border: 1px solid rgba(232,131,58,0.3);  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.inbound-status-passed    { background: var(--surface2);   color: var(--text-muted); border: 1px solid var(--border);         font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.inbound-status-promoted  { background: var(--green-dim);  color: var(--green);      border: 1px solid rgba(76,175,125,0.3);  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.inbound-type-coprod  { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(155,125,232,0.25); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.inbound-type-service { background: rgba(139,92,246,0.10); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.inbound-type-other   { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.inbound-filter-tabs  { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.inbound-tab { font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 20px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); transition: all 0.15s; }
.inbound-tab:hover, .inbound-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── My Tasks ── */
.my-tasks-project-group { margin-bottom: 28px; }
.my-tasks-project-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.my-tasks-project-header:hover { border-color: var(--text-muted); }
.my-tasks-project-name { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.my-tasks-count { font-size: 12px; color: var(--text-muted); background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; }
.my-tasks-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.my-tasks-tab { font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 20px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); transition: all 0.15s; }
.my-tasks-tab:hover, .my-tasks-tab.active { background: var(--green); color: #fff; border-color: var(--green); }
.my-tasks-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.my-tasks-empty .empty-icon { font-size: 48px; margin-bottom: 16px; }

/* ── Slate Planner ── */
.planner-tabs { display: flex; gap: 0; margin-bottom: 0; border-bottom: 1px solid var(--border); }
.planner-tab { font-size: 13px; font-weight: 600; padding: 10px 20px; cursor: pointer; border: none; background: none; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s; }
.planner-tab:hover { color: var(--text); }
.planner-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.planner-content { padding-top: 20px; }
.slate-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; }
.slate-card:hover { border-color: var(--text-muted); }
.slate-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.slate-card-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; cursor: pointer; }
.slate-card-title:hover { color: var(--accent); text-decoration: underline; }
.slate-card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.slate-alert { background: var(--red-dim); border: 1px solid rgba(224,82,82,0.3); border-radius: 6px; padding: 4px 10px; font-size: 12px; color: var(--red); }
.slate-warn  { background: var(--orange-dim); border: 1px solid rgba(232,131,58,0.3); border-radius: 6px; padding: 4px 10px; font-size: 12px; color: var(--orange); }
.slate-ok    { background: var(--green-dim); border: 1px solid rgba(76,175,125,0.3); border-radius: 6px; padding: 4px 10px; font-size: 12px; color: var(--green); }
.slate-action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.meeting-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.meeting-card:hover { border-color: var(--text-muted); box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.meeting-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.meeting-card-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.meeting-status-scheduled { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(91,156,246,0.3);  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.meeting-status-completed { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(76,175,125,0.3);  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.meeting-status-cancelled { background: var(--surface2);   color: var(--text-muted); border: 1px solid var(--border); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.agenda-item { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.agenda-item-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.agenda-field { margin-bottom: 8px; }
.agenda-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); display: block; margin-bottom: 3px; }
.agenda-field p { font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }

/* ── Project Meeting Attendee Chip Picker ── */
.pm-chip-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; min-height: 42px; cursor: text; }
.pm-chip-picker:focus-within { border-color: var(--accent); }
.pm-chip-picker > input, .pm-picker-wrap > input { border: none !important; background: transparent !important; color: var(--text); font-size: 13px; outline: none !important; min-width: 120px; flex: 1; padding: 2px 4px !important; width: auto !important; border-radius: 0 !important; }
.pm-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-dim); border: 1px solid rgba(100,160,255,0.25); border-radius: 20px; padding: 3px 8px 3px 10px; font-size: 12px; color: var(--accent); white-space: nowrap; }
.pm-chip-remove { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 15px; padding: 0; line-height: 1; opacity: 0.6; width: auto !important; }
.pm-chip-remove:hover { opacity: 1; }
.pm-picker-wrap { position: relative; flex: 1; min-width: 120px; display: flex; }
.pm-drop { position: absolute; top: calc(100% + 4px); left: 0; min-width: 240px; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.35); max-height: 200px; overflow-y: auto; }
.pm-drop-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); padding: 8px 12px 3px; }
.pm-drop-item { padding: 8px 12px; font-size: 13px; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-drop-item:hover { background: var(--surface2); }
.pm-drop-sub { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.pm-drop-add { padding: 8px 12px; font-size: 13px; color: var(--accent); cursor: pointer; font-style: italic; border-top: 1px solid var(--border); }
.pm-drop-add:hover { background: var(--surface2); }
/* ── Tasks Arising rows ── */
.pm-task-row { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.pm-task-row input[type=text], .pm-task-row input[type=date], .pm-task-row select { width: auto !important; }
.pm-task-assignee-wrap { position: relative; flex: 1; min-width: 130px; }
.pm-task-drop { position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.35); max-height: 160px; overflow-y: auto; }

/* ── Dashboard panels ── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.dash-panel-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 12px; }
.dash-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.dash-item:last-child { border-bottom: none; padding-bottom: 0; }
.dash-item:first-child { padding-top: 0; }
.dash-item:hover .dash-item-title { color: var(--accent); }
.dash-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.dash-item-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dash-item-date { font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; min-width: 70px; text-align: right; }
.dash-empty { font-size: 12px; color: var(--text-muted); padding: 6px 0; font-style: italic; }

/* ── Loading skeletons (replace seeded zeros while data hydrates) ── */
@keyframes tog-skel-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.tog-skel { display: inline-block; vertical-align: middle; height: 0.9em; border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 0%, var(--surface2) 50%, var(--border) 100%);
  background-size: 200% 100%; animation: tog-skel-shimmer 1.4s ease-in-out infinite; }
.tog-skel-block { display: block; }
.tog-skel-line  { display: block; height: 12px; margin-bottom: 6px; }
.tog-skel-num   { display: block; height: 28px; width: 64px; margin: 4px 0 6px; }
.tog-skel-row   { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tog-skel-row:last-child { border-bottom: none; }
.tog-skel-row > .tog-skel-line { flex: 1; margin-bottom: 0; }

/* ── Per-row Edit button on All Projects table.
   Hides by default on hover-capable devices (desktop) and reveals on row
   hover / focus-within. On touch devices (no real hover) it stays visible
   so iPad users can still tap it. */
.proj-row-edit {
  background: transparent; border: 0; color: var(--text-muted);
  padding: 4px 6px; border-radius: 4px; cursor: pointer;
  display: inline-flex; align-items: center; line-height: 1;
  transition: opacity 0.12s, color 0.12s, background 0.12s;
}
.proj-row-edit:hover { color: var(--accent); background: var(--surface2); }
@media (hover: hover) {
  .proj-row-edit { opacity: 0; }
  tr:hover .proj-row-edit,
  tr:focus-within .proj-row-edit { opacity: 1; }
}

/* ── Inline empty-state affordance (e.g. + Add logline) ── */
.proj-logline-empty {
  display: inline-block; cursor: pointer; margin: 0; padding: 6px 12px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: 6px;
  background: transparent; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.proj-logline-empty:hover {
  color: var(--accent); border-color: var(--accent); background: var(--surface2);
}

/* ── Lucide icon system. Inline SVG <symbol>+<use>, currentColor stroke. ── */
.tog-icon {
  width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em;
  flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* Sidebar / nav icons — slightly larger than line text. */
.sidebar .nav-item .tog-icon { width: 16px; height: 16px; vertical-align: middle; opacity: 0.85; }
.nav-item.active .tog-icon { opacity: 1; }
/* Dashboard panel-title icons — match the existing 12px panel-title cap. */
.dash-panel-title .tog-icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; opacity: 0.85; }
.analytics-card-title .tog-icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; opacity: 0.85; }

/* ── Sidebar IA: View-as chip + Settings popover ── */
.sidebar-view-as {
  font-size: 10.5px; font-weight: 600; color: var(--text-muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 7px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sidebar-view-as:hover { color: var(--accent); border-color: var(--accent); }
.sidebar-view-as strong { color: var(--text); font-weight: 700; }
.sidebar-view-as:hover strong { color: var(--accent); }

.sidebar-popover {
  position: absolute; bottom: calc(100% - 8px); left: 14px; right: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; z-index: 220;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.sidebar-popover-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 5px;
  font-size: 12px; font-weight: 600; color: var(--text);
  text-decoration: none; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.sidebar-popover-item:hover { background: var(--surface); color: var(--accent); }
.sidebar-popover-item .tog-icon { width: 14px; height: 14px; opacity: 0.85; }

/* ── Improved "By Stage" disclosure: real triangle, indented children ── */
.sidebar-stages > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 16px 4px;
}
.sidebar-stages > summary::-webkit-details-marker { display: none; }
.sidebar-stages > summary::before {
  content: ''; display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid var(--text-muted);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.sidebar-stages[open] > summary::before { transform: rotate(90deg); }
.sidebar-stages > summary .nav-section-label {
  margin: 0; padding: 0;
  font-size: 9.5px;
}
.sidebar-stages > summary:hover .nav-section-label { color: var(--accent); }
.sidebar-stages[open] .nav-item {
  font-size: 11.5px; padding-left: 28px; opacity: 0.92;
}
.sidebar-stages[open] .nav-item .tog-icon { width: 14px; height: 14px; }

/* ── Condensed KPI bar (replaces the 5 stat-cards on the dashboard) ── */
.kpi-bar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-bottom: 18px;
}
@media (max-width: 860px) { .kpi-bar { grid-template-columns: repeat(2, 1fr); } }
.kpi-cell {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0;
}
.kpi-cell .kpi-value {
  font-size: 22px; font-weight: 800; color: var(--text);
  line-height: 1; flex-shrink: 0;
}
.kpi-cell .kpi-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kpi-cell .kpi-sub {
  font-weight: 600; text-transform: none; letter-spacing: 0;
  color: var(--text-muted);
}

/* ── Finance / Budget Tracker ── */
.budget-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.budget-stat { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; flex: 1; min-width: 110px; }
.budget-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 4px; }
.budget-stat-value { font-size: 18px; font-weight: 700; color: var(--text); }
.budget-line { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.budget-line-partner { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; min-width: 120px; }
.budget-line-amount { font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.fin-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.fin-confirmed    { background: var(--green-dim);  color: var(--green);  border-color: rgba(76,175,125,0.3); }
.fin-provisional  { background: var(--blue-dim);   color: var(--blue);   border-color: rgba(91,156,246,0.3); }
.fin-in-discussion{ background: var(--accent-dim); color: var(--accent); border-color: rgba(232,131,58,0.3); }
.fin-seeking      { background: var(--surface2);   color: var(--text-muted); border-color: var(--border); }
.budget-gap-bar { height: 6px; border-radius: 3px; background: var(--surface2); margin-top: 10px; overflow: hidden; }
.budget-gap-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* ── Document Log ── */
.doc-log-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.doc-log-datecol { text-align: center; flex-shrink: 0; min-width: 36px; }
.doc-log-day { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1; }
.doc-log-mon { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.doc-type-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); flex-shrink: 0; }
.doc-type-script  { background: var(--blue-dim);   color: var(--blue);   border-color: rgba(91,156,246,0.3); }
.doc-type-treat   { background: var(--purple-dim); color: var(--purple); border-color: rgba(155,125,232,0.3); }
.doc-type-cover   { background: var(--green-dim);  color: var(--green);  border-color: rgba(76,175,125,0.3); }
.doc-type-legal   { background: var(--red-dim);    color: var(--red);    border-color: rgba(224,82,82,0.3); }

/* ── Development Budget Table ── */
.dev-budget-wrap { overflow-x: auto; margin-bottom: 18px; }
.dev-budget-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 540px; }
.dev-budget-table th { background: var(--surface2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 7px 8px; white-space: nowrap; border-bottom: 1px solid var(--border); text-align: right; }
.dev-budget-table th:first-child { text-align: left; }
.dev-budget-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dev-budget-table td:first-child { font-size: 12px; color: var(--text); font-weight: 600; white-space: nowrap; }
.dev-budget-table td:not(:first-child) { text-align: right; }
.dev-budget-table .total-row td { font-weight: 700; background: var(--surface2); border-top: 2px solid var(--border); }
.dev-budget-table .stage-hdr { font-size: 10px; font-weight: 700; text-align: center; padding: 4px 8px; color: var(--text-muted); background: var(--surface2); border-bottom: 1px solid var(--border); }
.dev-budget-table input[type=number] { background: transparent; border: 1px solid transparent; color: var(--text); font-size: 12px; width: 72px; text-align: right; padding: 3px 5px; border-radius: 4px; font-family: inherit; }
.dev-budget-table input[type=number]:focus { background: var(--surface); border-color: var(--accent); outline: none; }
.dev-budget-table input[type=number]:hover { border-color: var(--border); }
.dbt-b { color: var(--blue); }
.dbt-a { color: var(--green); }
.dbt-over { color: var(--red) !important; }

.bs-submitted          { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.bs-under-consideration{ background: var(--blue-dim); color: var(--blue); }
.bs-interested         { background: var(--orange-dim); color: var(--orange); }
.bs-in-discussion      { background: var(--accent-dim); color: var(--accent); }
.bs-greenlit           { background: var(--green-dim); color: var(--green); }
.bs-pass               { background: var(--red-dim); color: var(--red); }
.bs-on-hold            { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }

/* ── STAGE PILL ── */
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Territory badges ────────────────────────────────────────── */
.territory-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.territory-badge-ie   { background: rgba(255,128,0,0.12);  color: #c85000; border: 1px solid rgba(200,80,0,0.2);   }
.territory-badge-ni   { background: rgba(0,90,200,0.10);   color: #004eb3; border: 1px solid rgba(0,78,179,0.2);   }
.territory-badge-both { background: rgba(80,160,80,0.12);  color: #2a7a2a; border: 1px solid rgba(42,122,42,0.2);  }
.territory-badge-uk   { background: rgba(0,51,160,0.10);   color: #003399; border: 1px solid rgba(0,51,160,0.22);  }
.territory-badge-eng  { background: rgba(204,0,0,0.10);    color: #aa0000; border: 1px solid rgba(180,0,0,0.22);   }
.territory-badge-sco  { background: rgba(0,93,186,0.10);   color: #005dba; border: 1px solid rgba(0,80,160,0.22);  }
.territory-badge-wal  { background: rgba(0,128,64,0.10);   color: #006633; border: 1px solid rgba(0,100,50,0.22);  }
.territory-badge-at   { background: rgba(180,0,0,0.10);    color: #990000; border: 1px solid rgba(160,0,0,0.22);   }
.territory-badge-be   { background: rgba(255,213,0,0.18);  color: #8a6c00; border: 1px solid rgba(180,140,0,0.3);  }
.territory-badge-ca   { background: rgba(210,0,0,0.10);    color: #cc0000; border: 1px solid rgba(180,0,0,0.22);   }
.territory-badge-ch   { background: rgba(210,0,0,0.10);    color: #bb0000; border: 1px solid rgba(185,0,0,0.22);   }
.territory-badge-de   { background: rgba(200,160,0,0.14);  color: #7a6000; border: 1px solid rgba(180,140,0,0.25); }
.territory-badge-dk   { background: rgba(196,0,44,0.10);   color: #a0002a; border: 1px solid rgba(170,0,35,0.22);  }
.territory-badge-es   { background: rgba(196,0,0,0.08);    color: #8a0000; border: 1px solid rgba(170,0,0,0.18);   }
.territory-badge-fi   { background: rgba(0,56,168,0.10);   color: #003898; border: 1px solid rgba(0,45,140,0.22);  }
.territory-badge-fr   { background: rgba(0,35,149,0.10);   color: #002395; border: 1px solid rgba(0,28,120,0.22);  }
.territory-badge-it   { background: rgba(0,140,69,0.10);   color: #008040; border: 1px solid rgba(0,110,55,0.22);  }
.territory-badge-mt   { background: rgba(180,0,0,0.09);    color: #990000; border: 1px solid rgba(155,0,0,0.20);   }
.territory-badge-nl   { background: rgba(230,90,0,0.10);   color: #b34700; border: 1px solid rgba(200,75,0,0.22);  }
.territory-badge-no   { background: rgba(186,12,47,0.10);  color: #920a28; border: 1px solid rgba(160,10,40,0.22); }
.territory-badge-pt   { background: rgba(0,102,0,0.10);    color: #006600; border: 1px solid rgba(0,85,0,0.22);    }
.territory-badge-se   { background: rgba(0,106,167,0.10);  color: #006aa7; border: 1px solid rgba(0,88,140,0.22);  }
.territory-badge-us   { background: rgba(60,59,110,0.10);  color: #3c3b6e; border: 1px solid rgba(50,48,100,0.22); }
.territory-badge-au   { background: rgba(0,0,180,0.09);    color: #00008b; border: 1px solid rgba(0,0,160,0.20);   }
.territory-badge-nz   { background: rgba(0,0,150,0.09);    color: #000096; border: 1px solid rgba(0,0,130,0.20);   }
.territory-badge-intl { background: var(--surface2);       color: var(--text-muted); border: 1px solid var(--border); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 9px 14px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}
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); }
tbody td { padding: 11px 14px; font-size: 13px; vertical-align: middle; }
.td-title { font-weight: 700; }
.td-muted { color: var(--text-muted); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-lg { max-width: 860px; }
.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }
.modal-body { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

/* ── FORMS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.tpl-btn { padding:5px 12px; border-radius:20px; font-size:12px; font-weight:600; cursor:pointer; border:1px solid var(--border); background:var(--surface2); color:var(--text-muted); transition:all 0.1s; white-space:nowrap; }
.tpl-btn:hover { border-color:var(--accent); color:var(--accent); }
.tpl-btn.active { background:var(--accent-dim); border-color:var(--accent); color:var(--accent); font-weight:700; }
label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
input[type=text], input[type=email], input[type=date], input[type=search], select, textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 11px;
  transition: border-color 0.12s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 72px; }
select option { background: var(--surface2); }

/* ── PROJECT DETAIL ── */
.detail-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 2px; }
.detail-value { font-size: 13px; color: var(--text); line-height: 1.5; }

/* ── PITCH CARDS ── */
.pitch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.12s;
}
.pitch-card:hover { border-color: #3a4550; }
.pitch-card-header {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.pitch-card-header:hover { background: rgba(255,255,255,0.02); }
.pitch-org { font-weight: 700; font-size: 14px; }
.pitch-contact { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pitch-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.expand-icon { color: var(--text-muted); font-size: 11px; transition: transform 0.2s; }
.expand-icon.open { transform: rotate(180deg); }
.pitch-body { padding: 0 16px 14px; border-top: 1px solid var(--border); display: none; }
.pitch-body.open { display: block; }

/* ── MEETINGS ── */
.meeting-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 14px;
  margin-bottom: 7px;
  display: flex;
  gap: 14px;
}
.m-date-col { min-width: 64px; text-align: center; border-right: 1px solid var(--border); padding-right: 14px; }
.m-day { font-size: 20px; font-weight: 800; line-height: 1; color: var(--accent); }
.m-month { font-size: 10px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.m-year { font-size: 10px; color: var(--text-muted); }
.m-content { flex: 1; }
.m-type { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.6px; }
.m-outcome { font-size: 13px; font-weight: 600; margin: 3px 0 2px; }
.m-notes { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── DOC TAGS ── */
.doc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.doc-tag { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; font-size: 11px; color: var(--text-muted); }

/* ── SECTION HEADING ── */
.section-heading {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-heading::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar input[type=search] { flex: 1; min-width: 180px; }
.filter-bar select { width: auto; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .ei { font-size: 42px; margin-bottom: 10px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin-bottom: 18px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ── ALERTS ── */
.alert-bar {
  background: var(--orange-dim);
  border: 1px solid rgba(232,131,58,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ── TWO COL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── STAGE PROGRESS ── */
.stage-bar { display: flex; gap: 0; }
.stage-bar-item { flex: 1; text-align: center; cursor: pointer; }
.stage-bar-item:hover .sbi-track { opacity: 1 !important; }
.sbi-track { height: 4px; transition: all 0.2s; }
.sbi-label { font-size: 9px; margin-top: 5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }

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

/* ── VIEWS ── */
.view { display: none; }
.view.active { display: block; }

/* ── GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.gallery-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.gallery-cover-placeholder {
  width: 100%;
  height: 140px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--border);
}
.gallery-body {
  padding: 12px 14px 14px;
}
.gallery-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-runtime {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.gallery-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.gallery-crew {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
}
.view-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.12s;
}
.view-toggle-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ── PIPELINE BOARD VIEW ── */
.board-scroll { overflow-x: auto; padding-bottom: 16px; }
.board-cols { display: flex; gap: 14px; min-width: max-content; align-items: flex-start; }
.board-col {
  width: 230px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.stage-group-header:hover { background: var(--surface2) !important; }
.stage-group-header .arrow { transition: transform 0.15s; }
.board-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
}
.board-col-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  border-radius: 10px;
  padding: 2px 8px;
  color: var(--text-muted);
}
.board-col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.board-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}
.board-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.board-card-title { font-size: 13px; font-weight: 700; margin-bottom: 5px; line-height: 1.3; }
.board-card-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-bottom: 5px; }
.board-card-crew { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.board-empty { font-size: 12px; color: var(--border); text-align: center; padding: 12px 0; }

/* ── GLOBAL SEARCH ── */
.gs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.gs-overlay.open { display: flex; }
.gs-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.gs-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.gs-input-wrap span { font-size: 18px; color: var(--text-muted); flex-shrink: 0; }
.gs-input {
  flex: 1;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.gs-input::placeholder { color: var(--text-muted); }
.gs-kbd { font-size: 11px; color: var(--text-muted); background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; flex-shrink: 0; }
.gs-results { overflow-y: auto; padding: 8px 0; flex: 1; }
.gs-section-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); padding: 8px 16px 4px; }
.gs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.gs-item:hover, .gs-item.gs-active { background: var(--accent-dim); }
.gs-item-icon { font-size: 15px; flex-shrink: 0; width: 22px; text-align: center; }
.gs-item-main { flex: 1; min-width: 0; }
.gs-item-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 14px; }
.gs-hint { text-align: center; padding: 20px 16px; color: var(--text-muted); font-size: 13px; }
.gs-search-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.gs-search-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── CHECKBOX GROUP ── */
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
}
.check-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-transform: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  padding: 2px 0;
}
.check-group input[type=checkbox] { width: auto; padding: 0; border: none; background: none; }

/* ── HAMBURGER BUTTON (mobile only) ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.hamburger:hover { background: var(--surface2); }

/* ── SIDEBAR OVERLAY (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 499;
}
.sidebar-overlay.active { display: block; }

/* ══════════════════════════════════════════════════════════
   MOBILE — 768px and below
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Show hamburger */
  .hamburger { display: flex; }

  /* Sidebar: hidden off-screen, slides in */
  .sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-w) - 4px);
    top: 0;
    height: 100vh;
    z-index: 500;
    transition: left 0.25s ease;
  }
  .sidebar.open { left: 0; }

  /* Topbar */
  .topbar { padding: 10px 14px; gap: 10px; }
  .topbar h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
  /* Keep nav action buttons in a single horizontal row on mobile —
     hide their text labels and rely on the icon + tooltip. The dashboard's
     four Now / Today / What needs me / + New Project buttons fit cleanly
     side-by-side without stacking. */
  .topbar-actions { flex-wrap: nowrap; gap: 6px; }
  .topbar-actions .btn { font-size: 12px; padding: 5px 8px; flex-shrink: 0; }
  .topbar-actions .btn .btn-label { display: none; }
  .topbar-actions .btn .tog-icon { margin: 0; }

  /* Content padding */
  .content { padding: 16px; }

  /* Forms and two-col grids → single column */
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }

  /* Modals: sheet style from bottom */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    max-height: 92vh;
  }
  .modal-lg { max-width: 100%; }
  .modal-header { padding: 16px 18px 12px; }
  .modal-body { padding: 16px 18px; }
  .modal-footer { padding: 12px 18px; }

  /* Stats — smaller minimum */
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
  .stat-card { padding: 12px 14px; }
  .stat-value { font-size: 24px; }

  /* Contact grid → single column */
  .contact-grid { grid-template-columns: 1fr; }

  /* Gallery grid → 2 columns on tablet */
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .gallery-cover, .gallery-cover-placeholder { height: 110px; }

  /* Meetings → stack date above content */
  .meeting-item { flex-direction: column; gap: 6px; }
  .m-date-col {
    min-width: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 6px;
    display: flex;
    gap: 8px;
    align-items: baseline;
    text-align: left;
  }
  .m-day { font-size: 16px; }

  /* Stage bar labels shorter */
  .sbi-label { font-size: 8px; }

  /* Pitch card header wraps on mobile */
  .pitch-meta { flex-wrap: wrap; }

  /* Filter bar */
  .filter-bar { gap: 6px; }
  .filter-bar input[type=search] { min-width: 100px; }

  /* Section headings */
  .section-heading { margin: 16px 0 10px; }

  /* iOS zooms when an input < 16px font-size receives focus. Bump every
     text-entry control to 16px on phones — overrides per-component sizing
     where needed without touching desktop layout. */
  input[type=text], input[type=email], input[type=password], input[type=tel],
  input[type=url], input[type=search], input[type=number],
  input[type=date], input[type=time], input[type=datetime-local],
  textarea, select { font-size: 16px; }

  /* Touch targets — Apple HIG ≥44pt. Buttons in dense lists especially. */
  .btn { min-height: 40px; }
  .btn:not(.btn-sm):not(.tpl-btn) { padding: 9px 14px; }

  /* ── Producer-facing read-path mobile polish (2026-04-29) ───────
     The project-detail page is the producer's "where is this at"
     scan view on a phone. Make the tab bar swipe-able rather than
     wrap, tighten content padding, and bump tap targets in the
     persona-switcher / footer-launch row + status pane. */

  /* Project-detail tab bar: horizontal scroll, no wrap, hidden bar */
  .proj-tab-bar {
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
  }
  .proj-tab-bar::-webkit-scrollbar { display: none; }
  .proj-tab {
    flex-shrink: 0;
    padding: 13px 12px 12px;
    scroll-snap-align: start;
  }
  .proj-tab-content { padding: 14px 12px 32px; }

  /* Status pane: cards look good in single column; bump row text +
     give tap targets some breathing room. The renderer tags rows
     with .ps-row / punch list with .ps-missing for these hooks. */
  .ps-row {
    padding: 10px 0 !important;
    font-size: 14px !important;
  }
  .ps-row a { padding: 6px 0; display: inline-block; }
  .ps-missing-list li { padding: 6px 0; }
  .ps-missing-list a { display: inline-block; padding: 4px 0; }

  /* Persona switcher: full-bleed select; the dropdown is native on
     mobile so already touch-friendly, but the surrounding box can
     tighten. */
  .persona-switcher select { font-size: 15px; padding: 9px 10px; }

  /* Sidebar footer launch buttons: each pill becomes 36px+ tall and
     wraps to its own line so taps don't fight each other. */
  .sidebar-launch-row a,
  .sidebar-launch-row button { min-height: 36px; padding: 8px 12px !important; font-size: 13px !important; }
}

/* ══════════════════════════════════════════════════════════
   INLINE HELP TIPS — small "?" chip with hover popover
   2026-04-29 — see Discoverability work in changelog
   ══════════════════════════════════════════════════════════ */
.help-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 10px; font-weight: 700;
  cursor: help; margin-left: 5px; vertical-align: middle;
  position: relative; user-select: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.help-tip:hover, .help-tip.open {
  background: var(--accent-dim, rgba(232,131,58,0.15));
  color: var(--accent);
  border-color: var(--accent);
}
.help-tip::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 9px 11px; font-size: 12px; font-weight: 500;
  width: max-content; max-width: min(280px, 80vw); white-space: normal;
  line-height: 1.55; text-align: left;
  z-index: 1000; box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  pointer-events: none; opacity: 0; transition: opacity 0.12s;
}
.help-tip:hover::after, .help-tip:focus::after, .help-tip.open::after {
  opacity: 1;
}
/* Right-aligned tips (tooltip would overflow viewport on the right) */
.help-tip.tip-left::after { left: auto; right: 0; transform: none; }
.help-tip.tip-above::after { top: auto; bottom: calc(100% + 8px); }

/* ── Keyboard shortcut hint modal (?-key trigger) ──────────── */
.kbd-hint-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 2000; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.kbd-hint-overlay.open { display: flex; }
.kbd-hint-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 26px;
  max-width: 420px; width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.kbd-hint-modal h2 {
  font-size: 15px; font-weight: 800; margin-bottom: 4px;
  color: var(--text);
}
.kbd-hint-modal .lead {
  font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5;
}
.kbd-hint-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.kbd-hint-row:last-child { border-bottom: 0; }
.kbd-hint-row .keys {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; font-weight: 700;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 8px;
}
.kbd-hint-modal .close-row {
  display: flex; justify-content: flex-end; margin-top: 14px;
}
.kbd-hint-modal .close-btn {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 12px; cursor: pointer; font-family: inherit;
}

/* ══════════════════════════════════════════════════════════
   SMALL PHONES — 480px and below
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .content { padding: 12px; }
  .topbar { padding: 8px 12px; }
  .topbar h2 { font-size: 14px; }

  /* Stats: force 2 columns on tiny screens */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Gallery: 1 column on tiny screens */
  .gallery-grid { grid-template-columns: 1fr; }

  /* Modals tighter */
  .modal-header { padding: 12px 14px 10px; }
  .modal-body { padding: 12px 14px; }
  .modal-footer { padding: 10px 14px; }

  /* Buttons in topbar: compact */
  .topbar-actions .btn { padding: 5px 8px; font-size: 11px; }
  /* Hide ⌘K hint in search button on tiny screens */
  .gs-search-btn .gs-kbd { display: none; }
  .gs-search-btn { padding: 5px 8px; }
  /* Board cards narrower */
  .board-col { width: 200px; }

  /* Contact grid tiles keep 1 column */
  .contact-grid { grid-template-columns: 1fr; }
}

/* ── DEVELOPMENT CHECKLIST ── */
.cl-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 7px;
  transition: border-color 0.15s;
}
.cl-item.done {
  border-left-color: var(--green);
  border-color: rgba(76,175,125,0.3);
}
.cl-item-label { font-weight: 600; font-size: 13px; line-height: 1.4; }
.cl-item-limit { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.cl-textarea {
  width: 100%; margin-top: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text);
  padding: 8px 10px; font-size: 13px; line-height: 1.5;
  resize: vertical; font-family: inherit;
}
.cl-textarea:focus { outline: none; border-color: var(--accent); }
.cl-wc { font-size: 11px; text-align: right; margin-top: 3px; color: var(--text-muted); }
.cl-progress-wrap { background: var(--surface2); border-radius: 4px; height: 6px; overflow: hidden; }
.cl-progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease, background 0.3s ease; }
/* ── Contacts ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.contact-card:hover { border-color: var(--text-muted); box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.contact-type-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.contact-people-preview { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.person-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.person-row:last-child { border-bottom: none; }
.person-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.linked-contact-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin: 3px; cursor: default; }
.copro-ter-sel { font-size: 10px; padding: 1px 3px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--accent); cursor: pointer; font-weight: 700; }

/* ── PROJECT EMAILS ── */
.email-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 6px;
  font-size: 12px;
}
.email-dir-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.email-sent     { background: var(--blue-dim);   color: var(--blue);  border: 1px solid rgba(91,156,246,0.25); }
.email-received { background: var(--green-dim);  color: var(--green); border: 1px solid rgba(76,175,125,0.25); }

/* ── PROJECT MEETINGS ── */
.proj-mtg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 6px;
  font-size: 12px;
}
.proj-mtg-datecol {
  min-width: 60px;
  text-align: center;
  border-right: 1px solid var(--border);
  padding-right: 12px;
  flex-shrink: 0;
}
.proj-mtg-day { font-size: 18px; font-weight: 800; line-height: 1; color: var(--accent); }
.proj-mtg-mon { font-size: 10px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }

/* ── TASKS ── */
.task-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 5px;
  transition: border-color 0.12s;
}
.task-card:hover { border-color: var(--text-muted); }
.task-card.task-done { opacity: 0.6; }
.task-card.task-done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.task-title { font-weight: 600; font-size: 13px; line-height: 1.4; }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; align-items: center; }
.task-chip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.task-milestone { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(232,131,58,0.3); }

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg: #f2f2f5;
  --surface: #ffffff;
  --surface2: #e8e8ed;
  --border: #d0d0d8;
  --text: #1a1a1a;
  --text-muted: #6b6b7b;
  --accent: #d06a1e;
  --accent-dim: rgba(208,106,30,0.10);
  --green: #2e8a57;
  --green-dim: rgba(46,138,87,0.10);
  --red: #c0392b;
  --red-dim: rgba(192,57,43,0.10);
  --blue: #2566cc;
  --blue-dim: rgba(37,102,204,0.10);
  --orange: #d06a1e;
  --orange-dim: rgba(208,106,30,0.10);
  --purple: #6b45c8;
  --purple-dim: rgba(107,69,200,0.10);
}
[data-theme="light"] .sidebar { box-shadow: 2px 0 8px rgba(0,0,0,0.06); }
[data-theme="light"] .card,
[data-theme="light"] .modal { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea { background: #fff; color: var(--text); border-color: var(--border); }
[data-theme="light"] .topbar { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.07); }

/* ── GROUP SETTINGS / MEMBERS ── */
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.member-row:last-child { border-bottom: none; }
.member-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 13px; font-weight: 600; }
.member-email { font-size: 11px; color: var(--text-muted); }
.member-role-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  flex-shrink: 0;
}
.member-role-lead   { background: var(--accent-dim);  color: var(--accent); }
.member-role-member { background: var(--surface2);    color: var(--text-muted); }
.member-role-admin  { background: var(--red-dim);     color: var(--red); }

/* ── PRIVACY TOGGLE ── */
.privacy-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; gap: 16px;
}
.toggle-switch {
  position: relative; width: 44px; height: 24px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-muted); transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-track { background: var(--red-dim); border-color: var(--red); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); background: var(--red); }

/* ── ADMIN NOTIFICATION BADGE ── */
.notif-bell {
  position: relative; display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  border-radius: 5px; gap: 4px;
}
.notif-bell:hover { background: var(--surface2); }
.notif-count {
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 800; min-width: 16px; height: 16px;
  border-radius: 8px; display: inline-flex; align-items: center;
  justify-content: center; padding: 0 3px;
}

/* ── THEME SWITCHER BUTTON ── */
.theme-switcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.theme-switcher:hover { transform: scale(1.1); background: var(--surface2); }

/* ── NOTES / JOURNAL ── */
.notes-feed { display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.note-entry { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:12px 14px; }
.note-meta { font-size:11px; color:var(--text-muted); margin-bottom:6px; display:flex; justify-content:space-between; align-items:center; }
.note-text { font-size:13px; line-height:1.6; white-space:pre-wrap; word-break:break-word; }
.note-add-wrap { display:flex; gap:8px; align-items:flex-end; margin-top:10px; }
.note-add-wrap textarea { flex:1; min-height:64px; resize:vertical; font-size:13px; }

/* ── RIGHTS & CHAIN OF TITLE ── */
.rights-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 20px; margin-bottom:12px; }
.rights-field { display:flex; flex-direction:column; gap:3px; }
.rights-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.6px; color:var(--text-muted); }
.rights-value { font-size:13px; font-weight:600; }
.rights-expiry-warn { color:var(--red) !important; }
.rights-expiry-soon { color:var(--accent) !important; }
@media(max-width:640px) { .rights-grid { grid-template-columns:1fr; } }

/* ── INVOICE / PAYMENT TRACKER ── */
.invoice-summary { display:flex; gap:16px; flex-wrap:wrap; padding:12px 14px; background:var(--surface2); border-radius:8px; margin-bottom:12px; }
.inv-sum-item { display:flex; flex-direction:column; gap:2px; }
.inv-sum-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); }
.inv-sum-value { font-size:16px; font-weight:800; }
.inv-draft { color:var(--text-muted); }
.inv-issued { color:var(--blue); font-weight:600; }
.inv-paid { color:var(--green); font-weight:600; }
.inv-overdue { color:var(--red); font-weight:700; }
.inv-cancelled { color:var(--border); text-decoration:line-through; }

/* ── ACTIVITY LOG ── */
.activity-feed { display:flex; flex-direction:column; }
.activity-entry { display:flex; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); }
.activity-entry:last-child { border-bottom:none; }
.activity-icon { font-size:14px; flex-shrink:0; width:22px; text-align:center; padding-top:1px; }
.activity-body { flex:1; min-width:0; }
.activity-action { font-size:13px; font-weight:600; }
.activity-detail { font-size:12px; color:var(--text-muted); margin-top:1px; }
.activity-ts { font-size:11px; color:var(--text-muted); white-space:nowrap; flex-shrink:0; padding-top:2px; }

/* ── DEADLINE ALERTS ── */
.alert-item { display:flex; align-items:center; gap:10px; padding:9px 14px; border-radius:7px; margin-bottom:6px; font-size:13px; cursor:default; }
.alert-critical { background:var(--red-dim); border:1px solid rgba(224,82,82,0.25); color:var(--red); }
.alert-warn { background:var(--orange-dim); border:1px solid rgba(232,131,58,0.25); color:var(--orange); }
.alert-info { background:var(--blue-dim); border:1px solid rgba(91,156,246,0.25); color:var(--blue); }
.alert-item-text { flex:1; }
.alert-item-link { font-weight:700; cursor:pointer; text-decoration:underline; }

/* ── CRM / RELATIONSHIP ── */
.crm-status { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.crm-active  { background:var(--green-dim);  color:var(--green); }
.crm-dormant { background:var(--surface2);   color:var(--text-muted); }
.crm-new     { background:var(--blue-dim);   color:var(--blue); }
.crm-hot     { background:var(--accent-dim); color:var(--accent); }
.interaction-entry { padding:10px 12px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.interaction-meta { font-size:11px; color:var(--text-muted); margin-bottom:4px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.interaction-type { display:inline-block; padding:2px 7px; border-radius:4px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; background:var(--surface2); color:var(--text-muted); }
.interaction-note { font-size:13px; line-height:1.5; }

/* ── FUNDING APPLICATIONS ── */
.funding-app-row { display:flex; align-items:flex-start; gap:12px; padding:11px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.funding-app-left { flex:1; min-width:0; }
.funding-app-body { font-size:13px; font-weight:700; }
.funding-app-meta { font-size:11px; color:var(--text-muted); margin-top:3px; display:flex; gap:10px; flex-wrap:wrap; }
.funding-outcome { font-size:10px; font-weight:700; padding:2px 8px; border-radius:4px; text-transform:uppercase; letter-spacing:0.4px; white-space:nowrap; flex-shrink:0; }
.funding-outcome-pending   { background:var(--surface2); color:var(--text-muted); }
.funding-outcome-approved  { background:var(--green-dim); color:var(--green); }
.funding-outcome-declined  { background:var(--red-dim); color:var(--red); }
.funding-outcome-hold      { background:var(--orange-dim); color:var(--orange); }
.funding-outcome-withdrawn { background:var(--surface2); color:var(--text-muted); text-decoration:line-through; }
.funding-amount { font-size:13px; font-weight:700; color:var(--text); white-space:nowrap; flex-shrink:0; }

/* ── TALENT ATTACHMENTS ── */
.talent-row { display:flex; align-items:center; gap:10px; padding:9px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.talent-row-clickable { cursor:pointer; transition:border-color 0.15s, background 0.15s; }
.talent-row-clickable:hover { border-color:var(--accent); background:var(--surface2); }
.talent-role-badge { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; padding:2px 8px; border-radius:4px; background:var(--surface2); color:var(--text-muted); white-space:nowrap; flex-shrink:0; }
.talent-name { font-size:13px; font-weight:700; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.talent-status { font-size:10px; font-weight:700; padding:2px 8px; border-radius:4px; text-transform:uppercase; letter-spacing:0.4px; white-space:nowrap; flex-shrink:0; }
.talent-status-considering { background:var(--surface2); color:var(--text-muted); }
.talent-status-approached  { background:#eff6ff; color:#3b82f6; }
.talent-status-talks       { background:var(--blue-dim); color:var(--blue); }
.talent-status-loi         { background:#f5f3ff; color:#7c3aed; }
.talent-status-attached    { background:var(--orange-dim); color:var(--orange); }
.talent-status-confirmed   { background:var(--green-dim); color:var(--green); }
.talent-status-dropped     { background:var(--surface2); color:var(--text-muted); }

/* ── TALENT GALLERY VIEW ── */
.talent-view-toggle { display:flex; background:var(--surface2); border:1px solid var(--border); border-radius:6px; overflow:hidden; }
.talent-view-btn { padding:4px 10px; font-size:12px; font-weight:600; border:none; background:none; color:var(--text-muted); cursor:pointer; transition:background 0.1s, color 0.1s; }
.talent-view-btn.active { background:var(--surface); color:var(--accent); }
.talent-gallery { display:flex; flex-direction:column; gap:14px; margin-bottom:18px; }
.talent-gallery-group { border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.talent-gallery-group-header { padding:9px 14px; background:var(--surface2); font-weight:700; font-size:12px; display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--border); }
.talent-gallery-cards { display:flex; flex-wrap:wrap; gap:10px; padding:12px 14px; }
.talent-cast-card { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:12px 14px; min-width:130px; max-width:200px; flex:1; cursor:pointer; transition:border-color 0.15s, box-shadow 0.15s; }
.talent-cast-card:hover { border-color:var(--accent); box-shadow:0 2px 8px rgba(0,0,0,0.07); }
.talent-cast-card-role { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); margin-bottom:5px; }
.talent-cast-card-name { font-size:13px; font-weight:700; color:var(--text); margin-bottom:4px; line-height:1.3; }
.talent-cast-card-credit { font-size:11px; color:var(--text-muted); font-style:italic; margin-bottom:4px; line-height:1.4; }
.talent-cast-card-rep { font-size:11px; color:var(--text-muted); line-height:1.4; margin-bottom:2px; }
.talent-cast-card-add { border-style:dashed; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:80px; opacity:0.6; }
.talent-cast-card-add:hover { opacity:1; }
.talent-card-dropped { opacity:0.45; }
.talent-cast-card-headshot { width:52px; height:52px; border-radius:7px; object-fit:cover; display:block; margin-bottom:8px; }
.talent-cast-card-headshot-placeholder { width:52px; height:52px; border-radius:7px; background:var(--surface2); display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:8px; }

/* ── TALENT DIRECTORY SEARCH ── */
.tl-search-item { display:flex; align-items:center; gap:10px; padding:8px 12px; cursor:pointer; transition:background 0.1s; }
.tl-search-item:hover { background:var(--surface2); }

/* ── PACKAGE SUMMARY ── */
.package-checklist { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.package-check { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; padding:4px 10px; border-radius:20px; line-height:1; }
.package-check-done    { background:var(--green-dim); color:var(--green); }
.package-check-partial { background:var(--orange-dim); color:var(--orange); }
.package-check-missing { background:var(--surface2); color:var(--text-muted); }

/* ── FINANCE TAB GROUP ── */
.proj-finance-group { border:1px solid var(--border); border-radius:12px; overflow:hidden; margin-top:24px; margin-bottom:20px; }
.proj-finance-tabs { display:flex; align-items:center; border-bottom:1px solid var(--border); background:var(--surface2); }
.proj-finance-tab { padding:9px 16px; font-size:12px; font-weight:700; cursor:pointer; background:none; border:none; color:var(--text-muted); border-bottom:2px solid transparent; margin-bottom:-1px; letter-spacing:0.2px; white-space:nowrap; transition:color 0.1s; }
.proj-finance-tab:hover { color:var(--text); }
.proj-finance-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.proj-fin-count { display:inline-block; background:var(--surface); border-radius:8px; padding:1px 6px; font-size:10px; margin-left:5px; border:1px solid var(--border); }
.proj-finance-tab.active .proj-fin-count { background:var(--accent-dim); border-color:transparent; }
.proj-finance-body { padding:0 0 4px; }

/* ── COLLAPSIBLE PROJECT SECTIONS ── */
details.proj-collapse { border:1px solid var(--border); border-radius:10px; margin-top:20px; margin-bottom:4px; }
details.proj-collapse > summary { display:flex; align-items:center; gap:8px; padding:10px 16px; cursor:pointer; font-size:13px; font-weight:700; list-style:none; background:var(--surface2); border-radius:10px; user-select:none; }
details.proj-collapse[open] > summary { border-radius:10px 10px 0 0; border-bottom:1px solid var(--border); }
details.proj-collapse > summary::-webkit-details-marker { display:none; }
details.proj-collapse > summary .collapse-arrow { font-size:9px; color:var(--text-muted); transition:transform 0.15s; flex-shrink:0; }
details.proj-collapse[open] > summary .collapse-arrow { transform:rotate(90deg); }
details.proj-collapse > summary:hover { background:var(--surface); }
details.proj-collapse > summary .collapse-actions { margin-left:auto; display:flex; gap:6px; align-items:center; }
details.proj-collapse-body { padding:0 16px 8px; }

/* ── PITCH MATERIALS TRACKER ── */
.pm-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:8px; margin-bottom:18px; }
.pm-item { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.pm-item-name { font-size:13px; font-weight:600; color:var(--text); line-height:1.3; }
.pm-badge { padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; cursor:pointer; border:none; text-align:left; }
.pm-not-started { background:var(--surface2);   color:var(--text-muted); }
.pm-in-progress { background:var(--orange-dim); color:var(--orange);     }
.pm-draft       { background:var(--blue-dim);   color:var(--blue);       }
.pm-final       { background:var(--green-dim);  color:var(--green);      }

/* ── COMPARABLE TITLES ── */
.comp-row { display:flex; align-items:flex-start; gap:12px; padding:10px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.comp-budget-tier { font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; background:var(--surface2); color:var(--text-muted); white-space:nowrap; flex-shrink:0; }

/* ── COMMISSIONING PROFILES ── */
.comm-profile { background:var(--surface2); border-radius:8px; padding:14px 16px; margin-bottom:14px; }
.comm-profile-field { margin-bottom:10px; }
.comm-profile-field:last-child { margin-bottom:0; }
.comm-profile-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); margin-bottom:3px; }
.comm-profile-value { font-size:13px; color:var(--text); line-height:1.5; }
.comm-round-soon   { color:var(--orange); font-weight:700; }
.comm-round-urgent { color:var(--red);    font-weight:700; }

/* ── DEAL TRACKER ── */
.deal-row { display:flex; align-items:flex-start; gap:12px; padding:11px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.deal-row.deal-expiring { border-color:var(--orange); }
.deal-type-icon { font-size:18px; flex-shrink:0; margin-top:2px; }
.deal-badge { padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; flex-shrink:0; }
.deal-negotiation { background:var(--orange-dim); color:var(--orange);     }
.deal-hot         { background:var(--blue-dim);   color:var(--blue);       }
.deal-signed      { background:var(--green-dim);  color:var(--green);      }
.deal-expired     { background:var(--red-dim);    color:var(--red);        }
.deal-terminated  { background:var(--surface2);   color:var(--text-muted); }

/* ── DEVELOPMENT RECOUPMENT ── */
.recoup-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-bottom:16px; }
.recoup-stat { background:var(--surface2); border-radius:8px; padding:10px 12px; }
.recoup-stat-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); margin-bottom:3px; }
.recoup-stat-value { font-size:16px; font-weight:800; color:var(--text); }
.recoup-row { display:flex; align-items:flex-start; gap:12px; padding:10px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.recoup-badge { padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; flex-shrink:0; }
.recoup-outstanding { background:var(--orange-dim); color:var(--orange);     }
.recoup-partial     { background:var(--blue-dim);   color:var(--blue);       }
.recoup-done        { background:var(--green-dim);  color:var(--green);      }
.recoup-off         { background:var(--surface2);   color:var(--text-muted); }
.fund-type-badge    { font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; background:var(--surface2); color:var(--text-muted); white-space:nowrap; }

/* ── OPTION AGREEMENTS ── */
.option-row { display:flex; align-items:flex-start; gap:12px; padding:11px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.option-row.option-expiring { border-color:var(--orange); }
.option-status-active    { background:var(--green-dim);  color:var(--green);  padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; }
.option-status-renewed   { background:var(--blue-dim);   color:var(--blue);   padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; }
.option-status-exercised { background:var(--accent-dim); color:var(--accent); padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; }
.option-status-expired   { background:var(--red-dim);    color:var(--red);    padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; }
.option-status-lapsed    { background:var(--surface2);   color:var(--text-muted); padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; }

/* ── SIDEBAR STAGE GROUP ── */
details.sidebar-stages > summary { list-style:none; cursor:pointer; }
details.sidebar-stages > summary::-webkit-details-marker { display:none; }
details.sidebar-stages > summary .nav-section-label { display:flex; align-items:center; justify-content:space-between; margin-bottom:0; }
details.sidebar-stages > summary .nav-section-label::after { content:'▾'; font-size:9px; transition:transform 0.15s; }
details.sidebar-stages[open] > summary .nav-section-label::after { transform:rotate(-180deg); }

/* ── Script Draft Tracker ────────────────────────────────────── */
.draft-row { display:flex; align-items:flex-start; gap:12px; padding:11px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }
.draft-status-circulating { background:var(--blue-dim);   color:var(--blue);        padding:2px 7px; border-radius:10px; }
.draft-status-notes       { background:var(--orange-dim); color:var(--orange);      padding:2px 7px; border-radius:10px; }
.draft-status-revision    { background:var(--accent-dim); color:var(--accent);      padding:2px 7px; border-radius:10px; }
.draft-status-locked      { background:var(--green-dim);  color:var(--green);       padding:2px 7px; border-radius:10px; }
.draft-status-archived    { background:var(--surface2);   color:var(--text-muted);  padding:2px 7px; border-radius:10px; }
.coverage-card { margin:6px 0 0 0; padding:8px 10px; background:var(--surface2); border-radius:6px; border-left:3px solid var(--border); }
.coverage-card.coverage-recommend { border-left-color:var(--green);  }
.coverage-card.coverage-consider  { border-left-color:var(--orange); }
.coverage-card.coverage-pass      { border-left-color:var(--red);    }

/* ── Co-Development Agreements ───────────────────────────────── */
.codev-row { display:flex; align-items:flex-start; gap:12px; padding:11px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:8px; }

/* ── Dev Spend / Budget vs Actuals ───────────────────────────── */
.devspend-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin-bottom:14px; }
.devspend-row { display:flex; align-items:center; gap:12px; padding:9px 14px; border-radius:8px; background:var(--surface); border:1px solid var(--border); margin-bottom:6px; }

/* ── Kanban Board ────────────────────────────────────────────── */
.kanban-board { display:flex; gap:12px; overflow-x:auto; padding-bottom:16px; align-items:flex-start; }
.kanban-col { flex:0 0 210px; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:10px; }
.kanban-col-header { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.6px; padding:4px 4px 10px; display:flex; justify-content:space-between; align-items:center; }
.kanban-card { background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:10px 12px; margin-bottom:8px; cursor:pointer; transition:border-color 0.15s; }
.kanban-card:hover { border-color:var(--accent); }
.kanban-card-title { font-size:13px; font-weight:600; color:var(--text); margin-bottom:3px; line-height:1.3; }
.kanban-card-meta  { font-size:11px; color:var(--text-muted); }
.kanban-card-tags  { display:flex; gap:4px; flex-wrap:wrap; margin-top:6px; }
.kanban-tag { font-size:10px; font-weight:700; padding:1px 6px; border-radius:10px; background:var(--surface); color:var(--text-muted); border:1px solid var(--border); }

/* ── Funder Pipeline ─────────────────────────────────────────── */
.pipeline-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:10px; }
.pipeline-table { border-collapse:collapse; width:100%; font-size:12px; }
.pipeline-table th { background:var(--surface2); padding:8px 12px; text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-muted); border-bottom:1px solid var(--border); white-space:nowrap; }
.pipeline-table td { padding:8px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.pipeline-table tr:last-child td { border-bottom:none; }
.pipeline-table tr:hover td { background:var(--surface); }
.pip-submitted { background:var(--blue-dim);   color:var(--blue);        font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; white-space:nowrap; display:inline-block; }
.pip-interest  { background:var(--green-dim);  color:var(--green);       font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; display:inline-block; }
.pip-pass      { background:var(--red-dim);    color:var(--red);         font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; display:inline-block; }
.pip-dev       { background:var(--orange-dim); color:var(--orange);      font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; display:inline-block; }
.pip-pitched   { background:var(--surface2);   color:var(--text-muted);  font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; display:inline-block; }

/* ── Alert dismiss / snooze ──────────────────────────────────── */
.alert-item { position:relative; }
.alert-actions { display:flex; gap:4px; flex-shrink:0; margin-left:auto; padding-left:10px; }
.alert-snooze-btn {
  font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px;
  background:var(--surface2); color:var(--text-muted); border:1px solid var(--border);
  cursor:pointer; white-space:nowrap; line-height:1.6;
}
.alert-snooze-btn:hover { background:var(--border); color:var(--text); }
.alert-dismiss-btn {
  font-size:12px; font-weight:700; padding:2px 7px; border-radius:10px;
  background:none; color:var(--text-muted); border:1px solid transparent;
  cursor:pointer; line-height:1.6;
}
.alert-dismiss-btn:hover { background:var(--surface2); color:var(--red); }

/* ── Talent clickable name ───────────────────────────────────── */
.talent-name-link {
  background:none; border:none; padding:0; margin:0;
  font-size:13px; font-weight:700; color:var(--text);
  cursor:pointer; text-align:left; font-family:inherit;
  line-height:inherit;
}
.talent-name-link:hover { color:var(--accent); text-decoration:underline; }

/* ── Talent person view modal ────────────────────────────────── */
.talent-pv-proj {
  padding:12px 0;
  border-bottom:1px solid var(--border);
}
.talent-pv-proj:last-child { border-bottom:none; }

/* ── Project detail tab bar ──────────────────────────────────── */
.proj-tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 24px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.proj-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 11px 16px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.12s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.proj-tab:hover { color: var(--text); }
.proj-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.proj-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  min-width: 18px;
}
.proj-tab.active .proj-tab-count {
  background: var(--accent-dim);
  border-color: transparent;
  color: var(--accent);
}
.proj-tab-content {
  padding: 24px 24px 40px;
  min-height: 300px;
}

/* ── Project detail compact header card ─────────────────────── */
.proj-detail-header {
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.proj-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.proj-stage-inline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 24px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.proj-stage-step {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.proj-stage-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.proj-stage-step-dot.done  { background: var(--green); }
.proj-stage-step-dot.curr  { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.proj-stage-step-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  padding: 0 8px 8px;
  white-space: nowrap;
}
.proj-stage-step-label.curr { color: var(--accent); }
.proj-stage-step-label.done { color: var(--green); }
.proj-stage-connector {
  height: 1px;
  width: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.proj-stage-connector.done { background: var(--green); }

/* ── Dashboard redesign · Phase 1 (2026-05-06) ────────────────────────────
   Greeting strip + persona-preview stub for the new SPA dashboard. The
   producer persona renders the existing layout below this header; other
   personas render renderPersonaPreviewStub() until their pane ships. */
.dash-greet {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.dash-greet-hi {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.15;
}
.dash-greet-hi small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0;
}
.dash-greet-week {
  flex: 1;
  min-width: 260px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 580px;
}
.dash-stub {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px 38px;
  margin-top: 8px;
  max-width: 720px;
}
.dash-stub-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 8px;
}
.dash-stub-h {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.25;
}
.dash-stub-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 22px;
}
.dash-stub-body strong {
  color: var(--text);
}
.dash-stub-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.dash-stub-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  line-height: 1.5;
}

/* Dashboard · Dev pane domain accordion (Phase 2 · 2026-05-06) */
.dev-accordion-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 16px;
  margin-bottom: 10px;
}
.dev-accordion-panel summary {
  padding: 12px 0;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  list-style: none;
}
.dev-accordion-panel summary::-webkit-details-marker { display: none; }
.dev-accordion-panel summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 200ms;
}
.dev-accordion-panel[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.dev-accordion-panel[open] summary::before {
  transform: rotate(90deg);
}

/* ── Project Status pane v2 (UX win #4, 2026-05-12) ───────────────────── */
.ps-hero { display:flex; gap:14px; align-items:center; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; margin-bottom:14px; }
.ps-hero-art { font-size:38px; line-height:1; flex-shrink:0; width:54px; height:54px; display:flex; align-items:center; justify-content:center; background:var(--surface2); border-radius:10px; }
.ps-hero-body { flex:1; min-width:0; }
.ps-hero-title { font-size:20px; font-weight:800; letter-spacing:-0.3px; }
.ps-hero-logline { font-size:13px; color:var(--text-muted); margin-top:3px; line-height:1.4; }
.ps-hero-chips { margin-top:8px; display:flex; gap:6px; flex-wrap:wrap; }
.ps-hero-actions { flex-shrink:0; align-self:flex-start; }
.ps-chip { background:var(--surface2); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:2px 9px; font-size:11px; font-weight:700; }

.ps-block { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px 16px; margin-bottom:14px; }
.ps-block.ps-block-warn { border-left:3px solid var(--accent); background:rgba(232,131,58,0.06); }
.ps-block.ps-block-ok   { border-left:3px solid var(--green,#4caf7d); }
.ps-block.ps-block-info { border-left:3px solid var(--blue,#5b9cf6); background:rgba(91,156,246,0.06); }
.ps-block-h { font-size:11px; font-weight:800; letter-spacing:0.5px; text-transform:uppercase; color:var(--text); margin-bottom:6px; }
.ps-block-list { margin:0; padding-left:18px; font-size:13.5px; line-height:1.7; }
.ps-block-list a { color:var(--text); text-decoration:underline; text-decoration-style:dotted; }
.ps-block-list li { display:flex; align-items:center; gap:8px; }
.ps-block-list li a { flex:1; }
.ps-block-dismiss { background:none; border:0; color:var(--text-muted); cursor:pointer; font-size:18px; line-height:1; padding:0 4px; opacity:0.6; }
.ps-block-dismiss:hover { opacity:1; color:var(--text); }

.ps-rings { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; margin-bottom:14px; }
.ps-ring { display:flex; gap:10px; align-items:center; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:10px 12px; text-decoration:none; color:inherit; transition:background .12s; }
.ps-ring:hover { background:var(--surface2); }
.ps-ring-svg { flex-shrink:0; }
.ps-ring-body { min-width:0; }
.ps-ring-lbl { font-size:12px; font-weight:700; color:var(--text); }
.ps-ring-sub { font-size:11.5px; color:var(--text-muted); margin-top:2px; }

.ps-twocol { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
@media (max-width:900px) { .ps-twocol { grid-template-columns:1fr; } }
.ps-strip { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.ps-strip-h { font-size:11px; font-weight:800; letter-spacing:0.5px; text-transform:uppercase; color:var(--text-muted); margin-bottom:6px; }
.ps-strip-row { display:flex; gap:10px; align-items:baseline; padding:6px 0; font-size:13px; border-bottom:1px dashed var(--border); text-decoration:none; color:inherit; }
.ps-strip-row:last-child { border-bottom:0; }
.ps-strip-row:hover { background:var(--surface2); }
.ps-strip-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); flex-shrink:0; align-self:center; }
.ps-strip-dot-task      { background:var(--blue, #5b9cf6); }
.ps-strip-dot-softmoney { background:var(--green, #4caf7d); }
.ps-strip-dot-project   { background:var(--accent); }
.ps-strip-lbl { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }
.ps-strip-meta { font-size:11.5px; color:var(--text-muted); flex-shrink:0; }
.ps-strip-empty { font-size:12.5px; color:var(--text-muted); font-style:italic; padding:6px 0; }

.ps-people { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px 14px; margin-bottom:14px; }
.ps-people-h { font-size:11px; font-weight:800; letter-spacing:0.5px; text-transform:uppercase; color:var(--text-muted); margin-bottom:8px; }
.ps-people-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:10px; }
.ps-person { background:var(--surface2); border-radius:8px; padding:8px 10px; }
.ps-person-name { font-size:13px; font-weight:700; }
.ps-person-role { font-size:11.5px; color:var(--text-muted); margin-top:2px; }

.ps-detail { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:0; margin-top:8px; }
.ps-detail > summary { padding:10px 14px; cursor:pointer; font-size:12px; font-weight:800; letter-spacing:0.4px; text-transform:uppercase; color:var(--text-muted); list-style:none; }
.ps-detail > summary::-webkit-details-marker { display:none; }
.ps-detail > summary::before { content:'▸'; display:inline-block; margin-right:6px; transition:transform .15s; }
.ps-detail[open] > summary::before { transform:rotate(90deg); }
.ps-detail-grid { padding:0 14px 14px; display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:12px; }
