/* ═══════════════════════════════════════════════════════════
   SAI Private User Hub — Cyber-Analyst Design System
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  --deep-space: #0D1117;
  --analyst-slate: #161B22;
  --surface: #1C2333;
  --surface-2: #21283B;
  --primary-signal: #58A6FF;
  /* Electric Blue */
  --ai-signal: #BC8CFF;
  /* Soft Purple */
  --critical-alert: #F85149;
  --success: #3FB950;
  --amber: #F0B429;
  --text: #E6EDF3;
  --text-muted: #8B949E;
  --text-dim: #484F58;
  --border: rgba(240, 246, 252, 0.1);
  --border-bright: rgba(240, 246, 252, 0.18);
  --glow-blue: rgba(88, 166, 255, 0.25);
  --glow-purple: rgba(188, 140, 255, 0.25);
  --card-bg: rgba(22, 27, 34, 0.55);
  --topbar-bg: rgba(22, 27, 34, 0.7);
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 40px rgba(88, 166, 255, 0.06);
  --tooltip-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --body-gradient-1: rgba(188, 140, 255, 0.08);
  --body-gradient-2: rgba(88, 166, 255, 0.06);
  --body-gradient-3: rgba(88, 166, 255, 0.04);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET & BASE ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--deep-space);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 900px 600px at 5% 0%, var(--body-gradient-1), transparent),
    radial-gradient(ellipse 900px 600px at 95% 0%, var(--body-gradient-2), transparent),
    radial-gradient(ellipse 600px 400px at 50% 100%, var(--body-gradient-3), transparent);
  transition: background var(--transition), color var(--transition);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ═══════════════════════════════════════════════════════════
   I. NAVIGATION HEADER
   ═══════════════════════════════════════════════════════════ */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition);
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.top-bar__center {
  flex: 1;
  max-width: 420px;
  margin: 0 2rem;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ext-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 8px;
  color: #58A6FF;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.ext-download:hover {
  background: rgba(88, 166, 255, 0.15);
  border-color: rgba(88, 166, 255, 0.4);
}
.ext-download__ver {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #9DA7B7;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 2px;
}

/* ── Empty-state install panel ─────────────────────── */
.install-panel {
  margin-top: 24px;
  max-width: 560px;
  width: 100%;
}
.install-panel__card {
  background: #1C2333;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 22px 24px;
}
.install-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.install-panel__header strong {
  color: #E6EDF3;
  font-size: 14px;
  font-weight: 600;
}
.install-panel__dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #58A6FF;
  box-shadow: 0 0 6px rgba(88,166,255,0.6);
}

.install-phase { padding: 4px 0; }
.install-phase__title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #E6EDF3;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.install-phase__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: rgba(88,166,255,0.12);
  color: #58A6FF;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}
