.ai-theme-ops{
  --ai-bg:#1f222b;
  --ai-bg-soft:#222632;
  --ai-surface:#252833;
  --ai-surface-strong:#292d3a;
  --ai-border:rgba(255,255,255,.045);
  --ai-text:#f4f6fb;
  --ai-muted:#9ca7c2;
  --ai-accent:#4267ff;
  --ai-accent-2:#35c7c5;
  --ai-chip:#222632;
  --ai-shadow:0 14px 28px rgba(0,0,0,.12);
}

.ai-theme-operator{
  --ai-bg:#eef4fb;
  --ai-bg-soft:#ffffff;
  --ai-surface:rgba(255, 255, 255, 0.96);
  --ai-surface-strong:rgba(244, 248, 253, 0.98);
  --ai-border:rgba(47, 142, 255, 0.16);
  --ai-text:#16253b;
  --ai-muted:#62748d;
  --ai-accent:#2f8eff;
  --ai-accent-2:#6c63ff;
  --ai-chip:rgba(47, 142, 255, 0.08);
  --ai-shadow:0 24px 52px rgba(35, 59, 99, 0.14);
}

.floating-ai-assistant{
  position:fixed;
  right:32px;
  bottom:32px;
  z-index:1400;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:16px;
  pointer-events:none;
}

.floating-ai-assistant > *{
  pointer-events:auto;
}

.floating-ai-assistant-panel{
  position:absolute;
  right:0;
  bottom:108px;
  width:min(430px, calc(100vw - 64px));
  height:min(76vh, 760px);
  max-height:min(76vh, 760px);
  opacity:0;
  visibility:hidden;
  transform:translateY(18px) scale(.96);
  transform-origin:bottom right;
  transition:opacity .22s ease, transform .28s ease, visibility .22s ease;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-assistant-panel{
  bottom:calc(100% + 14px);
}

.floating-ai-assistant.is-open .floating-ai-assistant-panel{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}

.floating-ai-panel{
  background:
    radial-gradient(circle at top right, rgba(97, 195, 255, 0.16), transparent 34%),
    linear-gradient(180deg, var(--ai-surface), var(--ai-surface-strong));
  border:1px solid var(--ai-border);
  border-radius:28px;
  box-shadow:var(--ai-shadow);
  overflow:hidden;
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) auto auto;
}

.floating-ai-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 16px;
  background:linear-gradient(135deg, rgba(75, 111, 255, 0.18), rgba(97, 195, 255, 0.14));
  border-bottom:1px solid var(--ai-border);
}

.floating-ai-panel-copy{
  display:grid;
  gap:4px;
}

.floating-ai-panel-copy strong{
  font-size:18px;
  letter-spacing:-.03em;
  color:var(--ai-text);
}

.floating-ai-panel-copy span{
  color:var(--ai-muted);
  font-size:12px;
  line-height:1.5;
}

.floating-ai-panel-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.floating-ai-state{
  min-height:32px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--ai-border);
  background:rgba(255,255,255,.08);
  color:var(--ai-text);
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}

.floating-ai-panel-close{
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
}

.floating-ai-panel-close:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.14);
  border-color:rgba(97, 195, 255, 0.34);
}

.floating-ai-panel-body{
  min-height:0;
  max-height:none;
  overflow:auto;
  padding:18px;
}

.floating-ai-panel-suggestions{
  padding:0 18px 18px;
}

.floating-ai-panel-composer{
  padding-top:0;
}

.floating-ai-orb{
  width:92px;
  height:92px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  position:relative;
  cursor:pointer;
  isolation:isolate;
  transition:transform .22s ease, filter .22s ease;
}

.floating-ai-orb:hover,
.floating-ai-assistant.is-open .floating-ai-orb{
  transform:translateY(-2px) scale(1.02);
}

.floating-ai-orb:focus-visible{
  outline:2px solid rgba(97, 195, 255, 0.62);
  outline-offset:6px;
}

.floating-ai-orb-halo,
.floating-ai-orb-ring,
.floating-ai-orb-core{
  position:absolute;
  border-radius:50%;
  inset:0;
}

.floating-ai-orb-halo{
  inset:-12px;
  background:radial-gradient(circle, rgba(80, 133, 255, 0.34), rgba(80, 133, 255, 0) 68%);
  filter:blur(14px);
  opacity:.9;
  animation:ai-orb-pulse 3.2s ease-in-out infinite, ai-orb-color-breathe 12s ease-in-out infinite;
}

.floating-ai-orb-ring{
  background:conic-gradient(
    from 190deg,
    rgba(48, 117, 255, 0.08),
    rgba(71, 208, 255, 0.96),
    rgba(52, 111, 255, 0.2),
    rgba(37, 94, 255, 0.96),
    rgba(48, 117, 255, 0.08)
  );
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  box-shadow:0 0 22px rgba(62, 146, 255, 0.35);
  animation:ai-orb-spin 9s linear infinite, ai-orb-drift 5.2s ease-in-out infinite, ai-orb-color-breathe 12s ease-in-out infinite;
}

.floating-ai-orb-ring-secondary{
  inset:7px;
  opacity:.58;
  filter:blur(.8px);
  animation-duration:7.2s, 4.6s, 14s;
  animation-direction:reverse, normal, alternate;
}

.floating-ai-orb-core{
  inset:15px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 44% 35%, rgba(255,255,255,.14), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 50% 55%, rgba(13, 28, 78, 0.8), rgba(8, 16, 48, 0.98));
  border:1px solid rgba(97, 195, 255, 0.14);
  box-shadow:
    inset 0 0 24px rgba(81, 111, 255, 0.18),
    0 0 0 1px rgba(97, 195, 255, 0.06);
}

.floating-ai-orb-core span{
  display:block;
  color:#eff5ff;
  font-size:22px;
  font-weight:300;
  letter-spacing:.12em;
  transform:translateX(.08em);
}

.floating-ai-orb-icon{
  width:42px;
  height:42px;
  display:block;
  filter:
    drop-shadow(0 7px 12px rgba(4, 9, 41, 0.38))
    drop-shadow(0 0 14px rgba(35, 240, 190, 0.16));
  transform:translateY(1px);
}

.floating-ai-orb-icon-front,
.floating-ai-orb-icon-shade,
.floating-ai-orb-icon-highlight{
  transition:transform .26s ease, opacity .26s ease, filter .26s ease;
}

.floating-ai-orb:hover .floating-ai-orb-icon-front,
.floating-ai-assistant.is-open .floating-ai-orb-icon-front{
  transform:translateY(-1px);
  filter:brightness(1.08) saturate(1.08);
}

.floating-ai-orb:hover .floating-ai-orb-icon-shade,
.floating-ai-assistant.is-open .floating-ai-orb-icon-shade{
  opacity:1;
}

.floating-ai-assistant.is-loading .floating-ai-orb-halo{
  animation-duration:2s, 7s;
}

.floating-ai-assistant.is-loading .floating-ai-orb-ring{
  animation-duration:4.4s, 3.4s, 7s;
}

.floating-ai-assistant.is-loading .floating-ai-orb-ring-secondary{
  animation-duration:3.4s, 2.8s, 8s;
}

@keyframes ai-orb-spin{
  from{transform:rotate(0deg);}
  to{transform:rotate(360deg);}
}

@keyframes ai-orb-pulse{
  0%,100%{transform:scale(.94);opacity:.68;}
  50%{transform:scale(1.06);opacity:1;}
}

@keyframes ai-orb-drift{
  0%,100%{transform:scale(1) rotate(0deg);}
  50%{transform:scale(1.03) rotate(8deg);}
}

@keyframes ai-orb-color-breathe{
  0%,100%{
    filter:hue-rotate(0deg) saturate(1) brightness(1);
  }
  33%{
    filter:hue-rotate(12deg) saturate(1.12) brightness(1.08);
  }
  66%{
    filter:hue-rotate(-10deg) saturate(1.08) brightness(1.05);
  }
}

.ai-analytics-shell{
  color:var(--ai-text);
}

.ai-analytics-hero{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap:20px;
  align-items:center;
}

.ai-analytics-hero-copy{
  display:grid;
  gap:12px;
}

.ai-analytics-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ai-accent);
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.ai-analytics-hero-copy h2,
.ai-analytics-card-head h3{
  margin:0;
  font-size:clamp(26px, 3vw, 38px);
  line-height:1.02;
  letter-spacing:-.04em;
}

.ai-analytics-card-head h3{
  font-size:24px;
}

.ai-analytics-hero-copy p,
.ai-analytics-card-head p{
  margin:0;
  color:var(--ai-muted);
  line-height:1.55;
}

.ai-analytics-card-head{
  display:grid;
  gap:6px;
}

.ai-analytics-suggestions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.ai-analytics-chip{
  border:1px solid var(--ai-border);
  background:var(--ai-chip);
  color:var(--ai-text);
  min-height:36px;
  border-radius:999px;
  padding:8px 14px;
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}

.ai-analytics-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(75, 111, 255, 0.34);
  background:rgba(97, 195, 255, 0.12);
}

.ai-analytics-launcher{
  position:relative;
  min-height:280px;
  border:1px solid var(--ai-border);
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(75, 111, 255, 0.18), transparent 58%),
    linear-gradient(180deg, var(--ai-surface), var(--ai-surface-strong));
  box-shadow:var(--ai-shadow);
  display:grid;
  place-items:center;
  gap:16px;
  overflow:hidden;
  cursor:pointer;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ai-analytics-launcher:hover,
