/* ============================================================
   PEAK OPERATOR — DEALS DASHBOARD DESIGN SYSTEM OVERRIDES
   v20260512h — synced with peak-operator-shared.css Institutional palette.
   --navy/--gold/--white/--red mirror --bg-primary/--accent/--text-primary/--danger.
   ============================================================ */

/* ── Fonts (Google CDN — deals subdomain doesn't have local woff2) ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables — kept in sync with shared.css :root ───────── */
:root {
  --navy:   #07101F;          /* mirrors --bg-primary */
  --navy2:  #0D1B2E;          /* mirrors --bg-elev1 */
  --navy3:  #162840;          /* mirrors --bg-elev3 */
  --gold:   #C9A84C;          /* mirrors --accent */
  --gold2:  #D4B469;          /* mirrors --gold-hover (Institutional) */
  --gold3:  #F5E6C5;          /* lightest gold tint */
  --muted:  #5A7094;          /* mirrors --text-tertiary */
  --muted2: #94A3B8;          /* mirrors --text-secondary (synced from 8AA0BC) */
  --white:  #EDF2FA;          /* mirrors --text-primary */
  --nav-h:  60px;
  --red:    #EF4444;          /* mirrors --danger (Institutional) */
}

/* ── Body + base ─────────────────────────────────────────────── */
body {
  background: var(--navy) !important;
  color: var(--white) !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
}

h1, h2, h3, h4 {
  font-family: 'Bebas Neue', sans-serif !important;
  letter-spacing: 1px;
}

/* ── Tailwind background overrides ───────────────────────────── */
.bg-slate-900 { background: var(--navy) !important; }
.bg-slate-800 { background: var(--navy2) !important; }
.bg-slate-700 { background: var(--navy3) !important; }
.bg-slate-600 { background: var(--navy3) !important; }

/* ── Tailwind text overrides ─────────────────────────────────── */
.text-slate-200 { color: var(--white) !important; }
.text-slate-300 { color: #CBD5E1 !important; }
.text-slate-400 { color: var(--muted2) !important; }
.text-slate-500 { color: var(--muted) !important; }

/* ── Border overrides ────────────────────────────────────────── */
.border-slate-600,
.border-slate-700,
.border-slate-800 { border-color: rgba(255,255,255,0.08) !important; }

/* ── Inline background color overrides (attribute selectors) ─── */
/* These use !important to beat inline styles */
[style*="background:#0F2035"],
[style*="background: #0F2035"],
[style*="background-color:#0F2035"],
[style*="background-color: #0F2035"] { background: var(--navy) !important; }

[style*="background:#1B3A5C"],
[style*="background: #1B3A5C"] { background: var(--navy2) !important; }

[style*="background:#162E4A"],
[style*="background: #162E4A"],
[style*="background:#162840"],
[style*="background: #162840"] { background: var(--navy3) !important; }

[style*="background:#0D1B2E"],
[style*="background: #0D1B2E"] { background: var(--navy2) !important; }

/* ── Stage body backgrounds ──────────────────────────────────── */
.stage-body { background: var(--navy3) !important; }
.deal-card  { background: var(--navy2) !important; }
.deal-row   { background: var(--navy3) !important; }
.deal-row:hover { background: #1a3050 !important; }

/* ── Stat / generic cards (index + settings) ─────────────────── */
.stat-card {
  background: linear-gradient(135deg, var(--navy2), var(--navy3)) !important;
  border: 1px solid rgba(201,168,76,0.2) !important;
}
.card  { background: var(--navy2) !important; }
.mcard { background: var(--navy) !important; }

/* ── Selects not caught by generic input rule ─────────────────── */
.stage-select { background: var(--navy) !important; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal { background: var(--navy2) !important; border: 1px solid rgba(201,168,76,0.25) !important; }
.modal-section { border-color: rgba(201,168,76,0.12) !important; }

/* ── Email composer + forms ──────────────────────────────────── */
.email-composer { background: var(--navy2) !important; }
.broker-card    { background: var(--navy) !important; }
.debt-card      { background: var(--navy) !important; }
.doc-row        { background: var(--navy) !important; }

/* ── Remove number input spinners site-wide ─────────────────── */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ── Inputs ──────────────────────────────────────────────────── */
input:not([type=range]), textarea, select {
  background: var(--navy3) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: var(--white) !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
}
input:not([type=range]):focus, textarea:focus, select:focus {
  border-color: var(--gold) !important;
  outline: none !important;
}

/* .input and .textarea classes from settings.html */
.input, .textarea { background: var(--navy) !important; }
.input:focus, .textarea:focus, select.input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15) !important;
}

/* ── Gold accent buttons ─────────────────────────────────────── */
button.bg-yellow-600, button.bg-yellow-500 {
  background: var(--gold) !important;
}
button.bg-yellow-600:hover, button.bg-yellow-500:hover {
  background: var(--gold2) !important;
}

/* ── Password gate restyle ───────────────────────────────────── */
#password-gate {
  background: var(--navy) !important;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px) !important;
  background-size: 60px 60px !important;
}

