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

:root {
  /* Background layers - zinc minimal dark mode */
  --bg:        #09090b;
  --bg-2:      #0e0e11;
  --bg-3:      #18181b;
  --bg-4:      #27272a;

  /* Borders */
  --border:    rgba(255,255,255,0.06);
  --border-h:  rgba(255,255,255,0.12);
  --border-a:  rgba(255,255,255,0.18);

  /* Accents — Minimal developer monochrome & indigo touch */
  --accent:         #ffffff;
  --accent-hover:   #f4f4f5;
  --accent-purple:  #818cf8;
  --accent-dim:     rgba(255,255,255,0.04);
  --accent-glow:    rgba(255,255,255,0.02);

  /* Status */
  --success:   #10b981;
  --warning:   #f59e0b;
  --danger:    #ef4444;

  /* Text */
  --text:      #fafafa;
  --text-2:    #a1a1aa;
  --text-3:    #52525b;
  --code:      #e4e4e7;

  /* Typography */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono:      'JetBrains Mono', 'Courier New', monospace;

  /* Shape */
  --radius:    6px;
  --radius-lg: 8px;
  --radius-sm: 4px;

  --shadow:    0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.7);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 3px; }

/* ── Typography & Headings ────────────────────────────────────────────────── */
h1, h2, h3, .nav-brand, .auth-title, .page-title, .modal-title, .hero-title, .features-title, .step-title, .land-cta-title {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ── Page transitions ────────────────────────────────────────────────────── */
.page { animation: pageIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 1.5rem;
  background: rgba(9,9,11,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; color: var(--text); text-decoration: none;
  cursor: pointer;
}
.nav-logo {
  width: 24px; height: 24px; border-radius: 5px;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  font-size: 0.72rem; color: var(--text-2);
  padding: 3px 10px; background: var(--bg-3);
  border: 1px solid var(--border); border-radius: 12px;
  font-family: var(--mono);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.main { padding: 3rem 1.5rem; max-width: 960px; margin: 0 auto; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.55rem 1.1rem; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  transition: all 0.15s ease; letter-spacing: -0.01em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover); border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--accent-dim); border-color: var(--border-h);
}

.btn-outline {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
  color: var(--text); background: var(--accent-dim); border-color: var(--border-h);
}

.btn-danger {
  background: rgba(239,68,68,0.08); color: var(--danger); border-color: rgba(239,68,68,0.15);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-xs { padding: 0.25rem 0.55rem; font-size: 0.72rem; border-radius: var(--radius-sm); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.7rem; font-weight: 500;
  color: var(--text-2); margin-bottom: 0.35rem;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.form-input {
  width: 100%; padding: 0.55rem 0.75rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.85rem; outline: none;
  transition: all 0.15s ease;
}
.form-input:focus { border-color: var(--border-a); background: var(--bg-3); }
.form-input::placeholder { color: var(--text-3); }
.form-hint { font-size: 0.72rem; color: var(--text-3); margin-top: 0.35rem; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 0.65rem; }
select.form-input { cursor: pointer; }

/* ── Auth Page ───────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}
.auth-box {
  width: 100%; max-width: 360px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.auth-header { margin-bottom: 1.75rem; }
.auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; font-weight: 600; }
.auth-brand .nav-logo { width: 22px; height: 22px; font-size: 10px; }
.auth-title { font-size: 1.25rem; font-weight: 600; }
.auth-sub { color: var(--text-2); font-size: 0.8rem; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.8rem; color: var(--text-2); }
.auth-footer a { color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--border-h); }
.auth-footer a:hover { border-bottom-color: var(--text); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: all 0.15s ease;
}
.card:hover { border-color: var(--border-h); }

/* ── DB Grid ─────────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;
}
.page-title { font-size: 1.35rem; font-weight: 600; }
.page-sub { font-size: 0.8rem; color: var(--text-2); margin-top: 2px; }

.db-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.db-overview-stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--bg-2) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.db-overview-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent);
  opacity: 0.8;
}

.db-overview-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.05), 0 4px 20px rgba(0, 0, 0, 0.15);
}

.db-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--accent);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.db-overview-stat-card:hover .db-stat-icon {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.05);
}

.db-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-stat-label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.db-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin: 2px 0;
}

.db-stat-sub {
  font-size: 0.68rem;
  color: var(--text-2);
}

/* Enhancing the database cards grid */
.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.db-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.db-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.db-card:hover::after {
  opacity: 1;
}

.db-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12), 0 4px 12px rgba(0, 0, 0, 0.2);
  background: var(--bg-3);
}

.db-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.db-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  color: var(--accent);
  transition: all 0.2s ease;
}

.db-card:hover .db-icon-container {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.05);
}

.db-card-svg-icon {
  width: 20px;
  height: 20px;
}

.db-card-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 20px;
}

.db-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  position: relative;
  display: inline-block;
}

.db-pulse-dot::after {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 50%;
  border: 2px solid var(--success);
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  opacity: 0;
}

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0; }
  50% { opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

.db-status-text {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.db-card-body {
  margin-bottom: 1.5rem;
}

.db-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.db-card:hover .db-card-name {
  color: #60a5fa;
}

.db-card-slug {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.db-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.db-card-stats-row {
  display: flex;
  gap: 0.5rem;
}

.badge-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.db-card:hover .badge-card-stat {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.badge-card-stat svg {
  color: var(--text-3);
  transition: color 0.2s ease;
}

.db-card:hover .badge-card-stat svg {
  color: var(--accent);
}

.db-card-date {
  font-size: 0.7rem;
  color: var(--text-3);
}

.db-stat { font-size: 0.72rem; color: var(--text-2); }
.db-stat strong { color: var(--text); font-weight: 500; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 4rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--bg-2);
}
.empty-icon { font-size: 2rem; opacity: 0.4; }
.empty-title { font-size: 0.95rem; font-weight: 500; }
.empty-desc { font-size: 0.8rem; color: var(--text-2); max-width: 320px; line-height: 1.6; }

/* ── Detail Page ─────────────────────────────────────────────────────────── */
.back {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-2); text-decoration: none; font-size: 0.8rem;
  margin-bottom: 1.25rem; transition: color 0.15s; cursor: pointer;
}
.back:hover { color: var(--text); }

.detail-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.detail-name-row { display: flex; align-items: center; gap: 10px; }
.detail-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.detail-name { font-size: 1.25rem; font-weight: 600; }
.detail-slug { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); }

/* ── Info Tiles ──────────────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.5rem; margin-bottom: 1.75rem; }
.tile {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 0.9rem;
}
.tile-label { font-size: 0.65rem; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.tile-val { font-size: 1rem; font-weight: 600; font-family: var(--mono); color: var(--text); }

/* ── Code Blocks ─────────────────────────────────────────────────────────── */
.code-wrap { position: relative; }
.code-block {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 0.9rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--code);
  overflow-x: auto; white-space: nowrap;
  padding-right: 4.5rem;
}
.copy-btn {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-2); border-radius: 3px; padding: 2px 6px;
  font-size: 0.68rem; cursor: pointer; font-family: var(--font);
  transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--border-h); color: var(--text); }
.copy-btn.ok { color: var(--success); border-color: rgba(16,185,129,0.3); }

/* ── Section ─────────────────────────────────────────────────────────────── */
.section { margin-bottom: 1.75rem; }
.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.section-title { font-size: 0.8rem; font-weight: 500; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ── Keys Table ──────────────────────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.tbl th {
  background: var(--bg-2); padding: 0.5rem 0.75rem;
  font-size: 0.65rem; font-weight: 500; color: var(--text-2);
  text-align: left; letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--text-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--accent-dim); }
.mono-cell { font-family: var(--mono); font-size: 0.72rem; color: var(--code); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: 10px; font-size: 0.68rem; font-weight: 500;
}
.badge-on { background: rgba(16,185,129,0.06); color: var(--success); border: 1px solid rgba(16,185,129,0.15); }
.badge-off { background: rgba(239,68,68,0.06); color: var(--danger); border: 1px solid rgba(239,68,68,0.12); }

/* ── SQL Console ─────────────────────────────────────────────────────────── */
.sql-editor {
  width: 100%; min-height: 100px; resize: vertical;
  background: var(--bg-2); color: var(--code);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem; font-family: var(--mono); font-size: 0.8rem; line-height: 1.6;
  outline: none; transition: all 0.15s ease;
}
.sql-editor:focus { border-color: var(--border-h); background: var(--bg-3); }
.console-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.5rem; flex-wrap: wrap; gap: 0.5rem;
}

