/* IDE-style dark theme built on Pico CSS design tokens */
:root {
  --pico-font-size: 87.5%;
  --bg-body: #11191f;
  --bg-card: #1a2028;
  --bg-input: #0d1117;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-subtle: rgba(255, 255, 255, 0.02);
  --border-color: #2d3748;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text-primary: #c2c7d0;
  --text-heading: #e2e8f0;
  --text-muted: #7b8495;
  --text-dim: rgba(255, 255, 255, 0.45);
  --accent-bg: #0172ad;
  --accent-text: #01aaff;
  --accent-hover: #017fc0;
  --accent-interactive: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.2);
  --pulse-green: #4ade80;
  --pulse-amber: #fbbf24;
  --pulse-red: #f87171;
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --status-running: #4ade80;
  --status-stopped: #f87171;
  --status-notloaded: #7b8495;
  /* Chat-specific tokens */
  --chat-user-bg: #1e3a5f;
  --chat-assistant-bg: #1a2028;
  --chat-chip-bg: rgba(59, 130, 246, 0.15);
  --chat-chip-border: rgba(59, 130, 246, 0.3);
  --chat-chip-hover: rgba(59, 130, 246, 0.25);
}

[data-theme="light"] {
  --bg-body: #ffffff;
  --bg-card: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-subtle: rgba(0, 0, 0, 0.02);
  --border-color: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --text-primary: #373c44;
  --text-heading: #1a202c;
  --text-muted: #646b79;
  --text-dim: rgba(0, 0, 0, 0.45);
  --accent-bg: #0172ad;
  --accent-text: #015887;
  --accent-hover: #015887;
  --accent-interactive: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --status-running: #22c55e;
  --status-stopped: #ef4444;
  --status-notloaded: #94a3b8;
  --chat-user-bg: #e0edff;
  --chat-assistant-bg: #f8fafc;
  --chat-chip-bg: rgba(59, 130, 246, 0.1);
  --chat-chip-border: rgba(59, 130, 246, 0.25);
  --chat-chip-hover: rgba(59, 130, 246, 0.2);
}

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

/* ── Pico CSS overrides for IDE layout ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  padding: 0;
  max-width: none;
}

body > header,
body > div,
body > main,
body > aside,
body > footer {
  max-width: none;
  margin-inline: 0;
  padding: 0;
  width: 100%;
}

header, main, aside, footer, section, article, nav {
  margin-bottom: 0;
}

button, input, select, textarea {
  margin-bottom: 0;
}

button {
  width: auto;
  display: inline-block;
}

a { color: inherit; }
a:hover { color: inherit; }

/* Header */
body > header {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-body));
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

body > header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: -0.5px;
}

body > header .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 15px;
}

body > header .header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: var(--text-primary);
  border-radius: 4px;
}

.theme-toggle:hover {
  opacity: 1;
  background: var(--bg-hover);
}

/* IDE Layout */
.ide-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  background-color: var(--bg-input);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.new-service-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-new {
  flex: 1;
  padding: 8px 12px;
  background-color: var(--accent-bg);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-new:hover {
  background-color: var(--accent-hover);
}

.btn-start-all {
  width: 100%;
  padding: 8px 12px;
  background-color: #1a5c1a;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-start-all:hover {
  background-color: #2d8a2d;
}

.tree-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

/* Tree View */
.tree-section {
  margin-bottom: 5px;
}

.tree-title {
  padding: 8px 15px;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}

.tree-title:hover {
  background-color: var(--bg-hover);
}

.tree-title::before {
  content: '▶';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s;
  font-size: 0.7rem;
}

.tree-title.expanded::before {
  transform: rotate(90deg);
}

.tree-content {
  display: none;
}

.tree-content.show {
  display: block;
}

.tree-namespace {
  padding-left: 15px;
}

.namespace-title {
  padding: 6px 15px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}

.namespace-title:hover {
  background-color: var(--bg-hover);
}

.namespace-title::before {
  content: '▶';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s;
  font-size: 0.6rem;
}

.namespace-title.expanded::before {
  transform: rotate(90deg);
}

.namespace-services {
  display: none;
  padding-left: 15px;
}

.namespace-services.show {
  display: block;
}

.service-item {
  padding: 6px 15px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  color: var(--text-heading);
  transition: background-color 0.2s;
}

.service-item:hover {
  background-color: var(--bg-hover);
}

.service-item.selected {
  background-color: var(--bg-hover);
  border-left: 3px solid var(--accent-interactive);
}

.service-item::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: var(--status-notloaded);
}