.po-gate-box {
  background: var(--navy2);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 14px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
}

.po-gate-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(32px, 8vw, 60px);
  letter-spacing: 8px;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(135deg, #E8C96A 0%, #C9A84C 40%, #F5E6C5 70%, #C9A84C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
}

.po-gate-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.po-gate-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  margin: 0 auto 1.75rem;
  border-radius: 2px;
}

.po-gate-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.po-gate-input:focus { border-color: rgba(201,168,76,0.5); }

.po-gate-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.po-gate-btn:hover { background: var(--gold2); }

.po-gate-error {
  color: #FCA5A5;
  font-size: 0.75rem;
  text-align: center;
  margin-top: 0.75rem;
  display: none;
}

.po-gate-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.po-gate-powered {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 9px;
  margin-bottom: 10px;
}

/* ── PEAK OPERATOR NAV STYLES (for deals subdomain) ─────────── */

/* Mount div is a direct child of <body> (full-page height) — sticky here sticks for the entire scroll */
#peak-nav-mount {
  position: sticky;
  top: 0;
  z-index: 120;
  height: var(--nav-h);
}

.po-navbar {
  position: relative;
  z-index: 120;
  height: var(--nav-h);
  background: var(--navy2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* Brand */
.po-nav-brand a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.po-nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: linear-gradient(135deg, #E8C96A 0%, #C9A84C 50%, #F5E6C5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Nav links row */
.po-nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  align-items: center;
  overflow: visible;
}

.po-nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted2);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  line-height: 1;
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.po-nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.po-nav-link.active {
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}
.po-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.4rem;
  right: 0.4rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(201,168,76,0.5);
}

/* Dropdowns */
.po-nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.po-nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted2);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.po-nav-dropdown-trigger::after {
  content: '▾';
  font-size: 0.6rem;
  color: var(--gold);
  margin-left: 0.12rem;
  opacity: 0.85;
}
.po-nav-dropdown:hover .po-nav-dropdown-trigger,
.po-nav-dropdown-trigger:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}
.po-nav-dropdown-trigger.active {
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}
.po-nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: var(--navy2);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  padding: 0.4rem 0;
  min-width: 220px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}
.po-nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}
.po-nav-dropdown:hover .po-nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.po-nav-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  color: var(--muted2);
  font-size: 0.82rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
  text-decoration: none;
  line-height: 1.3;
}
.po-nav-dropdown-item:hover,
.po-nav-dropdown-item.active {
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}
/* Dropdown section labels (TOOLS / ROLES) */
.po-nav-dropdown-section {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.65rem 1rem 0.2rem;
  pointer-events: none;
}
.po-nav-dropdown-section:first-child { padding-top: 0.35rem; }
.po-nav-dropdown-divider {
  height: 1px;
  background: rgba(201,168,76,0.2);
  margin: 0.3rem 0;
}

/* Drawer section labels (TOOLS / ROLES) */
.po-drawer-role-section {
  font-size: 0.6rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  padding: 0.6rem 1.5rem 0.15rem 2.5rem;
}
.po-drawer-role-divider {
  height: 1px;
  background: rgba(201,168,76,0.15);
  margin: 0.3rem 1.25rem;
}

.po-coming-soon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(90,112,148,0.2);
  border: 1px solid rgba(90,112,148,0.3);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 0.4rem;
  flex-shrink: 0;
}