/* Premium IDE Container & Layout */
.console-ide-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  position: relative;
}

/* Mac-style Window Header */
.console-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.mac-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.mac-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.8;
}

.dot-red {
  background: #ef4444;
}

.dot-yellow {
  background: #fbbf24;
}

.dot-green {
  background: #10b981;
}

.console-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 600px) {
  .console-title {
    display: none;
  }
}

/* Floating Inline API Key */
.console-key-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-family: var(--mono);
}

.console-key-label {
  color: var(--text-3);
  font-weight: 600;
}

.console-key-input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.4rem;
  font-size: 0.68rem;
  font-family: var(--mono);
  color: var(--text);
  width: 140px;
  outline: none;
  transition: all 0.12s ease;
  -webkit-text-security: disc;
}

.console-key-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.15);
}

/* Editor Toolbar */
.console-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  background: rgba(14, 14, 17, 0.6);
  border-bottom: 1px solid var(--border);
}

.console-editor-tools-left {
  display: flex;
  gap: 0.5rem;
}

.console-tool-btn {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-family: var(--font);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
}

.console-tool-btn:hover {
  color: var(--text);
  background: var(--border);
}

.console-tool-btn:active {
  background: var(--border-h);
}

.console-editor-lang {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Embedded Textarea Adapters */
.console-ide-wrap .sql-editor {
  border: none;
  border-radius: 0;
  min-height: 140px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.console-ide-wrap .sql-editor:focus {
  background: var(--bg);
  border-bottom-color: var(--border-h);
}

/* Quick Query Actions Bar */
.sql-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.quick-label {
  font-size: 0.68rem;
  font-family: var(--mono);
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.quick-pills-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  flex-grow: 1;
  padding: 2px 0;
}

.quick-pills-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.sql-pill-btn {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.15rem 0.6rem;
  font-size: 0.68rem;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.sql-pill-btn:hover {
  color: var(--text);
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(129, 140, 248, 0.06);
  transform: translateY(-0.5px);
}

.sql-pill-btn:active {
  transform: translateY(0);
}

/* Embedded bottom status bar */
.console-ide-wrap .console-toolbar {
  margin-top: 0;
  padding: 0.65rem 1rem;
  background: var(--bg-3);
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.console-hint { font-size: 0.7rem; color: var(--text-3); font-family: var(--mono); }
.results-box { margin-top: 0.85rem; }
.results-meta { font-size: 0.7rem; color: var(--text-3); font-family: var(--mono); margin-bottom: 0.4rem; display: flex; gap: 0.85rem; }
.results-err {
  background: rgba(239,68,68,0.04); border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-sm); padding: 0.75rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--danger);
}
.results-tbl-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.results-tbl { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.results-tbl th {
  background: var(--bg-2); padding: 0.45rem 0.65rem;
  font-size: 0.65rem; font-weight: 500; color: var(--text-2);
  text-align: left; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.results-tbl td { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--border); font-family: var(--mono); color: var(--text-2); white-space: nowrap; }
.results-tbl td.null { color: var(--text-3); font-style: italic; }
.results-tbl tr:last-child td { border-bottom: none; }
.results-tbl tr:hover td { background: var(--accent-dim); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  animation: pageIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal {
  background: var(--bg-2); border: 1px solid var(--border-h);
  border-radius: var(--radius-lg); padding: 1.5rem;
  width: 100%; max-width: 380px; box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.key-reveal {
  background: var(--bg-3); border: 1px solid var(--border-h);
  border-radius: var(--radius-sm); padding: 0.75rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text);
  word-break: break-all; margin: 0.75rem 0; line-height: 1.6;
}
.key-warn { font-size: 0.72rem; color: var(--warning); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem; z-index: 999;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 0.55rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); animation: slideIn 0.2s ease;
  min-width: 200px; max-width: 320px; color: var(--text);
}
.toast-ok { border-color: rgba(16,185,129,0.2); }
.toast-err { border-color: rgba(239,68,68,0.2); }
@keyframes slideIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; } }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spin {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent); border-radius: 50%;
  animation: rot 0.6s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; min-height: 150px; }

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 0.7rem; font-weight: 500; color: var(--text-2);
  font-family: var(--mono); margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); animation: pulse 2.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); } 50% { opacity: 0.5; box-shadow: 0 0 0 3px rgba(16,185,129,0); } }

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
  margin-bottom: 1.25rem; color: var(--text);
}
.hero-title span {
  color: var(--text);
  text-decoration: underline; text-decoration-color: var(--border-a); text-underline-offset: 4px;
}
.hero-sub {
  font-size: 0.92rem;
  color: var(--text-2); max-width: 480px; margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 0.65rem; flex-wrap: wrap; }
.hero-cta .btn-primary { padding: 0.65rem 1.5rem; font-size: 0.88rem; }
.hero-cta .btn-ghost { padding: 0.65rem 1.5rem; font-size: 0.88rem; }

/* ── Sandbox Section ─────────────────────────────────────────────────────── */
.sandbox-section {
  padding: 4.5rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.sandbox-header {
  text-align: center;
  margin-bottom: 2rem;
}
.sandbox-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}
.sandbox-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}
.sandbox-panel:hover {
  border-color: var(--border-h);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--mono);
}
.panel-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.panel-body.code-body {
  background: #070708;
  padding: 1rem;
  position: relative;
  overflow: auto;
  min-height: 200px;
}
.sandbox-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0.4rem;
}
.sample-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.query-pill {
  font-size: 0.68rem;
  font-family: var(--mono);
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
}
.query-pill:hover {
  border-color: var(--border-h);
  color: var(--text);
  background: var(--accent-dim);
}
.sandbox-editor {
  width: 100%;
  min-height: 90px;
  flex: 1;
  resize: none;
  background: #070708;
  color: var(--code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  outline: none;
  transition: all 0.15s ease;
  margin-bottom: 0.5rem;
}
.sandbox-editor:focus {
  border-color: var(--border-h);
}
.panel-tabs {
  display: flex;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.12s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 600;
}
.demo-code {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0;
  color: var(--code);
}
.demo-code .cm { color: var(--text-3); }
.demo-code .ck { color: #d4d4d8; font-weight: 500; }
.demo-code .cv { color: var(--text-2); }
.demo-code .cs { color: var(--text); }
.demo-code .cn { color: var(--text); }

.sandbox-response-wrapper {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.results-msg {
  padding: 0.5rem;
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.12);
  border-radius: var(--radius-sm);
  margin-top: 0.4rem;
}

@media (max-width: 768px) {
  .sandbox-container {
    grid-template-columns: 1fr;
  }
}

/* ── Features ────────────────────────────────────────────────────────────── */
.features {
  padding: 4.5rem 1.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.features-header { text-align: center; margin-bottom: 2.5rem; }
.section-eyebrow {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  color: var(--text-2); letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.features-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.features-sub { color: var(--text-2); font-size: 0.85rem; margin-top: 4px; }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem; max-width: 960px; margin: 0 auto;
}
.feat {
  padding: 1.25rem; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.15s ease;
}
.feat:hover { border-color: var(--border-h); background: var(--bg-3); }
.feat-icon {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-bottom: 0.85rem;
}
.feat-name { font-weight: 500; margin-bottom: 0.25rem; font-size: 0.88rem; color: var(--text); }
.feat-desc { font-size: 0.8rem; color: var(--text-2); line-height: 1.6; }

/* ── How it works ────────────────────────────────────────────────────────── */
.how {
  padding: 4.5rem 1.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.how-inner { max-width: 680px; margin: 0 auto; }
.steps { display: flex; flex-direction: column; gap: 0; margin-top: 2rem; }
.step {
  display: grid; grid-template-columns: 36px 1fr;
  gap: 1rem; padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--text-2);
  flex-shrink: 0; margin-top: 2px;
}
.step-title { font-weight: 500; margin-bottom: 0.25rem; font-size: 0.88rem; color: var(--text); }
.step-desc { font-size: 0.8rem; color: var(--text-2); line-height: 1.5; }
.step-code {
  margin-top: 0.5rem; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.55rem 0.75rem;
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-2);
  overflow-x: auto; white-space: nowrap;
}

/* ── API Reference strip ─────────────────────────────────────────────────── */
.api-strip {
  padding: 4.5rem 1.5rem;
  background: var(--bg); border-top: 1px solid var(--border);
}
.api-strip-inner { max-width: 960px; margin: 0 auto; }
.api-endpoints { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.5rem; }
.endpoint-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: 0.78rem;
  transition: all 0.12s ease;
}
.endpoint-row:hover { border-color: var(--border-h); }
.method {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0; width: 42px; text-align: center;
}
.method-get { background: rgba(16,185,129,0.08); color: var(--success); }
.method-post { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); }
.method-delete { background: rgba(239,68,68,0.08); color: var(--danger); }
.endpoint-path { color: var(--code); flex: 1; font-size: 0.75rem; }
.endpoint-desc { font-size: 0.75rem; color: var(--text-2); font-family: var(--font); }

