/* ═══════════════════════════════════════════════════════════════════════════
   SwarmVerse 3.0 — Glassmorphism Light Design System
   Minimalist Glass | Premium Typography | Fluid Interactions
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  /* Default: Premium Light Mode Glassmorphism */
  --bg:            #F8F9FA;
  --bg-2:          #E9ECEF;
  --surface:       rgba(255, 255, 255, 0.6);
  --surface-2:     rgba(255, 255, 255, 0.8);
  --primary:       #495057;
  --primary-glow:  rgba(73, 80, 87, 0.15);
  --accent:        #10b981;
  --success:       #10b981;
  --warning:       #f59e0b;
  --error:         #ef4444;
  --text:          #222222;
  --text-2:        #495057;
  --text-3:        #868e96;
  
  --glass:         rgba(255, 255, 255, 0.6);
  --glass-hover:   rgba(255, 255, 255, 0.85);
  --border:        rgba(255, 255, 255, 0.8);
  --border-light:  rgba(0, 0, 0, 0.05);
  --border-focus:  #495057;

  /* Agents Colors */
  --ceo-color:      #495057;
  --designer-color: #d946ef;
  --coder-color:    #10b981;
  --tester-color:   #ef4444;

  /* Layout */
  --nav-height:  56px;
  --radius:      16px;
  --radius-lg:   24px;
  --blur:        10px;
  --shadow:      0 8px 32px 0 rgba(31, 38, 135, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);

  /* Typography */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;

  /* Transitions */
  --t-fast:   all 0.15s cubic-bezier(0.32, 0.72, 0, 1);
  --t-base:   all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  --t-slow:   all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg:            #090d16;
  --bg-2:          #0f172a;
  --surface:       rgba(15, 23, 42, 0.55);
  --surface-2:     rgba(15, 23, 42, 0.75);
  --primary:       #cbd5e1;
  --primary-glow:  rgba(203, 213, 225, 0.25);
  --text:          #f8fafc;
  --text-2:        #cbd5e1;
  --text-3:        #64748b;
  
  --glass:         rgba(15, 23, 42, 0.55);
  --glass-hover:   rgba(15, 23, 42, 0.75);
  --border:        rgba(255, 255, 255, 0.08);
  --border-light:  rgba(255, 255, 255, 0.08);
  --border-focus:  #cbd5e1;
  --shadow:      0 8px 32px 0 rgba(0, 0, 0, 0.3);

  --ceo-color:      #cbd5e1;
  --designer-color: #f472b6;
  --coder-color:    #34d399;
  --tester-color:   #f87171;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Subtle background glow grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--bg-2) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── Glass Utility ────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
}

/* ── Navigation Bar ──────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 12px 0 12px;
  height: var(--nav-height);
  box-shadow: var(--shadow);
  z-index: 1000;
  position: relative;
  gap: 1rem;
}

.nav-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.logo-svg {
  animation: logoGlow 6s ease-in-out infinite alternate;
}
@keyframes logoGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(0,0,0,0.05)); }
  100% { transform: scale(1.04); filter: drop-shadow(0 0 8px var(--primary-glow)); }
}

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

.nav-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
  transition: var(--t-base);
  display: flex;
  align-items: center;
}
.nav-badge.connected { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: var(--success); }
.nav-badge.demo { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); color: var(--warning); }

.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.phase-tracker {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-3); /* 'Phase' and separator in grey */
}
#phaseCurrent {
  color: var(--text-3); /* Phase number in grey */
  font-weight: 700;
}
#phaseName {
  color: var(--text); /* Active name in darker color */
  font-weight: 700;
}

.nav-right { display: flex; align-items: center; gap: 0.65rem; }

.token-counter-pill {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  font-family: var(--font-mono);
}
#tokenCount {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.25rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: #FFFFFF;
  color: #222222;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
  height: 32px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: var(--t-base);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover {
  background: #F1F3F5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .btn-primary {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
  color: #FFFFFF;
}
[data-theme="dark"] .btn-primary:hover {
  background: rgba(255,255,255,0.15);
}

.btn-secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
  height: 32px;
  transition: var(--t-base);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-2);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-base);
}
.btn-cancel:hover { background: rgba(0,0,0,0.02); color: var(--text); }

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; min-width: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-3);
  cursor: pointer;
  transition: var(--t-base);
}
.btn-icon:hover { background: rgba(0,0,0,0.03); color: var(--text); }