/* Nav user section */
.po-nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.po-nav-name {
  font-size: 0.78rem;
  color: var(--muted2);
  font-family: 'DM Sans', system-ui, sans-serif;
}
.po-btn-profile {
  padding: 0.38rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(201,168,76,0.4);
  background: transparent;
  color: var(--gold2);
  font-size: 0.75rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.po-btn-profile:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}
.po-btn-logout {
  padding: 0.38rem 0.75rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: all 0.15s;
  cursor: pointer;
}
.po-btn-logout:hover { color: #E63946; border-color: #E63946; }

/* Hamburger */
.po-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  padding: 13px 10px;
  background: transparent;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
}
.po-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.po-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.po-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.po-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.po-mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7,16,31,0.7);
  z-index: 119;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.po-mobile-drawer.open { display: block; }
.po-drawer-inner {
  background: var(--navy2);
  border-bottom: 2px solid rgba(201,168,76,0.25);
  padding: 0.25rem 0 1rem;
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-h));
}
.po-drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.5rem;
  color: var(--muted2);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', system-ui, sans-serif;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.po-drawer-link:hover,
.po-drawer-link.active {
  color: var(--gold);
  background: rgba(201,168,76,0.07);
  border-left-color: var(--gold);
}
.po-drawer-section {
  font-size: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0.8rem 1.5rem 0.2rem;
}
.po-drawer-sublink {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.5rem 0 2.5rem;
  color: var(--muted2);
  font-size: 0.88rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.po-drawer-sublink:hover,
.po-drawer-sublink.active {
  color: var(--gold);
  background: rgba(201,168,76,0.07);
  border-left-color: var(--gold);
}
.po-drawer-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.5rem 1.25rem;
}
.po-drawer-user-section {
  padding: 0.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.po-drawer-name {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: 'DM Sans', system-ui, sans-serif;
}
.po-drawer-logout {
  display: flex;
  align-items: center;
  min-height: 48px;
  width: 100%;
  padding: 0 1.5rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}
.po-drawer-logout:hover { color: #E63946; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .po-nav-links  { display: none; }
  .po-nav-name   { display: none; }
  .po-btn-logout { display: none; }
  .po-btn-profile { display: none; }
  .po-hamburger  { display: flex; }
  .po-navbar     { padding: 0 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PEAK OPERATOR AGENT — floating chat panel
   (Mirrors kpi.peakoperator.com/css/app.css — kept in sync manually)
   ═══════════════════════════════════════════════════════════════ */

.peak-agent-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none;
  cursor: pointer;
  z-index: 800;
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.peak-agent-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.6);
}
.peak-agent-fab:hover::before { opacity: 1; }
.peak-agent-fab::before {
  content: 'Ask Peak Operator';
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(7, 16, 31, 0.95);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 1px solid rgba(201, 168, 76, 0.25);
}
.peak-agent-fab svg {
  width: 24px;
  height: 24px;
  fill: var(--navy);
  display: block;
  flex-shrink: 0;
}

.peak-agent-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50vw;
  background: var(--navy2);
  border-left: 1px solid rgba(201, 168, 76, 0.2);
  z-index: 900;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
              width 280ms cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 280ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.peak-agent-panel.is-open { transform: translateX(0); }
.peak-agent-panel.ca-panel--fullscreen {
  width: 100vw !important;
  border-left: none !important;
  border-radius: 0 !important;
}

.peak-agent-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 850;
}
@media (max-width: 640px) {
  .peak-agent-backdrop.is-visible { display: block; }
}

.poa-header {
  height: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  gap: 10px;
}
.poa-brand { display: flex; flex-direction: column; gap: 1px; }
.poa-brand-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.poa-brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(237, 242, 250, 0.55);
  line-height: 1;
}
.poa-header-actions { display: flex; align-items: center; gap: 6px; }
.poa-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}
.poa-icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--white); }
.poa-icon-btn svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.poa-new-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.45);
  background: transparent;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.poa-new-btn:hover { background: rgba(201, 168, 76, 0.1); }

.poa-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }

