:root {
  --bg-dark: #07080d;
  --bg-card: rgba(18, 21, 33, 0.7);
  --bg-card-hover: rgba(26, 31, 48, 0.85);
  --bg-glass: rgba(14, 17, 27, 0.6);
  --bg-bubble-user: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  --bg-bubble-agent: rgba(18, 22, 36, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(99, 102, 241, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-gold: #ff9e3b;
  --accent-cyan: #00f2fe;
  --accent-indigo: #6366f1;
  --accent-violet: #a855f7;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-ambient: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow-indigo: 0 0 28px rgba(99, 102, 241, 0.25);
  --shadow-glow-gold: 0 0 28px rgba(255, 158, 59, 0.25);
  --shadow-glow-cyan: 0 0 28px rgba(0, 242, 254, 0.25);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Organic Gradient Glowing Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: pulseGlow 12s ease-in-out infinite alternate;
}

.glow-top {
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(168, 85, 247, 0.2) 50%, transparent 70%);
}

.glow-bottom {
  bottom: -200px;
  right: 10%;
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.2) 0%, rgba(255, 158, 59, 0.15) 50%, transparent 70%);
}

@keyframes pulseGlow {
  0% { transform: scale(1) translateY(0); opacity: 0.4; }
  100% { transform: scale(1.15) translateY(30px); opacity: 0.65; }
}

/* App Container */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── App Header ─────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(10, 12, 19, 0.65);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge-icon {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.brand-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

/* Navigation Tabs */
.header-nav {
  display: flex;
  align-items: center;
  background: rgba(18, 22, 34, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.tab-pill {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.tab-pill.highlight {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.effort-selector {
  display: flex;
  background: rgba(18, 22, 34, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.effort-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.effort-btn:hover {
  color: var(--text-main);
}

.effort-btn.active {
  background: var(--accent-indigo);
  color: #fff;
  box-shadow: 0 1px 6px rgba(99, 102, 241, 0.4);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

/* ── Main Workspace ──────────────────────────────────────── */
.main-workspace {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.view-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
}

.view-panel.active {
  display: flex;
  flex-direction: column;
}

/* ── VIEW 1: Chat Assistant ──────────────────────────────── */
#chat-tab {
  height: calc(100vh - 64px);
  position: relative;
}

.chat-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24% 170px 24%;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1400px) {
  .chat-viewport { padding: 20px 14% 170px 14%; }
}
@media (max-width: 900px) {
  .chat-viewport { padding: 16px 16px 170px 16px; }
}

/* ── Living Hero Stage ───────────────────────────────────── */
.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 20px 20px 20px;
  margin: auto 0;
  animation: heroFadeIn 0.4s ease-out;
}

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

.living-nebula-container {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

#nebula-canvas {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  filter: drop-shadow(0 0 35px rgba(255, 158, 59, 0.45));
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 22, 34, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-headline {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 26px;
}

/* Prompt Grid */
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 620px;
}

.prompt-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.prompt-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-indigo);
}

.prompt-emoji {
  font-size: 20px;
  line-height: 1;
}

.prompt-info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.prompt-info span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* ── Messages Flow ───────────────────────────────────────── */
.messages-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  animation: bubbleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.user-bubble {
  align-self: flex-end;
  background: var(--bg-bubble-user);
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  padding: 12px 18px;
  max-width: 80%;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.3);
}

.agent-bubble {
  align-self: flex-start;
  background: var(--bg-bubble-agent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  padding: 18px 22px;
  width: 100%;
  box-shadow: var(--shadow-ambient);
}

.agent-bubble-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.agent-avatar-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.agent-name-tag {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.agent-model-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 6px;
}

/* Thought Process Card */
.thought-card {
  background: rgba(10, 13, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

.thought-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  cursor: pointer;
  user-select: none;
  background: rgba(99, 102, 241, 0.05);
}

.thought-trigger:hover {
  background: rgba(99, 102, 241, 0.12);
}

.thought-content {
  display: none;
  padding: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle);
}

.thought-card.open .thought-content {
  display: block;
}

.thought-card.open .thought-trigger span:last-child {
  transform: rotate(180deg);
}

/* Tool execution tag */
.tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--accent-cyan);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 6px;
  margin: 0 4px 10px 0;
}

.bubble-text {
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
  word-break: break-word;
}

.bubble-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-bubble-action {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-bubble-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-light);
}