.ai-analytics-launcher.is-open{
  transform:translateY(-2px);
  border-color:rgba(97, 195, 255, 0.34);
  box-shadow:0 32px 72px rgba(31, 74, 140, 0.24);
}

.ai-analytics-launcher-copy{
  display:grid;
  gap:6px;
  justify-items:center;
  text-align:center;
  padding:0 24px 18px;
  color:var(--ai-text);
}

.ai-analytics-launcher-copy strong{
  font-size:18px;
  letter-spacing:-.02em;
}

.ai-analytics-launcher-copy span{
  color:var(--ai-muted);
  font-size:13px;
  max-width:240px;
}

.ai-analytics-orb-wrap{
  position:relative;
  width:240px;
  height:240px;
  display:grid;
  place-items:center;
}

.ai-analytics-orb-ring,
.ai-analytics-orb-core{
  position:absolute;
  border-radius:999px;
  transition:transform .45s cubic-bezier(.2, .9, .15, 1), opacity .32s ease;
}

.ai-analytics-orb-ring{
  inset:16px;
  border:18px solid rgba(75, 111, 255, 0.24);
  background:radial-gradient(circle at 50% 45%, rgba(255,255,255,.1), transparent 62%);
}

.ai-analytics-orb-core{
  inset:44px;
  background:radial-gradient(circle at 40% 35%, rgba(255,255,255,.18), rgba(255,255,255,.02) 42%),
    linear-gradient(135deg, var(--ai-accent-2), var(--ai-accent));
  box-shadow:0 24px 56px rgba(81, 111, 255, 0.34);
  display:grid;
  place-items:center;
  color:#fff;
  font-size:28px;
  font-weight:700;
  letter-spacing:-.04em;
  text-align:center;
  padding:24px;
}

.ai-analytics-launcher:hover .ai-analytics-orb-ring,
.ai-analytics-launcher.is-open .ai-analytics-orb-ring{
  transform:scale(1.08);
}

.ai-analytics-launcher:hover .ai-analytics-orb-core,
.ai-analytics-launcher.is-open .ai-analytics-orb-core{
  transform:scale(1.06);
}

.ai-analytics-orb-badge{
  position:absolute;
  right:22px;
  top:36px;
  min-height:44px;
  padding:8px 14px;
  border-radius:999px;
  background:var(--ai-bg-soft);
  border:1px solid var(--ai-border);
  color:var(--ai-text);
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:700;
  opacity:0;
  transform:translateX(10px) scale(.95);
  transition:opacity .24s ease, transform .24s ease;
  box-shadow:0 12px 24px rgba(18, 41, 79, 0.16);
}

.ai-analytics-launcher:hover .ai-analytics-orb-badge,
.ai-analytics-launcher.is-open .ai-analytics-orb-badge{
  opacity:1;
  transform:translateX(0) scale(1);
}

.ai-analytics-panel{
  margin-top:18px;
  max-height:0;
  overflow:hidden;
  opacity:0;
  transform:translateY(10px);
  transition:max-height .45s ease, opacity .24s ease, transform .24s ease;
}

.ai-analytics-panel.is-open{
  max-height:2200px;
  opacity:1;
  transform:translateY(0);
}

.ai-analytics-chat-window{
  background:
    radial-gradient(circle at top right, rgba(97, 195, 255, 0.14), transparent 32%),
    linear-gradient(180deg, var(--ai-surface), var(--ai-surface-strong));
  border:1px solid var(--ai-border);
  border-radius:28px;
  box-shadow:var(--ai-shadow);
  overflow:hidden;
}

.ai-analytics-workspace{
  display:grid;
  grid-template-columns:minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap:14px;
  padding:14px;
  align-items:start;
}

.ai-analytics-input-column,
.ai-analytics-output-column{
  display:grid;
  gap:16px;
  min-width:0;
}

.ai-analytics-output-column{
  align-self:stretch;
}

.ai-analytics-chat-head{
  background:linear-gradient(135deg, var(--ai-accent-2), var(--ai-accent));
  color:#fff;
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.ai-analytics-chat-head strong{
  display:block;
  font-size:17px;
}

.ai-analytics-chat-head span{
  display:block;
  margin-top:3px;
  font-size:12px;
  opacity:.84;
}

.ai-analytics-status-pill{
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.26);
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#fff;
  cursor:pointer;
  appearance:none;
}

.ai-analytics-chat-body{
  padding:12px;
  display:grid;
  gap:10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
    transparent;
  border:1px solid rgba(255,255,255,.04);
  border-radius:22px;
  min-height:90px;
}

.ai-analytics-message{
  display:flex;
}

.ai-analytics-message-user{
  justify-content:flex-end;
}

.ai-analytics-message-assistant{
  justify-content:flex-start;
}

.ai-analytics-bubble{
  max-width:min(92%, 720px);
  padding:14px 16px;
  border-radius:20px;
  box-shadow:0 12px 24px rgba(18, 41, 79, 0.08);
}

.ai-analytics-message-user .ai-analytics-bubble{
  background:linear-gradient(135deg, var(--ai-accent-2), var(--ai-accent));
  color:#fff;
  border-bottom-right-radius:8px;
}

.ai-analytics-message-assistant .ai-analytics-bubble{
  background:var(--ai-bg-soft);
  color:var(--ai-text);
  border:1px solid var(--ai-border);
  border-bottom-left-radius:8px;
}

.ai-analytics-bubble p{
  margin:0;
  line-height:1.6;
}

.ai-analytics-response-stack{
  display:grid;
  gap:10px;
}

.ai-analytics-result-block{
  display:grid;
  gap:14px;
}

.ai-analytics-result-panel{
  display:block;
  visibility:visible;
  opacity:1;
  min-height:180px;
  padding:12px;
  border:1px solid var(--ai-border);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
}

.ai-analytics-result-panel.is-empty{
  min-height:0;
}

.ai-analytics-result-panel.is-loading{
  min-height:120px;
}

.ai-analytics-answer-card{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--ai-border);
  background:var(--ai-bg-soft);
  color:var(--ai-text);
  line-height:1.45;
  max-height:140px;
  overflow:auto;
}

.ai-analytics-answer-card p{
  margin:0;
}

.ai-operator-coach-summary{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid rgba(75, 111, 255, 0.22);
  border-radius:14px;
  background:
    radial-gradient(circle at top right, rgba(75, 111, 255, 0.12), transparent 42%),
    rgba(31, 34, 43, 0.64);
  color:var(--ai-text);
}

.ai-operator-coach-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.ai-operator-coach-head strong{
  font-size:13px;
  letter-spacing:.02em;
}