/* ── Landing CTA ─────────────────────────────────────────────────────────── */
.land-cta {
  padding: 5rem 1.5rem; text-align: center;
  background: var(--bg); border-top: 1px solid var(--border);
}
.land-cta-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.land-cta-sub { color: var(--text-2); font-size: 0.85rem; margin-bottom: 1.5rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem; text-align: center;
  font-size: 0.72rem; color: var(--text-3);
  font-family: var(--mono);
}

/* ── Database Schema ERD (Mermaid.js) ────────────────────────────────────── */
.erd-container {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 1.5rem;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  transition: border-color 0.2s ease;
}

.erd-container:hover {
  border-color: var(--border-h);
}

.erd-canvas {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

/* Custom styles to override Mermaid's SVG styling to perfectly fit the system style */
.erd-canvas svg {
  height: auto !important;
  max-height: 500px;
  background: transparent !important;
  font-family: var(--font) !important;
}

/* Polish typography and colors inside Mermaid SVG entities */
.erd-canvas svg .entityBox {
  fill: var(--bg-3) !important;
  stroke: var(--border-a) !important;
  stroke-width: 1.5px !important;
  rx: 4px;
  ry: 4px;
}

.erd-canvas svg .entityLabel {
  font-family: var(--font) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  fill: var(--text) !important;
}

.erd-canvas svg .attributeBoxOdd,
.erd-canvas svg .attributeBoxEven {
  fill: var(--bg-2) !important;
  stroke: var(--border) !important;
  stroke-width: 1px !important;
}

.erd-canvas svg .relationshipLine {
  stroke: var(--accent-purple) !important;
  stroke-width: 2px !important;
  stroke-dasharray: none !important;
  filter: drop-shadow(0 0 2px rgba(129, 140, 248, 0.2));
}

.erd-canvas svg .relationshipLabel {
  fill: var(--text-2) !important;
  font-family: var(--mono) !important;
  font-size: 0.7rem !important;
}


.spinner-box, .empty-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-2);
  margin-top: 1rem;
}
.empty-box p {
  font-size: 0.85rem;
}
.empty-desc {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem !important;
}
.empty-sub {
  font-size: 0.78rem !important;
  color: var(--text-3);
}

.ascii-view {
  margin-top: 1rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .main { padding: 2rem 1rem; }
  .hero { padding: 5rem 1rem 3.5rem; }
  .hero-title { font-size: 1.75rem; }
  .endpoint-row { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .endpoint-desc { font-family: var(--mono); font-size: 0.7rem; }
}

/* ── Detail Page Tabs ────────────────────────────────────────────────────── */
.detail-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.detail-tab {
  padding: 0.75rem 0.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  user-select: none;
}
.detail-tab:hover {
  color: var(--text);
}
.detail-tab.active {
  color: var(--text);
  font-weight: 600;
}
.detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
}

/* ── Table Browser ───────────────────────────────────────────────────────── */
.browser-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;
  box-shadow: var(--shadow);
}
.browser-sidebar {
  border-right: 1px solid var(--border);
  background: rgba(14, 14, 17, 0.4);
  display: flex;
  flex-direction: column;
}
.browser-sidebar-header {
  padding: 0.65rem 0.85rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.browser-table-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-grow: 1;
}
.browser-table-item {
  padding: 0.6rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.12s;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  text-align: left;
  background: transparent;
  border-left: 2px solid transparent;
  border-top: none;
  border-right: none;
}
.browser-table-item:hover {
  color: var(--text);
  background: var(--accent-dim);
}
.browser-table-item.active {
  color: var(--text);
  background: var(--accent-dim);
  border-left-color: var(--accent-purple);
  font-weight: 600;
}
.browser-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.browser-main-header {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.browser-table-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.browser-row-count {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.browser-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.browser-pagination-info {
  font-size: 0.7rem;
  color: var(--text-2);
}
.browser-content {
  flex-grow: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.browser-table-wrap {
  overflow-x: auto;
  flex-grow: 1;
}
.browser-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.browser-tbl th {
  background: var(--bg-2);
  padding: 0.55rem 0.65rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-2);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}
.browser-tbl th:hover {
  color: var(--text);
  background: var(--bg-3);
}
.browser-tbl td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  color: var(--text-2);
  white-space: nowrap;
}
.browser-tbl td.null-val {
  color: var(--text-3);
  font-style: italic;
}
.browser-tbl tr:last-child td {
  border-bottom: none;
}
.browser-tbl tr:hover td {
  background: var(--accent-dim);
}
.sort-indicator {
  margin-left: 4px;
  color: var(--accent-purple);
  font-size: 0.6rem;
}

/* ── Actions column styling ── */
.actions-hd {
  text-align: right !important;
  cursor: default !important;
}
.actions-hd:hover {
  background: var(--bg-2) !important;
  color: var(--text-2) !important;
}
.actions-cell {
  text-align: right;
  white-space: nowrap;
}
.form-scroll {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 1rem;
}


@media (max-width: 768px) {
  .browser-container {
    grid-template-columns: 1fr;
  }
  .browser-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 150px;
  }
  .browser-table-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .browser-table-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }
  .browser-table-item.active {
    border-bottom-color: var(--accent-purple);
  }
}

/* ── Docs Page ───────────────────────────────────────────────────────────── */
.docs-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
.docs-nav {
  position: sticky;
  top: 80px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.docs-nav-link {
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  cursor: pointer;
}
.docs-nav-link:hover, .docs-nav-link.active {
  color: var(--text);
  background: var(--accent-dim);
}
.docs-nav-link.active {
  font-weight: 600;
}
.docs-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.docs-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}
.docs-section p {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}
.docs-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.docs-tab-btn {
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.68rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.docs-tab-btn:hover {
  color: var(--text);
  border-color: var(--border-h);
}
.docs-tab-btn.active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
  font-weight: 600;
}

@media (max-width: 768px) {
  .docs-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .docs-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
}

/* ── Professional Master-Detail Left Sidebar Layout ────────────────────── */
.detail-layout {
  display: flex;
  min-height: calc(100vh - 56px);
  align-items: stretch;
}

.detail-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
}

.detail-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.detail-sidebar-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-sidebar-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-sidebar-slug {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}

.detail-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.detail-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.detail-menu-item .menu-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

.detail-menu-item:hover {
  background: var(--accent-dim);
  color: var(--text);
}

