/* ── Variables (dark default) ─────────────────────────────────────────────── */
:root {
  --bg:           #0a0a0f;
  --bg-card:      #111118;
  --bg-elevated:  #16161f;
  --border:       #1e1e2e;
  --border-hover: #2e2e44;
  --accent:       #7c6af7;
  --accent-hover: #9b8dff;
  --text:         #f0f0f8;
  --text-muted:   #8888aa;
  --text-dim:     #555577;
  --success:      #22c55e;
  --error:        #ef4444;
  --radius:       12px;
  --radius-sm:    8px;
}

/* ── Light mode overrides ─────────────────────────────────────────────────── */
html.light {
  --bg:           #f8fafc;
  --bg-card:      #ffffff;
  --bg-elevated:  #f1f5f9;
  --border:       #e2e8f0;
  --border-hover: #cbd5e1;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --text-dim:     #94a3b8;
}

html.light body { background: var(--bg); }

html.light .nav {
  background: rgba(255,255,255,.95);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

html.light .nav__brand { color: var(--text); }
html.light .nav__version { color: var(--text-muted); }

html.light .site-card {
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

html.light .site-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

html.light .builder textarea {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

html.light .example-pill { color: var(--text-muted); }
html.light .example-pill:hover { color: var(--text); }

html.light .browser-chrome { border-color: var(--border); }
html.light .browser-chrome__bar { background: var(--bg-elevated); }

html.light .tab { color: var(--text-muted); }
html.light .tab--active { background: var(--bg-card); color: var(--text); border-color: var(--border); }

html.light .nav__dropdown {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

html.light ::-webkit-scrollbar-track { background: var(--bg-elevated); }
html.light ::-webkit-scrollbar-thumb { background: var(--border); }

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

input, textarea, select, button {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: opacity .15s, background .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn--ghost:hover { border-color: var(--border-hover); color: var(--text); }

.btn--danger { background: var(--error); color: #fff; }
.btn--danger:hover { background: #dc2626; color: #fff; }

.btn--danger-ghost {
  background: transparent;
  border: 1px solid rgba(239,68,68,.25);
  color: rgba(239,68,68,.75);
}
.btn--danger-ghost:hover { border-color: var(--error); color: var(--error); }

.btn--lg { padding: 13px 28px; font-size: 16px; }
.btn--sm { padding: 6px 14px; font-size: 13px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}
.nav__version {
  font-size: 11px;
  margin-left: 6px;
  color: var(--text-muted);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
}

.nav__links { display: flex; align-items: center; gap: 12px; }
.nav__user  { font-size: 14px; color: var(--text-muted); }

/* ── Nav user avatar + dropdown ────────────────────────────────────────────── */
.nav__user-menu { position: relative; }

.nav__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: opacity .15s, transform .15s;
  flex-shrink: 0;
}
.nav__avatar:hover { opacity: .85; transform: scale(1.05); }

.nav__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 190px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  display: none;
  z-index: 300;
}
.nav__dropdown.open { display: block; }

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  transition: all .1s;
}
.nav__dropdown-item:hover { background: var(--bg-elevated); color: var(--text); }
.nav__dropdown-item--danger { color: rgba(239,68,68,.8); }
.nav__dropdown-item--danger:hover { background: rgba(239,68,68,.08); color: var(--error); }

.nav__dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

.nav__user-name {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 12px 8px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ── Landing ───────────────────────────────────────────────────────────────── */
.landing { min-height: 100vh; display: flex; flex-direction: column; }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124,106,247,.08) 0%, transparent 70%);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 32px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.hero__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.hero__title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 20px;
}

.hero__sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 44px;
  line-height: 1.7;
}

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.hero__pills {
  display: flex;
  gap: 10px;
  margin-top: 56px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-muted);
}

.footer {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* ── Auth ──────────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124,106,247,.06) 0%, transparent 70%);
}

.auth-box { width: 100%; max-width: 420px; }

.auth-box__header { text-align: center; margin-bottom: 32px; }

.auth-box__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
}

.auth-box__header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 6px;
}

.auth-box__header p { color: var(--text-muted); }

/* ── Form ──────────────────────────────────────────────────────────────────── */
.form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__group { display: flex; flex-direction: column; gap: 6px; }
.form__group label { font-size: 14px; font-weight: 500; color: var(--text-muted); }

.form__group input {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color .15s;
}
.form__group input:focus { border-color: var(--accent); }

