* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa; color: #1a1a2e;
  height: 100vh; overflow: hidden;
}
.app-shell { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
.app-body { display: flex; height: 100vh; min-height: 0; }

/* ── Top header + flat nav ── */
.app-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; background: #fff; border-bottom: 1px solid #e5e8ec; flex-shrink: 0;
}
.brand { font-size: 16px; font-weight: 700; color: #16213e; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.brand-mark { color: #4ecca3; }
.main-nav { display: flex; gap: 4px; flex-shrink: 0; }
.nav-btn {
  padding: 6px 14px; border: 1px solid transparent; background: transparent; color: #555;
  border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s;
}
.nav-btn:hover { background: #f0f2f5; color: #1a1a2e; }
.nav-btn.active { background: #1a1a2e; color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.header-api-key {
  width: 160px; padding: 5px 32px 5px 10px; border: 1px solid #d0d4da; border-radius: 6px;
  font-size: 12px; background: #fff; color: #1a1a2e;
}
.api-key-wrap { position: relative; display: flex; align-items: center; }
.api-key-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: #888; cursor: pointer;
  font-size: 14px; padding: 2px 6px; line-height: 1;
}
.api-key-toggle:hover { color: #1a1a2e; }

/* Toasts + boot banner */
.toast-root { position: fixed; bottom: 88px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  padding: 12px 18px; border-radius: 10px; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); opacity: 0; transform: translateY(8px);
  transition: opacity .25s, transform .25s; max-width: 320px; pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #e3f6ef; border: 1px solid #b6e6d4; color: #1a5c45; }
.toast-error { background: #fde8eb; border: 1px solid #f7c8d2; color: #8b1e32; }
.toast-info { background: #fff; border: 1px solid #d0d4da; color: #1a1a2e; }
.boot-banner {
  position: fixed; top: 48px; left: 50%; transform: translateX(-50%); z-index: 250;
  padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: #16213e; color: #7fe6c4; border: 1px solid rgba(78,204,163,0.35);
  box-shadow: 0 4px 20px rgba(0,0,0,.2); display: none;
}
.boot-banner.show { display: block; }

/* Rich empty states inside charts / health */
.chart-empty.chart-empty-rich,
.health-empty.health-empty-rich {
  pointer-events: auto; padding: 28px 20px; text-align: center;
  flex-direction: column; align-items: center; justify-content: center;
}
.chart-empty.chart-empty-rich .empty-state,
.health-empty.health-empty-rich .empty-state {
  background: transparent; border: none; padding: 0; max-width: 420px;
}
.health-empty.health-empty-rich .empty-state { background: #f7f8fa; border: 1px dashed #d0d4da; padding: 24px; border-radius: 12px; }

/* Process drawer polish */
.drawer-empty { line-height: 1.7; }
.process-card-actions {
  display: flex; gap: 6px; margin-top: 8px;
}
.process-card-actions button {
  flex: 1; padding: 5px 8px; border-radius: 6px; font-size: 10px; font-weight: 600;
  cursor: pointer; font-family: inherit; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06); color: #b8c4e0;
}
.process-card-actions button:hover { border-color: #4ecca3; color: #7fe6c4; }
.process-card-actions .pc-view { background: rgba(78,204,163,0.15); border-color: rgba(78,204,163,0.35); color: #7fe6c4; }

@media (max-width: 1100px) {
  .filter-group label { display: none; }
  .header-api-key { width: 120px; }
}
@media (max-width: 860px) {
  .app-header { padding: 6px 10px; gap: 8px; }
  .main-nav { order: 3; flex-basis: 100%; }
  .header-actions { margin-left: 0; }
}
.app-main { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.landing-inner { max-width: 980px; margin: 0 auto; padding: 36px 40px 56px; position: relative; z-index: 1; }

/* ── Active filter bar ── */
.filter-context-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 16px; background: #eef1f6; border-bottom: 1px solid #dde2ea; flex-shrink: 0;
  min-height: 34px;
}
.filter-context-bar:empty { display: none; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: #fff; border: 1px solid #d0d4da; color: #1a1a2e;
}
.filter-pill-icon { color: #4ecca3; font-size: 11px; }
.filter-clear {
  border: none; background: transparent; color: #666; font-size: 12px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.filter-clear:hover { color: #e94560; background: rgba(233,69,96,0.08); }

/* ── Pretty Home landing ── */
.overview-landing {
  flex: 1; min-height: 0; overflow-y: auto; position: relative;
  background: #0f1629; color: #fff;
}
.landing-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(78,204,163,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(99,130,255,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(78,204,163,0.08) 0%, transparent 45%),
    linear-gradient(165deg, #0f1629 0%, #16213e 40%, #1a2744 100%);
}
.landing-hero { text-align: center; margin-bottom: 32px; }
.hero-badge {
  display: inline-block; margin-bottom: 14px; padding: 5px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  background: rgba(78,204,163,0.12); border: 1px solid rgba(78,204,163,0.35); color: #7fe6c4;
}
.landing-hero h1 {
  font-size: clamp(28px, 4vw, 38px); font-weight: 800; line-height: 1.15;
  margin-bottom: 12px; letter-spacing: -.02em;
}
.hero-accent {
  background: linear-gradient(90deg, #4ecca3, #7fe6c4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-hero p {
  font-size: 15px; color: #a8b8d8; max-width: 520px; margin: 0 auto 16px; line-height: 1.65;
}
.landing-filter-pill {
  display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #b8c4e0;
}

/* Onboarding banner */
.onboarding-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 28px; padding: 14px 18px; border-radius: 12px;
  background: rgba(78,204,163,0.1); border: 1px solid rgba(78,204,163,0.3);
}
.onboarding-content { font-size: 13px; color: #cfd8ec; line-height: 1.55; }
.onboarding-content strong { color: #fff; }
.onboarding-content em { color: #7fe6c4; font-style: normal; font-weight: 600; }
.onboarding-dismiss {
  flex-shrink: 0; padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(78,204,163,0.5);
  background: rgba(78,204,163,0.15); color: #7fe6c4; font-size: 12px; font-weight: 600; cursor: pointer;
}
.onboarding-dismiss:hover { background: rgba(78,204,163,0.25); }

/* Glass AI panel */
.glass-panel {
  border-radius: 16px; padding: 20px 22px; margin-bottom: 32px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.panel-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: #7fe6c4; margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}
.panel-label-mark { font-size: 14px; }
.ov-chat-panel .ov-chat { max-width: none; margin: 0; }

/* ── Home KPI strip ── */
.ov-kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px;
}
@media (max-width: 720px) { .ov-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.ov-kpi {
  text-align: center; padding: 18px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  transition: border-color .15s, transform .15s;
}
.ov-kpi:hover { border-color: rgba(78,204,163,0.35); transform: translateY(-1px); }
.ov-kpi-val { font-size: 30px; font-weight: 800; color: #4ecca3; line-height: 1.1; }
.ov-kpi-lbl { font-size: 11px; color: #e8edf7; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; font-weight: 600; }
.ov-kpi-hint { font-size: 10px; color: #7a8aa8; margin-top: 4px; }

/* ── Workflow cards (shared pattern) ── */
.wf-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
.wf-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px; border-radius: 14px; text-align: left;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.wf-card-dark {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); color: #fff;
}
.wf-card-dark:hover { transform: translateY(-2px); border-color: rgba(78,204,163,0.4); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.wf-card-light {
  background: #fff; border: 1px solid #e5e8ec; color: #1a1a2e;
}
.wf-card-light:hover { border-color: #4ecca3; box-shadow: 0 4px 16px rgba(78,204,163,0.12); }
.wf-card-top { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.wf-app { font-size: 10px; font-weight: 700; color: #4ecca3; text-transform: uppercase; letter-spacing: .4px; }
.wf-card-light .wf-app { color: #2f9c77; }
.wf-name { font-size: 15px; font-weight: 600; line-height: 1.35; flex: 1; min-width: 0; word-break: break-word; }
.wf-meta { font-size: 12px; color: #8a98b8; margin-top: 2px; }
.wf-card-light .wf-meta { color: #888; }
.wf-card-actions { display: flex; gap: 8px; margin-top: auto; }
.wf-btn {
  flex: 1; padding: 7px 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s;
}
.wf-btn-view {
  background: rgba(78,204,163,0.15); border: 1px solid rgba(78,204,163,0.4); color: #7fe6c4;
}
.wf-btn-view:hover { background: rgba(78,204,163,0.28); }
.wf-card-light .wf-btn-view { background: #e3f6ef; border-color: #b6e6d4; color: #2f9c77; }
.wf-card-light .wf-btn-view:hover { background: #d0f0e4; }
.wf-btn-ask {
  background: transparent; border: 1px solid rgba(255,255,255,0.18); color: #b8c4e0;
}
.wf-btn-ask:hover { border-color: rgba(255,255,255,0.35); color: #fff; }
.wf-card-light .wf-btn-ask { border-color: #d0d4da; color: #555; background: #f7f8fa; }
.wf-card-light .wf-btn-ask:hover { border-color: #4ecca3; color: #2f9c77; }

/* Needs-attention callout (enhanced) */
.ov-callout {
  padding: 18px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
}
.ov-callout-warn { border-color: rgba(233,69,96,0.4); background: rgba(233,69,96,0.08); }
.ov-callout-ok { border-color: rgba(78,204,163,0.35); background: rgba(78,204,163,0.08); }
.ov-callout-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ov-callout-name { font-size: 16px; font-weight: 700; color: #fff; }
.ov-callout-vol { font-size: 12px; color: #b8c4e0; margin-left: auto; }
.ov-callout-reason { font-size: 12px; color: #f3a93c; font-weight: 600; margin-bottom: 6px; }
.ov-callout-narr { font-size: 13px; line-height: 1.65; color: #cfd8ec; margin-bottom: 14px; }
.ov-callout-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Empty states */
.empty-state {
  text-align: center; padding: 36px 24px; border-radius: 14px;
  background: #f7f8fa; border: 1px dashed #d0d4da;
}
.empty-state-dark {
  background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.12); color: #b8c4e0;
}
.empty-state-compact { padding: 24px 20px; }
.empty-icon { font-size: 28px; margin-bottom: 10px; opacity: .7; }
.empty-title { font-size: 15px; font-weight: 700; color: inherit; margin-bottom: 6px; }
.empty-state:not(.empty-state-dark) .empty-title { color: #1a1a2e; }
.empty-state-dark .empty-title { color: #e8edf7; }
.empty-message { font-size: 13px; line-height: 1.6; color: #888; max-width: 420px; margin: 0 auto; }
.empty-state-dark .empty-message { color: #8a98b8; }
.empty-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.empty-action {
  padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid #d0d4da; background: #fff; color: #555; font-family: inherit;
}
.empty-action:hover { border-color: #4ecca3; color: #2f9c77; }
.empty-action-primary {
  background: #4ecca3; border-color: #4ecca3; color: #0f2a22;
}
.empty-action-primary:hover { background: #5fd6b1; border-color: #5fd6b1; color: #0f2a22; }
.empty-state-dark .empty-action { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: #cfd8ec; }
.empty-state-dark .empty-action:hover { border-color: #4ecca3; color: #7fe6c4; }
.overview-landing .empty-state-dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-style: solid;
  text-align: left;
}

/* Landing — pending / skeleton states (match glass callout aesthetic) */
.ov-callout-pending {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  cursor: default;
}
.ov-callout-pending:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.ov-pending-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ecca3; flex-shrink: 0;
  animation: pulse-glow 1.4s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.05); box-shadow: 0 0 10px rgba(78,204,163,0.55); }
}
.ov-pending-label { font-size: 13px; font-weight: 600; color: #cfd8ec; }
.ov-pending-sub { font-size: 12px; color: #7a8aa8; line-height: 1.55; margin: 0; }

.wf-card-skeleton {
  padding: 18px; border-radius: 14px; min-height: 108px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
}
.skel-bar {
  height: 10px; border-radius: 6px; margin-bottom: 12px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.09) 45%, rgba(255,255,255,0.03) 90%);
  background-size: 220% 100%;
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
.skel-bar.w35 { width: 35%; }
.skel-bar.w55 { width: 55%; }
.skel-bar.w80 { width: 80%; }
.skel-actions { display: flex; gap: 8px; margin-top: 4px; }
.skel-btn {
  flex: 1; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
@keyframes skel-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.ov-callout-warn, .ov-callout-ok { cursor: default; }
.ov-callout-warn:hover, .ov-callout-ok:hover { transform: none; }
.chat-context-label {
  padding: 6px 16px; font-size: 11px; color: #8a98b8; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.12);
}
.chat-context-label:empty { display: none; }

.landing-section h3.landing-section-title { font-size: 13px; margin-bottom: 12px; }

/* ── View AI bars (Workflows / Activity / Health) ── */
.view-ai-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 22px; background: #f7f8fa; border-bottom: 1px solid #e5e8ec; flex-shrink: 0;
}
.view-ai-bar .view-ai-input { flex: 1; min-width: 200px; }
.view-ai-bar .view-ai-suggestions { flex-basis: 100%; margin-top: 0; }
.insights-body, .holistic-body, .health-body { flex: 1; min-height: 0; overflow: auto; }
.insights-view, .holistic-view, .health-view { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; }
.insights-body { padding: 18px 22px; }
.holistic-body { padding: 18px 22px; }
.health-body { padding: 18px 22px; display: flex; flex-direction: column; }

/* ── Process graph drill-down panel ── */
.view-graph-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.view-graph-panel #cy { flex: 1; min-height: 0; margin: 12px; }
.view-graph-panel .graph-landing { flex: 1; min-height: 0; margin: 12px; }

/* ── Process browser drawer ── */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 150;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.process-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(380px, 92vw);
  z-index: 160; background: #16213e; color: #fff;
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .25s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.25);
}
.process-drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.drawer-header h2 { font-size: 15px; font-weight: 600; color: #4ecca3; }
.drawer-close {
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #cfd8ec;
  border-radius: 6px; width: 30px; height: 30px; font-size: 14px; cursor: pointer;
}
.drawer-close:hover { background: rgba(233,69,96,0.2); border-color: #e94560; color: #fff; }
.process-drawer .sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }
.process-drawer .stats-strip { padding: 10px 16px; }

/* ── AI slide-over + FAB ── */
.chat-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  z-index: 200; background: linear-gradient(160deg, #16213e 0%, #1f2d52 55%, #243b66 100%);
  display: flex; flex-direction: column; color: #fff;
  transform: translateX(100%); transition: transform .25s ease, width .25s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,.25);
}
.chat-drawer.open { transform: translateX(0); }
.chat-drawer.expanded { width: 100vw; }
.chat-drawer-actions { display: flex; gap: 6px; }
.ai-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 120;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: #4ecca3; color: #0f2a22; font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(78,204,163,0.4); transition: transform .15s, background .15s;
}
.ai-fab:hover { background: #5fd6b1; transform: scale(1.05); }
.ai-fab.hidden { display: none; }

.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group label {
  font-size: 11px; font-weight: 600; color: #888; text-transform: uppercase;
  letter-spacing: .3px; white-space: nowrap;
}
.filter-group select, .filter-group input[type=date] {
  padding: 5px 8px; border: 1px solid #d0d4da; border-radius: 6px; font-size: 12px;
  background: #fff; color: #1a1a2e;
}
.filter-group select { max-width: 180px; }
.filter-sep { color: #bbb; font-size: 11px; }

.sidebar-toggle-btn {
  flex-shrink: 0; padding: 6px 9px; border: 1px solid #d0d4da; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 12px; color: #555; line-height: 1;
}
.sidebar-toggle-btn:hover { background: #f0f2f5; border-color: #bbb; }

/* Sidebar */
.sidebar {
  width: 350px; background: #16213e; color: white;
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: width .2s ease, margin .2s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 0; border-right: none; }
.sidebar-search-row { padding: 0 12px 8px; }
.sidebar-search-row input {
  width: 100%; padding: 6px 10px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); border-radius: 6px; color: white; font-size: 12px;
}
.sidebar-search-row input::placeholder { color: #888; }
.process-card.hidden-by-search, .domain-group.hidden-by-search, .link-card.hidden-by-search { display: none; }
.graph-search-input {
  padding: 4px 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 12px; width: 180px;
}
.graph-search-input:focus { outline: none; border-color: #4ecca3; }
.sidebar-header {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h1 { font-size: 18px; color: #4ecca3; margin-bottom: 12px; }
.sidebar-controls { display: flex; gap: 8px; }
.sidebar-controls input {
  flex: 1; padding: 6px 10px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); border-radius: 6px;
  color: white; font-size: 12px;
}
.sidebar-controls input::placeholder { color: #888; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }

/* Stats strip */
.stats-strip {
  display: flex; gap: 2px; padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stat-pill {
  flex: 1; text-align: center; padding: 6px 4px;
  background: rgba(255,255,255,0.05); border-radius: 6px;
}
.stat-pill .val { font-size: 18px; font-weight: 700; color: #4ecca3; }
.stat-pill .lbl { font-size: 9px; color: #888; text-transform: uppercase; }

/* Tabs */
.sidebar-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-tab {
  flex: 1; padding: 8px; text-align: center; font-size: 11px;
  text-transform: uppercase; cursor: pointer; color: #888;
  border-bottom: 2px solid transparent;
}
.sidebar-tab.active { color: #4ecca3; border-bottom-color: #4ecca3; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Domain groups */
.domain-group { margin-bottom: 12px; }
.domain-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; cursor: pointer; border-radius: 6px;
  background: rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.domain-header:hover { background: rgba(255,255,255,0.08); }
.domain-icon { font-size: 14px; }
.domain-name { font-size: 13px; font-weight: 600; flex: 1; }
.domain-badge {
  font-size: 10px; background: rgba(78,204,163,0.2); color: #4ecca3;
  padding: 2px 8px; border-radius: 10px;
}
.domain-children { padding-left: 12px; margin-top: 4px; }
.domain-children.collapsed { display: none; }

/* Process cards */
.process-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; padding: 10px; margin-bottom: 6px; cursor: pointer;
  transition: all 0.15s;
}
.process-card:hover, .process-card.active {
  background: rgba(78,204,163,0.12); border-color: #4ecca3;
}
.process-name { font-size: 13px; font-weight: 500; }
.process-meta { font-size: 10px; color: #aaa; margin-top: 3px; }
.process-label-input {
  width: 100%; padding: 4px 8px; margin-top: 6px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px; color: white; font-size: 11px;
}

/* Cross-product links */
.link-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; padding: 10px; margin-bottom: 6px;
}
.link-domains {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.link-domain-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: rgba(78,204,163,0.2); color: #4ecca3;
}
.link-arrow { color: #666; font-size: 12px; }
.link-context { font-size: 10px; color: #aaa; margin-top: 4px; }

/* Empty state */
.empty { text-align: center; padding: 30px 16px; color: #666; font-size: 12px; }

/* Main area */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: #fff; border-bottom: 1px solid #e5e8ec; flex-shrink: 0;
}
.header-divider { width: 1px; height: 22px; background: #e0e4ea; flex-shrink: 0; }
.view-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.toolbar {
  padding: 10px 20px; background: white;
  border-bottom: 1px solid #eee;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.toolbar-left { display: flex; gap: 16px; align-items: center; }
.toolbar-title { font-size: 15px; font-weight: 600; }
.toolbar-stat { font-size: 12px; color: #888; }
.toolbar-stat strong { color: #16213e; }
.back-btn {
  padding: 4px 12px; border: 1px solid #ddd; border-radius: 6px;
  background: white; cursor: pointer; font-size: 12px; color: #555;
  white-space: nowrap; transition: background .15s;
}
.back-btn:hover { background: #f5f5f5; }
.btn {
  padding: 6px 14px; border: none; border-radius: 6px;
  cursor: pointer; font-size: 12px; font-weight: 500;
}
.btn-primary { background: #4ecca3; color: white; }
.btn-primary:hover { background: #3db88f; }
.btn-sm { padding: 4px 10px; font-size: 11px; }

#cy { flex: 1; min-height: 0; margin: 12px; border-radius: 8px; border: 1px solid #eee; background: white; }
.graph-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 15px; text-align: center; line-height: 1.6;
}

/* Layout selector */
.layout-selector { display: flex; gap: 4px; }
.layout-btn {
  padding: 3px 10px; border: 1px solid #ddd; border-radius: 4px;
  background: white; cursor: pointer; font-size: 11px;
}
.layout-btn.active { background: #4ecca3; color: white; border-color: #4ecca3; }

/* ---- View switcher (Process Graph <-> Holistic Analytics) ---- */
.view-switcher { display: flex; gap: 6px; flex-shrink: 0; }
.view-btn { padding: 6px 14px; border: 1px solid #d0d4da; background: #fff; color: #555; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all .15s; }
.view-btn:hover { background: #f0f2f5; }
.view-btn.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }

/* ---- Holistic Analytics view ---- */
.holistic-view { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.holistic-header { margin-bottom: 14px; }
.holistic-header h2 { font-size: 16px; color: #1a1a2e; }
.holistic-empty { color: #888; font-size: 13px; padding: 36px; text-align: center; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi-card { background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; padding: 16px 18px; }
.kpi-card .kpi-val { font-size: 26px; font-weight: 700; color: #1a1a2e; line-height: 1.1; }
.kpi-card .kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #888; margin-top: 6px; }

.holistic-chart-card { background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.holistic-chart-card h3 { font-size: 13px; margin-bottom: 10px; color: #444; }
.chart-box { position: relative; height: 280px; }
.chart-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #888; font-size: 12px; text-align: center; padding: 14px;
}
/* ---- Day River swimlane (pure HTML/CSS, replaces Chart.js) ---- */
.day-river { --label-w: 130px; font-size: 11px; }
.river-axis-row {
  display: flex; align-items: flex-end; height: 22px;
  margin-bottom: 4px; border-bottom: 1px solid #e5e8ec;
}
.river-axis-spacer { width: var(--label-w); flex-shrink: 0; }
.river-axis-ticks { flex: 1; position: relative; }
.river-hour-tick {
  position: absolute; bottom: 2px; transform: translateX(-50%);
  color: #888; font-size: 10px; white-space: nowrap;
}
.river-lanes { position: relative; }
.river-gridlines {
  position: absolute; top: 0; bottom: 0;
  left: var(--label-w); right: 0; pointer-events: none; z-index: 0;
}
.river-vline { position: absolute; top: 0; bottom: 0; width: 1px; background: #f0f2f5; }
.river-lane {
  display: flex; align-items: center; height: 34px;
  border-bottom: 1px solid #f5f6f8; position: relative; z-index: 1;
}
.river-lane-label {
  width: var(--label-w); flex-shrink: 0; padding-right: 10px;
  text-align: right; color: #555; font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.river-track { flex: 1; position: relative; height: 26px; }
.river-bar {
  position: absolute; top: 3px; bottom: 3px;
  border-radius: 3px; cursor: pointer; min-width: 2px;
  transition: opacity .15s;
}
.river-bar:hover { opacity: .75; }
.river-tooltip {
  position: fixed; z-index: 9999; background: #1a1a2e; color: #fff;
  padding: 5px 9px; border-radius: 5px; font-size: 11px; pointer-events: none;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.cross-app-chip {
  display: inline-block; background: #f0f4f8; border: 1px solid #d0d4da;
  border-radius: 12px; padding: 2px 10px; margin: 4px 6px 0 0;
  font-size: 11px; cursor: pointer; transition: background .15s;
}
.cross-app-chip:hover { background: #e0e8f0; }
.node-popup {
  position: fixed; z-index: 10000; background: #1a1a2e; color: #fff;
  padding: 10px 14px; border-radius: 8px; font-size: 11px; max-width: 360px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); display: none;
}
.node-popup-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.node-popup-row { margin: 2px 0; }
.node-popup-row span { color: #888; }
.node-popup-raw {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid #333;
  font-size: 10px; color: #aaa; word-break: break-word; max-height: 100px; overflow-y: auto;
}

/* ---- Team / "All Users" macro view ---- */
#individual-dashboard { display: contents; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .team-grid { grid-template-columns: 1fr; } }
.team-grid .holistic-chart-card { margin-bottom: 0; }
.team-heatmap { display: grid; gap: 0; width: 100%; font-size: 10px; user-select: none; }
.hm-cell { box-sizing: border-box; min-width: 0; }
.hm-head {
  text-align: center; font-weight: 600; color: #6b7280; padding: 0 2px 6px;
  font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm-name {
  padding-right: 8px; font-weight: 600; color: #1a1a2e; font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: right; display: flex; align-items: center; justify-content: flex-end;
  cursor: pointer;
}
.team-heatmap .hm-name:hover { color: #4ecca3; text-decoration: underline; }
.hm-data {
  height: 26px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #fff; cursor: default; color: rgba(26,26,46,.55);
}
.hm-data:hover { outline: 2px solid #1a1a2e; outline-offset: -2px; z-index: 1; position: relative; }
.team-legend { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #6b7280; margin-top: 10px; }
.team-legend-bar { flex: 0 0 150px; height: 8px; border-radius: 4px;
  background: linear-gradient(to right, #f4f6f7, hsl(157deg 55% 90%), hsl(157deg 55% 30%)); }
/* ---- Process Health Diagnostics ---- */
.health-view { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.health-header { margin-bottom: 12px; }
.health-header h2 { font-size: 16px; color: #1a1a2e; }
.health-subtabs { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 2px solid #e5e8ec; }
.health-tab { padding: 7px 16px; border: none; background: none; cursor: pointer; font-size: 13px; color: #888; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.health-tab.active { color: #1a1a2e; border-bottom-color: #4ecca3; font-weight: 600; }
.health-tab:hover { color: #333; }
.health-process-select { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: #555; }
.health-process-select select { padding: 4px 8px; border: 1px solid #d0d4da; border-radius: 4px; font-size: 12px; max-width: 300px; }
.health-cy-container { background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; position: relative; flex: 1; min-height: 350px; }
#health-cy { width: 100%; height: 100%; position: absolute; inset: 0; }
#health-chart { position: absolute; inset: 0; width: 100%; height: 100%; padding: 12px; }
.health-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #888; font-size: 13px; pointer-events: none; }
.health-legend { margin-top: 8px; display: flex; gap: 14px; font-size: 11px; color: #666; flex-wrap: wrap; align-items: center; }
.health-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; }
.health-caption { margin-top: 10px; font-size: 12px; line-height: 1.55; color: #555; background: #f7f8fa; border: 1px solid #e5e8ec; border-radius: 8px; padding: 10px 12px; }
.health-caption strong { color: #16213e; }
.health-error-flags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.error-flag { display: flex; align-items: center; gap: 8px; background: #fff5f5; border: 1px solid #fcc; border-radius: 8px; padding: 8px 14px; font-size: 12px; }
.error-flag-icon { font-size: 16px; }
.error-flag-domain { font-weight: 600; color: #1a1a2e; }
.error-flag-count { background: #e94560; color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.error-flag-types { color: #888; font-size: 11px; }
.health-error-log { background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; overflow: auto; max-height: 500px; }
.error-log-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.error-log-table th { background: #f8f9fa; padding: 8px 12px; text-align: left; font-weight: 600; color: #555; border-bottom: 1px solid #e5e8ec; position: sticky; top: 0; }
.error-log-table td { padding: 8px 12px; border-bottom: 1px solid #f0f2f5; }
.error-log-table tr:hover td { background: #f8f9fa; }
/* Process Graph landing (empty-state canvas) */
.graph-landing {
  flex: 1; min-height: 0; margin: 12px; border-radius: 10px;
  overflow-y: auto; padding: 34px 40px 40px;
  background: linear-gradient(160deg, #16213e 0%, #1f2d52 55%, #243b66 100%);
  color: #fff;
}
.landing-hero { text-align: center; margin-bottom: 26px; }
.landing-mark { font-size: 32px; color: #4ecca3; margin-bottom: 6px; }
.landing-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.landing-hero p { font-size: 13px; color: #b8c4e0; max-width: 560px; margin: 0 auto; line-height: 1.6; }
.landing-section { margin-bottom: 24px; }
.landing-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: #4ecca3; margin-bottom: 10px;
}
.landing-section-title span {
  color: #8a98b8; font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px;
}
.landing-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.landing-tile {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 14px 16px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: #fff; font-family: inherit;
  transition: transform .15s, background .15s, border-color .15s;
}
.landing-tile:hover { transform: translateY(-2px); background: rgba(78,204,163,0.14); border-color: #4ecca3; }
.landing-tile .lt-app { font-size: 11px; font-weight: 700; color: #4ecca3; text-transform: uppercase; letter-spacing: .3px; }
.landing-tile .lt-name { font-size: 14px; font-weight: 600; word-break: break-word; }
.landing-tile .lt-meta { font-size: 11px; color: #b8c4e0; }
.landing-tile-xapp .lt-app { color: #f3a93c; }
.landing-tile-xapp:hover { border-color: #f3a93c; background: rgba(243,169,60,0.14); }
.landing-empty { text-align: center; color: #b8c4e0; font-size: 13px; padding: 40px; line-height: 1.8; }
.landing-empty strong { color: #4ecca3; }
/* ── Top-level view switcher (Insights / Explore) — matches .view-btn ── */
.topview-switcher { display: flex; gap: 6px; flex-shrink: 0; }
.topview-btn {
  padding: 6px 14px; border: 1px solid #d0d4da; background: #fff; color: #555;
  border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all .15s;
}
.topview-btn:hover { background: #f0f2f5; }
.topview-btn.active { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }

/* ── Insights view (mirrors .holistic-view / .health-view) ── */
.insights-view { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.insights-view .health-header { margin-bottom: 14px; }
.insights-ask-row { display: flex; gap: 8px; margin-top: 4px; }
.insights-ask-input {
  flex: 1; padding: 6px 12px; border: 1px solid #d0d4da; border-radius: 6px;
  font-size: 13px; background: #fff; color: #1a1a2e;
}
.insights-ask-input:focus { outline: none; border-color: #4ecca3; }
.insights-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.insights-suggest {
  border: 1px solid #e5e8ec; background: #f7f8fa; color: #555; padding: 4px 11px;
  border-radius: 6px; font-size: 11px; cursor: pointer;
}
.insights-suggest:hover { border-color: #4ecca3; color: #1a1a2e; }
#insights-ask-answer { margin-top: 12px; }
.ins-thinking { color: #888; font-style: italic; }
.insights-llm-badge { display: block; margin-top: 8px; font-size: 10px; color: #8a98b8; }
.insights-brief-list { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.insights-empty { text-align: center; padding: 40px 16px; color: #888; font-size: 13px; }
.insights-empty strong { color: #2f9c77; }

/* Brief cards — for the Explore "Ranked" panel (light canvas) */
.brief-card {
  background: #fff; border: 1px solid #e5e8ec; border-radius: 10px; padding: 14px 16px;
  border-left: 4px solid #e5e8ec;
}
.brief-card.sev-high { border-left-color: #e94560; }
.brief-card.sev-med { border-left-color: #f3a93c; }
.brief-card.sev-low { border-left-color: #4ecca3; }
.brief-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sev-pill { font-size: 10px; font-weight: 700; letter-spacing: .3px; padding: 2px 9px; border-radius: 10px; text-transform: uppercase; color: #fff; }
.sev-pill.sev-high { background: #e94560; }
.sev-pill.sev-med { background: #f3a93c; }
.sev-pill.sev-low { background: #4ecca3; }
.brief-name { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.brief-vol { font-size: 11px; color: #888; margin-left: auto; }
.brief-narr { font-size: 13px; line-height: 1.6; color: #444; margin-bottom: 10px; }
.brief-evidence { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ev-chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: #f0f2f5; color: #555; border: 1px solid #e5e8ec; }
.ev-chip.bad { background: #fde8eb; color: #c0354a; border-color: #f7c8d2; }
.ev-chip.warn { background: #fdf1e0; color: #c97e1a; border-color: #f3d9a8; }
.ev-chip.good { background: #e3f6ef; color: #2f9c77; border-color: #b6e6d4; }
.brief-foot { display: flex; align-items: flex-start; gap: 12px; padding-top: 10px; border-top: 1px solid #f0f2f5; margin-bottom: 10px; }
.brief-card-actions { margin-top: 0; }
.brief-card-actions .wf-btn-view,
.brief-card-actions .wf-btn-ask { flex: 0 1 auto; min-width: 100px; }
.brief-rec { font-size: 12px; color: #555; line-height: 1.5; }
.brief-rec strong { color: #16213e; }
.drill-btn { margin-left: auto; border: 1px solid #d0d4da; background: #fff; color: #1a1a2e; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.drill-btn:hover { background: #f0f2f5; border-color: #4ecca3; color: #2f9c77; }
/* ── Overview landing (dark hero canvas — mirrors .graph-landing) ── */
.overview-landing {
  flex: 1; min-height: 0; overflow-y: auto; padding: 40px 40px 48px;
  background: linear-gradient(160deg, #16213e 0%, #1f2d52 55%, #243b66 100%); color: #fff;
}
.overview-landing .landing-hero { margin-bottom: 28px; }
/* Chatbot — front and center */
.ov-chat { max-width: 680px; margin: 0 auto 36px; }
.ov-chat-row { display: flex; gap: 8px; }
.ov-chat-input {
  flex: 1; padding: 13px 16px; font-size: 15px; color: #fff;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 8px;
}
.ov-chat-input::placeholder { color: #b8c4e0; }
.ov-chat-input:focus { outline: none; border-color: #4ecca3; background: rgba(255,255,255,0.12); }
.overview-landing .ov-chat .btn-primary { padding: 13px 22px; font-size: 14px; }
.overview-landing .insights-suggestions { margin-top: 12px; }
.overview-landing .insights-suggest {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #b8c4e0;
}
.overview-landing .insights-suggest:hover { border-color: #4ecca3; color: #fff; background: rgba(78,204,163,0.14); }
/* Answer — clickable to open the process graph */
.ov-answer {
  margin-top: 14px; padding: 16px 18px; border-radius: 10px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  font-size: 14px; line-height: 1.6; color: #e8edf7;
}
.ov-answer.clickable { cursor: pointer; transition: background .15s, border-color .15s; }
.ov-answer.clickable:hover { background: rgba(78,204,163,0.12); border-color: #4ecca3; }
.ov-answer .ov-answer-cta { margin-top: 10px; font-size: 12px; font-weight: 700; color: #4ecca3; }
.overview-landing .ins-thinking { color: #b8c4e0; font-style: italic; }
.overview-landing .insights-llm-badge { color: #8a98b8; }
/* Biggest problem callout — legacy block kept for graph-landing; landing uses block above */
.overview-landing .ov-callout:not(.ov-callout-pending) { cursor: default; }
.overview-landing .ov-callout-cta { margin-top: 10px; font-size: 12px; font-weight: 700; color: #4ecca3; }
.overview-empty { color: #b8c4e0; font-size: 13px; line-height: 1.6; }
.clickable { cursor: pointer; }
.health-caption.clickable:hover { background: #eef9f5; border-color: #4ecca3; }
.ask-cta { margin-top: 10px; font-size: 12px; font-weight: 700; color: #4ecca3; }
/* Process Graph empty state (no duplicate hero — Overview is the landing) */
.graph-pick { text-align: center; color: #b8c4e0; font-size: 15px; padding: 90px 20px; line-height: 1.8; }
.graph-pick-link { color: #4ecca3; font-weight: 700; cursor: pointer; }
.graph-pick-link:hover { text-decoration: underline; }
/* ── Chat thread (multi-turn) ── */
.chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding: 0; margin-top: 14px; background: transparent; border: none; }
.chat-thread::-webkit-scrollbar { width: 8px; }
.chat-thread::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.chat-msg { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.chat-user { align-self: flex-end; background: #4ecca3; color: #0f2a22; border-bottom-right-radius: 4px; }
.chat-bot { align-self: flex-start; border-bottom-left-radius: 4px; }
.overview-landing .chat-bot { background: rgba(255,255,255,0.08); color: #e8edf7; border: 1px solid rgba(255,255,255,0.12); }
.insights-view .chat-bot { background: #fff; color: #2a2f45; border: 1px solid #e5e8ec; }
.chat-thinking { color: #b8c4e0; font-style: italic; }
.chat-thread .ask-cta { margin-top: 8px; }
.insights-view .chat-thread .ask-cta { color: #2f9c77; }
/* ── Chat expand button + fullscreen overlay ── */
.chat-expand {
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #cfd8ec;
  border-radius: 6px; padding: 0 11px; font-size: 13px; cursor: pointer; line-height: 1.2;
}
.chat-expand:hover { background: rgba(78,204,163,0.2); border-color: #4ecca3; color: #fff; }
.insights-view .chat-expand { border-color: #d0d4da; background: #fff; color: #555; }
.insights-view .chat-expand:hover { background: #f0f2f5; border-color: #4ecca3; color: #2f9c77; }

/* chat-fs-* classes reused inside .chat-drawer slide-over */
.chat-fs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chat-fs-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chat-fs-mark { color: #4ecca3; }
.chat-fs-close {
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #cfd8ec;
  border-radius: 6px; width: 34px; height: 34px; font-size: 15px; cursor: pointer;
}
.chat-fs-close:hover { background: rgba(233,69,96,0.2); border-color: #e94560; color: #fff; }
.chat-fs-thread {
  flex: 1; overflow-y: auto; padding: 24px max(24px, calc(50% - 360px));
  display: flex; flex-direction: column; gap: 12px;
}
.chat-fs-thread::-webkit-scrollbar { width: 8px; }
.chat-fs-thread::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.chat-fs-thread .chat-msg { max-width: 720px; }
.chat-fs-thread .chat-user { align-self: flex-end; }
.chat-fs-thread .chat-bot { background: rgba(255,255,255,0.08); color: #e8edf7; border: 1px solid rgba(255,255,255,0.12); border-bottom-left-radius: 4px; }
.chat-fs-thread .ask-cta { color: #4ecca3; }
.chat-fs-input-row {
  display: flex; gap: 8px; padding: 16px max(24px, calc(50% - 360px));
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-fs-input-row .ov-chat-input { font-size: 15px; padding: 13px 16px; }
.chat-fs-input-row .btn-primary { padding: 13px 22px; font-size: 14px; }
/* Big "Ask your AI assistant" CTA on the landing */
.ask-ai-btn {
  display: block; width: 100%; max-width: 520px; margin: 0 auto;
  padding: 16px 22px; font-size: 16px; font-weight: 700; cursor: pointer;
  color: #0f2a22; background: #4ecca3; border: none; border-radius: 10px;
  font-family: inherit; transition: background .15s, transform .1s;
  box-shadow: 0 4px 18px rgba(78,204,163,0.25);
}
.ask-ai-btn:hover { background: #5fd6b1; }
.ask-ai-btn:active { transform: translateY(1px); }
.overview-landing .insights-suggestions { justify-content: center; }
/* ── Static stats banner at the top of the fullscreen chat (clickable) ── */
.chat-fs-ticker { border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.18); padding: 8px 14px; }
.chat-fs-ticker:empty { display: none; }
.chat-fs-ticker-track { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; font-size: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  cursor: pointer; color: inherit; font-family: inherit; transition: background .15s, border-color .15s;
}
.ticker-item:hover { background: rgba(78,204,163,0.16); border-color: #4ecca3; }
.ticker-label { color: #8a98b8; text-transform: uppercase; letter-spacing: .3px; font-weight: 700; font-size: 10px; }
.ticker-value { font-weight: 600; color: #e8edf7; }
.ticker-value.tone-bad { color: #ff8a9b; }
.ticker-value.tone-warn { color: #f3c179; }
.ticker-value.tone-good { color: #7fe6c4; }
.ticker-sep { color: #3f4d6b; }