.detail-menu-item.active {
  background: var(--bg-3);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.detail-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.detail-main-content {
  flex-grow: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.detail-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.back-link {
  font-size: 0.78rem;
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--text);
}

.db-stats-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.db-size-label {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
}

.db-slug-label {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.detail-tab-pane {
  flex-grow: 1;
  animation: pageIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Collapsible SQL Console Layout ─────────────────────────────────────── */
.console-outer-layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  margin-top: 0.75rem;
}

.console-schema-nav {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: 480px;
  overflow-y: auto;
}

.schema-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.schema-nav-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.schema-nav-close {
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}

.schema-nav-close:hover {
  color: var(--text);
}

.schema-nav-list {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.schema-nav-table-group {
  display: flex;
  flex-direction: column;
}

.schema-nav-table-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

.schema-nav-table-title:hover {
  background: var(--bg-3);
  color: var(--text);
}

.schema-nav-columns-list {
  display: flex;
  flex-direction: column;
  padding-left: 1.15rem;
  border-left: 1px dashed var(--border);
  margin: 0.15rem 0 0.5rem 0.85rem;
  gap: 0.15rem;
}

.schema-nav-column-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.schema-nav-column-item:hover {
  background: var(--bg-3);
  color: var(--text);
}

.nav-toggle-icon {
  font-size: 0.55rem;
  color: var(--text-3);
  width: 8px;
  display: inline-block;
  font-weight: bold;
}

.nav-table-icon {
  font-size: 0.75rem;
}

.nav-table-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-col-key {
  font-size: 0.65rem;
  width: 10px;
  text-align: center;
  display: inline-block;
}

.nav-col-name {
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-col-type {
  font-size: 0.62rem;
  color: var(--text-3);
  margin-left: auto;
  text-transform: uppercase;
  font-family: var(--mono);
}

.btn-highlight {
  background: rgba(129, 140, 248, 0.08) !important;
  border: 1px solid rgba(129, 140, 248, 0.2) !important;
  color: var(--accent-purple) !important;
  font-weight: 500 !important;
}

.btn-highlight:hover {
  background: rgba(129, 140, 248, 0.15) !important;
}

/* Responsive detail adjustments */
@media (max-width: 1024px) {
  .detail-layout {
    flex-direction: column;
  }
  .detail-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1rem;
  }
  .detail-sidebar-header {
    margin-bottom: 1.25rem;
  }
  .detail-sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
  }
  .detail-menu-item {
    flex-grow: 1;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
  }
  .detail-sidebar-footer {
    flex-direction: row;
    padding-top: 1rem;
    gap: 0.5rem;
  }
  .detail-sidebar-footer .btn {
    flex-grow: 1;
  }
  .detail-main-content {
    padding: 1.5rem;
  }
  .console-outer-layout {
    flex-direction: column;
  }
  .console-schema-nav {
    width: 100%;
    max-height: 200px;
  }
}

/* ── Database Overview Landing Page ──────────────────────────────────────── */
.overview-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: pageIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.overview-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.overview-title {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.overview-slug {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.25rem;
}

.overview-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.overview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .overview-row {
    grid-template-columns: 1fr;
  }
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.recent-logs-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-3);
  font-size: 0.82rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.recent-logs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.recent-log-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 0.75rem;
}

.recent-log-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-log-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
}

.recent-log-status {
  font-weight: 700;
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 4px;
}

.log-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.log-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.recent-log-time {
  color: var(--text-3);
}

.recent-log-latency {
  color: #fbbf24;
  font-family: var(--mono);
}

.recent-log-query {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-desc {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 0.25rem;
}

/* ── Custom SQL API Interactive Enhancements ────────────────────────────── */

.editing-active-card {
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  background: var(--bg-3) !important;
}

.test-sandbox-panel, .snippet-sandbox-panel {
  animation: slideDownFade 0.2s ease-out;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.test-params-grid {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.test-response-container pre {
  margin: 0;
}

/* ── Revamped Static Site Hosting Styles ────────────────────────────────── */

.hosting-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hosting-workspace {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  align-items: stretch;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

/* IDE Activity Bar / Sidebar Dock */
.workspace-activity-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 48px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.activity-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.activity-btn:hover {
  background: var(--bg-3);
  color: var(--text);
}

.activity-btn.active {
  background: rgba(129, 140, 248, 0.08);
  color: var(--accent-purple);
  border: 1px solid rgba(129, 140, 248, 0.15);
}

.activity-tooltip {
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-4);
  color: #fff;
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.15s ease;
  z-index: 100;
}

.activity-btn:hover .activity-tooltip {
  opacity: 1;
}

/* Sidebar styling with Collapsible state */
.routes-sidebar {
  width: 240px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  animation: pageIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.routes-sidebar-collapsed {
  width: 0 !important;
  opacity: 0 !important;
  border: none !important;
  margin-right: -1.5rem !important;
  pointer-events: none !important;
}

.routes-sidebar-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.routes-sidebar-header h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Search bar inside Sidebar */
.sidebar-search-box {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.005);
}

.sidebar-search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  transition: border-color 0.15s ease;
}

.sidebar-search-wrapper:focus-within {
  border-color: var(--accent-purple);
}

.sidebar-search-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.72rem;
  color: var(--text);
  width: 100%;
}

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

.btn-add-route {
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  color: var(--accent-purple);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-route:hover {
  background: rgba(129, 140, 248, 0.2);
  color: #fff;
}

.routes-list {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
}

/* File explorer styled item */
.route-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-size: 0.76rem;
  color: var(--text-2);
  gap: 0.5rem;
}

.route-item:hover {
  background: var(--bg-3);
  color: var(--text);
}

.route-item.active {
  background: rgba(129, 140, 248, 0.08);
  border-left: 3px solid var(--accent-purple);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  color: var(--accent-purple);
  font-weight: 500;
  padding-left: 0.5rem;
}

.route-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.route-path-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.route-file-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-delete-route {
  background: transparent;
  color: var(--text-3);
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  border-radius: 3px;
  transition: all 0.12s;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-item:hover .btn-delete-route {
  opacity: 1;
}

.btn-delete-route:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Web Routes Auth Badges */
.route-auth-badge {
  font-size: 0.58rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  user-select: none;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
  transition: all 0.15s ease;
}

.route-auth-badge:hover {
  filter: brightness(1.15);
}

.badge-public {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-private {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Editor Pane Wrapper */
.editor-pane {
  flex: 1.1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.editor-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  background: #282a36; /* Match Dracula editor base */
}

/* Code Breadcrumbs / Editor Header */
.editor-breadcrumbs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--text-2);
}

.editor-breadcrumbs-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
}

.breadcrumb-sep {
  opacity: 0.4;
  font-size: 0.65rem;
}

.breadcrumb-path {
  font-weight: 500;
  color: var(--text-2);
}

.breadcrumb-file {
  font-weight: 600;
  color: var(--text);
}

.editor-breadcrumbs-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-3);
}

.editor-mode-badge {
  background: var(--bg-4);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-2);
}

/* Preview Pane Wrapper */
.preview-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.35s ease;
}

/* Premium Simulated Web-Browser Mockup */
.preview-browser-mockup {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 500px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
  width: 100%;
  transition: max-width 0.35s cubic-bezier(0.25, 1, 0.5, 1),
              height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
}

/* Mockup browser resizes */
.viewport-desktop {
  max-width: 100% !important;
  height: 500px !important;
}

.viewport-tablet {
  max-width: 768px !important;
  height: 580px !important;
}

.viewport-mobile {
  max-width: 375px !important;
  height: 640px !important;
}

/* Browser top bar toolbar styling */
.browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  user-select: none;
  flex-shrink: 0;
}

.browser-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.browser-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.browser-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

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

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

.browser-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.browser-nav-btn:hover:not(.disabled) {
  background: var(--bg-4);
  color: var(--text);
}

.browser-nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Address bar */
.browser-address-bar {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  color: var(--text-2);
  font-family: var(--mono);
  justify-content: space-between;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  overflow: hidden;
}

.address-text-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-lock-icon {
  color: var(--success);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.address-domain {
  color: var(--text-2);
  font-weight: 500;
}

.address-path {
  color: var(--text-3);
}

.address-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.address-action-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.address-action-btn:hover {
  background: var(--bg-3);
  color: var(--text);
}

.browser-toolbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Viewport Toggle Badges */
.viewport-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.viewport-toggle-btn:hover {
  background: var(--bg-4);
  color: var(--text-2);
}

.viewport-toggle-btn.active {
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.15);
  color: var(--accent-purple);
  font-weight: 600;
}

