/* ==========================================================================
   PULSO DIGITAL — ENTERPRISE COMMAND CENTER DASHBOARD STYLESHEET
   Clean Slate Canvas + High-Tech Dark Obsidian Territorial Command Center
   ========================================================================== */

:root {
  /* Palette: Enterprise Slate & Executive Indigo/Emerald */
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-muted: #64748b;
  --paper: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-pale: #eff6ff;
  
  --green: #059669;
  --green-bright: #10b981;
  --green-pale: #ecfdf5;
  
  --red: #dc2626;
  --red-bright: #ef4444;
  --red-pale: #fef2f2;
  
  --amber: #d97706;
  --amber-pale: #fffbeb;
  
  --blue: #0284c7;
  --blue-pale: #f0f9ff;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar: 260px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }

/* ==========================================================================
   SIDEBAR NAV — ENTERPRISE OBSIDIAN / SLATE DARK
   ========================================================================== */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  color: #f1f5f9;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  position: relative;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.brand small {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

.brand-mark {
  width: 42px;
  height: 38px;
  display: grid;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
}

.brand-wave-mark {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 12px;
  background: radial-gradient(circle, rgba(14, 165, 233, .15), transparent 70%);
  isolation: isolate;
}
.brand-wave-mark svg { position: relative; z-index: 2; width: 35px; overflow: visible; }
.brand-wave-track, .brand-wave-signal { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.brand-wave-track { stroke: rgba(148, 163, 184, .2); }
.brand-wave-signal {
  stroke: #38bdf8;
  stroke-dasharray: 12 48;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, .9));
  animation: brand-wave-travel 1.9s linear infinite;
}
.brand-wave-halo {
  position: absolute;
  z-index: 1;
  inset: 8px;
  border: 1px solid rgba(56, 189, 248, .52);
  border-radius: 50%;
  animation: brand-wave-halo 2.3s ease-out infinite;
}
.brand::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 1px;
  opacity: .55;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  transform-origin: center;
  animation: brand-wave-baseline 2.3s ease-in-out infinite;
}

/* Candidate Switcher */
.candidate-switcher {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.15);
}

.candidate-switcher > label {
  display: block;
  margin: 0 2px 6px;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.select-row { display: flex; gap: 6px; }

.select-row select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
  transition: all 0.15s ease;
}
.select-row select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }

.icon-button {
  flex: 0 0 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.icon-button:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }

.candidate-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.candidate-mini .avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 700;
  font-size: 11px;
}

.candidate-mini strong {
  display: block;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: #f8fafc;
}

.candidate-mini small {
  display: block;
  margin-top: 1px;
  color: #94a3b8;
  font-size: 10px;
}

/* Navigation Items */
.main-nav {
  padding: 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover { color: #f8fafc; background: rgba(255, 255, 255, 0.06); }

.nav-item.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.18);
  font-weight: 600;
  border-left: 3px solid var(--brand);
}

.nav-icon {
  width: 18px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
  font-size: 14px;
}