/* Theme Toggle Button */
.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  cursor: pointer;
  transition: var(--t-base);
  height: 28px;
}
.theme-slider {
  display: flex;
  align-items: center;
  position: relative;
  width: 38px;
  height: 20px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 100px;
  padding: 1px;
  transition: var(--t-base);
}
[data-theme="dark"] .theme-slider {
  background: rgba(255, 255, 255, 0.15);
}
.theme-knob {
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .theme-knob {
  transform: translateX(18px);
}
.theme-icon {
  font-size: 0.6rem;
  position: absolute;
  pointer-events: none;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  filter: grayscale(1) brightness(0.95) opacity(0.65); /* Makes the emojis a premium uniform grey */
  transition: var(--t-fast);
}
.btn-theme-toggle:hover .theme-icon {
  filter: grayscale(1) brightness(0.95) opacity(0.9);
}
.theme-icon.moon { left: 5px; }
.theme-icon.sun { right: 5px; }
.theme-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  min-width: 30px;
  text-align: left;
}

.hero-spacer { display: none; }

/* ── Main Layout Grid ────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: minmax(280px, 22%) 1fr minmax(320px, 24%);
  height: calc(100vh - var(--nav-height) - 36px);
  margin-top: 12px;
  padding: 0 12px 12px 12px;
  gap: 12px;
  overflow: hidden;
  position: relative;
  z-index: 10;
  pointer-events: none; /* Let events pass to background */
}

/* ── Panels ──────────────────────────────────────────────────────────────── */
.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: none;
  pointer-events: auto; /* Re-enable pointer events for panels */
}
.panel-left {
  background: transparent;
  gap: 12px;
}
.panel-section {
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.projects-section {
  flex: 2; /* 2/3 height approx */
}
.agents-section {
  flex: 1; /* 1/3 height approx */
  padding-bottom: 0.75rem;
}

.panel-header-simple {
  padding: 1rem 1.25rem 0.5rem 1.25rem;
}
.panel-title-large {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}

/* ── Projects Sidebar Content ────────────────────────────────────────────── */
.new-project-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 2.5rem);
  margin: 0.5rem 1.25rem 0.5rem 1.25rem;
  padding: 0.6rem 1rem;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 100px;
  color: #222222;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: var(--t-base);
}
.new-project-toggle-btn:hover {
  background: #F1F3F5;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] .new-project-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}
[data-theme="dark"] .new-project-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.new-project-form {
  margin: 0.25rem 1.25rem;
  border-radius: var(--radius);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  animation: slideDown 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  max-height: 70%;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.form-label { font-size: 0.65rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

.form-input {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  font-family: inherit;
  width: 100%;
  transition: var(--t-base);
}
@keyframes outlineDashMove {
  to {
    outline-offset: 4px;
  }
}

.form-input:focus {
  outline: 1.5px dashed var(--primary);
  outline-offset: 1px;
  animation: outlineDashMove 0.8s linear infinite;
  border-color: var(--primary);
  box-shadow: none !important;
}
.form-input::placeholder { color: var(--text-3); }
.form-textarea { min-height: 60px; resize: vertical; }

.form-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }

/* Projects List UI */
.project-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.project-item {
  margin: 6px 1.25rem;
  padding: 8px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--t-base);
}
[data-theme="dark"] .project-item {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.03);
}

.project-pill-text {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  padding-right: 0.5rem;
}
.project-item:hover {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
[data-theme="dark"] .project-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.project-item.active {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}
[data-theme="dark"] .project-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}
.project-item.active .project-pill-text {
  color: var(--text);
  font-weight: 600;
}

.project-item-actions {
  display: flex;
  gap: 0.2rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.project-item:hover .project-item-actions {
  opacity: 1;
}
.btn-run, .btn-delete, .btn-launch, .btn-download {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-light);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; transition: var(--t-fast); background: var(--bg);
  min-width: 22px; min-height: 22px; color: var(--text-2);
}
.btn-run:hover { background: rgba(16, 185, 129, 0.1); border-color: var(--success); color: var(--success); }
.btn-delete:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--error); color: var(--error); }
.btn-launch:hover { background: rgba(0, 102, 204, 0.1); border-color: var(--primary); color: var(--primary); }
.btn-download:hover { background: rgba(245, 158, 11, 0.1); border-color: #f59e0b; color: #f59e0b; }


/* ── Agents Sidebar Content ──────────────────────────────────────────────── */
.agent-cards {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.25rem 0;
}
.agent-card {
  margin: 4px 1.25rem;
  padding: 10px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--t-base);
}
[data-theme="dark"] .agent-card {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.02);
}
.agent-card:hover {
  background: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .agent-card:hover {
  background: rgba(255,255,255,0.04);
}
.agent-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}
.agent-card.active .agent-name {
  color: var(--text);
}
.agent-status-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.agent-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-3);
  transition: var(--t-base);
}
.agent-dot.idle { background: var(--success); }
.agent-dot.thinking, .agent-dot.walking { background: var(--warning); box-shadow: 0 0 6px var(--warning); animation: blink 0.8s ease-in-out infinite; }
.agent-dot.working { background: var(--primary); box-shadow: 0 0 8px var(--primary); animation: blink 0.5s ease-in-out infinite; }
.agent-dot.success { background: var(--success); box-shadow: 0 0 8px var(--success); }
.agent-dot.error { background: var(--error); box-shadow: 0 0 8px var(--error); }

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

