/* Velostack design system - dark blue / black premium theme */
:root {
  --bg: #04060d;
  --bg-2: #070b17;
  --panel: #0a101f;
  --panel-2: #0d1426;
  --card: #0b1220;
  --card-hover: #0f1830;
  --border: rgba(96, 165, 250, 0.14);
  --border-strong: rgba(96, 165, 250, 0.32);
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-3: #8b5cf6;
  --grad: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --text: #e6edf7;
  --muted: #8ea0bd;
  --danger: #f43f5e;
  --success: #34d399;
  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --radius: 14px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 14px 34px -14px rgba(59, 130, 246, 0.55);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(700px 400px at 85% -10%, rgba(59, 130, 246, 0.14), transparent 60%),
    radial-gradient(600px 380px at -10% 30%, rgba(139, 92, 246, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); }
h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -0.02em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2a47; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container { width: min(1180px, 92%); margin: 0 auto; position: relative; z-index: 1; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(4, 6, 13, 0.82);
  border-bottom: 1px solid var(--border);
}
.site-nav .nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; width: min(1180px, 92%); margin: 0 auto;
}
.logo { font-family: var(--font-head); font-weight: 700; font-size: 21px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 15px; color: #fff; font-weight: 800;
  box-shadow: var(--shadow-accent);
}
.logo em { font-style: normal; color: var(--accent-2); }
.nav-links { display: flex; gap: 30px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a { transition: 0.2s; }
.nav-links a:hover { color: var(--accent-2); }
.nav-actions { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; }
.nav-actions a.ghost { color: var(--muted); transition: 0.2s; }
.nav-actions a.ghost:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: 0.22s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(99, 102, 241, 0.6); }
.btn-ghost { background: var(--panel); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); color: var(--accent-2); transform: translateY(-1px); }
.btn-danger { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.35); color: #fb7185; }
.btn-danger:hover { background: rgba(244, 63, 94, 0.2); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 32px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ---------- cards & misc ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: 0.25s;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--accent-2);
}
.badge.violet { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.3); color: #a78bfa; }
.badge.green { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); color: var(--success); }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--accent-2);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 20px; background: rgba(59, 130, 246, 0.08);
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, .textarea, .select {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 15px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: 0.2s;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: #4d5d7a; }
.form-error {
  display: none; background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185; font-size: 13px; padding: 11px 15px; border-radius: 10px; margin-bottom: 14px;
}
.form-error.show { display: block; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--text);
  padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); animation: toastIn 0.28s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { border-color: rgba(52, 211, 153, 0.5); }
.toast.success::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.toast.error { border-color: rgba(244, 63, 94, 0.5); }
.toast.error::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2, 4, 10, 0.75);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  width: min(560px, 100%);
  padding: 30px;
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
}
.modal.wide { width: min(760px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-head h3 { font-size: 20px; }
.modal-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }

/* ---------- auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 16px;
  position: relative; z-index: 1;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 38px 34px;
  box-shadow: var(--shadow);
}
.auth-card .logo { justify-content: center; margin-bottom: 8px; }
.auth-title { text-align: center; font-size: 24px; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.auth-alt a { color: var(--accent-2); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

/* ---------- landing ---------- */
.hero { padding: 110px 0 90px; text-align: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); line-height: 1.06; max-width: 860px; margin: 0 auto 22px; }
.hero-sub { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; justify-content: center; gap: 56px; margin-top: 64px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-head); font-size: 34px; color: var(--accent-2); }
.hero-stats span { color: var(--muted); font-size: 13.5px; }