/* ── Floating Composer Dock with Status Bar ──────────────── */
.composer-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 24% 20px 24%;
  background: linear-gradient(180deg, rgba(7, 8, 13, 0) 0%, rgba(7, 8, 13, 0.88) 25%, rgba(7, 8, 13, 1) 100%);
  pointer-events: none;
}

@media (max-width: 1400px) {
  .composer-dock { padding: 0 14% 20px 14%; }
}
@media (max-width: 900px) {
  .composer-dock { padding: 0 16px 16px 16px; }
}

/* Agent Intelligence & Status Bar (Orb In Composer) */
.composer-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 22, 34, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  margin-bottom: 8px;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.composer-orb-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-agent-state {
  display: flex;
  flex-direction: column;
}

.composer-state-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.composer-state-detail {
  font-size: 10px;
  color: var(--text-muted);
}

.composer-telemetry {
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-chip {
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 6px;
}

.composer-shortcuts {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  pointer-events: auto;
}

.chip-shortcut {
  background: rgba(18, 22, 34, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.chip-shortcut:hover {
  background: rgba(26, 31, 48, 0.9);
  color: var(--text-main);
  border-color: var(--border-light);
}

.composer-pill-box {
  display: flex;
  align-items: flex-end;
  background: rgba(18, 22, 36, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 10px 14px 10px 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), var(--shadow-glow-indigo);
  pointer-events: auto;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.composer-pill-box:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(99, 102, 241, 0.4);
}

#composer-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 160px;
  padding: 4px 0;
}

#composer-input::placeholder {
  color: var(--text-dim);
}

.composer-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  flex-shrink: 0;
}

.btn-voice-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-toggle.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: #6ee7b7;
}

.hands-off-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-dim);
}

.btn-voice-toggle.active .hands-off-indicator {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.btn-circle-send {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.btn-circle-send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.6);
}

/* ── Generic Views / Panels ──────────────────────────────── */
.panel-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 36px 24px 80px 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.panel-header h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.panel-header p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--accent-indigo);
  color: #fff;
}