.agent-status {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 500;
}
.agent-card.active .agent-status {
  color: var(--text-2);
}

/* ── Center Panel: Spline 3D Robot ───────────────────────────────────────── */
.panel-center {
  position: relative;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  pointer-events: none; /* Let events fall through to Spline robot */
}

/* Watermark text behind robot */
.watermark-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15vw;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.02);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  transition: color 0.3s ease;
}
[data-theme="dark"] .watermark-text {
  color: rgba(255, 255, 255, 0.015);
}

.spline-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto; /* Active cursor tracking and interaction */
}
.spline-container spline-viewer {
  width: 100%;
  height: 100%;
}
/* Mask/block the Spline logo bottom right */
.spline-overlay-blocker {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 48px;
  background: transparent;
  pointer-events: auto;
  z-index: 10;
}

/* Floating HITL Prompt Input Bar */
.hitl-bar {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 600px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 100px;
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  z-index: 100;
  transition: var(--t-base);
  pointer-events: auto; /* Re-enable pointer events for the prompt input bar */
}
[data-theme="dark"] .hitl-bar {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.hitl-bar:focus-within {
  outline: 1.5px dashed var(--primary);
  outline-offset: 1px;
  animation: outlineDashMove 0.8s linear infinite;
  border-color: var(--primary);
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] .hitl-bar:focus-within {
  background: rgba(15, 23, 42, 0.85);
  border-color: var(--border-focus);
}

.hitl-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 0;
  font-family: inherit;
}
.hitl-input:focus { outline: none; }
.hitl-input::placeholder { color: var(--text-3); }

.btn-send {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--t-fast);
}
.btn-send:hover {
  background: rgba(0,0,0,0.05);
  color: var(--primary);
  transform: scale(1.05);
}
[data-theme="dark"] .btn-send:hover {
  background: rgba(255,255,255,0.08);
  color: var(--primary);
}

/* ── Modern Collapsible CLI Terminal overlay ── */
.terminal-console {
  position: absolute;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 24px);
  max-width: 700px;
  height: 240px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.terminal-console.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
[data-theme="dark"] .terminal-header {
  background: rgba(255, 255, 255, 0.03);
}
.terminal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-2);
}
.terminal-status {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text-3);
}
.terminal-status.running {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.terminal-actions { display: flex; gap: 0.4rem; }
.btn-term-action {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-3);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--t-fast);
}
.btn-term-action:hover {
  background: var(--bg-2);
  color: var(--text);
}
.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.4);
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 15%, transparent 15%);
  background-size: 4px 4px;
}
[data-theme="dark"] .terminal-body {
  background: rgba(15, 23, 42, 0.45);
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 15%, transparent 15%);
}
.terminal-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.term-time { color: var(--text-3); font-size: 0.65rem; flex-shrink: 0; }
.terminal-line.system { color: var(--primary); }
.terminal-line.info { color: #0284c7; }
[data-theme="dark"] .terminal-line.info { color: #38bdf8; }
.terminal-line.error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.05);
  border-left: 2px solid var(--error);
  padding-left: 0.25rem;
}
.terminal-line.thought { color: var(--primary); font-style: italic; opacity: 0.8; }

.log-header-mobile, .docs-header-mobile, .prompts-header-mobile { display: none; }

/* ── Right Panel: Log & Docs ─────────────────────────────────────────────── */
.panel-right {
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.artifact-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px;
  border-radius: 100px;
  margin: 16px 16px 6px 16px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}
[data-theme="dark"] .artifact-tabs {
  background: rgba(255, 255, 255, 0.03);
}

.tab {
  flex: 1;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-base);
  border-radius: 100px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}
.tab:hover { color: var(--text-2); }
.tab.active {
  background: #FFFFFF;
  color: #222222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.05);
}

