/* ── Prowler Chat ─────────────────────────────────────────────────────────────── */
.prowler-chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  color: #fff;
  border: none;
  border-radius: 32px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(20,150,255,0.4);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.prowler-chat-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(20,150,255,0.55); }
.prowler-chat-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.85); }

.prowler-chat-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1001;
  width: 420px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 100px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(20,150,255,0.15);
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.prowler-chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.prowler-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(90deg, rgba(20,150,255,0.08), rgba(106,91,255,0.05));
  border-radius: 16px 16px 0 0;
}
.prowler-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.prowler-chat-icon-btn {
  background: none;
  border: none;
  color: var(--muted, #9aa5ba);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.prowler-chat-icon-btn:hover { background: var(--border); color: var(--text); }

.prowler-chat-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.prowler-chat-scope-toggle {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.prowler-chat-scope-btn {
  background: none;
  border: none;
  color: var(--muted, #9aa5ba);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.prowler-chat-scope-btn.is-active {
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  color: #fff;
}
.prowler-chat-scope-label {
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prowler-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.prowler-msg { display: flex; flex-direction: column; max-width: 90%; }
.prowler-msg-user { align-self: flex-end; }
.prowler-msg-ai { align-self: flex-start; }

.prowler-msg-body {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.prowler-msg-user .prowler-msg-body {
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.prowler-msg-ai .prowler-msg-body {
  background: var(--panel-2, #1d2537);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.prowler-msg-body p { margin: 0 0 6px; }
.prowler-msg-body p:last-child { margin: 0; }
.prowler-msg-body ul { margin: 4px 0; padding-left: 18px; }
.prowler-msg-body li { margin: 2px 0; }
.prowler-msg-body h2, .prowler-msg-body h3, .prowler-msg-body h4 { margin: 8px 0 4px; font-size: 13px; }
.prowler-msg-body code { background: rgba(20,150,255,0.12); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.prowler-msg-body strong { font-weight: 700; }

.prowler-msg-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.prowler-action-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(46,213,113,0.15);
  color: #2ecc71;
  border: 1px solid rgba(46,213,113,0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prowler-thinking .prowler-msg-body { color: var(--muted, #9aa5ba); font-style: italic; }
.prowler-dots { display: inline-flex; gap: 3px; margin-right: 4px; vertical-align: middle; }
.prowler-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: prowler-bounce 1.2s infinite;
}
.prowler-dots span:nth-child(2) { animation-delay: 0.2s; }
.prowler-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes prowler-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.prowler-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  align-items: flex-end;
}
.prowler-chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  padding: 9px 12px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  max-height: 100px;
}
.prowler-chat-input:focus { outline: none; border-color: var(--accent); }
.prowler-chat-send-btn { flex-shrink: 0; height: 36px; white-space: nowrap; }

/* ─── Voice input (mic buttons) — shared base + two layout variants ────────── */
.mic-btn {
  flex-shrink: 0; border-radius: 10px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.mic-btn:hover { color: var(--text); border-color: var(--accent); }
.mic-btn.is-listening {
  color: #fff; background: var(--warn, #e0524d); border-color: var(--warn, #e0524d);
  animation: mic-pulse 1.4s ease-in-out infinite;
}
.mic-btn.is-unsupported { display: none; }
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 82, 77, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(224, 82, 77, 0); }
}
/* Inline, in a flex row next to Send (Prowler Chat's input bar) */
.prowler-chat-mic-btn { width: 36px; height: 36px; }
/* Overlaid in the bottom-right corner of a plain textarea, added automatically to
   every textarea in the app (see attachMicOverlay in app.js). Wrapping the textarea
   pulls it out from under any parent flex/stretch layout it relied on for its width
   (e.g. a flex-column label or field-row), so the wrap and the control inside it both
   have to re-assert full width explicitly instead of inheriting it implicitly. */
.mic-textarea-wrap { position: relative; display: block; width: 100%; flex: 1; min-width: 0; }
.mic-textarea-wrap textarea,
.mic-textarea-wrap .note-rich-input { width: 100%; box-sizing: border-box; }
.mic-btn-overlay {
  position: absolute; bottom: 6px; right: 6px; width: 26px; height: 26px; z-index: 2;
  opacity: 0.7;
}
.mic-btn-overlay:hover { opacity: 1; }

:root {
  --bg: #0e1420;
  --panel: #161d2c;
  --panel-2: #1d2537;
  --border: #2a3348;
  --text: #e7ebf3;
  --text-dim: #9aa5ba;
  --accent: #1496ff;
  --accent-2: #6a5bff;
  --good: #2ecc71;
  --warn: #f5a623;
  --bad: #ff5c5c;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3 { margin: 0; }

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px;
  background: linear-gradient(90deg, #020810 0%, #050f1f 30%, #081525 65%, #0c1c30 100%);
  border-bottom: 2px solid rgba(20,150,255,0.35);
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 24px rgba(0,0,0,0.6), 0 0 40px rgba(20,150,255,0.06);
}
.topbar::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, #1496ff 0%, #6a5bff 55%, transparent 100%);
  pointer-events: none;
}

/* ─── Prowl wordmark / brand ─────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 14px; }

.prowl-wordmark {
  display: flex; align-items: center; gap: 11px; flex-shrink: 0;
}
.prowl-paw-icon {
  width: 32px; height: 35px; filter: drop-shadow(0 0 6px rgba(20,150,255,0.45));
}
.prowl-brand-text { display: flex; flex-direction: column; line-height: 1; }
.prowl-label-dt {
  font-size: 11px; font-weight: 800; letter-spacing: 0.18em;
  color: #1496ff; text-transform: uppercase; margin-bottom: 2px;
}
.prowl-label-name {
  font-size: 20px; font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #a8ccff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}

.brand-sep {
  width: 1px; height: 28px; background: rgba(255,255,255,0.1); flex-shrink: 0; margin: 0 4px;
}
.brand-account-info { display: flex; flex-direction: column; min-width: 0; }
.subtitle { margin: 0; color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.account-stage-pill {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 2px 9px; border-radius: 10px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-pill {
  font-size: 11px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2);
  border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
}
.status-pill.ok { color: var(--good); border-color: var(--good); }
.status-pill.error { color: var(--bad); border-color: var(--bad); }
.account-select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 10px; font-size: 13px; max-width: 200px;
}
.account-select option.account-option-parent { color: var(--accent); font-weight: 700; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  border: none; border-radius: var(--radius); padding: 9px 16px; font-size: 13px;
  cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: linear-gradient(135deg, #1496ff, #6a5bff); color: white; }
.btn-secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-guide { background: linear-gradient(135deg, rgba(20,150,255,.16), rgba(34,211,168,.14)); color: var(--text); border: 1px solid rgba(34,211,168,.45); text-decoration: none; }
.btn-guide:hover { border-color: rgba(34,211,168,.8); }
.btn-small { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn:not(:disabled):hover { filter: brightness(1.1); }

/* ─── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: currentColor;
  border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; flex-shrink: 0;
}
.spinner-lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Research progress panel ────────────────────────────────────────────── */
.research-progress {
  background: var(--panel); border-bottom: 2px solid var(--accent);
  overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease;
  max-height: 300px; opacity: 1;
}
.research-progress.hidden { max-height: 0; opacity: 0; pointer-events: none; }
.rp-inner { padding: 10px 24px 12px; }
.rp-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rp-title-group { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.rp-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-bar-wrap { flex: 1; height: 4px; background: var(--panel-2); border-radius: 2px; min-width: 80px; }
.rp-bar { height: 100%; background: linear-gradient(90deg, #1496ff, #6a5bff); border-radius: 2px; transition: width 0.6s ease; }
.rp-close { background: none; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; padding: 2px 6px; flex-shrink: 0; }
.rp-contacts { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-contact {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s;
}
.rp-contact.pending { color: var(--text-dim); }
.rp-contact.searching { color: var(--accent); border-color: rgba(20,150,255,0.5); background: rgba(20,150,255,0.08); }
.rp-contact.done { color: var(--good); border-color: rgba(46,204,113,0.4); background: rgba(46,204,113,0.07); }
.rp-contact.error { color: var(--warn); border-color: rgba(245,166,35,0.4); background: rgba(245,166,35,0.07); }

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; align-items: flex-start; gap: 2px; padding: 12px 24px 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.tab-btn {
  background: none; border: none; color: var(--text-dim); padding: 10px 16px;
  cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-btn.active { color: var(--text); border-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text); }

/* AI Usage lives in the topbar (not the tab strip) but reuses .tab-btn for its
   switchTab() wiring — override the transparent tab look with the standard
   topbar-button chrome so it matches Settings/Teams/Partners visually. */
.topbar-actions .tab-btn {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 12px; font-size: 13px;
}
.topbar-actions .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.app-content-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; min-height: calc(100vh - 120px); }
.published-pages-sidebar {
  position: sticky; top: 64px; height: calc(100vh - 108px); min-height: 300px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border-right: 1px solid var(--border);
}
.published-page-nav { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
main { min-width: 0; padding: 20px 24px 60px; max-width: 1400px; width: 100%; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.panel-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 8px; margin-left: 8px; font-size: 13px;
}

/* ─── View toggle (Visual / Table) ──────────────────────────────────────── */
.view-toggle {
  display: flex; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden;
}
.vtoggle-btn {
  background: none; border: none; color: var(--text-dim); padding: 5px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.vtoggle-btn.active { background: var(--accent); color: white; }

/* ─── Table filters bar ──────────────────────────────────────────────────── */
.table-filters {
  display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap;
}
.filter-input {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 7px 10px; font-size: 13px; font-family: inherit;
  min-width: 200px;
}
.filter-input:focus { outline: none; border-color: var(--accent); }
.filter-select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 8px; font-size: 13px;
}

/* ─── Contact table view ─────────────────────────────────────────────────── */
.contact-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.contact-table th {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap;
}
.contact-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.contact-table-row { cursor: pointer; transition: background 0.1s; }
.contact-table-row:hover { background: rgba(20,150,255,0.05); }
.ct-name { font-weight: 600; }
.ct-role { color: var(--accent-2); font-weight: 500; }
.ct-level { color: var(--text-dim); }
.ct-manager { color: var(--text-dim); }
.ct-email a { color: var(--accent); text-decoration: none; font-size: 12px; }
.ct-email a:hover { text-decoration: underline; }
.ct-findings { font-weight: 700; }

/* ─── Findings ───────────────────────────────────────────────────────────── */
.findings-list { display: flex; flex-direction: column; gap: 14px; }
.finding-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; transition: border-color 0.15s;
}
.finding-card:hover { border-color: #3a4560; }
.finding-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.finding-headline { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.finding-person {
  background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px;
  padding: 0; text-decoration: underline;
}
.fit-badge {
  flex-shrink: 0; font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px;
}
.fit-5 { background: rgba(46,204,113,0.18); color: var(--good); }
.fit-4 { background: rgba(46,204,113,0.12); color: var(--good); }
.fit-3 { background: rgba(245,166,35,0.18); color: var(--warn); }
.fit-2, .fit-1 { background: rgba(255,92,92,0.15); color: var(--bad); }
.finding-summary { color: var(--text); font-size: 14px; margin: 10px 0; line-height: 1.55; }
.finding-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.finding-meta a { color: var(--accent); }
.tag { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; }
.dt-solution { color: var(--accent-2); font-weight: 600; }
.rationale { font-size: 13px; color: var(--text-dim); font-style: italic; margin-bottom: 12px; }
.still-open-badge {
  font-size: 11px; color: var(--text-dim); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px;
}
.finding-actions { display: flex; gap: 8px; align-items: center; }
.status-select {
  background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 8px; font-size: 12px;
}

/* ─── Contact Challenges tab ─────────────────────────────────────────────── */
.cc-challenge-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.cc-challenge-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px; transition: border-color 0.15s;
}
.cc-challenge-card:hover { border-color: #3a4560; }
.cc-challenge-card.is-dismissed { opacity: 0.55; }
.cc-challenge-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cc-challenge-text { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.cc-challenge-badge {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #6a5bff; background: rgba(106,91,255,0.14); border-radius: 999px; padding: 2px 8px;
}
.cc-solution-box {
  background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 10px 14px; margin-top: 10px;
}
.cc-solution-label { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.cc-solution-text { font-size: 13px; color: var(--text); line-height: 1.55; }
.cc-challenge-actions { display: flex; gap: 14px; margin-top: 10px; }
.empty-state { color: var(--text-dim); padding: 48px; text-align: center; font-size: 14px; }

/* ─── Visual Org Chart ───────────────────────────────────────────────────── */
.org-chart-scroll {
  position: relative;
  overflow: auto;
  height: min(72vh, 680px);
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  cursor: grab;
}
.org-chart-scroll.grabbing { cursor: grabbing; user-select: none; }

/* Pan/zoom scaffolding shared by the contacts and users org charts.
   The outer box's size is set in JS to the inner's natural size × scale, so
   overflow:auto on .org-chart-scroll/.user-org-chart always has the right
   scrollable range — transform:scale alone doesn't affect layout size. */
.orgchart-zoom-outer { position: relative; }
.orgchart-zoom-inner {
  position: absolute; top: 0; left: 0;
  transform-origin: top left;
  padding: 40px 60px 60px;
  display: inline-block;
}
.orgchart-controls {
  position: sticky; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 8px; margin: 10px; z-index: 5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  width: fit-content;
}
.orgchart-ctrl-btn {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; width: 24px; height: 24px; line-height: 1; cursor: pointer;
  font-size: 13px; font-weight: 700;
}
.orgchart-ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.orgchart-ctrl-btn[data-oc-fit], .orgchart-ctrl-btn[data-oc-reset] { width: auto; padding: 0 8px; font-size: 11px; font-weight: 600; }
.orgchart-zoom-label { font-size: 11px; color: var(--text-dim); min-width: 34px; text-align: center; }
.orgchart-hint { font-size: 10px; color: var(--text-dim); margin-left: 6px; white-space: nowrap; }
@media (max-width: 700px) { .orgchart-hint { display: none; } }
/* Root wrapper */
.org-tree {
  list-style: none; padding: 0; margin: 0;
  display: flex; justify-content: center;
}
/* Children group under a node */
.org-tree ul {
  list-style: none; padding-top: 28px; margin: 0;
  position: relative;
  display: flex; flex-direction: row; justify-content: center;
}
/* Vertical line from parent down to children horizontal bar */
.org-tree ul::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  border-left: 1px solid var(--border);
  height: 28px;
}
/* Each child node's li */
.org-tree li {
  position: relative;
  padding: 0 10px;
  display: flex; flex-direction: column; align-items: center;
}
/* Horizontal connector: left half of this li's top */
.org-tree li::before {
  content: '';
  position: absolute;
  top: 0; right: 50%;
  border-top: 1px solid var(--border);
  width: 50%;
}
/* Horizontal connector: right half */
.org-tree li::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  border-top: 1px solid var(--border);
  width: 50%;
}
/* Remove outer half-bars for edge siblings */
.org-tree li:first-child::before { display: none; }
.org-tree li:last-child::after { display: none; }
/* Root: no horizontal bars and no top connector */
.org-tree > li::before,
.org-tree > li::after { display: none; }

/* Org card node */
.org-card {
  margin-top: 28px; /* gap for vertical line from horizontal bar to card */
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 150px; max-width: 190px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
/* Vertical line from horizontal bar down to this card */
.org-card::before {
  content: '';
  position: absolute;
  top: -28px; left: 50%; transform: translateX(-50%);
  border-left: 1px solid var(--border);
  height: 28px;
}
/* Root card: no top connector */
.org-tree > li > .org-card::before { display: none; }
/* Root card: no margin-top */
.org-tree > li > .org-card { margin-top: 0; }

.org-card:hover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(20,150,255,0.15); }
.org-card.has-findings { border-top: 3px solid var(--accent); }

/* Partner logo in org chart — rectangular, not circular */
.oc-partner-logo {
  width: 72px; height: 36px; object-fit: contain;
  display: block; margin: 0 auto 8px;
  border-radius: 4px;
  background: #fff;
  padding: 2px 4px;
}

/* Partner sections in org chart (one tree per linked partner, in the Partners tab) */
.org-tree-partner { margin-top: 32px; }
.org-tree-partner:first-child { margin-top: 0; }
.subsidiary-chart-note {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border: 1px solid rgba(20, 150, 255, 0.22);
  border-radius: 8px;
  background: rgba(20, 150, 255, 0.06);
  color: var(--text-dim);
  font-size: 12px;
}
.org-card-subsidiary {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, #161d2c 0%, rgba(20, 150, 255, 0.06) 100%);
}
.org-card-subsidiary .btn { margin-top: 8px; }
.org-card-partner {
  border-left: 3px solid var(--accent-2);
  background: linear-gradient(135deg, #161d2c 0%, rgba(106, 91, 255, 0.06) 100%);
  cursor: pointer;
}
.org-card-partner:hover { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(255,170,0,0.15); }
.org-card-partner-contact {
  border-left: 3px solid rgba(106, 91, 255, 0.5);
  cursor: pointer;
  position: relative;
}
.org-card-partner-contact:hover { border-color: var(--accent-2); }
.oc-partner-fallback {
  background: linear-gradient(135deg, #6a5bff, #402f99);
}

.ptr-link-contact-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; font-size: 11.5px;
}
.ptr-unlink-contact-btn {
  position: absolute; top: 6px; right: 6px;
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid transparent; background: none; color: var(--text-dim);
  cursor: pointer;
}
.ptr-unlink-contact-btn:hover { color: var(--bad); background: rgba(255,92,92,0.12); border-color: rgba(255,92,92,0.3); }
.org-card-partner-empty {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 12px; color: var(--text-dim);
  border: 1px dashed var(--border); border-radius: 8px;
  background: var(--panel);
}

/* Level-based left accent colors */
.org-card[data-level="0"] { border-left: 3px solid var(--accent); }
.org-card[data-level="1"] { border-left: 3px solid var(--accent-2); }
.org-card[data-level="2"] { border-left: 3px solid var(--good); }

.oc-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 8px;
  border: 2px solid var(--border);
}
.oc-avatar-fallback {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -0.5px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
}
.oc-name {
  font-weight: 700; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-title {
  font-size: 11px; color: var(--text-dim); margin: 2px 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-role {
  font-size: 10px; color: var(--accent-2); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}
.oc-meta { display: flex; justify-content: center; gap: 6px; align-items: center; margin-top: 6px; }
.oc-findings { font-size: 10px; color: var(--text-dim); }
.oc-li-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  title: 'LinkedIn';
}
.fit-badge.small { font-size: 10px; padding: 2px 6px; }

/* ─── Sent log ───────────────────────────────────────────────────────────── */
.sent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sent-table th, .sent-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.sent-table th { color: var(--text-dim); font-weight: 600; font-size: 12px; }

/* ─── Settings ───────────────────────────────────────────────────────────── */
.settings-section {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px;
}
.settings-tabs { display: flex; gap: 6px; margin: 18px 0 14px; padding: 0 0 8px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.settings-tab { flex: 0 0 auto; padding: 9px 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.settings-tab:hover { background: var(--panel); color: var(--text); }
.settings-tab.is-active { border-color: var(--border); background: var(--panel); color: var(--accent); }
.settings-panel[hidden] { display: none; }
.settings-panel.is-active { animation: settings-panel-in .15s ease-out; }
@keyframes settings-panel-in { from { opacity: .7; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.settings-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.settings-test-row { display: flex; align-items: center; gap: 10px; }
.settings-fields { display: flex; flex-direction: column; gap: 12px; }
.settings-field { display: flex; flex-direction: column; gap: 4px; }
.settings-field label { font-size: 13px; font-weight: 600; }
.settings-field .field-help { font-size: 12px; color: var(--text-dim); }
.settings-field .field-input-row { display: flex; gap: 8px; align-items: center; }
.settings-field input {
  flex: 1; background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit;
}
.settings-field .source-tag {
  font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
}
.settings-field .source-tag.ui { color: var(--good); border-color: var(--good); }
.settings-field .source-tag.user { color: var(--good); border-color: var(--good); }
.settings-field .source-tag.env { color: var(--accent); border-color: var(--accent); }
.test-result { font-size: 12px; }
.ai-prompt-browser { display: grid; grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); gap: 18px; }
.ai-prompt-list { max-height: 68vh; overflow-y: auto; padding-right: 6px; }
.ai-prompt-list section + section { margin-top: 14px; }
.ai-prompt-list h4 { margin: 8px 7px 5px; color: var(--text-dim); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.ai-prompt-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-dim); text-align: left; font: inherit; font-size: 11px; cursor: pointer; }
.ai-prompt-item:hover { background: var(--panel-2); color: var(--text); }
.ai-prompt-item.is-active { border-color: var(--border); background: var(--panel-2); color: var(--accent); }
.ai-prompt-item i { color: var(--good); font-size: 9px; font-style: normal; font-weight: 700; }
.ai-prompt-editor { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); }
.ai-prompt-editor-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.ai-prompt-editor-heading h4 { margin: 0 0 4px; font-size: 15px; }
.ai-prompt-editor-heading p { margin: 0; }
.ai-prompt-custom-badge, .ai-prompt-default-badge { flex: 0 0 auto; padding: 4px 8px; border: 1px solid var(--border); border-radius: 20px; color: var(--text-dim); font-size: 10px; }
.ai-prompt-custom-badge { color: var(--good); border-color: var(--good); }
.ai-prompt-editor > label { display: block; margin: 12px 0 6px; font-size: 11px; font-weight: 700; }
.ai-prompt-editor textarea { box-sizing: border-box; width: 100%; resize: vertical; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; font-size: 12px; line-height: 1.55; }
.ai-prompt-editor .ai-prompt-base { color: var(--text-dim); }
.ai-prompt-editor .field-help { display: block; margin-top: 5px; }
.ai-prompt-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-prompt-actions > div { display: flex; gap: 7px; flex-wrap: wrap; }
.linkedin-profile-summary { display: flex; align-items: center; gap: 12px; min-height: 42px; margin: 12px 0; }
.linkedin-profile-summary div { display: flex; flex-direction: column; gap: 3px; }
.linkedin-profile-summary span { color: var(--text-dim); font-size: 12px; }
.linkedin-profile-picture { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.linkedin-capabilities { padding: 13px 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 12px; line-height: 1.55; }
.linkedin-capabilities p { margin: 7px 0; color: var(--text-dim); }
.linkedin-capabilities a { color: var(--accent); }

/* ─── Boolean toggle (settings) ─────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-wrap { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.toggle-checkbox { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--border); transition: background 0.2s;
}
.toggle-slider::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform 0.2s;
}
.toggle-checkbox:checked + .toggle-slider { background: var(--accent); }
.toggle-checkbox:checked + .toggle-slider::after { transform: translateX(16px); }
.toggle-label-text { font-size: 13px; font-weight: 600; }
.test-result.ok { color: var(--good); }
.test-result.error { color: var(--bad); }
@media (max-width: 760px) {
  .ai-prompt-browser { grid-template-columns: 1fr; }
  .ai-prompt-list { display: flex; gap: 10px; max-height: 200px; overflow: auto; padding: 0 0 6px; }
  .ai-prompt-list section { flex: 0 0 200px; }
  .ai-prompt-list section + section { margin-top: 0; }
  .ai-prompt-editor { padding: 12px; }
}

/* ─── Drawer & Modal ─────────────────────────────────────────────────────── */
.drawer, .modal { position: fixed; inset: 0; display: none; z-index: 50; }
.drawer.open, .modal.open { display: block; }
.drawer-backdrop, .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(520px, 95vw);
  background: var(--panel); border-left: 1px solid var(--border); padding: 24px;
  overflow-y: auto;
}

/* ── Contact drawer: large centered card ── */
#contactDrawer .drawer-panel {
  position: absolute;
  right: auto; bottom: auto;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(1080px, 94vw);
  height: min(88vh, 860px);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}
/* The content div must fill the panel so height:100% in children resolves correctly */
#contactDrawer #contactDrawerContent {
  height: 100%;
}

/* ── Two-column contact card layout ── */
.contact-card-layout {
  display: flex;
  height: 100%;
}

/* ── Left sidebar ── */
.cc-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--panel-2);
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.cc-photo-wrap {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 4px;
}
.cc-photo {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; display: block;
  border: 3px solid var(--border);
}
.cc-photo-fallback {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -1px;
  display: flex; align-items: center; justify-content: center;
}
.cc-photo-edit-btn {
  position: absolute; bottom: 3px; right: 3px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--panel-2);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.15s;
}
.cc-photo-remove-btn {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(220,50,50,0.85); border: 2px solid var(--panel-2);
  color: #fff; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.15s;
}
.cc-photo-wrap:hover .cc-photo-edit-btn,
.cc-photo-wrap:hover .cc-photo-remove-btn { opacity: 1; }

.cc-name {
  text-align: center;
  font-size: 17px; font-weight: 700; line-height: 1.2;
  margin: 0;
}
.cc-title-line {
  text-align: center;
  font-size: 12px; color: var(--text-dim); line-height: 1.4;
  margin: 0;
}
.cc-company {
  text-align: center;
  font-size: 12px; color: var(--accent); font-weight: 600;
}
.cc-divider {
  border: none; border-top: 1px solid var(--border); margin: 2px 0;
}
.cc-detail-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; line-height: 1.4;
  color: var(--text-dim);
}
.cc-detail-row a { color: var(--accent); text-decoration: none; }
.cc-detail-row a:hover { text-decoration: underline; }
.cc-detail-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-dim); min-width: 48px;
  padding-top: 1px;
}
.cc-detail-value { color: var(--text); font-size: 12px; word-break: break-word; }
.cc-status-row {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.cc-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-dim);
  background: var(--panel); white-space: nowrap;
}
.cc-badge.enriched { border-color: var(--good); color: var(--good); }
.cc-badge.has-persona { border-color: var(--accent-2); color: var(--accent-2); }
.cc-badge.has-findings { border-color: var(--accent); color: var(--accent); }
.cc-actions {
  display: flex; flex-direction: column; gap: 6px; margin-top: 4px;
}
.cc-actions .btn { width: 100%; justify-content: center; font-size: 12px; }
.cc-enrich-status {
  font-size: 11px; text-align: center; min-height: 16px;
  color: var(--text-dim);
}
.cc-enrich-status.ok { color: var(--good); }
.cc-enrich-status.error { color: var(--bad); }
.cc-delete-btn {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Right panel with tabs ── */
.cc-main {
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.cc-close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.1s, background 0.1s;
}
.cc-close-btn:hover { color: var(--text); background: var(--panel-2); }
.cc-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  padding: 0 20px; flex-shrink: 0;
}
.cc-tab-btn {
  padding: 14px 16px 13px;
  border: none; background: none;
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color 0.15s;
}
.cc-tab-btn:hover { color: var(--text); }
.cc-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.cc-tab-pane {
  display: none;
  overflow-y: auto; padding: 24px;
}
.cc-tab-pane.active {
  display: block;
  flex: 1;
  min-height: 0; /* lets the flex item shrink below content height so overflow-y: auto kicks in */
}

/* pane-specific */
.cc-bio-box {
  background: var(--panel-2); border-radius: 8px; padding: 14px 16px;
  font-size: 13px; line-height: 1.6; color: var(--text);
  margin-bottom: 16px;
}
.cc-activity-box {
  background: var(--panel-2); border-radius: 8px; padding: 14px 16px;
  font-size: 13px; line-height: 1.6; margin-bottom: 16px;
}
.cc-activity-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--accent); margin-bottom: 6px;
}
.cc-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin: 0 0 10px;
}
.cc-findings-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}

.modal-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(600px, 95vw); max-height: 92vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.modal-panel.modal-wide { width: min(680px, 97vw); }
.drawer-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-dim); font-size: 22px; cursor: pointer; line-height: 1;
}
.drawer h2, .drawer h3 { margin-bottom: 4px; }

/* ─── Contact drawer fields ──────────────────────────────────────────────── */
.form-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.field-row { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.field-row label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.field-row input, .field-row textarea, .field-row select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit;
}
.field-row textarea { resize: vertical; }
.field-row input:focus, .field-row textarea:focus, .field-row select:focus {
  outline: none; border-color: var(--accent);
}
.reports-line { font-size: 12px; color: var(--text-dim); margin: 4px 0 10px; line-height: 1.6; }

/* AI Enrich row */
.enrich-row {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 8px;
  padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  flex-wrap: wrap;
}
.enrich-status { font-size: 12px; color: var(--text-dim); flex: 1; min-width: 120px; }
.enrich-status.ok { color: var(--good); }
.enrich-status.error { color: var(--bad); }
.enriched-tag {
  font-size: 11px; color: var(--good); background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.25); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.bio-box {
  background: var(--panel-2); border-left: 3px solid var(--accent-2);
  border-radius: 0 6px 6px 0; padding: 10px 12px;
  font-size: 13px; color: var(--text); line-height: 1.6; margin: 6px 0 8px; font-style: italic;
}
.recent-activity-box {
  font-size: 12px; color: var(--text-dim); padding: 6px 0 8px; line-height: 1.5;
}
.linkedin-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-size: 12px; text-decoration: none;
}
.linkedin-link:hover { text-decoration: underline; }

/* ─── Dynatrace Persona section ──────────────────────────────────────────── */
.persona-section {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin: 18px 0;
}
.persona-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px;
}
.persona-header h3 { font-size: 13px; }
.persona-header-right { display: flex; align-items: center; gap: 8px; }
.persona-summary {
  font-size: 13px; line-height: 1.6; color: var(--text); margin-bottom: 12px;
  border-left: 3px solid var(--accent-2); padding-left: 10px; font-style: italic;
}
.persona-block { margin-bottom: 12px; }
.persona-block:last-child { margin-bottom: 0; }
.persona-block-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 5px;
}
.persona-list {
  margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; list-style: disc;
}
.persona-list li { font-size: 13px; line-height: 1.5; }
.persona-detail { font-size: 13px; line-height: 1.5; margin: 0; color: var(--text); }
.persona-sensitivity .persona-block-label { color: var(--warn); }
.persona-sensitivity .persona-detail { color: var(--text-dim); font-style: italic; }
.persona-cta { color: var(--text-dim); font-size: 13px; font-style: italic; }
#personaStatus { font-size: 12px; margin-top: 6px; display: block; }
#personaStatus.ok { color: var(--good); }
#personaStatus.error { color: var(--bad); }