/* Iframe view container */
.preview-iframe-wrapper {
  flex: 1;
  background: #ffffff;
  position: relative;
  border: none;
  border-radius: 0;
  height: 100%;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Workspace Controls Bar */
.workspace-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.layout-toggle-group {
  display: flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.layout-btn {
  background: transparent;
  color: var(--text-2);
  border: none;
  padding: 0.35rem 0.75rem;
  font-size: 0.73rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.layout-btn.active {
  background: var(--bg-4);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.template-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-select {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 2rem 0.35rem 0.75rem;
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

.template-select:focus {
  border-color: var(--accent-purple);
}

/* Secrets Manager & Variables styling */
.var-explanation-card {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.04) 0%, transparent 100%);
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.variables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.var-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  position: relative;
  transition: all 0.2s ease;
}

.var-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.var-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.var-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  color: var(--accent-purple);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.var-badge:hover {
  background: rgba(129, 140, 248, 0.2);
  color: #fff;
}

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

.var-action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.var-action-icon-btn:hover {
  background: var(--bg-3);
  color: var(--text-2);
}

.var-value-container {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.var-value-text {
  font-size: 0.75rem;
}

.var-value-masked {
  letter-spacing: 0.15em;
  opacity: 0.45;
}

/* Variable Add Form */
.var-add-form {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-2);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Premium Hosting Hero Header ─────────────────────────────────────────── */
.hosting-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.04) 0%, rgba(99, 102, 241, 0.02) 50%, transparent 100%);
  border: 1px solid rgba(129, 140, 248, 0.12);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.hosting-hero-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hosting-hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.hosting-hero-text {
  display: flex;
  flex-direction: column;
}

.hosting-hero-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Live status pill */
.hosting-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.hosting-live-pill.hosting-pill-idle {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text-3);
}

.hosting-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hosting-live-dot.hosting-dot-idle {
  background: var(--text-3);
  animation: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── Premium Tab Bar ─────────────────────────────────────────────────────── */
.hosting-tab-bar {
  display: flex;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.hosting-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 1rem;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hosting-tab:hover {
  background: var(--bg-3);
  color: var(--text);
}

.hosting-tab.hosting-tab-active {
  background: var(--bg-4);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hosting-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.2);
  color: var(--accent-purple);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
}

/* ── Premium Deploy Bar & Build pipeline ──────────────────────────────────── */
.deploy-bar {
  margin-top: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.deploy-bar-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.deploy-bar-commit {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deploy-bar-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.deploy-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.deploy-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
  filter: brightness(1.08);
}

.deploy-btn:active:not(:disabled) {
  transform: translateY(0);
}

.deploy-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.deploy-spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Shipping Pipeline Visual Steps */
.deploy-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(99, 102, 241, 0.25);
  animation: slideDownFade 0.3s ease-out;
}

.pipeline-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  color: var(--text-3);
  transition: all 0.25s ease;
}

.pipeline-step.pending {
  opacity: 0.5;
}

.pipeline-step.active {
  border-color: var(--accent-purple);
  background: rgba(129, 140, 248, 0.05);
  color: var(--text);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.1);
  font-weight: 500;
}

.pipeline-step.completed {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.04);
  color: var(--success);
}

.pipeline-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Git-Graph History Timeline ── */
.timeline-container {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 1.75rem;
  margin-top: 1rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 4px;
  width: 2px;
  background: linear-gradient(to bottom, var(--success) 0%, var(--accent) 50%, var(--border) 100%);
  border-radius: 2px;
}

.timeline-row {
  display: flex;
  position: relative;
  padding-bottom: 2rem;
}

.timeline-row:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.05rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-h);
  border: 2px solid var(--bg);
  z-index: 10;
  transition: all 0.2s ease;
}

.timeline-row.live-commit .timeline-dot {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  width: 12px;
  height: 12px;
  left: -2.12rem;
}

/* Glowing active node ripple */
.timeline-row.live-commit .timeline-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1px solid var(--success);
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.timeline-card {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.timeline-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-card-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.timeline-card-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.timeline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-h);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}

.timeline-card.live-commit .timeline-avatar {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.commit-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.commit-msg-text {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.commit-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-3);
}

.commit-hash-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 1px 5px;
  border-radius: 4px;
}

.commit-date-badge {
  color: var(--text-2);
}

.timeline-live-badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Expansion panel inside commit cards */
.commit-files-expand-btn {
  background: transparent;
  border: none;
  color: var(--accent-purple);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.25rem;
  width: fit-content;
}

.commit-files-expand-btn:hover {
  text-decoration: underline;
}

.commit-files-panel {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: slideDownFade 0.2s ease-out;
}

.commit-files-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.commit-files-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.commit-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
}

.commit-file-path {
  font-family: var(--mono);
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.commit-file-size {
  color: var(--text-3);
}

/* Template Helper Dialog */
.template-info-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Interactive Data Grid Editor Styles ────────────────────────────────── */
.results-tbl td.editable-cell {
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.results-tbl td.editable-cell:hover {
  background: rgba(129, 140, 248, 0.08) !important;
  color: var(--text) !important;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.3);
}

.grid-edit-input {
  width: 100%;
  padding: 0.15rem 0.35rem;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--accent-purple);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.76rem;
  outline: none;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.2);
}

.results-tbl td.actions-cell {
  text-align: right;
  padding: 0.25rem 0.65rem;
}

.results-tbl th.actions-hd {
  text-align: right;
  width: 80px;
}

/* ── Premium CodeMirror Custom Styling ────────────────────────────────────── */
.CodeMirror {
  font-family: var(--mono) !important;
}

/* Force CodeMirror cursor to be bright, thick and visible */
.CodeMirror-cursor {
  border-left: 2px solid var(--accent) !important;
  z-index: 10 !important;
}

/* Force CodeMirror selection highlight to be high contrast and beautiful */
.CodeMirror-selected {
  background: rgba(139, 92, 246, 0.35) !important;
}
.CodeMirror-focused .CodeMirror-selected {
  background: rgba(139, 92, 246, 0.45) !important;
}

/* Dracula theme specific overrides for cursor and selection */
.cm-s-dracula .CodeMirror-cursor {
  border-left: 2px solid #ff79c6 !important; /* Beautiful neon pink cursor! */
}
.cm-s-dracula .CodeMirror-selected {
  background: rgba(255, 121, 198, 0.25) !important; /* Neon pink selection highlight! */
}
.cm-s-dracula .CodeMirror-line::selection,
.cm-s-dracula .CodeMirror-line > span::selection,
.cm-s-dracula .CodeMirror-line > span > span::selection {
  background: rgba(255, 121, 198, 0.3) !important;
}

/* Custom Premium CodeMirror Autocomplete Styles */
.CodeMirror-hints {
  background: rgba(17, 24, 39, 0.95) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5) !important;
  padding: 6px !important;
  max-height: 250px !important;
  font-family: var(--mono) !important;
  font-size: 0.72rem !important;
  z-index: 9999 !important;
}

.CodeMirror-hint {
  border-radius: var(--radius-sm) !important;
  padding: 5px 10px !important;
  color: #a6accd !important;
  white-space: pre !important;
  cursor: pointer !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: background 0.15s, color 0.15s !important;
}

.CodeMirror-hint-active {
  background: var(--accent) !important;
  color: #ffffff !important;
}

/* Icons & Colors for specific hint types */
.CodeMirror-hint::before {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

/* Method type hint */
.cm-hint-method::before {
  content: "fn";
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.CodeMirror-hint-active.cm-hint-method::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Property type hint */
.cm-hint-prop::before {
  content: "pr";
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.CodeMirror-hint-active.cm-hint-prop::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Table type hint */
.cm-hint-table::before {
  content: "tbl";
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}
.CodeMirror-hint-active.cm-hint-table::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Column type hint */
.cm-hint-column::before {
  content: "col";
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
}
.CodeMirror-hint-active.cm-hint-column::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Keyword type hint */
.cm-hint-keyword::before {
  content: "key";
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.CodeMirror-hint-active.cm-hint-keyword::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Env Variable type hint */
.cm-hint-env::before {
  content: "env";
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
}
.CodeMirror-hint-active.cm-hint-env::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Global variable type hint */
.cm-hint-global::before {
  content: "glb";
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.CodeMirror-hint-active.cm-hint-global::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Snippet type hint */
.cm-hint-snippet::before {
  content: "snip";
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}
.CodeMirror-hint-active.cm-hint-snippet::before {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ==========================================================================
   💻 Quarry Project Workspace IDE Premium Styles
   ========================================================================== */

/* ── IDE Core Layout ── */
.ide-outer {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 110px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}

.ide-header-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005)), var(--bg-3);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  user-select: none;
}

.ide-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ide-product-mark {
  width: 34px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}

.ide-product-mark-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.42);
}

.ide-header-title {
  min-width: 0;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ide-header-kicker {
  color: var(--text-3);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.ide-header-name {
  max-width: 300px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ide-header-subtitle {
  max-width: 380px;
  font-size: 0.66rem;
  color: var(--text-3);
  font-family: var(--mono);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ide-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ide-tool-btn,
.ide-save-btn {
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ide-tool-btn {
  background: transparent;
  color: var(--text-2);
}

.ide-tool-btn:hover:not(:disabled),
.ide-tool-btn.active {
  background: var(--bg-4);
  border-color: var(--border-h);
  color: #fff;
}

.ide-tool-btn.active {
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.22);
}

.ide-save-btn.clean {
  background: var(--bg-2);
  color: var(--text-3);
}

.ide-save-btn.dirty {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
}

.ide-tool-btn:disabled,
.ide-save-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ide-workspace-split {
  display: grid;
  grid-template-columns: 240px 6px 1fr 6px 340px;
  flex-grow: 1;
  height: calc(100% - 46px);
  overflow: hidden;
  position: relative;
}

@media (max-width: 1100px) {
  .ide-workspace-split {
    grid-template-columns: 210px 6px 1fr !important;
  }
  .ide-panel-right, .resizer-right {
    display: none !important;
  }
}

/* ── IDE Panel Resizer Drag Handles ── */
.ide-resizer {
  width: 6px;
  background: transparent;
  cursor: col-resize;
  position: relative;
  z-index: 20;
  transition: background 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  margin: 0 -3px; /* Overlap columns slightly to make it easy to grab */
}

.ide-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 1px;
  background: var(--border);
  transition: background 0.15s ease, width 0.15s ease;
}

.ide-resizer:hover {
  background: rgba(129, 140, 248, 0.08);
}

.ide-resizer.active,
.ide-resizer:hover:active {
  background: rgba(129, 140, 248, 0.15);
}

.ide-resizer:hover::after {
  background: var(--accent-purple);
  width: 2px;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.4);
}

.ide-resizer.active::after {
  background: var(--accent-purple);
  width: 3px;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.6);
}

/* ── IDE Vertical Resizer Drag Handle ── */
.ide-vertical-resizer {
  height: 6px;
  background: transparent;
  cursor: row-resize;
  position: relative;
  z-index: 20;
  transition: background 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  margin: -3px 0; /* Overlap row slightly to make it easy to grab */
}

.ide-vertical-resizer::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 2px;
  height: 1px;
  background: var(--border);
  transition: background 0.15s ease, height 0.15s ease;
}

.ide-vertical-resizer:hover {
  background: rgba(129, 140, 248, 0.08);
}

.ide-vertical-resizer.active,
.ide-vertical-resizer:hover:active {
  background: rgba(129, 140, 248, 0.15);
}

.ide-vertical-resizer:hover::after {
  background: var(--accent-purple);
  height: 2px;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.4);
}