.right-panel-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.log-panel, .artifact-panel {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.hidden { display: none !important; }

.log-entries {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  animation: fadeInLog 0.2s ease;
  line-height: 1.5;
  word-break: break-word;
}
@keyframes fadeInLog { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }

.log-entry.system { color: var(--text-3); }
.log-entry.agent { background: rgba(0, 0, 0, 0.015); color: var(--text); }
[data-theme="dark"] .log-entry.agent { background: rgba(255, 255, 255, 0.015); }
.log-entry.success { background: rgba(16, 185, 129, 0.06); color: var(--success); }
.log-entry.error { background: rgba(239, 68, 68, 0.06); color: var(--error); }

.log-time {
  color: var(--text-3);
  white-space: nowrap;
  font-size: 0.68rem;
  width: 42px;
  flex-shrink: 0;
  position: relative;
}
/* Vertical line to the right of the timestamp */
.log-time::after {
  content: '';
  position: absolute;
  right: -0.45rem;
  top: 1px;
  bottom: 1px;
  width: 1px;
  background: var(--border-light);
}

.log-agent {
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 75px;
  flex-shrink: 0;
}
.log-entry.agent[data-agent="ceo"] .log-agent { color: var(--ceo-color); }
.log-entry.agent[data-agent="designer"] .log-agent { color: var(--designer-color); }
.log-entry.agent[data-agent="coder"] .log-agent { color: var(--coder-color); }
.log-entry.agent[data-agent="tester"] .log-agent { color: var(--tester-color); }
.log-entry.system .log-agent { color: var(--text-3); }

.log-msg { color: var(--text); flex: 1; }

/* Artifact Panel & Folders */
.artifact-list { 
  flex: 1; 
  overflow-y: auto; 
  padding: 0.75rem 1.25rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.6rem; 
}

.artifact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--t-base);
  background: var(--surface-2);
  margin-bottom: 0.2rem;
}
.artifact-item:hover { border-color: var(--primary); background: var(--glass-hover); }
.artifact-phase { font-size: 0.65rem; font-weight: 700; color: var(--primary); font-family: var(--font-mono); background: var(--primary-glow); padding: 0.15rem 0.4rem; border-radius: 4px; }
.artifact-name { font-size: 0.78rem; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); color: var(--text); }

.artifact-folder {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--t-base);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  user-select: none;
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}
.artifact-folder:hover { background: rgba(0,0,0,0.02); color: var(--text); }
.folder-icon { font-size: 0.85rem; }

.folder-children {
  border-left: 1px dashed var(--border-light);
  margin-left: 1.1rem;
  padding-left: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.artifact-folder::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.25rem;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  color: var(--text-3);
}
.artifact-folder.expanded::before {
  transform: rotate(90deg);
  color: var(--primary);
}

.artifact-viewer {
  position: absolute;
  inset: 0.5rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  z-index: 20;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  animation: fadeIn 0.15s ease;
}
.artifact-viewer[hidden] {
  display: none !important;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.artifact-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  flex-shrink: 0;
  color: var(--text);
}

.artifact-code {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-2);
}

/* ── Modern Projects Overlay Grid ── */
.projects-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: overlayFadeIn 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.2);
}
.projects-overlay.hidden { display: none !important; }
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }

.projects-overlay-content {
  width: 100%;
  max-width: 900px;
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: contentScaleUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  color: var(--text);
}
[data-theme="dark"] .projects-overlay-content {
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
@keyframes contentScaleUp { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.projects-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.projects-overlay-header h2 { font-size: 1.15rem; font-weight: 700; color: var(--text); }

.projects-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card-modern {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
}
.project-card-modern::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  transition: var(--t-base);
  z-index: 10;
}
.project-card-modern:hover::before {
  background-image: linear-gradient(
    45deg,
    rgba(73, 80, 87, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(73, 80, 87, 0.15) 50%,
    rgba(73, 80, 87, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 15px 15px;
  animation: progressStripes 1.2s linear infinite;
}
[data-theme="dark"] .project-card-modern:hover::before {
  background-image: linear-gradient(
    45deg,
    rgba(203, 213, 225, 0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgba(203, 213, 225, 0.25) 50%,
    rgba(203, 213, 225, 0.25) 75%,
    transparent 75%,
    transparent
  );
}
.project-card-modern:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px var(--primary-glow);
}
[data-theme="dark"] .project-card-modern {
  background: rgba(255, 255, 255, 0.03);
}
[data-theme="dark"] .project-card-modern:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 12px 30px var(--primary-glow);
}

.project-card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.project-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.4rem; }

.project-card-status-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
}
.project-card-status-badge.running {
  background-image: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.05) 25%,
    transparent 25%,
    transparent 50%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0.05) 75%,
    transparent 75%,
    transparent
  );
  background-size: 10px 10px;
  animation: progressStripes 1.2s linear infinite;
  color: var(--text-2);
  border: 1px solid var(--border-light);
}
[data-theme="dark"] .project-card-status-badge.running {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.08) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    transparent 75%,
    transparent
  );
  color: var(--text-2);
}
.project-card-status-badge.done { background: rgba(0, 0, 0, 0.04); color: var(--text-2); border: 1px solid var(--border-light); }
[data-theme="dark"] .project-card-status-badge.done { background: rgba(255, 255, 255, 0.05); }
.project-card-status-badge.error { background: rgba(0, 0, 0, 0.04); color: var(--text-3); border: 1px solid var(--border-light); }
[data-theme="dark"] .project-card-status-badge.error { background: rgba(255, 255, 255, 0.04); }
.project-card-status-badge.idle { background: rgba(0, 0, 0, 0.03); color: var(--text-3); border: 1px solid var(--border-light); }
[data-theme="dark"] .project-card-status-badge.idle { background: rgba(255, 255, 255, 0.04); }

