:root {
  --bg: #f3ede2;
  --panel: rgba(255, 251, 245, 0.88);
  --panel-strong: #fffaf1;
  --ink: #1a2621;
  --muted: #5d6d64;
  --line: rgba(26, 38, 33, 0.12);
  --accent: #0f766e;
  --accent-strong: #0b5e58;
  --warm: #b55b3c;
  --shadow: 0 18px 50px rgba(45, 55, 48, 0.12);
  --radius: 24px;
  --radius-sm: 14px;
  --mono: "SFMono-Regular", "Menlo", "Consolas", monospace;
  --body: "Avenir Next", "Segoe UI", sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(181, 91, 60, 0.18), transparent 24rem),
    linear-gradient(180deg, #f8f3ea 0%, #efe5d6 100%);
}
code, pre, textarea { font-family: var(--mono); }
.page-shell { width: min(1380px, calc(100vw - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.hero { display: grid; grid-template-columns: 1.8fr 1fr; gap: 20px; margin-bottom: 24px; }
.hero-copy, .hero-card, .connect-panel, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-copy { padding: 32px; }
.hero-card { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.eyebrow, .hero-badge, .mini-note { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 0.94; margin-top: 10px; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.15rem; margin-bottom: 10px; }
.hero-text { max-width: 46rem; color: var(--muted); line-height: 1.6; }
.connect-panel, .panel { padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-heading p { margin: 0; color: var(--muted); }
.connection-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: end; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 0.94rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(26, 38, 33, 0.14);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}
textarea { min-height: 240px; resize: vertical; }
button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}
button:hover { transform: translateY(-1px); }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-strong); }
.ghost { background: rgba(15, 118, 110, 0.1); color: var(--accent-strong); }
.warn { background: rgba(181, 91, 60, 0.12); color: #8c3e25; }
.status-banner { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(15, 118, 110, 0.08); color: var(--accent-strong); }
.section-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
}
.section-nav a { padding: 10px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; background: rgba(15, 118, 110, 0.06); }
.dashboard-grid { display: grid; gap: 20px; }
.panel-wide { grid-column: 1 / -1; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { padding: 16px; border-radius: 18px; background: var(--panel-strong); border: 1px solid var(--line); }
.stat-card strong { display: block; font-family: var(--display); font-size: 2rem; margin-top: 8px; }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.llm-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.llm-create-card { background: rgba(255, 248, 238, 0.86); }
.llm-create-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.list-board { display: grid; gap: 10px; }
.list-card, .review-card { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.74); border: 1px solid var(--line); }
.list-card p, .review-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; word-break: break-word; }
.review-actions, .inline-actions, .connection-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.66); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 0.94rem; }
th { position: sticky; top: 0; background: rgba(252, 246, 237, 0.94); z-index: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(15, 118, 110, 0.12); color: var(--accent-strong); font-size: 0.82rem; }
.pill.off { background: rgba(181, 91, 60, 0.12); color: #8c3e25; }
.sql-form { display: grid; gap: 12px; }
.sql-output { min-height: 180px; margin: 0; padding: 16px; overflow: auto; border-radius: 18px; background: #17201c; color: #d8f1e8; }
.empty-state { padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.68); border: 1px dashed rgba(26, 38, 33, 0.18); color: var(--muted); }
@media (max-width: 1024px) {
  .hero, .grid-two, .connection-grid, .stats-grid, .llm-create-grid { grid-template-columns: 1fr; }
  .section-nav { border-radius: 22px; }
}
