:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-soft: #EFF6FF;
  --accent: #38BDF8;
  --bg: #F3F6FB;
  --bg-2: #E8EEF7;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #D97706;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --sidebar: 268px;
  --nav: 72px;
  --sidebar-bg: #0B1220;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  letter-spacing: -.01em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
.muted { color: var(--muted); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  background: var(--sidebar-bg);
  color: #E2E8F0;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
  color: inherit;
  font-weight: 700;
  font-size: 18px;
}
.sidebar .brand { color: #fff; }
.brand:hover { color: inherit; }
.brand .mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(180deg, #3B82F6, #1D4ED8);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
}
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748B;
  padding: 18px 12px 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #CBD5E1;
  transition: background .15s ease, color .15s ease;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(37, 99, 235, .18);
  color: #fff;
}
.sidebar-footer { margin-top: auto; padding-top: 16px; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  margin-bottom: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1E3A8A;
  color: #DBEAFE;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}
.sidebar-user strong { display: block; color: #fff; font-size: 13px; }
.sidebar-user span { font-size: 12px; color: #94A3B8; text-transform: capitalize; }
.sidebar .nav-link[type="submit"] { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 40px;
  background:
    radial-gradient(900px 280px at 100% -10%, rgba(37, 99, 235, .08), transparent 50%),
    var(--bg);
}
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.icon-btn {
  border: 1px solid var(--border);
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary-dark); }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.04em; }
.page-header p { margin: 0; color: var(--muted); }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .tabs { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h2, .card h3 { margin: 0 0 12px; font-size: 16px; letter-spacing: -.02em; }
.icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.04em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat-card .icon-wrap { margin-bottom: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(180deg, #3B82F6, var(--primary));
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary, .btn.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-secondary:hover, .btn.secondary:hover { background: #F8FAFC; color: var(--text); }
.btn-danger { background: var(--danger); box-shadow: 0 8px 16px rgba(220, 38, 38, .2); }
.btn-ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-sm { padding: 7px 10px; font-size: 13px; border-radius: 10px; box-shadow: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field[hidden], [hidden] { display: none !important; }
.field label { font-size: 13px; font-weight: 600; }
.input, .select, textarea.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
}
.help { color: var(--muted); font-size: 13px; }

.table-wrap { overflow: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th, table.data td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.data tr:hover td { background: #F8FAFC; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-muted { background: #F1F5F9; color: #475569; }
.badge-success::before,
.badge-warning::before,
.badge-danger::before,
.badge-muted::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 240px;
  box-shadow: var(--shadow);
}
.search input { border: 0; outline: 0; width: 100%; background: transparent; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
}
.tab.active { background: var(--primary-soft); color: var(--primary-dark); border-color: #BFDBFE; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.card.filter-bar { padding: 14px 16px; }
.filter-bar .select { min-width: 220px; width: auto; }

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty h3 { color: var(--text); margin: 0 0 8px; }

.toast-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
}
.toast {
  background: #0F172A;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
}
.toast.success { background: #14532D; }
.toast.error { background: #7F1D1D; }
.toast.warning { background: #78350F; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 70;
  backdrop-filter: blur(6px);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 22px;
  width: min(520px, 100%);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.modal h2 { margin: 0 0 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.auth-page { min-height: 100vh; }
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
}
.auth-aside {
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, .22), transparent 36%),
    linear-gradient(180deg, #0B1220 0%, #111827 100%);
  color: #E2E8F0;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-aside .brand { color: #fff; padding: 0 0 28px; }
.auth-aside h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
  color: #fff;
  line-height: 1.15;
}
.auth-points { margin: 20px 0 0; padding: 0; list-style: none; }
.auth-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  color: #CBD5E1;
}
.auth-points li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: #38BDF8;
  flex: 0 0 auto;
}
.auth-main {
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top right, #DBEAFE 0, transparent 32%),
    var(--bg);
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, #DBEAFE 0, transparent 32%),
    var(--bg);
}
.auth-card { width: min(440px, 100%); }
.auth-card h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em; }
.auth-card .btn { width: 100%; }

.landing { background: #F8FAFC; }
.landing header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6vw;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, .7);
}
.landing header .brand { padding: 0; color: var(--text); }
.landing-hero {
  padding: 56px 6vw 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 40px;
  align-items: center;
  background:
    radial-gradient(circle at 12% 12%, #DBEAFE 0, transparent 28%),
    radial-gradient(circle at 90% 0%, #E0F2FE 0, transparent 24%),
    #F8FAFC;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}
.landing-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -.045em;
  max-width: 720px;
  margin: 18px 0 16px;
}
.landing-hero p { max-width: 560px; font-size: 18px; color: var(--muted); margin: 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.browser-mock {
  background: #0B1220;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: #E2E8F0;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #111827;
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  display: block;
}
.browser-bar i:nth-child(1) { background: #F87171; }
.browser-bar i:nth-child(2) { background: #FBBF24; }
.browser-bar i:nth-child(3) { background: #34D399; }
.browser-url {
  margin-left: 8px;
  flex: 1;
  background: #1E293B;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #93C5FD;
}
.browser-body { padding: 28px 24px 32px; }
.browser-body h3 { margin: 0 0 8px; color: #fff; font-size: 22px; }
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.mini-stats div {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
}
.mini-stats strong { display: block; color: #fff; font-size: 20px; }
.mini-stats span { color: #94A3B8; font-size: 12px; }

.section-title { padding: 0 6vw 12px; }
.section-title h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.03em; }
.steps, .feature-grid, .pricing, .cta-band { padding: 0 6vw 72px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 12px;
}
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.feature-grid .card p { margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -.04em; margin: 8px 0; }
.price span { font-size: 16px; color: var(--muted); font-weight: 500; }
.plan-featured {
  border-color: #BFDBFE;
  background: linear-gradient(180deg, #EFF6FF, #fff);
}
.cta-band .card {
  text-align: center;
  padding: 36px 24px;
  background: linear-gradient(180deg, #0B1220, #111827);
  color: #E2E8F0;
  border: 0;
}
.cta-band h2 { color: #fff; font-size: 30px; margin: 0 0 8px; }
.cta-band p { color: #94A3B8; }
.landing footer { padding: 24px 6vw 40px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.chart-box { height: 280px; }
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.list-row:last-child { border-bottom: 0; }
.bar {
  height: 8px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
  margin-top: 6px;
}
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
a.list-row-link {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
a.list-row-link:hover { background: #F8FAFC; }

.choice-card h2 { display: flex; align-items: center; gap: 10px; }
.choice-card .icon-wrap { margin: 0 0 12px; }

.kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 24px 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 10%, rgba(56, 189, 248, .28), transparent 34%),
    linear-gradient(135deg, #0B1220 0%, #1E3A8A 58%, #2563EB 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.welcome-banner .kicker { color: #93C5FD; }
.welcome-banner h1 { margin: 0 0 6px; color: #fff; font-size: 30px; }
.welcome-banner p { margin: 0; color: #BFDBFE; }
.welcome-banner .btn { box-shadow: 0 10px 24px rgba(0,0,0,.25); }

.grid-6 > .stat-card:nth-child(1) .icon-wrap,
.grid-stats > .stat-card:nth-child(1) .icon-wrap { background: #EFF6FF; color: #2563EB; }
.grid-6 > .stat-card:nth-child(2) .icon-wrap,
.grid-stats > .stat-card:nth-child(2) .icon-wrap { background: #ECFDF5; color: #059669; }
.grid-6 > .stat-card:nth-child(3) .icon-wrap,
.grid-stats > .stat-card:nth-child(3) .icon-wrap { background: #F5F3FF; color: #7C3AED; }
.grid-6 > .stat-card:nth-child(4) .icon-wrap,
.grid-stats > .stat-card:nth-child(4) .icon-wrap { background: #ECFEFF; color: #0891B2; }
.grid-6 > .stat-card:nth-child(5) .icon-wrap,
.grid-stats > .stat-card:nth-child(5) .icon-wrap { background: #FFF7ED; color: #EA580C; }
.grid-6 > .stat-card:nth-child(6) .icon-wrap,
.grid-stats > .stat-card:nth-child(6) .icon-wrap { background: #FEF2F2; color: #DC2626; }
.grid-stats > .stat-card:nth-child(7) .icon-wrap { background: #F1F5F9; color: #475569; }

.feature-grid .card, .steps .card, .choice-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-grid .card:hover, .steps .card:hover, .choice-card:hover {
  transform: translateY(-3px);
  border-color: #BFDBFE;
  box-shadow: 0 18px 40px rgba(37, 99, 235, .12);
}

.landing-links { display: flex; align-items: center; gap: 18px; margin-right: 8px; }
.landing-links a { color: #475569; font-weight: 500; font-size: 14px; }
.landing-links a:hover { color: var(--primary); }
.landing-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #0F172A 20%, #2563EB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.product-mock {
  background: #0B1220;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid #1E293B;
}
.product-mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #111827;
  color: #94A3B8;
  font-size: 12px;
}
.product-mock-bar i {
  width: 10px; height: 10px; border-radius: 50%; display: block; background: #334155;
}
.product-mock-bar i:nth-child(1) { background: #F87171; }
.product-mock-bar i:nth-child(2) { background: #FBBF24; }
.product-mock-bar i:nth-child(3) { background: #34D399; }
.product-mock-bar span { margin-left: 6px; flex: 1; }
.product-mock-bar em {
  font-style: normal;
  background: #DCFCE7;
  color: #166534;
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 700;
}
.product-mock-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  min-height: 280px;
}
.mock-code {
  margin: 0;
  padding: 18px 16px;
  color: #93C5FD;
  font-size: 12px;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #0B1220;
  border-right: 1px solid #1E293B;
  overflow: hidden;
}
.mock-code b { color: #F472B6; font-weight: 500; }
.mock-code i { color: #34D399; font-style: normal; }
.mock-preview {
  background:
    linear-gradient(180deg, #F8FAFC, #EEF2FF);
  display: grid;
  place-items: center;
  padding: 22px;
}
.mock-site {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .12);
  text-align: center;
}
.mock-site h4 { margin: 0 0 8px; font-size: 20px; color: #0F172A; }
.mock-site p { margin: 0 0 14px; color: #64748B; font-size: 13px; }
.mock-btn {
  display: inline-flex;
  background: #2563EB;
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.dropzone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1.5px dashed #BFDBFE;
  border-radius: 14px;
  background: #F8FBFF;
}
.dropzone .input { background: #fff; }

.page-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.toolbar-cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-cluster .toolbar-group {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.toolbar-group .btn { box-shadow: none; }

.hero-note {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-note span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94A3B8;
}
.hero-note strong { color: var(--text); }

.editor-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
textarea.code {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 2;
}
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #F8FAFC;
}

.url-bar { margin-bottom: 16px; }
.url-bar-head, .editor-code-head, .preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.url-bar-head h2, .preview-toolbar strong { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.url-composer {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #F8FAFC;
  margin-top: 12px;
}
.url-prefix, .url-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  white-space: nowrap;
  background: #EEF2F7;
}
.url-composer .input {
  border: 0;
  border-radius: 0;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: none;
}
.url-composer .btn { border-radius: 0; box-shadow: none; }

.editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 620px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.editor-workspace.is-code { grid-template-columns: 1fr; }
.editor-workspace.is-code .editor-preview { display: none; }
.editor-workspace.is-preview { grid-template-columns: 1fr; }
.editor-workspace.is-preview .editor-code { display: none; }
.editor-code, .editor-preview { display: flex; flex-direction: column; min-width: 0; }
.editor-code { border-right: 1px solid var(--border); padding: 14px; }
.editor-code-head { margin-bottom: 10px; }
.editor-code-head .tabs,
.preview-toolbar .tabs { margin-bottom: 0; }
.editor-view-tabs { margin-left: auto; }
.editor-meta { margin-bottom: 10px; }
.snippet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.editor-code textarea.code {
  flex: 1;
  min-height: 360px;
  resize: vertical;
  background: #0B1220;
  color: #E2E8F0;
  border-color: #1E293B;
}
.editor-preview { background: #0B1220; }
.preview-toolbar {
  padding: 10px 12px;
  background: #111827;
  color: #fff;
  border-bottom: 1px solid #1F2937;
}
.preview-toolbar .tab { color: #CBD5E1; background: transparent; }
.preview-toolbar .tab.active { background: #1F2937; color: #fff; }
.preview-frame-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 12px;
  min-height: 480px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.preview-frame-wrap[data-size="tablet"] iframe { width: min(768px, 100%); }
.preview-frame-wrap[data-size="mobile"] iframe { width: min(390px, 100%); }
.editor-files { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 5px;
  background: #fff;
}
.url-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.url-cell code {
  font-size: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}
.dest-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.welcome-banner .welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.welcome-banner .btn.secondary {
  background: #fff;
  color: #1E3A8A;
}
.icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 8px 10px 10px;
  z-index: 50;
}
.mobile-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}
.mobile-nav a.active { color: var(--primary); }

.pagination { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.skeleton { background: linear-gradient(90deg, #E2E8F0, #F8FAFC, #E2E8F0); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 18px; }
@keyframes shimmer { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

.sidebar-backdrop { display: none; }
.success-url {
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 12px;
  word-break: break-all;
  font-weight: 600;
}

.page-cards { display: none; gap: 12px; }
.page-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.page-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.page-card-head h3 { margin: 0; font-size: 16px; }
.page-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.page-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file-item .btn { flex: 0 0 auto; }

@media (max-width: 1100px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .editor-grid, .feature-grid, .editor-workspace, .editor-files, .landing-hero, .steps, .pricing-grid { grid-template-columns: 1fr; }
  .editor-code { border-right: 0; border-bottom: 1px solid var(--border); }
  .url-composer { flex-wrap: wrap; }
  .url-composer .btn { width: 100%; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { padding: 28px 24px; min-height: auto; }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: min(var(--sidebar), 86vw);
    transform: translateX(-100%);
    transition: transform .2s ease;
    height: 100vh;
    height: 100dvh;
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 30;
  }
  .topbar { display: flex; }
  .main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .grid-6, .grid-3, .grid-2, .grid-stats { grid-template-columns: 1fr; }
  .mobile-nav {
    display: flex;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .page-header { margin-bottom: 16px; }
  .page-header h1 { font-size: 24px; }
  .page-header .btn, .page-header .toolbar { width: 100%; }
  .page-header .toolbar .btn { flex: 1 1 auto; }
  .search { min-width: 0; width: 100%; }
  .card { padding: 16px; }
  .stat-card .value { font-size: 24px; }
  .chart-box { height: 220px; }
  .pages-list .table-wrap { display: none; }
  .pages-list .page-cards { display: grid; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table.data th, table.data td { white-space: normal; }
  .toolbar { width: 100%; }
  .btn { min-height: 42px; }
  .modal { padding: 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .toast-wrap { right: 12px; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; }
  .landing-links { display: none; }
  .landing header { flex-wrap: wrap; gap: 12px; }
  .product-mock-grid { grid-template-columns: 1fr; }
  .mock-code { display: none; }
  .welcome-banner h1 { font-size: 24px; }
  .landing-hero { padding: 28px 5vw 48px; }
  .landing-hero h1 { font-size: 32px; }
  .landing-hero p { font-size: 16px; }
  .hero-actions .btn { flex: 1; }
  .feature-grid, .pricing, .steps, .cta-band, .section-title { padding-left: 5vw; padding-right: 5vw; }
  textarea.code { min-height: 180px; }
  .file-item { flex-wrap: wrap; gap: 8px; }
  .mini-stats { grid-template-columns: 1fr; }
}