/* ─── Email modal ────────────────────────────────────────────────────────── */
#emailForm label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
#emailForm input, #emailForm textarea {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 9px 10px; font-size: 13px; font-family: inherit;
}
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.hint { font-size: 12px; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }

/* AI email refine panel */
.email-refine {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(20,150,255,0.05); border: 1px solid rgba(20,150,255,0.2);
  border-radius: 8px;
}
.email-refine-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--accent); margin-bottom: 8px;
}
.refine-controls { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.refine-controls select {
  flex: 1; min-width: 200px; background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 7px 8px; font-size: 13px;
}
.refine-custom-input {
  width: 100%; margin-top: 6px; background: var(--panel); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 8px 10px; font-size: 13px;
  font-family: inherit; resize: vertical;
}
.refine-custom-input:focus { outline: none; border-color: var(--accent); }
.refine-status { font-size: 12px; display: block; margin-top: 6px; }
.refine-status.ok { color: var(--good); }
.refine-status.error { color: var(--bad); }

/* ─── Dashboard ──────────────────────────────────────────────────────────── */
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.stat-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; margin-bottom: 24px;
}
.stat-tile {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 18px; text-align: center; border-top: 3px solid var(--accent);
}
.stat-tile:nth-child(2) { border-top-color: var(--accent-2); }
.stat-tile:nth-child(3) { border-top-color: var(--good); }
.stat-tile:nth-child(4) { border-top-color: var(--warn); }
.stat-tile:nth-child(5) { border-top-color: #c678dd; }
.stat-value { font-size: 34px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-dim); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
}
.dash-card h3 {
  font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 18px;
}
.funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.funnel-label { width: 75px; font-size: 12px; color: var(--text-dim); text-transform: capitalize; flex-shrink: 0; }
.funnel-bar-wrap { flex: 1; height: 22px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.funnel-bar { height: 100%; border-radius: 4px; transition: width 1s ease; min-width: 3px; }
.funnel-bar.new { background: var(--accent); }
.funnel-bar.reviewed { background: var(--accent-2); }
.funnel-bar.sent { background: var(--good); }
.funnel-bar.dismissed { background: var(--border); }
.funnel-count { font-size: 13px; font-weight: 700; min-width: 30px; text-align: right; }
.cat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat-label { font-size: 11px; color: var(--text-dim); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cat-bar-wrap { width: 90px; height: 14px; background: var(--panel-2); border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.cat-bar { height: 100%; background: linear-gradient(90deg, #1496ff, #6a5bff); border-radius: 3px; transition: width 1s ease; }
.cat-count { font-size: 11px; font-weight: 700; min-width: 22px; text-align: right; flex-shrink: 0; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table tr { border-bottom: 1px solid var(--border); }
.mini-table tr:last-child { border-bottom: none; }
.mini-table td { padding: 8px 4px; font-size: 12px; vertical-align: middle; }
.mini-table td:first-child { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-table .dim { color: var(--text-dim); }
.run-status { font-size: 10px; padding: 2px 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.run-status.complete { color: var(--good); border-color: rgba(46,204,113,0.4); }
.run-status.running { color: var(--accent); border-color: rgba(20,150,255,0.4); }
.run-status.error { color: var(--bad); border-color: rgba(255,92,92,0.4); }
.run-status.complete_with_errors { color: var(--warn); border-color: rgba(245,166,35,0.4); }

/* ─── Discover contacts modal ────────────────────────────────────────────── */
.discover-loading { text-align: center; padding: 40px 20px; }
.discover-loading .spinner-lg { margin: 0 auto 16px; display: block; }
.discover-loading p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.discover-suggestions { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.suggestion-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.suggestion-card.added { opacity: 0.5; }
.suggestion-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.suggestion-title { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }
.suggestion-rationale { font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.suggestion-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.confidence-dots { display: flex; gap: 4px; }
.confidence-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.confidence-dot.filled { background: var(--accent); }
.confidence-label { font-size: 11px; color: var(--text-dim); }
.suggestion-source { font-size: 11px; color: var(--text-dim); }
.suggestion-actions { display: flex; gap: 8px; align-items: center; }
.suggestion-added-label { font-size: 12px; color: var(--good); display: flex; align-items: center; gap: 4px; }

/* ─── Danger button ──────────────────────────────────────────────────────────── */
.btn-danger {
  background: rgba(255,92,92,0.12); color: var(--bad); border: 1px solid rgba(255,92,92,0.3);
  border-radius: var(--radius); padding: 9px 16px; font-size: 13px; cursor: pointer;
  font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-danger:hover { background: rgba(255,92,92,0.22); }

/* ─── Research nudge banners ─────────────────────────────────────────────────── */
.research-nudge {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: rgba(20,150,255,0.06); border: 1px solid rgba(20,150,255,0.2);
  border-radius: var(--radius); margin-bottom: 14px; flex-wrap: wrap;
}
.nudge-icon { font-size: 18px; flex-shrink: 0; }
.nudge-text { flex: 1; min-width: 0; font-size: 13px; }
.nudge-text strong { color: var(--accent); }
.nudge-text p { margin: 2px 0 0; font-size: 12px; color: var(--text-dim); }

/* ─── Contact quality dots ───────────────────────────────────────────────────── */
.quality-row { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 6px; }
.quality-dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15); background: var(--panel);
  transition: background 0.15s;
}
.quality-dot.q-research { background: var(--accent); border-color: var(--accent); }
.quality-dot.q-enrich   { background: var(--accent-2); border-color: var(--accent-2); }
.quality-dot.q-persona  { background: var(--good); border-color: var(--good); }

/* ─── Contact role badge + overdue indicator ─────────────────────────────────── */
.oc-role-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 10px; margin: 3px auto 4px;
  display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(20, 150, 255, 0.15);
  color: var(--accent);
}
.oc-role-badge.oc-role-champion       { background: rgba(46, 204, 113, 0.18); color:var(--good); }
.oc-role-badge.oc-role-economic-buyer { background: rgba(106, 91, 255, 0.18); color:var(--accent-2); }
.oc-role-badge.oc-role-blocker        { background: rgba(255, 92, 92, 0.18); color:#e05; }
.oc-role-badge.oc-role-sdr-contact    { background: rgba(20, 150, 255, 0.1); color:var(--text-dim); }
.oc-overdue { color: #f80; font-size: 12px; cursor: default; }

/* ─── Activity log in contact drawer ─────────────────────────────────────────── */
.activity-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item.activity-done { opacity: 0.6; }
.activity-type-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.activity-body { flex: 1; min-width: 0; }
.activity-header { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-bottom: 4px; }
.activity-type-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.activity-subject { font-size: 13px; font-weight: 600; }
.activity-date { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.activity-user { font-size: 11px; color: var(--text-dim); }
.activity-team-participants { margin: 2px 0 5px; color: var(--text-dim); font-size: 11px; }
.activity-notes { font-size: 12px; color: var(--text); white-space: pre-wrap; margin-bottom: 4px; }
.activity-followup { font-size: 11px; color: var(--text-dim); }
.activity-followup.overdue { color: #f80; font-weight: 600; }

.ev-team-contact-picker { min-width: 0; padding: 8px 10px 10px; border: 1px solid var(--border); border-radius: 8px; }
.ev-team-contact-picker legend { padding: 0 5px; color: var(--text-dim); font-size: 12px; }
.ev-team-contact-picker[hidden] { display: none; }
.ev-team-contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; max-height: 210px; overflow-y: auto; }
.ev-team-contact-option { display: flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 6px; border-radius: 5px; cursor: pointer; }
.ev-team-contact-option:hover { background: rgba(20,150,255,.07); }
.ev-team-contact-option input { margin: 2px 0 0; }
.ev-team-contact-option > span { display: flex; flex-direction: column; min-width: 0; }
.ev-team-contact-option strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.ev-team-contact-option small { overflow: hidden; color: var(--text-dim); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.ev-selected-contact { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; }

/* ─── Standby contacts section ───────────────────────────────────────────────── */
.standby-section {
  margin-top: 32px; border-top: 1px solid var(--border); padding-top: 12px;
}
.standby-toggle {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 13px; padding: 6px 0; display: flex; align-items: center; gap: 8px;
}
.standby-toggle:hover { color: var(--text); }
.standby-count-badge {
  font-size: 10px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 7px; color: var(--text-dim);
}
.standby-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px; margin-top: 12px;
}
.standby-card {
  background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 12px 14px; opacity: 0.75;
}
.standby-card:hover { opacity: 1; border-color: var(--accent-2); }
.standby-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.standby-title { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standby-actions { display: flex; gap: 6px; }

/* ─── Research health chart ──────────────────────────────────────────────────── */
.health-rows { display: flex; flex-direction: column; gap: 14px; }
.health-row { display: flex; align-items: center; gap: 12px; }
.health-label { width: 100px; font-size: 12px; color: var(--text-dim); flex-shrink: 0; }
.health-bar-wrap { flex: 1; height: 20px; background: var(--panel-2); border-radius: 4px; overflow: hidden; position: relative; }
.health-bar { height: 100%; border-radius: 4px; transition: width 1s ease; }
.health-bar.researched { background: linear-gradient(90deg, #1496ff, #0db4ff); }
.health-bar.enriched   { background: linear-gradient(90deg, #6a5bff, #a855f7); }
.health-bar.persona    { background: linear-gradient(90deg, #2ecc71, #22d3a3); }
.health-pct { font-size: 12px; font-weight: 700; min-width: 35px; text-align: right; }
.health-count { font-size: 11px; color: var(--text-dim); min-width: 55px; text-align: right; }
.health-action { font-size: 11px; color: var(--accent); text-decoration: underline; cursor: pointer; white-space: nowrap; }

/* ─── Token usage chart ──────────────────────────────────────────────────────── */
.token-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.token-tile {
  background: var(--panel-2); border-radius: 8px; padding: 14px 16px; text-align: center;
}
.token-tile-value { font-size: 22px; font-weight: 800; color: var(--text); }
.token-tile-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.token-cost { font-size: 11px; color: var(--text-dim); text-align: center; }
.token-runs { font-size: 12px; color: var(--text-dim); margin-top: 10px; text-align: center; }

/* ─── Account edit modal extras ─────────────────────────────────────────────── */
#accountEditContext {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 9px 10px; font-size: 13px;
  font-family: inherit; resize: vertical;
}
#accountEditContext:focus { outline: none; border-color: var(--accent); }

/* ─── Discover step 1 ───────────────────────────────────────────────────────── */
#discoverStep1 label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }

/* ─── Suggestion standby button ────────────────────────────────────────────── */
.btn-standby { background: rgba(106,91,255,0.12); color: var(--accent-2); border: 1px solid rgba(106,91,255,0.3);
  border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-standby:hover { background: rgba(106,91,255,0.2); }

/* ─── General hover polish ──────────────────────────────────────────────────── */
.stat-tile { transition: box-shadow 0.2s, transform 0.15s; }
.stat-tile:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.25); transform: translateY(-2px); }
.dash-card { transition: box-shadow 0.2s; }
.dash-card:hover { box-shadow: 0 2px 14px rgba(0,0,0,0.18); }
.org-card { transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s; }
.org-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.finding-card { transition: box-shadow 0.15s, transform 0.12s; }
.finding-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* ─── Contact drawer header with photo ─────────────────────────────────────── */
.drawer-header-row { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.drawer-header-info { flex: 1; min-width: 0; }
.drawer-header-info h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.2; }
.drawer-subtitle { color: var(--text-dim); margin: 0 0 6px; font-size: 13px; }

.contact-photo-wrap {
  position: relative; flex-shrink: 0; width: 72px; height: 72px;
}
.contact-photo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); display: block;
}
.contact-photo-edit-btn {
  position: absolute; bottom: 1px; right: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.15s;
}
.contact-photo-wrap:hover .contact-photo-edit-btn { opacity: 1; }
.contact-photo-remove-btn {
  position: absolute; top: 1px; right: 1px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(220,50,50,0.85); border: 2px solid var(--bg);
  color: #fff; font-size: 13px; line-height: 1; display: flex;
  align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.15s;
}
.contact-photo-wrap:hover .contact-photo-remove-btn { opacity: 1; }
.contact-photo-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  width: 72px; height: 72px; border-radius: 50%;
  color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
}

/* ─── LinkedIn profile button ───────────────────────────────────────────────── */
.linkedin-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0a66c2; color: #fff; text-decoration: none;
  border-radius: 7px; padding: 6px 12px; font-size: 12px; font-weight: 600;
  margin-top: 8px; transition: background 0.15s, transform 0.12s;
}
.linkedin-btn:hover { background: #004182; transform: translateY(-1px); }
.linkedin-btn svg { flex-shrink: 0; }

/* ─── Tech Stack tab ─────────────────────────────────────────────────────────── */
.ts-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 800px) { .ts-layout { grid-template-columns: 1fr; } }

.ts-nav {
  position: sticky;
  top: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 0;
  overflow: hidden;
}
.ts-nav-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-dim); padding: 6px 14px 4px;
}
.ts-nav-label:not(:first-child) { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.ts-nav-list { list-style: none; margin: 0; padding: 0; }
.ts-nav-link {
  display: block; padding: 5px 14px;
  font-size: 12px; color: var(--text-dim); text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ts-nav-link:hover { color: var(--text); }
.ts-nav-link.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; background: rgba(98,179,255,0.04); }

.ts-main { min-width: 0; }
.ts-cat-section { margin-bottom: 4px; scroll-margin-top: 80px; }
.ts-subsidiary-stacks {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.ts-subsidiary-stacks h3 { margin: 0 0 6px; font-size: 15px; }
.ts-subsidiary-stack {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}
.ts-subsidiary-stack summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; }
.ts-subsidiary-category { display: grid; grid-template-columns: minmax(150px, 0.3fr) 1fr; gap: 12px; margin-top: 9px; font-size: 12px; }
.ts-subsidiary-category strong { color: var(--text-dim); }
@media (max-width: 600px) { .ts-subsidiary-category { grid-template-columns: 1fr; gap: 3px; } }

/* ts-grid removed — tech stack is now a single full-width column */
.ts-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 0; align-items: start; }
@media (max-width: 760px) { .ts-context-grid { grid-template-columns: 1fr; } }

/* ─── Account logo overlay (fixed bottom-left) ───────────────────────────────── */
.account-logo-overlay {
  width: calc(100% - 32px); max-height: 110px; margin: auto 16px 18px;
  object-fit: contain; flex: 0 0 auto; display: none;
  opacity: 0.85; border-radius: 8px;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}
.account-logo-overlay.visible { display: block; }
.brand-sep { display: none; } /* kept for compat */

.logo-upload-area {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border: 1px dashed var(--border); border-radius: 10px;
  background: var(--panel-2); margin-top: 4px;
}
.logo-upload-preview {
  width: 54px; height: 54px; flex-shrink: 0; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--text-dim); overflow: hidden;
}
.logo-upload-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ─── Tool pill editing ──────────────────────────────────────────────────────── */
.ts-categories .ts-pill { cursor: pointer !important; transition: border-color 0.12s, color 0.12s, opacity 0.12s; }
.ts-categories .ts-pill:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.ts-pill.tool-conf-low { opacity: 0.5; border-style: dashed; }

.ts-add-tool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px dashed var(--border); background: none;
  color: var(--text-dim); font-size: 14px; cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  flex-shrink: 0;
}
.ts-add-tool-btn:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }

.ts-cat-add-row { margin-top: 12px; }
.ts-add-cat-btn {
  font-size: 12px; color: var(--text-dim); background: none; border: none;
  cursor: pointer; padding: 0; display: flex; align-items: center; gap: 5px;
  transition: color 0.12s;
}
.ts-add-cat-btn:hover { color: var(--accent); }

.confidence-btn-group { display: flex; gap: 8px; margin-top: 6px; }
.conf-btn {
  flex: 1; padding: 7px 0; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2);
  color: var(--text-dim); cursor: pointer; text-align: center; transition: all 0.12s;
}
.conf-btn:hover:not([class*="active"]) { border-color: var(--text-dim); color: var(--text); }
.conf-btn.active-high { background: rgba(62,206,150,0.15); border-color: var(--good); color: var(--good); }
.conf-btn.active-medium { background: rgba(255,200,80,0.12); border-color: #ffc850; color: #e8b84d; }
.conf-btn.active-low { background: rgba(224,72,72,0.1); border-color: var(--bad); color: var(--bad); }

.ts-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ts-section-header h3 { margin: 0; font-size: 15px; }
.ts-updated-at { font-size: 11px; color: var(--text-dim); margin-left: auto; }

.ts-empty { color: var(--text-dim); font-size: 13px; padding: 20px 0; }

.ts-cat-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.ts-cat-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.05em; min-width: 160px; padding-top: 5px; flex-shrink: 0; }
.ts-tools-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tool-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 12px;
  font-weight: 500; color: var(--text); transition: border-color 0.15s; }
.tool-tag.tool-has-map { cursor: default; }
.tool-badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.tool-badge-dot.displace { background: var(--bad); }
.tool-badge-dot.complement { background: var(--warn); }
.tool-badge-dot.expand { background: var(--good); }
.tool-badge-displace { border-color: rgba(224,72,72,0.4); }
.tool-badge-complement { border-color: rgba(255,179,77,0.4); }
.tool-badge-expand { border-color: rgba(100,210,140,0.4); }

.ts-sec-business, .ts-sec-tools { scroll-margin-top: 80px; }
#tsDtValueMap, #tsJobSignals, #tsNotes { scroll-margin-top: 80px; }
.ts-job-signals { margin-top: 20px; }
.ts-job-signals h4 { font-size: 13px; margin-bottom: 8px; }
.ts-signal-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 12px; }
.ts-signal-role { font-weight: 600; min-width: 160px; flex-shrink: 0; color: var(--text); }
.ts-signal-text { flex: 1; color: var(--text-dim); }
.ts-signal-conf { border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.conf-high { background: rgba(100,210,140,0.12); color: var(--good); }
.conf-medium { background: rgba(255,179,77,0.12); color: var(--warn); }
.conf-low { background: rgba(224,72,72,0.1); color: var(--bad); }

.ts-notes-text { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.ts-context-col {}
.ts-context-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.ts-context-card h3 { margin: 0 0 12px; font-size: 14px; color: var(--text); }

.bc-section { margin-top: 12px; }
.bc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); margin-bottom: 5px; }
.bc-list { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-dim); line-height: 1.7; }
.dtp-value-story { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 12px; font-style: italic; }

.dt-value-map { display: flex; flex-direction: column; gap: 12px; }
.dt-value-row { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; }
.dt-value-tool { min-width: 140px; flex-shrink: 0; padding-top: 2px; }
.dt-value-arrow { color: var(--accent); font-size: 18px; padding-top: 4px; }
.dt-value-opp { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.dt-value-sol { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ─── Research Guide Modal ───────────────────────────────────────────────────── */
.rg-context-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; border-top: 1px solid var(--border);
  padding: 8px 0; font-size: 12px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; text-align: left;
}
.rg-context-toggle:hover { color: var(--text); }
.rg-context-caret { font-size: 10px; }
.rg-context-body { padding: 10px 0 2px; display: flex; flex-direction: column; gap: 4px; }
.rg-context-row { font-size: 13px; line-height: 1.5; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.rg-context-label { font-size: 11px; font-weight: 700; text-transform: capitalize; color: var(--text-dim); white-space: nowrap; min-width: 52px; }

/* ─── Import modal ───────────────────────────────────────────────────────────── */
.import-preview { display: flex; flex-direction: column; gap: 16px; }
.import-section { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.import-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.import-section-header h3 { margin: 0; font-size: 14px; }
.import-count-badge { background: var(--accent); color: #fff; border-radius: 20px;
  padding: 1px 9px; font-size: 11px; font-weight: 700; min-width: 22px; text-align: center; }
.import-contacts-list { display: flex; flex-direction: column; gap: 8px; }
.import-contact-row { display: flex; }
.import-check-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.import-check-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); width: 15px; height: 15px; }
.import-check-label strong { font-size: 13px; display: block; }
.import-contact-sub { font-size: 11px; color: var(--text-dim); }
.import-contact-note { font-size: 11px; color: var(--text-dim); margin: 4px 0 0; line-height: 1.5; }
.import-tools-grid { display: flex; flex-direction: column; gap: 8px; }
.import-tool-cat { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.import-tool-cat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-dim); min-width: 100px; flex-shrink: 0; }

.import-mode-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.import-mode-tab {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.import-mode-tab:hover { color: var(--text); }
.import-mode-tab.active { color: var(--accent); border-color: var(--accent); background: rgba(20,150,255,0.08); }

.import-image-dropzone {
  position: relative; min-height: 260px; border: 2px dashed var(--border); border-radius: 10px;
  background: var(--panel-2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, background .15s; padding: 16px; overflow: auto;
}
.import-image-dropzone:hover, .import-image-dropzone:focus { border-color: var(--accent); outline: none; }
.import-image-dropzone.drag-over { border-color: var(--accent); background: rgba(20,150,255,0.08); }
.import-image-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--text-dim); }
.import-image-icon { font-size: 32px; }
.import-image-empty strong { color: var(--text); font-size: 14px; }
.import-image-dropzone img#importImagePreview { max-width: 100%; max-height: 420px; border-radius: 8px; display: block; }
.import-contact-manager { font-size: 11px; color: var(--accent); font-weight: 600; }

/* ─── Account Summary doc ────────────────────────────────────────────────────── */
.summary-placeholder { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.summary-placeholder-icon { font-size: 40px; color: var(--accent); margin-bottom: 14px; }
.summary-placeholder h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.summary-placeholder p { font-size: 14px; max-width: 500px; margin: 0 auto 8px; }

.account-summary-doc { max-width: 860px; }
.summary-doc-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--accent); }
.summary-doc-title { font-size: 22px; margin: 0; color: var(--text); }
.summary-generated-date { font-size: 11px; color: var(--text-dim); margin-left: auto; flex-shrink: 0; }

.summary-executive-takeaway { background: linear-gradient(135deg, rgba(98,179,255,0.08), rgba(106,91,255,0.06));
  border: 1px solid rgba(98,179,255,0.2); border-radius: 12px; padding: 18px 20px; margin-bottom: 28px; }
.summary-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.summary-section-actions { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.summary-section-actions .btn { font-size: 10px; }
.summary-et-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 8px; }
.summary-et-text { font-size: 15px; line-height: 1.7; color: var(--text); margin: 0; font-weight: 500; }

.summary-section { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.summary-section:last-child { border-bottom: none; }
.summary-section-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent-2); margin: 0 0 10px; }
.summary-section-heading .summary-section-title { margin-bottom: 10px; }
.summary-section-content { font-size: 13px; color: var(--text); line-height: 1.75; }
.summary-section-editor { margin-top: 12px; }
.summary-section-editor[hidden] { display: none; }
.summary-editor-panel { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); }
.summary-editor-panel label { font-size: 11px; font-weight: 700; }
.summary-editor-panel textarea { box-sizing: border-box; width: 100%; resize: vertical; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; font-size: 12px; line-height: 1.6; }
.summary-editor-panel textarea:read-only { opacity: .75; }
.summary-editor-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.summary-editor-footer > div { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-editor-footer .hint { font-size: 11px; }
.summary-section-content ul { margin: 6px 0; padding-left: 18px; }
.summary-section-content li { margin-bottom: 4px; }
.summary-section-content strong { color: var(--text); }

/* ─── Account Summary — sidebar nav layout ──────────────────────────────────── */
.summary-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
  max-width: 1100px;
}
@media (max-width: 800px) { .summary-layout { grid-template-columns: 1fr; } }