.ide-vertical-resizer.active::after {
  background: var(--accent-purple);
  height: 3px;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.6);
}

.ide-bottom-console {
  background: #07070a !important;
  border-top: 1px solid var(--border);
}

.console-tbl th {
  background: var(--bg-3) !important;
  color: var(--text-2) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
  font-size: 0.68rem !important;
}

.console-tbl td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.02) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.02) !important;
}

.console-tbl tr:hover {
  background: rgba(255, 255, 255, 0.015) !important;
}

/* ── Left Sidebar (Virtual File Tree Explorer) ── */
.ide-panel-left {
  background: #0b0b0e;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  user-select: none;
}

.explorer-header {
  padding: 0.6rem 0.85rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.explorer-count {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.explorer-tree {
  padding: 0.5rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-folder {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.tree-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
}

.tree-node:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.tree-node.active {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-weight: 600;
}

.tree-node.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--accent-purple);
  border-radius: 1px;
}

.node-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}

.node-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.tree-node:hover .node-actions,
.tree-node:focus-within .node-actions,
.tree-node.active .node-actions {
  opacity: 1;
}

.node-action-btn {
  min-width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  color: var(--text-3);
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.node-action-btn:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.tree-subfolder {
  padding-left: 0.75rem;
  margin-top: 1px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px dashed rgba(255, 255, 255, 0.08); /* Modern dotted guide */
  margin-left: 0.85rem;
}

/* ── Explorer Search Input ── */
.explorer-search-wrapper {
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(0, 0, 0, 0.15);
}

.explorer-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 5px 22px 5px 7px;
  color: var(--text);
  font-size: 0.72rem;
  outline: none;
  transition: all 0.15s ease;
  height: auto !important;
}

.explorer-search-input:focus {
  border-color: var(--accent-purple) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.25) !important;
}

.explorer-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s;
}

.explorer-search-clear:hover {
  color: var(--danger);
}

/* ── Inline Method Badges in Sidebar ── */
.node-method-badges {
  display: flex;
  gap: 2px;
  margin-left: auto;
  align-items: center;
}

.tree-method-badge {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  font-family: var(--mono);
  line-height: 1;
  text-transform: uppercase;
  flex-shrink: 0;
  scale: 0.85;
}