.poa-sidebar {
  width: 0;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.22s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.poa-sidebar.is-visible { max-width: 200px; width: 200px; overflow-y: auto; }
.poa-conv-list { display: flex; flex-direction: column; padding: 8px 0; }
.poa-sidebar-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.poa-conv-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s ease;
}
.poa-conv-item:hover { background: rgba(201, 168, 76, 0.05); }
.poa-conv-item.is-active { background: rgba(201, 168, 76, 0.09); border-left-color: var(--gold); }
.poa-conv-title { font-size: 12px; color: var(--white); line-height: 1.4; word-break: break-word; margin-bottom: 4px; }
.poa-conv-meta { display: flex; align-items: center; justify-content: space-between; }
.poa-conv-time { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.poa-conv-del {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.12s ease, opacity 0.12s ease;
}
.poa-conv-item:hover .poa-conv-del { opacity: 1; }
.poa-conv-del:hover { color: var(--red); }

.poa-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.poa-messages { flex: 1; overflow-y: auto; padding: 16px 14px; scroll-behavior: smooth; min-height: 0; }
.poa-messages::-webkit-scrollbar { width: 4px; }
.poa-messages::-webkit-scrollbar-track { background: transparent; }
.poa-messages::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, 0.2); border-radius: 2px; }

.chat-msg {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  max-width: 90%;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
}
.chat-msg.user {
  background: var(--navy3);
  color: var(--white);
  margin-left: auto;
  border-radius: 8px 8px 2px 8px;
}
.chat-msg.ai {
  background: rgba(201, 168, 76, 0.07);
  border-left: 3px solid var(--gold);
  color: var(--white);
  margin-right: auto;
  border-radius: 2px 8px 8px 8px;
}
.chat-msg-content p { margin: 0 0 8px 0; }
.chat-msg-content p:last-child { margin-bottom: 0; }
.chat-msg-content ul,
.chat-msg-content ol { margin: 6px 0 8px 18px; }
.chat-msg-content li { margin-bottom: 3px; }
.chat-msg-content h2,
.chat-msg-content h3,
.chat-msg-content h4 { margin: 10px 0 4px 0; font-size: 13px; color: var(--gold2); }
.chat-msg-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.chat-msg-content hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 8px 0; }
.chat-msg-content strong { color: var(--gold3); }
.agent-md-table { border-collapse: collapse; width: 100%; font-size: 12px; margin: 6px 0; }
.agent-md-table th,
.agent-md-table td { border: 1px solid rgba(255,255,255,0.1); padding: 4px 8px; text-align: left; }
.agent-md-table th { background: rgba(201,168,76,0.1); color: var(--gold2); }
.chat-msg-tools {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

.poa-typing { padding: 14px; display: flex; gap: 4px; align-items: center; }
.poa-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: poa-bounce 1.3s infinite ease-in-out;
}
.poa-typing span:nth-child(1) { animation-delay: 0s; }
.poa-typing span:nth-child(2) { animation-delay: 0.2s; }
.poa-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes poa-bounce {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40%            { opacity: 1;    transform: scale(1); }
}