/* Sticky left nav */
.summary-nav {
  position: sticky;
  top: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 0 12px;
  overflow: hidden;
}
.summary-nav-account {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 16px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-nav-date {
  font-size: 10px;
  color: var(--text-dim);
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.summary-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.summary-nav-link {
  display: block;
  padding: 7px 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1.3;
}
.summary-nav-link:hover {
  color: var(--text);
  background: var(--panel-2);
}
.summary-nav-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(98,179,255,0.06);
  font-weight: 600;
}

/* Remove old max-width from .account-summary-doc since it's now inside .summary-doc */
.summary-doc { min-width: 0; }

@media (max-width: 640px) {
  .summary-section-heading { flex-direction: column; }
  .summary-section-actions { width: 100%; }
  .summary-section-actions .btn { flex: 1; }
}

/* ─── User Badge ─────────────────────────────────────────────────────────────── */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(20,150,255,0.2);
}
.user-badge-name {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.user-badge-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(20,150,255,0.15);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
}
.user-logout-btn {
  background: none;
  border: 1px solid rgba(20,150,255,0.2);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.user-logout-btn:hover { border-color: rgba(20,150,255,0.5); color: var(--text); }

/* ─── Tab scroll content ─────────────────────────────────────────────────────── */
.tab-scroll-content {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}

/* ─── Teams tab ──────────────────────────────────────────────────────────────── */
.teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.team-workspace-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.team-workspace-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  padding: 10px 16px;
}
.team-workspace-tab:hover,
.team-workspace-tab.active {
  color: var(--text);
}
.team-workspace-tab.active {
  border-bottom-color: var(--accent, #1496ff);
}
.team-workspace-panel { min-width: 0; }
.team-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.team-card-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.team-card-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}
.team-meta-label {
  font-weight: 600;
  color: var(--text-muted);
}
.chk-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.chk-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.chk-label input { cursor: pointer; }

/* ─── Opportunities tab ──────────────────────────────────────────────────────── */
.opps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.opps-actions { display: flex; gap: 8px; }
.opps-list { display: flex; flex-direction: column; gap: 14px; }
.opp-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.opp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 8px;
}
.opp-name { font-size: 15px; font-weight: 600; }
.opp-focus {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 8px;
}
.opp-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.opp-rationale { font-size: 12px; color: var(--text-dim); display: flex; gap: 6px; align-items: baseline; }
.opp-contacts { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.ai-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-right: 4px;
}

/* ─── AI Advisor tab ─────────────────────────────────────────────────────────── */
.advisor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.advisor-actions { display: flex; gap: 8px; }
.advisor-strategy {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}
.advisor-strategy-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.advisor-strategy-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  outline: none;
  min-height: 60px;
  border-radius: 4px;
  padding: 4px;
  margin-bottom: 10px;
}
.advisor-strategy-text:focus { background: rgba(20,150,255,0.05); }
.advisor-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

