/* ==========================================================================
   Market Sages — Institutional Fintech Design System (Sapphire & Slate Obsidian)
   Professional, high-trust financial palette: Deep Navy Slate, Sapphire Blue, Emerald & Amber
   ========================================================================== */

:root {
  /* Core Institutional Slate Palette */
  --bg-deep: #050811;
  --bg-surface: #0a101d;
  --bg-surface-elevated: #10192b;
  --bg-card: rgba(16, 25, 43, 0.8);
  --bg-input-capsule: rgba(12, 19, 33, 0.9);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.11);
  --border-active: #3b82f6;

  /* Institutional Signal Colors */
  --signal-bullish: #10b981;
  --signal-bullish-glow: rgba(16, 185, 129, 0.35);
  --signal-bullish-bg: rgba(16, 185, 129, 0.12);

  --signal-neutral: #f59e0b;
  --signal-neutral-glow: rgba(245, 158, 11, 0.35);
  --signal-neutral-bg: rgba(245, 158, 11, 0.12);

  --signal-bearish: #ef4444;
  --signal-bearish-glow: rgba(239, 68, 68, 0.35);
  --signal-bearish-bg: rgba(239, 68, 68, 0.12);

  /* Brand Accents (Sapphire & Cyan) */
  --brand-sapphire: #2563eb;
  --brand-cyan: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #059669 0%, #0284c7 50%, #2563eb 100%);
  --brand-glow: rgba(37, 99, 235, 0.25);

  /* Typography */
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Institutional Ambient Glows (Cool Sapphire & Subtle Emerald) */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.glow-top-left {
  top: -120px;
  left: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, rgba(6, 182, 212, 0.08) 70%, transparent 100%);
}

.glow-bottom-right {
  bottom: -150px;
  right: -100px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(37, 99, 235, 0.08) 70%, transparent 100%);
}

/* App Shell Layout */
.app-layout {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

/* Top Nav Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.header-brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Integrated Search Capsule */
.header-search-capsule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.capsule-search-group {
  display: flex;
  align-items: center;
  background: var(--bg-input-capsule);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.45rem 0.35rem 1.1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  gap: 0.75rem;
  backdrop-filter: blur(12px);
}

.search-lens-icon {
  font-size: 1.1rem;
  color: #60a5fa;
}

.search-text-fields {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.search-text-fields input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.company-name-tag {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Glowing Summon Capsule Button */
.summon-capsule-btn {
  background: var(--brand-gradient);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.4);
  transition: all 0.25s ease;
}

.summon-capsule-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
}

/* Language Toggle Button Pill */
.lang-toggle-btn {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-pill);
  color: #93c5fd;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: #60a5fa;
  color: #ffffff;
  transform: scale(1.03);
}

/* Engine Toggle Button Pill */
.engine-toggle-btn {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-pill);
  color: #6ee7b7;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.engine-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #ffffff;
  transform: scale(1.03);
}

.engine-toggle-btn.deepseek-active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.engine-toggle-btn.auto-active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.header-icon-btn {

  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  border-color: var(--border-active);
  color: #ffffff;
}

/* Filter Bar Section */
.filter-bar-section {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mockup-filter-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.mockup-pill {
  background: rgba(16, 25, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  padding: 0.5rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.mockup-pill .pill-svg {
  font-size: 1rem;
}

.mockup-pill:hover {
  background: rgba(26, 40, 68, 0.8);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.mockup-pill.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.35);
}

/* Secondary Controls */
.secondary-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.quick-presets {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.presets-label {
  color: var(--text-subtle);
  font-weight: 600;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-pill:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
  color: #ffffff;
}

.tse-badge-pill {
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}

.tse-badge-pill:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.drawer-toggle-small {
  background: none;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.drawer-toggle-small:hover {
  border-color: var(--border-active);
  color: #ffffff;
}

.drawer-content textarea {
  width: 100%;
  background: rgba(10, 16, 26, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.6rem;
  margin-top: 0.5rem;
  outline: none;
}

/* Main Workspace: 2-Column Split */
.council-workspace {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 1.5rem;
  align-items: start;
}

/* Left Column: Sages Verdict Cards */
.sages-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.column-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.council-tally {
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 600;
}

/* Progress bar */
.deliberation-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #0284c7, #2563eb);
  transition: width 0.3s ease;
}

.progress-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.progress-status-text {
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 500;
  flex: 1;
}

.cancel-deliberation-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cancel-deliberation-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}


/* 2-Column Grid of Sages Cards */
.sage-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

/* LLM Thinking Mode Process Banner */
.llm-thinking-card {
  grid-column: 1 / -1;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.live-processing-banner {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.15);
}

.live-pulse-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* Live Streaming Thinking Terminal Box */
.live-thinking-terminal-wrap {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 0.4rem;
}

.live-thinking-terminal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: #94a3b8;
}

.live-thinking-terminal-body {
  padding: 0.85rem 1rem;
  max-height: 240px;
  min-height: 100px;
  overflow-y: auto;
  scroll-behavior: smooth;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.live-thinking-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #38bdf8;
  margin-left: 2px;
  vertical-align: middle;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.autoscroll-badge {
  cursor: pointer;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.autoscroll-badge:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

.autoscroll-badge.paused {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}



.llm-thinking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.llm-thinking-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.thinking-brain-icon {
  font-size: 1.2rem;
}

.thinking-title-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
}

.thinking-badge {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
}

.thinking-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #93c5fd;
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.thinking-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #60a5fa;
  color: #ffffff;
}

.llm-thinking-body {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  max-height: 350px;
  overflow-y: auto;
}

.llm-thinking-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}


/* Individual Sage Card */
.mockup-sage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mockup-sage-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.card-top-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* Glowing Circular Avatar Rings */
.mockup-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #111a2e;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.avatar-halo-bullish {
  border-color: var(--signal-bullish);
  box-shadow: 0 0 14px var(--signal-bullish-glow);
}