/* ── Cycling narration thinking state ─────────────────────── */
.poa-thinking-narr {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.78);
  min-height: 36px;
}
.poa-thinking-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  animation: poa-thinking-pulse 1.2s ease-in-out infinite;
}
.poa-thinking-text { flex: 1 1 auto; display: inline-block; }
.poa-thinking-text.poa-thinking-in {
  animation: poa-thinking-fade 3.3s ease-in-out forwards;
}
@keyframes poa-thinking-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.15); }
}
@keyframes poa-thinking-fade {
  0%   { opacity: 0; transform: translateY(4px); }
  12%  { opacity: 1; transform: translateY(0); }
  88%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

.poa-input-area {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.poa-textarea {
  flex: 1;
  background: var(--navy3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  resize: none;
  outline: none;
  min-height: 52px;
  max-height: 160px;
  overflow-y: auto;
  transition: border-color 0.15s ease;
}
.poa-textarea:focus { border-color: rgba(201, 168, 76, 0.5); }
.poa-textarea::placeholder { color: var(--muted); }
.poa-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}
.poa-send-btn:hover:not(:disabled) { background: var(--gold2); }
.poa-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.poa-send-btn svg { width: 18px; height: 18px; fill: var(--navy); display: block; }
.poa-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(7, 16, 31, 0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: poa-spin 0.65s linear infinite;
}
@keyframes poa-spin { to { transform: rotate(360deg); } }

.poa-empty { padding: 36px 20px 20px; text-align: center; }
.poa-empty-hero {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1.1;
}
.poa-empty-sub { color: rgba(237, 242, 250, 0.65); font-size: 13px; line-height: 1.55; margin-bottom: 24px; }
.poa-chips { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.poa-chip {
  padding: 9px 14px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 20px;
  background: transparent;
  color: rgba(237, 242, 250, 0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
  line-height: 1.35;
}
.poa-chip:hover { background: rgba(201, 168, 76, 0.09); border-color: var(--gold); }

@media (max-width: 1024px) and (min-width: 641px) {
  .peak-agent-panel { width: 420px; }
}
@media (max-width: 640px) {
  .peak-agent-fab   { width: 52px; height: 52px; bottom: 16px; right: 16px; }
  .peak-agent-fab::before { display: none; }
  .peak-agent-panel { width: 100vw; border-left: none; }
  .poa-sidebar { display: none !important; }
  .poa-sidebar.is-visible {
    display: flex !important;
    max-width: 100% !important;
    width: 100% !important;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background: var(--navy2);
  }
}

/* ── Underwriter agent additions ────────────────────────────── */
.uw-agent-fab::before { content: 'Ask Peak Underwriter'; }

/* ── Capital agent additions ─────────────────────────────────── */
.ca-agent-fab::before { content: 'Ask Peak Capital Agent'; }

.ca-sidebar-lbl {
  padding: 10px 12px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}

/* ── Touchpoint approval card ─────────────────────────────────── */
.ca-approval-card {
  margin-top: 10px;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(201, 168, 76, 0.05);
  border-top: 1px solid rgba(201, 168, 76, 0.2);
  border-right: 1px solid rgba(201, 168, 76, 0.2);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  overflow: hidden;
  font-size: 12px;
}
.ca-approval-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(201, 168, 76, 0.1);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}
.ca-approval-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
}
.ca-approval-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 8px 12px 4px;
}
.ca-approval-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}
.ca-approval-field-label {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.ca-approval-field-value {
  font-size: 12px;
  color: var(--white);
  font-weight: 500;
  line-height: 1.4;
}
.ca-approval-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text2);
}
.ca-approval-pill--positive { background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.3); color: #4ADE80; }
.ca-approval-pill--negative { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.3); color: #F87171; }
.ca-approval-pill--mixed    { background: rgba(251,191,36,0.12);  border-color: rgba(251,191,36,0.3);  color: #FBBF24; }
.ca-approval-body {
  padding: 2px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ca-approval-body-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ca-approval-body-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
}
.ca-approval-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ca-btn {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s;
  letter-spacing: 0.02em;
}
.ca-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ca-btn--approve { background: var(--gold); color: #07101F; }
.ca-btn--approve:hover:not(:disabled) { background: var(--gold2); }
.ca-btn--edit    { background: transparent; border: 1px solid rgba(201,168,76,0.35); color: var(--gold); }
.ca-btn--edit:hover:not(:disabled) { border-color: var(--gold); }
.ca-btn--discard { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--muted); }
.ca-btn--discard:hover:not(:disabled) { border-color: rgba(248,113,113,0.5); color: #F87171; }
.ca-approval-resolved {
  margin-top: 10px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.ca-approval-resolved--approved {
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.25);
  color: #4ADE80;
}
.ca-approval-resolved--discarded {
  background: rgba(148,163,184,0.06);
  border: 1px solid rgba(148,163,184,0.15);
  color: var(--muted);
}

.uw-conv-section-header {
  padding: 10px 12px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4px;
}
.uw-conv-section { display: flex; flex-direction: column; }
.uw-conv-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.uw-msg-author {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  opacity: 0.8;
}

/* ── Deal card stat boxes (units / year / grade) ─────────────────── */
.dc-stat-box {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  border-radius: 6px;
}
.dc-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  display: block;
}
.dc-stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
  display: block;
  opacity: 0.75;
}
.dc-stat-green {
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.4);
  color: #86EFAC;
}
.dc-stat-red {
  background: rgba(239,68,68,0.14);
  border: 1px solid rgba(239,68,68,0.4);
  color: #FCA5A5;
}
.dc-stat-gray {
  background: rgba(148,163,184,0.08);
  border: 1px solid rgba(148,163,184,0.25);
  color: #64748B;
}

