/* BicepBuilder — Styles */
/* Aesthetic: Dark terminal + Azure blue accent. Industrial/utilitarian. */

:root {
  --bg-app: #0a0e1a;
  --bg-sidebar: #0d1221;
  --bg-panel: #111827;
  --bg-card: #1a2236;
  --bg-card-hover: #1e2a42;
  --bg-editor: #0d1117;
  --bg-input: #1a2236;
  --accent: #3b82f6;
  --accent-dim: #1e3a5f;
  --accent-bright: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #4b5563;
  --text-accent: #60a5fa;
  --border: rgba(255,255,255,0.08);
  --border-accent: rgba(59, 130, 246, 0.4);
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --transition: 150ms ease;
}

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

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-ui);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── APP LAYOUT ─────────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.logo-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.sidebar-section {
  flex-shrink: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 14px 6px;
}

.resource-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition), color var(--transition);
}

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

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-bright);
}

.nav-icon { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  background: var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

.nav-item.active .nav-badge {
  background: var(--accent-dim);
  color: var(--accent-bright);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.version-tag {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-mono);
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.breadcrumb-root { color: var(--text-muted); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-primary); font-weight: 500; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover { background: #2563eb; }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  padding: 7px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.btn-accent {
  padding: 7px 16px;
  background: rgba(59,130,246,0.12);
  color: var(--accent-bright);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-accent:hover { background: rgba(59,130,246,0.2); }

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}

/* ── WORKSPACE ───────────────────────────────────────────── */
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 0;
}

/* ── CONFIG PANEL ────────────────────────────────────────── */
.config-panel {
  width: 340px;
  min-width: 320px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-search {
  padding: 12px 12px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12.5px;
  outline: none;
  transition: border-color var(--transition);
}

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

/* ── RESOURCE GRID ───────────────────────────────────────── */
.resource-grid {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.resource-card:hover {
  border-color: rgba(59,130,246,0.4);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.resource-card:hover::before { opacity: 1; }

.resource-card.added {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.05);
}

.resource-card.added::before { background: var(--success); opacity: 1; }

.card-icon { font-size: 18px; }

.card-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-type {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.card-added-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: white;
}

/* ── CONFIG FORM ─────────────────────────────────────────── */
.config-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.form-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  display: block;
}

.back-btn:hover { color: var(--accent-bright); }

.form-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.resource-type-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-bright);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
}

.form-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-required {
  color: var(--danger);
  font-size: 10px;
}

.field-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.form-input, .form-select, .form-textarea {
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12.5px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-accent);
}

.form-select { cursor: pointer; }

.form-select option {
  background: var(--bg-card);
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.toggle-label { font-size: 12px; color: var(--text-secondary); }

.toggle {
  width: 32px;
  height: 18px;
  background: var(--bg-card);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle.on { background: var(--accent); border-color: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: left var(--transition);
}

.toggle.on::after { left: 16px; }

.form-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.form-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.form-footer .btn-primary { flex: 1; }

/* ── EDITOR PANEL ────────────────────────────────────────── */
.editor-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-editor);
  min-width: 0;
  overflow: hidden;
}

.editor-tabs {
  display: flex;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding: 0 16px;
  gap: 0;
}

.tab {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}

.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent-bright); border-bottom-color: var(--accent); }

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 40px;
  background: rgba(255,255,255,0.02);
}

.added-resources {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.resource-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent-bright);
  font-family: var(--font-mono);
}

.chip-remove {
  background: none;
  border: none;
  color: var(--accent-bright);
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  opacity: 0.6;
  line-height: 1;
}

.chip-remove:hover { opacity: 1; }

.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11.5px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.copy-btn:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.2); }

.editor-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.line-numbers {
  padding: 16px 12px 16px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: right;
  background: transparent;
  border-right: 1px solid var(--border);
  user-select: none;
  min-width: 48px;
  overflow: hidden;
  flex-shrink: 0;
}

.code-output {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  margin: 0;
  background: transparent;
}

code#codeContent {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre;
  display: block;
}