.avatar-halo-neutral {
  border-color: var(--signal-neutral);
  box-shadow: 0 0 14px var(--signal-neutral-glow);
}

.avatar-halo-bearish {
  border-color: var(--signal-bearish);
  box-shadow: 0 0 14px var(--signal-bearish-glow);
}

.card-sage-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-sage-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

/* Status Badges */
.mockup-badge-pill {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.badge-bullish {
  background: var(--signal-bullish-bg);
  border: 1px solid var(--signal-bullish);
  color: var(--signal-bullish);
}

.badge-neutral {
  background: var(--signal-neutral-bg);
  border: 1px solid var(--signal-neutral);
  color: #fbbf24;
}

.badge-bearish {
  background: var(--signal-bearish-bg);
  border: 1px solid var(--signal-bearish);
  color: var(--signal-bearish);
}

/* Confidence Line */
.card-confidence-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.confidence-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.confidence-line-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.confidence-line-fill {
  height: 100%;
  border-radius: var(--radius-pill);
}

.confidence-line-fill.bullish { background: var(--signal-bullish); }
.confidence-line-fill.neutral { background: var(--signal-neutral); }
.confidence-line-fill.bearish { background: var(--signal-bearish); }

/* Quote Text */
.card-quote-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
  font-style: italic;
}

/* Right Column: Sticky Portfolio Manager Panel */
.sidebar-column {
  position: sticky;
  top: 1.5rem;
}

/* ===== Portfolio Manager Awaiting Placeholder State ===== */
.pm-awaiting-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.1rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  animation: fadeInDown 0.3s ease;
}

.pm-awaiting-icon {
  font-size: 2.4rem;
  animation: pulseBeacon 2s infinite ease-in-out;
}

.pm-awaiting-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #f8fafc;
}

.pm-awaiting-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #94a3b8;
}

.pm-awaiting-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7dd3fc;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseBeacon 1.5s infinite;
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.pm-verdict-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  animation: fadeInDown 0.3s ease;
}

.pm-panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}


/* Dual Speedometer Gauges */
.dual-gauges-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gauge-card {
  background: rgba(10, 16, 28, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.speedometer-svg-wrap {
  width: 90px;
  height: 50px;
}

.speedometer-svg {
  width: 100%;
  height: 100%;
}

.gauge-label-text {
  display: flex;
  flex-direction: column;
  margin-top: 0.25rem;
}

.gauge-primary-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f59e0b;
}

.gauge-sub-val {
  font-size: 0.65rem;
  color: var(--text-subtle);
}

/* Trade Horizon Section */
.trade-horizon-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.horizon-range-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #10b981 0%, #0284c7 60%, #ef4444 100%);
  border-radius: var(--radius-pill);
  margin: 0.35rem 0;
}