/* ── Phase 3.4: Fullscreen toggle ─────────────────────────────────── */
.ca-btn-fullscreen {
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
.ca-btn-fullscreen:hover { opacity: 1; }
.ca-btn-fullscreen--active { opacity: 1; color: var(--gold) !important; }
.ca-btn-fullscreen svg { fill: currentColor; }

/* ── Phase 3.4: Input row with paperclip ──────────────────────────── */
.ca-input-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
}
.ca-input-attach {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  padding: 0;
  line-height: 1;
}
.ca-input-attach:hover {
  border-color: rgba(201,168,76,0.5);
  color: var(--gold);
  background: rgba(201,168,76,0.06);
}

/* ── Phase 3.4: Attachment chips above input ──────────────────────── */
.ca-attachments {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
  min-height: 0;
}
.ca-attachments:empty { margin-bottom: 0; }
.ca-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 6px;
  padding: 3px 7px 3px 8px;
  font-size: 11px;
  color: var(--white);
  max-width: 220px;
}
.ca-attachment-chip--loading { opacity: 0.6; }
.ca-attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.ca-attachment-size {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.ca-attachment-loading {
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
}
.ca-attachment-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.12s;
}
.ca-attachment-remove:hover { color: #F87171; }
.ca-attach-error {
  font-size: 11px;
  color: #F87171;
  padding: 3px 0;
  width: 100%;
}

/* ── Phase 3.4: Message attachment indicator ──────────────────────── */
.ca-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.ca-message-attachment-chip {
  font-size: 10px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ── Phase 3.4: Drag-and-drop overlay ────────────────────────────── */
.peak-agent-panel.ca-dragover { outline: none; }
.peak-agent-panel.ca-dragover::after {
  content: 'Drop file to attach';
  position: absolute;
  inset: 0;
  z-index: 99;
  background: rgba(7,16,31,0.82);
  border: 2px dashed var(--gold);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--gold);
  pointer-events: none;
}

/* ── Phase 4.1: Pre-call brief card ──────────────────────────────── */
.ca-brief-card {
  border-left: 4px solid var(--gold);
  background: rgba(201,168,76,0.06);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ca-brief-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ca-brief-icon { font-size: 16px; flex-shrink: 0; }
.ca-brief-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-transform: uppercase;
  flex: 1;
}
.ca-brief-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #FBBF24;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 4px;
  padding: 2px 7px;
}
.ca-brief-investor-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.ca-brief-investor-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.ca-brief-section {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
}
.ca-brief-section--objection {
  border-left: 3px solid rgba(251,191,36,0.5);
  padding-left: 10px;
  margin-left: -1px;
}
.ca-brief-section--avoid {
  border-left: 3px solid rgba(248,113,113,0.4);
  padding-left: 10px;
  margin-left: -1px;
}
.ca-brief-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.85;
}
.ca-brief-outcome-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 4px;
}
.ca-brief-outcome-reasoning,
.ca-brief-objection-reasoning {
  font-size: 11px;
  color: rgba(237,242,250,0.65);
  line-height: 1.5;
}
.ca-brief-objection-text {
  font-size: 12px;
  font-weight: 500;
  color: #FBBF24;
  margin-bottom: 3px;
}
.ca-brief-last-call {
  font-size: 12px;
  color: rgba(237,242,250,0.8);
  line-height: 1.55;
  margin: 0;
  font-style: italic;
}
.ca-brief-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ca-brief-list li {
  font-size: 12px;
  color: rgba(237,242,250,0.85);
  line-height: 1.45;
}
.ca-brief-structure {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ca-brief-structure-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
}
.ca-brief-structure-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  padding-top: 2px;
}
.ca-brief-structure-text {
  font-size: 12px;
  color: rgba(237,242,250,0.85);
  line-height: 1.45;
}
.ca-brief-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
.ca-brief-summary {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 4px;
  border-left: 3px solid rgba(74,222,128,0.4);
  padding-left: 10px;
  margin: 4px 0 8px;
}