.form__footer { text-align: center; font-size: 14px; color: var(--text-muted); }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.alert--error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--error);
}

.alert--success {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--success);
}

/* ── Accent helpers ────────────────────────────────────────────────────────── */
.accent { color: var(--accent); }
.text-muted { color: var(--text-muted); font-size: 14px; }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.dashboard {
  flex: 1;
  padding: 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin-bottom: 32px; }

.tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab--active {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

.tab__count {
  padding: 1px 7px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel--active { display: block; }

/* ── Builder ───────────────────────────────────────────────────────────────── */
.builder { max-width: 700px; }
.builder h2 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }

.builder textarea {
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  resize: vertical;
  outline: none;
  font-size: 15px;
  line-height: 1.6;
  margin: 20px 0 16px;
  transition: border-color .15s;
}
.builder textarea:focus { border-color: var(--accent); }

/* ── Examples ──────────────────────────────────────────────────────────────── */
.examples { margin-top: 32px; }

.examples__label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.examples__list { display: flex; flex-direction: column; gap: 8px; }

.example-pill {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
  line-height: 1.5;
}
.example-pill:hover { border-color: var(--border-hover); color: var(--text); }

/* ── Preview ───────────────────────────────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.preview-actions { display: flex; gap: 10px; }

.browser-chrome {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.browser-chrome__bar {
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #ffbd2e; }
.dot--green  { background: #28c840; }

.browser-chrome__url { margin-left: 8px; font-size: 12px; color: var(--text-dim); }

#preview-frame { width: 100%; height: 70vh; border: none; display: block; }

/* ── Success ───────────────────────────────────────────────────────────────── */
.success-state { text-align: center; padding: 60px 24px; }
.success-state__icon { font-size: 48px; margin-bottom: 16px; }
.success-state h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.success-state p  { color: var(--text-muted); margin-bottom: 24px; }

/* ── Sites grid ────────────────────────────────────────────────────────────── */
.sites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.sites-header h2 { font-size: 22px; font-weight: 700; }

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.site-card:hover { border-color: var(--border-hover); }

.site-card__header { display: flex; align-items: center; gap: 8px; }
.site-card__header h3 { font-size: 15px; font-weight: 600; flex: 1; }

.badge {
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.badge--live  { background: rgba(34,197,94,.12);  color: var(--success); }
.badge--draft { background: rgba(239,68,68,.12); color: var(--error); }

.site-card__prompt { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.site-card__date   { font-size: 12px; color: var(--text-dim); }
.site-card__actions { display: flex; gap: 8px; margin-top: 4px; }
.site-card__actions .btn { flex: 1; justify-content: center; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.empty-state__icon  { font-size: 40px; margin-bottom: 16px; }
.empty-state__title { font-weight: 600; margin-bottom: 8px; }
.empty-state__sub   { font-size: 14px; }

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Profile page ──────────────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
}

@media (max-width: 680px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

html.light .profile-card {
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.profile-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.profile-card .form__group input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.profile-card .form__group input:focus { border-color: var(--accent); }
.profile-card .form__group input:disabled { opacity: .55; cursor: not-allowed; }

.profile-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-stat:last-child { border-bottom: none; }
.profile-stat__label { color: var(--text-muted); flex: 1; }
.profile-stat__value { color: var(--text); font-weight: 500; }

.danger-zone-card {
  background: var(--bg-card);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius);
  padding: 28px;
  grid-column: 1 / -1;
}
.danger-zone-card h3 { font-size: 16px; font-weight: 700; color: var(--error); margin-bottom: 8px; }
.danger-zone-card p  { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* ── Editor page old styles (kept for dashboard tabs) ──────────────────────── */
.preview-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.preview-tab {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}
.preview-tab.active { background: var(--bg-elevated); color: var(--text); border-color: var(--border-hover); }

.patch-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.patch-bar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.patch-bar input:focus { border-color: var(--accent); }

.save-status { font-size: 13px; color: var(--success); display: none; }

.CodeMirror { height: 400px; font-size: 13px; border-radius: 0 0 8px 8px; }
.editor-toolbar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.editor-toolbar span { font-size: 12px; color: var(--text-muted); }
.editor-toggle { display: flex; gap: 6px; }
.editor-toggle button {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all .15s;
}
.editor-toggle button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD REDESIGN
═══════════════════════════════════════════════════════════════════ */

/* ── Welcome header ────────────────────────────────────────────────────────── */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 24px;
  flex-wrap: wrap;
}

.dash-welcome__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.dash-welcome__sub {
  font-size: 14px;
  color: var(--text-muted);
}

.dash-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.dash-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
}

.dash-stat__num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dash-stat__label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ── Dashboard tabs refinements ────────────────────────────────────────────── */
html.light .tabs { border-bottom: 1px solid var(--border); padding-bottom: 0; margin-bottom: 32px; }
html.light .tab { border-radius: 0; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 18px; }
html.light .tab--active { background: transparent; border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
html.light .tab:hover { color: var(--text); background: transparent; }

/* ── Build layout ──────────────────────────────────────────────────────────── */
.build-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .build-layout { grid-template-columns: 1fr; }
}

/* ── Build main (left) ─────────────────────────────────────────────────────── */
.build-header { margin-bottom: 24px; }

.build-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}

.build-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
}

.prompt-wrap { position: relative; margin-bottom: 10px; }

.prompt-textarea {
  width: 100%;
  padding: 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  font-family: 'Inter', sans-serif;
  min-height: 160px;
}

.prompt-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,106,247,.1);
}