.range-dot {
  position: absolute;
  top: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.start-dot {
  left: 20%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.stop-dot {
  right: 15%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.range-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.legend-title {
  color: var(--text-subtle);
  margin-right: 0.2rem;
}

.legend-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #ffffff;
}

.text-danger {
  color: #ef4444 !important;
}

/* Conviction Score Container */
.conviction-score-box {
  background: rgba(10, 16, 28, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.conviction-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.conviction-value-display {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #10b981;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.action-badge-box {
  width: 100%;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
}

/* Action Buttons & Disclaimer */
.sidebar-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.sidebar-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
  border-color: var(--border-active);
}

.sidebar-disclaimer {
  font-size: 0.7rem;
  color: var(--text-subtle);
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-select, .form-group input {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.primary-btn {
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Mobile & Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .app-layout {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  .council-workspace {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .sidebar-column {
    position: static;
    order: -1;
  }

  .pm-verdict-panel {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .app-layout {
    padding: 0.75rem 0.75rem 2rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
  }

  .header-brand {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .brand-title {
    font-size: 1.5rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .header-search-capsule {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .capsule-search-group {
    width: 100%;
    flex: 1 1 100%;
    padding: 0.3rem 0.35rem 0.3rem 0.75rem;
    gap: 0.4rem;
  }

  .search-text-fields {
    min-width: 0;
    flex: 1;
  }

  /* 16px font-size prevents iOS Safari from automatically zooming in */
  .search-text-fields input,
  #tickerInput,
  #financialsInput {
    font-size: 16px !important;
    width: 100%;
  }

  .company-name-tag {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
  }

  .summon-capsule-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    white-space: nowrap;
    min-height: 38px;
  }

  .header-icon-btn,
  .lang-toggle-btn {
    min-height: 38px;
    padding: 0.35rem 0.65rem;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .filter-bar-section {
    margin-bottom: 1.1rem;
    gap: 0.6rem;
  }

  .mockup-filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 2px 6px;
    gap: 0.45rem;
  }

  .mockup-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .mockup-pill {
    flex-shrink: 0;
    padding: 0.45rem 0.8rem;
    font-size: 0.76rem;
    min-height: 36px;
    white-space: nowrap;
  }

  .secondary-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .quick-presets {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 2px 6px;
    gap: 0.35rem;
  }

  .quick-presets::-webkit-scrollbar {
    display: none;
  }

  .presets-label {
    flex-shrink: 0;
    font-size: 0.72rem;
  }

  .preset-pill {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    min-height: 32px;
  }

  .drawer-toggle-small {
    width: 100%;
    text-align: center;
    padding: 0.45rem;
    min-height: 36px;
  }

  .council-workspace {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.25rem;
  }

  .column-title {
    font-size: 1rem;
  }

  .sage-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .mockup-sage-card {
    padding: 0.95rem;
    gap: 0.7rem;
    border-radius: 12px;
  }

  .mockup-avatar-circle {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .card-sage-name {
    font-size: 0.95rem;
  }

  .card-quote-text {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .card-cot-section {
    margin-top: 0.6rem;
    padding-top: 0.55rem;
  }

  .cot-toggle-btn {
    padding: 0.5rem 0.75rem;
    min-height: 38px;
  }

  .cot-step-row {
    font-size: 0.74rem;
  }

  .pm-verdict-panel {
    padding: 1rem;
    gap: 0.85rem;
    border-radius: 14px;
  }

  .pm-panel-title {
    font-size: 1rem;
  }

  .dual-gauges-container {
    gap: 0.45rem;
  }

  .gauge-card {
    padding: 0.5rem 0.25rem;
  }

  .speedometer-svg-wrap {
    width: 72px;
    height: 40px;
  }

  .gauge-primary-val {
    font-size: 0.7rem;
  }

  .conviction-value-display {
    font-size: 1.15rem;
  }

  .action-badge-box {
    font-size: 0.78rem;
    padding: 0.45rem 0.3rem;
  }

  .modal-dialog,
  .modal-dialog-wide {
    width: 95%;
    max-height: 88vh;
    border-radius: 14px;
  }

  .profile-modal-body {
    padding: 1rem;
    gap: 0.9rem;
  }

  .profile-quick-switch {
    padding: 0.5rem 0.85rem;
    gap: 0.35rem;
  }

  .profile-quick-btn {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
}

@media (max-width: 380px) {
  .brand-title {
    font-size: 1.35rem;
  }

  .summon-capsule-btn .btn-label {
    display: none;
  }

  .summon-capsule-btn {
    padding: 0.5rem 0.65rem;
    border-radius: 50%;
  }

  .company-name-tag {
    max-width: 80px;
  }
}


/* Filter Guide Modal Styles */
.help-section {
  margin-bottom: 20px;
}

.help-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
}

.help-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.help-list strong {
  color: #f1f5f9;
}

.help-code-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-code-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.help-code-list code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  color: #38bdf8;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ===== Titan Profile Modal (On-Demand) ===== */

.modal-dialog-wide {
  max-width: 680px;
  width: 92%;
}

.modal-header-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.profile-modal-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.profile-modal-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  display: block;
  margin-top: 0.15rem;
}

.profile-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.2rem 1.4rem 1.4rem;
  max-height: 75vh;
  overflow-y: auto;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.profile-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-meta-item.full-width {
  grid-column: span 2;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 0.5rem;
}

.profile-meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
}

.profile-meta-value {
  font-size: 0.85rem;
  color: #e2e8f0;
  font-weight: 500;
}

.profile-meta-value.highlight {
  color: #38bdf8;
  font-weight: 600;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-section-heading {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-bio-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #94a3b8;
}

.profile-philosophy-quote {
  margin: 0;
  padding: 0.6rem 0.9rem;
  background: rgba(56, 189, 248, 0.06);
  border-left: 3px solid #38bdf8;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  font-size: 0.86rem;
  color: #f1f5f9;
  line-height: 1.45;
}

.profile-metrics-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-metric-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.profile-dual-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-bullet-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  line-height: 1.4;
}

.card-profile-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}

.card-profile-action-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

@media (max-width: 640px) {
  .profile-meta-grid {
    grid-template-columns: 1fr;
  }
  .profile-meta-item.full-width {
    grid-column: span 1;
  }
  .profile-dual-columns {
    grid-template-columns: 1fr;
  }
}

/* ===== Chain of Thought (CoT) Accordion ===== */
.card-cot-section {
  margin-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 0.65rem;
}

.cot-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cot-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.cot-toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.cot-toggle-btn.open .cot-toggle-icon {
  transform: rotate(180deg);
}

.cot-steps-box {
  margin-top: 0.5rem;
  background: rgba(10, 15, 29, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cot-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.cot-step-num {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cot-step-text {
  flex: 1;
  color: #94a3b8;
}

.cot-step-text strong {
  color: #e2e8f0;
}

/* ===== Data Sources & Provenance Box ===== */
.sources-provenance-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.sources-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sources-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.source-badge-pill {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border-radius: 6px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
}

/* ===== Profile Quick Switcher Bar ===== */
.profile-quick-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: thin;
}

.profile-quick-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.profile-quick-btn:hover,
.profile-quick-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: scale(1.1);
}

/* Card-level Provenance Badge */
.card-provenance-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Clickable Grounding Web Source Link */
.source-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.source-link-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ===== Card Grounded Evidence & Direct Source Link ===== */
.card-evidence-box {
  margin-top: 0.6rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-evidence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-evidence-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.02em;
}

.card-evidence-link {
  font-size: 0.68rem;
  color: #7dd3fc;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.card-evidence-link:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

.card-evidence-snippet {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #e2e8f0;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem 0.55rem;
  border-radius: 5px;
  border-left: 2px solid #38bdf8;
  word-break: break-word;
}

/* Engine Active Badges */
.engine-badge-live {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
  font-weight: 700 !important;
}

.engine-badge-error {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
  font-weight: 600 !important;
}

/* ===== Deliberation Error Card ===== */
.deliberation-error-card {
  grid-column: 1 / -1;
  background: rgba(30, 15, 20, 0.7);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.15);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: center;
  align-items: center;
  animation: fadeInDown 0.3s ease;
}

.error-card-icon {
  font-size: 2.5rem;
}

.error-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fca5a5;
}

.error-card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 580px;
}

.error-card-steps {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2e8f0;
  width: 100%;
  max-width: 540px;
}

.error-card-steps ol {
  margin: 0;
  padding-left: 1.2rem;
}

.error-card-steps code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 2px 6px;
  border-radius: 4px;
}

.error-retry-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.error-retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* ===== Fast-Load Welcome Hero Card ===== */
.welcome-board-card {
  grid-column: 1 / -1;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: fadeInDown 0.3s ease;
}

.welcome-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.welcome-hero-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
}

.welcome-hero-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 620px;
}

.welcome-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.welcome-cta-btn {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.6);
}

.welcome-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.welcome-preset-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}

/* ===== Card Skeleton Pulse Loaders ===== */
.card-skeleton {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 240px;
  position: relative;
  overflow: hidden;
}

.skeleton-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-line {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.skeleton-line-title { width: 60%; height: 16px; }
.skeleton-line-badge { width: 35%; height: 12px; }
.skeleton-line-text { width: 100%; height: 42px; }
.skeleton-line-box { width: 100%; height: 50px; }

/* ===== Mobile GPU & Performance Optimizations ===== */
@media (max-width: 768px) {
  .mockup-sage-card,
  .welcome-board-card,
  .pm-sidebar-container,
  .deliberation-error-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.9) !important;
    content-visibility: auto;
    contain-intrinsic-size: 260px;
  }

  .ambient-glow {
    display: none !important; /* Eliminate expensive GPU repaints on mobile */
  }

  .app-layout {
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
  }
}






