/* ==========================================================================
   Supervision DevTeam - Modern Glassmorphic Dark Dashboard
   ========================================================================== */

:root {
  --bg-primary: #090d16;
  --bg-secondary: #111728;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 36, 58, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Terminal Colors */
  --term-bg: #070a10;
  --term-header: #0f1420;
  --term-text: #e2e8f0;
  --term-gray: #64748b;
  --term-red: #f87171;
  --term-green: #4ade80;
  --term-yellow: #facc15;
  --term-blue: #60a5fa;
  --term-magenta: #c084fc;
  --term-cyan: #22d3ee;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, rgba(9, 13, 22, 0.95) 0%, #04060a 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.app-container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 1.25rem 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ==========================================================================
   Header & Stats Bar (Sticky, Full Width, Compact)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.header-container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.logo-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.logo-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  line-height: 1;
  margin-top: 1px;
}

.server-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.stat-pill.mode-pill {
  border-color: rgba(99, 102, 241, 0.3);
}

.mode-badge {
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mode-badge.DEV {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.mode-badge.PROD {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   Search & Filter Bar
   ========================================================================== */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
  fill: currentColor;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-indigo);
  color: #fff;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   Main Grid Layout (Apps + Terminal)
   ========================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, 1.35fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1120px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   App Cards
   ========================================================================== */
.apps-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
}

.count-tag {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.1rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-indigo), var(--accent-cyan));
  opacity: 0;
  transition: var(--transition);
}

.app-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.app-card.active-app {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.app-card.active-app::before {
  opacity: 1;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.app-path-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.badge {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-tech-nest {
  background: rgba(234, 40, 78, 0.15);
  color: #ff4d6d;
  border: 1px solid rgba(234, 40, 78, 0.35);
}

.badge-tech-angular {
  background: rgba(221, 0, 49, 0.15);
  color: #ff3366;
  border: 1px solid rgba(221, 0, 49, 0.35);
}

.badge-tech-node {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.badge-tech-wordpress {
  background: rgba(33, 117, 155, 0.18);
  color: #389af0;
  border: 1px solid rgba(33, 117, 155, 0.4);
}

.badge-tech-php {
  background: rgba(119, 123, 179, 0.18);
  color: #a78bfa;
  border: 1px solid rgba(119, 123, 179, 0.4);
}


.badge-dev {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-preprod {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-prod {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

/* App Details Block */
.app-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 0.75rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
}

.detail-label {
  color: var(--text-muted);
  font-weight: 500;
  width: 50px;
  flex-shrink: 0;
}

.detail-val {
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action Buttons */
.app-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.btn-action.disabled,
.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.5);
}

.btn-action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
}

.btn-logs:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.btn-update:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.btn-restart:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

/* ==========================================================================
   Live Terminal Panel
   ========================================================================== */
.terminal-panel {
  background: var(--term-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 0 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  min-height: 540px;
  position: sticky;
  top: 1.5rem;
  overflow: hidden;
}

.terminal-header {
  background: var(--term-header);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.terminal-controls-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.terminal-dot.dot-red { background: #ff5f56; }
.terminal-dot.dot-yellow { background: #ffbd2e; }
.terminal-dot.dot-green { background: #27c93f; }

.terminal-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.term-tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.term-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.term-tool-btn svg {
  width: 13px;
  height: 13px;
}

.term-tool-btn.btn-stop {
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.term-tool-btn.btn-stop:hover {
  background: rgba(244, 63, 94, 0.2);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  margin-left: 0.3rem;
}

.toggle-label input[type="checkbox"] {
  accent-color: var(--accent-indigo);
  cursor: pointer;
}

/* Command Banner */
.command-banner {
  background: rgba(0, 0, 0, 0.45);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
}

.command-prompt {
  color: var(--accent-indigo);
  font-weight: bold;
}

.command-text {
  color: var(--accent-cyan);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex: 1;
}

.command-text::-webkit-scrollbar {
  display: none;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-indicator.running {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

.status-indicator.running .status-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 1.5s infinite;
}

.status-indicator.error {
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

.status-indicator.error .status-dot {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
}

.status-indicator.stopped {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
}

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

/* Terminal Body */
.terminal-body {
  flex: 1;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  font-family: 'JetBrains Mono', "Fira Code", ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--term-text);
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.terminal-body::-webkit-scrollbar {
  width: 7px;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.term-empty-state,
.terminal-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  text-align: center;
  gap: 0.9rem;
  user-select: none;
  animation: termFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.15), inset 0 0 15px rgba(6, 182, 212, 0.1);
  margin-bottom: 0.25rem;
}

.empty-icon-wrap svg,
.terminal-welcome svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-cyan);
  fill: none;
  opacity: 0.9;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5));
}

.empty-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.empty-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.5;
}

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

.hint-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.hint-badge {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hint-badge.badge-logs {
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.hint-badge.badge-update {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hint-badge.badge-restart {
  background: rgba(244, 63, 94, 0.18);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.empty-prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.prompt-sym {
  color: var(--accent-indigo);
  font-weight: bold;
}

.prompt-cmd {
  color: var(--accent-cyan);
}

.cursor-blink {
  color: var(--accent-indigo);
  animation: blinkCaret 1s step-end infinite;
  font-weight: bold;
}

@keyframes blinkCaret {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.empty-tip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  margin-top: 0.4rem;
}

.empty-tip svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-indigo);
  flex-shrink: 0;
}

.empty-tip strong {
  color: var(--text-secondary);
}

.term-line {
  display: block;
}

.term-line.sys-info {
  color: var(--accent-cyan);
  font-weight: 500;
}

.term-line.sys-success {
  color: var(--term-green);
  font-weight: 600;
}

.term-line.sys-error {
  color: var(--term-red);
  font-weight: 600;
}

/* ANSI Styling */
.ansi-bold { font-weight: bold; }
.ansi-dim { opacity: 0.7; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }

.ansi-black { color: #484f58; }
.ansi-red { color: var(--term-red); }
.ansi-green { color: var(--term-green); }
.ansi-yellow { color: var(--term-yellow); }
.ansi-blue { color: var(--term-blue); }
.ansi-magenta { color: var(--term-magenta); }
.ansi-cyan { color: var(--term-cyan); }
.ansi-white { color: #f0f6fc; }

.ansi-stderr {
  color: var(--term-red);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.3s ease forwards;
  pointer-events: auto;
}

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

/* Modal Prompt for Tail Lines */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.modal-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.modal-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  outline: none;
  transition: var(--transition);
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