.project-card-desc { font-size: 0.78rem; color: var(--text-2); line-height: 1.4; height: 2.8rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.project-card-meta { font-size: 0.68rem; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border-light); padding-top: 0.5rem; margin-top: auto; }

.project-card-actions { display: flex; gap: 0.4rem; margin-top: 0.25rem; }
.project-card-actions button {
  flex: 1;
  padding: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--t-fast);
}
.project-card-actions .btn-card-start {
  background: var(--primary);
  border: none;
  color: var(--bg);
}
.project-card-actions .btn-card-start:hover {
  background: var(--text);
  color: var(--bg);
}
.project-card-actions .btn-card-open {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-2);
}
.project-card-actions .btn-card-open:hover {
  background: rgba(0,0,0,0.03);
  color: var(--text);
}
.project-card-actions .btn-card-delete {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-3);
  max-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.project-card-actions .btn-card-delete:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* ── Project Deletion Custom Modal ── */
.delete-modal-content {
  max-width: 500px;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid var(--border);
}
[data-theme="dark"] .delete-modal-content {
  background: rgba(15, 23, 42, 0.95) !important;
}

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

.delete-warning {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.delete-info {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.4;
}

.delete-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-delete-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  cursor: pointer;
  text-align: left;
  transition: var(--t-base);
  font-family: inherit;
  width: 100%;
}

.btn-delete-option:hover {
  background: var(--bg-2);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-delete-option .option-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.btn-delete-option .option-desc {
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.35;
}

.btn-delete-option.danger:hover {
  border-color: var(--error) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.btn-delete-option.danger:hover .option-title {
  color: var(--error);
}

.delete-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .delete-modal-footer {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Clean Grey Empty State Card (CI Dashboard) ── */
.empty-state {
  margin: 12px 1.25rem;
  padding: 20px 16px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.025);
  border: 1.5px dashed rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--t-base);
}
[data-theme="dark"] .empty-state {
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.08);
}
.empty-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.empty-subtitle {
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.4;
}

/* ── Prompts list & Premium Cards ── */
.prompts-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.prompt-card {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.01);
  transition: var(--t-base);
}
[data-theme="dark"] .prompt-card {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255, 255, 255, 0.06);
}
.prompt-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prompt-card-content {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.prompt-card-content.code-style {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.85rem;
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  color: var(--text-2);
}
[data-theme="dark"] .prompt-card-content.code-style {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.05);
}

.btn-copy-prompt {
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-2);
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: var(--t-fast);
  font-weight: 600;
  font-family: inherit;
}
.btn-copy-prompt:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
[data-theme="dark"] .btn-copy-prompt {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .btn-copy-prompt:hover {
  background: white;
  color: black;
}

/* ── Thoughts Toggle & Thought Bubbles ── */
.btn-thoughts-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--t-fast);
  margin-right: 8px;
  flex-shrink: 0;
}
.btn-thoughts-toggle:hover {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--primary);
  transform: scale(1.05);
}
.btn-thoughts-toggle.disabled {
  opacity: 0.35;
  filter: grayscale(1);
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border-light);
}