.install-phase__hint {
  color: #9DA7B7;
  font-size: 12.5px;
  margin: 0 0 10px 29px;
}
.install-phase__list {
  color: #9DA7B7;
  font-size: 13px;
  line-height: 1.75;
  margin: 0 0 0 29px;
  padding-left: 18px;
}
.install-phase__list li { padding: 1px 0; }
.install-phase__list strong { color: #E6EDF3; }
.install-phase__list code,
.copy-code code {
  background: #0D1117;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  color: #E6EDF3;
}
.install-phase__sep {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 16px 0;
}
.install-phase__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 29px;
  padding: 9px 16px;
  background: #58A6FF;
  color: #0D1117;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.install-phase__btn:hover { background: #4694ED; }
.install-phase__btn code {
  background: rgba(13,17,23,0.18);
  border: none;
  color: #0D1117;
  padding: 1px 5px;
}

/* Click-to-copy code element */
.copy-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.copy-code__hint {
  font-size: 10px;
  color: #6E7785;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}
.copy-code:hover .copy-code__hint { color: #58A6FF; }
.copy-code.copied .copy-code__hint { color: #7EE787; }
.copy-code.copied .copy-code__hint::before { content: "✓ "; }

/* SAI Logo */
.sai-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sai-logo__icon {
  filter: drop-shadow(0 0 6px rgba(188, 140, 255, 0.5));
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 6px rgba(188, 140, 255, 0.4));
  }

  50% {
    filter: drop-shadow(0 0 14px rgba(188, 140, 255, 0.7));
  }
}

.sai-logo__text {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, var(--ai-signal), var(--primary-signal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.top-bar__sep {
  color: var(--text-dim);
  font-size: 1rem;
  opacity: 0.4;
}

.top-bar__username {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Download Button */
.download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.download-btn:hover {
  border-color: var(--primary-signal);
  color: var(--primary-signal);
  box-shadow: 0 0 12px var(--glow-blue);
}

/* User Switcher */
.user-switcher__select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.user-switcher__select:hover,
.user-switcher__select:focus {
  border-color: var(--primary-signal);
}

.user-switcher__select option {
  background: var(--analyst-slate);
  color: var(--text);
}

/* Profile Badge */
.profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: default;
}

.profile-badge__id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-badge__level {
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(188, 140, 255, 0.15), rgba(88, 166, 255, 0.15));
  border: 1px solid rgba(188, 140, 255, 0.25);
  color: var(--ai-signal);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.profile-badge__level:hover {
  background: linear-gradient(135deg, rgba(188, 140, 255, 0.25), rgba(88, 166, 255, 0.25));
  box-shadow: 0 0 16px rgba(188, 140, 255, 0.3);
}

.profile-badge__level strong {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */
.dashboard {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--ai-signal), var(--primary-signal));
  box-shadow: 0 0 8px var(--glow-purple);
}

/* ═══════════════════════════════════════════════════════════
   II. CORE PULSE CARDS (Glassmorphism)
   ═══════════════════════════════════════════════════════════ */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.pulse-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all var(--transition);
  overflow: hidden;
}

.pulse-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pulse-accent, linear-gradient(90deg, var(--primary-signal), var(--ai-signal)));
  opacity: 1;
  transition: height var(--transition), opacity var(--transition);
}

/* Per-card accent colors */
.pulse-card--blue {
  --pulse-accent: #58A6FF;
  --pulse-glow: rgba(88, 166, 255, 0.15);
}

.pulse-card--purple {
  --pulse-accent: #BC8CFF;
  --pulse-glow: rgba(188, 140, 255, 0.15);
}

.pulse-card--green {
  --pulse-accent: #3FB950;
  --pulse-glow: rgba(63, 185, 80, 0.15);
}

.pulse-card--split {
  --pulse-accent: linear-gradient(90deg, #58A6FF, #BC8CFF);
  --pulse-glow: rgba(136, 166, 240, 0.12);
}

/* Weekly Change Badges */
.pulse-change {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pulse-change--up {
  color: #3FB950;
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.2);
}

.pulse-change--down {
  color: #B388FF;
  background: rgba(179, 136, 255, 0.12);
  border: 1px solid rgba(179, 136, 255, 0.2);
}

.pulse-change--neutral {
  color: var(--text-dim);
  background: rgba(128, 128, 128, 0.1);
  border: 1px solid rgba(128, 128, 128, 0.15);
}

.pulse-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--pulse-glow, rgba(0, 0, 0, 0.3)), var(--hover-shadow);
}

.pulse-card:hover::before {
  height: 4px;
}

.pulse-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pulse-card__tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pulse-card__value {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.pulse-card__unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.pulse-card__sublabel {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-left: 0.3rem;
  letter-spacing: 0.02em;
}

.pulse-card__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: none;
  font-style: normal;
}

.pulse-card__sparkline {
  width: 100%;
  height: 32px;
  margin: 0.25rem 0 0.15rem;
}

.pulse-card__sparkline canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pulse-card__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Baseline shock comparison */
.pulse-card__baseline {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-dim);
  opacity: 0.75;
  line-height: 1.4;
  padding-top: 0.25rem;
}

/* Balance Bar (Human-Led) */
.balance-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.2rem 0;
}

.balance-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3FB950, #2ea043);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(63, 185, 80, 0.3);
}