.service-item.status-running::before {
  background-color: var(--status-running);
}

.service-item.status-stopped::before {
  background-color: var(--status-stopped);
}

.service-item.status-notloaded::before {
  background-color: var(--status-notloaded);
}

.port-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  margin-left: 4px;
}

/* Editor Panel */
.editor-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-body);
}

/* Editor Header */
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  min-height: 50px;
  gap: 12px;
}

.editor-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Mode Tabs (IDE / AI Chat) */
.editor-mode-tabs {
  display: flex;
  gap: 2px;
  background-color: var(--bg-input);
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}

.mode-tab {
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  background: transparent;
}

.mode-tab:hover {
  color: var(--text-heading);
  background-color: var(--bg-hover);
}

.mode-tab.active {
  color: var(--text-heading);
  background-color: var(--accent-interactive);
  color: white;
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.editor-actions .btn {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-port {
  background-color: #1a5c1a;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  border: 1px solid #2d8a2d;
}

.btn-port:hover {
  background-color: #2d8a2d;
  color: white;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(45, 138, 45, 0.5);
}

.btn-port::before {
  content: '🌐 ';
  margin-right: 4px;
}

.editor-top {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.editor-bottom {
  height: 40%;
  overflow-y: auto;
  background-color: var(--bg-input);
}

/* Welcome Screen */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}

.welcome h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--text-heading);
}