.thought-bubble {
  position: absolute;
  width: 240px;
  background: var(--surface);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  z-index: 1000;
  pointer-events: auto;
  transition: opacity 0.3s cubic-bezier(0.32, 0.72, 0, 1), transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  opacity: 0;
  transform: translateY(15px) scale(0.95);
}
.thought-bubble.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.thought-bubble.left {
  top: 90px;
  left: 30px;
}
.thought-bubble.right {
  top: 90px;
  right: 30px;
}
.bubble-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bubble-agent {
  color: var(--primary);
}
.bubble-header::after {
  content: '';
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background-image: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.06) 25%,
    transparent 25%,
    transparent 50%,
    rgba(0, 0, 0, 0.06) 50%,
    rgba(0, 0, 0, 0.06) 75%,
    transparent 75%,
    transparent
  );
  background-size: 10px 10px;
  animation: progressStripes 1.2s linear infinite;
}
[data-theme="dark"] .bubble-header::after {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.08) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    transparent 75%,
    transparent
  );
}
@keyframes progressStripes {
  from { background-position: 0 0; }
  to { background-position: 20px 0; }
}
.bubble-content {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-2);
}

/* Global scrollbars */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.15); }

/* Focus outlines */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Hamburger Menu Button ────────────────────────────────────────────────── */
.navbar-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  z-index: 1001;
}

.navbar-hamburger svg line {
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
  transform-origin: center;
}

.navbar-hamburger.open .line-1 {
  transform: translateY(6px) rotate(45deg);
}

.navbar-hamburger.open .line-2 {
  opacity: 0;
}

.navbar-hamburger.open .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Mobile & Samsung S25 Responsive Layout ────────────────────────────── */
@media (max-width: 900px) {
  html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .layout {
    display: flex;
    flex-direction: column;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto; /* Allow layout scroll */
    padding: 12px;
    gap: 16px;
  }
  
  .panel-left, .panel-center, .panel-right, .right-panel-body {
    display: contents;
  }

  .hero-spacer {
    display: block;
    width: 100%;
    height: 65vh;
    pointer-events: none;
    order: 0;
  }

  .projects-section {
    order: 1;
  }

  .project-item {
    padding: 12px 16px !important;
    border-radius: 28px !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .project-pill-text {
    max-width: calc(100% - 110px) !important;
    margin-right: 12px !important;
    font-size: 0.82rem !important;
  }

  .project-item-actions {
    opacity: 1 !important;
    display: flex !important;
    gap: 8px !important;
    pointer-events: auto !important;
  }

  .btn-run, .btn-stop, .btn-delete, .btn-launch, .btn-download {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    font-size: 0.85rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .btn-run {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: var(--success) !important;
  }

  .btn-stop {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: var(--error) !important;
  }

  .btn-delete {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: var(--error) !important;
  }

  .btn-launch {
    background: rgba(0, 102, 204, 0.12) !important;
    border-color: rgba(0, 102, 204, 0.25) !important;
    color: var(--primary) !important;
  }

  .btn-download {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #f59e0b !important;
  }

  .hitl-bar {
    order: 2;
    position: relative;
    margin-top: 12px;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
  }

  .terminal-console {
    order: 3;
    position: relative;
    bottom: auto;
    left: auto;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    max-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    display: flex !important;
  }

  .navbar.menu-open ~ .layout .terminal-console {
    height: 320px !important;
    max-height: 320px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin-top: 0 !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
  }

  .terminal-body {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .agents-section {
    order: 4;
  }

  #logPanel {
    order: 5;
  }

  #artifactPanel {
    order: 6;
  }

  #promptsPanel {
    order: 7;
  }
  
  /* Make all panels cards on mobile */
  #logPanel, #artifactPanel, #promptsPanel {
    background: var(--surface);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    height: 350px;
    max-height: 350px;
  }

  .log-entries, .artifact-list, .prompts-list {
    flex: 1;
    overflow-y: auto;
  }
  
  .log-header-mobile, .docs-header-mobile, .prompts-header-mobile {
    display: block;
    padding: 1rem 1.25rem 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.02);
  }
  [data-theme="dark"] .log-header-mobile,
  [data-theme="dark"] .docs-header-mobile,
  [data-theme="dark"] .prompts-header-mobile {
    background: rgba(255, 255, 255, 0.02);
  }
  
  /* Hide the desktop tabs on mobile */
  .artifact-tabs {
    display: none !important;
  }

  .panel {
    height: auto;
    min-height: auto;
    width: 100%;
  }

  /* Responsive mobile Top Bar */
  .navbar {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .nav-left {
    width: calc(100% - 48px);
    justify-content: flex-start;
  }

  .navbar-hamburger {
    display: flex;
  }

  /* Collapsed items by default */
  .nav-center,
  .nav-right {
    display: none !important;
    width: 100%;
    position: static !important;
    transform: none !important;
    pointer-events: auto;
  }

  /* When menu is open, arrange items vertically */
  .navbar.menu-open .nav-center {
    display: flex !important;
    justify-content: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }

  .navbar.menu-open .nav-right {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 0 6px 0;
    border-top: 1px solid var(--border);
  }

  .nav-right .token-counter-pill {
    align-self: center;
    margin: 4px 0;
  }

  .nav-right .theme-toggle-wrapper {
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
  }

  .nav-right button {
    width: 100%;
    text-align: center;
  }

  /* Spline background adjustment for portrait */
  .spline-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    z-index: 1;
    pointer-events: auto !important; /* Touch/Rotate directly enabled on background */
    overflow: hidden;
  }
  
  .spline-container spline-viewer {
    width: 100%;
    height: 100%;
    transform: none;
  }

  /* Increase Touch Target Sizes (min 48px) for buttons, inputs & links */
  .new-project-toggle-btn,
  .btn-primary,
  .btn-cancel,
  .btn-card-start,
  .btn-card-open,
  .btn-card-delete,
  .tab,
  .btn-term-action,
  .btn-thoughts-toggle {
    min-height: 48px;
    min-width: 48px;
    padding: 12px 16px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .btn-send {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--primary) !important;
    color: var(--bg) !important;
    transition: var(--t-fast) !important;
  }
  .btn-send:hover {
    background: var(--primary-glow) !important;
    color: var(--primary) !important;
  }

  .form-input,
  .form-textarea,
  .hitl-input {
    min-height: 48px;
    padding: 12px;
    font-size: 1rem; /* Prevent auto-zoom on iOS */
    box-sizing: border-box;
  }
}