/* Files Exchange — Split Layout */
.files-split {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.files-split__half {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0;
}

.files-split__number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.files-split__half--uploaded .files-split__number {
  color: #58A6FF;
}

.files-split__half--generated .files-split__number {
  color: #BC8CFF;
}

.files-split__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.files-split__divider {
  width: 1px;
  height: 48px;
  background: var(--border-bright);
  margin: 0 0.3rem;
}

/* Files proportional bar */
.files-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface-2);
  gap: 2px;
}

.files-bar__fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.files-bar__fill--uploaded {
  background: #58A6FF;
  box-shadow: 0 0 6px rgba(88, 166, 255, 0.3);
}

.files-bar__fill--generated {
  background: #BC8CFF;
  box-shadow: 0 0 6px rgba(188, 140, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   III. CENTRAL INTELLIGENCE ZONE
   ═══════════════════════════════════════════════════════════ */
.intel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════
   WEEKLY SKYLINE
   ═══════════════════════════════════════════════════════════ */
.skyline {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: all var(--transition);
}

.skyline:hover {
  border-color: var(--primary-signal);
  box-shadow: 0 0 30px var(--glow-blue), var(--hover-shadow);
}

.skyline__legend {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 400;
  padding: 0.2rem 0.4rem;
  opacity: 0.7;
  order: 10;
}

.skyline-type-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.6rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.skyline-type-guide__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.skyline-type-guide__item strong {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
}

.skyline-type-guide__desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

.skyline-type-guide__item .legend-dot {
  margin-left: 0;
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

/* ── Layer 1: Weekly Insight ── */
.skyline__insight {
  text-align: center;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--primary-signal);
  padding: 0.5rem 1rem 0.3rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
  opacity: 0.9;
  text-shadow: 0 0 18px var(--glow-blue);
}

/* Pattern detection label (Change 3) */
.skyline__insight-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ai-signal);
  margin-bottom: 0.3rem;
  opacity: 0.85;
  text-shadow: 0 0 12px rgba(188, 140, 255, 0.4);
}

.skyline__days {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  min-height: 520px;
  position: relative;
}

.skyline__time-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.8rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skyline__time-hint span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.skyline__time-arrow {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), var(--text-dim), var(--border));
  margin: 0 0.5rem;
  position: relative;
}

.skyline__time-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3px;
  border: 3px solid transparent;
  border-left: 5px solid var(--text-dim);
}

/* ── Individual Day Column ── */
.skyline-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 2px;
}

.skyline-day:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

/* ── Layer 2: Day Header ── */
.skyline-day__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0.35rem 0.3rem 0.25rem;
  text-align: center;
  width: 100%;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.skyline-day__name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}

.skyline-day:hover .skyline-day__name {
  color: var(--primary-signal);
}

.skyline-day__stats {
  font-size: 0.62rem;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
}

.skyline-day__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  margin-top: 1px;
}

.skyline-day__bars {
  flex: 1;
  position: relative;
  width: 100%;
  padding: 0.5rem 0 1rem;
  overflow: hidden;
}

/* ── Session Bar ── */
.skyline-bar {
  position: absolute;
  bottom: 1rem;
  width: 13%;
  min-width: 10px;
  border-radius: 4px 4px 2px 2px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-origin: bottom center;
  /* animated entry */
  animation: barGrow 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

.skyline-bar:hover {
  transform: scaleY(1.04) scaleX(1.15);
  filter: brightness(1.25);
  z-index: 2;
}

/* ── Active bar (click-locked) ── */
.skyline-bar--active {
  z-index: 3;
  filter: brightness(1.3);
  animation: barPulse 1.8s ease-in-out infinite;
}

@keyframes barPulse {

  0%,
  100% {
    filter: brightness(1.3);
    transform: scaleY(1.02);
  }

  50% {
    filter: brightness(1.5);
    transform: scaleY(1.06);
  }
}

/* ── Time axis markers ── */
.skyline-day__time-axis {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 8%;
  pointer-events: none;
}

.skyline-day__time-axis span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  opacity: 0.9;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Day column hover zone ── */
.skyline-day:hover {
  background: rgba(88, 166, 255, 0.025);
}

/* ═══════════════════════════════════════════════════════════
   FOCUS MODE — visual pattern revelation
   ═══════════════════════════════════════════════════════════ */

/* Dimmed bars */
.skyline-bar--focus-dim {
  opacity: 0.15 !important;
  filter: grayscale(1) brightness(0.6) !important;
  transform: scaleY(0.97) !important;
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

/* Highlighted same-type bars */
.skyline-bar--focus-highlight {
  opacity: 1 !important;
  filter: brightness(1.2) !important;
  z-index: 4;
  transition: opacity 0.35s ease, filter 0.35s ease, box-shadow 0.35s ease;
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.15),
    0 0 24px rgba(88, 166, 255, 0.12);
}

/* ── Focus Panel — companion window beside session card ── */
.focus-panel {
  position: fixed;
  z-index: 1000;
  width: 220px;
  background: var(--surface-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: panelSlideIn 0.3s ease forwards;
}

.focus-panel__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}

.focus-panel__header strong {
  color: var(--text-primary);
  font-weight: 600;
}

.focus-annotation__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}