.btn-primary:hover {
  background: #4f46e5;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-magic {
  background: linear-gradient(135deg, #ff9e3b 0%, #ff4d4d 50%, #a855f7 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 158, 59, 0.35);
}

.btn-magic:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 24px rgba(255, 158, 59, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ── VIEW 2: Memory Palace Grid ──────────────────────────── */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.memory-room-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
}

.memory-room-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-ambient);
}

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.locus-item-box {
  background: rgba(10, 13, 22, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.locus-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.fact-text {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.4;
}

/* ── VIEW 3: Correction Rules Ledger ─────────────────────── */
.ledger-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.rule-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.rule-card:hover {
  border-color: rgba(255, 158, 59, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-gold);
}

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

.rule-id {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  background: rgba(255, 158, 59, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.rule-situation {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.rule-instruction {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
}

/* ── VIEW 4: Superpowers & Skills Grid ───────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.superpower-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.superpower-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-cyan);
}

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

.superpower-title {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.superpower-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.superpower-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.superpower-stats {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.superpower-stats strong {
  color: var(--text-main);
}

.btn-test-skill {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s ease;
}

.btn-test-skill:hover {
  background: rgba(0, 242, 254, 0.2);
  color: #fff;
}

/* ── VIEW 5: Morning Briefs & Research ───────────────────── */
.briefs-stream {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brief-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.brief-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.brief-topic {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.brief-body {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.brief-critique {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.critique-head {
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 4px;
}

/* ── VIEW 6: Benchmark & Self-Improvement ─────────────────── */
.benchmark-hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}

.benchmark-hero-cards.frontier-grid-cards {
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 1100px) {
  .benchmark-hero-cards.frontier-grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .benchmark-hero-cards.frontier-grid-cards {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-card.hle {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.12) 0%, rgba(18, 21, 33, 0.7) 100%);
}
.metric-card.hle .metric-value { color: #d8b4fe; }

.metric-card.gpqa {
  border-color: rgba(0, 242, 254, 0.4);
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.12) 0%, rgba(18, 21, 33, 0.7) 100%);
}
.metric-card.gpqa .metric-value { color: #67e8f9; }

.metric-card.math {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(18, 21, 33, 0.7) 100%);
}
.metric-card.math .metric-value { color: #fde047; }

.metric-card.swe {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.12) 0%, rgba(18, 21, 33, 0.7) 100%);
}
.metric-card.swe .metric-value { color: #6ee7b7; }

.metric-card.delta {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, rgba(18, 21, 33, 0.7) 100%);
  box-shadow: var(--shadow-glow-indigo);
}
.metric-card.delta .metric-value { color: var(--accent-gold); }

.metric-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.metric-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.metric-card.cold .metric-value { color: var(--accent-rose); }
.metric-card.learned .metric-value { color: var(--accent-emerald); }

.metric-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Category Filter Bar */
.benchmark-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--accent-indigo);
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border-color: var(--accent-indigo);
  color: #fff;
  font-weight: 700;
}

.benchmark-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bench-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.bench-task-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.bench-task-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bench-task-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.bench-task-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.bench-status-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.pill-status.pass { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.pill-status.fail { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

/* ── Modals ──────────────────────────────────────────────── */
.glass-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.glass-modal {
  background: rgba(20, 24, 38, 0.95);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), var(--shadow-glow-indigo);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-top h3 {
  font-size: 16px;
  font-weight: 800;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
}

.modal-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-field input,
.input-field textarea {
  background: rgba(10, 13, 22, 0.8);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
}

.input-field input:focus,
.input-field textarea:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-bottom {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14, 17, 27, 0.6);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.hidden {
  display: none !important;
}

.text-subtle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Interactive Canvas & Artifacts Workspace ──────────────── */
.canvas-drawer {
  position: fixed;
  top: 60px;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 90vw;
  background: rgba(13, 16, 26, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 90;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.canvas-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(18, 22, 36, 0.6);
}

.canvas-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.canvas-icon {
  font-size: 20px;
}

.canvas-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.canvas-subtitle {
  font-size: 11px;
  color: var(--text-dim);
}

.canvas-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  text-transform: uppercase;
}

.canvas-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-canvas-action {
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-canvas-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-indigo);
  color: #fff;
}

#btn-run-sandbox {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

#btn-run-sandbox:hover {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-canvas-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
}

.btn-canvas-close:hover {
  color: #fff;
}

.canvas-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px;
  gap: 14px;
}

.canvas-code-wrapper {
  background: #06080d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #e2e8f0;
}

.canvas-code-wrapper pre {
  margin: 0;
}

.canvas-preview-wrapper {
  flex: 1;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  min-height: 320px;
}

.canvas-preview-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.canvas-console-wrapper {
  background: #030407;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #6ee7b7;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.console-timing {
  color: var(--text-dim);
  font-size: 10px;
}

#canvas-console-output {
  margin: 0;
  color: #a7f3d0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Artifact Card In Chat */
.artifact-card-preview {
  margin-top: 10px;
  background: rgba(14, 18, 30, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.artifact-card-preview:hover {
  background: rgba(22, 27, 44, 0.95);
  border-color: var(--accent-indigo);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.artifact-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.artifact-open-btn {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Voice Engine Styles ─────────────────────────────────── */
.btn-voice-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-input:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-voice-input.is-recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-voice-output {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-voice-output.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-indigo);
  color: #a5b4fc;
}

/* ── Spatial Memory Palace 2D Canvas ─────────────────────── */
.palace-canvas-box {
  background: rgba(14, 18, 29, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.palace-canvas-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.palace-canvas-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.palace-legend {
  display: flex;
  gap: 14px;
}

.dot-legend {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-legend::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}

#palace-canvas {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at center, rgba(17, 24, 39, 0.6) 0%, rgba(6, 8, 14, 0.9) 100%);
  display: block;
}

/* ── Autonomous Commitments Tab ────────────────────────── */
.proactive-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.10));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  animation: bannerGlow 3s ease-in-out infinite alternate;
}
@keyframes bannerGlow {
  0% { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 0 0 transparent; }
  100% { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 0 20px rgba(168, 85, 247, 0.1); }
}
.proactive-banner .proactive-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.proactive-banner .proactive-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}
.proactive-banner .proactive-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.proactive-banner .proactive-dismiss:hover { color: var(--text-main); }

.commitments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.commitment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.commitment-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-violet));
  opacity: 0.8;
}
.commitment-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-indigo);
}
.commitment-card.suspended::before {
  background: linear-gradient(90deg, var(--accent-rose), #ef4444);
}
.commitment-card.paused::before {
  background: linear-gradient(90deg, var(--accent-gold), #f59e0b);
}

.commitment-card .cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.commitment-card .cmt-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}
.commitment-card .cmt-status {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cmt-status.active { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.cmt-status.paused { background: rgba(255, 158, 59, 0.15); color: var(--accent-gold); border: 1px solid rgba(255, 158, 59, 0.3); }
.cmt-status.suspended { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

.commitment-card .cmt-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.commitment-card .cmt-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.commitment-card .cmt-detail .label { font-weight: 600; color: var(--text-dim); min-width: 70px; }
.commitment-card .cmt-actions {
  display: flex;
  gap: 8px;
}
.commitment-card .cmt-actions button {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.commitment-card .cmt-actions button:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-indigo);
  color: var(--text-main);
}
.commitment-card .cmt-actions button.danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.delivery-section {
  margin-top: 12px;
}
.delivery-section .section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.delivery-section .section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.delivery-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.delivery-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.delivery-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}
.delivery-item .del-status-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.delivery-item .del-body {
  flex: 1;
}
.delivery-item .del-skill {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
}
.delivery-item .del-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.delivery-item .del-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.4rem; margin-bottom: 12px; opacity: 0.6; }
.empty-state .empty-title { font-weight: 700; font-size: 1rem; margin-bottom: 6px; color: var(--text-main); }
.empty-state .empty-desc { font-size: 0.85rem; max-width: 400px; margin: 0 auto; }
.empty-state.small { padding: 24px 16px; }
.empty-state.small .empty-desc { font-size: 0.8rem; }

/* ── Multimodal Attachments & Drag-Drop ─────────────────── */
.composer-attachments-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border: 1px dashed rgba(99, 102, 241, 0.4);
}