/* ── Phase 4.1.5a: Investor Modal — Touchpoint Timeline + Profile ── */
.modal-tp-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(90,112,148,0.18);
}
.modal-tp-row:last-child { border-bottom: none; }
.modal-tp-icon {
  font-size: 14px;
  width: 22px;
  flex-shrink: 0;
  padding-top: 1px;
}
.modal-tp-body { flex: 1; min-width: 0; }
.modal-tp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.modal-tp-date {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted2);
  letter-spacing: 0.3px;
}
.modal-tp-dir {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-tp-source {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tp-subject {
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tp-summary {
  font-size: 11px;
  color: rgba(237,242,250,0.7);
  line-height: 1.4;
}

/* Commitments */
.modal-commitment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(90,112,148,0.18);
}
.modal-commitment-row:last-child { border-bottom: none; }
.modal-commitment-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  min-width: 90px;
}
.modal-commitment-type {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  font-weight: 700;
}
.modal-commitment-date {
  font-size: 10px;
  color: var(--muted2);
  font-family: 'JetBrains Mono', monospace;
}
.modal-commitment-notes {
  font-size: 11px;
  color: rgba(237,242,250,0.6);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline-edit selects in modal */
.modal-inline-select {
  background: rgba(13,27,46,0.8);
  border: 1px solid rgba(90,112,148,0.35);
  border-radius: 5px;
  color: var(--white);
  font-size: 11px;
  padding: 3px 6px;
  cursor: pointer;
  max-width: 220px;
  width: 100%;
}
.modal-inline-select:focus { outline: 1px solid var(--gold); }
.modal-inline-edit-row { align-items: flex-start !important; padding: 5px 0; }
.modal-inline-edit-val { flex: 1; justify-content: flex-end; display: flex; }

/* Section count badge */
.modal-section-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  background: rgba(90,112,148,0.3);
  color: var(--muted2);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Empty state */
.modal-empty-state {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
  padding: 0.3rem 0;
}

/* ── Phase 4.2: Stale Lead Alert Cards ──────────────────────────────── */
.ca-stale-card {
  border-left: 4px solid #F97316;
  background: rgba(249,115,22,0.06);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ca-stale-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ca-stale-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: #F97316;
  text-transform: uppercase;
  flex: 1;
}
.ca-stale-days {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #FB923C;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 4px;
  padding: 2px 7px;
}
.ca-stale-investor-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.ca-stale-investor-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}
.ca-stale-draft {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ca-stale-channel-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted2);
  background: rgba(90,112,148,0.15);
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.ca-stale-draft-subject {
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  opacity: 0.85;
}
.ca-stale-draft-body {
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.55;
  white-space: pre-wrap;
}
.ca-stale-actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}
.ca-stale-btn-approve {
  border-color: rgba(74,222,128,0.35) !important;
  color: #4ADE80 !important;
}
.ca-stale-btn-approve:hover {
  background: rgba(74,222,128,0.1) !important;
}
.ca-stale-btn-dismiss {
  border-color: rgba(156,163,175,0.3) !important;
  color: var(--muted) !important;
}
.ca-stale-summary {
  font-size: 11px;
  color: #4ADE80;
  padding: 6px 4px;
  border-left: 3px solid rgba(74,222,128,0.4);
  padding-left: 10px;
  margin: 4px 0 8px;
}