.hero-visual { margin-top: 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 980px; margin-left: auto; margin-right: auto; }
.hv-card {
  border-radius: 18px; border: 1px solid var(--border);
  overflow: hidden; background: var(--card);
  transition: 0.3s; text-align: left;
}
.hv-card:hover { transform: translateY(-8px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.hv-top { height: 120px; position: relative; }
.hv-body { padding: 18px 20px; }
.hv-body .bar { height: 8px; border-radius: 99px; background: var(--panel); margin-bottom: 10px; }
.hv-body .bar.hi { width: 70%; }
.hv-body .bar.mid { width: 52%; }
.hv-body .bar.lo { width: 34%; }
.hv-btn { height: 30px; width: 46%; border-radius: 8px; margin-top: 12px; }

.section { padding: 90px 0; position: relative; z-index: 1; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.section-head p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px;
  transition: 0.25s;
}
.feature:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 19px; margin-bottom: 18px;
  box-shadow: var(--shadow-accent);
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 34px 28px; }
.step-num {
  position: absolute; top: -18px; left: 24px;
  background: var(--grad); color: #fff;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; font-family: var(--font-head);
  box-shadow: var(--shadow-accent);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 34px 30px;
  display: flex; flex-direction: column;
}
.price-card.hot { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4), var(--shadow-accent); }
.price-card h3 { font-size: 17px; margin-bottom: 8px; }
.price-amount { font-family: var(--font-head); font-size: 46px; font-weight: 800; margin-bottom: 4px; }
.price-amount span { font-size: 19px; color: var(--muted); font-weight: 600; }
.price-desc { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 14px; margin-bottom: 28px; flex: 1; }
.price-card li { display: flex; gap: 10px; }
.price-card li::before { content: '✓'; color: var(--accent-2); font-weight: 800; }

.cta-band {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(139, 92, 246, 0.12));
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 70px 40px;
  text-align: center;
}
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 520px; margin: 0 auto 30px; }

.footer { border-top: 1px solid var(--border); padding: 40px 0; position: relative; z-index: 1; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }

/* ---------- template gallery ---------- */
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.search-box { position: relative; width: min(340px, 100%); }
.search-box input { padding-left: 40px; }
.search-box::before {
  content: '⌕'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 17px;
}
.cat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.chip {
  padding: 8px 17px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  background: var(--panel); transition: 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tpl-card { overflow: hidden; display: flex; flex-direction: column; }
.tpl-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.tpl-preview { position: relative; height: 170px; padding: 18px; }
.tpl-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tpl-dot { width: 26px; height: 26px; border-radius: 8px; }
.tpl-navlinks { display: flex; gap: 6px; }
.tpl-navlink { width: 22px; height: 5px; border-radius: 99px; }
.tpl-hero { border-radius: 10px; padding: 13px; }
.tpl-hero .bar { height: 7px; border-radius: 99px; margin-bottom: 8px; }
.tpl-hero .bar:nth-child(1) { width: 60%; }
.tpl-hero .bar:nth-child(2) { width: 42%; }
.tpl-hero .bar:nth-child(3) { width: 34%; }
.tpl-info { padding: 16px 18px 18px; border-top: 1px solid var(--border); }
.tpl-info .tpl-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-info .tpl-base { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.tpl-row { display: flex; justify-content: space-between; align-items: center; }
.tpl-count { color: var(--muted); font-size: 14px; }

/* ---------- dashboard ---------- */
.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { margin-bottom: 30px; padding: 0 6px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 11px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: 0.2s;
}
.side-nav a:hover { color: var(--text); background: var(--card); }
.side-nav a.active { background: rgba(59, 130, 246, 0.12); color: var(--accent-2); border: 1px solid rgba(59, 130, 246, 0.25); }
.side-nav a .ico { width: 20px; text-align: center; }
.side-user { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.side-user .u-name { font-size: 13.5px; font-weight: 600; padding: 0 6px; }
.side-user .u-mail { font-size: 12px; color: var(--muted); padding: 0 6px; margin-bottom: 10px; word-break: break-all; }
.side-user button { width: 100%; }

.main { flex: 1; padding: 34px 38px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }

.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.site-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.site-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.site-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.site-card h3 { font-size: 18px; }
.site-url {
  font-size: 13px; color: var(--accent-2); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.site-url:hover { text-decoration: underline; }
.site-url::before { content: '↗'; }
.site-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.site-card-foot { display: flex; gap: 10px; margin-top: auto; }
.site-card-foot .btn { flex: 1; }

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: 20px;
  padding: 70px 30px;
  text-align: center;
}
.empty-state .e-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 26px; margin: 0 auto 20px; box-shadow: var(--shadow-accent);
}
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* ---------- editor ---------- */
.editor-shell { display: flex; flex-direction: column; height: 100vh; position: relative; z-index: 1; }
.editor-top {
  display: flex; align-items: center; gap: 16px;
  padding: 0 18px; height: 58px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.editor-top .logo { font-size: 17px; }
.editor-top .logo-mark { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
.editor-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; min-width: 0; }
.editor-title .st { color: var(--muted); font-weight: 400; }
.editor-title .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.editor-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.save-state { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.save-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.save-state.saving::before { background: #f59e0b; animation: pulse 1s infinite; }
.save-state.saved::before { background: var(--success); }
@keyframes pulse { 50% { opacity: 0.35; } }
.device-switch { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.device-switch button {
  background: none; border: none; color: var(--muted);
  padding: 7px 12px; font-size: 13px; cursor: pointer; transition: 0.2s;
}
.device-switch button.active { background: var(--card); color: var(--accent-2); }

.editor-body { display: flex; flex: 1; min-height: 0; }
.editor-pane {
  width: 46%; display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg-2);
  min-width: 0;
}
.code-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.code-tab {
  background: none; border: none; cursor: pointer;
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  color: var(--muted); border-radius: 9px 9px 0 0;
  border: 1px solid transparent; border-bottom: none;
  display: flex; align-items: center; gap: 7px;
  transition: 0.2s;
}
.code-tab:hover { color: var(--text); }
.code-tab.active { color: var(--accent-2); background: var(--panel); border-color: var(--border); }
.code-tab .dot { width: 7px; height: 7px; border-radius: 50%; }
.code-tab .dot.html { background: #f97316; }
.code-tab .dot.css { background: #38bdf8; }
.code-tab .dot.js { background: #eab308; }
.code-area-wrap { flex: 1; display: flex; position: relative; min-height: 0; }
.code-area {
  flex: 1; resize: none; border: none; outline: none;
  background: transparent; color: #c9d7ec;
  font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
  font-size: 13px; line-height: 1.7;
  padding: 18px 20px;
  tab-size: 2;
}
.code-status { display: flex; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); font-family: monospace; flex-shrink: 0; }
.preview-pane { flex: 1; display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
.preview-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted); flex-shrink: 0;
}
.preview-toolbar .addr {
  flex: 1; background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-family: monospace; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.preview-frame-wrap { flex: 1; display: flex; justify-content: center; padding: 18px; min-height: 0; overflow: auto; }
#previewFrame {
  width: 100%; max-width: 1200px; height: 100%;
  border: 1px solid var(--border); border-radius: 14px;
  background: #fff; transition: 0.3s;
}
#previewFrame.mobile { max-width: 390px; }
#previewFrame.tablet { max-width: 768px; }

.mode-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode-swatch {
  border: 2px solid var(--border); border-radius: 14px; overflow: hidden;
  cursor: pointer; background: none; padding: 0; text-align: left; transition: 0.2s;
}
.mode-swatch.active, .mode-swatch:hover { border-color: var(--accent); }
.mode-swatch .ms-top { height: 44px; display: flex; align-items: center; gap: 5px; padding: 8px 10px; }
.mode-swatch .ms-top i { width: 7px; height: 7px; border-radius: 50%; background: rgba(148, 163, 184, 0.5); }
.mode-swatch .ms-body { padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.mode-swatch .ms-body .bar { height: 6px; border-radius: 99px; }
.mode-swatch .ms-body .bar:nth-child(1) { width: 65%; }
.mode-swatch .ms-body .bar:nth-child(2) { width: 45%; }
.mode-swatch .ms-body .btn-mini { width: 40%; height: 12px; border-radius: 4px; margin-top: 4px; }
.mode-swatch .ms-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-top: 1px solid var(--border); }

.accent-presets { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.accent-swatch {
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; transition: 0.2s;
}
.accent-swatch:hover { transform: scale(1.1); }
.accent-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
input[type='color'] {
  width: 42px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); cursor: pointer; padding: 3px;
}
.domain-hint { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.5; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .features, .steps, .pricing { grid-template-columns: 1fr 1fr; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { grid-template-columns: 1fr; max-width: 440px; }
  .editor-body { flex-direction: column; }
  .editor-pane { width: 100%; height: 45%; border-right: none; border-bottom: 1px solid var(--border); }
  .preview-pane { height: 55%; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 14px 18px; }
  .sidebar .logo { margin-bottom: 0; margin-right: 18px; }
  .side-nav { flex-direction: row; flex: 1; }
  .side-user { border-top: none; margin-top: 0; display: none; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .features, .steps, .pricing, .tpl-grid { grid-template-columns: 1fr; }
  .main { padding: 22px 16px; }
  .device-switch { display: none; }
  .editor-title .st { display: none; }
}
