/* Territory Plan — minimal, sober styling. Easy to extend later. */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --border: #e6e3dc;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #f6821f;       /* Cloudflare orange */
  --accent-soft: #fff1e0;
  --danger: #c0392b;
  --success: #2e7d32;

  --tier-a: #2e7d32;
  --tier-b: #1565c0;
  --tier-c: #8a6d3b;
  --tier-d: #6b6b6b;

  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand .logo { color: var(--accent); font-size: 18px; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
}
.topbar nav a.active { background: var(--accent-soft); color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.loading { color: var(--text-muted); padding: 24px; text-align: center; }

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 24px 0 8px; }
h3 { font-size: 14px; margin: 12px 0 4px; }
.subtle { color: var(--text-muted); }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.page-header .meta { color: var(--text-muted); }

/* Buttons */
.btn-primary, .btn-secondary, .btn-ghost {
  font: inherit;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #de6c0e; }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: #c8c5bd; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

/* Action queue */
.action-list { display: flex; flex-direction: column; gap: 10px; }
.action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 14px;
  align-items: start;
}
.action .priority-pill {
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface-2);
  color: var(--text-muted);
}
.action .priority-pill.high { background: #fff1e0; color: #c46a10; }
.action .priority-pill.med  { background: #eef4fb; color: #1565c0; }
.action .priority-pill.low  { background: var(--surface-2); color: var(--text-muted); }

.action .title { font-weight: 600; margin-bottom: 4px; }
.action .meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action .reasoning { color: var(--text-muted); font-size: 13px; }

.action-actions { display: flex; gap: 6px; }

/* Tier badges */
.tier { font-weight: 600; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.tier-A { background: #e7f3e9; color: var(--tier-a); }
.tier-B { background: #e5eef9; color: var(--tier-b); }
.tier-C { background: #f6efdf; color: var(--tier-c); }
.tier-D { background: #ececec; color: var(--tier-d); }
.tier-UNRANKED { background: #f0eee9; color: var(--text-muted); }

.category-pill {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Accounts table */
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.toolbar input, .toolbar select {
  font: inherit;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.toolbar input { flex: 1; min-width: 200px; }

table.accounts {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.accounts th, table.accounts td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
table.accounts th { background: var(--surface-2); font-weight: 600; color: var(--text-muted); font-size: 12px; }
table.accounts tr:last-child td { border-bottom: none; }
table.accounts tr.row:hover { background: var(--surface-2); cursor: pointer; }

/* Account detail */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card h2 { margin-top: 0; }

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

textarea {
  width: 100%;
  min-height: 80px;
  font: inherit;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  resize: vertical;
  background: var(--surface);
}

.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.event-list li:last-child { border: none; }
.event-list .event-type { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

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

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--text);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* CF1 Propensity badges */
.cf1 {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.cf1-gold   { background: #fff7d6; color: #8a6d00; border-color: #f0d674; }
.cf1-silver { background: #eef0f3; color: #4a525c; border-color: #c6ccd4; }
.cf1-bronze { background: #f6e6d6; color: #7a4a1f; border-color: #d9b48a; }

/* ============== Dashboard ============== */
.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tile-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.tile-sub { color: var(--text-muted); font-size: 12px; }
.tile-good  { border-left: 3px solid var(--success); }
.tile-warn  { border-left: 3px solid #c46a10; }
.tile-alert { border-left: 3px solid var(--danger); }
a.tile, a.tile-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}
a.tile:hover, a.tile-link:hover {
  border-color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
a.tile:focus-visible {
  outline: 2px solid var(--accent, #0073e6);
  outline-offset: 2px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px 0;
}
.filter-chips:empty { display: none; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
}
.chip-clear {
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
}
.chip-clear:hover { color: var(--danger); }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid .card { padding: 14px 16px; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 8px;
}
.card-head h2 { margin: 0; }
.card-head a { color: var(--accent); font-size: 13px; }
.card-head a:hover { text-decoration: underline; }

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compact-table td {
  padding: 8px 6px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.compact-table tr:last-child td { border-bottom: none; }
.compact-table tr.clickable { cursor: pointer; }
.compact-table tr.clickable:hover { background: var(--surface-2); }
.compact-table .name-cell { min-width: 160px; }
.compact-table a { text-decoration: none; }
.compact-table a:hover strong { text-decoration: underline; }

.battle-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.battle-cols h3 { margin-top: 0; margin-bottom: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.battle-list { list-style: none; padding: 0; margin: 0; }
.battle-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.battle-list li:last-child { border: none; }
.battle-vendor { flex: 1; font-weight: 500; }
.battle-vendor:hover { color: var(--accent); }
.battle-count { color: var(--text-muted); font-size: 12px; }

.small { font-size: 11px; }

/* ============== Renewal urgency badges ============== */
.renewal-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.renewal-overdue { background: #fbe9e7; color: #b3251c; border: 1px solid #efb3ad; }
.renewal-now     { background: #fde2d3; color: #a14a05; border: 1px solid #f3b58a; }
.renewal-soon    { background: #fff1d3; color: #8a5d00; border: 1px solid #f0d674; }
.renewal-watch   { background: #eef4fb; color: #1565c0; border: 1px solid #b9cfe9; }
.renewal-far     { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* ============== Competitor badges ============== */
.comp-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.comp-badge {
  display: inline-block;
  background: #fbe9e7;
  color: #b3251c;
  border: 1px solid #efb3ad;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============== Opportunity score pill ============== */
.score-pill {
  display: inline-block;
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
}
.score-high { background: #e7f3e9; color: #1f5e25; border-color: #b3d9b9; }
.score-med  { background: #fff1d3; color: #7a5300; border-color: #f0d674; }
.score-low  { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }

/* ============== Sortable headers ============== */
table.accounts th.sortable {
  cursor: pointer;
  user-select: none;
}
table.accounts th.sortable:hover { color: var(--text); }
table.accounts th.sortable.active { color: var(--accent); }

/* ============== Page header actions ============== */
.header-actions { display: flex; gap: 8px; align-items: center; }

/* ============== Keyboard focus on action cards ============== */
.action.kbd-focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: help;
}
.kbd-hint:hover { color: var(--text); }

/* ============== Layout tweaks for wider dashboard ============== */
main { max-width: 1300px; }

/* ============== External Verification ============== */
.verify-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.verify-pill.verify-ok      { background: #e7f3e9; color: #1f5e25; border: 1px solid #b3d9b9; }
.verify-pill.verify-partial { background: #fff1d3; color: #7a5300; border: 1px solid #f0d674; }
.verify-pill.verify-error   { background: #fbe9e7; color: #b3251c; border: 1px solid #efb3ad; }
.verify-pill.verify-cf      { background: #fff1e0; color: #c46a10; border: 1px solid #f3b58a; }
.verify-pill.verify-comp    { background: #fbe9e7; color: #b3251c; border: 1px solid #efb3ad; }
.verify-pill.verify-neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

.verify-insights { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; }
.verify-insight {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 500;
}
.verify-insight.verify-cf   { background: #fff1e0; color: #8a4900; border-left: 3px solid var(--accent); }
.verify-insight.verify-comp { background: #fbe9e7; color: #7a1812; border-left: 3px solid var(--danger); }
.verify-conflict {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: #fff8e7;
  color: #7a5300;
  border-left: 3px solid #f0d674;
}

.verify-error {
  background: #fbe9e7;
  color: #b3251c;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

.verify-evidence {
  margin-top: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.verify-evidence summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.verify-evidence h4 {
  margin: 10px 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.verify-evidence ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.verify-evidence li {
  padding: 2px 0;
  font-size: 12px;
}
.verify-evidence code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
  word-break: break-all;
}

/* ===== Briefing strip (account detail) ===== */
.briefing-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.briefing-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.briefing-fact {
  padding: 6px 10px;
  border-left: 3px solid var(--border);
  background: var(--bg);
  border-radius: 4px;
}
.briefing-fact-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.briefing-fact-value { font-weight: 600; font-size: 13px; }
.briefing-fact-good  { border-left-color: var(--success); }
.briefing-fact-warn  { border-left-color: #c46a10; }
.briefing-fact-alert { border-left-color: var(--danger); }

.briefing-talktrack-wrap h2 { margin: 0 0 8px 0; font-size: 14px; }
.briefing-talktrack {
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 6px;
  min-height: 36px;
  margin-bottom: 12px;
}
.briefing-talktrack h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin: 0 0 4px 0; }
.briefing-talktrack ul { margin: 0; padding-left: 18px; }
.briefing-talktrack li { margin-bottom: 4px; }
.briefing-talktrack p { margin: 0; }
.talktrack-hooks { margin-bottom: 10px; }
.talktrack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.talktrack-question { font-style: italic; }
.talktrack-pillar { font-weight: 600; }

.briefing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.briefing-outreach:empty { display: none; }

.outreach-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 4px;
}
.outreach-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.outreach-mode { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.outreach-actions { display: flex; gap: 6px; }
.outreach-subject { margin-bottom: 8px; font-size: 13px; }
.outreach-body {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  padding: 0;
  background: transparent;
}

/* ===== Signals card ===== */
.signals-list { list-style: none; padding: 0; margin: 8px 0 0 0; }
.signal-item {
  display: grid;
  grid-template-columns: 100px 1fr 24px;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.signal-item:last-child { border-bottom: none; }
.signal-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.signal-type-funding { background: #e8f5e9; color: #1b5e20; }
.signal-type-m_and_a { background: #e3f2fd; color: #0d47a1; }
.signal-type-layoff  { background: #ffebee; color: #b71c1c; }
.signal-type-breach  { background: #fff3e0; color: #b65a00; }
.signal-type-exec_change { background: #f3e5f5; color: #4a148c; }
.signal-type-product_launch { background: #e0f7fa; color: #006064; }
.signal-type-earnings { background: #fff8e1; color: #5d4037; }
.signal-title { color: var(--text); text-decoration: none; font-weight: 500; font-size: 13px; line-height: 1.4; display: block; }
.signal-title:hover { text-decoration: underline; color: var(--accent, #0073e6); }
.signal-meta { margin-top: 2px; }
.signal-dismiss {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 14px; padding: 0; width: 24px; height: 24px;
}
.signal-dismiss:hover { color: var(--danger); }
.signal-account { color: var(--text-muted); text-decoration: none; }
.signal-account:hover { color: var(--text); text-decoration: underline; }
.btn-small { padding: 4px 10px; font-size: 12px; }

/* ===== Stakeholders / Contacts ===== */
.contacts-list { list-style: none; padding: 0; margin: 8px 0 0 0; }
.contact-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-child { border-bottom: none; }
.contact-name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.contact-role {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
  font-weight: 600; padding: 2px 6px; border-radius: 3px;
}
.contact-role-champion { background: #e8f5e9; color: #1b5e20; }
.contact-role-dm       { background: #e3f2fd; color: #0d47a1; }
.contact-role-inf      { background: #f3e5f5; color: #4a148c; }
.contact-role-coach    { background: #e0f7fa; color: #006064; }
.contact-role-blocker  { background: #ffebee; color: #b71c1c; }
.contact-role-unknown  { background: var(--bg); color: var(--text-muted); }
.contact-sent { font-size: 12px; }
.contact-sub, .contact-meta { margin-top: 2px; font-size: 12px; }
.contact-email { color: var(--accent, #0073e6); text-decoration: none; }
.contact-email:hover { text-decoration: underline; }
.contact-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.contact-actions .btn-secondary { font-size: 11px; padding: 3px 8px; }
.contact-delete:hover { background: #ffebee; color: #b71c1c; border-color: #b71c1c; }

/* Modal */
.contact-dialog {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.contact-dialog-overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35);
}
.contact-dialog-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 24px 28px;
  width: 480px; max-width: 90vw;
  max-height: 88vh; overflow-y: auto;
}
.contact-dialog-card h3 { margin: 0 0 16px 0; font-size: 16px; }
.contact-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.contact-field > span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.contact-field input, .contact-field select, .contact-field textarea {
  font-size: 13px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px;
  font-family: inherit;
}
.contact-dialog-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border);
}

/* ===== Outcome capture modal ===== */
.outcome-dialog {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.outcome-dialog-overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35);
}
.outcome-dialog-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 24px 28px;
  width: 520px; max-width: 92vw;
}
.outcome-dialog-card h3 { margin: 0 0 16px 0; font-size: 16px; }
.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.outcome-btn {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
}
.outcome-btn kbd {
  background: rgba(0,0,0,0.08);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: monospace;
}
.outcome-note { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.outcome-note > span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.outcome-note textarea {
  font-family: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 4px; resize: vertical;
}
.outcome-cancel-row { display: flex; justify-content: flex-end; }

/* ===== Kanban / Pipeline ===== */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
  min-height: 60vh;
  align-items: start;
}
.kanban-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: 80vh;
}
.kanban-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.kanban-col-title { font-weight: 600; }
.kanban-col-count {
  background: var(--surface);
  border-radius: 10px;
  padding: 1px 8px;
  font-weight: 700;
  font-size: 11px;
  color: var(--text);
}
.kanban-col-awaiting_reply .kanban-col-head { border-left: 3px solid #c46a10; }
.kanban-col-stalled .kanban-col-head        { border-left: 3px solid var(--danger); }
.kanban-col-meeting_set .kanban-col-head    { border-left: 3px solid var(--success); }
.kanban-col-closed_won .kanban-col-head     { border-left: 3px solid var(--success); }
.kanban-col-closed_lost .kanban-col-head    { color: var(--text-muted); }

.kanban-list {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;
}
.kanban-list.drag-over {
  background: rgba(0, 115, 230, 0.08);
  outline: 2px dashed var(--accent, #0073e6);
  outline-offset: -4px;
  border-radius: 4px;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 10px;
  cursor: grab;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.kanban-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.kanban-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.kanban-card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.kanban-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.kanban-card-foot {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.kanban-pill {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
}
.kanban-pill-signal { background: #fff8e1; color: #5d4037; }
.kanban-pill-action { background: #e3f2fd; color: #0d47a1; }
.kanban-renew { font-size: 11px; }
.kanban-renew.renew-overdue { color: var(--danger); font-weight: 600; }
.kanban-renew.renew-soon    { color: #c46a10; }

.kanban-stage-age {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: auto;
}
.kanban-stage-stale-fresh { background: #e8f5e9; color: #1b5e20; }
.kanban-stage-stale-warn  { background: #fff3e0; color: #b65a00; }
.kanban-stage-stale-bad   { background: #ffebee; color: #b71c1c; font-weight: 600; }

.kanban-empty {
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 4px;
  margin: 4px;
}

.cadence-banner {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid #c46a10;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
}
.cadence-banner strong { display: block; margin-bottom: 6px; }
.cadence-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
}
.cadence-list li { padding: 2px 0; }
.cadence-list a { color: var(--accent, #0073e6); text-decoration: none; font-weight: 500; }
.cadence-list a:hover { text-decoration: underline; }

/* ===== Help dialog ===== */
.help-dialog {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.help-dialog-overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35);
}
.help-dialog-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 24px 28px;
  width: 520px; max-width: 92vw;
  max-height: 88vh; overflow-y: auto;
}
.help-dialog-card h3 { margin: 0 0 12px 0; font-size: 16px; }
.help-section { margin-bottom: 16px; }
.help-section h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); margin: 0 0 6px 0;
}
.help-section table { width: 100%; border-collapse: collapse; }
.help-section td { padding: 3px 0; font-size: 13px; }
.help-key { width: 130px; }
.help-key kbd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: monospace;
  margin-right: 2px;
}
.help-desc { color: var(--text); }
.help-foot { padding-top: 8px; border-top: 1px solid var(--border); }

/* ===== Accounts table: stage cell + top-only toggle ===== */
.stage-cell { min-width: 130px; }
.stage-cell-inner { display: flex; flex-direction: column; gap: 2px; }
.row-stage-select {
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  max-width: 130px;
}
.row-stage-select:hover { border-color: var(--accent, #0073e6); }
.stage-cell-inner.stage-awaiting_reply .row-stage-select { border-left: 3px solid #c46a10; }
.stage-cell-inner.stage-stalled .row-stage-select        { border-left: 3px solid var(--danger); }
.stage-cell-inner.stage-meeting_set .row-stage-select    { border-left: 3px solid var(--success); }
.stage-cell-inner.stage-closed_won .row-stage-select     { border-left: 3px solid var(--success); }
.row-pin { color: #c46a10; font-size: 11px; }

.top-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}
.top-toggle:hover { border-color: var(--accent, #0073e6); }
.top-toggle input { margin: 0; cursor: pointer; }

/* ===== Pillar competitor insights ===== */
.verify-insight.verify-pillar {
  background: #fff3e0;
  border-left: 3px solid #c46a10;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 4px 0;
  font-size: 13px;
}
.verify-insight.verify-pillar em { color: #c46a10; font-style: normal; font-weight: 600; }

.battle-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.filter-chip-pillar { background: #fff3e0; border-color: #ffcc80; color: #5d4037; }

/* ===== Web performance card ===== */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.perf-metric {
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 4px;
  border-left: 3px solid var(--border);
}
.perf-good  { border-left-color: var(--success); }
.perf-warn  { border-left-color: #c46a10; }
.perf-alert { border-left-color: var(--danger); }
.perf-subtle { border-left-color: var(--border); opacity: 0.6; }
.perf-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.perf-value { font-size: 16px; font-weight: 700; line-height: 1.1; margin: 2px 0; }
.perf-hint  { font-size: 10px; color: var(--text-muted); }

.perf-pitches {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.perf-pitches h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 6px 0;
}
.perf-pitch {
  background: #fff8e1;
  border-left: 3px solid #c46a10;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.perf-pitch-label { font-weight: 600; font-size: 13px; }
.perf-pitch-text  { font-size: 12px; color: #5d4037; margin-top: 2px; line-height: 1.4; }

/* ===== Dashboard Web perf card ===== */
.perf-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}
.perf-bar-poor { background: var(--danger); }
.perf-bar-warn { background: #c46a10; }
.perf-bar-good { background: var(--success); }

.perf-subhead {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 12px 0 4px 0;
}

.perf-slow-list { list-style: none; padding: 0; margin: 0; }
.perf-slow-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.perf-slow-item:last-child { border-bottom: none; }
.perf-slow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.perf-slow-name {
  flex: 1;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.perf-slow-name:hover { text-decoration: underline; }
.perf-slow-lcp {
  font-weight: 700;
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 3px;
}
.perf-lcp-good  { background: #e8f5e9; color: #1b5e20; }
.perf-lcp-warn  { background: #fff3e0; color: #b65a00; }
.perf-lcp-alert { background: #ffebee; color: #b71c1c; }
.perf-on-cf {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #fff8e1;
  color: #c46a10;
  font-weight: 600;
}
.perf-slow-pitch {
  margin-top: 2px;
  margin-left: 0;
}

/* ===== Signal score / Hot accounts ===== */
.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.signal-emoji { font-size: 12px; }
.signal-score-num { font-variant-numeric: tabular-nums; }
.signal-tier-hot  { background: #ffebee; color: #b71c1c; border-color: #ef9a9a; }
.signal-tier-warm { background: #fff3e0; color: #b65a00; border-color: #ffcc80; }
.signal-tier-cool { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.signal-tier-cold { background: var(--bg); color: var(--text-muted); border-color: var(--border); }

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.signal-tag {
  display: inline-block;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 2px 8px;
  color: var(--text);
}

.signal-score-big {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
}
.signal-score-num-big {
  font-size: 36px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 6px;
  line-height: 1;
}
.signal-score-tier-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.hot-list { list-style: none; padding: 0; margin: 8px 0 0 0; }
.hot-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.hot-item:last-child { border-bottom: none; }
.hot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}
.hot-name {
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.hot-name:hover { text-decoration: underline; }
.hot-renewal { color: #c46a10; font-weight: 600; }
.hot-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }

/* ===== Today card (dashboard) ===== */
.today-card { border-top: 3px solid var(--accent, #0073e6); }
.today-list { list-style: none; padding: 0; margin: 8px 0 0 0; }
.today-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.today-item:last-child { border-bottom: none; }
.today-urgency {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  padding: 6px 0;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.today-body { min-width: 0; }
.today-title { font-size: 14px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.today-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.today-account { color: var(--text); text-decoration: none; font-weight: 500; }
.today-account:hover { text-decoration: underline; }
.today-tag {
  padding: 2px 8px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
}
.today-tag.signal-tier-hot  { background: #ffebee; color: #b71c1c; border-color: #ef9a9a; }
.today-tag.signal-tier-warm { background: #fff3e0; color: #b65a00; border-color: #ffcc80; }
.today-tag.signal-tier-cool { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.today-tag.renewal-soon { background: #ffebee; color: #b71c1c; border-color: #ef9a9a; }
.today-tag.renewal-near { background: #fff3e0; color: #b65a00; border-color: #ffcc80; }
.today-tag.cmf-tag      { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.today-actions { display: flex; gap: 4px; }

/* ===== Urgency color scale (used in queue + today) ===== */
.urgency-critical { background: var(--danger); color: #fff; }
.urgency-high     { background: #c46a10; color: #fff; }
.urgency-medium   { background: #5a8bb0; color: #fff; }
.urgency-low      { background: var(--bg); color: var(--text-muted); }

/* renewal pills in queue cards */
.renewal-pill {
  padding: 1px 7px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
}
.renewal-pill.renewal-overdue { background: #ffebee; color: #b71c1c; }
.renewal-pill.renewal-soon    { background: #fff3e0; color: #b65a00; }
.renewal-pill.renewal-near    { background: var(--bg); color: var(--text-muted); }

/* ===== Competitor stack card ===== */
.stack-list { list-style: none; padding: 0; margin: 8px 0; }
.stack-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.stack-item:last-child { border-bottom: none; }
.stack-icon { font-size: 18px; text-align: center; }
.stack-body { font-size: 13px; min-width: 0; }
.stack-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stack-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-right: 4px; }
.stack-context-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-muted);
}
.stack-pitch {
  margin-top: 2px;
  font-size: 12px;
  color: #c46a10;
  font-weight: 600;
}
.stack-signals { margin-top: 4px; }
.stack-signals summary { font-size: 11px; color: var(--text-muted); cursor: pointer; }
.stack-signals ul { font-size: 11px; padding-left: 16px; margin: 4px 0; }
.stack-signals li { word-break: break-all; }
.stack-disclaimer {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 4px;
  line-height: 1.5;
}

/* ===== Action playbook disclosure ===== */
.action-playbook-details {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.action-playbook-summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 6px;
  user-select: none;
}
.action-playbook-summary:hover { color: var(--text); }
.action-playbook-slot { margin-top: 8px; padding-left: 8px; }

.playbook-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.playbook-variant {
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 1px 7px;
  color: var(--text-muted);
}
.playbook-steps {
  list-style: none;
  counter-reset: stepnum;
  padding-left: 0;
  margin: 0;
}
.playbook-step {
  counter-increment: stepnum;
  padding: 6px 0 6px 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.playbook-step:last-child { border-bottom: none; }
.playbook-step::before {
  content: counter(stepnum);
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.playbook-step-done { opacity: 0.55; }
.playbook-step-done strong { text-decoration: line-through; }
.playbook-step-label {
  display: flex;
  align-items: start;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}
.playbook-step-label input { margin-top: 3px; }
.playbook-step-hint, .playbook-step-expected { margin-top: 2px; line-height: 1.4; }
.playbook-step-expected { color: #c46a10; }

/* ===== ROI card ===== */
.roi-card { border-top: 3px solid var(--success); }
.roi-banner {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 10px 0;
  text-align: center;
}
.roi-banner-num { font-size: 28px; font-weight: 800; color: #1b5e20; line-height: 1; }
.roi-banner-sub { font-size: 13px; color: #2e7d32; margin-top: 4px; }
.roi-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.roi-table th { text-align: left; padding: 6px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.roi-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.roi-num { text-align: right; font-variant-numeric: tabular-nums; }
.roi-conf {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}
.roi-conf-validated  { background: #e8f5e9; color: #1b5e20; }
.roi-conf-intricately{ background: #e3f2fd; color: #0d47a1; }
.roi-conf-modeled    { background: #fff3e0; color: #b65a00; }
.roi-notes { margin-top: 10px; }
.roi-notes summary { cursor: pointer; font-size: 12px; color: var(--text-muted); padding: 4px 0; }
.roi-notes ul { font-size: 12px; padding-left: 18px; line-height: 1.5; }
.roi-notes li { margin-bottom: 4px; }
.roi-caveats { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); line-height: 1.5; }

/* ===== Personas card ===== */
.personas-card { border-top: 3px solid #5e35b1; }
.persona-block {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.persona-block:last-child { border-bottom: none; }
.persona-block-head { margin-bottom: 6px; }
.persona-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 6px 0;
  align-items: start;
}
.persona-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-align: center;
  background: #ede7f6;
  color: #5e35b1;
}
.persona-role-economic-buyer { background: #e8f5e9; color: #1b5e20; }
.persona-role-champion       { background: #fff3e0; color: #b65a00; }
.persona-role-decision-maker { background: #e3f2fd; color: #0d47a1; }
.persona-role-technical-validator { background: #ede7f6; color: #5e35b1; }
.persona-role-user           { background: var(--bg); color: var(--text-muted); }
.persona-titles { font-size: 13px; font-weight: 500; }
.persona-why { margin-top: 2px; line-height: 1.4; }
.persona-matched {
  margin-top: 4px;
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}
.persona-no-match {
  margin-top: 4px;
  color: var(--danger);
}

/* ===== Voice samples page ===== */
.voice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.voice-sample-inactive { opacity: 0.55; }
.voice-sample-head { margin-bottom: 6px; }
.voice-sample-subject { font-size: 13px; margin-bottom: 6px; }
.voice-sample-body {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 10px 0;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 4px;
  border-left: 3px solid var(--border);
}
.voice-sample-actions { display: flex; gap: 6px; }
.voice-dialog-card { width: 640px; }
.voice-dialog-card textarea { font-family: inherit; min-height: 200px; }

.hot-delta {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 11px;
}
.hot-delta-up   { background: #e8f5e9; color: #1b5e20; }
.hot-delta-down { background: #ffebee; color: #b71c1c; }

/* ===== Partners on this deal ===== */
.partners-card { border-top: 3px solid #00897b; }
.partners-list { list-style: none; padding: 0; margin: 8px 0 0 0; }
.partner-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.partner-item:last-child { border-bottom: none; }
.partner-icon { font-size: 18px; }
.partner-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.partner-name { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.partner-name:hover { text-decoration: underline; color: var(--accent, #0073e6); }
.partner-rel {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 3px;
  background: #e0f2f1; color: #00695c;
}
.partner-rel-implementer { background: #e8f5e9; color: #1b5e20; }
.partner-rel-reseller    { background: #e3f2fd; color: #0d47a1; }
.partner-rel-cosell      { background: #fff3e0; color: #b65a00; }
.partner-rel-csp_overlap { background: #ede7f6; color: #4a148c; }
.partner-tier {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
}
.partner-intro {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 11px;
  margin-left: auto;
}
.partner-intro-none { background: var(--bg); color: var(--text-muted); }
.partner-intro-warn { background: #fff3e0; color: #b65a00; font-weight: 600; }
.partner-intro-good { background: #e8f5e9; color: #1b5e20; font-weight: 600; }
.partner-rep { margin-top: 4px; }
.partner-actions { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

/* Email Security card */
.es-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.es-cell {
  display: block; padding: 12px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; text-decoration: none; color: var(--text); text-align: center;
  transition: transform 0.1s, border-color 0.1s;
}
.es-cell:hover { border-color: var(--accent); transform: translateY(-1px); }
.es-vendor { font-size: 12px; font-weight: 600; line-height: 1.2; min-height: 28px; }
.es-count { font-size: 28px; font-weight: 700; margin-top: 4px; color: var(--accent); }
.es-label { font-size: 11px; }

/* Channel partners card */
.partner-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; }
.ps-stat {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; text-align: center;
}
.ps-num { font-size: 24px; font-weight: 700; color: var(--accent); }
.ps-label { font-size: 11px; margin-top: 2px; }
.partner-top-list { list-style: none; padding: 0; margin: 4px 0 0; }
.partner-top-list li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.partner-top-list li:last-child { border-bottom: none; }

/* Email security: wins banner + bare M365 banner */
.es-wins {
  background: #e8f5e9; border: 1px solid #4caf50; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 13px;
}
.es-wins a { color: #1b5e20; font-weight: 600; }
.es-m365-banner {
  display: block; margin-top: 10px; padding: 10px 12px;
  background: #fff3e0; border: 1px solid #ff9800; border-radius: 8px;
  text-decoration: none; color: var(--text);
}
.es-m365-banner:hover { border-color: #f57c00; }
.es-m365-banner strong { color: #e65100; font-size: 13px; }

/* Action card: scheduled & cadence badges */
.scheduled-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #fff3e0;
  border: 1px solid #ff9800;
  color: #e65100;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}
.cadence-badge { margin-top: 4px; font-style: italic; }
.draft-email-btn { background: #1565c0 !important; }
.draft-email-btn:hover { background: #0d47a1 !important; }

/* Email draft modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal {
  background: var(--card); color: var(--text);
  border-radius: 12px; max-width: 720px; width: 90%;
  max-height: 90vh; overflow-y: auto;
  padding: 20px 24px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}
.modal-head { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0 0 4px; font-size: 18px; }
.draft-label { display: block; font-size: 12px; font-weight: 600; margin: 10px 0 4px; color: var(--text-muted); }
.draft-subject {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 14px;
}
.draft-body {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 13px;
  resize: vertical; min-height: 220px;
}
.draft-status { margin: 6px 0; min-height: 18px; }
.draft-meta { margin-top: 6px; font-size: 11px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: flex-end; }
.modal-actions button { font-size: 13px; }

/* Partner engagement card (account detail) */
.partner-group { padding: 12px 0; border-bottom: 1px solid var(--border); }
.partner-group:last-child { border-bottom: none; }
.partner-group-head { display: flex; gap: 10px; align-items: flex-start; }
.partner-ae-list {
  list-style: none; padding: 6px 0 0; margin: 6px 0 0;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.partner-ae-row { display: flex; gap: 10px; font-size: 12.5px; align-items: center; }
.partner-ae-name { font-weight: 600; min-width: 140px; }
.partner-ae-email { color: var(--accent); font-size: 12px; }

.partner-contract {
  display: inline-block; margin-left: 6px;
  padding: 2px 7px; border-radius: 4px; font-size: 11px;
  background: #e3f2fd; color: #0d47a1; font-weight: 600;
}

/* Engagement-status badges — color by rank */
.engagement-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  margin-left: 6px; vertical-align: middle;
}
.engagement-top-100        { background: #fff3e0; color: #e65100; border: 1px solid #ff9800; } /* gold */
.engagement-top-tier       { background: #fff8e1; color: #ff8f00; border: 1px solid #ffc107; }
.engagement-strategic      { background: #e8eaf6; color: #3949ab; border: 1px solid #5c6bc0; }
.engagement-customer       { background: #e8f5e9; color: #1b5e20; border: 1px solid #43a047; }
.engagement-recent-customer{ background: #e0f2f1; color: #00695c; border: 1px solid #26a69a; }
.engagement-recent-revenue { background: #e0f7fa; color: #006064; border: 1px solid #00acc1; }
.engagement-active         { background: #e8f5e9; color: #2e7d32; border: 1px solid #66bb6a; }
.engagement-target         { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ab47bc; }
.engagement-prospect       { background: #e3f2fd; color: #0d47a1; border: 1px solid #42a5f5; }
.engagement-on-list        { background: #fafafa; color: #424242; border: 1px solid #bdbdbd; }

/* Dashboard partners card: engagement breakdown row + top-partner list */
.engagement-breakdown { margin: 6px 0 8px; }
.engagement-row { display: flex; flex-wrap: wrap; gap: 6px; }
.top-partners-block ul.top-partners-list { list-style: none; padding: 0; margin: 4px 0 0; }
.top-partners-list li { padding: 3px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.top-partners-list li:last-child { border-bottom: none; }
.partner-name-link { font-weight: 600; }

/* Partner Workflow page */
.partner-wf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.partner-wf-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 12px; text-align: center;
}
.partner-wf-tile-num { font-size: 30px; font-weight: 700; color: var(--accent); }
.partner-wf-tile-label { font-size: 12px; margin-top: 2px; }

.partner-wf-list { list-style: none; padding: 0; margin: 0; }
.partner-wf-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.partner-wf-row:last-child { border-bottom: none; }
.partner-wf-row-main { flex: 1 1 auto; min-width: 0; }
.partner-wf-row-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.partner-wf-row-actions { flex: 0 0 auto; }
.partner-wf-due  { background: #fff8e1; }
.partner-wf-stale { background: #fff3e0; }
.partner-wf-never { background: #f5f5f5; }

.partner-wf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.partner-wf-table th, .partner-wf-table td { padding: 6px 8px; text-align: left; border-bottom: 1px dashed var(--border); }
.partner-wf-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.partner-wf-num-good { color: #1b5e20; font-weight: 600; }
.partner-wf-num-warn { color: #e65100; font-weight: 600; }
.partner-wf-num-bad  { color: #b71c1c; font-weight: 600; }

.partner-wf-recent { list-style: none; padding: 0; margin: 0; }
.partner-wf-recent > li { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.partner-wf-recent > li:last-child { border-bottom: none; }
.touch-type {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600;
}
.touch-note { margin-top: 3px; font-style: italic; }

/* Log-touch modal form rows */
.log-touch-modal .form-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.log-touch-modal .form-row label { width: 130px; font-size: 12px; color: var(--text-muted); }
.log-touch-modal .form-row select,
.log-touch-modal .form-row input[type=text],
.log-touch-modal .form-row textarea {
  flex: 1; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 13px;
}
.log-touch-modal .form-row textarea { resize: vertical; min-height: 70px; }

/* Bay Area region pills */
.region-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.region-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--border);
  transition: transform 0.05s;
}
.region-pill:hover { transform: translateY(-1px); border-color: var(--accent); }
.region-san-francisco { background: #e3f2fd; color: #0d47a1; border-color: #42a5f5; }
.region-east-bay      { background: #fff3e0; color: #e65100; border-color: #ff9800; }
.region-south-bay     { background: #f3e5f5; color: #6a1b9a; border-color: #ab47bc; }
.region-peninsula     { background: #e0f2f1; color: #00695c; border-color: #26a69a; }
.region-north-bay     { background: #f9fbe7; color: #827717; border-color: #c0ca33; }
.region-sacramento    { background: #fce4ec; color: #ad1457; border-color: #ec407a; }
.region-other         { background: #f5f5f5; color: #616161; border-color: #bdbdbd; }
.region-unmapped      { background: #fafafa; color: #757575; border-color: #e0e0e0; }

/* Partner detail page: per-rep card */
.rep-card { margin-top: 14px; }
.rep-engagement-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.rep-account-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-account-table th, .rep-account-table td {
  padding: 6px 8px; text-align: left; border-bottom: 1px dashed var(--border);
}
.rep-account-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.rep-account-table tr:hover td { background: var(--bg); }

/* Filter chip variants */
.filter-chip-partner { background: #ede7f6; color: #4527a0; border-color: #7e57c2; }
.filter-chip-region  { background: #e8f5e9; color: #1b5e20; border-color: #66bb6a; }
.chip-link { margin: 0 6px; color: inherit; text-decoration: none; font-weight: 700; }

/* Top 50 leadership coverage card */
.coverage-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px;
}
.coverage-tile {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; text-align: center;
}
.coverage-tile-num { font-size: 22px; font-weight: 700; color: var(--accent); }
.coverage-tile-label { font-size: 11px; margin-top: 2px; }

.coverage-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.coverage-table th, .coverage-table td {
  padding: 5px 8px; text-align: left; border-bottom: 1px dashed var(--border);
}
.coverage-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.coverage-table th.coverage-th-num, .coverage-cell { text-align: center; font-weight: 600; }
.coverage-cell.ok  { color: #1b5e20; }
.coverage-cell.gap { color: #b71c1c; }
.coverage-total.ok  { background: #e8f5e9; }
.coverage-total.gap { background: #ffebee; }
.coverage-gap-row td { background: #fafafa; }
.coverage-gap-row td:first-child { box-shadow: inset 3px 0 0 0 #ef5350; }
.needs-research { color: #c62828; font-weight: 600; font-style: italic; }

/* Read-only banner (shared deploy) */
/* ============================================================================
   Read-only / shared mode
   ============================================================================ */

.readonly-banner {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  font-weight: 500;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.01em;
  border-bottom: 1px solid #f38020;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 1px 0 rgba(243, 128, 32, 0.15);
}
.readonly-banner .readonly-icon { font-size: 14px; opacity: 0.9; }
.readonly-banner .readonly-text strong { color: #f38020; font-weight: 600; }
.readonly-banner .readonly-link {
  color: #f38020; font-weight: 600; text-decoration: none;
  border-bottom: 1px dashed rgba(243, 128, 32, 0.5);
  padding-bottom: 1px; margin-left: 4px;
}
.readonly-banner .readonly-link:hover {
  color: #ffa057;
  border-bottom-color: #ffa057;
}

/* When in read-only mode, hide write affordances entirely so the shared view
   stays clean. Tag any button/section that mutates with class="hide-in-readonly". */
body.read-only .hide-in-readonly { display: none !important; }

/* "Read-only mode" badge in the topbar for explicit identification */
body.read-only::before {
  /* nothing — the banner already says it */
}

/* ============================================================================
   🏆 The Trophy Room — hunting lodge UI
   ============================================================================ */

.lodge {
  position: relative;
  min-height: 100vh;
  margin: -16px;
  padding: 32px 32px 80px;
  /* Wood-panel wall: layered gradients fake oak grain + warm vignette */
  background:
    radial-gradient(ellipse at center 20%, rgba(255,200,120,0.18), transparent 60%),
    repeating-linear-gradient(
      90deg,
      #2a1810 0px, #3a2418 38px, #2a1810 60px, #3d2516 95px,
      #2a1810 120px, #4a2d1a 145px, #2a1810 180px
    ),
    linear-gradient(180deg, #1a0e08 0%, #2a1810 30%, #3a2418 70%, #1a0e08 100%);
  color: #f5e6c8;
  font-family: Georgia, "Times New Roman", serif;
}
.lodge::before {
  /* horizontal plank seams */
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 280px, rgba(0,0,0,0.4) 280px 282px);
  pointer-events: none;
}

.lodge-header {
  text-align: center; margin-bottom: 28px; position: relative; z-index: 2;
}
.lodge-title h1 {
  font-family: "Playfair Display", "Didot", Georgia, serif;
  font-size: 44px; font-weight: 800;
  margin: 0; letter-spacing: 0.02em;
  color: #f4d792;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 32px rgba(255,180,80,0.3);
}
.lodge-subtitle {
  color: #d4b888; font-size: 14px; margin-top: 6px; font-style: italic;
}
.lodge-subtitle strong { color: #ffd56a; font-style: normal; }

.lodge-section { position: relative; z-index: 2; margin-bottom: 40px; }
.lodge-divider {
  display: flex; align-items: center; justify-content: center;
  margin: 36px 0 20px;
  text-align: center;
}
.lodge-divider span {
  font-family: Georgia, serif; font-weight: 700; letter-spacing: 0.35em;
  color: #c9a672; font-size: 12px;
  padding: 6px 18px;
  border: 1px solid #6b4a28; border-radius: 4px;
  background: rgba(0,0,0,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* -- Mantle: the place of honor over the fireplace -- */
.lodge-mantle-label {
  text-align: center; margin-bottom: 18px;
}
.lodge-mantle-label span {
  font-family: Georgia, serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.4em; color: #f4d792;
}
.subtle-gold { color: #b89860; font-size: 12px; font-style: italic; margin-top: 2px; }

.mantle-shelf {
  display: flex; justify-content: center; align-items: flex-end; gap: 28px;
  flex-wrap: wrap;
  padding: 12px 16px 6px;
  /* Wooden mantle shelf */
  background: linear-gradient(180deg, transparent 0%, transparent 65%,
    #4a2d1a 65%, #3a2210 72%, #2a1808 85%, #1a0e04 100%);
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 -12px 16px rgba(0,0,0,0.6), 0 10px 20px rgba(0,0,0,0.5);
  min-height: 240px;
}

.mantle-fireplace {
  position: relative; margin: 0 auto; width: 70%; max-width: 720px;
  height: 100px;
  background: linear-gradient(180deg, #1a0e08, #0a0604);
  border: 3px solid #4a2d1a; border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  box-shadow: inset 0 8px 20px rgba(0,0,0,0.95);
}
.fireplace-mouth {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 60%;
  background: radial-gradient(ellipse at center bottom, #ff6a00, #b03000 40%, #4a1500 80%, #1a0500 100%);
  border-radius: 50% 50% 8% 8%;
  filter: blur(2px);
  animation: flicker 3.5s ease-in-out infinite;
}
.fireplace-glow {
  position: absolute; bottom: -10%; left: 50%; transform: translateX(-50%);
  width: 80%; height: 50%;
  background: radial-gradient(ellipse, rgba(255,140,40,0.4), transparent 70%);
  filter: blur(8px);
  animation: flicker 4s ease-in-out infinite;
}
@keyframes flicker {
  0%,100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50%     { opacity: 0.85; transform: translateX(-50%) scale(1.04); }
}

/* -- Big game wall (the middle layer) -- */
.trophy-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px 20px; padding: 18px 12px;
  background:
    radial-gradient(ellipse at center 30%, rgba(255,200,120,0.08), transparent 70%);
}

/* -- Smaller mounts on shelves -- */
.trophy-shelf {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px 10px; padding: 12px 8px;
}

/* -- Individual trophy mount -- */
.trophy {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.trophy:hover { transform: translateY(-4px) scale(1.03); }
.trophy:hover .trophy-shield { box-shadow: 0 8px 32px rgba(255,180,80,0.4); }

.antlers {
  width: 100%;
  margin-bottom: -8px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.7));
}
.antlers svg path { stroke: #2a1810; }
.trophy-legendary .antlers { width: 100%; max-width: 220px; height: 90px; }
.trophy-big       .antlers { width: 100%; max-width: 150px; height: 60px; }
.trophy-small     .antlers { display: none; }

/* The wooden shield mount under the antlers */
.trophy-shield {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #5c3a1f 0%, #3d2415 40%, #5c3a1f 100%);
  border: 3px solid #2a1408;
  border-radius: 50% 50% 14% 14% / 40% 40% 12% 12%;  /* shield shape */
  padding: 14px 10px 12px;
  text-align: center;
  box-shadow:
    inset 0 2px 8px rgba(255,200,140,0.2),
    inset 0 -8px 14px rgba(0,0,0,0.6),
    0 6px 16px rgba(0,0,0,0.7);
}

.trophy-legendary .trophy-shield {
  padding: 22px 14px 16px;
  background: linear-gradient(135deg, #6b4326 0%, #4a2c18 40%, #6b4326 100%);
}
.trophy-small .trophy-shield {
  border-radius: 50% 50% 18% 18% / 35% 35% 14% 14%;
  padding: 10px 6px 8px;
}

.trophy-face {
  margin: 0 auto 10px;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, #f5e6c8, #b89860 75%, #6b4326 100%);
  border-radius: 50%;
  border: 3px solid #2a1408;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.5);
  overflow: hidden;
}
.trophy-legendary .trophy-face { width: 96px; height: 96px; }
.trophy-small .trophy-face { width: 40px; height: 40px; margin-bottom: 6px; }
.trophy-face-img { width: 70%; height: 70%; object-fit: contain; }
.trophy-face-fallback { font-size: 28px; font-weight: 800; color: #4a2c18; font-family: Georgia, serif; }

/* Brass plaque under the head — the engraved name & ARR */
.trophy-plaque {
  background: linear-gradient(180deg, #d4af6a 0%, #b8923f 50%, #8a6a22 100%);
  border: 2px solid #5c4218;
  border-radius: 3px;
  padding: 6px 6px 5px;
  font-family: "Times New Roman", Georgia, serif;
  color: #2a1408;
  box-shadow: inset 0 1px 0 rgba(255,230,180,0.6), 0 2px 4px rgba(0,0,0,0.4);
}
.plaque-name {
  font-weight: 700; font-size: 12px; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255,230,180,0.4);
  word-wrap: break-word;
}
.plaque-arr {
  font-size: 10px; font-style: italic; margin-top: 2px;
  color: #4a2c18;
}
.plaque-meta {
  font-size: 9px; margin-top: 2px; color: #5c3a1f; letter-spacing: 0.03em;
}
.trophy-legendary .plaque-name { font-size: 14px; }
.trophy-legendary .plaque-arr  { font-size: 12px; font-weight: 600; font-style: normal; }
.trophy-small .plaque-name { font-size: 10px; }
.trophy-small .plaque-arr  { font-size: 9px; }

.lodge-footer {
  text-align: center; margin-top: 48px;
  padding: 14px;
  color: #c9a672; font-size: 13px; font-style: italic;
  border-top: 1px solid rgba(184, 152, 96, 0.3);
}
.lodge-flame { font-size: 18px; margin-right: 6px; animation: flicker 3s ease-in-out infinite; display: inline-block; }
.lodge-loading { color: #f4d792; padding: 80px; text-align: center; }

/* Nav active state when on trophy room */
.topbar nav a[data-route="trophy_room"].active { color: #f4d792; }

/* ---- 🦌 Fresh-kills section (current-year wins) ---- */
.lodge-fresh-kills {
  margin: 0 -16px 32px;
  padding: 28px 32px 20px;
  background:
    radial-gradient(ellipse at center, rgba(255,180,80,0.18), transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
  border-top: 4px double #b8923f;
  border-bottom: 4px double #b8923f;
  position: relative;
}
.lodge-fresh-kills::before,
.lodge-fresh-kills::after {
  /* gilded corner ornaments */
  content: "❦";
  position: absolute;
  color: #d4af6a; font-size: 22px;
  top: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}
.lodge-fresh-kills::before { left: 12px; }
.lodge-fresh-kills::after  { right: 12px; }

.lodge-divider-fresh span {
  background: linear-gradient(180deg, #ffd56a, #b8923f);
  color: #2a1408;
  font-size: 14px;
  letter-spacing: 0.3em;
  font-weight: 800;
  padding: 8px 22px;
  border: 2px solid #6b4326;
  text-shadow: 0 1px 0 rgba(255,230,180,0.6);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,230,180,0.5);
}

.fresh-kills-shelf {
  display: flex; justify-content: center; align-items: flex-end;
  flex-wrap: wrap; gap: 32px 24px;
  padding: 18px 12px 6px;
  background: linear-gradient(180deg, transparent 0%, transparent 70%,
    #5a3520 70%, #4a2c18 80%, #2a1808 95%, #1a0e04 100%);
  min-height: 280px;
  border-radius: 0 0 6px 6px;
  box-shadow: inset 0 -14px 18px rgba(0,0,0,0.55), 0 8px 16px rgba(0,0,0,0.4);
}

/* Fresh-kill trophy mount — sized between mantle and big-wall, with gold accent */
.trophy-fresh .antlers { width: 100%; max-width: 180px; height: 76px; }
.trophy-fresh .trophy-shield {
  padding: 18px 12px 14px;
  background: linear-gradient(135deg, #6b4326 0%, #4a2c18 40%, #6b4326 100%);
  border: 3px solid #d4af6a; /* gold border — separates fresh from old */
  box-shadow:
    inset 0 2px 8px rgba(255,200,140,0.3),
    inset 0 -8px 14px rgba(0,0,0,0.6),
    0 6px 18px rgba(255,180,80,0.4);
}
.trophy-fresh .trophy-face { width: 84px; height: 84px; }
.trophy-fresh .trophy-plaque {
  background: linear-gradient(180deg, #ffd56a 0%, #c89638 50%, #8a6a22 100%);
  box-shadow: inset 0 1px 0 rgba(255,240,180,0.7), 0 2px 6px rgba(0,0,0,0.4);
}
.trophy-fresh .plaque-name { font-size: 14px; }
.trophy-fresh .plaque-arr  { font-size: 11px; font-weight: 700; font-style: normal; color: #2a1408; }

/* "NEW" sash badge on fresh kills */
.trophy-fresh::after {
  content: "NEW";
  position: absolute; top: -8px; right: -8px;
  background: linear-gradient(135deg, #c8273f, #8a1521);
  color: #ffd56a;
  font-family: Georgia, serif; font-weight: 900; font-size: 10px;
  padding: 3px 8px;
  border: 2px solid #6b0e1a; border-radius: 3px;
  letter-spacing: 0.1em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  transform: rotate(8deg);
  z-index: 2;
}

.fresh-kills-ribbon {
  text-align: center;
  margin-top: 12px;
  font-family: Georgia, serif;
  font-weight: 700;
  color: #d4af6a;
  letter-spacing: 0.35em;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

/* ============================================================================
   📋 Manager Brief — printable single-page report
   ============================================================================ */
.brief {
  max-width: 1100px; margin: 0 auto;
  padding: 12px 4px 80px;
}
.brief-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.brief-title-block h1 { margin: 0; font-size: 26px; }
.brief-meta { margin-top: 4px; }
.brief-actions { display: flex; gap: 8px; }

.brief-headline {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, #fff8e1, #fffbf0);
  border: 1px solid #ffd56a;
  border-left: 6px solid #ff9800;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 14px;
  color: #4a2c08;
  line-height: 1.5;
}
.brief-headline-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #4caf50;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(76,175,80,0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity: 0.6 } }
.brief-headline-text { flex: 1; font-weight: 500; }

.brief-tiles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.brief-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 10px; text-align: center;
}
.brief-tile-value { font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1; }
.brief-tile-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.brief-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 18px;
}
.brief-section {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px;
}
.brief-section-wide { grid-column: 1 / -1; margin-bottom: 16px; }
.brief-section-head {
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.brief-list { list-style: none; padding: 0; margin: 0; }
.brief-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.brief-row:last-child { border-bottom: none; }
.brief-row-name { font-weight: 600; }
.brief-row-name a { text-decoration: none; }
.brief-row-name a:hover { text-decoration: underline; }
.brief-row-reason { grid-column: 1 / -1; margin-top: 3px; }
.brief-row-metric { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.brief-row-win  { border-left: 3px solid #4caf50; padding-left: 8px; margin: 6px 0; background: rgba(76,175,80,0.04); border-radius: 4px; }
.brief-row-risk { border-left: 3px solid #ef5350; padding-left: 8px; margin: 6px 0; background: rgba(239,83,80,0.04); border-radius: 4px; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 180px; align-items: center; gap: 10px; font-size: 13px; }
.funnel-row-label { font-weight: 600; }
.funnel-row-bar { height: 18px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.funnel-row-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #42a5f5, #1565c0);
  transition: width 0.3s ease;
}
.funnel-row-closed_won .funnel-row-bar-fill { background: linear-gradient(90deg, #66bb6a, #2e7d32); }
.funnel-row-closed_lost .funnel-row-bar-fill { background: linear-gradient(90deg, #ef5350, #b71c1c); }
.funnel-row-stalled .funnel-row-bar-fill    { background: linear-gradient(90deg, #ffa726, #ef6c00); }
.funnel-row-_unstaged .funnel-row-bar-fill  { background: linear-gradient(90deg, #b0bec5, #607d8b); }
.funnel-row-meta { font-size: 12px; color: var(--text-muted); text-align: right; }

/* Velocity */
.velocity-wrap { padding-top: 4px; }
.velocity-svg { width: 100%; height: auto; max-height: 160px; display: block; }
.velocity-legend { padding-top: 4px; }
.velocity-legend-action  { color: #1565c0; font-weight: 600; }
.velocity-legend-partner { color: #ff9800; font-weight: 600; }

/* Territory split tiles */
.territory-split { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.territory-card {
  display: block; padding: 12px; border-radius: 8px;
  text-decoration: none; color: inherit;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.05s, border-color 0.1s;
}
.territory-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.territory-region { font-weight: 700; font-size: 13px; }
.territory-num    { font-size: 22px; font-weight: 700; margin-top: 4px; }
.territory-cust   { margin-top: 2px; }
.territory-arr    { font-size: 13px; font-weight: 600; margin-top: 4px; color: var(--accent); }

/* Asks textarea */
.brief-asks-area {
  width: 100%; min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 13px; line-height: 1.5;
  resize: vertical;
}

.brief-footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Print: collapse nav, make it black-and-white friendly */
@media print {
  .topbar, .readonly-banner, .brief-actions { display: none !important; }
  body { background: white !important; color: black !important; }
  .brief-headline { background: white !important; }
  .brief-tile, .brief-section, .territory-card {
    border: 1px solid #888 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .brief { padding: 0; max-width: none; }
  .brief-tiles { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  .brief-tile-value { color: black !important; }
  a { color: black !important; text-decoration: none !important; }
  .funnel-row-bar-fill { background: #888 !important; }
}

/* Responsive: stack on narrow */
@media (max-width: 800px) {
  .brief-tiles { grid-template-columns: repeat(3, 1fr); }
  .brief-body { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 90px 1fr 120px; }
}

.filter-chip-industry { background: #ede7f6; color: #4527a0; border-color: #9575cd; }

/* ============================================================================
   💰 ROI Card — shareable, printable migration proposal
   ============================================================================ */
.roi-card {
  max-width: 1100px; margin: 0 auto;
  padding: 16px 12px 60px;
  background: #fff; color: #1a202c;
}
.roi-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 3px solid #f38020;  /* Cloudflare orange */
}
.roi-brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; color: #f38020; }
.roi-logo { font-size: 22px; }
.roi-meta { flex: 1; }
.roi-title { font-size: 20px; font-weight: 700; }
.roi-subtitle { margin-top: 2px; }
.roi-actions { display: flex; gap: 8px; }

.roi-account-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.roi-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: #f1f5f9; border: 1px solid #cbd5e1;
  font-size: 12px; font-weight: 500;
}
.roi-pill-customer { background: #dcfce7; border-color: #4ade80; color: #166534; font-weight: 600; }

.roi-headline {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  border: 2px solid #f38020;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 22px;
}
.roi-headline-big { font-size: 28px; font-weight: 700; color: #9a3412; }
.roi-headline-big strong { color: #7c2d12; font-size: 36px; }
.roi-headline-pct { font-size: 14px; color: #9a3412; margin-top: 4px; font-weight: 600; }
.roi-headline-line { margin-top: 10px; font-size: 14px; color: #451a03; font-style: italic; line-height: 1.5; }

.roi-section { margin-bottom: 22px; }
.roi-section h2 { font-size: 16px; font-weight: 700; margin: 0 0 10px; color: #f38020; border-bottom: 1px solid #fed7aa; padding-bottom: 4px; }

.roi-top-solutions {
  margin: 0; padding-left: 22px;
  font-size: 15px; font-weight: 600; color: #1e3a8a;
}
.roi-top-solutions li { padding: 4px 0; }

/* Timeline (3 phases side-by-side) */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.timeline-phase {
  background: #f8fafc; border-radius: 8px; padding: 14px;
  border-top: 4px solid #94a3b8;
}
.timeline-phase-1 { border-top-color: #16a34a; background: #f0fdf4; }
.timeline-phase-2 { border-top-color: #f59e0b; background: #fffbeb; }
.timeline-phase-3 { border-top-color: #6366f1; background: #eef2ff; }
.timeline-head { margin-bottom: 10px; }
.timeline-phase-num { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; font-weight: 700; }
.timeline-phase-label { font-size: 17px; font-weight: 700; margin-top: 2px; }
.timeline-phase-months { margin-top: 2px; }
.timeline-phase-savings { margin-top: 6px; font-size: 14px; font-weight: 700; color: #166534; }
.timeline-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 10px;
}
.timeline-item-solution { font-weight: 700; font-size: 13px; }
.timeline-item-comp { margin-top: 1px; font-style: italic; }
.timeline-item-rationale { font-size: 12px; color: #334155; margin: 6px 0; line-height: 1.4; }
.timeline-item-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.timeline-tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.timeline-tag-effort-low,  .timeline-tag-risk-low  { background: #dcfce7; color: #166534; }
.timeline-tag-effort-medium, .timeline-tag-risk-medium { background: #fef3c7; color: #92400e; }
.timeline-tag-effort-high, .timeline-tag-risk-high { background: #fee2e2; color: #991b1b; }
.timeline-tag-savings { background: #e0e7ff; color: #3730a3; }

/* ROI table */
.roi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.roi-table th, .roi-table td { padding: 7px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.roi-table th { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #475569; }
.roi-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.roi-table .roi-savings { color: #166534; font-weight: 600; }
.roi-table tfoot td { background: #fff7ed; font-size: 14px; }

.roi-caveats { background: #f8fafc; padding: 12px 14px; border-radius: 6px; }
.roi-caveat-list { margin: 0; padding-left: 22px; font-size: 12px; color: #475569; line-height: 1.6; }

.roi-footer {
  margin-top: 30px; padding-top: 14px;
  border-top: 1px solid #e2e8f0; text-align: center;
  font-size: 12px; color: #64748b;
}
.roi-footer > div:first-child { font-weight: 600; color: #f38020; }

/* Print: hide nav, banners, action buttons; expand to full page */
@media print {
  .topbar, .readonly-banner, .roi-actions { display: none !important; }
  body { background: white !important; padding: 0 !important; }
  .roi-card { padding: 0; max-width: none; }
  .roi-section { page-break-inside: avoid; }
  .timeline-phase { page-break-inside: avoid; }
  .timeline-item { page-break-inside: avoid; }
  .roi-headline { background: white !important; border-color: #f38020 !important; }
  .roi-headline-big, .roi-headline-pct, .roi-headline-line { color: black !important; }
  .roi-headline-big strong { color: #f38020 !important; }
}

@media (max-width: 800px) {
  .timeline { grid-template-columns: 1fr; }
}

/* ---------- detection conflicts ---------- */
.conflicts-page { max-width: 1100px; margin: 0 auto; padding: 24px 12px; }
.conflicts-page h1 { margin: 0 0 8px; font-size: 26px; }
.conflicts-page p.muted { color: #64748b; margin: 0 0 24px; font-size: 14px; }
.conflict-card {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px;
  margin-bottom: 16px; background: white;
}
.conflict-card.resolved { opacity: 0.55; }
.conflict-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.conflict-name { font-weight: 600; font-size: 16px; color: #0f172a; text-decoration: none; }
.conflict-name:hover { text-decoration: underline; }
.conflict-meta { color: #64748b; font-size: 13px; }
.conflict-badge {
  margin-left: auto; padding: 2px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.conflict-badge.unresolved { background: #fef3c7; color: #92400e; }
.conflict-badge.resolved   { background: #d1fae5; color: #065f46; }
.conflict-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.conflict-table th {
  text-align: left; padding: 6px 8px; color: #64748b;
  font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}
.conflict-table td { padding: 8px; vertical-align: top; border-bottom: 1px solid #f1f5f9; }
.conflict-table tr:last-child td { border-bottom: none; }
.conflict-table td.muted { color: #64748b; font-size: 12px; max-width: 480px; }