.prompt-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.generate-btn {
  gap: 10px;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(124,106,247,.3);
  transition: all .2s;
}

.generate-btn:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(124,106,247,.4);
  transform: translateY(-1px);
}

.generate-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Build sidebar (right) ─────────────────────────────────────────────────── */
.build-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

html.light .build-sidebar-card { box-shadow: 0 1px 6px rgba(0,0,0,.07); }

.build-sidebar-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.build-sidebar-card__sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 14px;
}

/* ── Feature list ──────────────────────────────────────────────────────────── */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.feature-icon--green {
  background: rgba(34,197,94,.12);
  color: #16a34a;
}

.feature-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.feature-item span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Example cards ─────────────────────────────────────────────────────────── */
.example-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.example-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: all .15s;
  font-family: 'Inter', sans-serif;
}

.example-card:hover {
  border-color: var(--accent);
  background: rgba(124,106,247,.04);
}

.example-card__icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.example-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.example-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.example-card__desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.example-card__arrow {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform .15s, color .15s;
}

.example-card:hover .example-card__arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ── Preview topbar ────────────────────────────────────────────────────────── */
.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.preview-topbar__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.preview-topbar__sub { font-size: 13px; color: var(--text-muted); }

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

/* ── Preview view tabs ─────────────────────────────────────────────────────── */
.preview-view-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
}

.preview-view-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  transition: all .15s;
}

.preview-view-tab.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ── AI patch bar ──────────────────────────────────────────────────────────── */
.ai-patch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color .15s;
}

.ai-patch-bar:focus-within { border-color: var(--accent); }

.ai-patch-bar__icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ai-patch-bar__field { flex: 1; }

.ai-patch-bar input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.ai-patch-bar input::placeholder { color: var(--text-dim); }

/* ── Success panel ─────────────────────────────────────────────────────────── */
.success-panel {
  text-align: center;
  padding: 64px 32px;
  max-width: 560px;
  margin: 0 auto;
}

.success-panel__icon {
  font-size: 52px;
  margin-bottom: 20px;
  display: block;
}

.success-panel__title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.success-panel__sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.success-panel__link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(124,106,247,.08);
  border: 1px solid rgba(124,106,247,.2);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  margin-bottom: 28px;
  word-break: break-all;
}

.success-panel__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Sites grid improvements ───────────────────────────────────────────────── */
.sites-header__title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.sites-header__sub   { font-size: 13px; color: var(--text-muted); }

.site-card {
  overflow: hidden;
  padding: 0;
}

.site-card__thumb {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.site-card__thumb-label {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  letter-spacing: .06em;
  font-family: 'Space Grotesk', sans-serif;
}

.site-card__body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-card__header { display: flex; align-items: center; gap: 8px; }
.site-card__header h3 { font-size: 14px; font-weight: 600; flex: 1; color: var(--text); }

.site-card__url {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  opacity: .85;
}

.site-card__prompt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.site-card__date {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-card__actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.site-card__actions .btn { flex: 1; justify-content: center; font-size: 12px; padding: 6px 10px; }

/* ── Empty state improvement ───────────────────────────────────────────────── */
.empty-state__visual { margin-bottom: 20px; color: var(--text-dim); }