.composer-attachments-preview.hidden {
  display: none;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  color: #e2e8f0;
  max-width: 260px;
}

.attachment-chip img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
}

.attachment-chip .att-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.attachment-chip .att-remove {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
}

.attachment-chip .att-remove:hover {
  color: var(--accent-rose);
}

.composer-pill-box.dragover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

/* ── Voice & Audio Active Indicators ────────────────────── */
.btn-voice-input.listening {
  background: rgba(244, 63, 94, 0.25) !important;
  color: #f43f5e !important;
  border-color: #f43f5e !important;
  animation: pulseRecording 1.2s infinite ease-in-out;
}

@keyframes pulseRecording {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 14px 4px rgba(244, 63, 94, 0.35); }
}

.btn-voice-output.active {
  background: rgba(168, 85, 247, 0.25) !important;
  color: #c084fc !important;
  border-color: #c084fc !important;
}

/* ── Inline Canvas Trigger Button on Code Blocks ────────── */
.btn-open-canvas-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-canvas-inline:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4));
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

/* ── VIEW 8: Enterprise Agent Fleet & Registry ───────────── */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.agent-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.agent-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-purple);
}

.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.agent-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.agent-card-dept {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dept-SecOps { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.dept-Finance { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.dept-DevOps { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.dept-Compliance { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.dept-Executive { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.agent-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.agent-caps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cap-chip {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 2px 7px;
  border-radius: 4px;
}

.agent-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── VIEW 9: Model Armor & OpenTelemetry Traces ─────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.text-success { color: #34d399; }
.text-danger { color: #f43f5e; }
.text-warning { color: #fbbf24; }
.text-primary { color: #818cf8; }

.armor-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

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

.armor-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.protection-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.protection-list li {
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #34d399;
}

.threat-log-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.threat-entry {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #fca5a5;
  display: flex;
  justify-content: space-between;
}

.threat-empty {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  padding: 30px 10px;
}

.otel-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.waterfall-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.waterfall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.span-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.span-name {
  width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cbd5e1;
}

.span-bar-wrapper {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  height: 14px;
  position: relative;
}

.span-bar {
  background: linear-gradient(90deg, #6366f1, #00f2fe);
  border-radius: 4px;
  height: 100%;
}

.span-time {
  width: 60px;
  text-align: right;
  color: var(--text-dim);
}

/* ── VIEW 10: Taskmaster Chore Automation ────────────────── */
.chore-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-top: 18px;
}

.chore-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.chore-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 10px 0 6px 0;
}

.chore-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.workflow-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.step-node {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.step-node.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}

.step-node.completed {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.08);
}

.node-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #cbd5e1;
  flex-shrink: 0;
}

.step-node.completed .node-icon {
  background: #10b981;
  color: #000;
}

.node-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.node-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.chore-results-box {
  background: rgba(10, 13, 22, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.styled-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 0.9rem;
}


