/* Antigravity Remote Bridge - Modern Liquid Glass Light Theme */
:root {
  --bg-base: #F1F5F9;
  --panel-bg: rgba(255, 255, 255, 0.65);
  --panel-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 12px 40px rgba(31, 38, 135, 0.08);
  --glass-card: rgba(255, 255, 255, 0.75);
  
  --accent-cyan: #06B6D4;
  --accent-indigo: #4F46E5;
  --accent-violet: #7C3AED;
  --accent-pink: #EC4899;
  --accent-gradient: linear-gradient(135deg, #4F46E5 0%, #06B6D4 50%, #7C3AED 100%);
  --liquid-user-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-border: rgba(203, 213, 225, 0.6);
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.12) 0px, transparent 55%),
    radial-gradient(at 0% 100%, rgba(124, 58, 237, 0.12) 0px, transparent 55%);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1650px;
  margin: 0 auto;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-text h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Project Selector Bar */
.project-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  gap: 16px;
  flex-wrap: wrap;
}

.project-selector-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.project-selector-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-indigo);
  white-space: nowrap;
}

.project-select {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 14px;
  font-size: 0.8rem;
  outline: none;
  max-width: 280px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.custom-path-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  outline: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.custom-path-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.2);
}

.direct-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.direct-mode-toggle input {
  accent-color: var(--accent-indigo);
  cursor: pointer;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-offline {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.badge-offline .dot { background: #DC2626; }

.badge-online {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.badge-online .dot { 
  background: #10B981; 
  animation: pulse 2s infinite;
}

.badge-info {
  background: rgba(79, 70, 229, 0.1);
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.25);
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Walking & Spawning Subagent Floor Plan */
.office-floor-container {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(241, 245, 249, 0.8) 100%);
  border-radius: var(--radius-md);
}

.office-map {
  width: 100%;
  height: 380px;
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
}

/* Furniture */
.furniture {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

#station-architect { top: 20px; left: 20px; width: 140px; height: 75px; }
#station-backend { top: 20px; right: 20px; width: 140px; height: 75px; }
#station-frontend { bottom: 60px; left: 20px; width: 140px; height: 75px; }
#station-qa { bottom: 60px; right: 20px; width: 140px; height: 75px; }

#station-table { top: 150px; left: 140px; width: 120px; height: 70px; background: rgba(79, 70, 229, 0.06); border-color: rgba(79, 70, 229, 0.2); }
#station-coffee { bottom: 10px; left: 160px; width: 80px; height: 35px; background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.3); }

/* Spawning / Despawning Animations */
.walking-agent {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  transition: left 2s ease-in-out, top 2s ease-in-out, opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: scale(0.2);
}

.walking-agent.spawned {
  opacity: 1;
  transform: scale(1);
}

.walking-agent.despawning {
  opacity: 0;
  transform: scale(0.1) translateY(-20px);
}

.walking-agent .avatar-sprite {
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  animation: walkBob 0.6s infinite alternate;
}

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

.walking-agent .agent-tag {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  color: #FFF;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.walking-agent .speech-cloud {
  position: absolute;
  bottom: 52px;
  background: #0F172A;
  color: #38BDF8;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 6px 12px;
  border-radius: 12px;
  max-width: 200px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  animation: fadeIn 0.3s ease;
  white-space: normal;
  line-height: 1.35;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.walking-agent .speech-cloud::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #0F172A transparent;
}

/* Subprocess Banner */
.process-active-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.08);
  animation: fadeIn 0.2s ease;
}

.process-active-banner .cmd-text {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-indigo);
}

.process-active-banner .timer-badge {
  background: rgba(79, 70, 229, 0.15);
  color: var(--accent-indigo);
  padding: 4px 10px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.process-active-banner .pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-indigo);
  animation: pulse 1s infinite;
}

/* Interactive Approval Card */
.approval-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 243, 255, 0.95) 100%);
  border: 2px solid var(--accent-indigo);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 12px 0;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.15);
  animation: fadeIn 0.3s ease;
}

