/* Dora & Nero ? Core Design System (Obsidian & Cyan-Violet Glassmorphism) */

:root {
  --bg-deep: #05070d;
  --bg-card: rgba(13, 18, 34, 0.72);
  --bg-card-hover: rgba(20, 28, 52, 0.85);
  --bg-card-elevated: #0f162a;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 240, 255, 0.24);
  --border-violet: rgba(139, 92, 246, 0.28);
  
  --dora-primary: #00f0ff;
  --dora-secondary: #0072ff;
  --dora-glow: rgba(0, 240, 255, 0.35);

  --nero-primary: #8b5cf6;
  --nero-secondary: #6366f1;
  --nero-glow: rgba(139, 92, 246, 0.35);

  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-glow-cyan: 0 0 24px rgba(0, 240, 255, 0.18);
  --shadow-glow-violet: 0 0 24px rgba(139, 92, 246, 0.18);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.04) 0%, transparent 45%);
}

/* Header */
.app-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dora-logo-emblem {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow-cyan);
}

.dolphin-d-svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px var(--dora-glow));
}

.dolphin-eye {
  animation: pulseEye 3s infinite ease-in-out;
}

@keyframes pulseEye {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

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

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-plus {
  color: var(--nero-primary);
  -webkit-text-fill-color: var(--nero-primary);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Status Strip */
.header-status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

#healthStatusPill.health-ready {
  border-color: rgba(34, 197, 94, 0.55);
}

#healthStatusPill.health-degraded {
  border-color: rgba(245, 158, 11, 0.65);
}

.dora-status {
  border-color: var(--border-cyan);
}

.nero-status {
  border-color: var(--border-violet);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dora-dot {
  background-color: var(--dora-primary);
  box-shadow: 0 0 8px var(--dora-primary);
  animation: pulseDot 2s infinite;
}

.nero-dot {
  background-color: var(--nero-primary);
  box-shadow: 0 0 8px var(--nero-primary);
  animation: pulseDot 2.4s infinite;
}

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

/* Navigation Tabs */
.app-nav {
  display: flex;
  gap: 6px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

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

.nav-tab.active {
  color: #ffffff;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.12);
}

.badge {
  background: var(--dora-primary);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Main Viewport Panes */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  overflow: hidden;
}

.tab-pane {
  display: none;
  flex: 1;
  height: 100%;
  overflow-y: auto;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
}

/* Tab 1: Chat Layout */
.chat-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 20px 20px;
  height: 100%;
  overflow: hidden;
}

.activity-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.ticker-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dora-primary);
  animation: pulseDot 1.5s infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Welcome Card */
.welcome-card {
  margin: auto;
  text-align: center;
  max-width: 560px;
  padding: 36px 28px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.welcome-emblem {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dora-primary), var(--nero-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.4rem;
  font-weight: 700;
}

.welcome-card h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.welcome-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-chip:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--border-cyan);
  color: var(--dora-primary);
}

/* Message Bubbles */
.message-bubble {
  display: flex;
  gap: 14px;
  max-width: 82%;
  animation: fadeIn 0.25s ease-out;
}

.message-bubble.user-bubble {
  margin-left: auto;
  flex-direction: row-reverse;
}

.bubble-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.bubble-avatar.dora-avatar {
  background: linear-gradient(135deg, var(--dora-primary), var(--dora-secondary));
  color: #000;
  box-shadow: 0 0 12px var(--dora-glow);
}

.bubble-avatar.nero-avatar {
  background: linear-gradient(135deg, var(--nero-primary), var(--nero-secondary));
  color: #fff;
  box-shadow: 0 0 12px var(--nero-glow);
}

.bubble-avatar.user-avatar {
  background: #334155;
  color: #fff;
}

.bubble-content {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  line-height: 1.55;
  font-size: 0.92rem;
}

.user-bubble .bubble-content {
  background: rgba(0, 114, 255, 0.15);
  border-color: rgba(0, 114, 255, 0.3);
}

.bubble-content pre {
  background: #020617;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-x: auto;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin-top: 8px;
}