/* ── SwarmVerse 2.0 Additions ────────────────────────────────────────────── */

.btn-stop {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: var(--t-fast);
  background: var(--bg);
  min-width: 22px;
  min-height: 22px;
  color: var(--text-2);
}
.btn-stop:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}
.btn-stop:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Kanban Board Modal Styles */
.kanban-modal-content {
  max-width: 1100px;
  max-height: 85vh;
  height: 85vh;
}
.kanban-board-container {
  display: flex;
  gap: 16px;
  flex: 1;
  padding: 20px;
  overflow: hidden;
  height: 100%;
}
.kanban-column {
  flex: 1;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
[data-theme="dark"] .kanban-column {
  background: rgba(255, 255, 255, 0.015);
}
.kanban-column-header {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .kanban-column-header {
  background: rgba(255, 255, 255, 0.02);
}
.kanban-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kanban-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  animation: cardFadeIn 0.5s ease;
}
[data-theme="dark"] .kanban-card {
  background: var(--surface-2);
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.kanban-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}
.kanban-card-goal {
  font-size: 0.76rem;
  color: var(--text-2);
  line-height: 1.35;
}
.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.kanban-criteria-list {
  margin-top: 6px;
  padding-left: 14px;
  font-size: 0.7rem;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kanban-criteria-item {
  list-style-type: disc;
}

/* Global Kanban Overlay Styles */
.global-kanban-content {
  max-width: 1300px;
  max-height: 90vh;
  height: 90vh;
}
.global-kanban-layout {
  display: flex;
  gap: 20px;
  flex: 1;
  padding: 20px;
  overflow: hidden;
  height: 100%;
}
.mega-form-container {
  width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.mega-form-container h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.mega-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mega-form .form-row {
  display: flex;
  gap: 10px;
}
.mega-form .form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.global-kanban-board {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow: hidden;
}
.global-column {
  flex: 1;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
[data-theme="dark"] .global-column {
  background: rgba(255, 255, 255, 0.015);
}
.global-column-header {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .global-column-header {
  background: rgba(255, 255, 255, 0.02);
}
.global-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-card-kanban {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: var(--t-base);
}
[data-theme="dark"] .project-card-kanban {
  background: var(--surface-2);
}
.project-card-kanban:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.04);
}
.project-card-kanban-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-card-kanban-desc {
  font-size: 0.74rem;
  color: var(--text-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-kanban-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-3);
  background: rgba(0, 0, 0, 0.01);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
[data-theme="dark"] .project-card-kanban-details {
  background: rgba(255, 255, 255, 0.01);
}
.project-card-kanban-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* To-Do Modal Styles */
.todo-modal-content {
  max-width: 600px;
  max-height: 80vh;
  height: 80vh;
}
.todo-input-container {
  margin-top: 15px;
}
.todo-sections-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  padding: 0 20px 20px 20px;
  overflow-y: auto;
}
.todo-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.todo-section h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text);
  transition: var(--t-base);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .todo-item {
  background: var(--surface-2);
}
.todo-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.todo-item-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.todo-item.completed .todo-item-text {
  text-decoration: line-through;
  opacity: 0.6;
}
.btn-todo-check, .btn-todo-delete {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t-fast);
}
.btn-todo-check:hover {
  transform: scale(1.15);
}
.btn-todo-delete {
  opacity: 0.6;
}
.btn-todo-delete:hover {
  opacity: 1;
  color: var(--error);
  transform: scale(1.1);
}

/* Token & Limit Modal */
.token-modal-content {
  max-width: 420px;
  max-height: 60vh;
}

/* ── Dropdown Menu Styles ───────────────────────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 170px;
  z-index: 1000;
  margin-top: 6px;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-item {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: var(--t-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dropdown-item:hover {
  background: var(--bg-2);
  color: var(--text);
}
.dropdown-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Mobile Responsiveness for SwarmVerse 2.0 Components ────────────────── */
@media (max-width: 768px) {
  /* Dropdown navbar display for mobile */
  .dropdown {
    width: 100%;
  }
  .dropdown-toggle {
    width: 100%;
    text-align: center;
  }
  .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid var(--border-light);
    margin-top: 4px;
    background: transparent;
    padding: 0;
  }
  .dropdown-item {
    text-align: center !important;
    padding: 12px !important;
    font-size: 0.82rem !important;
    width: 100% !important;
    display: block !important;
  }

  /* 2. Professioneller Abstand nach oben beim Scrollen (Sticky Top-Bar) */
  .navbar {
    top: 12px !important;
  }

  /* 1. & 4. Symmetrische, gleich große Buttons (Projektkacheln & Kanban) - Mobile angepasst für 4 Buttons */
  .project-item-actions,
  .project-card-kanban-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }
  .project-item-actions button,
  .project-card-kanban-actions button {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    border-radius: 50% !important;
  }



  /* Modals padding and scroll adjustments */
  .projects-overlay {
    padding: 8px;
  }
  .projects-overlay-content {
    max-height: 95vh;
    height: 95vh !important;
    border-radius: var(--radius);
  }

  /* Live Project Kanban Board Stacking */
  .kanban-board-container {
    flex-direction: column;
    overflow-y: auto;
    padding: 10px;
    gap: 12px;
  }
  .kanban-column {
    flex: none;
    height: auto;
    max-height: 320px;
  }
  .kanban-cards-list {
    max-height: 250px;
  }

  /* Global Kanban Layout Stacking */
  .global-kanban-layout {
    flex-direction: column;
    overflow-y: auto;
    padding: 10px;
    gap: 16px;
  }
  .mega-form-container {
    width: 100% !important;
    max-width: 100%;
    flex: none;
    box-sizing: border-box;
    padding: 12px;
  }
  .mega-form .form-row {
    flex-direction: column;
    gap: 10px;
  }
  .global-kanban-board {
    flex-direction: column;
    flex: none;
    gap: 12px;
  }
  .global-column {
    flex: none;
    height: auto;
    max-height: 320px;
  }
  .global-cards-list {
    max-height: 250px;
  }

  /* To-Do List Mobile layout */
  .todo-modal-content {
    max-height: 90vh;
    height: 90vh !important;
  }
  .todo-sections-container {
    padding: 0 12px 12px 12px;
    gap: 12px;
  }
  .todo-item {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 12px;
  }

  /* Deletion Modal Option Styling */
  .delete-modal-content {
    width: 100%;
    max-width: 95vw;
  }
  .delete-modal-body {
    padding: 12px;
  }
  .btn-delete-option {
    padding: 12px;
  }
  .btn-delete-option .option-title {
    font-size: 0.82rem;
  }
  .btn-delete-option .option-desc {
    font-size: 0.68rem;
  }
}

/* Login Screen Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: var(--bg-1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.5s;
}

[data-theme="light"] .login-overlay {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px);
}

[data-theme="dark"] .login-overlay {
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(25px);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .login-card {
  background: rgba(30, 30, 30, 0.7);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  color: var(--primary);
}

.login-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .form-group {
  width: 100%;
}

.login-form input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.login-form input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.login-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: -4px;
  text-align: left;
  line-height: 1.4;
}

.login-error.hidden {
  display: none;
}

#btnUnlock {
  width: 100%;
  height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Fading out transition */
.login-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