/* ─── Gantt chart ─────────────────────────────────────────────────────────────── */
.gantt-wrap { overflow-x: auto; margin-bottom: 32px; }
.gantt-table { min-width: 700px; }
.gantt-head, .gantt-row {
  display: flex;
  align-items: stretch;
}
.gantt-head {
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.gantt-col-meta {
  flex: 0 0 200px;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
}
.gantt-col-week {
  flex: 1;
  padding: 8px 6px;
  text-align: center;
  border-right: 1px solid var(--border);
  font-size: 11px;
}
.gantt-row {
  border-bottom: 1px solid var(--border);
}
.gantt-row:last-child { border-bottom: none; }
.gantt-cell {
  flex: 1;
  padding: 6px;
  border-right: 1px solid var(--border);
  position: relative;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.gantt-cell.empty { background: transparent; }
.gantt-cell-title {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 4px;
}
.gantt-week-edit {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 2px;
  opacity: 0.5;
}
.gantt-cell:hover .gantt-week-edit { opacity: 1; }
.gantt-weeks-detail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.gantt-week-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.gwc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.gwc-week { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.gwc-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gwc-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.gwc-opp { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.gwc-owner { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.gwc-actions {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ─── Modal generic ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: #0d1929;
  border: 1px solid rgba(20,150,255,0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(20,150,255,0.1);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(20,150,255,0.1);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-row label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.form-row input, .form-row select, .form-row textarea {
  background: var(--bg);
  border: 1px solid rgba(20,150,255,0.2);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--accent);
}
.btn-danger {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
  border-radius: 6px;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-tiny {
  font-size: 11px !important;
  padding: 3px 8px !important;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.empty-hint {
  color: var(--text-dim);
  font-size: 14px;
  padding: 40px 0;
  text-align: center;
}


/* ─── Admin panel sections ────────────────────────────────────────────────────── */
.admin-section {
  margin-bottom: 40px;
}
.admin-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-section-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* ─── Users table ─────────────────────────────────────────────────────────────── */
.users-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.users-table thead {
  background: var(--panel-2);
}
.users-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.users-table tbody tr:last-child td { border-bottom: none; }
.user-id-cell { font-family: monospace; color: var(--muted, #5a7a9f); font-size: 12px; }
.users-table tbody tr:hover { background: rgba(20,150,255,0.04); }
.user-row-me { background: rgba(20,150,255,0.03); }
.user-actions { white-space: nowrap; display: flex; gap: 6px; }
.you-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: rgba(20,150,255,0.12);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 4px;
}
.user-title-sub {
  font-size: 11px;
  color: #5a7a9f;
  font-weight: 400;
  margin-top: 1px;
}
.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.role-admin {
  background: rgba(20,150,255,0.12);
  color: var(--accent);
}
.role-user {
  background: rgba(100,120,150,0.12);
  color: var(--text-dim);
}
.role-manager {
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
}
.role-ae { background: rgba(20,150,255,0.12); color: var(--accent); }
.role-se { background: rgba(46,204,113,0.12); color: var(--good); }
.role-sdr { background: rgba(100,120,150,0.15); color: var(--text-dim); }
.role-csm { background: rgba(255,170,0,0.12); color: var(--accent-2); }
.role-cse { background: rgba(255,170,0,0.18); color: var(--accent-2); }
.role-regional_director { background: rgba(139,92,246,0.16); color: #a78bfa; }
.role-regional_vp { background: rgba(224,72,72,0.14); color: #e05; }
.role-svp_na { background: rgba(224,72,72,0.22); color: #e05; }
.role-strike_team_leadership { background: rgba(255,170,0,0.22); color: var(--accent-2); }
.role-dem_strike_team { background: rgba(20,150,255,0.14); color: var(--accent); }
.role-security_strike_team { background: rgba(224,72,72,0.14); color: #e05; }
.role-logs_strike_team { background: rgba(46,204,113,0.14); color: var(--good); }
.role-cloud_native_strike_team { background: rgba(139,92,246,0.14); color: #a78bfa; }

.user-org-chart {
  position: relative;
  overflow: auto;
  height: min(72vh, 680px);
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  cursor: grab;
}
.user-org-chart.grabbing { cursor: grabbing; user-select: none; }
.org-card.user-org-card { min-width: 170px; }
.user-org-role-groups { display: flex; flex-direction: column; gap: 24px; }
.user-org-role-group { min-width: max-content; }
.user-org-role-heading {
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.user-org-role-row { display: flex; align-items: flex-start; gap: 12px; }
.user-org-role-row .org-card.user-org-card { margin: 0; }

/* prowlerDEV: isolated workspace, page components, and safe authoring controls */
.dev-workspace { display: flex; flex-direction: column; gap: 18px; max-width: 1400px; margin: 0 auto; }
.dev-header, .dev-page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dev-header h2, .dev-page-heading h2 { margin: 0 0 4px; }
.dev-header p, .dev-page-heading p { margin: 0; }
.dev-page-list { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.dev-page-tab { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; background: var(--panel); color: var(--text-dim); cursor: pointer; font: inherit; font-size: 12px; }
.dev-page-tab:hover, .dev-page-tab.is-active { border-color: var(--accent); color: var(--text); }
.dev-access-badge { color: var(--accent); font-size: 10px; }
.dev-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.dev-editor { display: flex; flex-direction: column; gap: 10px; }
.dev-editor h3, .dev-card h3 { margin: 0 0 8px; font-size: 14px; }
.dev-editor label { font-size: 12px; font-weight: 600; }
.dev-editor textarea { width: 100%; box-sizing: border-box; min-height: 80px; resize: vertical; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--text); font: inherit; }
.dev-editor-intro h3 { margin: 4px 0; font-size: 18px; }
.dev-editor-intro p { max-width: 760px; margin: 0; line-height: 1.5; }
.dev-builder-step { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.dev-recipe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; }
.dev-recipe-card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-height: 130px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, transform .15s, background .15s; }
.dev-recipe-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.dev-recipe-card.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); box-shadow: 0 0 0 1px var(--accent); }
.dev-recipe-card strong { font-size: 13px; }
.dev-recipe-card span { flex: 1; color: var(--text-dim); font-size: 11px; line-height: 1.45; font-weight: 400; }
.dev-recipe-card small { color: var(--accent); font-size: 10px; font-weight: 700; }
.dev-guided-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.dev-guided-fields label { display: flex; flex-direction: column; gap: 6px; }
.dev-guided-fields select, .dev-editor > input { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--text); font: inherit; }
.dev-source-picker { min-width: 0; margin: 2px 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.dev-source-picker legend { padding: 0 5px; font-size: 12px; font-weight: 700; }
.dev-source-picker > .hint { margin: 0 0 10px; }
.dev-source-picker > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; }
.dev-source-option { display: flex; align-items: flex-start; gap: 9px; padding: 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); cursor: pointer; }
.dev-source-option input { margin: 2px 0 0; accent-color: var(--accent); }
.dev-source-option span { display: flex; flex-direction: column; gap: 3px; }
.dev-source-option strong { font-size: 11px; }
.dev-source-option small { color: var(--text-dim); font-size: 10px; font-weight: 400; line-height: 1.4; }
.dev-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dev-editor-actions .hint { flex: 1; min-width: 180px; }
.dev-preview-definition { border-top: 1px solid var(--border); padding-top: 12px; }
.dev-preview-definition li { margin: 5px 0; color: var(--text-dim); font-size: 12px; }
.dev-preview-layout { margin: 8px 0; color: var(--accent); font-size: 12px; text-transform: capitalize; }
.dev-preview-plan { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; padding: 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.dev-preview-plan > strong { font-size: 11px; }
.dev-preview-plan > div { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-preview-plan > small { color: var(--text-dim); font-size: 10px; }
.dev-data-chip { padding: 4px 8px; border: 1px solid var(--border); border-radius: 20px; color: var(--accent); font-size: 10px; }
.dev-preview-live { margin: 14px 0; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.dev-preview-live > h4 { margin: 0 0 10px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.dev-preview-live .dev-component-grid { margin-top: 0; }
.dev-page-heading { margin-bottom: 16px; }
.dev-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dev-component-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dev-component-grid.dev-layout-report,
.dev-component-grid.dev-layout-table,
.dev-component-grid.dev-layout-board { grid-template-columns: minmax(0, 1fr); }
.dev-metric-card { display: flex; flex-direction: column; min-height: 100px; justify-content: center; }
.dev-metric-value { color: var(--accent); font-size: 30px; font-weight: 800; }
.dev-metric-card h3 { color: var(--text-dim); margin: 5px 0 0; }
.dev-copy-card p { color: var(--text-dim); font-size: 13px; line-height: 1.6; white-space: normal; }
.dev-component-grid > .dev-copy-card { grid-column: 1 / -1; }
.dev-account-selector { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.dev-account-selector label { font-size: 13px; font-weight: 700; }
.dev-account-selector select { min-width: 240px; max-width: 100%; padding: 8px 32px 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel-2); color: var(--text); font: inherit; }
.dev-account-selector .hint { flex: 1; min-width: 180px; }
.dev-table-card { grid-column: 1 / -1; min-width: 0; }
.dev-list-card,
.dev-chart-card,
.dev-board-card { grid-column: 1 / -1; min-width: 0; }
.dev-table-scroll { overflow: auto; max-width: 100%; }
.dev-table-scroll table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dev-table-scroll th, .dev-table-scroll td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); max-width: 300px; overflow-wrap: anywhere; }
.dev-table-scroll th { color: var(--text-dim); text-transform: capitalize; }
.dev-record-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.dev-record { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.dev-record > strong { font-size: 13px; overflow-wrap: anywhere; }
.dev-record > span,
.dev-board-item > span { display: flex; justify-content: space-between; gap: 12px; color: var(--text-dim); font-size: 12px; overflow-wrap: anywhere; }
.dev-record small,
.dev-board-item small { color: var(--text-dim); text-transform: capitalize; }
.dev-chart-content { display: flex; align-items: center; gap: 24px; min-height: 160px; }
.dev-bar-chart { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dev-bar-row { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(80px, 3fr) auto; align-items: center; gap: 10px; font-size: 12px; }
.dev-bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.dev-bar-track { height: 10px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.dev-bar-track i { display: block; height: 100%; border-radius: inherit; }
.dev-bar-row > strong { min-width: 36px; text-align: right; }
.dev-donut-chart { position: relative; flex: 0 0 150px; width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; }
.dev-donut-chart::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: var(--panel); }
.dev-donut-chart > span { z-index: 1; font-size: 20px; font-weight: 800; }
.dev-chart-legend { display: flex; flex-direction: column; gap: 7px; min-width: 160px; margin: 0; padding: 0; list-style: none; }
.dev-chart-legend li { display: grid; grid-template-columns: 9px minmax(60px, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.dev-chart-legend li > i { width: 9px; height: 9px; border-radius: 50%; }
.dev-chart-legend li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.dev-board { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.dev-board-column { flex: 1 0 220px; max-width: 340px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.dev-board-column > header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 12px; text-transform: capitalize; }
.dev-board-column > header > span { color: var(--text-dim); }
.dev-board-items { display: flex; flex-direction: column; gap: 7px; }
.dev-board-item { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); }
.dev-board-item > strong { font-size: 12px; overflow-wrap: anywhere; }
.dev-copy-narrative { grid-column: 1 / -1; }
.dev-copy-narrative p { font-size: 15px; line-height: 1.75; color: var(--text); }
.dev-copy-callout { grid-column: 1 / -1; border-left: 3px solid var(--accent); background: linear-gradient(135deg, rgba(20,150,255,.08), rgba(106,91,255,.05)); }
.dev-timeline-card,
.dev-org-chart-card { grid-column: 1 / -1; min-width: 0; }
.dev-timeline { position: relative; display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.dev-timeline-entry { position: relative; display: flex; gap: 12px; padding: 10px 0 10px 4px; }
.dev-timeline-entry:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: -10px; width: 2px; background: var(--border); }
.dev-timeline-dot { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--ch, var(--border)); color: var(--ch, var(--text-dim)); z-index: 1; }
.dev-timeline-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dev-timeline-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dev-timeline-head > strong { font-size: 13px; overflow-wrap: anywhere; }
.dev-timeline-head > time { color: var(--text-dim); font-size: 11px; white-space: nowrap; }
.dev-timeline-body > span { display: flex; gap: 6px; color: var(--text-dim); font-size: 12px; overflow-wrap: anywhere; }
.dev-timeline-body small { color: var(--text-dim); text-transform: capitalize; }
.dev-org-chart { overflow-x: auto; padding: 4px; }
.dev-org-root,
.dev-org-node ul { list-style: none; margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.dev-org-root { padding-left: 0; }
.dev-org-node { position: relative; }
.dev-org-node ul { border-left: 1px dashed var(--border); margin-top: 8px; }
.dev-org-box { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); min-width: 160px; }
.dev-org-box > strong { font-size: 12px; }
.dev-org-box > span { color: var(--text-dim); font-size: 11px; }
@media (max-width: 640px) {
  .dev-chart-content { align-items: flex-start; flex-direction: column; }
  .dev-chart-legend { width: 100%; }
  .dev-bar-row { grid-template-columns: minmax(60px, 1fr) minmax(60px, 2fr) auto; gap: 6px; }
}
.dev-share-section { margin-top: 16px; }
.dev-share-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.dev-share-add select { min-width: 150px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 7px; }
.dev-shares { display: flex; gap: 7px; flex-wrap: wrap; }
.dev-share-chip { display: inline-flex; gap: 5px; align-items: center; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; }
.dev-share-chip button { border: 0; background: none; color: var(--text-dim); cursor: pointer; font-size: 15px; }
.dev-version-section { margin-top: 16px; }
.dev-version-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12px; }
.dev-version-row > div { display: flex; flex-direction: column; gap: 3px; }
.dev-error-card, .dev-empty, .dev-quarantine { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.dev-error-card { border-color: var(--bad); }
.dev-error-card h3, .dev-empty h3, .dev-quarantine h3 { margin: 0 0 8px; }
.dev-quarantine { display: flex; flex-direction: column; gap: 6px; }
.published-page-nav { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 10px; }
.published-page-tab {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px;
  padding: 9px 11px; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; background: linear-gradient(135deg, rgba(20,150,255,.10), rgba(106,91,255,.07));
  color: var(--text); text-align: left; font-size: 12px; font-weight: 600;
  white-space: normal; transition: border-color .15s, background .15s, transform .15s;
}
.published-page-tab:hover:not(.active) { background: linear-gradient(135deg, rgba(20,150,255,.18), rgba(106,91,255,.12)); border-color: rgba(20,150,255,.55); transform: translateX(2px); }
.published-page-tab.active { border-color: var(--accent); background: rgba(20,150,255,.2); }
.published-page-icon { width: 19px; height: 21px; flex: 0 0 auto; fill: currentColor; color: var(--accent); }
.published-page-label { min-width: 0; overflow-wrap: anywhere; }
.published-page-panel { min-height: 320px; }
.published-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.published-page-heading h2 { margin: 4px 0; }
.published-page-heading .hint { margin: 0; }
.published-page-heading > .btn { flex: 0 0 auto; }
.published-page-kicker { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.dev-my-pages { display: flex; flex-direction: column; gap: 12px; }
.dev-my-page-list { display: flex; flex-direction: column; gap: 10px; }
.dev-my-page { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dev-my-page h4 { margin: 0 0 4px; }
.dev-my-page p { margin: 0 0 8px; }
.dev-publish-status { display: inline-block; color: var(--text-dim); font-size: 11px; }
.dev-publish-status.is-published { color: var(--good); }
.dev-ide { max-width: none; margin: 0; gap: 14px; }
.dev-ide-header { align-items: center; }
.dev-header-actions { display: flex; gap: 8px; align-items: center; }
.dev-ide-body { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: min(680px, calc(100vh - 260px)); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.dev-sidebar { min-width: 0; padding: 12px 8px; background: var(--panel-2); border-right: 1px solid var(--border); }
.dev-sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 3px 8px 11px; color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }
.dev-sidebar-new { width: 23px; height: 23px; padding: 0; border: 1px solid var(--border); border-radius: 5px; background: var(--panel); color: var(--text); font-size: 17px; line-height: 1; cursor: pointer; }
.dev-tree-group { margin: 0 0 15px; }
.dev-tree-group h3 { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 6px 8px; color: var(--text-dim); font-size: 10px; letter-spacing: 0.07em; }
.dev-tree-group h3 span { color: var(--text-dim); opacity: 0.7; font-size: 10px; }
.dev-tree-page { width: 100%; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--text-dim); text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.dev-tree-page:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.dev-tree-page.is-active { background: rgba(20,150,255,0.13); color: var(--text); }
.dev-tree-file-icon { width: 14px; color: var(--accent); text-align: center; }
.dev-tree-page-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-tree-status { color: var(--good); font-size: 9px; }
.dev-tree-empty { margin: 2px 8px 8px; color: var(--text-dim); opacity: 0.65; font-size: 11px; }
.dev-tree-failed-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; color: var(--warn); font-size: 11px; }
.dev-tree-failed-row button { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; }
.dev-editor-pane { min-width: 0; padding: 22px; overflow-y: auto; }
.dev-active-page { min-width: 0; }
.dev-active-page > .dev-component-grid { margin-top: 18px; }
.dev-welcome { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.dev-welcome-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel-2); color: var(--accent); font-size: 25px; }
.dev-welcome h2 { margin: 0 0 8px; font-size: 20px; }
.dev-welcome p { max-width: 420px; margin: 0 0 18px; color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.dev-ide .dev-my-pages { max-width: 900px; margin: 0 auto; }
.dev-ide .dev-empty { text-align: center; }
@media (max-width: 700px) {
  .tabs { overflow-x: auto; }
  .app-content-layout { grid-template-columns: 170px minmax(0, 1fr); }
  main { padding: 16px 12px 48px; }
  .dev-my-page { align-items: flex-start; flex-direction: column; }
  .dev-ide-body { grid-template-columns: 1fr; }
  .dev-sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
  .dev-tree-group { margin-bottom: 8px; }
  .dev-editor-pane { padding: 14px; }
}
.user-detail-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.user-detail-link:hover { text-decoration: underline; }
.manager-badge {
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  border-color: rgba(139,92,246,0.3);
}
.team-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Manager tab admin-only hide */
.admin-only-tab { display: none; }
.elevated-only-tab { display: none; }

/* KPI strip */
.mgr-kpi-strip { display: flex; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.mgr-kpi { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; flex: 1; min-width: 120px; }
.mgr-kpi-num { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.mgr-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim); margin-top: 6px; }

/* AI Usage dashboard */
.ai-usage-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
@media (max-width: 1100px) { .ai-usage-columns { grid-template-columns: 1fr; } }

.ai-usage-bar-list { display: flex; flex-direction: column; gap: 10px; }
.ai-usage-bar-row { display: flex; flex-direction: column; gap: 4px; }
.ai-usage-bar-label { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-usage-bar-track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.ai-usage-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.ai-usage-bar-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
.ai-usage-bar-share { margin-left: 4px; opacity: 0.7; }
.ai-usage-bar-cost { font-weight: 600; color: var(--text-dim); }

.ai-usage-trend { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-bottom: 28px; padding: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.ai-usage-trend-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 3px; }
.ai-usage-trend-bar { width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; }

/* Manager layout grid */
.mgr-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .mgr-layout { grid-template-columns: 1fr; } }
.mgr-right-col { display: flex; flex-direction: column; gap: 24px; }
.mgr-section-title { font-size: 13px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }

/* Accounts table */
.mgr-accounts-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mgr-accounts-table { width: 100%; border-collapse: collapse; }
.mgr-accounts-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); background: var(--panel-2); border-bottom: 1px solid var(--border); }
.mgr-account-row td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; cursor: pointer; transition: background 0.12s; }
.mgr-account-row:hover td { background: rgba(20,150,255,0.05); }
.mgr-account-row.expanded td { background: rgba(20,150,255,0.07); }
.mgr-account-name { font-weight: 600; font-size: 14px; }
.mgr-team-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.mgr-team-chip { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: rgba(20,150,255,0.1); color: var(--accent); }
.mgr-drill-row td { padding: 0; border-bottom: 1px solid var(--border); }
.mgr-drill-inner { display: none; padding: 16px 20px; background: var(--bg); }
.mgr-drill-row.open .mgr-drill-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mgr-drill-col-title { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.drill-contact-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.drill-contact-item:last-child { border-bottom: none; }
.drill-enriched-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.drill-opp-chip { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; margin-bottom: 5px; display: inline-block; }
.drill-plan-bar-wrap { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.drill-plan-bar { height: 100%; background: #22c55e; border-radius: 4px; transition: width 0.3s; }
.drill-finding-item { font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.drill-finding-item:last-child { border-bottom: none; }

/* Status dot */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.complete { background: #22c55e; }
.status-dot.error { background: #ef4444; }
.status-dot.running { background: #1496ff; animation: pulse 1s infinite; }
.status-dot.complete_with_errors { background: #f59e0b; }
.status-dot.unknown { background: #4a6080; }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.4 } }

/* Users grid */
.mgr-users-grid { display: flex; flex-direction: column; gap: 10px; }
.mgr-user-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: border-color 0.15s; }
.mgr-user-card:hover { border-color: rgba(20,150,255,0.4); }
.mgr-user-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#1496ff,#6a5bff); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.mgr-user-info { flex: 1; min-width: 0; }
.mgr-user-name { font-weight: 600; font-size: 13px; }
.mgr-user-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.mgr-user-teams { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

/* Activity feed */
.mgr-activity-feed { display: flex; flex-direction: column; gap: 0; }
.mgr-run-row { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 10px; font-size: 12px; }
.mgr-run-row:last-child { border-bottom: none; }
.mgr-run-detail { flex: 1; min-width: 0; }
.mgr-run-account { font-weight: 600; color: var(--text); }
.mgr-run-meta { color: var(--text-dim); margin-top: 2px; }
.mgr-run-time { color: var(--text-dim); white-space: nowrap; font-size: 11px; }
.new-findings-badge { background: rgba(20,150,255,0.15); color: var(--accent); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.expand-arrow { color: var(--text-dim); font-size: 12px; transition: transform 0.2s; }
.mgr-account-row.expanded .expand-arrow { transform: rotate(90deg); }

/* --- Opportunity pipeline cards ----------------------------------------------- */
.opps-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #22c55e;
  margin: 20px 0 10px;
}
.opps-group-label:first-child { margin-top: 0; }
.opps-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.opps-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
}
.opp-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.opp-card-top { margin-bottom: 10px; }
.opp-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.opp-card-badges { display: flex; gap: 6px; align-items: center; flex: 1; }
.opp-name { font-size: 15px; font-weight: 700; }
.opp-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.opp-focus-area {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.opp-stage-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.opp-stage-pip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-dim);
  background: transparent;
  letter-spacing: 0.03em;
}
.opp-stage-pip.active {
  color: var(--accent);
  background: rgba(20,150,255,0.12);
}
.opp-stage-sep {
  color: var(--border);
  font-size: 14px;
  padding: 0 2px;
}
.opp-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 8px;
}
.opp-rationale {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.opp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.opp-meta-chip {
  font-size: 11px;
  background: rgba(100,130,160,0.1);
  color: var(--text-dim);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.opp-arr {
  background: rgba(20,150,255,0.08);
  color: var(--accent);
  border-color: rgba(20,150,255,0.2);
  font-weight: 700;
}
.opp-notes {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Restart-required label on settings fields ─────────────────────── */
.restart-note {
  font-size: 10px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── OTel / monitoring status badge in Settings ────────────────────── */
.otel-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid;
  margin-top: 8px;
}
.otel-status-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.otel-active-badge {
  color: #22c55e;
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
}
.otel-active-badge::before { background: #22c55e; animation: pulse 1.4s infinite; }
.otel-warning-badge {
  color: #f59e0b;
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.3);
  cursor: help;
}
.otel-warning-badge::before { background: #f59e0b; }
.otel-inactive-badge {
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}
.otel-inactive-badge::before { background: #4a6080; }

/* restart-required save banner */
.restart-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: #f59e0b;
  font-size: 13px;
  font-weight: 500;
  margin-top: 14px;
}

/* ─── Notes fields ──────────────────────────────────────────────────────────── */
.notes-textarea {
  width: 100%;
  min-height: 80px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 6px;
  padding: 10px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.notes-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.notes-section {
  margin-top: 12px;
}
.notes-section label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 5px;
}

/* ─── Opportunity AI Strategy card ─────────────────────────────────────────── */
.opp-strategy {
  margin-top: 10px;
  background: rgba(20, 150, 255, 0.05);
  border: 1px solid rgba(20, 150, 255, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
}
.opp-strategy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.strategy-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-top: 10px;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ── Strategy v2: callouts + expandable cards ───────────────────────────────── */
.strategy-summary-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(20, 150, 255, 0.08);
  border: 1px solid rgba(20, 150, 255, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.strategy-summary-callout .ico { color: #1496ff; flex-shrink: 0; margin-top: 2px; }
.strategy-summary-callout p { margin: 0; color: var(--text); line-height: 1.55; }

.strategy-success-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}
.strategy-success-callout .ico { color: #22c55e; flex-shrink: 0; margin-top: 2px; }
.strategy-success-callout p { margin: 3px 0 0; color: var(--text); line-height: 1.5; }
.strategy-success-callout .sc-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #22c55e; }

.strategy-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  align-items: start;
}
.strategy-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.strategy-card summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.strategy-card summary::-webkit-details-marker { display: none; }
.strategy-card summary:hover { background: rgba(255,255,255,0.03); }
.strategy-card .sc-title { flex: 1; }
.strategy-card .sc-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--panel-2);
  color: var(--text-dim);
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 16px;
  text-align: center;
}
.strategy-card .sc-chevron { color: var(--text-dim); transition: transform 0.15s; flex-shrink: 0; }
.strategy-card[open] .sc-chevron { transform: rotate(180deg); }
.strategy-card .sc-body { padding: 2px 12px 12px; }
.strategy-card.sc-contacts { border-left: 3px solid #1496ff; }
.strategy-card.sc-contacts summary .ico { color: #1496ff; }
.strategy-card.sc-actions { border-left: 3px solid #f59e0b; }
.strategy-card.sc-actions summary .ico { color: #f59e0b; }
.strategy-card.sc-talking { border-left: 3px solid #8b5cf6; }
.strategy-card.sc-talking summary .ico { color: #8b5cf6; }
.strategy-card.sc-risks { border-left: 3px solid #ef4444; }
.strategy-card.sc-risks summary .ico { color: #ef4444; }
.strategy-contact-title { color: var(--text-dim); font-size: 11px; }
.strategy-contacts-list,
.strategy-actions-list,
.strategy-talking-points,
.strategy-risks {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.strategy-contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  font-size: 12px;
  line-height: 1.4;
}
.strategy-contact-approach {
  width: 100%;
  margin: 2px 0 0 0;
  color: var(--text-dim);
  font-size: 11px;
}
.strategy-role-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.strategy-role-champion       { background: rgba(34,197,94,0.15);  color: #22c55e; }
.strategy-role-economic-buyer { background: rgba(20,150,255,0.15); color: #1496ff; }
.strategy-role-tech-eval      { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.strategy-role-technical-evaluator { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.strategy-role-influencer     { background: rgba(100,116,139,0.15); color: #94a3b8; }
.strategy-role-blocker        { background: rgba(239,68,68,0.15);  color: #ef4444; }
.strategy-action-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  font-size: 12px;
  padding: 4px 6px;
  background: var(--panel-2);
  border-radius: 5px;
}
.strategy-owner-tag {
  font-size: 10px;
  font-weight: 700;
  background: rgba(20,150,255,0.12);
  color: #1496ff;
  padding: 1px 6px;
  border-radius: 8px;
  white-space: nowrap;
}
.strategy-timeframe {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}
.strategy-talking-points li { color: var(--text); padding-left: 10px; position: relative; }
.strategy-talking-points li::before { content: '\2022'; position: absolute; left: 0; color: #1496ff; }
.strategy-risks li { color: #ef4444; padding-left: 14px; position: relative; }
.strategy-risks li::before { content: '\26A0'; position: absolute; left: 0; font-size: 10px; }
.strategy-loading {
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
  font-size: 13px;
  animation: pulse-opacity 1.4s infinite;
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── Copy-to-clipboard field wrapper ───────────────────────────────────────── */
.copy-field-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-field-wrap input { flex: 1; }
.copy-field-wrap--textarea { align-items: flex-start; }
.copy-field-wrap--textarea textarea { flex: 1; }
.btn-copy {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-copy:hover { background: rgba(20,150,255,0.1); color: var(--accent); border-color: var(--accent); }
.btn-copy--textarea { margin-top: 4px; }

/* ─── Opportunity cards — uniform grid ──────────────────────────────────────── */
.opps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.opp-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.opp-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.22); }
.opp-card-body {
  flex: 1;
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opp-name { font-size: 15px; font-weight: 700; }
.opp-focus-area {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.opp-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
}
.opp-rationale {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.opp-card-actions {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.gen-opp-strategy-btn {
  background: rgba(20,150,255,0.1);
  color: var(--accent);
  border-color: rgba(20,150,255,0.3);
  font-weight: 600;
}
.gen-opp-strategy-btn:hover { background: rgba(20,150,255,0.2); }

/* ── Notes sidebar ──────────────────────────────────────────────────────────── */
.notes-sidebar {
  position: fixed;
  top: 0; right: -400px;
  width: 380px;
  height: 100vh;
  background: var(--panel-1, #0d1929);
  border-left: 1px solid var(--border);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
  overflow: hidden;
}
.notes-sidebar.open { right: 0; }
.notes-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1099;
}
.notes-overlay.open { display: block; }
.notes-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notes-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.notes-sidebar-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.notes-sidebar-add {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.note-entry {
  background: var(--panel-2, #0a1525);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.note-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.note-type-account     { background: rgba(20,150,255,0.12); color: #1496ff; }
.note-type-contact     { background: rgba(34,197,94,0.12);  color: #22c55e; }
.note-type-opportunity { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.note-type-general     { background: rgba(100,116,139,0.12); color: #94a3b8; }
.note-author { font-size: 11px; font-weight: 600; color: var(--text-dim); }
.note-date   { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.note-delete-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.note-delete-btn:hover { color: #ef4444; }
.note-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.notes-empty { font-size: 13px; color: var(--text-dim); text-align: center; padding: 20px 0; }
.notes-toggle-btn { font-size: 13px; }

/* ── User profile button ─────────────────────────────────────────────────────── */
.user-badge-profile-btn {
  background: none;
  border: none;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.user-badge-profile-btn span { text-decoration: underline; text-underline-offset: 2px; }
.user-badge-profile-btn:hover { color: var(--accent); }

/* ── Profile photo (My Profile modal) ───────────────────────────────────────── */
.profile-photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-photo-preview .oav { display: block; }
.profile-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* ── Corporate branding (Settings → Branding) ────────────────────────────────── */
.brand-logo-row { display: flex; align-items: center; gap: 14px; }
.brand-logo-preview {
  width: 96px; height: 96px; border-radius: 10px;
  border: 1px dashed var(--border); background: var(--panel-2, rgba(255,255,255,0.03));
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.brand-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo-empty { font-size: 11px; color: var(--text-dim); text-align: center; padding: 0 6px; }
.brand-logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-color-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.brand-color-field { display: flex; flex-direction: column; gap: 6px; }
.brand-color-input { display: flex; align-items: center; gap: 8px; }
.brand-color-input input[type="color"] {
  width: 36px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer;
}
.brand-color-input input[type="text"] { width: 110px; font-family: monospace; }

/* ── Nav Menu quick links (Settings → Nav Menu) ──────────────────────────────── */
.nav-preset-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-preset-chip {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--panel-2, rgba(255,255,255,0.03));
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text); transition: border-color .15s, background .15s;
}
.nav-preset-chip img { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; }
.nav-preset-chip:hover { border-color: var(--accent); }
.nav-preset-chip.is-added { border-color: var(--accent); background: rgba(20,150,255,0.1); color: var(--accent); }
.nav-preset-chip.is-added::after { content: '✓'; font-weight: 800; }

.nav-custom-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-custom-icon-picker { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nav-custom-icon-preview {
  width: 44px; height: 44px; border-radius: 8px; border: 1px dashed var(--border);
  background: var(--panel-2, rgba(255,255,255,0.03)); display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 18px;
}
.nav-custom-icon-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nav-custom-fields { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 220px; }
.nav-custom-fields input { width: 100%; }

.nav-links-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.nav-link-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2, rgba(255,255,255,0.03));
}
.nav-link-row img { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; }
.nav-link-row-label { font-weight: 600; font-size: 13px; }
.nav-link-row-url { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.nav-link-row-remove {
  background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 16px;
  line-height: 1; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.nav-link-row-remove:hover { color: var(--bad); background: rgba(255,80,80,0.08); }
.nav-link-row-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── MCP Servers (Settings → MCP Servers) ────────────────────────────────── */
.mcp-connections-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.mcp-conn-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2, rgba(255,255,255,0.03));
  flex-wrap: wrap;
}
.mcp-conn-icon { width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0; }
.mcp-conn-main { min-width: 160px; flex: 1 1 220px; }
.mcp-conn-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.mcp-conn-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.mcp-conn-status { font-size: 11px; margin-top: 3px; }
.mcp-conn-status.ok { color: var(--good); }
.mcp-conn-status.error { color: var(--bad); }
/* Token input gets its own full-width row rather than sharing one with the
   action buttons — bearer tokens (Dynatrace, GitHub, etc.) commonly run
   80-100+ characters, and a shared row squeezed it down no matter how much
   min-width was applied to the input alone. */
.mcp-conn-fields { display: flex; flex-direction: column; gap: 8px; flex: 1 1 100%; }
.mcp-conn-token-input {
  width: 100%; box-sizing: border-box; font-family: monospace; font-size: 12px;
  letter-spacing: 0.02em; padding: 9px 11px;
}
.mcp-conn-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcp-conn-toggle { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.mcp-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 4px; background: rgba(20,150,255,0.15); color: var(--accent);
}
.mcp-badge-running { background: rgba(46,204,113,0.18); color: var(--good); }

/* ── Floating nav quick-links bar (rendered on every page once configured) ──── */
.nav-quick-links {
  position: fixed; top: 74px; right: 18px; z-index: 45;
  display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 999px;
  background: rgba(8,14,26,0.82); backdrop-filter: blur(8px);
  border: 1px solid rgba(20,150,255,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 20px rgba(20,150,255,0.08);
}
.nav-quick-link {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid transparent; transition: transform .12s, border-color .12s, background .12s;
  overflow: hidden;
}
.nav-quick-link:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(20,150,255,0.12); }
.nav-quick-link img { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; }


/* ── Opportunity pipeline chart (dashboard + manager) ───────────────────────── */
.opp-pipe-rows { display: flex; flex-direction: column; gap: 10px; }
.opp-pipe-row {
  display: grid;
  grid-template-columns: 80px 1fr 32px auto;
  align-items: center;
  gap: 8px;
}
.opp-pipe-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: capitalize;
}
.opp-pipe-bar-wrap {
  height: 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.opp-pipe-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  opacity: 0.85;
}
.opp-pipe-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.opp-pipe-arr {
  font-size: 11px;
  color: var(--good);
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}
.opp-pipe-total {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Action items checklist (dashboard) ─────────────────────────────────────── */
.action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  margin-bottom: 6px;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.action-item:last-child { margin-bottom: 0; }
.action-icon {
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.action-label { flex: 1; }
.action-priority {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.action-high {
  background: rgba(239,68,68,0.08);
  border-left-color: #ef4444;
}
.action-high .action-icon { color: #ef4444; }
.action-high .action-priority { background: rgba(239,68,68,0.15); color: #ef4444; }

.action-medium {
  background: rgba(245,158,11,0.08);
  border-left-color: #f59e0b;
}
.action-medium .action-icon { color: #f59e0b; }
.action-medium .action-priority { background: rgba(245,158,11,0.15); color: #f59e0b; }

.action-low {
  background: rgba(100,116,139,0.07);
  border-left-color: var(--border);
}
.action-low .action-icon { color: var(--text-dim); }
.action-low .action-priority { background: rgba(100,116,139,0.12); color: var(--text-dim); }

.action-done {
  background: rgba(34,197,94,0.07);
  border-left-color: #22c55e;
}
.action-done .action-icon { color: #22c55e; }

/* ── Manager pipeline row ────────────────────────────────────────────────────── */
.mgr-pipeline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .mgr-pipeline-row { grid-template-columns: 1fr; }
}

.mgr-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

/* ── Stage chip ──────────────────────────────────────────────────────────────── */
.stage-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}
.stage-discover  { background: rgba(20,150,255,0.12); color: #1496ff; }
.stage-qualify   { background: rgba(34,197,94,0.12);  color: #22c55e; }
.stage-propose   { background: rgba(245,158,11,0.12); color: #f59e0b; }
.stage-negotiate { background: rgba(139,92,246,0.12); color: #c678dd; }
.stage-close     { background: rgba(239,68,68,0.12);  color: #ef4444; }

/* ── Team performance grid ───────────────────────────────────────────────────── */
.mgr-team-perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.mgr-team-perf-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.mgr-team-perf-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mgr-team-perf-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mgr-team-stat { text-align: center; }
.mgr-team-stat-arr { grid-column: 1 / -1; }
.mgr-team-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.mgr-team-stat-arr .mgr-team-stat-num {
  font-size: 16px;
  color: var(--good);
}
.mgr-team-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── Modal sizing: 75% wide ─────────────────────────────────────────────────── */
.modal-75 {
  width: 75vw !important;
  max-width: 75vw !important;
  overflow-y: visible !important;
  padding: 24px !important;
}

/* ── Two-column modal layout ────────────────────────────────────────────────── */
.modal-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 0;
}
.modal-col-form {
  padding: 4px 24px 24px 0;
  overflow-y: auto;
  max-height: 82vh;
  border-right: 1px solid var(--border);
}
.modal-col-notes {
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 82vh;
}
@media (max-width: 900px) {
  .modal-75 { width: 96vw !important; max-width: 96vw !important; }
  .modal-two-col { grid-template-columns: 1fr; }
  .modal-col-form { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .modal-col-notes { max-height: none; }
}

/* ── Three-column modal layout (account modal: form | notes | tenants) ────── */
.modal-three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 0;
  min-height: 0;
}
.modal-three-col .modal-col-form { border-right: 1px solid var(--border); }
.modal-col-tenants {
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 82vh;
  border-left: 1px solid var(--border);
}
@media (max-width: 1200px) {
  .modal-three-col { grid-template-columns: 1fr 1fr; }
  .modal-col-tenants { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--border); max-height: none; }
}
@media (max-width: 900px) {
  .modal-three-col { grid-template-columns: 1fr; }
}

.field-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-tenants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tenant-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.tenant-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tenant-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.tenant-default-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dim);
  padding: 0;
  line-height: 1;
}
.tenant-default-star.is-default { color: #f5b400; }
.tenant-row-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tenant-row-meta span {
  background: rgba(255,255,255,0.05);
  border-radius: 5px;
  padding: 1px 6px;
}
.tenant-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mcp-advanced-auth summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--text-dim);
  user-select: none;
}
.mcp-advanced-auth summary:hover { color: var(--text); }
.mcp-advanced-auth-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.tenant-form {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}

.tenant-chat-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 220px;
  overflow: hidden;
}
.tenant-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  font-size: 12px;
}
.tenant-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.tenant-chat-input-row {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border);
}
.tenant-chat-input-row input {
  flex: 1;
}

/* ── Rich note input (contenteditable) ──────────────────────────────────────── */
.note-rich-input {
  min-height: 80px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--input-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  outline: none;
  word-break: break-word;
  transition: border-color 0.15s;
}
.note-rich-input:focus { border-color: var(--accent); }
.note-rich-input:empty::before {
  content: attr(data-placeholder);
  color: var(--text-dim);
  pointer-events: none;
}
.note-rich-input img {
  max-width: 100%;
  border-radius: 6px;
  margin: 4px 0;
  display: block;
}

/* ── Modal notes list ───────────────────────────────────────────────────────── */
.modal-notes-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.modal-note-entry {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.modal-note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.modal-note-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}
.modal-note-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 6px 0;
  display: block;
}

/* ── Note add area ──────────────────────────────────────────────────────────── */
.note-add-area {
  flex-shrink: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Notes tab layout ────────────────────────────────────────────────────────── */
.notes-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.notes-tab-filters {
  display: flex;
  gap: 6px;
}
.ntf-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.ntf-btn:hover { border-color: var(--accent); color: var(--text); }
.ntf-btn.active { background: rgba(20,150,255,0.12); border-color: var(--accent); color: var(--accent); }

.notes-tab-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .notes-tab-layout { grid-template-columns: 1fr; }
}
.notes-tab-list-col { display: flex; flex-direction: column; gap: 10px; }
.notes-tab-compose-col {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  position: sticky;
  top: 16px;
}
.notes-tab-list { display: flex; flex-direction: column; gap: 10px; }
.notes-tab-entry {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.notes-tab-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* ── Topbar Teams/Settings buttons ───────────────────────────────────────────── */
#topbarTeamsBtn, #topbarSettingsBtn { font-size: 12px; }

/* ── Compact Opportunity Cards ───────────────────────────────────────────────── */
.opp-card-compact {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.opp-card-compact:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(20,150,255,0.10);
}
.opp-card-compact-body {
  flex: 1;
  min-width: 0;
}
.opp-card-compact-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.opp-card-compact-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-card-compact-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.opp-card-compact-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.opp-card-compact-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.opp-card-compact-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.opp-card-compact-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 18px;
  padding-left: 12px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.opp-card-compact:hover .opp-card-compact-arrow {
  opacity: 1;
  color: var(--accent);
}

/* ── Opp Detail Modal ────────────────────────────────────────────────────────── */
.od-modal {
  display: flex;
  flex-direction: column;
  height: 84vh;
  min-height: 0;
}
.od-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  flex-shrink: 0;
}
.od-modal-title-block {
  flex: 1;
  min-width: 0;
}
.od-modal-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.od-modal-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

/* Tab bar */
.od-tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  padding: 0 2px;
}
.od-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 16px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.od-tab-btn:hover { color: var(--text); }
.od-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Tab content container */
.od-tab-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.od-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 16px 2px 4px;
}
.od-panel.active { display: block; }

/* Overview panel */
.od-overview-body { display: flex; flex-direction: column; gap: 16px; }
.od-field { margin-bottom: 10px; }
.od-field-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.od-field-value { font-size: 14px; color: var(--text); }
.od-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
}
.od-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.od-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.od-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.od-contact-title { color: var(--muted); font-size: 12px; }

/* Edit panel */
.od-edit-body { display: flex; flex-direction: column; gap: 12px; }
.od-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) { .od-edit-grid { grid-template-columns: 1fr; } }
.od-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Tasks / Next Steps panel */
.od-items-body { display: flex; flex-direction: column; gap: 12px; }
.od-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.od-items-progress {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 4px 10px;
}
.od-items-list { display: flex; flex-direction: column; gap: 6px; }
.od-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  transition: opacity 0.15s;
}
.od-item-done { opacity: 0.55; }
.od-item-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}
.od-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.od-item-text {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.od-item-done .od-item-text { text-decoration: line-through; color: var(--muted); }
.od-item-due {
  font-size: 11px;
  color: var(--muted);
}
.od-item-del {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.od-item-del:hover { opacity: 1; color: var(--danger); }
.od-item-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.od-item-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 7px 10px;
}
.od-item-input:focus { outline: none; border-color: var(--accent); }
.od-item-due-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  padding: 7px 8px;
  width: 130px;
}
.od-item-due-input:focus { outline: none; border-color: var(--accent); }

/* Notes panel inside opp detail modal */
.od-notes-body { display: flex; flex-direction: column; gap: 14px; }

/* ── Opp Item chips (status, assignee, due) ───────────────────────────────────── */
.od-item-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.od-status-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.od-status-not-started { background: rgba(122,155,191,0.15); color: #7a9bbf; }
.od-status-in-progress { background: rgba(20,150,255,0.15); color: var(--accent); }
.od-status-blocked { background: rgba(255,80,80,0.15); color: #ff5050; }
.od-status-complete { background: rgba(46,213,115,0.15); color: var(--good); }

.od-assigned-chip {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 8px;
  padding: 2px 7px;
  border: 1px solid var(--border);
}

/* ── Opp Item add form ────────────────────────────────────────────────────────── */
.od-item-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.od-item-add-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.od-item-status-sel,
.od-item-assign-sel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  padding: 6px 8px;
  cursor: pointer;
}
.od-item-status-sel:focus,
.od-item-assign-sel:focus { outline: none; border-color: var(--accent); }
.od-item-assign-other {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  padding: 6px 8px;
  width: 110px;
}
.od-item-assign-other:focus { outline: none; border-color: var(--accent); }
.od-item-edit-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0 3px;
  opacity: 0.45;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}
.od-item-edit-btn:hover { opacity: 1; color: var(--accent); }
.od-item-due-empty { color: var(--border); font-style: italic; }
.od-item-edit-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ── My Dashboard ─────────────────────────────────────────────────────────── */
.myd-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 0 24px;
  max-width: 1400px;
}
.myd-header { margin-bottom: 4px; }

.myd-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .myd-kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .myd-kpi-row { grid-template-columns: repeat(2, 1fr); } }
.myd-kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.myd-kpi-val {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.myd-kpi-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.myd-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1000px) { .myd-body { grid-template-columns: 1fr; } }

.myd-col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Action items */
.myd-actions-col { display: flex; flex-direction: column; gap: 16px; }
.myd-action-group { display: flex; flex-direction: column; gap: 6px; }
.myd-group-header {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.myd-group-overdue { background: rgba(255,80,80,0.12); color: #ff5050; }
.myd-group-soon { background: rgba(255,193,7,0.15); color: #e6b800; }
.myd-group-open { background: rgba(122,155,191,0.12); color: var(--muted); }

.myd-item-row {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.myd-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.myd-item-kind {
  font-size: 10px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.myd-item-text {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.myd-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.myd-item-opp {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}
.myd-item-acct {
  font-size: 11px;
  color: var(--muted);
}
.myd-item-assign {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 6px;
  border: 1px solid var(--border);
}
.myd-item-due {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

/* Account overview */
.myd-accounts-col { display: flex; flex-direction: column; }
.myd-account-grid { display: flex; flex-direction: column; gap: 8px; }
.myd-account-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.myd-account-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(20,150,255,0.10);
}
.myd-acc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.myd-acc-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.myd-acc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.myd-acc-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.myd-acc-lbl {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.myd-acc-arrow {
  color: var(--muted);
  font-size: 18px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.myd-account-card:hover .myd-acc-arrow { opacity: 1; color: var(--accent); }

/* ── Partners Page ────────────────────────────────────────────────────────────── */
.ptrs-wrap { display: flex; flex-direction: column; gap: 20px; padding: 4px 0 24px; max-width: 1200px; }
.ptrs-header { display: flex; align-items: center; justify-content: space-between; }
.ptrs-grid { display: flex; flex-direction: column; gap: 12px; }

.ptr-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ptr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.ptr-card-identity { display: flex; align-items: center; gap: 12px; }
.ptr-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: var(--bg); }
.ptr-logo-sm { width: 28px; height: 28px; }
.ptr-logo-placeholder {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #1496ff, #6a5bff);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.ptr-logo-placeholder.ptr-logo-sm { width: 28px; height: 28px; font-size: 13px; }
.ptr-name { font-size: 15px; font-weight: 700; color: var(--text); }
.ptr-meta { display: flex; align-items: center; gap: 10px; margin-top: 3px; flex-wrap: wrap; }
.ptr-type-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  background: rgba(20,150,255,0.12); color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ptr-stat { font-size: 12px; color: var(--muted); }
.ptr-card-actions { display: flex; align-items: center; gap: 6px; }
.ptr-description { padding: 0 16px 12px; font-size: 13px; color: var(--muted); }

.ptr-card-body { border-top: 1px solid var(--border); padding: 16px; background: var(--bg); }
.ptr-body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .ptr-body-grid { grid-template-columns: 1fr; } }
.ptr-body-col { display: flex; flex-direction: column; gap: 8px; }
.ptr-body-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ptr-body-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.ptr-contact-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.ptr-contact-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ptr-contact-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ptr-contact-title { font-size: 11px; color: var(--muted); }
.ptr-contact-email { font-size: 11px; color: var(--accent); text-decoration: none; }
.ptr-contact-focus { font-size: 10px; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 1px 6px; border: 1px solid var(--border); margin-top: 2px; align-self: flex-start; }
.ptr-contact-actions { display: flex; gap: 4px; flex-shrink: 0; }

.ptr-account-link-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
}
.ptr-acc-link-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.ptr-acc-link-type { font-size: 10px; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 2px 7px; border: 1px solid var(--border); white-space: nowrap; }
.ptr-unlink-acc-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 4px; opacity: 0.6; }
.ptr-unlink-acc-btn:hover { opacity: 1; color: var(--danger); }

/* Opp detail partners tab */
.od-partners-body { display: flex; flex-direction: column; gap: 10px; }
.od-partner-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.od-partner-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.od-partner-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.od-partner-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.od-partner-add-sel, .od-partner-add-role {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 12px; padding: 7px 8px; cursor: pointer;
}
.od-partner-add-sel { flex: 1; min-width: 160px; }
.od-partner-add-sel:focus, .od-partner-add-role:focus { outline: none; border-color: var(--accent); }

/* ── M365 Settings ────────────────────────────────────────────────────────────── */
.m365-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.m365-status-badge.connected {
  background: rgba(46,213,113,0.12);
  border-color: rgba(46,213,113,0.35);
  color: #2ecc71;
}

/* ── Calendar button on task items ───────────────────────────────────────────── */
.od-item-cal-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.od-item-cal-btn:hover { opacity: 1; }

/* ── Opp Files Tab ────────────────────────────────────────────────────────────── */
.od-files-body { padding: 16px; }
.od-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.od-files-header h4 { margin: 0; font-size: 14px; font-weight: 600; }
.od-file-upload-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.od-files-list { display: flex; flex-direction: column; gap: 8px; }
.od-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--panel-2, #1d2537);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 12px;
}
.od-file-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.od-file-icon { font-size: 18px; flex-shrink: 0; }
.od-file-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.od-file-name:hover { text-decoration: underline; }
.od-file-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ── Opp AI Summary section ───────────────────────────────────────────────────── */
.od-summary-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.od-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.od-summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.od-summary-age {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.od-summary-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  background: var(--panel-2, #1d2537);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  white-space: pre-wrap;
}
.od-summary-empty { margin: 6px 0 0; }
.od-summary-guide-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.od-summary-instruction {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 9px 12px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
}
.od-summary-instruction:focus { outline: none; border-color: var(--accent); }
.od-summary-guide-actions { display: flex; gap: 8px; align-items: center; }
.od-summary-status { font-size: 12px; color: var(--danger); margin-top: 4px; min-height: 16px; }

/* Summary snippet on compact opp card */
.opp-summary-preview {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 5px;
  margin-bottom: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Org chart views (tabs swap the full chart area) ── */
.org-tabs-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.org-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.org-tab { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; color: var(--text-dim); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: color .12s, border-color .12s; }
.org-tab:hover { color: var(--text); }
.org-tab.is-on { color: var(--text); border-bottom-color: var(--accent); }
.org-tab:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(20,150,255,.5); border-radius: 6px 6px 0 0; }
.org-tab-count { font-size: 11px; font-weight: 700; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.org-tab.is-on .org-tab-count { background: rgba(20,150,255,.18); color: #8fbcf3; }
.org-tabs-row #addSupporterBtn,
.org-tabs-row #addOrgPartnerBtn { margin-bottom: 8px; }
.view-toggle[hidden] { display: none; }

.team-empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.team-role-section {
  margin-bottom: 16px;
}

.team-members-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.team-member-card {
  transition: transform 0.15s, border-color 0.15s;
}

.team-member-card:hover {
  transform: translateY(-2px);
}

.team-member-card .org-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.team-member-card .org-card .oav { display: block; margin: 0 auto 8px; }

.team-member-card:hover .org-card {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 4px;
}

.team-role {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.team-email {
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-tag {
  display: inline-block;
  font-size: 10px;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ═══ Outreach design system (SDR queue, workspace, sent log, dashboard) ═══ */

:root {
  color-scheme: dark;
  --muted: var(--text-dim);
  --danger: var(--bad);
  --ring: 0 0 0 2px rgba(20, 150, 255, 0.5);
}
select option, select optgroup { background: var(--panel-2); color: var(--text); }

.ico { flex-shrink: 0; display: inline-block; vertical-align: -0.15em; }
.ico.dim { opacity: 0.55; }

.okpi:focus-visible, .sdr-row:focus-visible, .opill-btn:focus-visible, .ochip:focus-visible,
.seg-btn:focus-visible, .angle-card:focus-visible, .pop-item:focus-visible, .oicon-btn:focus-visible,
.link-btn:focus-visible, .fu-item:focus-visible, .ofeed-item:focus-visible, .viz-col:focus-visible,
.ofunnel-row:focus-visible, .sent-row:focus-visible, .tl-outcome:focus-visible, .viz-toggle:focus-visible,
.ow-close:focus-visible { outline: none; box-shadow: var(--ring); }

/* ── Page head ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.01em; }
.page-sub { margin: 0; color: var(--text-dim); font-size: 13px; max-width: 720px; line-height: 1.5; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; color: var(--text-dim); min-width: 240px; }
.search-box:focus-within { border-color: var(--accent); }
.search-box input { background: none; border: none; color: var(--text); padding: 9px 0; font-size: 13px; width: 100%; outline: none; }

/* ── Pills & tones ── */
.opill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; font-family: inherit; }
.opill-sm { font-size: 11px; padding: 2px 7px; gap: 5px; }
.opill .tone-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.opill-btn { cursor: pointer; }
.opill-btn:hover { filter: brightness(1.18); }
.opill-caret { opacity: 0.7; margin-left: -1px; }
.tone-neutral { background: rgba(154, 165, 186, 0.14); color: #c3cad8; }
.tone-info    { background: rgba(57, 135, 229, 0.16); color: #8fbcf3; }
.tone-accent  { background: rgba(106, 91, 255, 0.18); color: #b6adff; }
.tone-good    { background: rgba(46, 204, 113, 0.14); color: #72dfa2; }
.tone-win     { background: rgba(46, 204, 113, 0.22); color: #a5f0c6; border-color: rgba(46, 204, 113, 0.45); }
.tone-warn    { background: rgba(245, 166, 35, 0.15); color: #f5c46e; }
.tone-bad     { background: rgba(255, 92, 92, 0.14); color: #ff9a9a; }
.tone-ghost   { background: transparent; color: var(--text-dim); border: 1px dashed var(--border); }
.tone-text-good { color: var(--good); }
.tone-text-bad { color: var(--bad); }
.tone-swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sw-neutral { background: #9aa5ba; }
.sw-info { background: #3987e5; }
.sw-accent { background: #6a5bff; }
.sw-good, .sw-win { background: #2ecc71; }
.sw-warn { background: #f5a623; }
.sw-bad { background: #ff5c5c; }

.ch-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.ch-badge .ico { color: var(--ch); }

.oav { border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.oav-initials { display: inline-grid; place-items: center; background: linear-gradient(135deg, rgba(20, 150, 255, 0.28), rgba(106, 91, 255, 0.28)); color: #dbe6ff; font-weight: 700; }

.tier-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.tier-a { background: rgba(46, 204, 113, 0.18); color: #72dfa2; }
.tier-b { background: rgba(57, 135, 229, 0.18); color: #8fbcf3; }
.tier-c { background: rgba(154, 165, 186, 0.16); color: #c3cad8; }
.tier-empty { margin: 0; font-size: 12px; white-space: nowrap; }

.due-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.due-overdue { background: rgba(255, 92, 92, 0.14); color: #ff9a9a; }
.due-today { background: rgba(245, 166, 35, 0.15); color: #f5c46e; }
.due-soon { background: rgba(57, 135, 229, 0.14); color: #8fbcf3; }
.due-later, .due-none { color: var(--text-dim); padding-left: 0; }

.oempty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; color: var(--text-dim); font-size: 13px; }
.oempty .ico { opacity: 0.75; }
.oempty .hint { margin: 0; }
.oempty-compact { padding: 18px 8px; }

.oicon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--text-dim); cursor: pointer; text-decoration: none; flex-shrink: 0; }
.oicon-btn:hover { color: var(--accent); background: rgba(20, 150, 255, 0.1); border-color: rgba(20, 150, 255, 0.3); }
.oicon-btn.is-copied, .btn.is-copied { color: var(--good); }
.link-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; padding: 2px 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
.link-danger { color: var(--text-dim); }
.link-danger:hover, .link-danger.is-confirming { color: var(--bad); }
.btn-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 6px; gap: 4px; }

/* ── Segmented controls & chips ── */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 7px; border: none; background: none; color: var(--text-dim); font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 7px; cursor: pointer; transition: background 0.12s, color 0.12s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.seg-lg { display: flex; }
.seg-lg .seg-btn { flex: 1; justify-content: center; padding: 9px 12px; font-size: 13px; }
.seg-ch .ico { color: var(--ch); }
.seg-ch.is-on { box-shadow: inset 0 -2px 0 var(--ch), 0 1px 3px rgba(0, 0, 0, 0.35); }

.ochip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ochip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.ochip:hover { border-color: #3f4b66; background: var(--panel-2); }
.ochip.is-on { border-color: var(--accent); background: rgba(20, 150, 255, 0.14); }
.ochip .ico { color: var(--ch, currentColor); }
.ochip.is-busy { opacity: 0.6; pointer-events: none; }
.ochip-sm { padding: 3px 9px; font-size: 12px; }
.ochip-count { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; background: var(--panel-2); border-radius: 999px; padding: 0 6px; }
.ochip.ochip-tone { background: var(--bg); color: var(--text); border-color: var(--border); }
.ochip.ochip-tone .tone-dot { width: 7px; height: 7px; border-radius: 50%; }
.ochip-tone.tone-neutral .tone-dot { background: #9aa5ba; }
.ochip-tone.tone-info .tone-dot { background: #3987e5; }
.ochip-tone.tone-good .tone-dot, .ochip-tone.tone-win .tone-dot { background: #2ecc71; }
.ochip-tone.tone-bad .tone-dot { background: #ff5c5c; }
.ochip.ochip-tone.is-on.tone-neutral { background: rgba(154, 165, 186, 0.16); border-color: #9aa5ba; }
.ochip.ochip-tone.is-on.tone-info { background: rgba(57, 135, 229, 0.18); border-color: #3987e5; }
.ochip.ochip-tone.is-on.tone-good, .ochip.ochip-tone.is-on.tone-win { background: rgba(46, 204, 113, 0.16); border-color: #2ecc71; }
.ochip.ochip-tone.is-on.tone-bad { background: rgba(255, 92, 92, 0.14); border-color: #ff5c5c; }

/* ── KPI tiles (double as queue filters) ── */
.okpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.okpi { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: var(--text); font-family: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.12s; }
.okpi:hover { border-color: #3a4560; transform: translateY(-1px); }
.okpi.is-on { border-color: var(--accent); background: linear-gradient(180deg, rgba(20, 150, 255, 0.12), rgba(20, 150, 255, 0.02)); box-shadow: inset 0 2px 0 var(--accent); }
.okpi-static { cursor: default; }
.okpi-static:hover { transform: none; border-color: var(--border); }
.okpi-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.okpi-value { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.okpi-of { font-size: 15px; color: var(--text-dim); font-weight: 600; }
.okpi-sub { font-size: 12px; color: var(--text-dim); }
.okpi-alert .okpi-value { color: #ff9a9a; }
.okpi-alert .okpi-head .ico { color: var(--bad); }

/* ── SDR queue ── */
.sdr-list-filters { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.sdr-list-filters label { display: grid; gap: 4px; color: var(--text-dim); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sdr-list-filters select { min-width: 118px; min-height: 34px; padding: 5px 28px 5px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--text); font: inherit; font-size: 12px; text-transform: none; letter-spacing: normal; }
.sdr-queue { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sdr-row { display: grid; grid-template-columns: minmax(240px, 2.4fr) 140px 150px minmax(170px, 1.3fr) 120px 120px 112px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; }
.sdr-row:last-child { border-bottom: none; }
.sdr-row:hover { background: rgba(20, 150, 255, 0.05); }
.sdr-row-head { cursor: default; background: var(--panel-2); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); padding: 9px 16px; }
.sdr-row-head:hover { background: var(--panel-2); }
.sdr-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.sdr-who-text { min-width: 0; }
.sdr-name { font-weight: 700; font-size: 14px; }
.sdr-title { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdr-hook { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdr-hook .ico { color: #8fbcf3; }
.sdr-draft-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; margin-top: 5px; padding: 2px 7px; border: 1px solid rgba(46, 204, 113, .35); border-radius: 999px; background: rgba(46, 204, 113, .1); color: #76dfa1; font-size: 10px; font-weight: 700; }
.sdr-score-action { display: block; margin-top: 5px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 11px; cursor: pointer; }
.sdr-score-action:hover { text-decoration: underline; }
.sdr-score-action:disabled { color: var(--text-dim); cursor: wait; text-decoration: none; }
.sdr-fit { display: flex; align-items: center; gap: 8px; }
.score-meter { width: 48px; height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.score-meter-fill { height: 100%; background: linear-gradient(90deg, #1496ff, #6a5bff); border-radius: 3px; }
.score-num { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.sdr-last { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
.sdr-last-top { display: flex; align-items: center; gap: 8px; }
.sdr-last .hint, .sdr-fit .hint, .sdr-cadence .hint { margin: 0; }
.cadence-count { font-size: 12px; font-weight: 600; }
.cadence-dots { display: flex; gap: 8px; margin-top: 3px; }
.cadence-dot { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cadence-dot .ico { color: var(--ch); }
.sdr-go { text-align: right; }
.sdr-go .btn { pointer-events: none; }
.sdr-row:hover .sdr-go .btn { filter: brightness(1.12); }

@media (max-width: 1180px) {
  .sdr-row { grid-template-columns: minmax(200px, 2fr) 140px minmax(150px, 1.2fr) 110px 104px; }
  .sdr-row > :nth-child(2), .sdr-row > :nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  .sdr-list-filters { width: 100%; margin-left: 0; }
  .sdr-list-filters label { flex: 1; }
  .sdr-list-filters select { width: 100%; min-width: 0; }
  .sdr-row { grid-template-columns: 1fr auto; }
  .sdr-row > :not(:first-child):not(:nth-child(6)) { display: none; }
  .sdr-row-head { display: none; }
}

/* ── Popover menu & toast ── */
.pop-menu { position: fixed; z-index: 1200; min-width: 210px; max-width: 280px; background: #1b2335; border: 1px solid #33405a; border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); animation: popIn 0.12s ease-out; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } }
.pop-menu-title { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); padding: 6px 8px 4px; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; background: none; color: var(--text); font-size: 13px; font-family: inherit; border-radius: 6px; cursor: pointer; text-align: left; }
.pop-item:hover, .pop-item:focus-visible { background: rgba(20, 150, 255, 0.14); box-shadow: none; }
.pop-item.is-active { font-weight: 700; }
.pop-item-label { flex: 1; }
.pop-check { color: var(--accent); }
.pop-input { width: 100%; box-sizing: border-box; margin: 4px 0 8px; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.pop-input:focus { outline: none; border-color: var(--accent); }
.pop-input.is-invalid { border-color: var(--bad); }
.pop-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 0 2px 2px; }

.toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: #1b2335; border: 1px solid #33405a; color: var(--text); font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: none; }
.toast-good .ico { color: var(--good); }
.toast-bad { border-color: rgba(255, 92, 92, 0.5); }
.toast-bad .ico { color: var(--bad); }

/* ── Outreach workspace ── */
.ow-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(1360px, 96vw); height: min(900px, 94vh); background: var(--bg); border: 1px solid #2f3a52; border-radius: 14px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.ow-header { display: flex; align-items: center; gap: 24px; padding: 16px 20px; background: linear-gradient(180deg, #19223a, #161d2c); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ow-id { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.ow-id-text { min-width: 0; }
.ow-id h2 { margin: 0; font-size: 19px; }
.ow-id-sub { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 13px; margin-top: 2px; flex-wrap: wrap; }
.ow-dot { opacity: 0.5; }
.ow-head-meta { display: flex; gap: 22px; align-items: flex-start; }
.ow-meta-block { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.ow-meta-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); }
.ow-meta-val { font-size: 13px; font-weight: 600; line-height: 24px; }
.ow-touchno { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 24px; }
.ow-close { background: none; border: 1px solid transparent; color: var(--text-dim); border-radius: 8px; padding: 6px; cursor: pointer; display: grid; place-items: center; }
.ow-close:hover { color: var(--text); background: var(--panel-2); border-color: var(--border); }
.ow-loading { display: flex; align-items: center; gap: 10px; color: var(--text-dim); padding: 6px 0; }
.ow-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 20px; background: rgba(245, 166, 35, 0.08); border-bottom: 1px solid rgba(245, 166, 35, 0.25); color: #f0dcb6; font-size: 12.5px; line-height: 1.5; }
.ow-banner .ico { color: var(--warn); margin-top: 2px; }

.ow-body { display: grid; grid-template-columns: 300px minmax(0, 1fr) 350px; min-height: 0; }
.ow-col { overflow-y: auto; min-height: 0; padding: 18px; }
.ow-intel { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.ow-composer { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.ow-history { background: var(--panel); border-left: 1px solid var(--border); padding: 0; }
.ow-col-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }

.ow-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.ow-card-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.ow-card-count { margin-left: auto; background: var(--panel-2); color: var(--text); border-radius: 999px; padding: 0 7px; font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ow-card-count:empty { display: none; }
.ow-reach-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: var(--text-dim); min-height: 28px; }
.ow-reach-row + .ow-reach-row { border-top: 1px solid rgba(42, 51, 72, 0.6); }
.ow-reach-val { flex: 1; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-reach-val:hover { color: var(--accent); }
.ow-reach-row.is-missing { opacity: 0.6; font-style: italic; }
.ow-channel-tally { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tally { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-dim); }
.tally .ico { color: var(--ch); }
.tally strong { color: var(--text); font-variant-numeric: tabular-nums; }
.ow-hooks { display: flex; flex-direction: column; gap: 8px; }
.ow-hook { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--panel); }
.ow-hook-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.ow-hook-title { font-size: 13px; font-weight: 700; line-height: 1.35; }
.fit-chip { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(106, 91, 255, 0.18); color: #b6adff; }
.ow-hook-summary { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ow-hook-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.ow-hook-foot .hint { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-hook-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ow-empty-mini { display: flex; gap: 8px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.ow-sub-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-dim); margin: 10px 0 6px; }
.otag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.otag { font-size: 11.5px; padding: 2px 8px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-pains { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text); line-height: 1.5; }

.ow-step { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.ow-step-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ow-step-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(20, 150, 255, 0.16); color: #8fbcf3; font-size: 11px; font-weight: 800; }
.ow-step-hint { font-weight: 500; color: var(--text-dim); font-size: 12px; }
.angle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.angle-card { display: flex; gap: 9px; align-items: flex-start; text-align: left; padding: 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; font-family: inherit; transition: border-color 0.12s, background 0.12s; }
.angle-card:hover { border-color: #3f4b66; }
.angle-card.is-on { border-color: var(--accent); background: rgba(20, 150, 255, 0.1); }
.angle-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--panel-2); color: #8fbcf3; flex-shrink: 0; }
.angle-card.is-on .angle-icon { background: rgba(20, 150, 255, 0.22); color: #cfe4ff; }
.angle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.angle-label { font-size: 12.5px; font-weight: 700; }
.angle-desc { font-size: 11.5px; color: var(--text-dim); line-height: 1.35; }

.ow-input { width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 11px; font-size: 13px; font-family: inherit; line-height: 1.5; resize: vertical; }
.ow-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 150, 255, 0.15); }
.ow-input.flash { animation: owFlash 0.9s ease-out; }
@keyframes owFlash { 0% { box-shadow: 0 0 0 3px rgba(20, 150, 255, 0.6); } 100% { box-shadow: 0 0 0 3px rgba(20, 150, 255, 0); } }
.ow-body-input { min-height: 180px; font-size: 13.5px; }
.ow-gen-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.ow-emoji-toggle {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim);
  cursor: pointer; user-select: none;
}
.ow-emoji-toggle input { accent-color: var(--accent); cursor: pointer; }
.ow-emoji-toggle:hover { color: var(--text); }
.ow-status { font-size: 12.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ow-status:empty { display: none; }

/* ─── Outreach whitepaper PDF export — off-screen render target, always light/print-styled
   regardless of app theme since it's a document meant to be sent, not a UI panel.
   A one-page point-of-view: headline, problem, solution, proof points, CTA — not a call log. ── */
.ow-pdf-page {
  --pdf-accent: #1496ff; --pdf-accent-2: #6a5bff;
  position: fixed; top: 0; left: -10000px; width: 780px;
  background: #ffffff; color: #16202c; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 40px 48px; box-sizing: border-box; overflow: hidden;
}
/* Decorative corner graphic — purely visual texture, sits behind everything */
.pdf-bg-shape {
  position: absolute; top: -120px; right: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,150,255,0.07) 0%, rgba(106,91,255,0.05) 55%, rgba(255,255,255,0) 75%);
  z-index: 0;
}
.pdf-header, .pdf-recipient, .pdf-title, .pdf-subtitle, .pdf-section, .pdf-callout-row, .pdf-cta, .pdf-footer { position: relative; z-index: 1; }
.pdf-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pdf-brand-mark { display: flex; align-items: center; gap: 9px; }
.pdf-brand-mark svg { display: block; }
.pdf-brand { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: #16202c; text-transform: uppercase; }
.pdf-doc-label { font-size: 11px; color: #8a97a6; }
.pdf-recipient { font-size: 11.5px; color: #6b7a8c; padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid #e4eaf0; }
.pdf-recipient strong { color: #16202c; }
.pdf-title { font-size: 25px; font-weight: 800; line-height: 1.25; color: #0a1622; margin-bottom: 8px; }
.pdf-subtitle { font-size: 13.5px; color: #4c5a6a; line-height: 1.5; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, var(--pdf-accent), var(--pdf-accent-2)) 1; border-image-slice: 1; }
.pdf-section-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pdf-accent); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.pdf-section-label svg { flex-shrink: 0; }
.pdf-section { margin-bottom: 16px; padding: 14px 16px; border-radius: 8px; border-left: 3px solid #d8e4f0; }
.pdf-section p { font-size: 12.5px; line-height: 1.65; color: #263544; margin: 0 0 8px; }
.pdf-section p:last-child { margin-bottom: 0; }
.pdf-section-problem { background: #fef6f5; border-left-color: #e0524d; }
.pdf-section-problem .pdf-section-label { color: #c8433e; }
.pdf-section-solution { background: #f4f8fc; border-left-color: var(--pdf-accent); }
.pdf-callout-row { display: flex; gap: 16px; margin-bottom: 22px; margin-top: 20px; align-items: stretch; }
.pdf-proof { flex: 1; background: #f4f8fc; border: 1px solid #d8e4f0; border-radius: 8px; padding: 14px 16px; }
.pdf-proof-item { display: flex; gap: 8px; font-size: 12px; line-height: 1.5; color: #263544; margin-bottom: 8px; align-items: flex-start; }
.pdf-proof-item:last-child { margin-bottom: 0; }
.pdf-proof-check { color: #22c55e; font-weight: 800; flex-shrink: 0; }
.pdf-stat { flex: 0 0 150px; background: #0a1622; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pdf-stat-value { font-size: 30px; font-weight: 800; color: #ffffff; line-height: 1; }
.pdf-stat-label { font-size: 10.5px; color: #9db4c9; margin-top: 6px; line-height: 1.4; }
.pdf-cta { background: linear-gradient(90deg, var(--pdf-accent), var(--pdf-accent-2)); border-radius: 8px; padding: 14px 18px; color: #ffffff; font-size: 13px; font-weight: 700; margin-bottom: 22px; }
.pdf-footer { padding-top: 12px; border-top: 1px solid #e4eaf0; font-size: 10.5px; color: #8a97a6; display: flex; justify-content: space-between; align-items: center; }
.pdf-footer-brand { display: inline-flex; align-items: center; gap: 5px; }
.pdf-footer-brand svg { display: block; }

/* ─── One Pager format — industry-brief table (challenge/question/solution), dark navy
   theme matching the reference collateral style, distinct from the light whitepaper. ── */
.ow-pdf-page.ow-pdf-page-dark {
  background: #0a1622; color: #dce6f0;
}
.ow-pdf-page-dark .pdf-bg-shape { display: none; }
.op-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.op-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--pdf-accent); text-transform: uppercase; }
.op-title { font-size: 25px; font-weight: 800; line-height: 1.3; color: #ffffff; margin-bottom: 18px; }
.op-intro-row { display: flex; gap: 16px; align-items: stretch; background: #101f30; border-radius: 8px; padding: 16px 18px; margin-bottom: 20px; }
.op-intro-text { flex: 1.3; font-size: 12.5px; line-height: 1.6; color: #b8c6d6; }
.op-callout { flex: 1; border-left: 3px solid var(--pdf-accent-2); padding-left: 14px; font-size: 12.5px; line-height: 1.6; color: #dce6f0; }
.op-callout-label { color: #9fb3c8; font-weight: 700; display: block; margin-bottom: 3px; }
.op-callout strong { color: #ffffff; }
.op-table { width: 100%; border-collapse: collapse; }
.op-table thead th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: #dce6f0; background: #16283c; padding: 10px 14px; border-bottom: 1px solid #24384f;
}
.op-table tbody td { padding: 13px 14px; font-size: 11.5px; line-height: 1.55; vertical-align: top; border-bottom: 1px solid #16283c; }
.op-table tbody tr:nth-child(odd) { background: #0d1c2b; }
.op-table tbody tr:nth-child(even) { background: #0a1622; }
.op-td-challenge { font-weight: 700; color: #ffffff; width: 22%; }
.op-td-question { color: #aebdcd; width: 34%; }
.op-td-solution { color: #c3d0dd; width: 44%; }
.op-td-solution strong { color: #ffffff; }
.op-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 10px; color: #6b7f94; }
.op-footer-brand { display: inline-flex; align-items: center; gap: 5px; }
.op-footer-brand svg { display: block; }

/* ─── InfoGraphic format — light theme, structured diagram: numbered stage flow +
   without/with-Dynatrace comparison checklist, visual blocking rather than prose. ── */
.ig-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--pdf-accent); text-transform: uppercase; position: relative; z-index: 1; }
.ig-title { font-size: 23px; font-weight: 800; line-height: 1.28; color: #0a1622; margin: 6px 0 8px; position: relative; z-index: 1; }
.ig-intro { font-size: 12.5px; color: #4c5a6a; line-height: 1.55; margin-bottom: 22px; position: relative; z-index: 1; }

.ig-stage-flow { display: flex; align-items: flex-start; margin-bottom: 24px; position: relative; z-index: 1; }
.ig-stage { flex: 1; text-align: center; padding: 0 6px; min-width: 0; }
.ig-stage-num {
  width: 34px; height: 34px; line-height: 34px; margin: 0 auto 8px;
  border-radius: 50%; background: linear-gradient(135deg, var(--pdf-accent), var(--pdf-accent-2));
  color: #fff; font-weight: 800; font-size: 14px;
}
.ig-stage-label { font-size: 12px; font-weight: 700; color: #16202c; line-height: 1.3; margin-bottom: 4px; }
.ig-stage-desc { font-size: 10.5px; color: #6b7a8c; line-height: 1.4; }
.ig-stage-connector { flex: 0 0 24px; height: 2px; background: linear-gradient(90deg, var(--pdf-accent), var(--pdf-accent-2)); margin-top: 17px; opacity: 0.4; }

.ig-cmp-section { border: 1px solid #d8e4f0; border-radius: 8px; overflow: hidden; margin-bottom: 18px; position: relative; z-index: 1; }
.ig-cmp-header { display: flex; background: #16202c; }
.ig-cmp-header .ig-cmp-cell { color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 10px 16px; }
.ig-cmp-row { display: flex; border-top: 1px solid #e4eaf0; }
.ig-cmp-row:nth-child(even) { background: #f7fafc; }
.ig-cmp-cell { flex: 1; padding: 10px 16px; font-size: 11.5px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
.ig-cmp-left { color: #6b7a8c; }
.ig-cmp-right { color: #16202c; font-weight: 600; border-left: 1px solid #e4eaf0; }
.ig-cmp-icon { flex-shrink: 0; font-weight: 800; font-size: 11px; margin-top: 1px; }
.ig-cmp-icon-bad { color: #c8433e; }
.ig-cmp-icon-good { color: #22c55e; }

.ig-stat { background: #0a1622; border-radius: 8px; padding: 16px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin-bottom: 20px; min-width: 150px; position: relative; z-index: 1; }
.ig-stat-value { font-size: 28px; font-weight: 800; color: #ffffff; line-height: 1; }
.ig-stat-label { font-size: 10.5px; color: #9db4c9; margin-top: 6px; line-height: 1.4; }

.ow-field { margin-bottom: 10px; }
.ow-field[hidden] { display: none; }
.ow-field-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ow-field-head label { font-size: 12px; font-weight: 600; color: var(--text-dim); flex: 1; }
.ow-count { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ow-count.is-over { color: var(--bad); font-weight: 700; }
.ow-draft.is-loading .ow-input { opacity: 0.5; }
.ow-refine { border-top: 1px dashed var(--border); padding-top: 4px; }
.ow-refine-custom { display: flex; gap: 8px; margin-top: 8px; }
.ow-refine .ow-status { margin-top: 8px; }
.ow-log-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.ow-date { margin-top: 8px; width: auto; resize: none; }

.ow-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--panel); }
.ow-log-preview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); min-width: 0; }
.ow-footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ow-footer-actions .btn[hidden] { display: none; }
.ow-pdf-group { display: flex; gap: 6px; align-items: center; }
.ow-pdf-format-select, .ow-pdf-topic-input {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: 12.5px; padding: 8px 10px; height: 36px; box-sizing: border-box;
}
.ow-pdf-topic-input { width: 140px; }
.ow-pdf-format-select:focus, .ow-pdf-topic-input:focus { outline: none; border-color: var(--accent); }

.timeline { padding: 14px 16px 20px; }
.tl-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::after { content: ''; position: absolute; top: 30px; bottom: 2px; width: 2px; background: var(--border); }
.tl-item:last-child .tl-rail::after { display: none; }
.tl-node { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ch); color: var(--ch); }
.tl-content { padding-bottom: 18px; min-width: 0; }
.tl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-channel { font-weight: 700; font-size: 13px; }
.tl-when { font-size: 12px; color: var(--text-dim); }
.tl-flag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #8fbcf3; background: rgba(57, 135, 229, 0.14); padding: 1px 6px; border-radius: 4px; }
.tl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.tl-meta .hint { margin: 0; display: inline-flex; align-items: center; gap: 4px; }
.tl-outcome { display: inline-flex; align-items: center; gap: 3px; background: none; border: none; padding: 0; cursor: pointer; border-radius: 999px; color: var(--text-dim); }
.tl-outcome:hover .opill { filter: brightness(1.2); }
.tl-subject { font-size: 13px; font-weight: 600; margin-top: 8px; }
.tl-body { font-size: 12.5px; color: #c8cfdc; line-height: 1.55; margin-top: 5px; white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.tl-body.is-clamped { max-height: 104px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.tl-latest .tl-body { border-color: rgba(57, 135, 229, 0.45); }
.tl-content > .link-btn { margin-top: 4px; }
.tl-notes { display: flex; gap: 6px; margin-top: 7px; font-size: 12px; color: var(--text-dim); font-style: italic; line-height: 1.5; }
.tl-notes .ico { margin-top: 2px; font-style: normal; }
.tl-actions { display: flex; gap: 14px; margin-top: 6px; opacity: 0; transition: opacity 0.12s; }
.tl-item:hover .tl-actions, .tl-item:focus-within .tl-actions { opacity: 1; }
@media (hover: none) { .tl-actions { opacity: 1; } }
.ow-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 20px; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.ow-empty strong { color: var(--text); }
.ow-empty .hint { margin: 0; }

@media (max-width: 1250px) {
  .angle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ow-log-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .ow-panel { height: 96vh; }
  .ow-body { grid-template-columns: 1fr; overflow-y: auto; }
  .ow-col { overflow: visible; }
  .ow-composer { order: -1; }
  .ow-intel { border-right: none; border-top: 1px solid var(--border); }
  .ow-history { border-left: none; border-top: 1px solid var(--border); }
  .ow-footer { flex-wrap: wrap; }
}

/* ── Sent log ── */
.sent-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.table-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sent-table-v2 th { background: var(--panel-2); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; padding: 10px 12px; }
.sent-table-v2 td { padding: 11px 12px; vertical-align: top; }
.sent-table-v2 .hint { margin: 2px 0 0; }
.sent-row { cursor: pointer; transition: background 0.12s; }
.sent-row:hover, .sent-row.is-open { background: rgba(20, 150, 255, 0.05); }
.sent-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sent-contact { font-weight: 600; }
.sent-recipient { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sent-msg { max-width: 460px; }
.sent-subject { font-weight: 600; }
.sent-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px; }
.sent-source { white-space: nowrap; }
.src-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; margin-right: 6px; }
.src-sdr { background: rgba(106, 91, 255, 0.18); color: #b6adff; }
.src-pitch { background: rgba(57, 135, 229, 0.16); color: #8fbcf3; }
.src-by { font-size: 12px; color: var(--text-dim); }
.sent-detail td { background: var(--bg); padding: 0 12px 12px; }
.sent-body { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.55; color: var(--text); }

/* ── Dashboard: outreach ── */
.dash-section-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; flex-wrap: wrap; }
.dash-section-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.dash-section-head .hint { margin: 0; }
.dash-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dash-grid-3 { grid-template-columns: 1fr; } }

/* ─── Dashboard sub-tabs ─────────────────────────────────────────────────── */
.dash-subtab-bar { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dash-subtab-btn {
  background: none; border: none; color: var(--text-dim); padding: 9px 14px;
  cursor: pointer; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap;
}
.dash-subtab-btn.active { color: var(--text); border-color: var(--accent); }
.dash-subtab-btn:hover:not(.active) { color: var(--text); }
.dash-subpanel { display: none; }
.dash-subpanel.active { display: block; }
.dash-scope-select {
  font-size: 12px; font-weight: 600; color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; cursor: pointer; max-width: 260px;
}

/* Generic bar-chart rows reused across pipeline/use-case/POC/event/activity breakdowns */
.dbar-rows { display: flex; flex-direction: column; gap: 10px; }
.dbar-row { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 8px; }
.dbar-row.clickable { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.dbar-row.clickable:hover { background: var(--panel-2); }
.dbar-label { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbar-wrap { height: 16px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.dbar { height: 100%; border-radius: 4px; transition: width 0.5s ease; opacity: 0.85; min-width: 3px; }
.dbar-count { font-size: 13px; font-weight: 700; color: var(--text); text-align: right; }

/* Clickable list rows inside dashboard mini-tables */
.dash-row-click { cursor: pointer; }
.dash-row-click:hover td { background: var(--panel-2); }

.dash-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.dash-kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.dash-kpi-value { font-size: 20px; font-weight: 700; }
.dash-kpi-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.viz-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -6px 0 14px; flex-wrap: wrap; }
.viz-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.viz-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text); }
.viz-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }
.viz-toggle { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.viz-toggle:hover { color: var(--text); border-color: #3f4b66; }
.viz-plot { position: relative; height: 190px; margin-left: 26px; }
.viz-grid { position: absolute; inset: 0 0 22px 0; pointer-events: none; }
.viz-gridline { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(42, 51, 72, 0.7); }
.viz-gridline span { position: absolute; right: 100%; top: -7px; padding-right: 6px; font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.viz-cols { position: absolute; inset: 0; display: flex; gap: 8px; }
.viz-col { flex: 1; display: flex; flex-direction: column; min-width: 0; border-radius: 6px; }
.viz-hit { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding: 0 3px; border-radius: 6px 6px 0 0; transition: background 0.12s; }
.viz-col:hover .viz-hit, .viz-col:focus-visible .viz-hit { background: rgba(255, 255, 255, 0.04); }
.viz-stack { width: 100%; max-width: 34px; height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; }
.viz-seg { width: 100%; min-height: 2px; flex-shrink: 0; }
.viz-stack > .viz-seg:last-child { border-radius: 4px 4px 0 0; }
.viz-xlabel { height: 22px; line-height: 22px; text-align: center; font-size: 10.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-col.is-current .viz-xlabel { color: var(--text); font-weight: 700; }
.viz-tip { position: fixed; z-index: 1300; pointer-events: none; background: #0b111c; border: 1px solid #33405a; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.1s; min-width: 150px; }
.viz-tip.show { opacity: 1; }
.viz-tip-title { font-weight: 700; margin-bottom: 6px; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; padding: 1px 0; color: var(--text-dim); }
.viz-tip-row strong { margin-left: auto; padding-left: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.viz-tip-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 5px; }
.viz-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.viz-table th, .viz-table td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.viz-table th:first-child, .viz-table td:first-child { text-align: left; }
.viz-table th { color: var(--text-dim); font-weight: 600; font-size: 11.5px; }

.ofunnel { display: flex; flex-direction: column; gap: 14px; }
.ofunnel-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 130px; gap: 12px; align-items: center; border-radius: 6px; }
.ofunnel-label { font-size: 12.5px; font-weight: 600; }
.ofunnel-track { height: 14px; background: var(--panel-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.ofunnel-bar { height: 100%; background: #3987e5; border-radius: 0 4px 4px 0; transition: width 0.4s ease; }
.ofunnel-row:hover .ofunnel-bar { filter: brightness(1.15); }
.ofunnel-val { display: flex; flex-direction: column; line-height: 1.25; }
.ofunnel-val strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.ofunnel-val .hint { margin: 0; font-size: 11.5px; }

.chan-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.chan-table th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: 11.5px; padding: 0 6px 8px; }
.chan-table td { padding: 9px 6px; border-top: 1px solid var(--border); }
.chan-table .hint { margin: 0; display: inline; }
.chan-bar-wrap { display: flex; align-items: center; gap: 8px; }
.chan-bar { height: 8px; border-radius: 0 4px 4px 0; min-width: 2px; }
.chan-num { font-weight: 700; font-variant-numeric: tabular-nums; }

.fu-list, .ofeed { display: flex; flex-direction: column; gap: 2px; }
.fu-item, .ofeed-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 8px; color: var(--text); font-family: inherit; cursor: pointer; }
.fu-item:hover, .ofeed-item:hover { background: var(--panel-2); }
.fu-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fu-name { font-weight: 600; font-size: 13px; }
.fu-who .hint { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-last { display: flex; align-items: center; gap: 6px; }
.ofeed-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ch); color: var(--ch); flex-shrink: 0; }
.ofeed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ofeed-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ofeed-sub { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofeed-when { margin: 0; text-align: right; white-space: nowrap; font-size: 11.5px; }

/* Workspace sits above the floating Ask Prowler button (z 1000); menus/toasts/tooltips above that. */
#sdrOutreachModal { z-index: 1050; }
.ow-col, .ow-body { scrollbar-width: thin; scrollbar-color: #33405a transparent; }
.ow-col::-webkit-scrollbar, .ow-body::-webkit-scrollbar { width: 8px; }
.ow-col::-webkit-scrollbar-thumb, .ow-body::-webkit-scrollbar-thumb { background: #33405a; border-radius: 4px; }

/* ── Supporting Dynatracers ── */
.sp-group-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; }
.sp-group-count { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); color: var(--text-dim); }
.sp-card .org-card { cursor: default; }
.sp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.sp-card-foot .hint { margin: 0; font-size: 11px; }
.sp-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 48px 16px; }
.sp-empty-state .hint { margin: 0 0 6px; }
.sp-empty-title { font-weight: 700; font-size: 15px; }

#supporterModal { z-index: 1050; }
.sp-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 94vw); max-height: 86vh; display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid #2f3a52; border-radius: 14px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.sp-head { display: flex; justify-content: space-between; gap: 12px; }
.sp-head h2 { margin: 0 0 4px; font-size: 18px; }
.sp-head .hint { margin: 0; }
.sp-search { min-width: 0; }
.sp-list { flex: 1; min-height: 160px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 4px; scrollbar-width: thin; scrollbar-color: #33405a transparent; }
.sp-person { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 8px 10px; color: var(--text); font: inherit; cursor: pointer; }
.sp-person:hover:not(:disabled) { background: var(--panel-2); }
.sp-person.is-on { background: rgba(20,150,255,.12); }
.sp-person:disabled { opacity: .5; cursor: default; }
.sp-person:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(20,150,255,.5); }
.sp-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #3f4b66; font-size: 12px; font-weight: 800; color: white; flex-shrink: 0; }
.sp-person.is-on .sp-check { background: var(--accent); border-color: var(--accent); }
.sp-av { width: 30px; height: 30px; font-size: 12px; border-radius: 50%; }
.sp-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sp-who .hint { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-name { font-weight: 600; font-size: 13px; }
.sp-note { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.sp-empty { padding: 24px; text-align: center; color: var(--text-dim); font-size: 13px; }
.sp-role-label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.sp-role-label .hint { display: inline; margin: 0; font-weight: 400; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sp-foot .hint { margin: 0; }
.sp-actions { display: flex; gap: 8px; }
/* The hidden attribute must win over .btn's explicit display. */
.btn[hidden] { display: none; }
.sp-head .ow-close { font-size: 24px; line-height: 1; width: 34px; height: 34px; flex-shrink: 0; }
.org-off-tab { display: none !important; }
/* Team/supporter charts are card grids, not a hierarchy: drop org-tree connectors and
   give the grid a real width (the zoom container otherwise shrink-wraps to one column). */
.team-org-tree { width: 1040px; }
.team-members-list { list-style: none; margin: 0; padding: 0; }
.team-member-card .org-card { margin-top: 0; }
.team-member-card .org-card::before { display: none; }

/* ── Conversation goal + contact-card links ── */
.ow-goal-label { margin-top: 0; }
.ow-purposes { margin-bottom: 4px; }
.ow-purpose .ico { color: #8fbcf3; }
.ow-purpose.is-on .ico { color: #cfe4ff; }
.ow-suggested { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #72dfa2; background: rgba(46,204,113,.14); border-radius: 4px; padding: 1px 5px; margin-left: 2px; }
#owPurposeHint strong { color: var(--text); font-weight: 600; }
#owPurposeHint .link-btn { font-size: 12px; }
.ow-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ow-card-link { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ow-card-link:hover { border-color: var(--accent); color: #cfe4ff; }
.ow-card-link:focus-visible, .sdr-card-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(20,150,255,.5); }
.sdr-name { display: flex; align-items: center; gap: 6px; }
.sdr-card-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text-dim); cursor: pointer; }
.sdr-card-btn:hover { color: var(--accent); background: rgba(20,150,255,.1); border-color: rgba(20,150,255,.3); }
/* Contact card opened from the outreach workspace sits above it (workspace is z 1050). */
#contactDrawer.over-workspace { z-index: 1100; }

.partners-org-trees { padding: 16px; display: flex; flex-direction: column; gap: 8px; }

/* ── Outreach infographic ───────────────────────────────────────────────────── */
.ow-infographic-open { margin-top: 10px; }

#infographicModal { z-index: 1060; }
.ig-panel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(960px, 96vw); max-height: 92vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0;
  background: var(--panel); border: 1px solid #2f3a52; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.ig-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 20px 14px; border-bottom: 1px solid var(--border); }
.ig-head h2 { margin: 0 0 4px; font-size: 18px; }
.ig-head .hint { margin: 0; max-width: 560px; }

.ig-body { display: grid; grid-template-columns: minmax(0, 480px) minmax(260px, 1fr); gap: 22px; padding: 20px; }
.ig-preview-wrap { position: relative; display: flex; justify-content: center; }
.ig-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(11,15,20,0.75); color: #cfe4ff; font-size: 13px; border-radius: 14px;
}
.ig-loading[hidden] { display: none; }

.ig-controls { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ig-field-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-dim); margin: 10px 0 4px; }
.ig-stat-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ig-regenerate-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

.ig-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--panel);
}
.ig-foot .hint { margin: 0; }
.ig-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* The card itself: the exact node captured to PNG. Fixed pixel size so the export
   is deterministic regardless of viewport/zoom. */
.ig-card {
  width: 480px; min-height: 560px;
  background: #0b0f14; color: #f2f5f8;
  border-radius: 10px; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
  --ig-dt: #b4dc00;
  --ig-customer: #b4dc00; /* literal, not var(--ig-dt) — html2canvas's gradient parser chokes on var-in-var here */
}
.ig-accent-bar { height: 7px; background: linear-gradient(90deg, #b4dc00, #b4dc00); }
.ig-card-inner { padding: 28px 30px 24px; display: flex; flex-direction: column; gap: 14px; height: 100%; box-sizing: border-box; }

.ig-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ig-dt-wordmark { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.ig-dt-dot { color: var(--ig-dt); }
.ig-account-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--ig-customer);
  border-radius: 999px; padding: 4px 10px 4px 4px;
}
.ig-account-chip img { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; background: #fff; }
.ig-account-chip span { font-size: 11px; font-weight: 600; color: #e7ebf3; }

.ig-eyebrow {
  display: inline-flex; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ig-dt); background: rgba(180, 220, 0, 0.16);
  border-radius: 999px; padding: 4px 12px;
  min-height: 14px;
}
.ig-headline { margin: 0; font-size: 27px; line-height: 1.2; font-weight: 800; color: #fff; min-height: 1.2em; }

.ig-stat-block {
  display: flex; align-items: baseline; gap: 10px;
  border-left: 3px solid var(--ig-customer); padding-left: 14px; margin: 2px 0;
}
.ig-stat-value { font-size: 40px; font-weight: 800; color: var(--ig-customer); line-height: 1; }
.ig-stat-label { font-size: 12px; color: #9aa5ba; text-transform: uppercase; letter-spacing: 0.05em; }

.ig-subhead { margin: 0; font-size: 15.5px; line-height: 1.55; color: #c3cad8; flex: 1; }

.ig-cta {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  background: var(--ig-dt); color: #0b0f14; font-weight: 700; font-size: 13px;
  border-radius: 999px; padding: 9px 18px;
  min-height: 14px;
}
.ig-cta:not(:empty)::after { content: '\2192'; }
.ig-eyebrow[hidden], .ig-stat-block[hidden], .ig-cta[hidden] { display: none; }

.ig-footer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08);
}
.ig-sender { font-size: 11.5px; color: #9aa5ba; }
.ig-footer-dt { font-size: 10.5px; color: #6b7688; letter-spacing: 0.03em; }

@media (max-width: 820px) {
  .ig-body { grid-template-columns: 1fr; }
  .ig-card { width: 100%; max-width: 480px; }
}

/* ── Events (calendar) ──────────────────────────────────────────────── */
.ev-wrap { display: flex; flex-direction: column; gap: 14px; }
.ev-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.ev-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev-view-toggle { display: flex; gap: 4px; }
.ev-view-toggle .btn { border-radius: 6px; }

.ev-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: rgba(20,150,255,0.05); border: 1px solid var(--border); border-radius: 8px; }
.ev-filters select, .ev-filters input[type="date"], .ev-filters input[type="text"], .ev-filters input:not([type]) {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; padding: 6px 8px; outline: none;
}
.ev-filters select:focus, .ev-filters input:focus { border-color: var(--accent); }

.ev-table th { text-align: left; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); padding: 8px 6px; border-bottom: 1px solid var(--border); }
.ev-table td { padding: 8px 6px; font-size: 12.5px; vertical-align: middle; }
.ev-table td:first-child { font-weight: 500; max-width: none; white-space: nowrap; }
.ev-sortable { cursor: pointer; user-select: none; }
.ev-sortable:hover { color: var(--text); }
.ev-row { cursor: pointer; transition: background 0.1s; }
.ev-row:hover { background: rgba(20,150,255,0.06); }
.ev-title-link { font-weight: 600; }
.ev-url-link { color: var(--accent); text-decoration: none; margin-left: 4px; }
.ev-row-actions { text-align: right; }

.ev-type-badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.ev-type-industry { background: rgba(20,150,255,0.15); color: #6ab8ff; }
.ev-type-account { background: rgba(46,204,113,0.15); color: #4ade80; }
.ev-type-partner { background: rgba(255,169,64,0.15); color: #ffb84d; }
.ev-type-contact { background: rgba(154,110,255,0.15); color: #b795ff; }

.ev-sponsor-badge { color: var(--good); font-weight: 600; font-size: 11.5px; }

/* Calendar */
.ev-cal { display: flex; flex-direction: column; gap: 8px; }
.ev-cal-header { display: flex; align-items: center; gap: 10px; }
.ev-cal-month { font-size: 15px; font-weight: 700; min-width: 160px; text-align: center; }
.ev-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ev-cal-dow { margin-top: 4px; }
.ev-cal-dow-cell { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); text-align: center; padding: 4px 0; }
.ev-cal-cell { min-height: 90px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; background: rgba(255,255,255,0.01); }
.ev-cal-cell:hover { background: rgba(20,150,255,0.06); }
.ev-cal-cell-out { opacity: 0.35; cursor: default; }
.ev-cal-cell-out:hover { background: none; }
.ev-cal-cell-today { border-color: var(--accent); }
.ev-cal-daynum { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.ev-cal-chip { font-size: 10.5px; padding: 1px 5px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ev-cal-more { font-size: 10px; color: var(--text-dim); cursor: pointer; }
.ev-day-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ev-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ev-day-row:last-child { border-bottom: none; }
.ev-day-title { flex: 1; font-size: 13px; font-weight: 500; }

/* Modal form layout */
.form-row-group { display: flex; gap: 12px; }
.form-row-group .form-row { flex: 1; min-width: 0; }

.ev-section { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.ev-section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.ev-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-person-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(20,150,255,0.1); border: 1px solid var(--border); border-radius: 100px; padding: 3px 6px 3px 10px; font-size: 12px; }
.ev-chip-role { color: var(--text-dim); font-size: 11px; }
.ev-chip-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.ev-chip-remove:hover { color: var(--bad); }
.ev-add-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ev-add-row select, .ev-add-row input { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; padding: 6px 8px; outline: none; }
.ev-add-row select:focus, .ev-add-row input:focus { border-color: var(--accent); }

.ev-review-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; margin: 10px 0; }
.ev-review-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.ev-review-row:has(.ev-review-chk:checked) { border-color: var(--accent); background: rgba(20,150,255,0.06); }
.ev-review-row input[type="checkbox"] { margin-top: 3px; }
.ev-review-info { flex: 1; min-width: 0; }
.ev-review-title { font-weight: 600; font-size: 13px; }
.subsidiary-discovery-list { max-height: min(56vh, 560px); }
.subsidiary-research-status { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.subsidiary-research-status .spinner { flex: 0 0 auto; }
.subsidiary-research-status span:last-child { overflow-wrap: anywhere; }
.subsidiary-research-warning { padding: 9px 11px; border-left: 3px solid var(--accent); background: var(--panel); }
.subsidiary-discovery-row p { margin: 6px 0; }
.subsidiary-discovery-row.is-existing { opacity: .75; cursor: default; }
.subsidiary-discovery-sources { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; }
.subsidiary-discovery-sources a { overflow-wrap: anywhere; }

.ev-preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }

.ev-globe-wrap { position: relative; }
.ev-globe-container { width: 100%; height: 560px; border-radius: 10px; overflow: hidden; background: radial-gradient(ellipse at center, #0d1a2e 0%, #060b14 100%); }
.ev-globe-marker { cursor: pointer; transform: translate(-50%, -50%); transition: transform 0.15s; pointer-events: auto; }
.ev-globe-marker:hover { transform: translate(-50%, -50%) scale(1.35); z-index: 2; }
.ev-globe-marker-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 6px 1px currentColor, 0 0 0 2px rgba(255,255,255,0.15); }
.ev-globe-marker-logo, .ev-globe-marker-dt { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ring-color, #6ab8ff); background: #0d1929; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0 8px rgba(0,0,0,0.5); }
.ev-globe-marker-logo img { width: 100%; height: 100%; object-fit: cover; }
.ev-globe-marker-logo.ev-globe-marker-broken { background: var(--ring-color, #6ab8ff); }
.ev-globe-marker-logo.ev-globe-marker-broken img { display: none; }
.ev-globe-marker-dt span { color: #b4dc00; font-size: 9px; font-weight: 800; letter-spacing: 0.02em; }

.ev-globe-tip { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 5; background: #0d1929; border: 1px solid rgba(20,150,255,0.35); border-radius: 8px; padding: 10px 12px; min-width: 180px; max-width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); opacity: 0; transform: translateY(4px); transition: opacity 0.1s, transform 0.1s; }
.ev-globe-tip.visible { opacity: 1; transform: translateY(0); }
.ev-globe-tip-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ev-globe-tip-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-dim); margin-bottom: 3px; }
.ev-globe-tip-hint { font-size: 10.5px; color: var(--accent); margin-top: 4px; }
.contact-globe-marker {
  width: var(--contact-marker-size); height: var(--contact-marker-size); padding: 0;
  display: grid; place-items: center; transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.85); border-radius: 50%;
  background: color-mix(in srgb, var(--contact-marker-color, #1496ff) 80%, transparent); color: #fff;
  font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--contact-marker-color, #1496ff) 22%, transparent), 0 0 16px var(--contact-marker-color, #1496ff);
  cursor: pointer; pointer-events: auto; touch-action: manipulation; transition: transform .15s, box-shadow .15s;
}
.contact-globe-marker:hover, .contact-globe-marker:focus-visible {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--contact-marker-color, #1496ff) 25%, transparent), 0 0 22px var(--contact-marker-color, #1496ff);
}
.contacts-map-summary { display: grid; grid-template-columns: 1fr minmax(220px, 320px); gap: 16px; margin-top: 12px; }
.contacts-map-legend { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.contacts-map-legend > strong { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.contacts-map-legend > span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-dim); }
.contacts-map-legend i, .contacts-globe-role-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--role-color, #1496ff); }
.contacts-map-stats { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.contacts-map-stats > div { min-width: 130px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.contacts-map-stats strong { font-size: 20px; line-height: 1.1; }
.contacts-map-stats span, .contacts-map-places > strong { font-size: 11px; color: var(--text-dim); }
.contacts-map-places { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.contacts-map-places > strong { margin-bottom: 3px; }
.contacts-map-place { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.contacts-map-place:hover span { color: var(--accent); }
.contacts-map-place b { color: var(--accent); font-variant-numeric: tabular-nums; }
.contacts-map-selection { grid-column: 1 / -1; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.contacts-map-selection:has(.contacts-globe-tip-list) { border-color: rgba(20,150,255,.35); }
.contacts-map-selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contacts-map-selection-heading > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contacts-map-selection-heading strong { font-size: 13px; }
.contacts-map-selection-heading span { color: var(--text-dim); font-size: 11px; }
.contacts-map-selection .contacts-globe-tip-list { max-height: 280px; overflow-y: auto; }
.contacts-globe-tip { pointer-events: auto; max-height: min(360px, 60vh); overflow-y: auto; }
.contacts-globe-tip-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.contacts-globe-tip-heading .ev-globe-tip-title { margin-bottom: 2px; }
.contacts-globe-tip-close { flex: 0 0 auto; width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 5px; background: var(--panel); color: var(--text-dim); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.contacts-globe-tip-close:hover { color: var(--text); border-color: var(--accent); }
.contacts-globe-tip-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.contacts-globe-tip-contact { display: grid; grid-template-columns: 9px minmax(0, 1fr) 12px; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.contacts-globe-tip-contact:hover { background: rgba(20,150,255,.1); }
.contacts-globe-tip-contact > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.contacts-globe-tip-contact strong, .contacts-globe-tip-contact small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contacts-globe-tip-contact strong { font-size: 11.5px; }
.contacts-globe-tip-contact small { margin-top: 2px; color: var(--text-dim); font-size: 10.5px; }

.cc-outreach-section { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cc-outreach-heading { display: flex; align-items: center; justify-content: space-between; color: var(--text-dim); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cc-outreach-heading span { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--panel); text-align: center; font-variant-numeric: tabular-nums; }
.cc-outreach-list { display: flex; flex-direction: column; gap: 6px; }
.cc-outreach-link { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: rgba(255,255,255,.02); color: var(--text); text-align: left; cursor: pointer; }
.cc-outreach-link:hover { border-color: var(--accent); background: rgba(20,150,255,.06); }
.cc-outreach-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 10.5px; }
.cc-outreach-subject { overflow: hidden; font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cc-outreach-preview { display: -webkit-box; overflow: hidden; color: var(--text-dim); font-size: 10.5px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cc-outreach-detail { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 10.5px; }
.cc-outreach-all { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.cc-outreach-empty { margin: 0; font-size: 11px; }
.cc-load-error { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; }
.cc-load-error p { margin: 0; font-weight: 700; }
.cc-load-error span { color: var(--text-dim); font-size: 12px; }
.tl-item-focused .tl-content { margin: -5px -7px 13px; padding: 5px 7px 8px; border: 1px solid var(--accent); border-radius: 8px; background: rgba(20,150,255,.07); }
@media (max-width: 700px) {
  .contacts-map-summary { grid-template-columns: 1fr; }
  .contacts-map-stats > div { min-width: 95px; flex: 1; }
  .ev-globe-container { height: 380px; }
}

/* Event detail page — a bigger, more "full screen" overlay than the standard modal */
.ev-detail-overlay .ev-detail-panel {
  background: #0d1929; border: 1px solid rgba(20,150,255,0.2); border-radius: 14px;
  width: min(1080px, 94vw); height: min(860px, 92vh); display: flex; flex-direction: column; overflow: hidden;
}
.ev-detail-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 28px 18px; border-bottom: 1px solid rgba(20,150,255,0.12); gap: 12px; }
.ev-detail-header-main { min-width: 0; }
.ev-detail-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ev-detail-title { font-size: 24px; font-weight: 700; margin: 0 0 8px; line-height: 1.25; }
.ev-detail-title-input { font-size: 24px; font-weight: 700; line-height: 1.25; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text); font-family: inherit; padding: 2px 0; width: 100%; outline: none; }
.ev-detail-title-input:hover, .ev-detail-title-input:focus { border-bottom-color: var(--accent); }
.ev-detail-title-input::placeholder { color: var(--text-dim); font-weight: 500; }
.ev-detail-sub { font-size: 13.5px; color: var(--text-dim); }
.ev-detail-body { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding: 24px 28px; }
.ev-detail-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ev-detail-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; border-left: 1px solid var(--border); padding-left: 24px; }
.ev-detail-row { font-size: 13.5px; display: flex; gap: 8px; }
.ev-detail-label { color: var(--text-dim); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; min-width: 70px; }
.ev-detail-section { display: flex; flex-direction: column; gap: 8px; }
.ev-detail-notes { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.ev-detail-person { display: flex; align-items: center; gap: 10px; }
.ev-detail-person-name { font-size: 13px; font-weight: 600; }
.ev-detail-footer { display: flex; align-items: center; gap: 10px; padding: 16px 28px; border-top: 1px solid rgba(20,150,255,0.12); }
.ev-detail-footer-spacer { flex: 1; }

@media (max-width: 820px) {
  .ev-detail-body { grid-template-columns: 1fr; }
  .ev-detail-side { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 16px; }
  .ev-detail-overlay .ev-detail-panel { width: 96vw; height: 94vh; }
}

@media (max-width: 720px) {
  .form-row-group { flex-direction: column; }
  .ev-cal-cell { min-height: 60px; }
  .ev-globe-container { height: 380px; }
}

/* ── Use Cases + POC (opportunity detail tabs) ──────────────────────────── */
.uc-list { display: flex; flex-direction: column; gap: 8px; }
.uc-card { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); overflow: hidden; }
.uc-card-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: default; }
.uc-cat-badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.uc-card-title { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-score-badge { font-size: 11.5px; font-weight: 700; color: var(--good); background: rgba(46,204,113,0.12); border-radius: 100px; padding: 2px 8px; cursor: help; }
.uc-status-chip { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(154,165,186,0.15); color: #9aa5ba; }
.uc-status-scored { background: rgba(20,150,255,0.15); color: var(--accent); }
.uc-status-validated, .uc-status-poc { background: rgba(255,169,64,0.15); color: #ffb84d; }
.uc-status-won { background: rgba(46,204,113,0.15); color: var(--good); }
.uc-status-dropped { background: rgba(255,92,92,0.15); color: var(--bad); }
.uc-expand-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.uc-card-body { padding: 0 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.uc-questions { display: flex; flex-direction: column; gap: 8px; }
.uc-q-list { display: flex; flex-direction: column; gap: 6px; }
.uc-q-row { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; }
.uc-q-text { flex: 1; min-width: 0; font-size: 12.5px; }
.uc-q-answer { flex: 1.2; min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12.5px; padding: 5px 8px; resize: vertical; font-family: inherit; }
.uc-q-answer:focus { outline: none; border-color: var(--accent); }
.uc-q-add-row { display: flex; gap: 6px; flex-wrap: wrap; }
.uc-q-add-row input[type="text"], .uc-q-add-row select { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12.5px; padding: 6px 8px; }
.uc-q-add-row input[type="text"] { flex: 1; min-width: 160px; }
.uc-card-actions { display: flex; align-items: center; gap: 8px; }
.uc-rationale { margin: 0; }
.uc-inline-form { border: 1px dashed var(--border); border-radius: 8px; padding: 12px; margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }

.poc-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.pc-row { flex-wrap: wrap; }
.pc-status-select { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; padding: 5px 6px; }
.pc-result-notes { flex: 1.4; min-width: 140px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12.5px; padding: 5px 8px; }
.pc-del-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 15px; padding: 0 4px; }
.pc-del-btn:hover { color: var(--bad); }

/* ─── Messaging ──────────────────────────────────────────────────────────── */
.messages-btn { position: relative; }
.messages-unread-badge {
  position: absolute; top: -6px; right: -6px; background: var(--bad, #ff5c5c); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1;
}

.messages-overlay { position: fixed; inset: 0; background: rgba(8,14,24,0.55); backdrop-filter: blur(2px); z-index: 1150; display: none; }
.messages-overlay.open { display: block; }

.messages-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(780px, 96vw);
  background: var(--bg); border-left: 1px solid var(--border); z-index: 1160;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.24s cubic-bezier(.2,.8,.2,1), opacity 0.2s ease;
  box-shadow: -24px 0 70px rgba(0,0,0,0.45);
  border-radius: 0; opacity: 0;
  --msg-font-family: inherit; --msg-font-size: 13.5px; --msg-mine-bg: var(--accent);
}
.messages-panel.open { transform: translateX(0); opacity: 1; }
/* "Popped" = detached floating window: no docked slide-in, draggable/resizable anywhere on screen */
.messages-panel.is-popped {
  top: 80px; right: 40px; bottom: auto; left: auto; height: min(640px, 80vh);
  border-radius: 16px; border: 1px solid var(--border); transform: none;
  min-width: 380px; min-height: 380px;
}
.messages-panel.is-popped.open { transform: none; }

.messages-panel-header {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-2), var(--bg)); cursor: default; user-select: none;
  border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.messages-panel.is-popped .messages-panel-header { cursor: grab; }
.messages-panel.is-popped .messages-panel-header:active { cursor: grabbing; }
.messages-drag-grip { color: var(--text-dim); font-size: 12px; letter-spacing: -2px; display: none; }
.messages-panel.is-popped .messages-drag-grip { display: inline; }
.messages-panel-header h3 { margin: 0; flex: 1; font-size: 15px; }
.messages-panel-header-btns { display: flex; align-items: center; gap: 4px; }
.rp-icon-btn {
  background: none; border: 1px solid transparent; color: var(--text-dim); font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
}
.rp-icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.messages-panel.is-popped #messagesPopoutBtn { color: var(--accent); }

.messages-font-popover {
  position: absolute; top: 52px; right: 56px; z-index: 20; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; box-shadow: 0 12px 30px rgba(0,0,0,0.35); display: flex; flex-direction: column; gap: 10px;
  min-width: 220px;
}
.messages-font-popover[hidden] { display: none; }
.messages-font-popover label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.messages-font-popover select { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 6px 8px; font-size: 13px; }
.msg-pref-swatches { display: flex; gap: 6px; }
.msg-color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.msg-color-swatch.is-active { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel); }

.messages-panel-body { flex: 1; display: flex; min-height: 0; position: relative; }

.messages-resize-grip {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; display: none;
  background: linear-gradient(135deg, transparent 50%, var(--border) 50%, var(--border) 60%, transparent 60%, transparent 70%, var(--border) 70%, var(--border) 80%, transparent 80%);
}
.messages-panel.is-popped .messages-resize-grip { display: block; }

.messages-convo-list { width: 270px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 12px; gap: 10px; overflow-y: auto; background: var(--panel-2); }
.messages-new-btn { width: 100%; border-radius: 999px; }
.messages-convo-list-inner { display: flex; flex-direction: column; gap: 4px; }
.messages-convo-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  cursor: pointer; border: 1px solid transparent; transition: background 0.12s ease;
}
.messages-convo-item:hover { background: var(--panel); }
.messages-convo-item.active { background: var(--panel); border-color: var(--accent); }
.messages-convo-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.messages-convo-item-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.messages-convo-name { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messages-convo-preview { font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messages-convo-unread-dot { background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.msg-avatar {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-right: 8px;
}
.messages-thread-header-name .msg-avatar { width: 26px; height: 26px; font-size: 10.5px; margin-right: 8px; vertical-align: middle; }
.messages-convo-item .msg-avatar { margin-right: 0; }

.messages-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.messages-thread .empty-state { margin: auto; color: var(--text-dim); }
.messages-thread-list { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; font-family: var(--msg-font-family); font-size: var(--msg-font-size); }
.message-bubble-row { display: flex; align-items: flex-end; max-width: 76%; }
.message-bubble-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.message-bubble-col { display: flex; flex-direction: column; min-width: 0; }
.message-bubble-row.mine .message-bubble-col { align-items: flex-end; }
.message-bubble-meta { font-size: 11px; color: var(--text-dim); margin-bottom: 3px; }
.message-bubble {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 9px 14px;
  font-size: inherit; font-family: inherit; color: var(--text); white-space: pre-wrap; box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.message-bubble-row.mine .message-bubble { background: var(--msg-mine-bg); color: #fff; border-color: transparent; }
.message-attachment-img { max-width: 260px; border-radius: 10px; margin-top: 6px; display: block; }
.message-attachment-pdf { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; }
.message-bubble-actions { display: flex; gap: 8px; margin-top: 3px; }
.message-action-btn { background: none; border: none; color: var(--text-dim); font-size: 11px; cursor: pointer; padding: 0; }
.message-action-btn:hover { color: var(--accent); text-decoration: underline; }
.message-edit-textarea { width: 220px; min-height: 60px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 6px 8px; font-size: 13px; font-family: inherit; }

.messages-thread-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.messages-thread-header-name { font-weight: 600; display: flex; align-items: center; }
.messages-thread-header-actions { display: flex; gap: 6px; align-items: center; }

.messages-emoji-popover {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 6px; z-index: 15; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: 260px;
}
.messages-emoji-popover[hidden] { display: none; }
.emoji-pick-btn { background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px; border-radius: 6px; line-height: 1; }
.emoji-pick-btn:hover { background: var(--panel-2); }
.messages-compose { position: relative; }

.manage-member-list { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; margin-bottom: 4px; }
.manage-member-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

.messages-compose { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--panel-2); }
.messages-compose-ai-row { display: flex; gap: 6px; flex-wrap: wrap; }
.messages-compose-input-row { display: flex; gap: 8px; align-items: flex-end; }
.messages-compose-textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 140px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text); padding: 10px 16px; font-family: var(--msg-font-family); font-size: var(--msg-font-size);
}
.messages-compose-input-row .btn-primary#messagesSendBtn { border-radius: 999px; padding: 10px 20px; }
.messages-ai-flyout { border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; padding: 10px; display: flex; gap: 8px; align-items: center; }
.messages-ai-flyout input { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 6px 8px; font-size: 13px; }
.messages-attachment-preview { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.messages-attachment-preview img { max-height: 80px; border-radius: 6px; }

/* ─── Voice/video calling ──────────────────────────────────────────────────── */
.incoming-call-banner {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1400;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  padding: 14px 18px; display: flex; align-items: center; gap: 16px; min-width: 340px;
}
.incoming-call-banner[hidden] { display: none; }
.incoming-call-info { display: flex; align-items: center; gap: 10px; }
.incoming-call-avatar {
  width: 38px; height: 38px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.incoming-call-name { font-weight: 700; font-size: 14px; }
.incoming-call-type { font-size: 12px; color: var(--text-dim); }
.incoming-call-actions { display: flex; gap: 8px; margin-left: auto; }

.active-call-overlay {
  position: fixed; inset: 0; z-index: 1500; background: rgba(6,10,18,0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.active-call-overlay[hidden] { display: none; }
.active-call-status { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.active-call-video-wrap { position: relative; width: min(720px, 90vw); aspect-ratio: 16/9; background: #0a1420; border-radius: 16px; overflow: hidden; }
.call-remote-video { width: 100%; height: 100%; object-fit: cover; background: #0a1420; }
.call-local-video { position: absolute; right: 14px; bottom: 14px; width: 130px; height: 90px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255,255,255,0.25); background: #0a1420; }
.active-call-controls { display: flex; gap: 14px; }
.call-control-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none; background: rgba(255,255,255,0.12); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s ease;
}
.call-control-btn:hover { background: rgba(255,255,255,0.22); }
.call-control-btn.is-off { background: rgba(255,255,255,0.3); color: #ffb3b3; }
.call-hangup-btn { background: #e5484d; }
.call-hangup-btn:hover { background: #c93c40; }
.call-hangup-btn svg { transform: rotate(135deg); }

.toast-clickable { pointer-events: auto; cursor: pointer; }