/* ── Today's Queue — pinned sidebar section ──────────────────── */
.ca-queue-pinned {
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  background: rgba(201,168,76,0.04);
  padding-bottom: 6px;
  flex-shrink: 0;
}
.ca-queue-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding-right: 10px !important;
}
.ca-queue-count {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
}
.ca-queue-items {
  padding: 2px 0 4px;
  max-height: 220px;
  overflow-y: auto;
}
.ca-queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.15s;
}
.ca-queue-item:hover {
  background: rgba(255,255,255,0.04);
}
.ca-queue-item--stale {
  border-left-color: #F97316;
}
.ca-queue-item--stale:hover {
  background: rgba(249,115,22,0.06);
}
.ca-queue-item--brief {
  border-left-color: var(--gold);
}
.ca-queue-item--brief:hover {
  background: rgba(201,168,76,0.06);
}
.ca-queue-item--urgent {
  border-left-color: #EF4444;
}
.ca-queue-item-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.ca-queue-item-text {
  overflow: hidden;
}
.ca-queue-item-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ca-queue-item-meta {
  font-size: 10px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.ca-queue-empty {
  padding: 8px 12px;
}
.ca-queue-empty p {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 2px;
}
.ca-queue-empty-hint {
  font-size: 10px !important;
  color: var(--muted) !important;
  opacity: 0.7;
}

/* ── View Full Profile — disabled link ───────────────────────── */
.modal-hdr-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.im-view-full-profile--disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

/* Stage column backgrounds are set inline via JS STAGE_BG map in pipeline.js */

/* ── Stale alert — View Profile link ─────────────────────────── */
.ca-stale-view-profile {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  margin-top: 2px;
  letter-spacing: 0.03em;
  transition: color 0.15s ease;
}
.ca-stale-view-profile:hover {
  color: var(--gold);
}

/* === Post-Call Modal === */
.pc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pc-modal {
    background: #0f1d33;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Header */
.pc-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pc-modal-title { display: flex; align-items: center; gap: 8px; flex: 1; }
.pc-modal-icon { font-size: 18px; }
.pc-modal-investor-name { font-size: 16px; font-weight: 600; color: #ecf0f4; }
.pc-modal-meta { font-size: 11px; color: rgba(255, 255, 255, 0.45); }
.pc-modal-meta span + span { margin-left: 6px; }
.pc-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.pc-modal-close:hover { color: var(--gold); }

/* Loading */
.pc-modal-loading {
    padding: 60px 30px;
    text-align: center;
}
.pc-loading-stage {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 18px;
    letter-spacing: 0.02em;
    animation: pc-pulse 1.4s ease-in-out infinite;
}
@keyframes pc-pulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}
.pc-loading-bar {
    width: 240px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}
.pc-loading-fill {
    height: 100%;
    background: var(--gold);
    width: 30%;
    animation: pc-slide 1.6s ease-in-out infinite;
}
@keyframes pc-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(800%); }
}

/* Sections */
.pc-section {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pc-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
}

/* Extraction bullets */
.pc-bullet {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #ecf0f4;
}
.pc-bullet-icon { width: 18px; flex-shrink: 0; }
.pc-bullet-want .pc-bullet-icon { color: #4dd4a4; }
.pc-bullet-avoid .pc-bullet-icon { color: #e24b4a; }
.pc-bullet-timeline .pc-bullet-icon { color: #e8a840; }
.pc-bullet-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 4px;
    flex-shrink: 0;
}
.pc-bullet-value { color: #ecf0f4; flex: 1; }

/* Draft */
.pc-draft-subject-row {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pc-draft-subject-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-right: 6px;
}
.pc-draft-subject {
    font-size: 13px;
    color: #ecf0f4;
    font-weight: 500;
}
.pc-draft-body {
    width: 100%;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #ecf0f4;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.pc-draft-body[readonly] { cursor: default; }
.pc-draft-body--editable { border-color: var(--gold); }

/* Actions */
.pc-modal-actions {
    display: flex;
    gap: 8px;
    padding: 18px 20px;
}
.pc-btn {
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pc-btn-approve {
    background: var(--gold);
    color: #1a1a1a;
    flex: 1;
}
.pc-btn-approve:hover:not(:disabled) { background: #d4b85a; }
.pc-btn-edit {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
}
.pc-btn-edit:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.3); }
.pc-btn-dismiss {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}
.pc-btn-dismiss:hover:not(:disabled) { color: rgba(255, 255, 255, 0.8); }

/* Confirmation */
.pc-confirmation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(77, 212, 164, 0.12);
    border-top: 1px solid rgba(77, 212, 164, 0.25);
    color: #4dd4a4;
    font-size: 13px;
    font-weight: 500;
}
.pc-confirmation-icon { font-size: 16px; }

/* Trigger button on investor modal */
.pc-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 6px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pc-trigger-btn:hover {
    background: rgba(201, 168, 76, 0.22);
    border-color: var(--gold);
}
.pc-trigger-icon { font-size: 14px; }