.tree-method-badge.get { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.tree-method-badge.post { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.tree-method-badge.put { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.tree-method-badge.delete { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.tree-method-badge.patch { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.2); }

.tree-node-empty {
  padding: 0.5rem 1rem;
  color: var(--text-3);
  font-size: 0.7rem;
  font-style: italic;
}

/* ── Center Panel (Code Tabs & Workspace) ── */
.ide-panel-center {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Tabs Bar */
.ide-tabs-bar {
  display: flex;
  align-items: center;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  height: 34px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.ide-tabs-bar::-webkit-scrollbar {
  display: none;
}

.ide-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0.85rem;
  height: 100%;
  font-size: 0.75rem;
  color: var(--text-2);
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.ide-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.ide-tab.active {
  background: var(--bg) !important;
  color: #ffffff !important;
  font-weight: 600;
  border-bottom-color: transparent !important;
  box-shadow: inset 0 2px 0 var(--accent-purple), 0 4px 12px rgba(129, 140, 248, 0.05) !important;
}

.ide-tab-close {
  font-size: 0.8rem;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.ide-tab-close:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.ide-tab-changed-dot {
  width: 6px;
  height: 6px;
  background: var(--warning);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Glassmorphic Welcome Splash Screen ── */
.ide-welcome-splash {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  overflow-y: auto;
}

.welcome-glass-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  max-width: 760px;
  width: 100%;
  animation: pageIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-header-block {
  text-align: left;
}

.welcome-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff !important;
  margin-bottom: 4px;
  letter-spacing: 0;
}

.welcome-subtitle {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--mono);
}

.db-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.fact-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: left;
  transition: all 0.15s ease;
}

.fact-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(129, 140, 248, 0.15);
}

.fact-value {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--mono);
  margin-bottom: 2px;
}

.fact-label {
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.welcome-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.welcome-col-left,
.welcome-col-right {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.welcome-section-heading {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.welcome-tasks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.welcome-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0.3rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.12s;
}

.welcome-task-item:hover {
  background: var(--bg-3);
  color: #fff;
}

.task-bullet {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.welcome-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.welcome-shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 0.25rem;
}

.shortcut-key {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-2);
}

.welcome-footer-tag {
  text-align: left;
  font-size: 0.65rem;
  color: var(--text-3);
  font-style: normal;
  margin-top: 0.25rem;
}

/* ── Context-Aware Toolbar (Pills bar for API routes) ── */
.ide-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ide-editor-path-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

.method-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.method-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.method-pill.active.get { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.method-pill.active.post { background: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.method-pill.active.put { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.method-pill.active.delete { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.method-pill.active.patch { background: rgba(139, 92, 246, 0.1); color: #a78bfa; border-color: rgba(139, 92, 246, 0.3); }

.method-pill:hover:not(.active) {
  border-color: var(--border-h);
  color: var(--text-2);
}

.method-pill-add {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
}

.method-pill-add:hover {
  color: var(--text-2);
  border-color: var(--border-h);
  background: var(--bg-3);
}

.meta-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ide-meta-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.ide-meta-toggle input {
  cursor: pointer;
  width: 12px;
  height: 12px;
}

.ide-meta-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-2);
}

.ide-meta-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  padding: 1px 4px;
  outline: none;
  cursor: pointer;
}

/* Worker logs terminal styling */
.ide-terminal-logs {
  background: #0b0c10;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  min-height: 380px;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.6;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ide-terminal-line {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border-left: 3.5px solid var(--accent-purple);
  white-space: pre-wrap;
  word-break: break-all;
  transition: all 0.12s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ide-terminal-line:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.ide-terminal-line.err {
  color: #f87171;
  background: rgba(239, 68, 68, 0.04);
  border-left-color: #ef4444;
}

.ide-terminal-line.err:hover {
  background: rgba(239, 68, 68, 0.08);
}

.ide-terminal-line.log {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.02);
  border-left-color: var(--accent-purple);
}

.ide-terminal-line.log:hover {
  background: rgba(99, 102, 241, 0.05);
}

.ide-terminal-line.warn {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.04);
  border-left-color: #f59e0b;
}

.ide-terminal-line.warn:hover {
  background: rgba(245, 158, 11, 0.08);
}

.ide-terminal-empty {
  color: var(--text-3);
  font-style: italic;
  font-size: 0.7rem;
  text-align: center;
  padding: 3rem 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

.ide-editor-container {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  background: #0e0e11;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ide-code-editor-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ide-editor-container .CodeMirror {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  height: 100% !important;
  font-size: 0.82rem;
  font-family: var(--mono);
}

.ide-editor-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 1rem;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-3);
  flex-shrink: 0;
  user-select: none;
}

.bottom-bar-left, .bottom-bar-right {
  display: flex;
  align-items: center;
}

/* ── IDE Breadcrumbs Bar ── */
.ide-breadcrumbs-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-3);
  user-select: none;
  flex-shrink: 0;
}

.ide-breadcrumbs-bar .breadcrumb-item {
  color: var(--text-3);
}

.ide-breadcrumbs-bar .breadcrumb-item.db {
  color: var(--text-2);
}

.ide-breadcrumbs-bar .breadcrumb-item.type {
  color: var(--text-2);
  text-transform: capitalize;
}

.ide-breadcrumbs-bar .breadcrumb-item.active {
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ide-breadcrumbs-bar .breadcrumb-icon {
  font-size: 0.72rem;
}

.ide-breadcrumbs-bar .breadcrumb-sep {
  opacity: 0.45;
  font-family: var(--mono);
}

.ide-breadcrumbs-bar .breadcrumb-method {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  font-family: var(--mono);
  margin-left: 5px;
  line-height: 1;
}

.ide-breadcrumbs-bar .breadcrumb-method.get { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.ide-breadcrumbs-bar .breadcrumb-method.post { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.ide-breadcrumbs-bar .breadcrumb-method.put { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.ide-breadcrumbs-bar .breadcrumb-method.delete { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.ide-breadcrumbs-bar .breadcrumb-method.patch { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.2); }

/* ── Right Panel (Testing Sandbox, Logs, previews) ── */
.ide-panel-right {
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.ide-panel-right-header {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  user-select: none;
  background: var(--bg-2);
}

.right-panel-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.3rem;
}

.right-panel-group:first-child {
  flex: 1.1;
}

.right-panel-group:last-child {
  flex: 1;
}

.right-panel-group-label {
  color: var(--text-3);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.right-panel-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
}

.right-panel-tab {
  min-width: 0;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.right-panel-tab:hover {
  color: var(--text-2) !important;
  background: var(--bg-3);
  border-color: var(--border-h);
}
.right-panel-tab.active {
  color: #fff !important;
  border-color: rgba(129, 140, 248, 0.42) !important;
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.16);
}

.cache-mini-list::-webkit-scrollbar,
.storage-mini-grid::-webkit-scrollbar {
  width: 4px;
}
.cache-item-row:hover {
  border-color: var(--border-h) !important;
  background: var(--bg-4) !important;
}
.storage-grid-item:hover {
  border-color: var(--border-h) !important;
  background: var(--bg-4) !important;
}
.storage-grid-item.selected {
  border-color: var(--accent-purple) !important;
  background: rgba(129, 140, 248, 0.08) !important;
}
.storage-breadcrumbs::-webkit-scrollbar {
  height: 3px;
}
.crumb-item:hover {
  color: var(--text) !important;
}

.ide-right-panel-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Preview responsive device wrapper */
.ide-device-preview-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ide-device-toolbar {
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--bg-3);
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.ide-device-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s;
}

.ide-device-btn.active {
  background: var(--bg-4);
  color: var(--text);
}

.ide-preview-frame-container {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  height: 380px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 auto;
}

.ide-preview-frame-container.desktop { width: 100%; }
.ide-preview-frame-container.tablet { width: 280px; }
.ide-preview-frame-container.mobile { width: 190px; }

.ide-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Deployment Overlay Loader ── */
.ide-deploy-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ide-deploy-card {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 320px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: pageIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.deploy-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-3);
  transition: all 0.2s;
}

.deploy-step.pending .deploy-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-a);
  margin-left: 4px;
}

.deploy-step.active {
  color: var(--text);
  font-weight: 500;
}

.deploy-step.active .deploy-step-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-purple);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.deploy-step.done {
  color: var(--success);
}

.deploy-step.done .deploy-step-dot {
  width: 14px;
  height: 14px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
}