.focus-panel__body {
  padding: 0.35rem 0;
}

.focus-panel__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.focus-panel__row:last-child {
  border-bottom: none;
}

.focus-panel__row strong {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.skyline-bar--deep-thinking {
  background: linear-gradient(to top, rgba(179, 136, 255, 0.5), rgba(179, 136, 255, 0.9));
  box-shadow: 0 0 8px rgba(179, 136, 255, 0.15);
}

.skyline-bar--exploration {
  background: linear-gradient(to top, rgba(88, 166, 255, 0.5), rgba(88, 166, 255, 0.9));
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.15);
}

.skyline-bar--task-execution {
  background: linear-gradient(to top, rgba(240, 180, 41, 0.5), rgba(240, 180, 41, 0.9));
  box-shadow: 0 0 8px rgba(240, 180, 41, 0.15);
}

.skyline-bar--learning {
  background: linear-gradient(to top, rgba(63, 185, 80, 0.5), rgba(63, 185, 80, 0.9));
  box-shadow: 0 0 8px rgba(63, 185, 80, 0.15);
}

.skyline-bar--standard {
  background: linear-gradient(to top, rgba(139, 148, 158, 0.45), rgba(139, 148, 158, 0.8));
  box-shadow: 0 0 8px rgba(139, 148, 158, 0.12);
}

/* ── Empty day ── */
.skyline-day--empty .skyline-day__bars::after {
  content: 'No sessions';
  font-size: 0.7rem;
  color: var(--text-dim);
  font-style: italic;
  position: absolute;
  bottom: 50%;
  text-align: center;
  width: 100%;
}

/* ── Bar grow animation ── */
@keyframes barGrow {
  from {
    height: 0;
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Subtle horizontal reference lines ── */
.skyline__days::before,
.skyline__days::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  pointer-events: none;
  z-index: 0;
}

.skyline__days::before {
  top: 33.3%;
}

.skyline__days::after {
  top: 66.6%;
}

/* ═══════════════════════════════════════════════════════════
   SESSION CARD (floating hover/click panel)
   ═══════════════════════════════════════════════════════════ */
.session-card {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: 600px;
  background: var(--surface-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 0;
  opacity: 0;
  transform: translateY(6px);
  transform-origin: bottom center;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

.session-card--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.session-card--locked {
  border-color: var(--primary-signal);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow-blue);
}

.session-card__section {
  padding: 0.6rem 0.8rem;
  border-bottom: none;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.session-card__section:last-child {
  border-right: none;
}

.session-card__section--expanded {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.09), rgba(251, 146, 60, 0.05));
  border-top: 1px solid rgba(236, 72, 153, 0.2);
  border-left: 2px solid #EC4899;
  animation: insightReveal 0.4s ease-out;
}

.session-card__section--expanded .session-card__section-title {
  color: #EC4899;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.session-card__section--expanded .session-card__text {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
}

@keyframes insightReveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.session-card__session-id {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.45rem;
}

.session-card__id-line {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-signal);
}