/* Dock & Input */
.chat-dock-container {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.dock-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.persona-switch {
  display: flex;
  gap: 6px;
}

.persona-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.persona-btn.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--border-cyan);
  color: #ffffff;
}

.dot-dora { width: 6px; height: 6px; border-radius: 50%; background: var(--dora-primary); }
.dot-nero { width: 6px; height: 6px; border-radius: 50%; background: var(--nero-primary); }
.dot-auto { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--dora-primary), var(--nero-primary)); box-shadow: 0 0 6px rgba(0, 240, 255, 0.6); }

.hitap-reminder {
  color: var(--text-muted);
}

.chat-input-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 18px;
  transition: all 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--dora-primary);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.16);
}

.input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.95rem;
  padding: 8px 0;
}

.mic-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mic-button:hover {
  background: rgba(0, 240, 255, 0.15);
  color: var(--dora-primary);
}

.mic-button.listening {
  background: var(--accent-danger);
  color: #fff;
  animation: micPulse 1s infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(239, 68, 68, 0.6); }
  50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

.send-button {
  background: linear-gradient(135deg, var(--dora-primary), var(--dora-secondary));
  color: #000;
  border: none;
  padding: 0 22px;
  height: 48px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.send-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--dora-glow);
}

/* Tab 2: Agents Layout */
.agents-layout {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

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

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

.agent-card.dora-card { border-color: var(--border-cyan); }
.agent-card.nero-card { border-color: var(--border-violet); }

.agent-card-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.agent-avatar-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
}

.dora-avatar-glow { border-color: var(--dora-primary); box-shadow: 0 0 16px var(--dora-glow); }
.nero-avatar-glow { border-color: var(--nero-primary); box-shadow: 0 0 16px var(--nero-glow); }

.agent-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-role-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.15);
  color: var(--dora-primary);
  font-family: var(--font-mono);
}

.nero-role {
  background: rgba(139, 92, 246, 0.15);
  color: var(--nero-primary);
}

.agent-live-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-top: 4px;
}

.agent-live-badge.online { color: var(--accent-success); }

.agent-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.agent-attributes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.attr-item { display: flex; justify-content: space-between; }
.attr-label { color: var(--text-muted); }
.attr-val { color: var(--text-primary); font-weight: 500; }

/* Activity Panel */
.activity-feed-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.action-btn-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.activity-row {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  border-left: 3px solid var(--border-cyan);
}

/* Tab 3: Tasks Layout */
.tasks-layout {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.tasks-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tasks-filter-group {
  display: flex;
  gap: 8px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--dora-primary);
  color: #000;
  font-weight: 600;
  border-color: var(--dora-primary);
}

.action-btn-primary {
  background: linear-gradient(135deg, var(--dora-primary), var(--dora-secondary));
  color: #000;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

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

.task-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.task-priority-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.prio-HIGH, .prio-CRITICAL { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.prio-MEDIUM { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.prio-LOW { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.task-status-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.status-COMPLETED { color: var(--accent-success); }
.status-RUNNING { color: var(--dora-primary); }
.status-CANCELLED { color: var(--text-muted); }

.task-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dora-primary), var(--dora-secondary));
  transition: width 0.3s;
}

/* Tab 4: Memory Layout */
.memory-layout {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

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

.small-text { font-size: 0.8rem; color: var(--text-muted); }

.memory-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-add-form input, .memory-add-form select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.memory-content-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.memory-search-bar input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fact-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

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

.fact-key {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dora-primary);
  font-family: var(--font-mono);
}

.fact-val {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.fact-del-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.fact-del-btn:hover { color: var(--accent-danger); }

/* Tab 5: System Layout */
.system-layout {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vitals-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.vital-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vital-title { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.vital-val-large { font-size: 1.8rem; font-weight: 700; font-family: var(--font-mono); color: var(--dora-primary); }
.vital-detail { font-size: 0.78rem; color: var(--text-secondary); }

.vital-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.vital-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--dora-primary);
  transition: width 0.5s;
}

.running-apps-panel, .tools-inventory-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.running-apps-panel h3, .tools-inventory-panel h3 {
  font-size: 1rem;
  margin-bottom: 14px;
}

.running-apps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tool-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.tool-name { font-weight: 600; font-size: 0.85rem; color: var(--dora-primary); font-family: var(--font-mono); }
.tool-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }

/* Responsive adjustments */
@media (max-width: 860px) {
  .app-header { height: auto; flex-wrap: wrap; gap: 12px; padding: 12px; }
  .header-status-strip { display: none; }
  .agents-grid, .vitals-row, .memory-layout, .facts-grid { grid-template-columns: 1fr; }
}

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

.dora-stage {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 24px 80px;
  position: relative;
  overflow: hidden;
}
.presence-stage .presence-ambient {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 200, 255, 0.14), transparent 55%),
    radial-gradient(ellipse at 30% 80%, rgba(0, 80, 120, 0.18), transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(20, 40, 80, 0.35), transparent 45%);
  animation: ambientDrift 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.presence-stage > *:not(.presence-ambient) { position: relative; z-index: 1; }