.deploy-step.done .deploy-step-dot::before {
  content: '✓';
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Split Sandbox Panels styling */
.sandbox-tabs-strip {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  margin-bottom: 0.75rem;
}

.sandbox-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.sandbox-tab-btn.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

/* Explorer node dirty indicator and direct save button styling */
.node-dirty-dot {
  color: #818cf8; /* Accent purple color */
  font-size: 0.65rem;
  margin-left: 0.25rem;
  animation: pulse-dirty 2s infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes pulse-dirty {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

.tree-node .node-actions .node-save-btn {
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(129, 140, 248, 0.05);
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  display: none;
  font-weight: bold;
}

.tree-node:hover .node-actions .node-save-btn,
.tree-node.active .node-actions .node-save-btn {
  display: inline-block !important;
}

/* Logging level badges & expanders */
.log-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
  margin-right: 0.5rem;
  line-height: 1.3;
}

.log-badge.success {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.log-badge.crash {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

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

.log-badge.processing {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  animation: pulse-processing 1.5s ease-in-out infinite;
}

@keyframes pulse-processing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.log-expand-icon {
  display: inline-block;
  transition: transform 0.15s ease;
  margin-left: auto;
  color: var(--text-3);
  font-size: 0.65rem;
}

.ide-terminal-line.expanded .log-expand-icon {
  transform: rotate(90deg);
}

.log-header-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.log-meta-item {
  color: var(--text-3);
  font-size: 0.65rem;
  margin-right: 0.75rem;
}

.log-meta-item.mono {
  font-family: var(--mono);
  background: rgba(255,255,255,0.03);
  padding: 0 4px;
  border-radius: 2px;
}

.log-details-box {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #060709;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #a5b4fc;
  overflow-x: auto;
  line-height: 1.4;
  animation: slide-down 0.15s ease-out;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* API Sandbox history styling */
.api-history-container {
  margin-top: 1rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.api-history-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.api-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 160px;
  overflow-y: auto;
}

.api-history-item {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.1s ease;
}

.api-history-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(129, 140, 248, 0.3);
  transform: translateX(1px);
}

.api-history-method {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  margin-right: 0.4rem;
  text-transform: uppercase;
}

.api-history-method.get { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.api-history-method.post { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }
.api-history-method.put { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.api-history-method.delete { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.api-history-method.patch { color: #a78bfa; background: rgba(167, 139, 250, 0.1); }

.api-history-path {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.api-history-status {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 2px;
  margin-left: 0.4rem;
}

.api-history-status.success { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.api-history-status.error { color: #f87171; background: rgba(248, 113, 113, 0.1); }

.api-history-latency {
  font-size: 0.6rem;
  color: var(--text-3);
  margin-left: 0.4rem;
}

/* SQL migrations shell panel */
.schema-readonly-pill {
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  text-transform: uppercase;
}

.schema-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.schema-summary-tile {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.schema-summary-tile span {
  color: var(--text-3);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schema-summary-tile strong {
  color: #fff;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.1;
}

.schema-erd-compact {
  min-height: 190px;
  max-height: 280px;
  padding: 0.5rem;
}

.schema-erd-compact .erd-canvas {
  transform: scale(0.9);
  transform-origin: center;
}

.schema-object-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}

.schema-object-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.55rem;
  text-transform: uppercase;
}

.schema-object-list-header span:last-child {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
  text-transform: none;
}

.schema-object-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.55rem;
}

.schema-object-row:last-child {
  border-bottom: 0;
}

.schema-object-type {
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1;
  padding: 3px 4px;
  text-align: center;
  text-transform: uppercase;
}

.schema-object-type.table { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.schema-object-type.view { background: rgba(20, 184, 166, 0.12); color: #2dd4bf; }
.schema-object-type.index { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.schema-object-type.trigger { background: rgba(244, 63, 94, 0.12); color: #fb7185; }

.schema-object-name {
  min-width: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schema-object-table {
  grid-column: 2;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.58rem;
  margin-top: -0.28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schema-empty-card {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem;
  text-align: center;
}

.schema-empty-card strong {
  color: var(--text);
  font-size: 0.78rem;
}

.schema-empty-card span {
  font-size: 0.66rem;
}

.schema-terminal-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.schema-terminal-header {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schema-terminal-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 6px;
  min-height: 48px;
  resize: vertical;
  outline: none;
}

.schema-terminal-input:focus {
  border-color: var(--accent-purple);
}

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

/* Sidebar action menu overlays */
.explorer-new-input-container {
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 2px 6px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  animation: pageIn 0.12s ease;
}

.explorer-new-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  outline: none;
}

.explorer-new-input:focus {
  border-color: var(--accent-purple);
}

.explorer-route-prefix {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.explorer-route-prefix strong {
  color: var(--code);
  font-weight: 600;
}

.explorer-input-hint {
  color: var(--text-3);
  font-size: 0.64rem;
  line-height: 1.3;
}

.explorer-new-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}

/* ── Unified Observability Styles ────────────────────────────────────────── */

.observability-tab {
  animation: pageIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.obs-split-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.obs-terminal-section, .obs-historical-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Section Header (macOS Terminal Style) */
.obs-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.obs-mac-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.obs-mac-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

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

.obs-section-title {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-2);
  font-weight: 600;
}

.obs-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Live Badge with Pulse Animation */
.obs-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.obs-status-badge.obs-active {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.obs-status-badge.obs-offline {
  background: rgba(107, 114, 128, 0.08);
  border: 1px solid rgba(107, 114, 128, 0.2);
  color: var(--text-3);
}

.obs-status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.obs-active .obs-status-pulse {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: obs-pulse 1.8s infinite ease-in-out;
}

.obs-offline .obs-status-pulse {
  background: var(--text-3);
}

@keyframes obs-pulse {
  0% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 8px var(--success); }
  100% { transform: scale(0.85); opacity: 0.5; }
}

.obs-pause-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.obs-pause-btn:hover {
  background: var(--bg-4);
  color: #fff;
  border-color: var(--text-3);
}

/* Terminal Filters & Search */
.obs-terminal-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.005);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

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

.obs-filter-lbl {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 600;
  margin-right: 0.25rem;
}

.obs-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.74rem;
  color: var(--text-2);
}

.obs-filter-checkbox input[type=checkbox] {
  margin: 0;
  accent-color: var(--accent-purple);
  width: 13px;
  height: 13px;
}

.obs-filter-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  outline: none;
  width: 180px;
  transition: border-color 0.15s ease;
}

.obs-filter-input:focus {
  border-color: var(--accent-purple);
}

/* Terminal Display Area */
.obs-terminal-body {
  background: #090a0f;
  padding: 1.25rem;
  height: 340px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
}

.obs-terminal-empty {
  color: var(--text-3);
  text-align: center;
  padding-top: 6rem;
  font-style: italic;
}

.obs-terminal-row {
  display: flex;
  align-items: flex-start;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  gap: 0.75rem;
  transition: background 0.12s ease;
}

.obs-terminal-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.obs-row-col {
  flex-shrink: 0;
  word-break: break-all;
}

.obs-col-time {
  color: var(--text-3);
  width: 90px;
}

.obs-col-source {
  width: 60px;
}

.obs-col-level {
  width: 20px;
  font-weight: 700;
  text-align: center;
}

.obs-col-lvl-info { color: var(--success); }
.obs-col-lvl-warn { color: var(--warning); }
.obs-col-lvl-error { color: var(--danger); }

.obs-col-message {
  flex: 1;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
}

.obs-col-duration {
  color: #fbbf24;
  width: 70px;
  text-align: right;
}

/* Badges styling */
.obs-source-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.obs-source-badge-sm {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  border: 1px solid;
}

.obs-level-badge-info { color: var(--success); font-weight: 600; font-size: 0.72rem; }
.obs-level-badge-warn { color: var(--warning); font-weight: 600; font-size: 0.72rem; }
.obs-level-badge-error { color: var(--danger); font-weight: 600; font-size: 0.72rem; }

.obs-dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 5px rgba(255,255,255,0.15);
}

/* Historical Log Query Filters */
.obs-history-header-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.obs-history-select {
  padding: 0.3rem 1.75rem 0.3rem 0.5rem !important;
  font-size: 0.73rem !important;
  height: auto !important;
  width: auto !important;
}

.obs-presets-group {
  display: flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px;
}

.obs-preset-btn {
  background: transparent;
  color: var(--text-3);
  border: none;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.obs-preset-btn:hover {
  color: var(--text);
}

.obs-preset-btn.active {
  background: var(--bg-4);
  color: var(--accent-purple);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.obs-history-query-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.005);
  border-bottom: 1px solid var(--border);
}

.obs-filter-subgroup {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.obs-filter-subgroup .obs-lbl {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 600;
  width: 50px;
}

.obs-filter-toggle-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.obs-filter-toggle-btn:hover {
  border-color: var(--text-3);
  color: #fff;
}

.obs-filter-toggle-btn.active {
  background: rgba(129, 140, 248, 0.08);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.obs-filter-inputs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.obs-search-field {
  font-size: 0.74rem !important;
  padding: 0.35rem 0.65rem !important;
  height: auto !important;
  width: 170px !important;
}

/* Historical Logs Table */
.obs-table-wrapper {
  position: relative;
  overflow-x: auto;
}

.obs-table-loading {
  padding: 4rem 0;
  text-align: center;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.obs-table-empty {
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--text-2);
  font-style: italic;
}

.obs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.obs-table th {
  padding: 0.75rem 1.25rem;
  background: var(--bg-3);
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
}

.obs-data-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background 0.15s ease;
}

.obs-data-row:hover {
  background: rgba(255, 255, 255, 0.015);
}

.obs-data-row.expanded {
  background: rgba(129, 140, 248, 0.02);
}

.obs-table td {
  padding: 0.85rem 1.25rem;
  vertical-align: middle;
  color: var(--text-2);
}

.obs-expand-arrow {
  color: var(--text-3);
  font-size: 0.65rem;
  text-align: center;
  font-family: var(--mono);
}

.obs-level-indicator {
  margin-right: 0.35rem;
  font-weight: bold;
}

.obs-info { color: var(--success); }
.obs-warn { color: var(--warning); }
.obs-err { color: var(--danger); }

.obs-msg-col {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.obs-duration-col {
  font-family: var(--mono);
  color: #fbbf24;
}

/* Expanded Detail Row */
.obs-detail-row {
  background: #0b0c10;
  border-bottom: 1px solid var(--border);
}

.obs-detail-row td {
  padding: 0.75rem 1.5rem 1.25rem 1.5rem !important;
}

.obs-detail-content {
  animation: slideDownFade 0.2s ease-out;
}

.obs-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.obs-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: rgba(255,255,255,0.01);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.03);
}

.obs-meta-cell {
  font-size: 0.76rem;
  color: var(--text-2);
}

.obs-meta-cell strong {
  color: var(--text-3);
}

.obs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
}

.obs-meta-item strong {
  color: var(--text-3);
}

.obs-sql-code {
  background: #0f1016;
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: #a78bfa;
  font-family: var(--mono);
  font-size: 0.76rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.obs-error-detail {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: #f87171;
}

.obs-error-detail pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* Console Log Code Pre Blocks */
.obs-console-block {
  background: #0d0e15;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 250px;
  overflow-y: auto;
  margin: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.obs-log-line {
  white-space: pre-wrap;
  word-break: break-all;
}

.obs-log-info { color: #38bdf8; }
.obs-log-warn { color: #fbbf24; }
.obs-log-error { color: #f87171; }

/* Pagination Footer */
.obs-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 1rem;
}

.obs-pagination-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ── Sandbox Response Card & Telemetry ── */
.sandbox-response-card.success-glow {
  border-color: rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.08);
}

.sandbox-response-card.error-glow {
  border-color: rgba(239, 68, 68, 0.25) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.08);
}

.sandbox-stat-tile {
  display: flex;
  flex-direction: column;
}

.sandbox-stat-tile .stat-label {
  font-size: 0.55rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.sandbox-stat-tile .stat-val {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-2);
}

/* ── API History Styling ── */
.api-history-item {
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.api-history-item:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.03);
  transform: translateX(1px);
}

.api-history-method.get { color: #60a5fa !important; }
.api-history-method.post { color: #34d399 !important; }
.api-history-method.put { color: #fbbf24 !important; }
.api-history-method.delete { color: #f87171 !important; }
.api-history-method.patch { color: #a78bfa !important; }