.ai-operator-coach-head span{
  padding:4px 8px;
  border-radius:999px;
  background:rgba(75, 111, 255, 0.12);
  color:var(--ai-muted);
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.ai-operator-coach-summary p{
  margin:0;
  color:#dbeafe;
  font-size:12px;
  line-height:1.5;
}

.ai-operator-coach-pill-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.ai-operator-coach-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:5px 8px;
  border-radius:999px;
  border:1px solid rgba(148, 163, 184, 0.18);
  background:rgba(31, 34, 43, 0.7);
  font-size:11px;
  color:var(--bor-text-soft, #c8cedd);
}

.ai-operator-coach-pill strong{
  font-weight:700;
}

.ai-operator-coach-pill em{
  font-style:normal;
  color:#e2e8f0;
}

.ai-operator-coach-pill.is-strength{
  border-color:rgba(34, 197, 94, 0.26);
  background:rgba(6, 78, 59, 0.22);
}

.ai-operator-coach-pill.is-gap{
  border-color:rgba(251, 191, 36, 0.28);
  background:rgba(120, 53, 15, 0.2);
}

.ai-operator-coach-action{
  display:grid;
  gap:4px;
  padding:10px;
  border-radius:12px;
  background:rgba(75, 111, 255, 0.1);
  border:1px solid rgba(75, 111, 255, 0.18);
}

.ai-operator-coach-action strong,
.ai-operator-coach-actions strong{
  color:var(--ai-text);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.ai-operator-coach-action span{
  color:var(--ai-text);
  font-size:12px;
  line-height:1.45;
}

.ai-operator-coach-actions{
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
  list-style:none;
}

.ai-operator-coach-actions li{
  display:grid;
  gap:3px;
  padding:8px 0 0;
  border-top:1px solid rgba(148, 163, 184, 0.12);
}

.ai-operator-coach-actions span{
  color:var(--bor-text-soft, #c8cedd);
  font-size:12px;
  line-height:1.45;
}

.ai-analytics-result-head{
  display:grid;
  gap:4px;
}

.ai-analytics-result-head strong{
  color:var(--ai-text);
  font-size:16px;
  letter-spacing:-.02em;
}

.ai-analytics-result-head span{
  color:var(--ai-muted);
  font-size:12px;
  line-height:1.5;
}

.ai-analytics-suggestions-panel{
  padding:16px;
  border:1px solid rgba(255,255,255,.04);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}

.ai-analytics-render-space{
  min-height:180px;
  border:1px solid var(--ai-border);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  padding:10px;
  display:grid;
  gap:10px;
  align-content:start;
}

.ai-analytics-empty-state{
  padding:18px;
  border:1px dashed var(--ai-border);
  border-radius:20px;
  background:rgba(255,255,255,.05);
  display:grid;
  gap:6px;
}

.ai-analytics-empty-state strong{
  font-size:14px;
}

.ai-analytics-empty-state span{
  color:var(--ai-muted);
  line-height:1.55;
}

.ai-analytics-chart-card{
  padding:16px;
  border-radius:18px;
  border:1px solid var(--border-subtle, rgba(255,255,255,.042));
  background:
    radial-gradient(circle at 12% 0%, rgba(66,103,255,.08), transparent 38%),
    var(--surface-card, rgba(31, 34, 43, 0.96));
  box-shadow:var(--shadow-soft, 0 16px 34px rgba(0, 0, 0, 0.15));
  max-height:330px;
}

.ai-analytics-chart-card-compact{
  max-height:320px;
  overflow:hidden;
}

.ai-analytics-chart-card-expanded{
  max-height:560px;
}

.ai-analytics-chart-svg{
  display:block;
  width:100%;
  height:auto;
  overflow:visible;
}

.ai-analytics-axis{
  stroke:rgba(143, 148, 170, 0.42);
  stroke-width:1;
}

.ai-analytics-grid-line{
  stroke:rgba(255, 255, 255, 0.055);
  stroke-width:1;
}

.ai-analytics-axis-value{
  fill:#858ba3;
  font-size:10px;
  font-weight:600;
}

.ai-analytics-axis-label{
  fill:#858ba3;
  font-size:11px;
  font-weight:600;
  paint-order:stroke;
  stroke:rgba(31, 34, 43, 0.94);
  stroke-width:3px;
  stroke-linejoin:round;
}

.ai-analytics-axis-label-diagonal{
  font-size:10px;
  letter-spacing:0;
  dominant-baseline:middle;
}

.ai-analytics-axis-label-rotated{
  transform:rotate(-45deg);
  transform-origin:center;
}

.ai-analytics-line-path{
  fill:none;
  stroke:url(#aiAnalyticsLine);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.18));
}

.ai-analytics-line-area{
  fill:url(#aiAnalyticsLineArea);
  pointer-events:none;
}

.ai-analytics-line-dot{
  fill:#f6a260;
  stroke:var(--ai-bg);
  stroke-width:2;
  transition:r .16s ease, filter .16s ease;
}

.ai-analytics-line-dot:hover{
  filter:drop-shadow(0 8px 14px rgba(246,162,96,.22));
}

.ai-analytics-bar-shape,
.ai-analytics-heatmap-cell{
  cursor:crosshair;
  transition:opacity .16s ease, filter .16s ease;
}

.ai-analytics-bar-shape:hover,
.ai-analytics-heatmap-cell:hover{
  opacity:1;
  filter:drop-shadow(0 8px 14px rgba(66,103,255,.22));
}

.ai-analytics-chart-svg text{
  fill:#858ba3;
}

.ai-analytics-chart-card{
  position:relative;
}

.ai-analytics-chart-tooltip{
  position:absolute;
  pointer-events:none;
  transform:translate(-50%, -100%);
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(66, 103, 255, 0.34);
  background:rgba(17, 20, 27, 0.96);
  color:#eef2ff;
  font-size:11px;
  line-height:1.4;
  box-shadow:0 18px 46px rgba(0, 0, 0, 0.45);
  max-width:260px;
  z-index:3;
}

.ai-analytics-bar-cartesian-wrap{
  display:grid;
  gap:8px;
}

.ai-analytics-bar-cartesian-scroll{
  overflow-x:auto;
  overflow-y:hidden;
}

.ai-analytics-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  font-size:11px;
  color:#858ba3;
  justify-content:flex-end;
}

.ai-analytics-legend span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.ai-analytics-legend i{
  width:9px;
  height:9px;
  border-radius:999px;
  display:inline-block;
  box-shadow:0 0 0 3px rgba(255,255,255,.04);
}

.ai-analytics-scorecard{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--ai-border);
  background:var(--ai-bg-soft);
  display:grid;
  gap:8px;
}

.ai-analytics-scorecard-label{
  color:var(--ai-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ai-analytics-scorecard strong{
  font-size:26px;
  letter-spacing:-.04em;
}

.ai-analytics-scorecard-note{
  color:var(--ai-muted);
  line-height:1.45;
}

.ai-analytics-table-wrap{
  overflow:auto;
  border-radius:12px;
  border:1px solid var(--ai-border);
  background:var(--ai-bg-soft);
  max-height:260px;
}

.ai-analytics-table-block{
  display:grid;
  gap:8px;
}

.ai-analytics-table-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.ai-analytics-table-head strong{
  font-size:12px;
  color:var(--ai-muted);
  letter-spacing:.06em;
  text-transform:uppercase;
}

.ai-analytics-table-export{
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--ai-border);
  background:rgba(75, 111, 255, 0.12);
  color:var(--ai-text);
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.ai-analytics-table{
  width:100%;
  min-width:480px;
  border-collapse:collapse;
}

.ai-analytics-table th,
.ai-analytics-table td{
  padding:7px 8px;
  text-align:left;
  border-bottom:1px solid var(--ai-border);
  font-size:12px;
  vertical-align:top;
}

.ai-analytics-table tbody tr:nth-child(odd){
  background:rgba(41, 45, 58, 0.28);
}

.ai-analytics-table tbody tr:nth-child(even){
  background:rgba(31, 34, 43, 0.14);
}

.ai-analytics-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:var(--ai-surface-strong);
  color:var(--ai-muted);
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ai-analytics-details{
  border:1px solid var(--ai-border);
  border-radius:18px;
  background:rgba(255,255,255,.04);
  overflow:hidden;
}

.ai-analytics-details summary{
  cursor:pointer;
  padding:12px 14px;
  color:var(--ai-muted);
  font-weight:700;
}

.ai-analytics-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 2px;
}

.ai-analytics-meta-pill{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  border:1px solid rgba(100, 116, 139, 0.35);
  color:var(--ai-muted);
  font-size:11px;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background:rgba(31, 34, 43, 0.55);
}

.ai-analytics-result-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) minmax(0, .85fr);
  gap:10px;
  align-items:start;
}

.ai-analytics-result-layout-single{
  grid-template-columns:1fr;
  gap:10px;
}

.ai-analytics-chart-pane,
.ai-analytics-detail-pane{
  display:grid;
  gap:8px;
  min-width:0;
}

.ai-analytics-chart-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.ai-analytics-chart-head strong{
  font-size:14px;
  color:var(--ai-text);
}

.ai-analytics-expand-btn{
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--ai-border);
  background:rgba(255,255,255,.06);
  color:var(--ai-text);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.ai-analytics-expand-btn:hover{
  border-color:rgba(97, 195, 255, 0.45);
  background:rgba(97, 195, 255, 0.12);
}

.ai-analytics-expand-btn:focus-visible{
  outline:2px solid rgba(97, 195, 255, 0.58);
  outline-offset:2px;
}

.ai-analytics-expanded-modal{
  position:fixed;
  inset:0;
  z-index:1900;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .2s ease, visibility .2s ease;
}

.ai-analytics-expanded-modal.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.ai-analytics-expanded-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2, 8, 23, 0.82);
  backdrop-filter:blur(2px);
}

.ai-analytics-expanded-dialog{
  position:relative;
  width:min(1100px, 92vw);
  max-height:88vh;
  margin:6vh auto;
  border-radius:18px;
  overflow:hidden;
  background:var(--ai-surface);
  border:1px solid rgba(75, 111, 255, 0.28);
  box-shadow:0 24px 80px rgba(0, 0, 0, 0.55);
  display:grid;
  grid-template-rows:auto minmax(0, 1fr);
}

.ai-analytics-expanded-head{
  padding:14px 16px;
  border-bottom:1px solid var(--ai-border);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  position:sticky;
  top:0;
  z-index:2;
  background:var(--ai-surface);
}

.ai-analytics-expanded-title-wrap{
  display:grid;
  gap:3px;
}