.nav-item.active .nav-icon { color: var(--brand); }
.nav-item:hover .nav-icon { color: #cbd5e1; }

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.nav-badge.amber { color: #fcd34d; background: rgba(217, 119, 6, 0.25); }

.nav-divider {
  margin: 12px 10px 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-status {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.status-line { display: flex; align-items: center; gap: 10px; }
.status-line strong { display: block; font-size: 11px; color: #f8fafc; font-weight: 600; }
.status-line small { display: block; margin-top: 1px; color: #94a3b8; font-size: 10px; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.system-bars { display: flex; gap: 3px; margin-top: 10px; }
.system-bars span { height: 2px; flex: 1; background: rgba(255, 255, 255, 0.1); }
.system-bars span:nth-child(-n+3) { background: var(--green-bright); }

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
  flex: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-muted);
  font-size: 12px;
}
.breadcrumb b { color: var(--line); }
.breadcrumb strong { color: var(--ink); font-weight: 600; }

.top-actions { display: flex; align-items: center; gap: 10px; }

.operation-chip {
  max-width: 220px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operation-chip i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #94a3b8; }
.operation-chip.active i { background: var(--green-bright); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.operation-chip.waiting i { background: var(--amber); }
.operation-chip.failed i { background: var(--red); }

.last-update { color: var(--ink-muted); font-size: 11px; }

.button {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.button.primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: var(--shadow-sm);
}
.button.primary:hover { background: var(--brand-hover); transform: translateY(-1px); }

.button.secondary {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.button.secondary:hover { background: var(--line-soft); border-color: #cbd5e1; transform: translateY(-1px); }

.button.large { width: 100%; height: 44px; margin-top: 16px; font-size: 13px; }

.mobile-menu { display: none; border: 0; background: transparent; font-size: 20px; cursor: pointer; }

/* ==========================================================================
   GLOBAL CONTROLS & CONTENT WRAPPER
   ========================================================================== */

.content-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.global-control-bar {
  margin-bottom: 20px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.time-range-control { display: flex; align-items: center; gap: 4px; }
.time-range-control > span {
  margin: 0 8px 0 4px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.time-range-control button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.time-range-control button:hover { background: var(--line-soft); color: var(--ink); }
.time-range-control button.active {
  color: #ffffff;
  background: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.custom-range { display: none; align-items: center; gap: 6px; }
.custom-range.open { display: flex; }
.custom-range input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 11px;
}

.freshness-status { display: flex; align-items: center; gap: 8px; }
.freshness-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); }
.freshness-status.stale i { background: var(--amber); }
.freshness-status strong { display: block; font-size: 11px; color: var(--ink); }
.freshness-status small { display: block; color: var(--ink-muted); font-size: 10px; }

/* Mentions intelligence ledger ------------------------------------------------ */
#section-mentions{color:#122033}.global-control-bar{padding:7px 9px 7px 12px;border-color:#dbe3ec;border-radius:14px;box-shadow:0 7px 24px rgba(24,45,73,.045)}.time-range-control{gap:2px;padding:3px;border-radius:10px;background:#f1f4f8}.time-range-control>span{padding:0 10px;color:#627187}.time-range-control button{height:32px;padding:0 12px;border-radius:8px;color:#536176}.time-range-control button:hover{background:#e7edf4}.time-range-control button.active{background:#152c48;color:#fff;box-shadow:0 4px 12px rgba(21,44,72,.18)}.freshness-status{padding:3px 8px 3px 12px;border-left:1px solid #e2e7ed}.freshness-status i{box-shadow:0 0 0 4px rgba(38,166,120,.1)}
.mentions-explorer{max-width:1240px;margin:0 auto}.mentions-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:18px;padding:6px 2px}.mentions-heading .eyebrow{color:#315f9f}.mentions-heading h1{margin:4px 0 5px;font-size:30px;letter-spacing:-.035em}.mentions-heading p{max-width:760px;margin:0;color:#68768a;font-size:12px;line-height:1.55}.mentions-ledger{padding:0;overflow:hidden;border:1px solid #dde4ec;border-radius:16px;background:#fff;box-shadow:0 10px 34px rgba(22,42,68,.05)}.mentions-ledger .filter-bar{display:grid;grid-template-columns:minmax(260px,1fr) 170px 170px 190px;gap:8px;margin:0;padding:14px;border-bottom:1px solid #e6ebf1;background:#f8fafc}.mentions-ledger .filter-bar input,.mentions-ledger .filter-bar select{height:39px;border-color:#dce3eb;border-radius:9px;background:#fff}.mentions-ledger .filter-bar input:focus,.mentions-ledger .filter-bar select:focus{border-color:#426d9f;box-shadow:0 0 0 3px rgba(66,109,159,.1)}
.mentions-ledger .mention-row{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) minmax(250px,320px) 20px;gap:14px;align-items:center;min-height:102px;padding:16px 18px;border-bottom:1px solid #edf0f4;background:#fff;cursor:pointer;transition:background .16s ease,transform .16s ease}.mentions-ledger .mention-row:before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 3px 3px 0;background:transparent}.mentions-ledger .mention-row:hover,.mentions-ledger .mention-row:focus{z-index:1;outline:0;background:#f7faff}.mentions-ledger .mention-row:hover:before,.mentions-ledger .mention-row:focus:before{background:#37689d}.mentions-ledger .mention-source{width:38px;height:38px;border:1px solid #dbe5ef;border-radius:10px;background:#edf4fb;color:#315f91;font-size:9px;letter-spacing:.06em}.mention-line-meta{display:flex;align-items:center;gap:9px;margin-bottom:5px}.mention-line-meta span{color:#315f91;font-size:8px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.mention-line-meta time{color:#8a96a6;font-size:9px}.mention-copy strong{font-size:13px;line-height:1.35}.mention-copy p{margin-top:5px;font-size:10px;line-height:1.45}.mention-signals{display:grid;grid-template-columns:1fr 54px;gap:12px;align-items:center}.mention-signals .crisis-value{display:grid;gap:2px;padding-left:10px;border-left:1px solid #e5eaf0;text-align:right}.mention-signals .crisis-value small{color:#909baa;font-size:7px;font-weight:800;letter-spacing:.08em}.mention-signals .crisis-value b{font-size:12px}.mention-open{color:#91a0b2;font-size:23px}.mentions-ledger .pagination{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;background:#fafbfd;color:#738095;font-size:10px}.mentions-ledger .pagination button{padding:7px 11px;border:1px solid #dbe2ea;border-radius:8px;background:#fff;color:#263b54;font-size:10px;cursor:pointer}.mentions-ledger .pagination button:disabled{opacity:.4;cursor:default}
.mentions-ledger .mention-platform-icon{display:grid;width:38px;height:38px;place-items:center;border:1px solid #dbe5ef;border-radius:11px;background:#fff;box-shadow:0 4px 13px rgba(25,45,70,.07);overflow:hidden;transition:transform .16s ease,box-shadow .16s ease}.mentions-ledger .mention-platform-icon img{display:block;width:21px;height:21px;object-fit:contain}.mentions-ledger .mention-row:hover .mention-platform-icon,.mentions-ledger .mention-row:focus .mention-platform-icon{transform:translateY(-1px) scale(1.04);box-shadow:0 7px 18px rgba(25,45,70,.12)}.mentions-ledger .mention-platform-icon.platform-youtube img,.mentions-ledger .mention-platform-icon.platform-instagram img,.mentions-ledger .mention-platform-icon.platform-facebook img,.mentions-ledger .mention-platform-icon.platform-tiktok img,.mentions-ledger .mention-platform-icon.platform-reddit img{width:23px;height:23px}.mentions-ledger .mention-platform-icon.platform-news,.mentions-ledger .mention-platform-icon.platform-web{background:#f3f7fa}
.mention-drawer{position:fixed;z-index:1002;top:0;right:0;width:min(640px,94vw);height:100dvh;padding:0;background:#fff;box-shadow:-24px 0 70px rgba(13,29,49,.22);overflow:auto;transform:translateX(105%);transition:transform .24s cubic-bezier(.22,.8,.22,1)}.mention-drawer.open{transform:none}.drawer-backdrop{position:fixed;z-index:1001;inset:0;display:none;background:rgba(12,25,42,.42);backdrop-filter:blur(3px)}.drawer-backdrop.open{display:block}.mention-drawer .drawer-close{position:sticky;z-index:3;top:16px;float:right;margin:16px 18px -50px 0;width:36px;height:36px;border:1px solid #dce3eb;border-radius:50%;background:rgba(255,255,255,.94);color:#17283d;font-size:23px;line-height:1;cursor:pointer;box-shadow:0 5px 18px rgba(21,42,68,.08)}#mentionDrawerContent{min-height:100%;padding:0 32px 28px}.mention-drawer-head{margin:0 -32px;padding:54px 70px 26px 32px;border-bottom:1px solid #e3e8ee;background:linear-gradient(145deg,#f7faff 0%,#eef4fa 100%)}.mention-drawer-head>div:first-child{display:flex;gap:7px}.drawer-source,.drawer-directness{display:inline-flex;padding:5px 8px;border:1px solid #cbd9e7;border-radius:6px;color:#315f91;font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.drawer-directness{color:#65758a;background:#fff}.mention-drawer-head h2{margin:17px 0 11px;color:#13233a;font-size:24px;line-height:1.2;letter-spacing:-.025em}.drawer-meta{display:flex;gap:8px;color:#728196;font-size:10px}.drawer-meta span:after{content:"·";margin-left:8px}.drawer-evidence{margin:24px 0;padding:19px 20px;border-left:3px solid #315f91;background:#f7f9fc}.drawer-evidence>span,.drawer-analysis>header span{color:#315f91;font-size:8px;font-weight:800;letter-spacing:.12em}.drawer-evidence p{margin:9px 0 0;color:#29394e;font-size:12px;line-height:1.7;white-space:pre-wrap}.drawer-analysis{margin-top:26px}.drawer-analysis>header{margin-bottom:13px}.drawer-analysis>header h3{margin:5px 0 0;font-size:17px}.drawer-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.drawer-field{min-width:0;padding:13px;border:1px solid #e1e7ee;border-radius:10px;background:#fff}.drawer-field>span{display:block;color:#7a8798;font-size:8px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.drawer-field>strong{display:block;margin-top:6px;color:#182a41;font-size:13px;line-height:1.4;text-transform:capitalize}.drawer-field>small{display:block;margin-top:4px;color:#8a96a5;font-size:8px;line-height:1.4}.drawer-field.emotion-context-summary{grid-column:1/-1}.drawer-field.emotion-context-summary>strong{text-transform:none;font-size:11px;font-weight:550}.mention-drawer .tag-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.mention-drawer .tag{padding:5px 8px;border-radius:6px;background:#eef3f8;color:#53677e;font-size:8px;text-transform:capitalize}.mention-drawer-footer{position:sticky;bottom:-28px;margin:25px -32px -28px;padding:14px 32px;border-top:1px solid #e2e7ed;background:rgba(255,255,255,.96);backdrop-filter:blur(8px)}.mention-drawer-footer a{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-radius:9px;background:#152c48;color:#fff;font-size:11px;font-weight:700;text-decoration:none}
@media(max-width:900px){.mentions-ledger .filter-bar{grid-template-columns:1fr 1fr}.mentions-ledger .search-box{grid-column:1/-1}.mentions-ledger .mention-row{grid-template-columns:38px minmax(0,1fr) 18px}.mention-signals{grid-column:2/3}.mentions-ledger .mention-open{grid-column:3;grid-row:1/3}.freshness-status{display:none}.global-control-bar{overflow:auto}.time-range-control{min-width:max-content}}@media(max-width:620px){.content-wrap{padding-inline:15px}.mentions-ledger .filter-bar{grid-template-columns:1fr}.mentions-ledger .search-box{grid-column:auto}.mentions-ledger .mention-row{padding:14px 12px}.mention-signals{display:block}.mention-signals .crisis-value{display:none}.sentiment-axis{grid-template-columns:40px 1fr 30px}.mention-drawer{width:100vw}.drawer-grid{grid-template-columns:1fr}#mentionDrawerContent{padding-inline:20px}.mention-drawer-head{margin-inline:-20px;padding-left:20px}.mention-drawer-footer{margin-inline:-20px;padding-inline:20px}}

.stale-warning {
  display: none;
  margin: -10px 0 16px;
  padding: 10px 14px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  color: #92400e;
  background: #fffbeb;
  font-size: 11px;
}
.stale-warning.open { display: block; }

.page-loading {
  display: none;
  padding: 48px;
  text-align: center;
}
.page-loading.open { display: block; }
.pulse-loader { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.pulse-loader i { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse-anim 1.2s infinite ease-in-out; }
.pulse-loader i:nth-child(2) { animation-delay: 0.2s; }
.pulse-loader i:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse-anim { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }

.section-loader {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(241, 245, 249, .82);
  backdrop-filter: blur(10px);
  transition: opacity .16s ease, visibility .16s ease;
}
.section-loader.open { visibility: visible; opacity: 1; pointer-events: none; }
.section-loader-card { display: grid; justify-items: center; min-width: 190px; padding: 27px 34px 24px; border: 1px solid rgba(37, 99, 235, .12); border-radius: 22px; background: rgba(255, 255, 255, .9); box-shadow: 0 24px 70px rgba(15, 23, 42, .14); }
.section-loader-card > strong { margin-top: 12px; color: #0f172a; font-size: 17px; letter-spacing: .18em; }
.section-loader-card > small { margin-top: 5px; color: #64748b; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-loader-mark { position: relative; display: grid; place-items: center; width: 104px; height: 64px; }
.section-loader-mark::before, .section-loader-mark::after, .section-loader-mark > span { content: ""; position: absolute; inset: 9px 29px; border: 1px solid rgba(37, 99, 235, .28); border-radius: 50%; animation: section-pulse-ring 1.45s ease-out infinite; }
.section-loader-mark::after { animation-delay: .48s; }
.section-loader-mark > span { animation-delay: .96s; }
.section-loader-mark svg { position: relative; z-index: 2; width: 90px; overflow: visible; }
.section-wave-track, .section-wave-signal { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.section-wave-track { stroke: rgba(100, 116, 139, .2); }
.section-wave-signal { stroke: #2563eb; stroke-dasharray: 18 72; filter: drop-shadow(0 0 6px rgba(37, 99, 235, .75)); animation: section-wave-travel 1.1s linear infinite; }
@keyframes section-wave-travel { to { stroke-dashoffset: -90; } }
@keyframes section-pulse-ring { 0% { opacity: .78; transform: scale(.35); } 80%, 100% { opacity: 0; transform: scale(1.65); } }

/* ==========================================================================
   PAGE SECTIONS & HEADINGS
   ========================================================================== */

.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-heading {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.eyebrow {
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 2px 0 4px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.page-heading p { margin: 0; color: var(--ink-soft); font-size: 13px; }

.confidence-chip, .method-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.confidence-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--green-bright); }

/* ==========================================================================
   EXECUTIVE HERO & ADVISOR
   ========================================================================== */

.advisor-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  margin-bottom: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.advisor-top, .advisor-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.advisor-identity { display: flex; align-items: center; gap: 10px; }
.advisor-identity small { color: #38bdf8; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.advisor-identity strong { display: block; margin-top: 1px; font-size: 12px; font-weight: 600; color: #ffffff; }

.ai-orb {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.ai-orb span { width: 8px; height: 8px; border-radius: 50%; background: #38bdf8; }

.backend-pill {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.advisor-hero blockquote {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 16px 0 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: #f8fafc;
}

.advisor-source-logo {
  position: relative;
  top: 3px;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  margin: 0 3px;
  grid-auto-flow: column;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  vertical-align: baseline;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: filter 0.18s ease, box-shadow 0.18s ease;
}
.advisor-source-logo b { color: inherit; font-size: 9px; font-weight: 800; letter-spacing: 0.01em; }
.advisor-source-logo:hover {
  filter: brightness(1.15);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.28), 0 0 12px rgba(56, 189, 248, 0.18);
}
.advisor-source-logo svg { display: block; width: 17px; height: 17px; }
.advisor-source-logo.x { background: linear-gradient(145deg, #1f2937, #030712); }
.advisor-source-logo.x svg { width: 14px; fill: #ffffff; }
.advisor-source-logo.x b { color: #ffffff; }
.advisor-source-logo.youtube { background: linear-gradient(145deg, #ffffff, #f1f5f9); }
.advisor-source-logo.youtube svg { width: 21px; }
.advisor-source-logo.youtube rect { fill: #ff0033; }
.advisor-source-logo.youtube path { fill: #ffffff; }
.advisor-source-logo.youtube b { color: #273244; }

.advisor-footer {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 11px;
}
.advisor-footer .text-button { color: #38bdf8; }

/* ==========================================================================
   METRIC STAT STRIP & EXECUTIVE CARDS
   ========================================================================== */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.metric-grid.small { grid-template-columns: repeat(4, 1fr); }

.metric-card {
  min-height: 110px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: var(--shadow-md); }

.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--brand-pale);
  color: var(--brand);
  font-size: 11px;
}

.metric-value {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.metric-value small { color: var(--ink-muted); font-size: 12px; font-weight: 500; }

.metric-foot {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 10px;
}
.metric-foot strong { color: var(--green); }
.metric-foot.warning strong { color: var(--amber); }
.metric-foot.danger strong { color: var(--red); }

/* Change Brief Strip */
.change-brief {
  margin-bottom: 20px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(90px, 0.45fr)) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.change-main strong { display: block; margin: 4px 0 2px; font-size: 18px; font-weight: 700; color: var(--ink); }
.change-main p { margin: 0; color: var(--ink-soft); font-size: 11px; }

.change-stat { padding-left: 12px; border-left: 1px solid var(--line-soft); }
.change-stat span { color: var(--ink-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.change-stat strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--ink); }

.propagation-note span { color: var(--ink-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.propagation-note strong { display: block; margin: 3px 0 1px; font-size: 11px; text-transform: capitalize; color: var(--ink); }
.propagation-note small { display: block; color: var(--ink-muted); font-size: 10px; }

.change-movers { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.change-movers summary { color: var(--brand); font-size: 11px; font-weight: 600; cursor: pointer; }
.change-movers > div { padding: 6px 0; display: grid; grid-template-columns: 70px 1fr; gap: 8px; border-bottom: 1px solid var(--line-soft); }
.change-movers strong { font-size: 11px; color: var(--ink); }
.change-movers small { color: var(--ink-muted); font-size: 10px; }

/* ==========================================================================
   ENTERPRISE PANELS & CARDS
   ========================================================================== */

.dashboard-grid { display: grid; gap: 16px; margin-bottom: 20px; }
.dashboard-grid.two-thirds { grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.85fr); }
.dashboard-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid.score-layout { grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.4fr); }

.card {
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-heading {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.card-heading h2 { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }

.advice-status { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; font-weight: 400; }
.compact-button { padding: 5px 10px; font-size: 11px; }

.legend { display: flex; gap: 12px; color: var(--ink-muted); font-size: 10px; font-weight: 500; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; }
.legend .positive::before { background: var(--green-bright); }
.legend .negative::before { background: var(--red); }

.text-button { padding: 0; border: 0; background: transparent; color: var(--brand); font-size: 11px; font-weight: 600; cursor: pointer; }
.text-button:hover { text-decoration: underline; }

.muted { color: var(--ink-muted); font-size: 11px; }

.chart-large { min-height: 220px; }
.chart-empty {
  height: 200px;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  text-align: center;
  background: var(--line-soft);
  border-radius: var(--radius-sm);
}
.chart-empty strong { display: block; color: var(--ink-soft); font-size: 13px; }
.chart-empty span { display: block; margin-top: 2px; font-size: 11px; }

/* Google Enterprise Interactive Chart Engine */
.google-chart-card {
  position: relative;
  background:
    radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.09), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f8fbff 54%, #f3f7fb 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 18px;
  box-shadow: 0 18px 45px -28px rgba(15, 23, 42, 0.42), inset 0 1px 0 #ffffff;
  overflow: hidden;
  padding: 16px 20px 18px;
}

.google-chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0 44%, #cbd5e1 44% 56%, #ef4444 56% 100%);
  opacity: 0.9;
}

.chart-is-entering .google-chart-toolbar,
.chart-is-entering .chart-insight-panel,
.chart-is-entering .chart-interaction-hint {
  animation: signal-ui-arrive 0.45s ease 1.25s both;
}

.google-chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.chart-summary-pills {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-pill {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--line-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.summary-pill span { color: var(--ink-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.summary-pill strong { font-size: 14px; font-weight: 700; color: var(--ink); }

.summary-pill.pos { background: var(--green-pale); border: 1px solid rgba(5, 150, 105, 0.2); }
.summary-pill.pos span { color: var(--green); }
.summary-pill.pos strong { color: var(--green); }

.summary-pill.neg { background: var(--red-pale); border: 1px solid rgba(220, 38, 38, 0.2); }
.summary-pill.neg span { color: var(--red); }
.summary-pill.neg strong { color: var(--red); }

.summary-pill.neu { background: var(--paper); border: 1px solid var(--line); }
.summary-pill small {
  padding-left: 7px;
  border-left: 1px solid currentColor;
  font-size: 9px;
  font-weight: 800;
  opacity: 0.78;
}
.summary-pill small.up { color: #047857; }
.summary-pill small.down { color: #b91c1c; }

.chart-series-toggles {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: var(--line-soft);
  border: 1px solid var(--line);
}

.toggle-btn {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn:hover { color: var(--ink); }

.toggle-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.toggle-btn.pos.active { color: var(--green); }
.toggle-btn.neg.active { color: var(--red); }

.google-chart-stage {
  position: relative;
  width: 100%;
  height: 260px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  overflow: hidden;
  perspective: 900px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.48)),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(148, 163, 184, 0.08) 75px 76px);
  box-shadow: inset 0 -16px 28px -22px rgba(15, 23, 42, 0.32), inset 0 1px 0 #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.google-chart-stage:hover,
.google-chart-stage:focus-visible {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: inset 0 -18px 32px -22px rgba(15, 23, 42, 0.4), 0 12px 30px -24px rgba(37, 99, 235, 0.65);
}

.chart-depth-backdrop {
  position: absolute;
  z-index: 0;
  left: 7%;
  right: 2%;
  bottom: 8px;
  height: 30%;
  transform: rotateX(67deg) translateZ(-8px);
  transform-origin: bottom;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.08), rgba(15, 23, 42, 0.12));
  border-radius: 50%;
  filter: blur(9px);
  pointer-events: none;
}

.chart-interaction-hint {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.chart-interaction-hint span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.google-chart-card.is-pinned .chart-interaction-hint { color: #1d4ed8; border-color: rgba(37, 99, 235, 0.25); }
.google-chart-card.is-pinned .chart-interaction-hint::after { content: " · fijado"; }

.google-chart-svg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  cursor: crosshair;
  transform: translateZ(12px) rotateX(1.5deg);
  transform-origin: center bottom;
  transition: transform 0.25s ease;
}
.google-chart-stage:hover .google-chart-svg { transform: translateZ(20px) rotateX(0deg) translateY(-2px); }

.svg-enterprise-grid { stroke: #dce5ef; stroke-width: 1; stroke-dasharray: 4 5; }
.svg-enterprise-label { fill: #7b8da5; font-size: 10px; font-weight: 700; }
.svg-line-pos,
.svg-line-neg,
.svg-line-depth { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svg-line-pos { stroke: #10b981; stroke-width: 4.5; }
.svg-line-neg { stroke: #ef4444; stroke-width: 4; }
.svg-line-depth { stroke-width: 8; opacity: 0.2; }
.svg-line-depth.pos { stroke: #065f46; }
.svg-line-depth.neg { stroke: #991b1b; }
.svg-area-pos,
.svg-area-neg { transition: opacity 0.2s ease; }
.svg-area-pos { fill: rgba(16, 185, 129, 0.14); }
.svg-area-neg { fill: rgba(239, 68, 68, 0.09); }
.chart-is-entering .svg-area-pos,
.chart-is-entering .svg-area-neg {
  animation: signal-area-rise 0.65s ease-out 0.95s both;
  transform-box: fill-box;
  transform-origin: center bottom;
}
.chart-is-entering .svg-line-pos,
.chart-is-entering .svg-line-neg,
.chart-is-entering .svg-line-depth {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: signal-line-draw 1.35s cubic-bezier(0.42, 0, 0.2, 1) forwards;
}
.chart-is-entering .svg-line-neg { animation-delay: 0.12s; }
.chart-is-entering .svg-line-depth.neg { animation-delay: 0.12s; }
.google-chart-stage:hover .svg-area-pos,
.google-chart-stage:hover .svg-area-neg { opacity: 0.9; }

.chart-laser-line {
  stroke: var(--brand);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
  opacity: 0.85;
  filter: drop-shadow(0 0 3px rgba(37, 99, 235, 0.45));
}

.google-node-halo {
  fill: none;
  stroke-width: 2;
  animation: chart-node-pulse 1.5s ease-in-out infinite;
}
.google-node-halo.pos { stroke: var(--green); opacity: 0.6; }
.google-node-halo.neg { stroke: var(--red); opacity: 0.6; }

.google-node-dot.pos { fill: var(--green); stroke: #ffffff; stroke-width: 2; }
.google-node-dot.neg { fill: var(--red); stroke: #ffffff; stroke-width: 2; }

.google-chart-hud {
  position: absolute;
  z-index: 25;
  transform: translate(-50%, -100%);
  pointer-events: none;
  min-width: 190px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 18px 42px -12px rgba(15, 23, 42, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #ffffff;
  transition: opacity 0.15s ease;
}

@keyframes chart-node-pulse {
  0%, 100% { opacity: 0.32; transform: scale(0.9); transform-origin: center; }
  50% { opacity: 0.78; transform: scale(1.12); transform-origin: center; }
}

@keyframes signal-line-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes signal-area-rise {
  from { opacity: 0; transform: scaleY(0.06); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes signal-ui-arrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.hud-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-head strong { font-size: 11px; color: #ffffff; }
.hud-head small { font-size: 10px; color: #94a3b8; }

.hud-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }

.hud-chip span { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.hud-chip b { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; }
.hud-chip.pos span { color: #34d399; }
.hud-chip.pos b { color: #34d399; }
.hud-chip.neg span { color: #f87171; }
.hud-chip.neg b { color: #f87171; }
.hud-chip.neu span { color: #94a3b8; }
.hud-chip.neu b { color: #cbd5e1; }

.chart-insight-panel {
  display: grid;
  grid-template-columns: minmax(100px, 1.1fr) repeat(3, minmax(78px, 0.8fr)) minmax(135px, 1.35fr);
  align-items: stretch;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px -24px rgba(15, 23, 42, 0.8), inset 0 1px 0 #ffffff;
}
.chart-insight-panel > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}
.chart-insight-panel > div:last-child { border-right: 0; }
.insight-date span,
.insight-stat span,
.insight-reading span {
  display: block;
  color: #7b8da5;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.insight-date strong { display: block; margin-top: 4px; color: #0f172a; font-size: 13px; text-transform: capitalize; }
.insight-stat { position: relative; padding-left: 25px !important; }
.insight-stat i {
  position: absolute;
  left: 11px;
  top: 13px;
  width: 7px;
  height: 18px;
  border-radius: 5px;
  box-shadow: 2px 3px 0 rgba(15, 23, 42, 0.12);
}
.insight-stat.pos i { background: #10b981; }
.insight-stat.neg i { background: #ef4444; }
.insight-stat.neu i { background: #94a3b8; }
.insight-stat b { display: block; margin-top: 3px; color: #0f172a; font-size: 14px; }
.insight-reading { background: linear-gradient(135deg, #f8fafc, #eff6ff); }
.insight-reading strong { display: inline-block; margin-top: 3px; color: #1d4ed8; font-size: 14px; }
.insight-reading small { display: block; margin-top: 1px; color: #64748b; font-size: 9px; }

/* Stable cards: depth is reserved for their interactive contents. */
.card, .metric-card, .advisor-hero, .forecast-v2-headline > div, .territorial-intelligence {
  transform: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover, .metric-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.svg-dot-pos {
  fill: #ffffff;
  stroke: var(--green-bright);
  stroke-width: 2.5;
  cursor: pointer;
  transition: all 0.15s ease;
}
.svg-dot-pos:hover {
  r: 7.5;
  fill: var(--green-bright);
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
}

.svg-dot-neg {
  fill: #ffffff;
  stroke: var(--red);
  stroke-width: 2;
  cursor: pointer;
  transition: all 0.15s ease;
}
.svg-dot-neg:hover {
  r: 6.5;
  fill: var(--red);
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8));
}

/* Sentiment Donut */
.sentiment-card {
  transform: none !important;
  will-change: auto;
}
.sentiment-card:hover { transform: none !important; box-shadow: var(--shadow-sm); }
.sentiment-donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding-top: 8px; }
.sentiment-orbit {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  perspective: 650px;
  isolation: isolate;
}
.sentiment-orbit::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.9), rgba(59, 130, 246, 0.08) 56%, rgba(15, 23, 42, 0.1));
  box-shadow: inset 5px 6px 12px rgba(255, 255, 255, 0.85), inset -8px -10px 16px rgba(15, 23, 42, 0.08);
}
.donut-shadow {
  position: absolute;
  z-index: -2;
  width: 112px;
  height: 30px;
  bottom: 4px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.22);
  filter: blur(12px);
  transform: rotateX(66deg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.sentiment-donut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg) rotateY(-3deg) rotateX(7deg) translateZ(8px);
  transform-style: preserve-3d;
  filter: drop-shadow(0 7px 5px rgba(15, 23, 42, 0.16));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}
.sentiment-orbit:hover .sentiment-donut,
.sentiment-orbit:focus-within .sentiment-donut {
  transform: rotate(-90deg) rotateY(0deg) rotateX(2deg) translateZ(18px) scale(1.035);
  filter: drop-shadow(0 12px 9px rgba(15, 23, 42, 0.2));
}
.sentiment-orbit:hover .donut-shadow { opacity: 0.72; transform: rotateX(66deg) scale(1.1); }
.donut-track,
.donut-segment { fill: none; stroke-width: 19; }
.donut-track { stroke: #e7edf2; }
.donut-segment {
  cursor: pointer;
  outline: none;
  transition: stroke-width 0.22s ease, opacity 0.22s ease, filter 0.22s ease;
  animation: sentiment-ring-arrive 0.9s cubic-bezier(0.3, 0.8, 0.2, 1) both;
}
.donut-segment.pos { stroke: #10b981; }
.donut-segment.neu { stroke: #94a3b8; animation-delay: 0.12s; }
.donut-segment.neg { stroke: #ef4444; animation-delay: 0.24s; }
.sentiment-orbit.has-focus .donut-segment:not(.active) { opacity: 0.22; }
.donut-segment.active,
.donut-segment:hover,
.donut-segment:focus-visible {
  stroke-width: 24;
  opacity: 1 !important;
  filter: drop-shadow(0 0 5px currentColor);
}
.donut-inner {
  position: relative;
  z-index: 3;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.94));
  box-shadow: 8px 10px 18px rgba(15, 23, 42, 0.12), inset 3px 3px 5px #ffffff, inset -4px -5px 8px rgba(148, 163, 184, 0.18);
  transform: translateZ(28px);
  pointer-events: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sentiment-orbit:hover .donut-inner { transform: translateZ(36px) scale(1.03); box-shadow: 10px 14px 22px rgba(15, 23, 42, 0.15), inset 3px 3px 5px #ffffff; }
.donut-inner strong { display: block; margin: 1px 0; font-size: 23px; line-height: 1; font-weight: 800; color: var(--ink); letter-spacing: -0.04em; }
.donut-inner span,
.donut-inner small { display: block; color: var(--ink-muted); font-size: 8px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.donut-inner small { color: #2563eb; font-size: 7px; }

.sentiment-legend { display: grid; gap: 7px; }
.sentiment-row {
  width: 100%;
  display: grid;
  grid-template-columns: 9px 1fr auto 22px;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.sentiment-row:hover,
.sentiment-row:focus-visible,
.sentiment-row.active {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--sentiment-color), transparent 72%);
  outline: none;
  background: color-mix(in srgb, var(--sentiment-color), white 94%);
  box-shadow: 0 8px 20px -18px var(--sentiment-color);
}
.sentiment-row i { width: 8px; height: 18px; border-radius: 5px; background: var(--sentiment-color); box-shadow: 2px 3px 0 rgba(15, 23, 42, 0.12); }
.sentiment-row strong { color: var(--ink); font-size: 12px; }
.sentiment-row small { color: var(--sentiment-color); font-size: 8px; font-weight: 800; opacity: 0; text-transform: uppercase; transition: opacity 0.18s ease; }
.sentiment-row:hover small,
.sentiment-row:focus-visible small,
.sentiment-row.active small { opacity: 1; }
.coverage-note {
  margin-top: 16px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  color: var(--ink-soft);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  box-shadow: inset 0 1px 0 #ffffff;
  font-size: 10px;
  text-align: center;
}

@keyframes sentiment-ring-arrive {
  from { stroke-dashoffset: 100; opacity: 0; }
}

/* Component Rows & Progress Bars */
.component-list { display: grid; gap: 12px; padding-top: 6px; }
.component-row { display: grid; grid-template-columns: 160px 1fr 60px; gap: 12px; align-items: center; font-size: 11px; }
.component-row strong { font-weight: 600; color: var(--ink); text-transform: capitalize; }
.component-row .bar-track { height: 10px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.component-row .bar-track span { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #2563eb, #3b82f6); display: block; transition: width 0.5s ease; }
.component-row > span { text-align: right; font-size: 13px; font-weight: 700; color: var(--ink); }
.component-row > small { grid-column: 1 / -1; margin-top: -7px; color: var(--ink-muted); line-height: 1.35; }
.component-row.has-evidence > small { color: var(--ink-soft); }
.component-row.unavailable { opacity: 0.72; }

/* Topic bars & Advice list */
.topic-bars { display: grid; gap: 10px; }
.bar-row .bar-label { margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.bar-row .bar-label strong { font-weight: 600; text-transform: capitalize; color: var(--ink); }
.bar-row .bar-label span { color: var(--ink-muted); font-size: 10px; }
.bar-track { height: 6px; overflow: hidden; border-radius: 4px; background: var(--line-soft); }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }

/* Executive agenda — interactive depth ranking */
#overviewTopics.topic-bars { gap: 12px; }
.agenda-topic-list { display: grid; gap: 5px; perspective: 800px; }
.agenda-topic-row {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(90px, 0.8fr) minmax(95px, 1.35fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.agenda-topic-row:hover,
.agenda-topic-row:focus-visible,
.agenda-topic-row.active {
  outline: none;
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(100deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.42));
  box-shadow: 0 9px 24px -22px rgba(37, 99, 235, 0.85), inset 0 1px 0 #ffffff;
}
.agenda-rank {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #edf2f7);
  box-shadow: 2px 3px 0 #dbe3eb;
  color: #7b8da5;
  font-size: 8px;
  font-weight: 900;
}
.agenda-topic-row.active .agenda-rank {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(145deg, #60a5fa, #2563eb);
  box-shadow: 2px 3px 0 #1e40af, 0 5px 12px rgba(37, 99, 235, 0.24);
}
.agenda-topic-copy { min-width: 0; }
.agenda-topic-copy strong {
  display: block;
  overflow: hidden;
  color: #1e293b;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}
.agenda-topic-copy small { display: block; margin-top: 2px; color: #94a3b8; font-size: 8px; }
.agenda-bar-rail {
  position: relative;
  height: 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #e8eef5, #f8fafc);
  box-shadow: inset 0 2px 3px rgba(15, 23, 42, 0.09), 0 1px 0 #ffffff;
  transform: rotateX(9deg);
  transform-style: preserve-3d;
}
.agenda-bar-rail i,
.agenda-bar-rail em {
  position: absolute;
  left: 1px;
  width: calc(var(--agenda-width) - 2px);
  transform-origin: left center;
}
.agenda-bar-rail i {
  z-index: 2;
  top: 1px;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2563eb, #38bdf8 72%, #67e8f9);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.48), 0 0 10px rgba(56, 189, 248, 0.22);
  animation: agenda-bar-grow 0.75s cubic-bezier(0.22, 0.8, 0.2, 1) var(--agenda-delay) both;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.agenda-bar-rail em {
  z-index: 1;
  top: 6px;
  height: 7px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, #1e40af, #0369a1);
  opacity: 0.55;
  transform: skewX(-28deg);
  animation: agenda-depth-grow 0.75s cubic-bezier(0.22, 0.8, 0.2, 1) var(--agenda-delay) both;
}
.agenda-topic-row.active .agenda-bar-rail i,
.agenda-topic-row:hover .agenda-bar-rail i { filter: saturate(1.25) brightness(1.06); transform: translateZ(8px) scaleY(1.16); }
.agenda-topic-value { color: #2563eb; font-size: 11px; font-weight: 850; text-align: right; }

.agenda-topic-insight {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 0.72fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 11px;
  background: linear-gradient(145deg, #ffffff, #f1f6fb);
  box-shadow: 0 10px 26px -24px rgba(15, 23, 42, 0.8), inset 0 1px 0 #ffffff;
}
.agenda-topic-insight > div { min-width: 0; padding: 9px 10px; border-right: 1px solid rgba(148, 163, 184, 0.17); }
.agenda-topic-insight > div:last-child { border-right: 0; }
.agenda-topic-insight span { display: block; color: #8392a8; font-size: 7px; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; }
.agenda-topic-insight strong { display: block; margin-top: 3px; overflow: hidden; color: #172033; font-size: 11px; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.agenda-topic-insight > div:first-child strong { color: #2563eb; }
.has-pinned-topic .agenda-topic-insight { border-color: rgba(37, 99, 235, 0.3); box-shadow: 0 10px 28px -22px rgba(37, 99, 235, 0.7); }

@keyframes agenda-bar-grow {
  from { opacity: 0; clip-path: inset(0 100% 0 0 round 6px); }
  to { opacity: 1; clip-path: inset(0 0 0 0 round 6px); }
}
@keyframes agenda-depth-grow {
  from { opacity: 0; clip-path: inset(0 100% 0 0 round 5px); }
  to { opacity: 0.55; clip-path: inset(0 0 0 0 round 5px); }
}

.advice-list { display: grid; gap: 8px; }
.advice-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.advice-row:last-child { border-bottom: 0; }
.advice-number { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--brand); background: var(--brand-pale); font-size: 10px; font-weight: 700; }
.advice-row strong { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.advice-row small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 11px; }
.advice-copy > p { margin: 0 0 4px; color: var(--ink-soft); font-size: 11px; }

.priority { padding: 2px 6px; border-radius: 4px; color: var(--amber); background: var(--amber-pale); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.priority.alta, .priority.high, .priority.critical { color: var(--red); background: var(--red-pale); }

.data-disclaimer { margin: 16px 0 0; color: var(--ink-muted); font-size: 11px; text-align: center; }

/* Interactive section workbenches */
.audience-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.audience-tabs button {
  min-width: 0; padding: 10px 8px; border: 1px solid #dfe7ef; border-radius: 11px;
  color: #64748b; background: linear-gradient(145deg, #fff, #f5f8fb); font: inherit;
  text-align: left; cursor: pointer; box-shadow: 0 7px 18px -18px #0f172a;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.audience-tabs button:hover, .audience-tabs button:focus-visible, .audience-tabs button.active {
  outline: 0; transform: translateY(-2px); border-color: rgba(37, 99, 235, .4);
  box-shadow: 0 14px 25px -20px rgba(37, 99, 235, .8);
}
.audience-tabs button.active { color: #1d4ed8; background: linear-gradient(145deg, #eff6ff, #fff); }
.audience-tabs span, .audience-tabs strong, .audience-tabs small { display: block; }
.audience-tabs span { overflow: hidden; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.audience-tabs strong { margin: 4px 0 1px; color: #0f172a; font-size: 18px; }
.audience-tabs small { font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.audience-focus { margin-top: 10px; padding: 13px; border: 1px solid #dfe7ef; border-radius: 12px; background: linear-gradient(145deg, #fff, #f3f7fb); }
.audience-focus-head span, .audience-reading span { display: block; color: #8492a6; font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.audience-focus-head strong { display: block; margin-top: 2px; color: #172033; font-size: 13px; }
.audience-focus-head small { color: #64748b; font-size: 9px; }
.audience-stack { display: flex; height: 17px; margin: 12px 0 8px; overflow: hidden; border: 2px solid #fff; border-radius: 999px; background: #e2e8f0; box-shadow: 0 4px 10px rgba(15, 23, 42, .1), inset 0 1px 2px rgba(15, 23, 42, .12); }
.audience-stack i { min-width: 1px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.audience-stack .pos { background: linear-gradient(90deg, #059669, #34d399); }
.audience-stack .neu { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.audience-stack .neg { background: linear-gradient(90deg, #f87171, #dc2626); }
.audience-breakdown { display: flex; flex-wrap: wrap; gap: 8px 12px; color: #64748b; font-size: 8px; }
.audience-breakdown span { display: flex; align-items: center; gap: 4px; }
.audience-breakdown i { width: 6px; height: 6px; border-radius: 50%; }
.audience-breakdown .pos i { background: #10b981; } .audience-breakdown .neu i { background: #94a3b8; } .audience-breakdown .neg i { background: #ef4444; }
.audience-reading { display: grid; grid-template-columns: 1fr auto; align-items: end; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.audience-reading strong { grid-row: 1/3; grid-column: 2; color: #2563eb; font-size: 23px; }
.audience-reading small { color: #64748b; font-size: 9px; }

.source-table { overflow: visible; }
.source-head, .source-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) 70px minmax(150px, 1.4fr) 70px 70px 42px; gap: 12px; align-items: center; }
.source-head { padding: 0 12px 7px; color: #8997aa; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.source-row { width: 100%; padding: 10px 12px; border: 1px solid transparent; border-top-color: #edf1f5; color: #475569; background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.source-row:hover, .source-row:focus-visible, .source-row.active { z-index: 1; outline: 0; transform: translateX(3px); border-color: rgba(37, 99, 235, .2); border-radius: 10px; background: #f8fbff; }
.source-name { display: flex; align-items: center; gap: 9px; color: #172033; font-size: 11px; font-weight: 750; }
.source-avatar { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #d7e4f4; border-radius: 9px; color: #2563eb; background: linear-gradient(145deg, #fff, #eaf2ff); box-shadow: 2px 3px 0 #dbe5f0; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.source-row .stacked-bar { display: flex; height: 9px; overflow: hidden; border-radius: 99px; background: #e2e8f0; }
.source-row .stacked-bar i:nth-child(1) { background: #10b981; } .source-row .stacked-bar i:nth-child(2) { background: #94a3b8; } .source-row .stacked-bar i:nth-child(3) { background: #ef4444; }
.source-row em { color: #2563eb; font-size: 8px; font-style: normal; font-weight: 800; opacity: 0; text-transform: uppercase; }
.source-row:hover em, .source-row.active em { opacity: 1; }
.source-focus-panel { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); margin-top: 12px; overflow: hidden; border: 1px solid #dbe5ef; border-radius: 12px; background: linear-gradient(145deg, #fff, #f1f6fb); box-shadow: 0 16px 30px -28px #0f172a; }
.source-focus-panel > div { min-width: 0; padding: 12px; border-right: 1px solid #e4ebf2; }
.source-focus-panel > div:last-child { border-right: 0; }
.source-focus-panel span { display: block; color: #8b99ac; font-size: 7px; font-weight: 850; letter-spacing: .07em; }
.source-focus-panel strong { display: block; margin: 3px 0; overflow: hidden; color: #172033; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.source-focus-panel small { color: #64748b; font-size: 8px; }

.topic-command-list { display: grid; gap: 5px; }
.topic-command-row { width: 100%; display: grid; grid-template-columns: 30px minmax(95px, .9fr) minmax(100px, 1.3fr) 48px 46px; gap: 10px; align-items: center; padding: 8px 9px; border: 1px solid transparent; border-radius: 10px; color: #475569; background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.topic-command-row:hover, .topic-command-row:focus-visible, .topic-command-row.active { outline: 0; border-color: rgba(37, 99, 235, .2); background: linear-gradient(90deg, #eff6ff, #fff); }
.topic-command-rank { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #dce5ef; border-radius: 8px; background: #fff; box-shadow: 2px 3px 0 #dde5ed; color: #7c8da2; font-size: 8px; font-weight: 900; }
.topic-command-row.active .topic-command-rank { color: #fff; border-color: #2563eb; background: linear-gradient(145deg, #60a5fa, #2563eb); box-shadow: 2px 3px 0 #1e40af; }
.topic-command-name { min-width: 0; overflow: hidden; color: #172033; font-size: 11px; font-weight: 750; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.topic-command-name small { display: block; margin-top: 2px; color: #94a3b8; font-size: 8px; }
.topic-command-track { height: 10px; padding: 1px; overflow: hidden; border: 1px solid #dfe7ef; border-radius: 7px; background: #edf2f7; box-shadow: inset 0 2px 3px rgba(15,23,42,.08); }
.topic-command-track i { display: block; width: var(--topic-width); height: 100%; border-radius: 5px; background: linear-gradient(90deg, #2563eb, #38bdf8); transition: width .4s ease; }
.topic-command-row > strong { color: #2563eb; font-size: 11px; text-align: right; }
.topic-command-row > em { color: #2563eb; font-size: 7px; font-style: normal; font-weight: 850; opacity: 0; text-transform: uppercase; }
.topic-command-row:hover > em, .topic-command-row.active > em { opacity: 1; }
.topic-focus-panel { display: grid; grid-template-columns: .55fr 1.7fr repeat(2, .8fr); margin-top: 12px; overflow: hidden; border: 1px solid #dbe5ef; border-radius: 12px; background: linear-gradient(145deg, #fff, #f1f6fb); }
.topic-focus-panel > div { min-width: 0; padding: 12px; border-right: 1px solid #e4ebf2; }
.topic-focus-panel > div:last-child { border-right: 0; }
.topic-focus-panel span { display: block; color: #8a98ab; font-size: 7px; font-weight: 850; letter-spacing: .07em; }
.topic-focus-panel strong { display: block; margin-top: 3px; color: #172033; font-size: 13px; text-transform: capitalize; }
.topic-focus-rank strong { color: #2563eb; font-size: 26px; line-height: 1; }
.topic-focus-panel small { display: block; margin-top: 2px; color: #64748b; font-size: 8px; }

.emotion-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.emotion-card { position: relative; width: 100%; display: grid; grid-template-columns: 1fr auto; padding: 11px; overflow: hidden; border: 1px solid #dfe7ef; border-radius: 11px; color: #475569; background: linear-gradient(145deg, #fff, #f7f9fb); font: inherit; text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.emotion-card:hover, .emotion-card:focus-visible, .emotion-card.active { outline: 0; transform: translateY(-2px); border-color: rgba(124, 58, 237, .35); box-shadow: 0 14px 25px -22px rgba(91, 33, 182, .75); }
.emotion-card span { color: #172033; font-size: 11px; font-weight: 750; text-transform: capitalize; }
.emotion-card strong { color: #7c3aed; font-size: 12px; }
.emotion-card small { margin-top: 2px; color: #8997aa; font-size: 8px; }
.emotion-card > i { grid-column: 1/3; height: 5px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: #e8e2f3; }
.emotion-card > i b { display: block; width: var(--emotion-level); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.emotion-card em { position: absolute; right: 9px; bottom: 6px; color: #7c3aed; font-size: 7px; font-style: normal; font-weight: 850; opacity: 0; text-transform: uppercase; }
.emotion-card:hover em, .emotion-card.active em { opacity: 1; }
.emotion-focus { display: grid; grid-template-columns: 72px 1.25fr 1fr; gap: 12px; align-items: center; margin-top: 10px; padding: 12px; border: 1px solid #e1d9ef; border-radius: 12px; background: linear-gradient(145deg, #faf5ff, #fff); }
.emotion-orb { position: relative; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#8b5cf6 0 var(--emotion-level), #e9e2f2 var(--emotion-level) 100%); box-shadow: 5px 7px 14px rgba(88,28,135,.15); }
.emotion-orb::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.emotion-orb strong { z-index: 1; color: #6d28d9; font-size: 13px; }
.emotion-focus span { display: block; color: #9889aa; font-size: 7px; font-weight: 850; letter-spacing: .07em; }
.emotion-focus > div > strong { display: block; margin-top: 3px; color: #38234d; font-size: 12px; text-transform: capitalize; }
.emotion-focus p, .emotion-focus small { margin: 3px 0 0; color: #756680; font-size: 9px; line-height: 1.4; }

.crisis-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.crisis-stat { position: relative; overflow: hidden; padding: 16px; border: 1px solid #f0d6d8; border-radius: 13px; background: linear-gradient(145deg, #fff, #fff7f7); box-shadow: 0 14px 25px -24px rgba(153,27,27,.7); }
.crisis-stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(#fb7185, #dc2626); }
.crisis-stat span { display: block; color: #9a6c71; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.crisis-stat strong { display: block; margin-top: 5px; color: #7f1d1d; font-size: 24px; }
.critical-selector { display: grid; gap: 5px; }
.critical-item { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 30px; gap: 9px; align-items: center; padding: 8px; border: 1px solid transparent; border-radius: 10px; color: #475569; background: transparent; font: inherit; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.critical-item:hover, .critical-item:focus-visible, .critical-item.active { outline: 0; transform: translateX(3px); border-color: rgba(220,38,38,.2); background: #fff8f8; }
.critical-score { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #fecaca; border-radius: 10px; color: #b91c1c; background: linear-gradient(145deg, #fff, #fee2e2); box-shadow: 2px 3px 0 #f2c8ca; font-size: 11px; font-weight: 850; }
.critical-item > span:nth-child(2) { min-width: 0; }
.critical-item strong, .critical-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.critical-item strong { color: #372329; font-size: 10px; }
.critical-item small { margin-top: 2px; color: #9b7d83; font-size: 8px; }
.critical-item em { color: #dc2626; font-size: 7px; font-style: normal; font-weight: 850; opacity: 0; text-transform: uppercase; }
.critical-item:hover em, .critical-item.active em { opacity: 1; }
.critical-focus { display: grid; grid-template-columns: 70px 1.4fr 1fr; gap: 12px; align-items: center; margin-top: 11px; padding: 11px; border: 1px solid #f0d6d8; border-radius: 12px; background: linear-gradient(145deg, #fff7f7, #fff); }
.critical-focus-score { position: relative; width: 60px; height: 60px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: conic-gradient(#dc2626 0 var(--crisis-level), #f4dede var(--crisis-level) 100%); }
.critical-focus-score::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.critical-focus-score > * { position: relative; z-index: 1; }
.critical-focus-score span, .critical-focus > div > span { display: block; color: #a47b81; font-size: 7px; font-weight: 850; letter-spacing: .06em; }
.critical-focus-score strong { color: #991b1b; font-size: 17px; line-height: 1; }
.critical-focus-score small { color: #a47b81; font-size: 7px; }
.critical-focus > div > strong { display: block; margin: 3px 0; color: #44272d; font-size: 10px; }
.critical-focus > div > small { color: #8f7479; font-size: 8px; }
.critical-focus .tag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.critical-focus .tag-list b { padding: 3px 6px; border-radius: 99px; color: #9f1239; background: #ffe4e6; font-size: 7px; font-weight: 750; text-transform: capitalize; }

.poll-table { overflow: visible; }
.poll-head, .poll-row { display: grid; grid-template-columns: 85px 1fr 1.1fr 1fr 75px 70px; gap: 10px; align-items: center; }
.poll-head { padding: 0 11px 8px; color: #8896a9; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.poll-row { position: relative; width: 100%; padding: 10px 11px; border: 1px solid transparent; border-top-color: #edf1f5; color: #475569; background: transparent; font: inherit; font-size: 10px; text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.poll-row:hover, .poll-row:focus-visible, .poll-row.active { z-index: 1; outline: 0; transform: translateX(3px); border-color: rgba(37,99,235,.2); border-radius: 10px; background: #f8fbff; }
.poll-row > span:nth-child(2), .poll-row > span:nth-child(3) { overflow: hidden; color: #172033; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.poll-row > strong { color: #2563eb; font-size: 13px; }
.poll-row > em { position: absolute; right: 8px; bottom: 2px; color: #2563eb; font-size: 6px; font-style: normal; font-weight: 850; opacity: 0; text-transform: uppercase; }
.poll-row:hover > em, .poll-row.active > em { opacity: 1; }
.poll-focus { display: grid; grid-template-columns: 1fr .7fr .8fr 1.5fr; margin-top: 12px; overflow: hidden; border: 1px solid #dbe5ef; border-radius: 12px; background: linear-gradient(145deg, #fff, #f1f6fb); box-shadow: 0 16px 30px -28px #0f172a; }
.poll-focus > div { min-width: 0; padding: 12px; border-right: 1px solid #e4ebf2; }
.poll-focus > div:last-child { border-right: 0; }
.poll-focus span { display: block; color: #8997aa; font-size: 7px; font-weight: 850; letter-spacing: .07em; }
.poll-focus strong { display: block; margin: 3px 0; overflow: hidden; color: #172033; font-size: 11px; text-overflow: ellipsis; }
.poll-focus small { color: #64748b; font-size: 8px; }
.poll-focus-question strong { font-size: 9px; font-weight: 600; line-height: 1.4; white-space: normal; }
.poll-focus a { color: #2563eb; font-size: 8px; font-weight: 750; text-decoration: none; }

/* ==========================================================================
   ELECTORAL FORECAST V2 & HIGH-TECH HERO
   ========================================================================== */

.electoral-forecast-v2 {
  position: relative;
  overflow: hidden;
  padding: 20px 24px;
  margin-bottom: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.forecast-v2-headline {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.9fr 1fr;
  gap: 12px;
  margin: 14px 0 18px;
}

.forecast-v2-headline > div {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}
.forecast-v2-headline > div:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.forecast-v2-headline > div:first-child {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(16, 185, 129, 0.1));
  border-color: rgba(56, 189, 248, 0.3);
}

.forecast-v2-headline span {
  display: block;
  color: #38bdf8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forecast-v2-headline strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.03em;
}

.forecast-v2-headline small {
  display: block;
  color: #cbd5e1;
  font-size: 11px;
}

/* Forecast Why Grid */
.forecast-why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.forecast-factor-group {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}
.forecast-factor-group.favorable {
  border-left: 4px solid var(--green-bright);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
}
.forecast-factor-group.risk {
  border-left: 4px solid var(--amber);
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.forecast-factor-group h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.forecast-factor-group article {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.forecast-factor-group article:first-of-type { border-top: 0; }

.forecast-factor-group article strong { color: #f8fafc; font-size: 12px; font-weight: 600; }
.forecast-factor-group article p { margin: 4px 0 8px; color: #cbd5e1; font-size: 11px; line-height: 1.5; }

.evidence-links { display: flex; flex-wrap: wrap; gap: 6px; }
.evidence-links a, .evidence-links span {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.evidence-links a:hover { background: var(--brand); color: #ffffff; }

/* Turnout & Scenarios */
.turnout-lead {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--brand-pale);
  border: 1px solid #bfdbfe;
  text-align: center;
  margin-bottom: 14px;
}
.turnout-lead strong {
  display: block;
  font-size: 38px;
  font-weight: 800;
  color: var(--brand-hover);
  line-height: 1;
  letter-spacing: -0.03em;
}
.turnout-lead span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.turnout-lead small { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 11px; }

.turnout-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.turnout-scenarios div {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--line);
  text-align: center;
  transition: all 0.15s ease;
}
.turnout-scenarios div:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.turnout-scenarios span { display: block; color: var(--ink-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.turnout-scenarios strong { display: block; margin-top: 4px; color: var(--ink); font-size: 16px; font-weight: 700; }

/* Dimension Tabs */
.dimension-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.dimension-tabs button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dimension-tabs button:hover:not(.active) { background: var(--line-soft); color: var(--ink); }
.dimension-tabs button.active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.dimension-tabs button span { margin-left: 4px; opacity: 0.8; font-weight: 400; }

/* Territorial Forecast Table */
.territorial-card { margin-bottom: 20px; }
.territorial-forecast { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }

.territorial-head, .territorial-row {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1.1fr 0.7fr 0.7fr;
  gap: 12px;
  align-items: center;
}

.territorial-head {
  padding: 12px 16px;
  color: var(--ink-muted);
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.territorial-body { max-height: 480px; overflow-y: auto; }

.territorial-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #ffffff;
  font-size: 12px;
  color: var(--ink);
  transition: all 0.15s ease;
}
.territorial-row:hover {
  background: var(--brand-pale);
  border-left: 3px solid var(--brand);
}

.territorial-row strong { font-weight: 600; color: var(--ink); }
.territorial-row b { color: var(--brand); font-size: 15px; font-weight: 700; }

.confidence-high { color: #15803d; background: #dcfce7; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; width: max-content; }
.confidence-medium { color: #0369a1; background: #e0f2fe; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; width: max-content; }
.confidence-low { color: #b45309; background: #fef3c7; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; width: max-content; }

/* ==========================================================================
   TERRITORIAL INTELLIGENCE & MAPLIBRE MAP (HIGH-TECH OBSIDIAN DARK THEME)
   ========================================================================== */

.territorial-intelligence {
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #f8fafc;
  box-shadow: var(--shadow-lg);
}

.territorial-map-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
}

.territorial-map-toolbar h2 {
  margin: 2px 0 4px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
}

.geo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 11px;
}
.geo-breadcrumb button {
  padding: 0;
  border: 0;
  color: #38bdf8;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}
.geo-breadcrumb button:hover { text-decoration: underline; color: #ffffff; }

.geo-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.geo-toolbar-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.geo-toolbar-controls input,
.geo-toolbar-controls select {
  height: 32px;
  min-width: 150px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
}
.geo-toolbar-controls input:focus,
.geo-toolbar-controls select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.geo-layer-switch {
  height: 32px;
  display: flex;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.geo-layer-switch button {
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #94a3b8;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.geo-layer-switch button:hover { color: #ffffff; }
.geo-layer-switch button.active {
  color: #ffffff;
  background: var(--brand);
  box-shadow: var(--shadow-sm);
}

/* Map Layout & Canvas Stage */
.territorial-map-layout {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.75fr);
}

.territorial-map-stage {
  position: relative;
  width: 100%;
  min-height: 560px;
  height: 100%;
  background: #0b1329;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#territorialMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
}

.geo-map-status {
  position: absolute;
  z-index: 5;
  left: 16px;
  top: 16px;
  max-width: 380px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  font-size: 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.geo-hover-card {
  position: absolute;
  z-index: 10;
  right: 16px;
  top: 16px;
  width: 230px;
  padding: 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  color: #ffffff;
}
.geo-hover-card > span { color: #38bdf8; font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.geo-hover-card > strong { display: block; margin: 4px 0 10px; color: #ffffff; font-size: 16px; font-weight: 600; }
.geo-hover-card b { color: #38bdf8; font-size: 18px; }

.geo-legend {
  position: absolute;
  z-index: 5;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  font-size: 10px;
}
.geo-legend i { width: 18px; height: 6px; border-radius: 2px; background: rgba(56, 189, 248, 0.2); }
.geo-legend i:nth-of-type(2) { background: rgba(56, 189, 248, 0.5); }
.geo-legend i:nth-of-type(3) { background: rgba(56, 189, 248, 0.8); }
.geo-legend i:nth-of-type(4) { background: #38bdf8; }

/* Side Panel & Detailed Territory Inspector */
.territorial-side-panel {
  padding: 20px;
  background: #0f172a;
  color: #f8fafc;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  max-height: 600px;
}
.territorial-side-panel .eyebrow { color: #38bdf8; }
.territorial-side-panel h3 { margin: 4px 0 8px; color: #ffffff; font-size: 18px; font-weight: 600; }
.territorial-side-panel p { margin: 0; color: #94a3b8; font-size: 11px; }

.geo-detail-head {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.geo-detail-head span {
  display: block;
  color: #38bdf8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.geo-detail-head h3 {
  margin: 4px 0 2px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.geo-detail-head small { display: block; color: #94a3b8; font-size: 11px; }

.geo-main-metric {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.geo-main-metric.unavailable {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.geo-main-metric span {
  display: block;
  color: #60a5fa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.geo-main-metric strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.03em;
}
.geo-main-metric small { display: block; color: #cbd5e1; font-size: 11px; }

.geo-data-origin {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.geo-data-origin span {
  display: block;
  color: #38bdf8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.geo-data-origin strong {
  display: block;
  margin: 4px 0 2px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
}
.geo-data-origin small {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.4;
  margin-top: 3px;
}

.geo-official-card {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.2);
}
.geo-official-card.unavailable {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.geo-official-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.geo-official-head span {
  display: block;
  color: #fbbf24;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.geo-official-head strong {
  display: block;
  margin-top: 2px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}
.geo-official-head b {
  padding: 2px 6px;
  border-radius: 4px;
  color: #fef08a;
  background: rgba(217, 119, 6, 0.25);
  font-size: 10px;
  font-weight: 700;
}

.geo-official-total { margin: 10px 0; }
.geo-official-total strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
}
.geo-official-total span { display: block; margin-top: 2px; color: #cbd5e1; font-size: 11px; }

.geo-official-ranking {
  display: grid;
  gap: 6px;
  margin: 12px 0 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.geo-official-ranking div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.geo-official-ranking span { color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.geo-official-ranking b { color: #fbbf24; font-weight: 700; }

.geo-official-method {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: #94a3b8;
}
.geo-official-method summary { color: #fbbf24; cursor: pointer; font-weight: 600; }
.geo-official-method p { margin: 6px 0; color: #cbd5e1; font-size: 10px; line-height: 1.4; }
.geo-official-method a { color: #38bdf8; text-decoration: none; font-weight: 600; }

.geo-coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.geo-coverage-grid div {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.geo-coverage-grid span {
  display: block;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.geo-coverage-grid b { display: block; margin-top: 2px; color: #94a3b8; font-size: 11px; font-weight: 600; }
.geo-coverage-grid .available {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}
.geo-coverage-grid .available span { color: #34d399; }
.geo-coverage-grid .available b { color: #ffffff; }

.geo-candidate-list {
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.geo-candidate-list > span {
  display: block;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.geo-candidate-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.geo-candidate-list i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--brand);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.geo-candidate-list p { margin: 0; min-width: 0; }
.geo-candidate-list strong { display: block; font-size: 12px; color: #ffffff; font-weight: 600; }
.geo-candidate-list small { display: block; color: #94a3b8; font-size: 10px; }

.geo-compare-button {
  width: 100%;
  height: 38px;
  margin-top: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.geo-compare-button:hover { background: var(--brand); color: #ffffff; border-color: var(--brand); }

.geo-coverage-note { margin-top: 10px; color: #64748b; font-size: 10px; line-height: 1.4; }

.geo-comparison-list { display: grid; gap: 8px; margin-top: 12px; }
.geo-comparison-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.geo-comparison-list span { color: #ffffff; font-size: 12px; font-weight: 600; }
.geo-comparison-list strong { grid-row: 1/3; grid-column: 2; color: #38bdf8; font-size: 22px; font-weight: 700; align-self: center; }
.geo-comparison-list small { color: #94a3b8; font-size: 10px; }

.geo-panel-empty {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  color: #64748b;
}
.geo-panel-empty i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  font-size: 20px;
  font-style: normal;
}
.geo-panel-empty small { max-width: 200px; font-size: 11px; }

.territorial-map-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  font-size: 11px;
}
.territorial-map-footer p { margin: 0; max-width: 600px; }

/* Electorate Hero & Forecast Cards */
.electorate-hero { margin-bottom: 20px; }

/* Demographics Matrix & Pill Tags */
.demographic-matrix { display: grid; gap: 10px; }

/* ==========================================================================
   ENTERPRISE DATA TABLES & MENTIONS
   ========================================================================== */

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px;
  gap: 10px;
  margin-bottom: 12px;
}
.filter-bar input, .filter-bar select, .modal input, .modal select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 12px;
}
.filter-bar input:focus, .filter-bar select:focus, .modal input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box { position: relative; }
.search-box span { position: absolute; left: 10px; top: 8px; color: var(--ink-muted); font-size: 16px; }
.search-box input { padding-left: 32px; }

.source-table { overflow-x: auto; }
.mention-row {
  padding: 12px 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 95px minmax(170px, 190px) 50px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.1s ease;
}
.mention-row:hover { background: var(--line-soft); }

.mention-source {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--brand);
  background: var(--brand-pale);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.mention-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--ink); }
.mention-copy p { margin: 2px 0 0; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }

.mention-date { color: var(--ink-muted); font-size: 11px; }

.sentiment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--line-soft);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.sentiment-pill.pos { color: var(--green); background: var(--green-pale); }
.sentiment-pill.neg { color: var(--red); background: var(--red-pale); }

.sentiment-axes {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.sentiment-axis {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  gap: 4px;
  align-items: center;
}
.sentiment-axis > small {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sentiment-axis .sentiment-pill {
  min-width: 0;
  padding-inline: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sentiment-axis > em {
  color: var(--ink-muted);
  font-size: 9px;
  font-style: normal;
  text-align: right;
}
.sentiment-legacy-hint {
  color: var(--amber);
  font-size: 8px;
  line-height: 1.2;
  text-align: right;
}
.sentiment-detail > small,
.legacy-sentiment > small {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.35;
}
.sentiment-value.pos { color: var(--green); }
.sentiment-value.neg { color: var(--red); }
.legacy-sentiment {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.06);
}

.crisis-value { font-size: 12px; font-weight: 600; text-align: right; color: var(--ink); }

.pagination {
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-muted);
  font-size: 11px;
}
.pagination button {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
}
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* ==========================================================================
   ADMINISTRATION & VALIDATION BENCH
   ========================================================================== */

.admin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.admin-summary article { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; }
.admin-summary span { color: var(--ink-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.admin-summary strong { display: block; margin: 4px 0 2px; font-size: 24px; font-weight: 700; color: var(--ink); }
.admin-summary small { color: var(--ink-soft); font-size: 11px; }

.validation-layout { display: grid; grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.35fr); gap: 16px; }
.validation-queue { max-height: 720px; overflow-y: auto; }
.validation-case {
  width: 100%;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: 65px 1fr 15px;
  gap: 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.validation-case:hover { background: var(--line-soft); }
.validation-case.active { border-radius: var(--radius-sm); background: var(--brand-pale); border-left: 3px solid var(--brand); }
.validation-case strong { font-size: 11px; color: var(--ink); }
.validation-case p { margin-top: 2px; color: var(--ink-soft); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.validation-context p {
  max-height: 220px;
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--line-soft);
  font-size: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   MODALS & AUTH
   ========================================================================== */

.modal-backdrop.open { display: flex !important; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
}
.auth-gate[hidden] { display: none; }

.auth-card {
  width: min(400px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}
.auth-card h2 { margin: 4px 0 8px; color: #ffffff; font-size: 20px; }
.auth-card p { color: #94a3b8; font-size: 12px; }
.auth-card input {
  padding: 10px 12px;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
}

/* MapLibre Controls Overrides */
.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: #0f172a !important;
  box-shadow: var(--shadow-md) !important;
}
.maplibregl-ctrl-group button { filter: invert(1); opacity: 0.85; }
.maplibregl-ctrl-attrib { color: #94a3b8 !important; background: rgba(15, 23, 42, 0.85) !important; }
.maplibregl-ctrl-attrib a { color: #38bdf8 !important; }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid.two-thirds, .dashboard-grid.equal, .dashboard-grid.score-layout { grid-template-columns: 1fr; }
  .change-brief { grid-template-columns: 1fr; }
  .forecast-v2-headline { grid-template-columns: repeat(2, 1fr); }
  .forecast-why-grid { grid-template-columns: 1fr; }
  .validation-layout { grid-template-columns: 1fr; }
  .territorial-map-layout { grid-template-columns: 1fr; }
  .territorial-side-panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu { display: block; }
  .content-wrap { padding: 16px; }
  .topbar { padding: 0 16px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .forecast-v2-headline { grid-template-columns: 1fr; }
  .turnout-scenarios { grid-template-columns: 1fr; }
  .territorial-head { display: none; }
  .territorial-row { grid-template-columns: 1fr 1fr; }
  .google-chart-card { padding: 14px 12px; }
  .google-chart-toolbar { align-items: flex-start; flex-direction: column; }
  .chart-summary-pills { width: 100%; gap: 5px; }
  .summary-pill { flex: 1; justify-content: center; padding: 6px; }
  .summary-pill small { display: none; }
  .chart-series-toggles { width: 100%; }
  .toggle-btn { flex: 1; }
  .google-chart-stage { height: 235px; }
  .chart-insight-panel { grid-template-columns: repeat(3, 1fr); }
  .insight-date, .insight-reading { grid-column: span 3; }
  .chart-insight-panel > div { border-bottom: 1px solid rgba(148, 163, 184, 0.18); }
  .chart-interaction-hint { display: none; }
  .mention-row {
    grid-template-columns: 32px minmax(0, 1fr) minmax(145px, 170px);
    gap: 8px;
  }
  .mention-date, .mention-row > .crisis-value { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .google-node-halo { animation: none; }
  .google-chart-svg { transition: none; transform: none; }
  .google-chart-stage:hover .google-chart-svg { transform: none; }
  .chart-is-entering .google-chart-toolbar,
  .chart-is-entering .chart-insight-panel,
  .chart-is-entering .chart-interaction-hint,
  .chart-is-entering .svg-area-pos,
  .chart-is-entering .svg-area-neg,
  .chart-is-entering .svg-line-pos,
  .chart-is-entering .svg-line-neg,
  .chart-is-entering .svg-line-depth { animation: none; stroke-dashoffset: 0; }
}

.event-planner-toggle { align-self: end; min-height: 39px; border-color: rgba(52, 211, 153, .42); color: #d1fae5; background: rgba(16, 185, 129, .12); }
.event-planner-toggle.active { color: #06291f; background: #6ee7b7; }
.event-planner-panel { margin: 18px 0 4px; padding: 22px; border: 1px solid rgba(110, 231, 183, .24); border-radius: 20px; background: linear-gradient(145deg, rgba(10, 31, 27, .98), rgba(10, 24, 31, .98)); box-shadow: 0 22px 55px rgba(0, 0, 0, .22); }
.event-planner-panel[hidden] { display: none; }
.event-planner-panel > header { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; }
.event-planner-panel > header h3 { margin: 5px 0; color: #f0fdf4; font-size: 24px; }
.event-planner-panel > header p { max-width: 740px; margin: 0; color: #9db7ad; font-size: 12px; line-height: 1.55; }
.event-planner-panel > header > button { width: 34px; height: 34px; border: 1px solid rgba(148, 163, 184, .2); border-radius: 10px; color: #d1fae5; background: rgba(15, 23, 42, .5); cursor: pointer; }
.event-planner-controls { display: grid; grid-template-columns: 1.25fr 1.2fr repeat(3, minmax(115px, .7fr)) auto; gap: 10px; align-items: end; margin-top: 20px; }
.event-planner-controls label, .event-operations-grid label { display: grid; gap: 6px; color: #8fa9a0; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.event-planner-controls input, .event-planner-controls select, .event-operations-grid input { box-sizing: border-box; width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid rgba(148, 163, 184, .2); border-radius: 9px; outline: 0; color: #ecfdf5; background: rgba(15, 23, 42, .72); }
.event-planner-controls input:focus, .event-planner-controls select:focus, .event-operations-grid input:focus { border-color: rgba(110, 231, 183, .65); }
.event-planner-status { display: flex; gap: 8px; align-items: baseline; margin: 14px 0; padding: 10px 12px; border-left: 3px solid #34d399; color: #9db7ad; background: rgba(16, 185, 129, .07); font-size: 11px; }
.event-planner-status strong { color: #d1fae5; }
.event-google-workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .65fr); min-height: 390px; margin: 14px 0; overflow: hidden; border: 1px solid rgba(56, 189, 248, .24); border-radius: 16px; background: #0b1719; }
.event-google-workspace iframe { width: 100%; height: 100%; min-height: 390px; border: 0; background: radial-gradient(circle at center, #183b35, #0b1719); }
.event-google-workspace aside { display: flex; flex-direction: column; justify-content: center; padding: 22px; border-left: 1px solid rgba(56, 189, 248, .18); }
.event-google-workspace aside h4 { margin: 7px 0; color: #fff; font-size: 20px; }
.event-google-workspace aside > div { margin: 10px 0; padding: 11px; border-radius: 10px; background: rgba(56, 189, 248, .08); }
.event-google-workspace aside > div strong, .event-google-workspace aside > div small { display: block; }
.event-google-workspace aside > div strong { color: #7dd3fc; font-size: 20px; }
.event-google-workspace aside > div small, .event-google-workspace aside p { color: #8ba4ae; font-size: 10px; line-height: 1.5; }
.event-google-workspace aside .button { align-self: flex-start; margin-top: 6px; }
.event-recommendation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.event-recommendation-card { padding: 16px; border: 1px solid rgba(148, 163, 184, .16); border-radius: 15px; background: rgba(15, 31, 37, .72); }
.event-recommendation-card { cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.event-recommendation-card:hover { transform: translateY(-2px); border-color: rgba(110, 231, 183, .38); }
.event-recommendation-card.selected { border-color: #6ee7b7; background: linear-gradient(145deg, rgba(16, 75, 60, .46), rgba(15, 31, 37, .84)); box-shadow: 0 0 0 2px rgba(110, 231, 183, .09); }
.event-recommendation-card > header { display: flex; justify-content: space-between; color: #6ee7b7; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.event-recommendation-card h4 { margin: 12px 0 3px; color: #fff; font-size: 17px; }
.event-recommendation-card > small { color: #78958b; font-size: 9px; text-transform: uppercase; }
.event-score-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(148, 163, 184, .12); color: #9db7ad; font-size: 10px; }
.event-score-row b { color: #d1fae5; }
.event-recommendation-card ul { min-height: 68px; margin: 12px 0; padding-left: 17px; color: #9db7ad; font-size: 10px; line-height: 1.5; }
.event-card-actions { display: flex; gap: 8px; }
.event-route-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 12px; padding: 15px; border: 1px solid rgba(56, 189, 248, .2); border-radius: 14px; background: rgba(14, 116, 144, .08); }
.event-route-card span, .event-route-card strong, .event-route-card small { display: block; }
.event-route-card span { color: #7dd3fc; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.event-route-card strong { margin: 3px 0; color: #e0f2fe; font-size: 13px; }
.event-route-card small { color: #8ba4ae; font-size: 9px; }
.event-followup { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(148, 163, 184, .15); }
.event-followup > div:first-child h4 { margin: 4px 0; color: #f0fdf4; font-size: 17px; }
.event-followup > div:first-child p { margin: 0 0 14px; color: #8fa9a0; font-size: 11px; }
.event-plan-card { margin-top: 10px; padding: 15px; border: 1px solid rgba(148, 163, 184, .16); border-radius: 14px; background: rgba(8, 20, 25, .7); }
.event-plan-card > header { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.event-plan-card > header span { color: #6ee7b7; font-size: 8px; font-weight: 900; letter-spacing: .09em; }
.event-plan-card > header h4 { margin: 3px 0; color: #fff; font-size: 14px; }
.event-plan-card > header small { color: #78958b; font-size: 9px; }
.event-operations-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 10px; }
.event-operations-grid .event-checkbox { align-content: end; grid-template-columns: auto 1fr; align-items: center; min-height: 39px; }
.event-operations-grid .event-checkbox input { width: 17px; min-height: 17px; }
.event-auto-note { margin: 10px 0 0; color: #78958b; font-size: 10px; }
.event-digital-result { margin-top: 12px; padding: 12px; border-left: 3px solid #38bdf8; background: rgba(14, 165, 233, .07); }
.event-digital-result span, .event-digital-result strong, .event-digital-result small { display: block; }
.event-digital-result span { color: #7dd3fc; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.event-digital-result strong { margin: 4px 0; color: #e0f2fe; }
.event-digital-result small, .event-digital-result p { color: #8ba4ae; font-size: 9px; }
.event-digital-result p { margin: 5px 0 0; }

@media (max-width: 1100px) {
  .event-planner-controls { grid-template-columns: repeat(3, 1fr); }
  .event-recommendation-grid { grid-template-columns: 1fr; }
  .event-google-workspace { grid-template-columns: 1fr; }
  .event-google-workspace aside { border-top: 1px solid rgba(56, 189, 248, .18); border-left: 0; }
}
@media (max-width: 680px) {
  .event-planner-panel { padding: 15px; }
  .event-planner-controls, .event-operations-grid { grid-template-columns: 1fr; }
  .event-route-card { align-items: stretch; flex-direction: column; }
}

/* ==========================================================================
   PULSO ANALYST — IMMERSIVE EVIDENCE WORKSPACE
   ========================================================================== */

.main-content,
.sidebar { transition: margin-left 0.28s ease, transform 0.28s ease, width 0.28s ease; }

body.analyst-mode {
  overflow: hidden;
  background: #090a0d;
}
body.analyst-mode .sidebar { transform: translateX(-100%); }
body.analyst-mode .main-content {
  width: 100%;
  min-width: 0;
  margin-left: 0;
  background: #090a0d;
}
body.analyst-mode.analyst-sidebar-open .sidebar { transform: translateX(0); }
body.analyst-mode.analyst-sidebar-open .main-content {
  width: calc(100% - var(--sidebar));
  margin-left: var(--sidebar);
}
body.analyst-mode .topbar,
body.analyst-mode .global-control-bar,
body.analyst-mode .stale-warning { display: none !important; }
body.analyst-mode .content-wrap { max-width: none; height: 100vh; margin: 0; padding: 0; }

#section-analyst.active {
  position: relative;
  height: 100vh;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e9ecf4;
  background:
    radial-gradient(ellipse 52% 44% at 48% 46%, rgba(29, 57, 142, 0.28), transparent 72%),
    radial-gradient(circle at 78% 10%, rgba(99, 102, 241, 0.08), transparent 27%),
    linear-gradient(155deg, #0b0c0f 0%, #0a0b0e 52%, #07080a 100%);
}
#section-analyst::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.55px, transparent 0.55px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 74%, transparent);
}

.analyst-page-bar {
  position: relative;
  z-index: 5;
  height: 68px;
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(18px);
}
.analyst-menu-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.analyst-menu-toggle:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(96, 165, 250, 0.35); }
.analyst-menu-toggle i { display: block; width: 15px; height: 1.5px; border-radius: 2px; background: #cbd5e1; }
.analyst-page-brand { position: absolute; left: 50%; display: flex; align-items: center; gap: 10px; transform: translateX(-50%); }
.analyst-page-brand strong { display: block; color: #f8fafc; font-size: 13px; font-weight: 650; }
.analyst-page-brand small { display: block; color: #667085; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; }
.analyst-spark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  font-size: 17px;
  background: conic-gradient(from 30deg, #ef4444, #facc15, #22c55e, #38bdf8, #8b5cf6, #ef4444);
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.42));
}
.analyst-live-pill { display: flex; align-items: center; gap: 7px; color: #9aa4b5; font-size: 9px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.analyst-live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1), 0 0 12px rgba(52, 211, 153, 0.6); }

#section-analyst .analyst-heading {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  max-width: 1180px;
  width: calc(100% - 48px);
  margin: 18px auto 14px;
  align-items: flex-end;
}
#section-analyst .analyst-heading .eyebrow { color: #7aa2ff; font-size: 9px; letter-spacing: 0.18em; }
#section-analyst .analyst-heading h1 { margin: 4px 0 3px; color: #f4f6fb; font-size: clamp(24px, 2.3vw, 36px); font-weight: 420; letter-spacing: -0.035em; }
#section-analyst .analyst-heading h1 span { color: transparent; background: linear-gradient(90deg, #8ab4f8, #c58af9, #f28b82); background-clip: text; -webkit-background-clip: text; }
#section-analyst .analyst-heading p { max-width: 760px; color: #7f8899; font-size: 11px; }
.analyst-lock {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
}
.analyst-lock > i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #0b1220; background: #8ab4f8; font-size: 11px; font-style: normal; font-weight: 900; }
.analyst-lock strong, .analyst-lock small { display: block; }
.analyst-lock strong { color: #b9d1ff; font-size: 8px; letter-spacing: 0.12em; }
.analyst-lock small { color: #69758a; font-size: 8px; }

.analyst-workspace {
  position: relative;
  z-index: 2;
  min-height: 0;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  transition: max-width 0.28s ease, width 0.28s ease;
}
body.analyst-sidebar-open .analyst-workspace { max-width: none; }

.analyst-console {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.analyst-console-head {
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  grid-template-columns: 34px auto 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.analyst-avatar, .message-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: conic-gradient(from 30deg, #ef4444, #facc15, #22c55e, #38bdf8, #8b5cf6, #ef4444);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.2);
}
.analyst-avatar { width: 32px; height: 32px; }
.analyst-avatar span { width: 15px; height: 15px; background: #121318; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.analyst-console-head > div:nth-child(2) > span { display: block; color: #69758a; font-size: 7px; font-weight: 800; letter-spacing: 0.14em; }
.analyst-console-head > div:nth-child(2) > strong { color: #e8ebf3; font-size: 11px; font-weight: 600; }
.analyst-status { justify-self: end; display: flex; align-items: center; gap: 6px; color: #7c8799; font-size: 8px; }
.analyst-status i { width: 5px; height: 5px; border-radius: 50%; background: #34d399; }
#clearAnalyst { width: 32px; height: 32px; border: 0; border-radius: 50%; color: #9aa4b5; background: rgba(255, 255, 255, 0.04); cursor: pointer; }
#clearAnalyst:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }

.analyst-messages {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 22px clamp(18px, 4vw, 48px) 10px;
  scrollbar-width: thin;
  scrollbar-color: #343741 transparent;
}
.analyst-message { display: flex; gap: 14px; width: 100%; max-width: 800px; margin: 0 auto 28px; animation: analyst-message-in 0.3s ease both; }
.analyst-message.user-message { justify-content: flex-end; }
.message-avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 10px; font-weight: 800; }
.analyst-message .message-body { min-width: 0; color: #cdd2dd; }
.assistant-message .message-body { flex: 1; }
.user-message .message-body { max-width: 76%; padding: 10px 14px; border-radius: 17px 17px 4px 17px; background: #25272d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.analyst-message p { margin: 6px 0; color: #d8dde7; font-size: 15px; line-height: 1.62; white-space: pre-wrap; }
.user-message .message-body > span { color: #9aa4b5; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }
.message-meta { display: flex; align-items: center; gap: 8px; }
.message-meta strong { color: #eef1f7; font-size: 13px; }
.message-meta span { padding: 3px 6px; border-radius: 5px; color: #91b9ff; background: rgba(59, 130, 246, 0.1); font-size: 9px; font-weight: 850; letter-spacing: 0.09em; }
.analyst-answer-content { max-width: 760px; margin-top: 14px; color: #d8dde7; font-size: 16px; line-height: 1.72; letter-spacing: -0.006em; }
.analyst-answer-content > :first-child { margin-top: 0; }
.analyst-answer-content > :last-child { margin-bottom: 0; }
.analyst-answer-content p { margin: 0 0 18px; color: inherit; font-size: inherit; line-height: inherit; white-space: normal; }
.analyst-answer-content h2, .analyst-answer-content h3, .analyst-answer-content h4 { margin: 28px 0 10px; color: #f4f6fb; line-height: 1.3; letter-spacing: -0.02em; }
.analyst-answer-content h2 { font-size: 22px; }
.analyst-answer-content h3 { font-size: 19px; }
.analyst-answer-content h4 { font-size: 17px; }
.analyst-answer-content strong { color: #f1f4fa; font-weight: 680; }
.analyst-answer-content ul, .analyst-answer-content ol { margin: 10px 0 20px; padding-left: 25px; }
.analyst-answer-content li { margin: 0 0 10px; padding-left: 4px; }
.analyst-answer-content li::marker { color: #8ab4f8; font-weight: 700; }
.analyst-answer-content hr { height: 1px; margin: 26px 0; border: 0; background: rgba(255, 255, 255, 0.09); }
.analyst-answer-content blockquote { margin: 20px 0; padding: 14px 18px; border-left: 3px solid #8ab4f8; border-radius: 0 10px 10px 0; color: #dbe7fb; background: rgba(59, 130, 246, 0.08); }
.analyst-answer-content code { padding: 2px 5px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 5px; color: #dbeafe; background: rgba(255, 255, 255, 0.06); font-size: 0.9em; }
.intro-message .message-body > small { display: inline-block; margin-top: 4px; color: #7d8798; font-size: 11px; }
.analyst-thinking .message-body > i { display: inline-block; width: 5px; height: 5px; margin: 8px 2px 0; border-radius: 50%; background: #8ab4f8; animation: analyst-thinking 1s ease-in-out infinite; }
.analyst-thinking .message-body > i:nth-of-type(2) { animation-delay: 0.15s; }
.analyst-thinking .message-body > i:nth-of-type(3) { animation-delay: 0.3s; }

.analyst-prompts {
  width: calc(100% - 44px);
  max-width: 760px;
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  margin: 0 auto 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.analyst-prompts button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #929bad;
  background: rgba(255, 255, 255, 0.035);
  font-size: 8px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.analyst-prompts button:hover { color: #dce5f8; border-color: rgba(138, 180, 248, 0.3); background: rgba(59, 130, 246, 0.08); }
.analyst-composer {
  width: calc(100% - 44px);
  max-width: 760px;
  flex: 0 0 auto;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: #202126;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.analyst-composer:focus-within { border-color: rgba(138, 180, 248, 0.4); box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(59, 130, 246, 0.07); }
.analyst-composer textarea { width: 100%; min-height: 54px; max-height: 150px; resize: none; padding: 15px 17px 5px; border: 0; outline: 0; color: #eceff5; background: transparent; font-size: 15px; line-height: 1.45; }
.analyst-composer textarea::placeholder { color: #6f7786; }
.analyst-composer-foot { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px 7px 14px; }
.analyst-composer-foot > span { display: flex; align-items: center; gap: 6px; color: #667085; font-size: 7px; }
.analyst-composer-foot > span i { width: 5px; height: 5px; border-radius: 50%; background: #8ab4f8; box-shadow: 0 0 8px rgba(138, 180, 248, 0.7); }
#sendAnalyst { height: 36px; padding: 0 7px 0 14px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 999px; color: #dbe7ff; background: #2c4f8e; font-size: 12px; font-weight: 700; cursor: pointer; }
#sendAnalyst b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #14213a; background: #a8c7fa; }
#sendAnalyst.is-stopping { color: #fee2e2; background: #7f1d1d; }
#sendAnalyst.is-stopping b { color: #7f1d1d; background: #fecaca; font-size: 8px; }

.analyst-side { min-height: 0; display: grid; grid-template-rows: auto auto minmax(130px, 1fr); gap: 10px; overflow: auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #343741 transparent; }
.analyst-context-card, .scenario-lab, .intervention-memory-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  color: #cbd1dc;
  background: linear-gradient(145deg, rgba(30, 31, 37, 0.92), rgba(18, 19, 23, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 35px rgba(0, 0, 0, 0.16);
}
.analyst-card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.analyst-card-title > span { color: #7d8798; font-size: 7px; font-weight: 850; letter-spacing: 0.11em; }
.analyst-card-title > i { padding: 3px 6px; border-radius: 5px; color: #86efac; background: rgba(34, 197, 94, 0.08); font-size: 6px; font-style: normal; font-weight: 800; letter-spacing: 0.08em; }
.analyst-vote { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 0 10px; }
.analyst-vote span { display: block; color: #7d8798; font-size: 7px; font-weight: 800; }
.analyst-vote strong { display: block; margin-top: 1px; color: #f5f7fb; font-size: 27px; font-weight: 500; letter-spacing: -0.045em; }
.analyst-vote small { color: #8ab4f8; font-size: 9px; }
.analyst-context-grid { display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.055); border-radius: 10px; }
.analyst-context-grid > div { padding: 7px 8px; border-right: 1px solid rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.analyst-context-grid span, .analyst-context-grid strong { display: block; }
.analyst-context-grid span { color: #687386; font-size: 7px; }
.analyst-context-grid strong { color: #d7dce6; font-size: 9px; }
.analyst-composition-mini { display: flex; gap: 2px; height: 4px; margin: 10px 0 6px; overflow: hidden; border-radius: 4px; background: #282a31; }
.analyst-composition-mini i { min-width: 2px; background: linear-gradient(90deg, #4f7fd4, #8ab4f8); }
.analyst-context-card #analystContext > p, .scenario-lab > p, .intervention-memory-card > p { margin: 6px 0 9px; color: #697486; font-size: 8px; line-height: 1.45; }
.scenario-lab h2 { margin: 2px 0; color: #edf0f6; font-size: 14px; font-weight: 550; }
.scenario-lab label { display: flex; justify-content: space-between; margin-top: 10px; color: #8c95a5; font-size: 8px; }
.scenario-lab label strong { color: #a8c7fa; }
.scenario-lab input[type="range"] { width: 100%; margin: 8px 0 0; accent-color: #7aa2f7; }
.scenario-scale { display: flex; justify-content: space-between; color: #596476; font-size: 7px; }
.scenario-mode-hint { margin: 8px 0; padding: 6px 8px; border-radius: 7px; color: #8ab4f8; background: rgba(59, 130, 246, 0.07); font-size: 7px; }
.scenario-select-label { display: block !important; margin-bottom: 4px; }
#analystTurnoutScenario { width: 100%; height: 31px; padding: 0 8px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; outline: none; color: #cfd5df; background: #15161a; font-size: 8px; }
.scenario-run { width: 100%; height: 32px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px 0 11px; border: 1px solid rgba(138, 180, 248, 0.2); border-radius: 9px; color: #cfe0ff; background: rgba(59, 130, 246, 0.12); font-size: 8px; cursor: pointer; }
.scenario-run b { font-size: 14px; }
.analyst-scenario-result { margin-top: 8px; padding: 7px 8px; border-radius: 8px; color: #6f7a8c; background: rgba(255, 255, 255, 0.025); font-size: 7px; }
.analyst-scenario-result strong, .analyst-scenario-result span, .analyst-scenario-result small { display: block; }

.intervention-memory-card { min-height: 0; overflow: auto; }
.intervention-memory-card .empty-state { min-height: 72px; display: grid; place-content: center; text-align: center; border: 1px dashed rgba(255, 255, 255, 0.07); border-radius: 9px; background: rgba(255, 255, 255, 0.018); }
.intervention-memory-card .empty-state strong { color: #a9b1bf; font-size: 9px; }
.intervention-memory-card .empty-state span { color: #606b7d; font-size: 7px; }
.intervention-memory-item { margin-top: 7px; padding: 8px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 9px; background: rgba(255, 255, 255, 0.025); }
.intervention-memory-item strong, .intervention-memory-item span { display: block; }
.intervention-memory-item strong { color: #d9dee7; font-size: 8px; }
.intervention-memory-item span, .intervention-memory-item p, .intervention-memory-item small { color: #6e798b; font-size: 7px; }
.intervention-memory-item button { padding: 4px 7px; border: 1px solid rgba(138, 180, 248, 0.2); border-radius: 6px; color: #a8c7fa; background: transparent; font-size: 7px; }

.analyst-timeout-notice, .analyst-discrepancy, .analyst-scenario-inline, .analyst-decision-center, .analyst-technical, .analyst-factor-grid > div, .analyst-evidence-tray, .war-room-brief {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.war-room-brief { overflow: hidden; padding: 18px 20px; }
.war-room-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; color: #98a5b8; font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.war-room-title i { padding: 4px 8px; border-radius: 999px; color: #a8c7fa; background: rgba(59, 130, 246, .12); font-size: 10px; font-style: normal; }
.war-room-brief section { padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.war-room-brief section:last-of-type { border-bottom: 0; }
.war-room-brief section > b { display: block; margin-bottom: 7px; color: #f1f4fa; font-size: 14px; }
.war-room-brief section p { margin: 0; color: #cdd4df; font-size: 15px; line-height: 1.65; white-space: normal; }
.war-room-brief section.priority { margin: 3px 0; padding: 16px; border: 1px solid rgba(245, 158, 11, .18); border-radius: 11px; color: inherit; background: rgba(245, 158, 11, .07); }
.war-room-brief section.priority > b { color: #fbbf24; }
.war-room-brief footer { display: flex; gap: 8px; padding-top: 14px; color: #9ba6b7; font-size: 12px; }
.war-room-brief footer b { color: #cfd6e2; }
.analyst-timeout-notice, .analyst-discrepancy { padding: 8px; color: #aeb7c6; font-size: 8px; }
.analyst-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.analyst-actions button, .save-intervention { padding: 6px 8px; border: 1px solid rgba(138, 180, 248, 0.18); border-radius: 8px; color: #a8c7fa; background: rgba(59, 130, 246, 0.07); font-size: 7px; cursor: pointer; }
.analyst-actions button i { margin-right: 4px; font-style: normal; }
.analyst-factor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.analyst-factor-grid > div { padding: 8px; }
.analyst-factor-grid span { color: #a8c7fa; font-size: 7px; font-weight: 800; }
.analyst-factor-grid p { font-size: 8px; }
.analyst-technical { padding: 8px 10px; color: #8994a6; font-size: 8px; }
.analyst-technical summary { cursor: pointer; color: #9dacbf; }
.analyst-evidence-tray { padding: 9px; }
.analyst-evidence-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
.analyst-evidence-row strong, .analyst-evidence-row small { display: block; }
.analyst-evidence-row strong { color: #cdd4df; font-size: 8px; }
.analyst-evidence-row small { color: #667184; font-size: 7px; }
.analyst-evidence-row a, .analyst-evidence-row > i { color: #8ab4f8; font-size: 7px; font-style: normal; }

/* Analyst readability: answers and supporting cards must remain legible on desktop. */
.war-room-brief,
.analyst-decision-center,
.analyst-technical,
.analyst-evidence-tray { font-size: 12px; line-height: 1.55; }
.war-room-brief p,
.analyst-decision-center p,
.analyst-factor-grid p,
.analyst-analysis-section li { font-size: 13px; line-height: 1.55; }
.analyst-decision-center strong,
.war-room-brief b,
.analyst-analysis-section strong { font-size: 12px; }
.analyst-actions button,
.save-intervention { font-size: 11px; }
.analyst-technical { font-size: 11px; }
.analyst-evidence-row strong { font-size: 12px; }
.analyst-evidence-row small,
.analyst-evidence-row a,
.analyst-evidence-row > i { font-size: 10px; }

/* Action cards appear only for actionable intents; technical detail stays calm and scannable. */
.analyst-decision-center { overflow: hidden; padding: 0; }
.decision-center-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: linear-gradient(90deg, rgba(59, 130, 246, .09), transparent); }
.decision-center-head span { color: #eef3fb; font-size: 12px; font-weight: 760; letter-spacing: .08em; }
.decision-center-head small { color: #7f8a9d; font-size: 11px; }
.analyst-decision-center article { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 20px; border-bottom: 1px solid rgba(255, 255, 255, .065); }
.analyst-decision-center article:last-child { border-bottom: 0; }
.analyst-decision-center article > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #cfe1ff; background: rgba(59, 130, 246, .14); font-size: 13px; font-style: normal; font-weight: 750; }
.analyst-decision-center article > div > strong { display: block; margin-bottom: 7px; color: #f1f4fa; font-size: 15px; line-height: 1.35; }
.analyst-decision-center article p { margin: 0 0 9px; color: #ccd3df; font-size: 14px; line-height: 1.62; white-space: normal; }
.analyst-decision-center article small { display: block; color: #929dae; font-size: 12px; line-height: 1.55; }
.analyst-decision-center article em { display: block; margin-top: 12px; padding: 10px 12px; border-left: 2px solid #f59e0b; border-radius: 0 8px 8px 0; color: #c7cfdb; background: rgba(245, 158, 11, .065); font-size: 12px; font-style: normal; line-height: 1.5; }
.analyst-decision-center article em b { color: #fbbf24; }
.analyst-decision-center article > b { padding: 4px 8px; border-radius: 999px; color: #9fc0fa; background: rgba(59, 130, 246, .1); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.analyst-decision-center .save-intervention { margin-top: 13px; padding: 8px 11px; border-radius: 8px; color: #cfe0ff; background: rgba(59, 130, 246, .11); }
.recommendation-learning { margin-top: 10px; color: #9fb6d8; }
.analyst-technical { overflow: hidden; padding: 0; }
.analyst-technical summary { position: relative; padding: 15px 46px 15px 18px; color: #b8c2d1; font-size: 12px; font-weight: 650; list-style: none; cursor: pointer; }
.analyst-technical summary::-webkit-details-marker { display: none; }
.analyst-technical summary::after { content: "+"; position: absolute; top: 50%; right: 18px; color: #8ab4f8; font-size: 18px; font-weight: 400; transform: translateY(-50%); }
.analyst-technical[open] summary { border-bottom: 1px solid rgba(255, 255, 255, .07); color: #eef2f8; }
.analyst-technical[open] summary::after { content: "−"; }
.analyst-deep-analysis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.analyst-analysis-section { padding: 15px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 11px; background: rgba(255, 255, 255, .022); }
.analyst-analysis-section > strong { display: block; margin-bottom: 10px; color: #e6ebf3; font-size: 13px; line-height: 1.35; }
.analyst-analysis-section ul { margin: 0; padding-left: 18px; }
.analyst-analysis-section li { margin-bottom: 7px; color: #aeb8c8; font-size: 12px; line-height: 1.55; }
.analyst-analysis-section li:last-child { margin-bottom: 0; }
.analyst-analysis-section li::marker { color: #739ee8; }
.analyst-search-audit { padding: 0 16px 18px; }
.analyst-search-audit > span { display: block; margin-bottom: 10px; color: #768297; font-size: 10px; font-weight: 750; letter-spacing: .1em; }
.analyst-search-audit > div { display: flex; flex-wrap: wrap; gap: 8px; }
.analyst-search-audit i { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 999px; color: #aeb7c6; background: rgba(255, 255, 255, .025); font-size: 11px; font-style: normal; }
.analyst-search-audit i b { color: #4ade80; }
.analyst-search-audit i.missing { color: #6f7a8b; }
.analyst-search-audit i.missing b { color: #64748b; }
 (max-width: 620px) {
  .decision-center-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .analyst-decision-center article { grid-template-columns: 30px minmax(0, 1fr); padding: 16px; }
  .analyst-decision-center article > b { grid-column: 2; justify-self: start; }
  .analyst-deep-analysis { grid-template-columns: 1fr; padding: 12px; }
}

.territorial-problems-card { margin-top: 18px; }
.territorial-problem-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.territorial-problem-summary > div { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.territorial-problem-summary span, .territorial-problem-summary strong, .territorial-problem-summary small { display: block; }
.territorial-problem-summary span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.territorial-problem-summary strong { margin: 4px 0; color: var(--ink); font-size: 20px; }
.territorial-problem-summary small { color: var(--muted); font-size: 10px; }
.territorial-problem-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, .8fr); gap: 16px; }
.territorial-problem-layout h3 { margin: 0 0 10px; font-size: 13px; }
.territorial-hotspots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.territorial-hotspots article { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.territorial-hotspots article > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.territorial-hotspots article > div:first-child span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.territorial-hotspots h4 { margin: 7px 0 4px; font-size: 15px; }
.territorial-hotspots p { margin: 0; font-size: 13px; }
.territorial-hotspots small { color: var(--muted); font-size: 10px; }
.problem-platforms { display: flex; gap: 5px; margin-top: 8px; }
.problem-platforms i { padding: 3px 6px; border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 9px; font-style: normal; }
.territorial-hotspots details, .geo-reported-issues details { margin-top: 9px; }
.territorial-hotspots summary, .geo-reported-issues summary { color: var(--brand); font-size: 10px; cursor: pointer; }
.territorial-problem-layout > aside { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.territorial-problem-layout > aside > p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.problem-rank, .geo-issue-ranking > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.problem-rank span, .geo-issue-ranking span { font-size: 11px; }
.problem-rank strong, .geo-issue-ranking b { color: var(--brand); font-size: 11px; }
.territorial-evidence { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.territorial-evidence span, .territorial-evidence strong, .territorial-evidence small { display: block; }
.territorial-evidence strong { font-size: 10px; }
.territorial-evidence small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.territorial-evidence a { flex: 0 0 auto; color: var(--brand); font-size: 9px; }
.geo-reported-issues { margin-top: 12px; padding: 12px; border: 1px solid rgba(56, 189, 248, .18); border-radius: 12px; background: rgba(14, 116, 144, .08); }
.geo-reported-issues.unavailable { opacity: .78; }
.geo-reported-issues > p { margin-top: 9px; font-size: 10px; line-height: 1.45; }
.geo-issue-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: #94a3b8; font-size: 9px; }

@media (max-width: 820px) {
  .territorial-problem-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .territorial-problem-layout { grid-template-columns: 1fr; }
  .territorial-hotspots { grid-template-columns: 1fr; }
}

@keyframes analyst-message-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes analyst-thinking { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 1050px) {
  .analyst-workspace { grid-template-columns: minmax(0, 1fr) 285px; }
  .analyst-side { font-size: 90%; }
}

@media (max-width: 820px) {
  body.analyst-mode.analyst-sidebar-open .main-content { width: 100%; margin-left: 0; }
  body.analyst-mode.analyst-sidebar-open .sidebar { box-shadow: 24px 0 60px rgba(0, 0, 0, 0.6); }
  #section-analyst.active { min-height: 620px; overflow: auto; }
  .analyst-page-bar { padding: 0 14px; }
  .analyst-page-brand { position: static; transform: none; margin-right: auto; margin-left: 10px; }
  .analyst-live-pill { display: none; }
  #section-analyst .analyst-heading { width: calc(100% - 28px); margin-top: 14px; }
  .analyst-lock { display: none; }
  .analyst-workspace { width: 100%; grid-template-columns: 1fr; overflow: visible; }
  .analyst-console { min-height: 620px; }
  .analyst-side { overflow: visible; grid-template-columns: 1fr; }
  .source-head { display: none; }
  .source-row { grid-template-columns: minmax(120px, 1fr) 54px 90px 44px; }
  .source-row > span:nth-of-type(3), .source-row > em { display: none; }
  .source-focus-panel, .topic-focus-panel { grid-template-columns: repeat(2, 1fr); }
  .source-focus-panel > div:nth-child(2), .topic-focus-panel > div:nth-child(2) { border-right: 0; }
  .source-focus-panel > div:nth-child(-n+2), .topic-focus-panel > div:nth-child(-n+2) { border-bottom: 1px solid #e4ebf2; }
  .topic-command-row { grid-template-columns: 30px minmax(90px, 1fr) minmax(80px, 1fr) 42px; }
  .topic-command-row > em { display: none; }
  .poll-head { display: none; }
  .poll-row { grid-template-columns: 70px 1fr 1fr 65px; }
  .poll-row > span:nth-child(4), .poll-row > span:nth-child(6) { display: none; }
  .poll-focus { grid-template-columns: repeat(2, 1fr); }
  .poll-focus > div:nth-child(2) { border-right: 0; }
  .poll-focus > div:nth-child(-n+2) { border-bottom: 1px solid #e4ebf2; }
}

@media (max-width: 520px) {
  #section-analyst .analyst-heading h1 { font-size: 25px; }
  #section-analyst .analyst-heading p { display: none; }
  .analyst-console-head { grid-template-columns: 34px auto 34px; }
  .analyst-status { display: none; }
  .analyst-prompts, .analyst-composer { width: calc(100% - 24px); }
  .analyst-messages { padding-inline: 12px; }
  .analyst-factor-grid { grid-template-columns: 1fr; }
  .audience-tabs, .crisis-summary { grid-template-columns: 1fr; }
  .audience-tabs button { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .audience-tabs button small { grid-column: 1/3; }
  .source-row { grid-template-columns: minmax(110px, 1fr) 45px 75px; }
  .source-row > span:nth-of-type(2), .source-row > span:nth-of-type(3), .source-row > em { display: none; }
  .source-focus-panel, .topic-focus-panel, .emotion-focus, .critical-focus { grid-template-columns: 1fr; }
  .source-focus-panel > div, .topic-focus-panel > div { border-right: 0; border-bottom: 1px solid #e4ebf2; }
  .source-focus-panel > div:last-child, .topic-focus-panel > div:last-child { border-bottom: 0; }
  .topic-command-row { grid-template-columns: 28px minmax(90px, 1fr) 48px; }
  .topic-command-track, .topic-command-row > em { display: none; }
  .emotion-selector { grid-template-columns: 1fr; }
  .emotion-focus { text-align: center; }
  .emotion-orb { margin: 0 auto; }
  .critical-item { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .critical-item > em { display: none; }
  .poll-row { grid-template-columns: 64px minmax(100px, 1fr) 58px; }
  .poll-row > span:nth-child(3), .poll-row > span:nth-child(4), .poll-row > span:nth-child(6) { display: none; }
  .poll-focus { grid-template-columns: 1fr; }
  .poll-focus > div { border-right: 0; border-bottom: 1px solid #e4ebf2; }
  .poll-focus > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .analyst-message, .analyst-thinking .message-body > i { animation: none; }
  .main-content, .sidebar, .analyst-workspace { transition: none; }
}

/* Full-screen chat: the navigation changes only the outer viewport width. */
.analyst-workspace,
body.analyst-sidebar-open .analyst-workspace {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
}
.analyst-console { width: 100%; }

/* Political attributes: explicit associations with evidence, not a word cloud. */
.political-attributes-card { margin-bottom: 20px; padding: 21px; }
.political-attributes-card .card-heading small { display: block; margin-top: 3px; color: var(--ink-muted); font-size: 10px; }
.attribute-coverage { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 15px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.attribute-coverage > div { min-width: 0; padding: 11px 13px; border-right: 1px solid var(--line); }
.attribute-coverage > div:last-child { border-right: 0; }
.attribute-coverage strong, .attribute-coverage span { display: block; }
.attribute-coverage strong { color: var(--ink); font-size: 18px; letter-spacing: -.035em; }
.attribute-coverage span { margin-top: 2px; color: var(--ink-muted); font-size: 8px; line-height: 1.35; }
.political-attribute-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.attribute-column { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fbfdff; }
.attribute-column > header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.attribute-column > header > div { display: flex; align-items: center; gap: 8px; }
.attribute-column > header i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; font-size: 16px; font-style: normal; font-weight: 800; }
.attribute-column.positive > header i { color: #047857; background: #d1fae5; }
.attribute-column.negative > header i { color: #b91c1c; background: #fee2e2; }
.attribute-column > header span { color: var(--ink); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.attribute-column > header small { color: var(--ink-muted); font-size: 8px; }
.political-attribute-item { border-bottom: 1px solid var(--line); background: #fff; }
.political-attribute-item:last-child { border-bottom: 0; }
.political-attribute-item summary { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; list-style: none; cursor: pointer; }
.political-attribute-item summary::-webkit-details-marker { display: none; }
.political-attribute-item summary:hover { background: #f8fafc; }
.attribute-rank { min-width: 0; display: flex; align-items: center; gap: 9px; }
.attribute-rank > i { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; color: #64748b; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-style: normal; font-weight: 800; }
.political-attribute-item.positive[open] .attribute-rank > i { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.political-attribute-item.negative[open] .attribute-rank > i { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.attribute-rank strong, .attribute-rank small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attribute-rank strong { color: var(--ink); font-size: 11px; }
.attribute-rank small { margin-top: 3px; color: var(--ink-muted); font-size: 8px; }
.attribute-metric { text-align: right; }
.attribute-metric strong, .attribute-metric span { display: block; }
.attribute-metric strong { color: var(--ink); font-size: 16px; }
.attribute-metric span { margin-top: 2px; color: #64748b; font-size: 8px; white-space: nowrap; }
.attribute-metric span.up { color: #047857; }
.attribute-metric span.down { color: #b91c1c; }
.attribute-detail { padding: 0 13px 13px 47px; }
.attribute-association-bar { height: 5px; overflow: hidden; border-radius: 999px; background: #e9eef4; }
.attribute-association-bar span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: #10b981; }
.political-attribute-item.negative .attribute-association-bar span { background: #ef4444; }
.attribute-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 9px 0 12px; color: var(--ink-muted); font-size: 8px; }
.attribute-facts span:last-child { text-align: right; }
.attribute-facts b { color: var(--ink); font-weight: 700; }
.attribute-evidence-list > span { display: block; margin-bottom: 6px; color: var(--ink-muted); font-size: 7px; font-weight: 900; letter-spacing: .09em; }
.attribute-evidence-item { padding: 9px 0; border-top: 1px solid #edf1f5; }
.attribute-evidence-item > div, .attribute-evidence-item footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.attribute-evidence-item > div span { color: var(--brand); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.attribute-evidence-item > div small { color: var(--ink-muted); font-size: 7px; }
.attribute-evidence-item p { margin: 5px 0; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.attribute-evidence-item footer small { color: var(--ink-muted); font-size: 7px; }
.attribute-evidence-item footer small b { display: inline-block; margin-right: 3px; padding: 2px 4px; color: #475569; border-radius: 4px; background: #eef2f7; font-weight: 700; }
.attribute-evidence-item footer a { color: var(--brand); font-size: 8px; white-space: nowrap; }
.attribute-limitations { margin-top: 14px; padding: 11px 13px; border-left: 3px solid #f59e0b; border-radius: 8px; background: #fffbeb; }
.attribute-limitations > strong { display: block; margin-bottom: 4px; color: #92400e; font-size: 8px; letter-spacing: .08em; }
.attribute-limitations p { margin: 2px 0; color: #78350f; font-size: 9px; line-height: 1.4; }

@media (max-width: 900px) {
  .political-attribute-columns { grid-template-columns: 1fr; }
  .attribute-coverage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attribute-coverage > div { border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .attribute-coverage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attribute-detail { padding-left: 13px; }
  .attribute-facts { grid-template-columns: 1fr; }
  .attribute-facts span:last-child { text-align: left; }
}

/* Electoral decision strip: five model-backed KPIs, one desktop row. */
.electoral-kpi-section { margin: 0 0 18px; }
.electoral-kpi-section > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.electoral-kpi-section > header h2 { margin: 3px 0 0; color: var(--ink); font-size: 15px; letter-spacing: -.015em; }
.electoral-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
  border: 1px solid #dbe5ef;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}
.electoral-kpi-strip article {
  position: relative;
  min-width: 0;
  min-height: 126px;
  padding: 17px 16px 14px;
  border-right: 1px solid #e7edf4;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.electoral-kpi-strip article:last-child { border-right: 0; }
.electoral-kpi-strip article:hover, .electoral-kpi-strip article:focus-within { z-index: 70; }
.electoral-kpi-strip article::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #64748b; }
.electoral-kpi-strip article.tone-primary::before { background: #2563eb; }
.electoral-kpi-strip article.tone-positive::before { background: #10b981; }
.electoral-kpi-strip article.tone-warning::before { background: #f59e0b; }
.electoral-kpi-strip article.tone-negative::before { background: #ef4444; }
.electoral-kpi-strip article.is-unavailable::before { background: #cbd5e1; }
.electoral-kpi-strip article > span { display: block; min-height: 25px; color: #64748b; font-size: 8px; font-weight: 900; letter-spacing: .09em; line-height: 1.45; text-transform: uppercase; }
.electoral-kpi-info { position: relative; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border: 1px solid #94a3b8; border-radius: 50%; color: #64748b; font: 800 9px/1 system-ui, sans-serif; letter-spacing: 0; text-transform: none; cursor: help; vertical-align: middle; }
.electoral-kpi-info:hover, .electoral-kpi-info:focus-visible { border-color: #2563eb; color: #2563eb; outline: 2px solid rgba(37, 99, 235, .15); outline-offset: 2px; }
.electoral-kpi-info::after { content: attr(data-tooltip); position: absolute; left: 50%; top: calc(100% + 8px); bottom: auto; z-index: 80; width: 230px; padding: 9px 11px; border-radius: 9px; background: #0f172a; color: #f8fafc; box-shadow: 0 10px 30px rgba(15, 23, 42, .24); font: 500 11px/1.45 system-ui, sans-serif; letter-spacing: 0; text-align: left; text-transform: none; white-space: normal; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .14s ease, transform .14s ease, visibility .14s ease; }
.electoral-kpi-info::before { content: ""; position: absolute; left: 50%; top: calc(100% + 3px); bottom: auto; z-index: 81; width: 8px; height: 8px; background: #0f172a; opacity: 0; visibility: hidden; transform: translateX(-50%) rotate(45deg); transition: opacity .14s ease, visibility .14s ease; }
.electoral-kpi-info:hover::after, .electoral-kpi-info:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.electoral-kpi-info:hover::before, .electoral-kpi-info:focus-visible::before { opacity: 1; visibility: visible; }
.electoral-kpi-strip article:first-child .electoral-kpi-info::after { left: -8px; transform: translate(0, 4px); }
.electoral-kpi-strip article:first-child .electoral-kpi-info:hover::after, .electoral-kpi-strip article:first-child .electoral-kpi-info:focus-visible::after { transform: translate(0, 0); }
.electoral-kpi-strip article:last-child .electoral-kpi-info::after { right: -8px; left: auto; transform: translate(0, 4px); }
.electoral-kpi-strip article:last-child .electoral-kpi-info:hover::after, .electoral-kpi-strip article:last-child .electoral-kpi-info:focus-visible::after { transform: translate(0, 0); }
.electoral-kpi-strip article > strong { display: block; margin: 6px 0 5px; overflow: hidden; color: #0f172a; font-size: clamp(21px, 2vw, 29px); line-height: 1; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.electoral-kpi-strip article.is-unavailable > strong { color: #94a3b8; font-size: 15px; letter-spacing: -.02em; }
.electoral-kpi-strip article > small { display: block; color: #7c8ba1; font-size: 9px; line-height: 1.45; }
.electoral-kpi-strip.is-loading article > strong { color: #cbd5e1; }
.electoral-kpi-note { margin: 7px 2px 0; color: #64748b; font-size: 9px; line-height: 1.5; }

@media (max-width: 1050px) {
  .electoral-kpi-strip { grid-template-columns: repeat(5, minmax(175px, 1fr)); overflow-x: auto; }
  .electoral-kpi-strip article { border-right: 1px solid #e7edf4; }
}

@media (max-width: 680px) {
  .electoral-kpi-section > header { align-items: start; }
  .electoral-kpi-section > header .text-button { display: none; }
  .electoral-kpi-strip { margin-right: -14px; border-radius: 13px 0 0 13px; }
}

/* Executive daily brief: the overview is a decision surface, not an analytics catalog. */
.daily-brief { display: grid; gap: 14px; }
.daily-brief-lead { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 22px 24px; border: 1px solid rgba(56, 189, 248, .22); border-radius: 18px; background: linear-gradient(135deg, rgba(8, 47, 73, .96), rgba(15, 23, 42, .96)); color: #f8fafc; box-shadow: 0 18px 50px rgba(2, 8, 23, .18); }
.daily-brief-lead h2 { margin: 5px 0 3px; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.035em; }
.daily-brief-lead small { color: #94a3b8; }
.daily-brief-status { padding: 7px 10px; border: 1px solid rgba(52, 211, 153, .28); border-radius: 999px; color: #6ee7b7; background: rgba(16, 185, 129, .08); font-size: 9px; font-weight: 900; letter-spacing: .09em; white-space: nowrap; }
.daily-brief-status.warning { color: #fbbf24; border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .08); }
.daily-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.daily-brief-card { position: relative; min-height: 185px; padding: 21px 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
.daily-brief-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #38bdf8; }
.daily-brief-card.signal-threat::before { background: #ef4444; }
.daily-brief-card.signal-opportunity::before { background: #10b981; }
.daily-step { display: block; margin-bottom: 12px; color: var(--brand); font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.daily-brief-card h3 { margin: 0 0 9px; color: var(--ink); font-size: 19px; line-height: 1.22; }
.daily-brief-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.daily-change-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 15px; }
.daily-change-metrics > div { padding: 9px; border-radius: 9px; background: var(--surface-soft); }
.daily-change-metrics span, .daily-change-metrics strong { display: block; }
.daily-change-metrics span { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .06em; }
.daily-change-metrics strong { margin-top: 3px; font-size: 14px; }
.signal-certainty { display: inline-block; margin: -3px 0 10px; padding: 4px 7px; border-radius: 999px; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.signal-certainty.confirmed { color: #047857; background: #ecfdf5; }
.signal-certainty.unconfirmed { color: #b45309; background: #fffbeb; }
.daily-action, .daily-sample { grid-column: 1 / -1; }
.daily-action-meta { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 7px 11px; align-items: center; margin: 14px 0; padding: 11px; border-radius: 11px; background: var(--surface-soft); }
.daily-action-meta span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.daily-action-meta strong { font-size: 11px; }
.decision-hold { display: inline-block; margin-top: 12px; padding: 6px 9px; border-radius: 8px; color: #b45309; background: #fffbeb; font-size: 10px; font-style: normal; font-weight: 800; }
.daily-evidence-list { display: grid; gap: 8px; }
.daily-evidence-list > article { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.evidence-source { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.evidence-source > span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.daily-evidence-list article > strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 11px; }
.daily-evidence-list p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.daily-evidence-list footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.daily-evidence-list footer small { color: var(--muted); font-size: 8px; }
.daily-evidence-list a { color: var(--brand); font-size: 9px; white-space: nowrap; }
.daily-sample-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.daily-processing-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 9px; }
.daily-processing-metrics > div { padding: 11px; border: 1px solid #dbeafe; border-radius: 11px; background: #eff6ff; }
.daily-processing-metrics strong, .daily-processing-metrics span { display: block; }
.daily-processing-metrics strong { color: #1d4ed8; font-size: 20px; }
.daily-processing-metrics span { margin-top: 3px; color: #64748b; font-size: 9px; }
.daily-processing-status { margin: 0 0 10px !important; padding: 8px 10px; border-radius: 9px; font-size: 10px !important; }
.daily-processing-status.complete { color: #047857; background: #ecfdf5; }
.daily-processing-status.warning { color: #b45309; background: #fffbeb; }
.daily-source-freshness { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.daily-source-freshness > div { padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.daily-source-freshness strong, .daily-source-freshness span, .daily-source-freshness small { display: block; }
.daily-source-freshness strong { color: var(--ink); font-size: 11px; }
.daily-source-freshness span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.daily-source-freshness small { margin-top: 4px; color: var(--brand); font-size: 8px; }
.daily-sample-metrics > div { padding: 11px; border-radius: 11px; background: var(--surface-soft); }
.daily-sample-metrics strong, .daily-sample-metrics span { display: block; }
.daily-sample-metrics strong { color: var(--ink); font-size: 19px; }
.daily-sample-metrics span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.daily-sample ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sample-balance { display: grid; gap: 8px; margin: 12px 0; }
.sample-balance > div { display: grid; grid-template-columns: 150px 1fr 38px; align-items: center; gap: 9px; }
.sample-balance span { color: var(--muted); font-size: 9px; }
.sample-balance i { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.sample-balance i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #2563eb); }
.sample-balance strong { font-size: 10px; text-align: right; }

@media (max-width: 820px) {
  .analyst-workspace { width: 100%; padding: 0; }
  .daily-brief-grid { grid-template-columns: 1fr; }
  .daily-action, .daily-sample { grid-column: auto; }
  .daily-sample-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-processing-metrics, .daily-source-freshness { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-change-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Pulso Analyst dock: one persistent decision assistant across every screen. */
.pulso-analyst-dock {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 86;
  width: min(430px, calc(100vw - 44px));
  color: #e2e8f0;
  filter: drop-shadow(0 18px 28px rgba(2, 6, 23, .25));
}

.pulso-dock-bar {
  position: relative;
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 8px 12px 8px 9px;
  overflow: hidden;
  color: #f8fafc;
  text-align: left;
  border: 1px solid rgba(56, 189, 248, .38);
  border-radius: 18px;
  background: linear-gradient(112deg, rgba(7, 20, 38, .98), rgba(13, 35, 58, .98) 56%, rgba(8, 47, 73, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 50px rgba(2, 8, 23, .28);
  cursor: pointer;
  isolation: isolate;
}

.pulso-dock-bar:hover { border-color: rgba(56, 189, 248, .68); }
.pulso-dock-bar:focus-visible, .pulso-dock-panel button:focus-visible, .pulso-dock-panel textarea:focus-visible { outline: 3px solid rgba(56, 189, 248, .4); outline-offset: 2px; }
.pulso-dock-copy { min-width: 0; }
.pulso-dock-copy strong, .pulso-dock-copy small { display: block; }
.pulso-dock-copy strong { font-size: 14px; letter-spacing: -.01em; }
.pulso-dock-copy small { margin-top: 2px; overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pulso-dock-open { display: flex; align-items: center; gap: 7px; padding-left: 11px; color: #7dd3fc; border-left: 1px solid rgba(148, 163, 184, .2); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pulso-dock-open b { font-size: 15px; transition: transform .22s ease; }
.pulso-analyst-dock.is-open .pulso-dock-open b { transform: rotate(180deg); }

.pulso-dock-monogram {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 15px;
  background: radial-gradient(circle at 50% 55%, rgba(14, 165, 233, .25), rgba(14, 165, 233, .04) 65%);
  color: #7dd3fc;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.05em;
}

.pulso-dock-panel {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 19px;
  background: rgba(7, 18, 34, .985);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 70px rgba(2, 6, 23, .45);
  transform-origin: bottom right;
  animation: pulso-dock-enter .22s ease-out both;
}
.pulso-dock-head { min-height: 65px; display: grid; grid-template-columns: 42px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid rgba(148, 163, 184, .14); background: linear-gradient(110deg, rgba(15, 37, 60, .92), rgba(7, 18, 34, .92)); }
.pulso-dock-head .pulso-dock-monogram { width: 42px; height: 42px; border-radius: 13px; }
.pulso-dock-head strong, .pulso-dock-head small { display: block; }
.pulso-dock-head strong { color: #fff; font-size: 13px; }
.pulso-dock-head small { margin-top: 1px; color: #7dd3fc; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.pulso-dock-head > button { width: 30px; height: 30px; padding: 0; color: #94a3b8; border: 1px solid rgba(148, 163, 184, .16); border-radius: 9px; background: rgba(15, 23, 42, .55); cursor: pointer; }
.pulso-dock-head > button:hover { color: #fff; border-color: rgba(125, 211, 252, .5); }

.pulso-dock-messages { height: min(340px, calc(100vh - 300px)); min-height: 190px; padding: 14px; overflow-y: auto; scrollbar-color: #334155 transparent; }
.pulso-dock-message { display: flex; gap: 8px; margin-bottom: 10px; animation: pulso-dock-message-in .18s ease-out both; }
.pulso-dock-message.user { justify-content: flex-end; }
.pulso-dock-bubble { max-width: 88%; padding: 10px 11px; border: 1px solid rgba(148, 163, 184, .15); border-radius: 5px 13px 13px 13px; background: rgba(30, 41, 59, .62); }
.pulso-dock-message.user .pulso-dock-bubble { color: #e0f2fe; border-color: rgba(56, 189, 248, .25); border-radius: 13px 5px 13px 13px; background: rgba(3, 105, 161, .26); }
.pulso-dock-bubble > span { display: block; margin-bottom: 3px; color: #7dd3fc; font-size: 7px; font-weight: 900; letter-spacing: .11em; }
.pulso-dock-bubble p { margin: 0; color: #e2e8f0; font-size: 11px; line-height: 1.5; }
.pulso-dock-bubble footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: #94a3b8; font-size: 8px; }
.pulso-dock-bubble footer button { padding: 5px 7px; color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .24); border-radius: 7px; background: rgba(14, 165, 233, .08); cursor: pointer; }
.pulso-dock-thinking { display: flex; gap: 4px; align-items: center; min-height: 17px; }
.pulso-dock-thinking i { width: 5px; height: 5px; border-radius: 50%; background: #38bdf8; animation: pulso-thinking 1s ease-in-out infinite; }
.pulso-dock-thinking i:nth-child(2) { animation-delay: .13s; }
.pulso-dock-thinking i:nth-child(3) { animation-delay: .26s; }
.pulso-dock-empty { display: grid; place-items: center; height: 100%; padding: 18px; color: #94a3b8; text-align: center; font-size: 11px; }

.pulso-dock-prompts { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; }
.pulso-dock-prompts button { flex: 0 0 auto; padding: 6px 8px; color: #bae6fd; border: 1px solid rgba(56, 189, 248, .2); border-radius: 999px; background: rgba(14, 165, 233, .07); font-size: 8px; cursor: pointer; }
.pulso-dock-prompts button:hover { background: rgba(14, 165, 233, .15); }
.pulso-dock-composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 11px; padding: 8px; border: 1px solid rgba(148, 163, 184, .2); border-radius: 13px; background: rgba(15, 23, 42, .78); }
.pulso-dock-composer textarea { min-height: 40px; max-height: 96px; padding: 3px 4px; resize: vertical; color: #f8fafc; border: 0; outline: 0; background: transparent; font-size: 11px; line-height: 1.45; }
.pulso-dock-composer textarea::placeholder { color: #64748b; }
.pulso-dock-composer button { align-self: end; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; color: #fff; border: 0; border-radius: 9px; background: linear-gradient(135deg, #0284c7, #2563eb); font-size: 9px; font-weight: 800; cursor: pointer; }
.pulso-dock-composer button.is-stopping { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.pulso-dock-composer button:disabled { opacity: .58; cursor: wait; }
.pulso-dock-panel > footer { display: flex; align-items: center; gap: 6px; padding: 9px 13px 11px; color: #64748b; font-size: 8px; }
.pulso-dock-panel > footer i { width: 5px; height: 5px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, .7); }

@keyframes brand-wave-travel { to { stroke-dashoffset: -60; } }
@keyframes brand-wave-halo { 0% { opacity: .8; transform: scale(.38); } 72%, 100% { opacity: 0; transform: scale(1.48); } }
@keyframes brand-wave-baseline { 0%, 100% { opacity: .22; transform: scaleX(.35); } 50% { opacity: .7; transform: scaleX(1); } }
@keyframes pulso-dock-enter { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pulso-dock-message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pulso-thinking { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 680px) {
  .pulso-analyst-dock { right: 10px; bottom: 9px; width: calc(100vw - 20px); }
  .pulso-dock-panel { max-height: calc(100vh - 92px); }
  .pulso-dock-messages { height: min(300px, calc(100vh - 315px)); min-height: 150px; }
  .pulso-dock-bar { min-height: 60px; grid-template-columns: 44px minmax(0, 1fr) auto; border-radius: 15px; }
  .pulso-dock-bar .pulso-dock-monogram { width: 42px; height: 42px; }
  .pulso-dock-open { padding-left: 8px; font-size: 0; }
  .pulso-dock-open b { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-wave-signal, .brand-wave-halo, .brand::after,
  .pulso-dock-panel, .pulso-dock-message, .pulso-dock-thinking i,
  .section-wave-signal, .section-loader-mark::before,
  .section-loader-mark::after, .section-loader-mark > span { animation: none; }
}

/* Scroll performance: keep fixed chrome on compositor layers and avoid
   painting complex dashboard blocks until they approach the viewport. */
.topbar {
  background: #ffffff;
  backdrop-filter: none;
  contain: paint;
  transform: translateZ(0);
}

.sidebar,
.pulso-analyst-dock {
  transform: translateZ(0);
}

.pulso-analyst-dock {
  filter: none;
}

.page-section.active:not(#section-analyst) > .electoral-kpi-section,
.page-section.active:not(#section-analyst) > .daily-brief,
.page-section.active:not(#section-analyst) > .card,
.page-section.active:not(#section-analyst) > .dashboard-grid,
.page-section.active:not(#section-analyst) > .metric-grid {
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.sidebar-logout { width: calc(100% - 28px); margin: 8px 14px 10px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; color: #cbd5e1; background: transparent; border: 1px solid rgba(148, 163, 184, .22); border-radius: 10px; font: inherit; font-weight: 600; text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.sidebar-logout:hover, .sidebar-logout:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); outline: none; }
.sidebar-logout:disabled { opacity: .55; cursor: wait; }
.sidebar-logout.is-loading .nav-icon { animation: spin .8s linear infinite; }

.user-head,.user-row{grid-template-columns:minmax(180px,1.4fr) 90px 90px minmax(150px,1fr) 90px}.user-delete-button{border:1px solid #fecaca;border-radius:9px;background:#fff7f7;color:#c53030;padding:8px 10px;font-weight:750;cursor:pointer}.user-delete-button:hover{background:#fee2e2}.user-delete-button:disabled{opacity:.35;cursor:not-allowed}@media(max-width:720px){.user-head{display:none}.user-row{grid-template-columns:1fr auto}.user-delete-button{grid-column:2;grid-row:1/3}}

/* ========================================================================== 
   SIDEBAR COMMAND NAVIGATION — steel, signal and operational hierarchy
   ========================================================================== */
:root { --sidebar: 276px; }

.sidebar {
  color: #e8f0f7;
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 112, 163, .16), transparent 28%),
    linear-gradient(180deg, #08131e 0%, #0b1723 46%, #09131d 100%);
  border-right-color: rgba(127, 174, 205, .14);
  box-shadow: 18px 0 55px rgba(3, 10, 17, .11);
}

.brand {
  height: 72px;
  padding: 0 18px;
  gap: 11px;
  border-bottom-color: rgba(142, 187, 216, .11);
}
.brand strong { font-size: 14px; font-weight: 780; letter-spacing: .18em; }
.brand small { color: #7890a3; font-size: 8px; letter-spacing: .19em; }
.brand-mark { width: 38px; height: 36px; flex-basis: 38px; }
.brand-wave-mark { border-color: rgba(57, 189, 239, .16); border-radius: 10px; background: rgba(12, 42, 60, .5); }
.brand-wave-mark svg { width: 31px; }
.brand-wave-signal { stroke: #58d0fa; }
.brand::after { right: 18px; left: 18px; opacity: .38; }

.candidate-switcher {
  margin: 12px 12px 7px;
  padding: 12px;
  border: 1px solid rgba(135, 180, 208, .13);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(23, 46, 64, .86), rgba(12, 28, 42, .78));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 12px 28px rgba(0, 0, 0, .12);
}
.candidate-switcher > label {
  margin: 0 1px 7px;
  color: #7490a5;
  font-size: 8px;
  letter-spacing: .16em;
}
.select-row { gap: 5px; }
.select-row select {
  height: 34px;
  padding: 0 9px;
  border-color: rgba(142, 188, 216, .14);
  border-radius: 8px;
  background: rgba(6, 17, 27, .48);
  color: #e8f3fa;
}
.select-row select:focus { border-color: #3bb7e8; box-shadow: 0 0 0 3px rgba(59, 183, 232, .1); }
.icon-button {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  border-color: rgba(142, 188, 216, .14);
  border-radius: 8px;
  background: rgba(6, 17, 27, .48);
  color: #92a9ba;
  font-size: 13px;
}
.icon-button:hover { color: #fff; background: rgba(39, 147, 195, .24); border-color: rgba(88, 208, 250, .42); transform: none; }
.candidate-mini {
  margin-top: 9px;
  padding: 7px 3px 1px;
  gap: 9px;
  border: 0;
  background: transparent;
}
.candidate-mini .avatar {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(103, 211, 250, .25);
  border-radius: 9px;
  color: #dff7ff;
  background: linear-gradient(145deg, #17658b, #113d58);
  box-shadow: 0 0 0 3px rgba(55, 187, 235, .05);
}
.candidate-mini strong { max-width: 180px; color: #f3f8fb; font-size: 11.5px; font-weight: 680; }
.candidate-mini small { color: #7890a2; font-size: 9px; }
.assigned-candidate-name { color: #eef7fc !important; font-size: 12px !important; }

.main-nav {
  position: relative;
  padding: 5px 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(106, 159, 190, .22) transparent;
}
.main-nav::-webkit-scrollbar { width: 4px; }
.main-nav::-webkit-scrollbar-thumb { border-radius: 4px; background: rgba(106, 159, 190, .22); }
.nav-group { position: relative; margin: 0 0 8px; padding: 17px 0 0; }
.nav-group + .nav-group { border-top: 1px solid rgba(128, 169, 195, .08); }
.nav-group:first-child { padding-top: 8px; }
.nav-group-label {
  display: block;
  padding: 0 11px 6px;
  color: #587185;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1;
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  height: 35px;
  margin: 1px 0;
  padding: 0 10px;
  gap: 9px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #8ba0b1;
  font-size: 11.5px;
  font-weight: 540;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.nav-item:hover {
  color: #e9f4fa;
  border-color: rgba(134, 181, 208, .1);
  background: rgba(115, 166, 197, .07);
}
.nav-item.active {
  color: #f4fbff;
  border: 1px solid rgba(70, 185, 230, .18);
  background: linear-gradient(90deg, rgba(25, 116, 157, .22), rgba(29, 73, 98, .1));
  font-weight: 670;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 2px;
  background: #66d8ff;
  box-shadow: 0 0 9px rgba(102, 216, 255, .85);
}
.nav-item.active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #7ce1ff;
  box-shadow: 0 0 8px #42c8f2;
  transform: translateY(-50%);
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border: 1px solid rgba(133, 174, 199, .1);
  border-radius: 7px;
  color: #668095;
  background: rgba(5, 15, 24, .28);
  font-size: 11px;
  font-weight: 750;
}
.nav-item:hover .nav-icon { color: #b9d4e3; border-color: rgba(125, 191, 222, .18); }
.nav-item.active .nav-icon { color: #7adeff; border-color: rgba(92, 205, 247, .22); background: rgba(31, 135, 178, .13); }
.nav-badge {
  min-width: 19px;
  padding: 2px 6px;
  border: 1px solid rgba(251, 113, 133, .2);
  border-radius: 6px;
  color: #ffb4bf;
  background: rgba(190, 42, 64, .16);
  font-size: 9px;
  line-height: 1.2;
}
.nav-badge.amber { color: #f6cf86; border-color: rgba(240, 181, 76, .18); background: rgba(161, 106, 20, .14); }
.nav-badge:empty { display: none; }
.nav-divider { display: none; }

.sidebar-status {
  margin: 2px 12px 7px;
  padding: 10px 11px;
  border: 1px solid rgba(88, 158, 190, .12);
  border-radius: 10px;
  background: rgba(9, 26, 39, .7);
}
.status-line { gap: 9px; }
.status-line strong { color: #dceaf2; font-size: 10px; font-weight: 680; }
.status-line small { color: #657f92; font-size: 9px; }
.live-dot { width: 6px; height: 6px; background: #4ed6a1; box-shadow: 0 0 0 3px rgba(78, 214, 161, .08), 0 0 9px rgba(78, 214, 161, .35); }
.system-bars { gap: 4px; margin-top: 8px; }
.system-bars span { height: 1px; background: rgba(119, 161, 185, .1); }
.system-bars span:nth-child(-n+3) { background: rgba(78, 214, 161, .45); }
.sidebar-logout {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  color: #667f91;
  background: transparent;
  font-size: 10.5px;
  font-weight: 580;
}
.sidebar-logout .nav-icon { border-color: transparent; background: transparent; }
.sidebar-logout:hover, .sidebar-logout:focus-visible { color: #dceaf2; border-color: transparent; background: rgba(128, 169, 195, .07); }

@media (max-height: 800px) and (min-width: 1001px) {
  .brand { height: 62px; }
  .candidate-switcher { margin-top: 8px; padding: 9px; }
  .candidate-mini { display: none; }
  .nav-group { margin-bottom: 4px; padding-top: 10px; }
  .nav-group-label { padding-bottom: 4px; }
  .nav-item { height: 31px; }
  .nav-icon { width: 21px; height: 21px; flex-basis: 21px; }
  .sidebar-status { padding: 7px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item, .nav-item::before, .nav-item::after { transition: none; }
}