.session-card__platform-line {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.session-card__title-line {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  max-width: 260px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.session-card__section:first-child {
  min-width: 180px;
}

.session-card__divider {
  border-top: 1px solid var(--border);
  margin: 0.4rem 0;
}

/* ── Star Rating ── */
.star-rating {
  display: flex;
  gap: 1px;
  padding: 0.3rem 0;
  cursor: pointer;
}

.star {
  font-size: 19px;
  line-height: 1;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.1s;
  user-select: none;
}

.star--empty {
  background: var(--text-dim);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.35;
}

.star--full {
  background: #FFA657;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 1;
}

.star--half {
  background: linear-gradient(90deg, #FFA657 50%, var(--text-dim) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 1;
}

.star--hover-full {
  background: #FFD666;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 1;
  transform: scale(1.15);
}

.star--hover-half {
  background: linear-gradient(90deg, #FFD666 50%, var(--text-dim) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 1;
  transform: scale(1.15);
}

/* ── Unrated state: pulse the empty stars to attract a rating ── */
.star-rating--unrated .star--empty {
  background: #FFA657;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.45;
  text-shadow: 0 0 6px rgba(255, 166, 87, 0.55);
  animation: rate-me-pulse 1.6s ease-in-out infinite;
}
.star-rating--unrated:hover .star--empty {
  /* Pause pulse while user is interacting so the hover preview reads cleanly */
  animation: none;
  opacity: 0.55;
  text-shadow: none;
}
@keyframes rate-me-pulse {
  0%, 100% {
    opacity: 0.32;
    text-shadow: 0 0 4px rgba(255, 166, 87, 0.35);
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    text-shadow: 0 0 12px rgba(255, 166, 87, 0.85);
    transform: scale(1.06);
  }
}

.session-card__section-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.session-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5px 0;
  color: var(--text-secondary);
}

.session-card__row strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.72rem;
}

.session-card__volume {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.session-card__volume-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.session-card__volume-bar {
  height: 6px;
  background: rgba(88, 166, 255, 0.4);
  /* AI side base */
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.session-card__volume-fill {
  height: 100%;
  background: var(--success);
  /* Human side */
  border-radius: 3px 0 0 3px;
  transition: width 0.4s ease-out;
}

.session-card__text {
  color: var(--text-secondary);
  line-height: 1.45;
  font-size: 0.72rem;
}

.session-card__text--dim {
  color: var(--text-dim);
  font-size: 0.68rem;
  margin-top: 2px;
}

.session-card__text--tip {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 3px;
  font-size: 0.68rem;
}

.intel-pane {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition);
}

.intel-pane:hover {
  border-color: var(--border-bright);
}

.intel-pane__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.intel-pane__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.intel-pane__subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Legend */
.intel-pane__legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 0.8rem;
}

.legend-dot:first-child {
  margin-left: 0;
}

.legend-dot--green {
  background: var(--success);
  box-shadow: 0 0 6px rgba(63, 185, 80, 0.4);
}

.legend-dot--amber {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(240, 180, 41, 0.4);
}

.legend-dot--blue {
  background: var(--primary-signal);
  box-shadow: 0 0 6px var(--glow-blue);
}

.legend-dot--purple {
  background: #BC8CFF;
  box-shadow: 0 0 6px rgba(188, 140, 255, 0.4);
}

.legend-dot--gray {
  background: #8B949E;
  box-shadow: 0 0 6px rgba(139, 148, 158, 0.3);
}

/* Chart Containers */
.chart-container {
  position: relative;
  width: 100%;
}

.chart-container--scatter {
  height: 460px;
}


.chart-container--line {
  height: 180px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ═══════════════════════════════════════════════════════════
   III-B. VOCABULARY CARD
   ═══════════════════════════════════════════════════════════ */
.vocab-section {
  animation-delay: 0.3s;
}

.vocab-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.vocab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-signal), var(--ai-signal));
  opacity: 1;
}

.vocab-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--glow-blue);
}

.vocab-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vocab-card__header .section-title {
  margin-bottom: 0;
}

.vocab-card__total {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.25);
  color: var(--primary-signal);
}