.ai-analytics-expanded-title-wrap strong{
  color:var(--ai-text);
  font-size:16px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ai-analytics-expanded-title-wrap span{
  color:var(--ai-muted);
  font-size:12px;
}

.ai-analytics-scope-badge{
  min-height:26px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(75, 111, 255, 0.28);
  background:rgba(75, 111, 255, 0.12);
  color:var(--ai-text);
  font-size:11px;
  cursor:help;
}

.ai-analytics-expanded-close{
  width:40px;
  height:40px;
}

.modal-close-button{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  line-height:1;
  box-sizing:border-box;
  border:1px solid rgba(75, 111, 255, 0.36);
  background:rgba(11, 30, 62, 0.95);
  color:var(--ai-text);
  cursor:pointer;
  text-align:center;
}

.modal-close-button .close-icon{
  display:block;
  width:20px;
  height:20px;
  line-height:1;
  pointer-events:none;
}

.modal-close-button:hover{
  transform:translateY(-1px);
  background:rgba(19, 41, 82, 0.98);
  border-color:rgba(147, 197, 253, 0.52);
}

.modal-close-button:focus-visible{
  outline:2px solid rgba(125, 211, 252, 0.72);
  outline-offset:2px;
}

.ai-analytics-expanded-body{
  min-height:0;
  overflow:auto;
  padding:14px;
  display:grid;
  gap:10px;
}

.ai-analytics-modal-section{
  border:1px solid rgba(75, 111, 255, 0.14);
  border-radius:12px;
  background:rgba(8, 20, 38, 0.88);
  padding:10px;
}

.ai-analytics-modal-summary .ai-analytics-answer-card{
  max-height:120px;
  overflow:auto;
  line-height:1.55;
  color:var(--ai-text);
}

.ai-analytics-modal-chart .ai-analytics-chart-card-expanded{
  max-height:420px;
  overflow:hidden;
}

.ai-analytics-modal-chart .ai-analytics-chart-svg{
  min-height:280px;
}

.ai-analytics-modal-chart .ai-analytics-horizontal-bar-scroll{
  max-height:360px;
  overflow:auto;
  padding-right:8px;
}

.ai-analytics-modal-chart .ai-analytics-horizontal-bar-scroll .ai-analytics-chart-svg{
  min-height:0;
}

.ai-analytics-modal-table .ai-analytics-table-wrap{
  max-height:240px;
}

.ai-analytics-trend-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.ai-analytics-trend-chip{
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(75, 111, 255, 0.24);
  background:rgba(30, 58, 138, 0.14);
  color:var(--bor-text-soft, #c8cedd);
  font-size:11px;
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.ai-analytics-trend-chip.is-down{
  border-color:rgba(16, 185, 129, 0.28);
  background:rgba(6, 78, 59, 0.24);
  color:#a7f3d0;
}

.ai-analytics-trend-chip.is-up{
  border-color:rgba(239, 68, 68, 0.28);
  background:rgba(127, 29, 29, 0.24);
  color:#fecaca;
}

.ai-analytics-skeleton{
  border-radius:12px;
  border:1px solid var(--ai-border);
  background:linear-gradient(90deg, rgba(41,45,58,.5) 25%, rgba(51,65,85,.55) 37%, rgba(41,45,58,.5) 63%);
  background-size:400% 100%;
  animation:ai-skeleton-shimmer 1.6s ease infinite;
}

.ai-analytics-skeleton-chart{
  height:280px;
}

@keyframes ai-skeleton-shimmer{
  0%{ background-position:100% 0; }
  100%{ background-position:0 0; }
}

body.ai-analytics-modal-open{
  overflow:hidden;
}

.ai-theme-ops,
.ai-theme-ops *{
  scrollbar-width:thin;
  scrollbar-color:rgba(75, 111, 255, 0.45) rgba(31, 34, 43, 0.65);
}

.ai-theme-ops *::-webkit-scrollbar{
  width:8px;
  height:8px;
}

.ai-theme-ops *::-webkit-scrollbar-track{
  background:rgba(31, 34, 43, 0.65);
  border-radius:999px;
}

.ai-theme-ops *::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(75, 111, 255, 0.65), rgba(129, 140, 248, 0.55));
  border-radius:999px;
  border:2px solid rgba(31, 34, 43, 0.85);
}

.ai-theme-ops *::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg, rgba(125, 211, 252, 0.8), rgba(129, 140, 248, 0.75));
}

.ai-theme-ops *::-webkit-scrollbar-corner{
  background:rgba(31, 34, 43, 0.65);
}

.ai-analytics-modal,
.ai-analytics-modal *{
  scrollbar-width:thin;
  scrollbar-color:rgba(75, 111, 255, 0.45) rgba(31, 34, 43, 0.75);
}

.ai-analytics-modal *::-webkit-scrollbar{
  width:8px;
  height:8px;
}

.ai-analytics-modal *::-webkit-scrollbar-track{
  background:rgba(31, 34, 43, 0.75);
  border-radius:999px;
}

.ai-analytics-modal *::-webkit-scrollbar-thumb{
  background:rgba(75, 111, 255, 0.55);
  border-radius:999px;
  border:2px solid rgba(31, 34, 43, 0.9);
}

.ai-analytics-modal *::-webkit-scrollbar-thumb:hover{
  background:rgba(125, 211, 252, 0.75);
}

.ai-analytics-modal *::-webkit-scrollbar-corner{
  background:rgba(31, 34, 43, 0.75);
}

.ai-analytics-composer{
  display:grid;
  gap:12px;
  padding:0 18px 18px;
}

.ai-analytics-composer textarea{
  width:100%;
  min-height:92px;
  resize:vertical;
  border-radius:18px;
  border:1px solid var(--ai-border);
  background:var(--ai-bg-soft);
  color:var(--ai-text);
  padding:14px 16px;
  font:inherit;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}

.ai-analytics-composer textarea:focus{
  border-color:rgba(97, 195, 255, 0.42);
  box-shadow:0 0 0 4px rgba(97, 195, 255, 0.12);
}

.ai-analytics-composer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.ai-analytics-note{
  color:var(--ai-muted);
  font-size:12px;
  line-height:1.45;
}

.ai-analytics-submit{
  min-height:48px;
  border-radius:16px;
  border:1px solid rgba(75, 111, 255, 0.24);
  background:linear-gradient(135deg, var(--ai-accent-2), var(--ai-accent));
  color:#fff;
  padding:0 18px;
  cursor:pointer;
  font-weight:700;
  transition:transform .18s ease, opacity .18s ease;
  box-shadow:0 16px 34px rgba(81, 111, 255, 0.24);
}

.ai-analytics-submit:hover:not(:disabled){
  transform:translateY(-1px);
}

.ai-analytics-submit:disabled{
  opacity:.62;
  cursor:not-allowed;
}

.ai-analytics-error{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(240, 95, 106, 0.24);
  background:rgba(240, 95, 106, 0.1);
  color:#d85d75;
  line-height:1.5;
}

.ai-analytics-card{
  position:relative;
}

.ai-analytics-card .ai-analytics-launcher{
  min-height:220px;
}

.ai-analytics-card .ai-analytics-orb-wrap{
  width:200px;
  height:200px;
}

.ai-analytics-card .ai-analytics-orb-core{
  inset:38px;
  font-size:24px;
}

.ai-analytics-card .ai-analytics-chat-head strong{
  font-size:16px;
}

.ai-analytics-card .ai-analytics-panel{
  margin-top:14px;
}

@media (max-width: 1080px){
  .ai-analytics-hero{
    grid-template-columns:1fr;
  }

  .ai-analytics-workspace{
    grid-template-columns:1fr;
  }

  .ai-analytics-result-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .ai-analytics-workspace{
    grid-template-columns:1fr;
    padding:14px;
  }

  .ai-analytics-result-panel{
    min-height:140px;
  }

  .floating-ai-assistant{
    right:16px;
    bottom:16px;
  }

  .floating-ai-assistant-panel{
    right:0;
    bottom:92px;
    width:min(420px, calc(100vw - 32px));
    height:min(78vh, 720px);
    max-height:min(78vh, 720px);
  }

  .floating-ai-assistant.ai-theme-ops .floating-ai-assistant-panel{
    bottom:calc(100% + 10px);
  }

  .floating-ai-panel-head{
    padding:16px 16px 14px;
  }

  .floating-ai-panel-body,
  .floating-ai-panel-suggestions,
  .floating-ai-panel-composer{
    padding-left:14px;
    padding-right:14px;
  }

  .floating-ai-panel-body{
    max-height:none;
  }

  .floating-ai-orb{
    width:78px;
    height:78px;
  }

  .floating-ai-orb-core{
    inset:13px;
  }

  .floating-ai-orb-core span{
    font-size:19px;
  }

  .floating-ai-orb-icon{
    width:35px;
    height:35px;
  }

  .ai-analytics-launcher{
    min-height:240px;
  }

  .ai-analytics-orb-wrap{
    width:200px;
    height:200px;
  }

  .ai-analytics-orb-core{
    inset:40px;
    font-size:24px;
  }

  .ai-analytics-chat-head{
    padding:16px;
  }

  .ai-analytics-chat-body,
  .ai-analytics-composer{
    padding-left:14px;
    padding-right:14px;
  }

  .ai-analytics-table{
    min-width:420px;
  }

  .ai-analytics-expanded-dialog{
    width:min(96vw, 96vw);
    margin:3vh auto;
    max-height:92vh;
  }

  .ai-analytics-expanded-head{
    padding:10px 12px;
  }

  .ai-analytics-expanded-body{
    padding:10px;
  }

  .ai-analytics-expanded-close{
    width:44px;
    height:44px;
  }

  .ai-analytics-expanded-close.modal-close-button{
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
  }

  .ai-analytics-chart-card{
    max-height:270px;
  }
}