.dora-presence-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dora-stage-title {
  letter-spacing: 0.45em;
  font-weight: 300;
  font-size: 1.55rem;
  color: var(--dora-primary);
  text-shadow: 0 0 28px rgba(0, 240, 255, 0.25);
}
.dora-orb-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  margin: 8px 0 4px;
}
.dora-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.22);
  inset: 18px;
  opacity: 0.55;
  animation: ringPulse 3.8s ease-out infinite;
}
.dora-ring.r2 {
  inset: 0;
  animation-delay: 1.2s;
  border-color: rgba(0, 114, 255, 0.2);
}
.dora-orb {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9ff9ff, #0072ff 55%, #05070d 78%);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.35);
  animation: orbIdle 3.6s ease-in-out infinite;
}
.dora-orb[data-state="LISTENING"] {
  box-shadow: 0 0 64px rgba(0, 240, 255, 0.75);
  animation: orbListen 1.8s ease-in-out infinite;
}
.dora-orb-wrap:has(.dora-orb[data-state="LISTENING"]) .dora-ring,
.dora-orb-wrap.is-listening .dora-ring {
  animation-duration: 2.2s;
  opacity: 0.85;
}
.dora-orb[data-state="SPEAKING"] { box-shadow: 0 0 56px rgba(56, 189, 248, 0.55); }
.dora-orb[data-state="THINKING"], .dora-orb[data-state="EXECUTING"] { box-shadow: 0 0 48px rgba(34, 211, 238, 0.55); }
.dora-orb[data-state="WAITING_APPROVAL"] { box-shadow: 0 0 48px rgba(245, 158, 11, 0.55); }
.dora-orb[data-state="OFFLINE"], .dora-orb[data-state="ERROR"] { filter: grayscale(0.4); }
.dora-stage-state { font-size: 1.12rem; color: var(--text-primary); font-weight: 500; }
.dora-now {
  min-height: 1.4em;
  color: #67e8f9;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.dora-stage-hint { color: var(--text-secondary); max-width: 28rem; text-align: center; }
.dora-stage-hint.muted { color: var(--text-muted); font-size: 0.85rem; }
.dora-mic-cta {
  margin-top: 6px;
  padding: 10px 22px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 114, 255, 0.2);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  letter-spacing: 0.04em;
}
.dora-mic-cta:hover { background: rgba(0, 114, 255, 0.35); }
.dora-status-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; max-width: 920px; }
.dora-chip {
  min-width: 110px;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(8, 14, 28, 0.65);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dora-chip span { font-size: 0.72rem; color: var(--text-muted); }
.dora-chip strong { font-size: 0.9rem; }
@keyframes ambientDrift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.06) translateY(-12px); }
}
@keyframes ringPulse {
  0% { transform: scale(0.92); opacity: 0.55; }
  70% { transform: scale(1.08); opacity: 0; }
  100% { transform: scale(1.08); opacity: 0; }
}
@keyframes orbListen {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.settings-layout { max-width: 560px; margin: 24px auto; padding: 0 20px 40px; }
.settings-form { display: flex; flex-direction: column; gap: 10px; }
.settings-form label { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 0.85rem; }
.settings-form input, .settings-form select {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 10px;
}
@keyframes orbIdle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