.vocab-lang-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  gap: 2px;
}

.vocab-lang-bar__segment {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.vocab-lang-bar__segment--en {
  background: var(--primary-signal);
}

.vocab-lang-bar__segment--he {
  background: var(--ai-signal);
}

.vocab-lang-labels {
  display: flex;
  justify-content: space-between;
  margin-top: -0.3rem;
}

.vocab-lang-labels__item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vocab-week-stats {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.vocab-week-stats__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vocab-week-stats__label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vocab-week-stats__value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--success);
}

.vocab-week-stats__sep {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.vocab-growth {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vocab-growth__title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.vocab-growth__chart-wrap {
  position: relative;
  width: 100%;
  height: 52px;
  max-height: 52px;
  overflow: hidden;
}

.vocab-growth__chart-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.vocab-highlights-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vocab-highlights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vocab-highlights-header .vocab-highlights__title {
  margin-right: 0;
}

.vocab-lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.vocab-lang-toggle__btn {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}

.vocab-lang-toggle__btn.is-active {
  background: var(--primary-signal);
  color: #fff;
}

.vocab-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  max-height: 80px;
  overflow: hidden;
}

.vocab-highlights__title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.vocab-highlights__empty {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-dim);
}

.vocab-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(188, 140, 255, 0.14);
  border: 1px solid rgba(188, 140, 255, 0.28);
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.vocab-chip--he {
  font-size: 0.95rem;
  font-family: var(--font-sans);
  direction: rtl;
}

/* ═══════════════════════════════════════════════════════════
   IV. BOTTOM SECTION — Week Focus + Platform DNA
   ═══════════════════════════════════════════════════════════ */
.bottom-section {
  animation: fadeSlideUp 0.6s ease-out both;
  animation-delay: 0.4s;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.bottom-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.bottom-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ai-signal), var(--primary-signal));
  opacity: 0;
  transition: opacity var(--transition);
}

.bottom-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 0 20px var(--glow-purple);
}

.bottom-card:hover::before { opacity: 1; }

.bottom-card__title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bottom-card__title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--ai-signal), var(--primary-signal));
  box-shadow: 0 0 8px var(--glow-purple);
  flex-shrink: 0;
  margin: 0;
}

/* ── Week Focus card ── */
.week-focus-card {
  background: var(--card-bg);
  border-left: 3px solid var(--ai-signal);
}


.week-focus__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.week-focus__header::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--ai-signal), var(--primary-signal));
  box-shadow: 0 0 8px var(--glow-purple);
  flex-shrink: 0;
}

.week-focus__icon {
  font-size: 1.3rem;
  line-height: 1;
}

.week-focus__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.04em;
}

.week-focus__body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.week-focus__accent {
  width: 3px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--ai-signal), var(--primary-signal));
  opacity: 0.5;
}

.week-focus__summary {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
  font-weight: 400;
}

.category-minibar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.category-minibar {
  display: flex;
  width: 100%;
  height: 9px;
  border-radius: 5px;
  overflow: hidden;
  gap: 1px;
}

.category-minibar__seg {
  min-width: 4px;
  transition: width 0.5s ease;
}