@media (prefers-reduced-motion: reduce){
  .ai-analytics-launcher,
  .ai-analytics-orb-ring,
  .ai-analytics-orb-core,
  .ai-analytics-panel,
  .ai-analytics-orb-badge,
  .floating-ai-assistant-panel,
  .floating-ai-orb,
  .floating-ai-orb-halo,
  .floating-ai-orb-ring,
  .ai-analytics-chip,
  .ai-analytics-submit{
    transition:none;
  }

  .floating-ai-orb-halo,
  .floating-ai-orb-ring,
  .floating-ai-orb-ring-secondary{
    animation:none;
  }
}
/* BOR/Star Admin typography and controls normalization. */
.ai-theme-ops,
.ai-theme-ops *,
.ai-analytics-modal,
.ai-analytics-modal *{
  font-family:var(--font-sans, Inter, "Segoe UI", Roboto, Arial, sans-serif);
}
.ai-theme-ops{
  --ai-bg:var(--bor-bg, #1f222b);
  --ai-bg-soft:var(--bor-bg-soft, #222631);
  --ai-surface:var(--bor-surface, #252936);
  --ai-surface-strong:var(--bor-surface-soft, #292d3a);
  --ai-border:var(--bor-border, rgba(255,255,255,.06));
  --ai-text:var(--bor-text, #f3f5fb);
  --ai-muted:var(--bor-text-muted, #8c94aa);
  --ai-accent:var(--bor-primary, #4b6fff);
  --ai-accent-2:var(--bor-cyan, #45c6d6);
  --ai-chip:var(--bor-bg-soft, #222631);
  --ai-shadow:0 14px 28px rgba(0,0,0,.12);
}
.ai-theme-ops h1,
.ai-theme-ops h2,
.ai-theme-ops h3,
.ai-theme-ops .ai-analytics-title,
.ai-theme-ops .ai-analytics-card-title,
.ai-theme-ops .ai-analytics-message-title{
  color:var(--ai-text);
  font-weight:600;
  letter-spacing:0;
  text-shadow:none;
}
.ai-theme-ops .ai-analytics-title{
  font-size:28px;
  line-height:32px;
}
.ai-theme-ops .ai-analytics-card-title,
.ai-theme-ops .ai-analytics-message-title{
  font-size:16px;
  line-height:20px;
}
.ai-theme-ops .ai-analytics-subtitle,
.ai-theme-ops .ai-analytics-note,
.ai-theme-ops .ai-analytics-muted,
.ai-theme-ops .ai-analytics-card-subtitle,
.ai-theme-ops .ai-analytics-message-meta,
.ai-theme-ops .ai-analytics-legend,
.ai-theme-ops .ai-analytics-axis-label,
.ai-theme-ops .ai-analytics-caption{
  color:var(--ai-muted);
  font-size:12px;
  line-height:16px;
  font-weight:400;
  letter-spacing:0;
}
.ai-theme-ops button,
.ai-theme-ops .ai-analytics-submit,
.ai-theme-ops .modal-close-button{
  min-height:34px;
  border-radius:10px;
  border:1px solid var(--ai-border);
  background:var(--bor-surface-elevated, #2d3240);
  color:var(--bor-text-soft, #c8cedd);
  padding:7px 12px;
  font-size:13px;
  line-height:18px;
  font-weight:600;
  letter-spacing:0;
  box-shadow:none;
}
.ai-theme-ops .ai-analytics-submit{
  background:var(--ai-accent);
  border-color:rgba(75,111,255,.72);
  color:#fff;
}
.ai-theme-ops button:hover:not(:disabled),
.ai-theme-ops .modal-close-button:hover:not(:disabled){
  background:#343948;
  border-color:var(--bor-border-strong, rgba(255,255,255,.10));
  color:var(--bor-text, #f3f5fb);
  transform:translateY(-1px);
}
.ai-theme-ops .ai-analytics-submit:hover:not(:disabled){
  background:var(--bor-primary-hover, #5f7cff);
}
.ai-theme-ops input,
.ai-theme-ops select,
.ai-theme-ops textarea,
.ai-theme-ops .ai-analytics-composer textarea{
  background:var(--bor-surface-soft, #292d3a);
  border:1px solid var(--ai-border);
  border-radius:10px;
  color:var(--ai-text);
  font-size:13px;
  line-height:18px;
  font-weight:400;
  box-shadow:none;
}
.ai-theme-ops input:focus,
.ai-theme-ops select:focus,
.ai-theme-ops textarea:focus,
.ai-theme-ops .ai-analytics-composer textarea:focus{
  border-color:rgba(75,111,255,.68);
  box-shadow:0 0 0 3px rgba(75,111,255,.14);
}
.ai-theme-ops .ai-analytics-chip,
.ai-theme-ops .ai-analytics-badge,
.ai-theme-ops .ai-analytics-pill,
.ai-theme-ops .ai-analytics-status-pill{
  border-radius:999px;
  background:rgba(255,255,255,.045);
  border-color:var(--ai-border);
  color:var(--ai-muted);
  font-size:11px;
  line-height:14px;
  font-weight:600;
  letter-spacing:.01em;
  box-shadow:none;
}
/* Borderless AI surfaces: match BOR card hierarchy, no 1px frames. */
.ai-theme-ops .floating-ai-panel,
.ai-theme-ops .ai-analytics-launcher,
.ai-theme-ops .ai-analytics-chat-window,
.ai-theme-ops .ai-analytics-result-panel,
.ai-theme-ops .ai-analytics-answer-card,
.ai-theme-ops .ai-analytics-suggestions-panel,
.ai-theme-ops .ai-analytics-suggestion,
.ai-theme-ops .ai-analytics-card,
.ai-theme-ops .ai-analytics-panel,
.ai-theme-ops .ai-analytics-kpi,
.ai-theme-ops .ai-analytics-table-wrap,
.ai-theme-ops .ai-analytics-chart-card,
.ai-theme-ops .ai-analytics-empty-state,
.ai-theme-ops .ai-analytics-loading-card{
  border:none;
  outline:none;
  box-shadow:0 12px 26px rgba(0,0,0,.10);
}
.ai-theme-ops .ai-analytics-suggestion,
.ai-theme-ops .ai-analytics-answer-card,
.ai-theme-ops .ai-analytics-kpi,
.ai-theme-ops .ai-analytics-empty-state,
.ai-theme-ops .ai-analytics-loading-card{
  box-shadow:none;
}
/* Flat AI metrics: simple numbers sit on the page, not in mini cards. */
.ai-theme-ops .ai-analytics-kpis,
.ai-theme-ops .ai-analytics-metrics,
.ai-theme-ops .ai-analytics-stats{
  background:transparent;
  border:none;
  outline:none;
  box-shadow:none;
  gap:clamp(22px, 3vw, 38px);
}
.ai-theme-ops .ai-analytics-kpi,
.ai-theme-ops .ai-analytics-metric,
.ai-theme-ops .ai-analytics-stat{
  background:transparent;
  border:none;
  outline:none;
  box-shadow:none;
  border-radius:0;
  padding:0;
}
.ai-theme-ops .ai-analytics-kpi-label,
.ai-theme-ops .ai-analytics-metric-label,
.ai-theme-ops .ai-analytics-stat-label{
  color:var(--bor-text-muted, #8c94aa);
  font-size:12px;
  line-height:16px;
  font-weight:500;
  letter-spacing:.01em;
  text-transform:none;
  text-shadow:none;
}
.ai-theme-ops .ai-analytics-kpi-value,
.ai-theme-ops .ai-analytics-metric-value,
.ai-theme-ops .ai-analytics-stat-value{
  color:var(--bor-text, #f3f5fb);
  font-size:28px;
  line-height:1.1;
  font-weight:600;
  letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;
  text-shadow:none;
}
/* Star Admin outline buttons for AI controls. */
.ai-theme-ops button,
.ai-theme-ops .ai-analytics-chip,
.ai-theme-ops .ai-analytics-expand-btn,
.ai-theme-ops .modal-close-button{
  height:36px;
  min-height:36px;
  padding:0 16px;
  border-radius:8px;
  border:1px solid var(--bor-border-strong, rgba(255,255,255,.10));
  background:transparent;
  color:var(--bor-text-muted, #8c94aa);
  box-shadow:none;
  text-shadow:none;
  outline:none;
  font-size:13px;
  line-height:1;
  font-weight:500;
  letter-spacing:0;
}
.ai-theme-ops .ai-analytics-chip{
  height:32px;
  min-height:32px;
  padding:0 12px;
  font-size:12px;
}
.ai-theme-ops button:hover:not(:disabled),
.ai-theme-ops .ai-analytics-chip:hover:not(:disabled),
.ai-theme-ops .ai-analytics-expand-btn:hover:not(:disabled),
.ai-theme-ops .modal-close-button:hover:not(:disabled){
  color:var(--bor-text-soft, #c8cedd);
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.03);
  box-shadow:none;
  transform:translateY(-1px);
}
.ai-theme-ops button:focus-visible,
.ai-theme-ops .ai-analytics-chip:focus-visible,
.ai-theme-ops .ai-analytics-expand-btn:focus-visible,
.ai-theme-ops .modal-close-button:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(75,111,255,.22);
}
.ai-theme-ops .ai-analytics-submit{
  height:36px;
  min-height:36px;
  padding:0 16px;
  border-radius:8px;
  background:var(--bor-primary, #4b6fff);
  border-color:var(--bor-primary, #4b6fff);
  color:#fff;
  box-shadow:none;
}
.ai-theme-ops .ai-analytics-submit:hover:not(:disabled){
  background:var(--bor-primary-hover, #5f7cff);
  border-color:var(--bor-primary-hover, #5f7cff);
  color:#fff;
  box-shadow:none;
}
.ai-theme-ops button:disabled,
.ai-theme-ops .ai-analytics-submit:disabled,
.ai-theme-ops .ai-analytics-chip:disabled{
  opacity:.48;
  cursor:not-allowed;
  transform:none;
  background:transparent;
  box-shadow:none;
}

/* BOR spacing rhythm: keep AI panels aligned with the Hub page/header/card system. */
.ai-theme-ops .floating-ai-panel-head,
.ai-theme-ops .ai-analytics-card-head,
.ai-theme-ops .ai-analytics-result-head{
  gap:var(--header-gap, 16px);
  margin-bottom:var(--space-5, 20px);
}
.ai-theme-ops .floating-ai-panel-body,
.ai-theme-ops .ai-analytics-chat-window,
.ai-theme-ops .ai-analytics-result-panel,
.ai-theme-ops .ai-analytics-suggestions-panel,
.ai-theme-ops .ai-analytics-panel,
.ai-theme-ops .ai-analytics-chart-card{
  padding:var(--card-padding, 24px);
}
.ai-theme-ops .ai-analytics-composer-actions,
.ai-theme-ops .floating-ai-panel-actions,
.ai-theme-ops .ai-operator-coach-actions{
  gap:var(--space-3, 12px);
  flex-wrap:wrap;
}
@media (max-width: 760px){
  .ai-theme-ops .floating-ai-panel-body,
  .ai-theme-ops .ai-analytics-chat-window,
  .ai-theme-ops .ai-analytics-result-panel,
  .ai-theme-ops .ai-analytics-suggestions-panel,
  .ai-theme-ops .ai-analytics-panel,
  .ai-theme-ops .ai-analytics-chart-card{
    padding:var(--card-padding, 18px);
  }
}

/* AI Analytics cleanup: operational dark admin surface, no hero/banner gradients. */
.ai-theme-ops .ai-analytics-hero,
.ai-theme-ops .ai-analytics-launcher,
.ai-theme-ops .ai-analytics-kicker,
.ai-theme-ops .ai-analytics-chat-head,
.ai-theme-ops .ai-analytics-status-pill{
  display:none;
}

.ai-theme-ops .floating-ai-assistant-panel{
  width:min(460px, calc(100vw - 32px));
  height:min(80vh, 760px);
  max-height:min(80vh, 760px);
}

.ai-theme-ops .floating-ai-panel,
.ai-theme-ops .ai-analytics-chat-window,
.ai-theme-ops .ai-analytics-input-column,
.ai-theme-ops .ai-analytics-output-column{
  background:var(--bor-surface, #252936);
  border:none;
  outline:none;
  box-shadow:0 14px 30px rgba(0,0,0,.14);
}

.ai-theme-ops .floating-ai-panel{
  border-radius:18px;
  grid-template-rows:auto minmax(0, 1fr) auto auto;
  overflow:hidden;
}

.ai-theme-ops .floating-ai-panel-head{
  padding:18px 18px 12px;
  background:transparent;
  border-bottom:none;
  align-items:flex-start;
}

.ai-theme-ops .floating-ai-panel-copy strong{
  font-size:16px;
  line-height:20px;
  font-weight:600;
  letter-spacing:0;
}

.ai-theme-ops .floating-ai-panel-copy span{
  color:var(--bor-text-muted, #8c94aa);
  font-size:12px;
  line-height:16px;
}

.ai-theme-ops .floating-ai-state{
  min-height:28px;
  background:transparent;
  border:1px solid var(--bor-border-strong, rgba(255,255,255,.10));
  color:var(--bor-text-muted, #8c94aa);
  font-size:10px;
  font-weight:600;
  letter-spacing:.04em;
}

.ai-theme-ops .floating-ai-panel-body{
  min-height:0;
  overflow:auto;
  padding:18px;
}

.ai-theme-ops .floating-ai-panel-suggestions{
  padding:0 18px 14px;
}

.ai-theme-ops .floating-ai-panel-composer{
  padding:0 18px 18px;
  background:transparent;
}

.ai-theme-ops .floating-ai-panel-close{
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  padding:0;
  border-color:transparent;
}

.ai-theme-ops .floating-ai-panel-close:hover{
  background:rgba(255,255,255,.04);
  border-color:var(--bor-border-strong, rgba(255,255,255,.10));
  transform:none;
}

.ai-theme-ops .floating-ai-orb{
  width:64px;
  height:64px;
  filter:none;
}

.ai-theme-ops .floating-ai-orb-halo{
  opacity:.35;
  filter:blur(10px);
}

.ai-theme-ops .floating-ai-orb-ring{
  box-shadow:none;
}

.ai-theme-ops .floating-ai-orb-core{
  inset:10px;
  background:var(--bor-surface-elevated, #2d3240);
  border:none;
  box-shadow:none;
}

.ai-theme-ops .floating-ai-orb-icon{
  width:30px;
  height:30px;
}

.ai-theme-ops .ai-analytics-page-panel{
  background:transparent;
  border:none;
  box-shadow:none;
  padding:0;
}

.ai-theme-ops.ai-analytics-shell,
.ai-theme-ops .ai-analytics-shell,
.ai-analytics-page-panel .panel-inner{
  background:transparent;
  border:none;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-card-head{
  display:grid;
  gap:var(--space-2, 8px);
  margin:0 0 var(--space-6, 24px);
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-card-head h2{
  margin:0;
  color:var(--bor-text, #f3f5fb);
  font-size:28px;
  line-height:32px;
  font-weight:600;
  letter-spacing:-.02em;
  text-shadow:none;
}

.ai-theme-ops .ai-analytics-card-head p{
  max-width:760px;
  color:var(--bor-text-soft, #c8cedd);
  font-size:14px;
  line-height:20px;
}

.ai-theme-ops .ai-analytics-card-head p span{
  color:var(--bor-text-muted, #8c94aa);
}

.ai-theme-ops .ai-analytics-chat-window{
  background:transparent;
  border:none;
  box-shadow:none;
  border-radius:0;
  overflow:visible;
  padding:0;
}

.ai-theme-ops .ai-analytics-workspace{
  grid-template-columns:minmax(320px, .9fr) minmax(420px, 1.1fr);
  gap:var(--section-gap, 28px);
  padding:0;
  align-items:start;
}

.ai-theme-ops .ai-analytics-input-column,
.ai-theme-ops .ai-analytics-output-column{
  align-self:stretch;
  border-radius:18px;
  padding:var(--card-padding, 24px);
  gap:var(--space-5, 20px);
}

.ai-theme-ops .ai-analytics-chat-body,
.ai-theme-ops .ai-analytics-result-panel,
.ai-theme-ops .ai-analytics-suggestions-panel{
  background:transparent;
  border:none;
  outline:none;
  box-shadow:none;
  padding:0;
}

.ai-theme-ops .ai-analytics-chat-body{
  min-height:112px;
}

.ai-theme-ops .ai-analytics-result-panel{
  min-height:260px;
}

.ai-theme-ops .ai-analytics-result-panel.is-empty{
  min-height:260px;
}

.ai-theme-ops .ai-analytics-result-head{
  margin:0;
  gap:var(--space-1, 4px);
}

.ai-theme-ops .ai-analytics-result-head strong{
  color:var(--bor-text, #f3f5fb);
  font-size:16px;
  line-height:20px;
  font-weight:600;
}

.ai-theme-ops .ai-analytics-result-head span,
.ai-theme-ops .ai-analytics-note{
  color:var(--bor-text-muted, #8c94aa);
  font-size:12px;
  line-height:16px;
  font-weight:500;
}

.ai-theme-ops .ai-analytics-bubble{
  padding:12px 14px;
  border-radius:14px;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-message-user .ai-analytics-bubble{
  background:rgba(75,111,255,.16);
  color:var(--bor-text, #f3f5fb);
  border-bottom-right-radius:6px;
}

.ai-theme-ops .ai-analytics-message-assistant .ai-analytics-bubble{
  background:var(--bor-surface-soft, #292d3a);
  border:none;
  color:var(--bor-text-soft, #c8cedd);
  border-bottom-left-radius:6px;
}

.ai-theme-ops .ai-analytics-answer-card,
.ai-theme-ops .ai-analytics-empty-state,
.ai-theme-ops .ai-analytics-scorecard,
.ai-theme-ops .ai-analytics-table-wrap,
.ai-theme-ops .ai-analytics-chart-card{
  background:var(--bor-surface-soft, #292d3a);
  border:none;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-answer-card{
  max-height:220px;
}

.ai-theme-ops .ai-analytics-chart-card{
  max-height:none;
  overflow:visible;
}

.ai-theme-ops .floating-ai-panel .ai-analytics-chart-card{
  max-height:260px;
  overflow:auto;
}

.ai-theme-ops .ai-analytics-chart-svg{
  max-width:100%;
}

.ai-theme-ops .ai-analytics-chip{
  background:transparent;
  border:1px solid var(--bor-border-strong, rgba(255,255,255,.10));
  color:var(--bor-text-muted, #8c94aa);
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-chip:hover{
  background:rgba(255,255,255,.03);
  border-color:rgba(255,255,255,.18);
  color:var(--bor-text-soft, #c8cedd);
  transform:none;
}

.ai-theme-ops .ai-analytics-table-export,
.ai-theme-ops .ai-analytics-expand-btn{
  background:transparent;
  border-color:var(--bor-border-strong, rgba(255,255,255,.10));
  color:var(--bor-text-muted, #8c94aa);
}

.ai-theme-ops .ai-analytics-table-export:hover,
.ai-theme-ops .ai-analytics-expand-btn:hover{
  background:rgba(255,255,255,.03);
  border-color:rgba(255,255,255,.18);
  color:var(--bor-text-soft, #c8cedd);
}

@media (max-width: 1180px){
  .ai-theme-ops .ai-analytics-workspace{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .ai-theme-ops .floating-ai-assistant{
    right:16px;
    bottom:16px;
  }
  .ai-theme-ops .floating-ai-assistant-panel{
    width:calc(100vw - 32px);
    height:min(80vh, 680px);
  }
  .ai-theme-ops .ai-analytics-card-head h2{
    font-size:24px;
    line-height:30px;
  }
  .ai-theme-ops .ai-analytics-input-column,
  .ai-theme-ops .ai-analytics-output-column{
    padding:var(--card-padding, 18px);
  }
}

/* AI Analytics final cleanup: remove banner-style surfaces and align widget/page. */
.ai-theme-ops .ai-analytics-hero,
.ai-theme-ops .ai-analytics-launcher,
.ai-theme-ops .ai-analytics-orb-wrap,
.ai-theme-ops .ai-analytics-kicker,
.ai-theme-ops .ai-analytics-chat-head,
.ai-theme-ops .ai-analytics-status-pill{
  display:none;
}

.ai-theme-ops .ai-analytics-page-panel .panel-inner{
  background:transparent;
  border:none;
  outline:none;
  box-shadow:none;
  padding:0;
}

.ai-theme-ops .ai-analytics-card-head{
  margin-bottom:var(--section-gap, 28px);
}

.ai-theme-ops .ai-analytics-card-head p,
.ai-theme-ops .ai-analytics-card-head p span{
  color:var(--bor-text-muted, #8c94aa);
  font-size:13px;
  line-height:20px;
  font-weight:400;
}

.ai-theme-ops .ai-analytics-input-column,
.ai-theme-ops .ai-analytics-output-column{
  background:var(--bor-surface, #252936);
  border:none;
  outline:none;
  box-shadow:0 14px 30px rgba(0,0,0,.12);
}

.ai-theme-ops .ai-analytics-output-column{
  align-self:start;
}

.ai-theme-ops .ai-analytics-empty-state{
  border-radius:16px;
  padding:20px;
}

.ai-theme-ops .ai-analytics-composer{
  display:grid;
  gap:var(--space-3, 12px);
}

.ai-theme-ops .ai-analytics-composer textarea{
  min-height:112px;
  resize:vertical;
}

.ai-theme-ops .ai-analytics-composer-actions{
  align-items:center;
  justify-content:space-between;
  gap:var(--space-3, 12px);
}

.floating-ai-assistant.ai-theme-ops{
  right:24px;
  bottom:24px;
  gap:12px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-assistant-panel{
  width:min(460px, calc(100vw - 32px));
  height:min(80vh, 760px);
  max-height:min(80vh, 760px);
  bottom:calc(100% + 12px);
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel{
  background:var(--bor-surface, #252936);
  border:none;
  outline:none;
  box-shadow:0 18px 40px rgba(0,0,0,.24);
  border-radius:18px;
  grid-template-rows:auto minmax(0, 1fr) auto auto;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-head{
  background:transparent;
  border-bottom:none;
  padding:18px 18px 12px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-copy strong{
  font-size:15px;
  line-height:20px;
  font-weight:600;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-copy span{
  color:var(--bor-text-muted, #8c94aa);
  font-size:12px;
  line-height:16px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-state{
  min-height:28px;
  padding:0 10px;
  background:rgba(75,111,255,.12);
  color:#dce5ff;
  border:none;
  font-size:10px;
  font-weight:600;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-body{
  min-height:0;
  overflow:auto;
  padding:12px 18px 16px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-suggestions{
  padding:0 18px 14px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-composer{
  padding:0 18px 18px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-panel-composer textarea{
  min-height:88px;
  max-height:150px;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-orb{
  width:58px;
  height:58px;
  border-radius:18px;
  background:var(--bor-surface-elevated, #2d3240);
  border:1px solid var(--bor-border, rgba(255,255,255,.06));
  box-shadow:0 12px 28px rgba(0,0,0,.22);
}

.floating-ai-assistant.ai-theme-ops .floating-ai-orb-halo,
.floating-ai-assistant.ai-theme-ops .floating-ai-orb-ring,
.floating-ai-assistant.ai-theme-ops .floating-ai-orb-ring-secondary{
  display:none;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-orb-core{
  inset:0;
  border:none;
  background:transparent;
  box-shadow:none;
}

.floating-ai-assistant.ai-theme-ops .floating-ai-orb-icon{
  width:28px;
  height:28px;
  opacity:.9;
}

.floating-ai-assistant.ai-theme-ops .ai-analytics-chart-card{
  max-height:260px;
  overflow:hidden;
}

.floating-ai-assistant.ai-theme-ops .ai-analytics-chart-svg{
  max-height:240px;
}

@media (max-width: 760px){
  .floating-ai-assistant.ai-theme-ops{
    right:16px;
    bottom:16px;
  }

  .floating-ai-assistant.ai-theme-ops .floating-ai-assistant-panel{
    width:calc(100vw - 32px);
    height:min(80vh, 680px);
    max-height:min(80vh, 680px);
  }
}

/* AI Analytics chart typography and premium smoothing overrides. */
.ai-theme-ops .ai-analytics-chart-card{
  padding:22px 24px 18px;
  background:var(--bor-surface-soft, #292d3a);
  border:none;
  outline:none;
  box-shadow:none;
  border-radius:18px;
}

.ai-theme-ops .ai-analytics-chart-svg{
  font-family:Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.ai-theme-ops .ai-analytics-chart-svg text,
.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-chart-tick,
.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-axis-value,
.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-axis-label{
  fill:var(--bor-text-muted, #8c94aa);
  color:var(--bor-text-muted, #8c94aa);
  font-family:Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size:11px;
  line-height:1;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
  text-shadow:none;
  paint-order:normal;
  stroke:transparent;
  stroke-width:0;
  font-variant-numeric:tabular-nums;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-axis-label,
.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-axis-label-diagonal{
  font-size:10.5px;
  font-weight:500;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-axis{
  stroke:rgba(255,255,255,.08);
  stroke-width:.8;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-grid-line{
  stroke:rgba(255,255,255,.055);
  stroke-width:.8;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-line-path{
  fill:none;
  stroke-width:2.15;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:none;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-line-area{
  pointer-events:none;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-line-dot{
  r:2.6px;
  fill:var(--bor-warning, #f4a24f);
  stroke:var(--bor-surface-soft, #292d3a);
  stroke-width:1.5;
  filter:none;
}

.ai-theme-ops .ai-analytics-chart-svg .ai-analytics-line-dot:hover{
  r:5px;
  filter:drop-shadow(0 8px 14px rgba(244,162,79,.20));
}

.floating-ai-assistant.ai-theme-ops .ai-analytics-chart-card{
  padding:18px;
  max-height:260px;
  overflow:hidden;
}

/* BOR premium expanded analytics modal: analytical view, not a debug panel. */
.ai-theme-ops.ai-analytics-modal,
.ai-theme-ops.ai-analytics-modal *{
  font-family:var(--font-sans, Inter, "Segoe UI", Roboto, Arial, sans-serif);
}

.ai-theme-ops .ai-analytics-expanded-backdrop{
  background:rgba(5,8,18,.68);
  backdrop-filter:blur(6px);
}

.ai-theme-ops .ai-analytics-expanded-dialog{
  width:min(1180px, 94vw);
  max-height:88vh;
  margin:clamp(18px, 4vh, 42px) auto;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr);
  overflow:hidden;
  background:var(--bor-surface, #252936);
  color:var(--bor-text, #f3f5fb);
  border:none;
  outline:none;
  border-radius:20px;
  box-shadow:0 28px 80px rgba(0,0,0,.42);
}

.ai-theme-ops .ai-analytics-expanded-head{
  padding:22px 24px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  background:var(--bor-surface, #252936);
  border:none;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-expanded-title-wrap{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

.ai-theme-ops .ai-analytics-expanded-title-wrap strong{
  flex:1 1 540px;
  min-width:220px;
  color:var(--bor-text, #f3f5fb);
  font-size:20px;
  line-height:1.25;
  font-weight:600;
  letter-spacing:0;
  text-shadow:none;
  -webkit-text-stroke:0;
  display:block;
  overflow:visible;
  -webkit-line-clamp:unset;
  -webkit-box-orient:initial;
}

.ai-theme-ops .ai-analytics-expanded-title-wrap span{
  display:inline-flex;
  align-items:center;
  min-width:0;
}

.ai-theme-ops .ai-analytics-scope-badge{
  min-height:28px;
  height:28px;
  padding:0 11px;
  border-radius:999px;
  border:none;
  background:var(--bor-primary-soft, rgba(75,111,255,.16));
  color:#dce5ff;
  box-shadow:none;
  font-size:11px;
  line-height:1;
  font-weight:600;
  letter-spacing:.01em;
  text-transform:none;
}

.ai-theme-ops .ai-analytics-expanded-close.modal-close-button{
  width:36px;
  min-width:36px;
  height:36px;
  padding:0;
  border-radius:10px;
  border:1px solid var(--bor-border-strong, rgba(255,255,255,.10));
  background:transparent;
  color:var(--bor-text-muted, #8c94aa);
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-expanded-close.modal-close-button:hover:not(:disabled){
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.18);
  color:var(--bor-text-soft, #c8cedd);
  transform:none;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-expanded-close.modal-close-button .close-icon{
  width:18px;
  height:18px;
}

.ai-theme-ops .ai-analytics-expanded-body{
  min-height:0;
  overflow:auto;
  padding:0 24px 24px;
  display:grid;
  gap:20px;
}

.ai-theme-ops .ai-analytics-modal-section{
  background:transparent;
  border:none;
  outline:none;
  box-shadow:none;
  border-radius:0;
  padding:0;
}

.ai-theme-ops .ai-analytics-modal-summary{
  display:grid;
  gap:14px;
}

.ai-theme-ops .ai-analytics-modal-summary .ai-analytics-answer-card{
  max-height:none;
  overflow:visible;
  padding:16px 18px;
  border:none;
  outline:none;
  border-radius:16px;
  background:var(--bor-surface-soft, #292d3a);
  color:var(--bor-text-soft, #c8cedd);
  box-shadow:none;
  line-height:1.55;
  font-size:14px;
}

.ai-theme-ops .ai-analytics-modal-summary .ai-analytics-answer-card p{
  margin:0;
}

.ai-theme-ops .ai-analytics-trend-chips{
  gap:8px;
}

.ai-theme-ops .ai-analytics-trend-chip{
  min-height:28px;
  padding:0 11px;
  border:none;
  border-radius:999px;
  background:rgba(255,255,255,.045);
  color:var(--bor-text-muted, #8c94aa);
  box-shadow:none;
  font-size:12px;
  line-height:1;
  font-weight:500;
}

.ai-theme-ops .ai-analytics-trend-chip strong{
  color:var(--bor-text-soft, #c8cedd);
  font-weight:600;
}

.ai-theme-ops .ai-analytics-trend-chip.is-down{
  background:rgba(69,199,138,.12);
  color:#a7f3d0;
  border:none;
}

.ai-theme-ops .ai-analytics-trend-chip.is-up{
  background:rgba(240,95,106,.12);
  color:#fecaca;
  border:none;
}

.ai-theme-ops .ai-analytics-modal-chart{
  background:var(--bor-surface-soft, #292d3a);
  border:none;
  outline:none;
  border-radius:18px;
  padding:24px 26px;
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-modal-chart .ai-analytics-chart-card-expanded{
  max-height:none;
  min-height:420px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:0;
  background:transparent;
  border:none;
  outline:none;
  box-shadow:none;
  border-radius:0;
}

.ai-theme-ops .ai-analytics-modal-chart .ai-analytics-chart-svg{
  min-height:390px;
  max-height:none;
  display:block;
}

.ai-theme-ops .ai-analytics-modal-chart .ai-analytics-bar-cartesian-scroll{
  padding:0 0 4px;
}

.ai-theme-ops .ai-analytics-modal-chart .ai-analytics-horizontal-bar-scroll{
  max-height:520px;
  overflow:auto;
  padding-right:8px;
}

.ai-theme-ops .ai-analytics-modal-table{
  display:grid;
  gap:12px;
  padding:18px 20px;
  border-radius:18px;
  background:var(--bor-surface-soft, #292d3a);
}

.ai-theme-ops .ai-analytics-modal-table .ai-analytics-table-block{
  gap:12px;
}

.ai-theme-ops .ai-analytics-table-head{
  min-height:36px;
  gap:12px;
}

.ai-theme-ops .ai-analytics-table-head strong{
  color:var(--bor-text, #f3f5fb);
  font-size:16px;
  line-height:20px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}

.ai-theme-ops .ai-analytics-table-export{
  height:36px;
  min-height:36px;
  padding:0 14px;
  border-radius:8px;
  border:1px solid var(--bor-border-strong, rgba(255,255,255,.10));
  background:transparent;
  color:var(--bor-text-muted, #8c94aa);
  box-shadow:none;
  font-size:13px;
  font-weight:500;
}

.ai-theme-ops .ai-analytics-table-export:hover{
  background:rgba(255,255,255,.035);
  border-color:rgba(255,255,255,.18);
  color:var(--bor-text-soft, #c8cedd);
}

.ai-theme-ops .ai-analytics-modal-table .ai-analytics-table-wrap{
  max-height:360px;
  overflow:auto;
  border:none;
  outline:none;
  border-radius:14px;
  background:rgba(255,255,255,.025);
  box-shadow:none;
}

.ai-theme-ops .ai-analytics-table{
  min-width:560px;
  font-size:13px;
  line-height:18px;
}

.ai-theme-ops .ai-analytics-table th,
.ai-theme-ops .ai-analytics-table td{
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.055);
  color:var(--bor-text-soft, #c8cedd);
}

.ai-theme-ops .ai-analytics-table th{
  background:var(--bor-surface-soft, #292d3a);
  color:var(--bor-text-muted, #8c94aa);
  font-size:11px;
  font-weight:600;
  letter-spacing:.035em;
  text-transform:uppercase;
}

.ai-theme-ops .ai-analytics-table tbody tr:nth-child(odd),
.ai-theme-ops .ai-analytics-table tbody tr:nth-child(even){
  background:transparent;
}

.ai-theme-ops .ai-analytics-table tbody tr:hover{
  background:rgba(255,255,255,.035);
}

.ai-theme-ops .ai-analytics-modal-footer{
  padding:0 0 2px;
  color:var(--bor-text-faint, #687084);
  font-size:12px;
}

.ai-theme-ops.ai-analytics-modal,
.ai-theme-ops.ai-analytics-modal *{
  scrollbar-width:thin;
  scrollbar-color:rgba(140,148,170,.34) rgba(255,255,255,.035);
}

.ai-theme-ops.ai-analytics-modal *::-webkit-scrollbar{
  width:7px;
  height:7px;
}

.ai-theme-ops.ai-analytics-modal *::-webkit-scrollbar-track{
  background:rgba(255,255,255,.035);
  border-radius:999px;
}

.ai-theme-ops.ai-analytics-modal *::-webkit-scrollbar-thumb{
  background:rgba(140,148,170,.34);
  border-radius:999px;
  border:2px solid transparent;
  background-clip:content-box;
}

.ai-theme-ops.ai-analytics-modal *::-webkit-scrollbar-thumb:hover{
  background:rgba(140,148,170,.52);
  background-clip:content-box;
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-expanded-backdrop{
  background:rgba(15,23,42,.36);
  backdrop-filter:blur(6px);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-expanded-dialog,
body[data-theme="light"] .ai-theme-ops .ai-analytics-expanded-head{
  background:var(--bor-light-surface, #ffffff);
  color:var(--bor-light-text, #182033);
  box-shadow:0 28px 80px rgba(15,23,42,.18);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-expanded-title-wrap strong{
  color:var(--bor-light-text, #182033);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-scope-badge{
  background:var(--bor-light-primary-soft, rgba(65,105,225,.10));
  color:var(--bor-light-primary-hover, #3157c9);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-modal-summary .ai-analytics-answer-card,
body[data-theme="light"] .ai-theme-ops .ai-analytics-modal-chart,
body[data-theme="light"] .ai-theme-ops .ai-analytics-modal-table{
  background:var(--bor-light-surface-soft, #f8fafc);
  color:var(--bor-light-text-soft, #334155);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-trend-chip{
  background:#ffffff;
  color:var(--bor-light-text-muted, #64748b);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-trend-chip strong{
  color:var(--bor-light-text-soft, #334155);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-table-wrap{
  background:#ffffff;
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-table th{
  background:#f8fafc;
  color:var(--bor-light-text-muted, #64748b);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-table td{
  color:var(--bor-light-text-soft, #334155);
  border-bottom-color:rgba(18,28,45,.07);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-table tbody tr:hover{
  background:#f8fafc;
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-expanded-close.modal-close-button,
body[data-theme="light"] .ai-theme-ops .ai-analytics-table-export{
  border-color:var(--bor-light-border-strong, rgba(18,28,45,.12));
  color:var(--bor-light-text-muted, #64748b);
}

body[data-theme="light"] .ai-theme-ops .ai-analytics-expanded-close.modal-close-button:hover:not(:disabled),
body[data-theme="light"] .ai-theme-ops .ai-analytics-table-export:hover{
  background:#f1f5f9;
  border-color:rgba(18,28,45,.18);
  color:var(--bor-light-text, #182033);
}

@media (max-width:760px){
  .ai-theme-ops .ai-analytics-expanded-dialog{
    width:96vw;
    margin:2vh auto;
    max-height:94vh;
    border-radius:18px;
  }
  .ai-theme-ops .ai-analytics-expanded-head{
    padding:18px 18px 14px;
  }
  .ai-theme-ops .ai-analytics-expanded-title-wrap{
    display:grid;
    gap:10px;
  }
  .ai-theme-ops .ai-analytics-expanded-title-wrap strong{
    font-size:18px;
    min-width:0;
  }
  .ai-theme-ops .ai-analytics-expanded-body{
    padding:0 18px 18px;
    gap:16px;
  }
  .ai-theme-ops .ai-analytics-modal-chart{
    padding:18px;
  }
  .ai-theme-ops .ai-analytics-modal-chart .ai-analytics-chart-svg{
    min-height:300px;
  }
  .ai-theme-ops .ai-analytics-modal-table{
    padding:16px;
  }
  .ai-theme-ops .ai-analytics-table-head{
    display:grid;
    align-items:start;
  }
  .ai-theme-ops .ai-analytics-table-export{
    justify-self:start;
  }
}