.approval-card h4 {
  font-size: 0.92rem;
  color: var(--accent-indigo);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.approval-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.approval-btn-group {
  display: flex;
  gap: 10px;
}

.btn-approve {
  background: #10B981;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}
.btn-approve:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-reject {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-reject:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Slash Commands Suggestion Menu */
.slash-menu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 6px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slash-menu.hidden {
  display: none;
}

.slash-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.slash-item:hover {
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent-indigo);
}

.slash-chip {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--accent-violet);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}
.btn-text:hover { color: var(--accent-indigo); }

/* Main Layout Grid */
.app-main {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 16px;
  padding: 16px;
  flex: 1;
  overflow: hidden;
}

/* Liquid Console Panel */
.console-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.3);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Chat Messages Stream */
.chat-messages {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.system-welcome {
  margin-bottom: 8px;
}

.welcome-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.welcome-card h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--accent-indigo);
}

.welcome-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

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

.chip-btn {
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--accent-indigo);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: rgba(79, 70, 229, 0.18);
  transform: translateY(-1px);
}

/* Chat Bubbles */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: fadeIn 0.25s ease-out;
}

.chat-msg.user {
  align-self: flex-end;
}

.chat-msg.user .msg-header {
  text-align: right;
  color: var(--accent-indigo);
  font-weight: 700;
}

.chat-msg.user .msg-body {
  background: var(--liquid-user-gradient);
  color: #FFFFFF;
  border-radius: 20px 20px 4px 20px;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 12px 18px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.chat-msg.agent {
  align-self: flex-start;
  max-width: 95%;
}

.chat-msg.agent .msg-header {
  color: var(--accent-violet);
  font-weight: 700;
}

.chat-msg.agent .msg-body {
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px 20px 20px 4px;
  padding: 16px 20px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.msg-header {
  font-size: 0.72rem;
  margin-bottom: 4px;
  padding: 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.msg-body h1, .msg-body h2, .msg-body h3 {
  color: var(--text-primary);
  margin-top: 12px;
  margin-bottom: 8px;
  font-weight: 700;
}
.msg-body h1 { font-size: 1.1rem; }
.msg-body h2 { font-size: 1.0rem; color: var(--accent-indigo); }
.msg-body h3 { font-size: 0.92rem; color: var(--accent-violet); }

.msg-body p { margin-bottom: 10px; }
.msg-body p:last-child { margin-bottom: 0; }

.msg-body ul, .msg-body ol {
  margin-left: 20px;
  margin-bottom: 10px;
}

.msg-body li {
  margin-bottom: 4px;
}

.msg-body code {
  background: rgba(79, 70, 229, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-indigo);
  font-weight: 600;
}

.msg-body pre {
  background: #0F172A;
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 12px 0;
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: #38BDF8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.msg-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.typing-indicator {
  display: inline-block;
  color: var(--accent-indigo);
  font-weight: bold;
  animation: blink 1s infinite;
}

/* Input Form */
.chat-input-container {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  position: relative;
}

.chat-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-form textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 12px 16px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  resize: none;
  outline: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.chat-form textarea:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
}

/* Telemetry Panel */
.telemetry-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.3);
}

.tab-btn {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--accent-indigo);
  border-bottom-color: var(--accent-indigo);
  background: rgba(79, 70, 229, 0.06);
}

.tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-pane {
  display: none;
  height: 100%;
  flex-direction: column;
}

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

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.count-badge {
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent-indigo);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.thought-feed, .logs-feed {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 40px;
  padding: 0 20px;
}

.event-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 3px solid var(--accent-indigo);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.8rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  animation: fadeIn 0.2s ease;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.event-card.thought {
  border-left-color: #8B5CF6;
  background: rgba(139, 92, 246, 0.06);
}

.event-card.tool {
  border-left-color: #06B6D4;
  background: rgba(6, 182, 212, 0.06);
}

.event-card .title {
  font-weight: 700;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
}

.event-card .body {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

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

.modal-header h3 { font-size: 1.05rem; color: var(--text-primary); }

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

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .telemetry-panel {
    height: 420px;
  }
}