.category-minibar__labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ── Platform DNA card ── */
.platform-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.platform-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.platform-bar-row__label {
  min-width: 110px;
  font-size: 0.82rem;
  color: var(--text);
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.platform-bar-row__label strong {
  font-weight: 700;
}

.platform-bar-row__label span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.platform-bar {
  display: flex;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  gap: 1px;
  transition: width 0.5s ease;
}

.platform-bar__seg {
  min-width: 3px;
  transition: width 0.4s ease;
}

.platform-dna__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.platform-insights {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platform-insight {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.4;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   SIDE DRAWER
   ═══════════════════════════════════════════════════════════ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.drawer.is-open {
  pointer-events: all;
  opacity: 1;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--analyst-slate);
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.is-open .drawer__panel {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.drawer__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.drawer__delete {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  transition: all var(--transition);
  margin-left: auto;
  opacity: 0.5;
}

.drawer__delete:hover {
  color: #F85149;
  background: rgba(248, 81, 73, 0.1);
  opacity: 1;
}

.drawer__delete:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.drawer__close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  transition: all var(--transition);
}

.drawer__close:hover {
  color: var(--text);
  background: var(--surface);
}

.drawer__error {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #F85149;
  padding: 0.4rem 0.75rem;
  background: rgba(248, 81, 73, 0.08);
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
  animation: fadeSlideUp 0.2s ease-out;
}

.drawer__session-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ai-signal);
  padding: 0.5rem 0.75rem;
  background: rgba(188, 140, 255, 0.08);
  border: 1px solid rgba(188, 140, 255, 0.15);
  border-radius: var(--radius-sm);
}

/* Metric bars inside drawer */
.drawer__metrics {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.metric-row__label {
  font-size: 0.7rem;
  color: var(--text-dim);
  width: 110px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.metric-row__bar-bg {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}

.metric-row__bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-row__bar-fill--blue {
  background: var(--primary-signal);
  box-shadow: 0 0 6px var(--glow-blue);
}

.metric-row__bar-fill--purple {
  background: var(--ai-signal);
  box-shadow: 0 0 6px var(--glow-purple);
}

.metric-row__value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 36px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   PROFILE TOOLTIP
   ═══════════════════════════════════════════════════════════ */
.profile-tooltip {
  position: fixed;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  max-width: 280px;
  box-shadow: var(--tooltip-shadow);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-tooltip__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ai-signal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.profile-tooltip__text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE — Heartbeat Animation
   ═══════════════════════════════════════════════════════════ */
.empty-state {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  background: var(--deep-space);
  gap: 2rem;
  overflow-y: auto;
  padding: 5rem 1rem 4rem;
}

.empty-state__back {
  position: absolute;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 500;
  color: #9DA7B7;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  z-index: 1001;
}
.empty-state__back:hover {
  color: #E6EDF3;
  border-color: rgba(88,166,255,0.35);
  background: rgba(88,166,255,0.08);
}

.empty-state__rings {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--ai-signal);
  opacity: 0;
  animation: heartbeatRing 3s ease-out infinite;
}

.ring--1 {
  width: 40px;
  height: 40px;
  animation-delay: 0s;
}

.ring--2 {
  width: 80px;
  height: 80px;
  animation-delay: 0.5s;
}

.ring--3 {
  width: 120px;
  height: 120px;
  animation-delay: 1s;
}

.ring--4 {
  width: 160px;
  height: 160px;
  animation-delay: 1.5s;
}

@keyframes heartbeatRing {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
    border-color: var(--ai-signal);
  }

  50% {
    opacity: 0.3;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
    border-color: var(--primary-signal);
  }
}

.dot-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ai-signal);
  box-shadow: 0 0 20px var(--glow-purple), 0 0 40px rgba(188, 140, 255, 0.2);
  animation: corePulse 1.5s ease-in-out infinite;
}

@keyframes corePulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px var(--glow-purple);
  }

  50% {
    transform: scale(1.3);
    box-shadow: 0 0 40px var(--glow-purple), 0 0 60px rgba(188, 140, 255, 0.15);
  }
}

.empty-state__label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: labelFade 3s ease-in-out infinite;
}

@keyframes labelFade {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .pulse-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intel-grid {
    grid-template-columns: 1fr;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

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

  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
  }

  .top-bar__center {
    order: 3;
    max-width: 100%;
    margin: 0;
    flex: 0 0 100%;
  }

  .dashboard {
    padding: 1.2rem 1rem 3rem;
  }

  .chart-container--scatter {
    height: 240px;
  }

}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   SUBTLE ANIMATIONS FOR CHART AREAS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.core-pulse {
  animation: fadeSlideUp 0.6s ease-out both;
  animation-delay: 0.1s;
}

.intel-zone {
  animation: fadeSlideUp 0.6s ease-out both;
  animation-delay: 0.25s;
}


/* All cards/panels smooth transition */
.pulse-card,
.intel-pane,
.bottom-card,
.drawer__panel,
.profile-tooltip,
.user-switcher__select {
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}