/* Syntax highlighting */
.kw { color: #c792ea; } /* keywords */
.str { color: #c3e88d; } /* strings */
.num { color: #f78c6c; } /* numbers */
.com { color: #546e7a; font-style: italic; } /* comments */
.dec { color: #89ddff; } /* decorators @ */
.ty { color: #ffcb6b; } /* types */
.fn { color: #82aaff; } /* function names / resource names */
.op { color: #89ddff; } /* operators */
.prop { color: #f07178; } /* properties */
.val { color: #f78c6c; } /* values */

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.status-dot.warning { background: var(--warning); }
.status-dot.error { background: var(--danger); }

.line-count {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── SCROLLBARS ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12.5px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 460px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.7;
}

.validation-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.validation-item:last-child { border-bottom: none; }

.val-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.val-msg { color: var(--text-primary); }
.val-detail { color: var(--text-muted); font-size: 11px; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  gap: 8px;
}

.empty-state-icon { font-size: 28px; opacity: 0.4; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .config-panel { width: 100%; min-width: unset; }
}

/* ══════════════════════════════════════════════════════════
   LIGHT MODE THEME
   ══════════════════════════════════════════════════════════ */
body.light {
  --bg-app: #f0f4f8;
  --bg-sidebar: #e8edf4;
  --bg-panel: #ffffff;
  --bg-card: #f5f8fc;
  --bg-card-hover: #eaeff7;
  --bg-editor: #fafbfc;
  --bg-input: #eef2f7;
  --accent-dim: #dbeafe;
  --accent-glow: rgba(59, 130, 246, 0.08);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #2563eb;
  --border: rgba(0,0,0,0.09);
  --border-accent: rgba(59, 130, 246, 0.45);
}

body.light .nav-item:hover { background: rgba(0,0,0,0.04); }
body.light .editor-toolbar { background: rgba(0,0,0,0.02); }
body.light .resource-chip { background: #dbeafe; border-color: rgba(59,130,246,0.3); color: #1d4ed8; }
body.light .chip-remove { color: #1d4ed8; }
body.light .copy-btn:hover { border-color: rgba(0,0,0,0.25); }
body.light .form-select option { background: #ffffff; color: #1e293b; }
body.light ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
body.light ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* Light mode syntax highlighting */
body.light code#codeContent { color: #1e293b; }
body.light .kw  { color: #7c3aed; }
body.light .str { color: #15803d; }
body.light .num { color: #c2410c; }
body.light .com { color: #64748b; font-style: italic; }
body.light .dec { color: #0369a1; }
body.light .ty  { color: #b45309; }
body.light .fn  { color: #1d4ed8; }

/* ── HELP PANEL (Noob-friendly explanations) ─────────────── */
.help-panel {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(59,130,246,0.04);
}

.help-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.help-panel-header:hover { background: rgba(59,130,246,0.07); }

.help-panel-icon { font-size: 14px; flex-shrink: 0; }

.help-panel-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-bright);
  flex: 1;
}

body.light .help-panel-title { color: var(--text-accent); }

.help-panel-chevron {
  font-size: 9px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.help-panel-chevron.open { transform: rotate(180deg); }

.help-panel-body {
  padding: 0 14px 12px;
  display: none;
}

.help-panel-body.open { display: block; }

.help-what {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.help-when-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.help-when {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 10px;
}

.help-tips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.help-tips li {
  font-size: 11.5px;
  color: var(--text-secondary);
  padding: 5px 8px;
  background: rgba(59,130,246,0.06);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

.help-docs-link {
  display: inline-block;
  font-size: 11px;
  color: var(--accent-bright);
  text-decoration: none;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(96,165,250,0.4);
  transition: border-color var(--transition);
}

body.light .help-docs-link { color: var(--text-accent); border-bottom-color: rgba(37,99,235,0.35); }

.help-docs-link:hover { border-bottom-color: var(--accent); }

/* ── FIELD DESCRIPTION BOX ───────────────────────────────── */
.field-description {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  line-height: 1.5;
  margin-top: 2px;
}

/* ── THEME TOGGLE BUTTON ─────────────────────────────────── */
#themeToggleBtn {
  color: var(--text-secondary);
}

#themeToggleBtn:hover {
  color: var(--accent-bright);
  border-color: var(--border-accent);
}

/* ── IMPORT MODAL STYLES ─────────────────────────────────── */
.import-summary { font-size: 12.5px; }

.import-summary h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 12px 0 6px;
}

.import-resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.import-resource-list li {
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-accent);
}

.import-stat-row {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}

.import-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-align: center;
  flex: 1;
}

.import-stat-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-bright);
}

body.light .import-stat-val { color: var(--text-accent); }

.import-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.import-warning {
  padding: 8px 12px;
  background: rgba(245,158,11,0.08);
  border-left: 3px solid var(--warning);
  border-radius: 0 4px 4px 0;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
}

/* ── RESOURCE CARD DESCRIPTION ───────────────────────────── */
.card-description {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