.welcome p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Editor Form */
.editor-form {
  max-width: 900px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h3 {
  color: var(--accent-text);
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-heading);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input[readonly] {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-interactive);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-group textarea {
  min-height: 80px;
  font-family: 'Courier New', monospace;
  resize: vertical;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.radio-group {
  display: flex;
  gap: 20px;
  margin: 10px 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

.radio-group input[type="radio"] {
  cursor: pointer;
}

.schedule-times {
  margin-top: 15px;
  padding: 15px;
  background-color: var(--bg-input);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.time-slot {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 10px;
}

.time-slot label {
  margin: 0;
  font-weight: normal;
}

.time-slot input {
  width: 70px;
}

.btn-add-time {
  margin-top: 10px;
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-add-time:hover {
  background-color: var(--bg-subtle);
  border-color: var(--accent-interactive);
}

.btn-remove-time {
  background-color: transparent;
  color: var(--pulse-red);
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-remove-time:hover {
  background-color: var(--bg-hover);
  border-radius: 4px;
}

/* Control Buttons */
.control-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent-bg);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

.btn-secondary {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--accent-interactive);
}

.btn-danger {
  background-color: #8a2d2d;
  color: white;
}

.btn-danger:hover {
  background-color: #a33636;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Bottom Panel */
.panel-tabs {
  display: flex;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.panel-tab {
  padding: 10px 20px;
  background-color: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.panel-tab:hover {
  color: var(--text-heading);
}

.panel-tab.active {
  color: var(--text-heading);
  border-bottom-color: var(--accent-interactive);
}

.panel-content {
  padding: 15px;
  height: calc(100% - 45px);
  overflow-y: auto;
}

.plist-preview {
  background-color: var(--bg-input);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.plist-preview pre {
  color: var(--pulse-green);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border-radius: 0;
  line-height: 1.6;
  padding: 0;
}

.log-viewer {
  background-color: var(--bg-input);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.log-viewer pre {
  color: var(--pulse-green);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border-radius: 0;
  line-height: 1.6;
  padding: 0;
}

.log-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   AI Chat Panel
   ============================================================ */

.chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  background-color: var(--bg-body);
}

/* Status Bar */
.chat-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chat-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-session-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-session-controls select {
  min-width: 220px;
  max-width: 360px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  margin: 0;
}

.chat-session-controls button {
  background-color: var(--accent-interactive);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
  line-height: 1.2;
  min-width: max-content;
}

.chat-session-controls button:hover {
  background-color: var(--accent-hover);
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-status-dot.connected {
  background-color: var(--status-running);
  box-shadow: 0 0 6px var(--status-running);
}

.chat-status-dot.connecting {
  background-color: var(--pulse-amber);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.chat-status-dot.disconnected {
  background-color: var(--status-stopped);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Suggestions */
.chat-suggestions {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  scrollbar-width: thin;
}

.chat-suggestions::-webkit-scrollbar {
  height: 4px;
}

.chat-suggestions::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.suggestion-chip {
  padding: 6px 14px;
  border: 1px solid var(--chat-chip-border);
  border-radius: 20px;
  background-color: var(--chat-chip-bg);
  color: var(--text-primary);
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.suggestion-chip:hover {
  background-color: var(--chat-chip-hover);
  border-color: var(--accent-interactive);
  color: var(--text-heading);
}

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 85%;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-avatar {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 4px;
}

.chat-bubble {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.chat-message.user .chat-bubble {
  background-color: var(--chat-user-bg);
  color: var(--text-heading);
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .chat-bubble {
  background-color: var(--chat-assistant-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}

.chat-bubble code {
  background-color: var(--bg-input);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
}

.chat-bubble strong {
  color: var(--text-heading);
}

.chat-bubble.chat-error {
  border-color: var(--pulse-red);
  background-color: rgba(248, 113, 113, 0.1);
}

/* Action Buttons (Apply / Cancel) */
.chat-action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.btn-chat-apply {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #1a5c1a;
  color: white;
  transition: background-color 0.2s;
}

.btn-chat-apply:hover {
  background-color: #2d8a2d;
}

.btn-chat-cancel {
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: transparent;
  color: var(--text-primary);
  transition: all 0.2s;
}

.btn-chat-cancel:hover {
  background-color: var(--bg-hover);
  border-color: var(--pulse-red);
  color: var(--pulse-red);
}

.chat-action-pending {
  font-size: 0.85rem;
  color: var(--pulse-amber);
  font-style: italic;
}

.chat-action-cancelled {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Loading Animation */
.chat-loading {
  color: var(--text-muted) !important;
  font-style: italic;
}

.loading-dots span {
  animation: dot-blink 1.4s infinite;
  font-weight: bold;
  font-size: 1.2em;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Input Area */
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  min-height: 42px;
  max-height: 140px;
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-heading);
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
  margin: 0;
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: var(--accent-interactive);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.chat-input-area textarea:disabled {
  opacity: 0.5;
}

.chat-input-area button {
  height: 42px;
  padding: 0 20px;
  background-color: var(--accent-interactive);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.chat-input-area button:hover {
  background-color: var(--accent-hover);
}

.chat-input-area button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   Modal
   ============================================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  border: 1px solid var(--accent-interactive);
  box-shadow: var(--shadow-md);
}

.modal-header h2 {
  color: var(--accent-text);
  margin-bottom: 20px;
}

.modal-body {
  margin-bottom: 20px;
}

.command-box {
  background-color: var(--bg-input);
  padding: 15px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--pulse-green);
  margin: 15px 0;
  word-break: break-all;
  border: 1px solid var(--border-color);
}

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

/* Flash Messages */
.flash-message {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  z-index: 999;
  max-width: 400px;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
  color: var(--text-heading);
}

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

.flash-message.success {
  background-color: #1a5c1a;
  border-left: 4px solid #2d8a2d;
}

.flash-message.error {
  background-color: #5c1a1a;
  border-left: 4px solid var(--pulse-red);
}

.flash-message.info {
  background-color: #1a3a5c;
  border-left: 4px solid var(--accent-interactive);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-input);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}
