/* =====================================================================
   Landing Page Generator - design system (shared by Member + Admin)
   Tokens -> base -> layout -> components -> pages -> responsive
   ===================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* color tokens */
  --bg: #080d18;
  --sidebar: #0d1424;
  --card: #111a2c;
  --card-hover: #141f35;
  --field: #0b1322;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --primary: #7c3aed;
  --primary-hover: #9a6bff;
  --accent: #a855f7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --subtle: #64748b;
  --primary-soft: rgba(124, 58, 237, 0.14);
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger-soft: rgba(239, 68, 68, 0.12);

  /* shape & depth */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);

  /* layout */
  --sidebar-w: 268px;
  --sidebar-w-compact: 76px;
  --topbar-h: 60px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary-hover); text-decoration: none; }
a:hover { color: #c4a7ff; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; color: var(--text); }
p { margin: 0; }
code { font-family: var(--mono); font-size: 12.5px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--text-soft); }
pre { font-family: var(--mono); font-size: 12.5px; background: var(--field); border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-sm); overflow: auto; margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
img { max-width: 100%; }
::selection { background: rgba(124, 58, 237, 0.4); }
:focus-visible { outline: 2px solid var(--primary-hover); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.icon-flip { transform: scaleX(-1); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }

/* ---------- app shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app-main { min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 18px 14px 14px;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; color: var(--text); }
.sidebar-brand:hover { color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: #fff; background: var(--gradient);
  box-shadow: 0 6px 18px -6px rgba(124, 58, 237, 0.7);
}
.brand-text { font-weight: 650; font-size: 14.5px; line-height: 1.2; letter-spacing: -0.01em; }
.brand-text small { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }

.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; margin: 0 -4px; padding: 0 4px; }
.nav-section {
  margin: 18px 10px 6px; font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle);
}
.nav-section:first-child { margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 0; background: none; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 520; text-align: left; position: relative;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--primary-hover); }
.nav-item.active .icon { color: var(--primary-hover); }

.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.user-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); }
.user-meta { min-width: 0; }
.user-meta strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 650; color: #e0e3ff; letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(168, 85, 247, 0.35)); border: 1px solid rgba(168, 85, 247, 0.4);
}
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.sidebar-overlay { display: none; }
.nav-section-rule { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(8, 13, 24, 0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 14px; font-weight: 600; color: var(--text-soft); display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { white-space: nowrap; }
.topbar-title .icon { color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.button.menu-btn { display: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 550; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text-soft); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); }
.pill-success .dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.pill-warning .dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.pill-danger .dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 28px 64px; }
.page-narrow { max-width: 860px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.page-sub { margin-top: 6px; color: var(--muted); font-size: 14.5px; max-width: 640px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--text); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; min-width: 0;
}
.page > .card + .card, .page > form + .card { margin-top: 18px; }
.card-flush { padding: 0; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 15.5px; font-weight: 650; }
.card-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.card-pad-header { padding: 20px 22px 0; }
.card-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 300px at 100% -20%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(600px 260px at 0% 120%, rgba(168, 85, 247, 0.14), transparent 60%),
    var(--card);
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.section-gap { margin-top: 26px; }

.stat-card { display: flex; flex-direction: column; gap: 10px; position: relative; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.stat-label { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-hover); }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat-value small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat-foot { font-size: 12.5px; color: var(--muted); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.25; white-space: nowrap; cursor: pointer;
  color: var(--text); background: transparent; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}
.button:hover { color: var(--text); }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 22px -10px rgba(124, 58, 237, 0.9); }
.button-primary:hover { color: #fff; filter: brightness(1.1); box-shadow: 0 10px 26px -10px rgba(124, 131, 255, 1); }
.button-secondary { background: rgba(255, 255, 255, 0.05); border-color: var(--border-strong); }
.button-secondary:hover { background: rgba(255, 255, 255, 0.09); }
.button-ghost { color: var(--muted); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.button-danger { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.button-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.button-sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.button-lg { padding: 13px 24px; font-size: 15px; border-radius: 12px; }
.button-icon { padding: 7px; width: 34px; height: 34px; }
.button-block { width: 100%; }
.button[disabled], .button.is-loading { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.button.is-loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.inline-form { display: inline; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-section { display: flex; flex-direction: column; gap: 16px; }
.form-section + .form-section { margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--border); }
.form-section-title { font-size: 11px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 550; color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.field-label .req { color: #c4a7ff; }
.field-label .opt { font-weight: 450; color: var(--subtle); font-size: 12px; }
.field-help { font-size: 12.5px; color: var(--subtle); line-height: 1.45; }
.field-error { font-size: 12.5px; color: #fca5a5; display: flex; gap: 6px; align-items: center; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: rgba(239, 68, 68, 0.6); }

.input, .select, .textarea {
  width: 100%; padding: 10px 13px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--field); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25); }
.input[readonly], .input:disabled { opacity: 0.6; cursor: not-allowed; }
.textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.textarea-code { font-family: var(--mono); font-size: 12.5px; }
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select option { background: #0f1729; color: var(--text); }
input[type="file"].input { padding: 8px 10px; cursor: pointer; }
input[type="file"].input::file-selector-button { margin-right: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.07); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
input[type="color"].input { padding: 4px; height: 44px; cursor: pointer; }
input[type="number"].input { appearance: textfield; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px var(--field) inset; }
.input-group { position: relative; }
.input-group .input { padding-left: 38px; }
.input-group > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.02); cursor: pointer; }
.switch:hover { border-color: var(--border-strong); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-text strong { display: block; font-size: 14px; font-weight: 580; }
.switch-text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.switch-track { position: relative; flex: none; width: 40px; height: 23px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); transition: background 0.2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.switch input:checked ~ .switch-track { background: var(--primary); }
.switch input:checked ~ .switch-track::after { transform: translateX(17px); }
.switch input:focus-visible ~ .switch-track { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-soft); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.radio-inline { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 600; }
.radio-inline input { accent-color: var(--primary); width: 17px; height: 17px; }
.segmented { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 7px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 560; color: var(--muted); transition: background 0.15s, color 0.15s; white-space: nowrap; }
.segmented input:checked + span { background: var(--primary-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.5); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary-hover); }

/* ---------- badges / alerts / toasts ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, 0.06); color: var(--text-soft); border: 1px solid var(--border); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge-plain::before { display: none; }
.badge-success { color: #4ade80; background: var(--success-soft); border-color: rgba(34, 197, 94, 0.25); }
.badge-warning { color: #fbbf24; background: var(--warning-soft); border-color: rgba(245, 158, 11, 0.25); }
.badge-danger { color: #f87171; background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.25); }
.badge-primary { color: #c4a7ff; background: var(--primary-soft); border-color: rgba(124, 58, 237, 0.3); }
.badge-muted { color: var(--muted); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); margin-bottom: 18px; font-size: 14px; }
.alert .icon { margin-top: 1px; }
.alert-body { min-width: 0; flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-success { border-color: rgba(34, 197, 94, 0.3); background: var(--success-soft); } .alert-success > .icon { color: var(--success); }
.alert-error { border-color: rgba(239, 68, 68, 0.35); background: var(--danger-soft); } .alert-error > .icon { color: #f87171; }
.alert-warn { border-color: rgba(245, 158, 11, 0.3); background: var(--warning-soft); } .alert-warn > .icon { color: var(--warning); }
.alert-info { border-color: rgba(124, 58, 237, 0.3); background: var(--primary-soft); } .alert-info > .icon { color: var(--primary-hover); }
.alert-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; font-size: 13px; }
.alert-list .ok { color: #4ade80; } .alert-list .bad { color: #fca5a5; } .alert-list .warn { color: #fbbf24; }

.toasts { position: fixed; right: 20px; top: 78px; z-index: 100; pointer-events: none; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 12px;
  background: #151f35; border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
  animation: toast-in 0.25s ease-out; font-size: 14px;
}
.toast .icon { margin-top: 1px; flex: none; }
.toast-success .icon { color: var(--success); } .toast-error .icon { color: #f87171; } .toast-info .icon { color: var(--primary-hover); }
.toast-body { flex: 1; min-width: 0; word-break: break-word; }
.toast-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; line-height: 0; }
.toast-close:hover { color: var(--text); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 18px; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); border-bottom: 1px solid var(--border); white-space: nowrap; background: rgba(255, 255, 255, 0.015); }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-actions { text-align: right; white-space: nowrap; }
.table-compact th, .table-compact td { padding-left: 14px; padding-right: 14px; }
.cell-main { font-weight: 580; color: var(--text); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.err-row td { color: #fca5a5; font-size: 12.5px; background: var(--danger-soft); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; border-top: 1px solid var(--border); }

/* dropdown ("More") */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px; padding: 6px;
  background: #151f35; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-pop);
}
.dropdown-menu.up { top: auto; bottom: calc(100% + 6px); }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--text-soft); cursor: pointer; text-align: left; text-decoration: none; }
.dropdown-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.dropdown-item.danger { color: #fca5a5; } .dropdown-item.danger:hover { background: var(--danger-soft); color: #fecaca; }
.dropdown-menu form { margin: 0; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(3, 6, 14, 0.7); backdrop-filter: blur(4px); animation: fade-in 0.15s ease-out; }
.modal { width: min(440px, 100%); background: #131d33; border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 24px; animation: pop-in 0.18s ease-out; }
.modal-wide { width: min(560px, 100%); }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--danger-soft); color: #f87171; margin-bottom: 14px; }
.modal-icon.primary { background: var(--primary-soft); color: var(--primary-hover); }
.modal-title { font-size: 17px; font-weight: 650; }
.modal-text { margin-top: 8px; color: var(--muted); font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ---------- misc components ---------- */
.empty-state { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-hover); margin-bottom: 8px; }
.empty-state h3 { font-size: 17px; }
.empty-state p { color: var(--muted); max-width: 380px; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.tooltip-wrap { position: relative; display: inline-flex; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: #1b2742; border: 1px solid var(--border-strong); color: var(--text); padding: 5px 9px; border-radius: 7px;
  font-size: 12px; font-weight: 500; white-space: nowrap; z-index: 50; pointer-events: none; box-shadow: var(--shadow-pop);
}
[data-tip] { position: relative; }
.help-dot { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--muted); font-size: 11px; font-weight: 650; cursor: help; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.15); border-top-color: var(--primary-hover); animation: spin 0.8s linear infinite; }
.test-result { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.test-result.ok { color: #4ade80; } .test-result.bad { color: #fca5a5; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); margin-right: 8px; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); } .status-dot.warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); } .status-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.divider-label { display: flex; align-items: center; gap: 12px; color: var(--subtle); font-size: 12px; margin: 20px 0; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- dashboard ---------- */
.hero-title { font-size: 11.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: #c4a7ff; display: flex; align-items: center; gap: 8px; }
.hero-headline { margin-top: 14px; font-size: clamp(28px, 4vw, 42px); font-weight: 750; letter-spacing: -0.035em; line-height: 1.08; max-width: 640px; }
.hero-headline em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 14px; font-size: 16px; color: var(--text-soft); max-width: 560px; }
.hero-support { margin-top: 8px; color: var(--muted); max-width: 560px; }
.hero-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.benefit-card { display: flex; flex-direction: column; gap: 10px; }
.benefit-card .stat-icon { width: 38px; height: 38px; }
.benefit-card h4 { font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.benefit-card p { color: var(--muted); font-size: 13.5px; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-card h3 { font-size: 20px; letter-spacing: -0.02em; }
.cta-card p { margin-top: 6px; color: var(--muted); max-width: 520px; }
.ai-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- generator ---------- */
.stepper { display: flex; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; }
.step-item { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); color: var(--muted); cursor: pointer; min-width: 0; transition: all 0.15s; font: inherit; text-align: left; }
.step-item:hover { border-color: var(--border-strong); }
.step-num { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.07); color: var(--muted); letter-spacing: 0.02em; }
.step-label { font-size: 13.5px; font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-item.current { background: var(--primary-soft); border-color: rgba(124, 58, 237, 0.5); color: #fff; }
.step-item.current .step-num { background: var(--gradient); color: #fff; }
.step-item.done .step-num { background: var(--success-soft); color: #4ade80; }
.step-item.done { color: var(--text-soft); }
.step-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); margin-bottom: 24px; overflow: hidden; }
.step-bar > span { display: block; height: 100%; width: 20%; background: var(--gradient); border-radius: 3px; transition: width 0.3s; }
.step-head { margin-bottom: 22px; }
.step-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.step-head p { margin-top: 5px; color: var(--muted); }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.wizard-nav .spacer { flex: 1; }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.template-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; margin: 0; }
.template-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.template-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.template-thumb { position: relative; aspect-ratio: 8 / 5; background: #0b1322; overflow: hidden; border-bottom: 1px solid var(--border); }
.template-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.template-meta { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 6px; }
.template-name { font-weight: 650; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.template-actions { padding: 12px 16px 16px; display: flex; gap: 8px; margin-top: auto; }
.template-actions .button { flex: 1; }
.template-card .check-mark { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; display: none; place-items: center; background: var(--gradient); color: #fff; box-shadow: 0 6px 16px -4px rgba(124, 58, 237, 0.8); }
.template-card .selected-badge { display: none; }
.template-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2), var(--shadow); }
.template-card.selected .check-mark { display: grid; }
.template-card.selected .selected-badge { display: inline-flex; }
.template-card:focus-within { outline: 2px solid var(--primary-hover); outline-offset: 2px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: inline-flex; align-items: center; gap: 10px; padding: 9px 15px 9px 11px; border-radius: 12px; border: 1.5px solid var(--border); background: rgba(255, 255, 255, 0.03); color: var(--text-soft); font: inherit; font-size: 13.5px; font-weight: 560; cursor: pointer; transition: all 0.15s; }
.swatch:hover { border-color: var(--border-strong); color: var(--text); }
.swatch.selected { border-color: var(--primary); background: var(--primary-soft); color: #fff; }
.swatch-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); flex: none; }
.swatch-custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #ef4444); border: 0; }
.color-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.preview-bar { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; }
.preview-bar .button { margin-left: auto; }
.preview-frame-wrap { border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.preview-frame { display: block; width: 100%; height: 520px; border: 0; background: #fff; }
.preview-placeholder { padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 12px; }

.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.summary-item { padding: 14px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.summary-item:nth-child(odd) { border-right: 1px solid var(--border); }
.summary-item:nth-last-child(-n+2) { border-bottom: 0; }
.summary-item > span { display: block; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 4px; }
.summary-item strong { font-weight: 580; font-size: 14px; word-break: break-word; }
.summary-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(255, 255, 255, 0.3); }

.progress-panel { text-align: center; padding: 34px 26px; }
.progress-panel h2 { font-size: 20px; }
.progress-list { list-style: none; margin: 26px auto 0; padding: 0; max-width: 360px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.progress-step { display: flex; align-items: center; gap: 13px; padding: 9px 12px; border-radius: 10px; color: var(--subtle); font-size: 14.5px; transition: all 0.2s; }
.progress-step .p-ico { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.14); display: grid; place-items: center; flex: none; color: transparent; }
.progress-step.active { color: var(--text); background: var(--primary-soft); }
.progress-step.active .p-ico { border-color: rgba(255, 255, 255, 0.15); border-top-color: var(--primary-hover); animation: spin 0.8s linear infinite; }
.progress-step.done { color: var(--text-soft); }
.progress-step.done .p-ico { background: var(--success-soft); border-color: rgba(34, 197, 94, 0.5); color: #4ade80; }
.progress-step.done .p-ico .icon { width: 12px; height: 12px; stroke-width: 3; }
.progress-step.failed { color: #fca5a5; }

.result-card { text-align: center; padding: 44px 24px; }
.result-icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--success-soft); color: #4ade80; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.06); }
.result-icon.bad { background: var(--danger-soft); color: #f87171; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.06); }
.result-icon .icon { width: 32px; height: 32px; stroke-width: 2.2; }
.result-card h1 { font-size: 26px; letter-spacing: -0.025em; }
.result-card p { color: var(--muted); margin-top: 8px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

.page-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.page-filter .input-group { flex: 1; min-width: 220px; max-width: 380px; }

/* ---------- admin: template manager ---------- */
.admin-template-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.admin-template-card .template-meta { padding: 16px 18px 4px; }
.admin-template-card .template-actions { padding: 14px 18px 18px; flex-wrap: wrap; }
.admin-template-card .template-actions .button { flex: 0 0 auto; }
.usage { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.guide h3 { font-size: 11px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.guide h3:first-of-type { margin-top: 14px; }
.guide p { margin-bottom: 8px; color: var(--muted); font-size: 13.5px; }
.guide code { display: inline-block; margin: 2px 2px 2px 0; }
.thumb-sm { max-width: 220px; border-radius: 10px; border: 1px solid var(--border); }

/* ---------- auth (split screen) ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand {
  position: relative; overflow: hidden; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  background:
    radial-gradient(800px 420px at 85% -10%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(168, 85, 247, 0.25), transparent 60%),
    var(--sidebar);
  border-right: 1px solid var(--border);
}
.auth-brand .sidebar-brand { padding: 0; }
.auth-headline { font-size: clamp(32px, 3.6vw, 48px); font-weight: 760; letter-spacing: -0.04em; line-height: 1.06; max-width: 520px; }
.auth-headline em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lead { margin-top: 16px; font-size: 16.5px; color: var(--text-soft); max-width: 460px; }
.auth-points { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points .stat-icon { flex: none; }
.auth-points strong { display: block; font-size: 14.5px; }
.auth-points span { color: var(--muted); font-size: 13.5px; }
.auth-foot { color: var(--subtle); font-size: 12.5px; }
.auth-panel { display: grid; place-items: center; padding: 40px 28px; }
.auth-form { width: min(420px, 100%); }
.auth-form h1 { font-size: 26px; letter-spacing: -0.03em; }
.auth-form .lead { margin: 8px 0 26px; color: var(--muted); }
.auth-alt { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-mobile-brand { display: none; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 6px; cursor: pointer; line-height: 0; border-radius: 6px; }
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.pw-wrap .input { padding-right: 42px; }
.legal { max-width: 720px; margin: 0 auto; padding: 56px 24px; }
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal h2 { font-size: 17px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-soft); margin-bottom: 10px; }

/* ---------- error page ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { text-align: center; max-width: 440px; }
.error-code { font-size: 72px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-card h1 { font-size: 22px; margin-top: 14px; }
.error-card p { color: var(--muted); margin: 10px 0 24px; }

/* ---------- help ---------- */
.doc-steps { counter-reset: d; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.doc-steps li { counter-increment: d; display: flex; gap: 14px; }
.doc-steps li::before { content: counter(d); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--primary-soft); color: #c4a7ff; }
.doc-steps strong { display: block; }
.doc-steps span { color: var(--muted); font-size: 13.5px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 580; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) and (min-width: 821px) {
  /* tablet: compact icon sidebar */
  .app-shell { grid-template-columns: var(--sidebar-w-compact) minmax(0, 1fr); }
  .sidebar { padding: 16px 10px; align-items: center; }
  .brand-text, .nav-label, .nav-section, .user-meta, .sidebar-foot .nav-item .nav-label { display: none; }
  .sidebar-brand { padding: 4px 0 16px; justify-content: center; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .nav-item.active::before { left: -10px; }
  .side-nav { width: 100%; margin: 0; padding: 0; gap: 4px; align-items: stretch; }
  .sidebar-foot { width: 100%; align-items: center; }
  .user-card { padding: 6px; background: none; border: 0; }
  .nav-section-rule { display: block; height: 1px; background: var(--border); margin: 10px 6px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 26px 22px 56px; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-pop); }
  body.drawer-open .sidebar { transform: none; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(3, 6, 14, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  body.drawer-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  body.drawer-open { overflow: hidden; }
  .button.menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .page { padding: 22px 16px 56px; }
  .page-title { font-size: 23px; }
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .color-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-mobile-brand { display: flex; margin-bottom: 26px; }
  .stepper .step-label { display: none; }
  .stepper .step-item { justify-content: center; padding: 10px 6px; }
  .stepper .step-item.current .step-label { display: block; }
  .stepper .step-item.current { flex: 2.4; justify-content: flex-start; padding-left: 12px; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .summary { grid-template-columns: minmax(0, 1fr); }
  .summary-item:nth-child(odd) { border-right: 0; }
  .summary-item:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .alert-list { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  .card-flush { padding: 0; }
  .page-header { margin-bottom: 20px; }
  .hero-actions .button, .result-actions .button { flex: 1 1 100%; }
  .preview-frame { height: 420px; }
  .toasts { right: 16px; left: 16px; top: 70px; width: auto; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .template-grid { grid-template-columns: minmax(0, 1fr); }
  .wizard-nav .button { flex: 1; }
  .cta-card .button { width: 100%; }
}

/* mobile tables become stacked cards so nothing scrolls sideways */
@media (max-width: 760px) {
  .table.stack-mobile thead { display: none; }
  .table.stack-mobile, .table.stack-mobile tbody, .table.stack-mobile tr, .table.stack-mobile td { display: block; width: 100%; }
  .table.stack-mobile tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .table.stack-mobile tbody tr:last-child { border-bottom: 0; }
  .table.stack-mobile td { padding: 3px 0; border: 0; display: flex; justify-content: space-between; gap: 14px; align-items: center; text-align: right; }
  .table.stack-mobile td::before { content: attr(data-label); color: var(--subtle); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; text-align: left; flex: none; }
  .table.stack-mobile td.col-main { display: block; text-align: left; padding-bottom: 8px; }
  .table.stack-mobile td.col-main::before { display: none; }
  .table.stack-mobile td.col-actions { justify-content: flex-end; padding-top: 10px; }
  .table.stack-mobile td.col-actions::before { display: none; }
  .table.stack-mobile .truncate { max-width: 100%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* ================= Monetization: wallet, plans, dashboard value blocks, wizard extras ================= */
.section-gap-sm { margin-top: 16px; margin-bottom: 4px; }
.wallet-card { display: flex; flex-direction: column; gap: 2px; margin: 4px 10px 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--primary-soft); border: 1px solid rgba(99,102,241,.3); color: var(--text); text-decoration: none; }
.wallet-card:hover { border-color: var(--primary); }
.wallet-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.wallet-main { font-size: 14px; letter-spacing: -0.01em; }
.wallet-sub { font-size: 11px; color: var(--muted); }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--primary-soft); border: 1px solid rgba(99,102,241,.3); color: var(--text); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.credit-pill:hover { border-color: var(--primary); }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: stretch; margin-top: 8px; }
.pack-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 900px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 20px 20px; }
.plan-card + .plan-card { margin-top: 0; }
.plan-popular { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 18px 50px -20px rgba(99,102,241,.6); background: linear-gradient(180deg, rgba(99,102,241,.12), var(--card) 40%); }
.plan-current { border-color: var(--success); }
.plan-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; background: var(--gradient); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.plan-name { font-size: 15px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .08em; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price strong { font-size: 38px; letter-spacing: -0.03em; }
.plan-price span { color: var(--muted); font-size: 13px; }
.plan-credits { font-weight: 600; }
.plan-per { color: var(--muted); font-size: 12.5px; min-height: 18px; }
.plan-features { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; gap: 9px; flex: 1; }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-soft); }
.plan-features .icon { color: var(--success); flex: none; margin-top: 2px; }

.progress-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--gradient); border-radius: inherit; transition: width .4s; }

.unlock-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-color: rgba(139,92,246,.35); background: linear-gradient(120deg, rgba(139,92,246,.10), var(--card)); }
.unlock-card h3 { font-size: 18px; } .unlock-card p { color: var(--muted); margin-top: 4px; }
.byok-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.byok-card p { color: var(--muted); margin-top: 6px; max-width: 560px; }
.value-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.value-copy h2 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; }
.value-copy > p { margin-top: 10px; color: var(--muted); max-width: 540px; }
.flow-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.flow-steps li { display: flex; gap: 12px; align-items: flex-start; }
.flow-steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-hover); font-weight: 700; font-size: 13px; }
.flow-steps small { display: block; color: var(--muted); }
.value-list { padding: 20px; border-radius: var(--radius); background: var(--field); border: 1px solid var(--border); }
.value-list-title { font-size: 11px; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.value-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.value-list li { display: flex; gap: 8px; align-items: center; } .value-list li .icon { color: var(--success); }
.value-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

.ready-list { list-style: none; padding: 0; margin: 16px auto 0; display: inline-grid; gap: 8px; text-align: left; }
.ready-list li { display: flex; gap: 8px; align-items: center; } .ready-list .icon { color: var(--success); }

.credit-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--primary-soft); border: 1px solid rgba(99,102,241,.3); }
.credit-panel-locked { background: var(--warning-soft); border-color: rgba(245,158,11,.35); }
.advanced > summary { cursor: pointer; font-weight: 600; color: var(--text-soft); padding: 6px 0; }
.nav-editor { display: grid; gap: 14px; margin-top: 14px; }
.nav-group { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); display: grid; gap: 10px; }
.nav-group-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav-row { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 8px; align-items: center; }
.nav-tab { font-size: 12.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.nav-btns { display: inline-flex; gap: 2px; }

@media (max-width: 900px) {
  .value-card { grid-template-columns: 1fr; }
  .nav-row { grid-template-columns: 1fr 1fr; }
  .flow-steps { grid-template-columns: 1fr; }
}

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; cursor: pointer; background: var(--field); }
.chip input { accent-color: var(--primary); }

/* 8-step wizard: the <li> wrappers must be allowed to shrink */
.stepper > li { flex: 1 1 0; min-width: 0; display: flex; }
.stepper > li > .step-item { width: 100%; }
@media (max-width: 820px) { .stepper > li:has(.step-item.current) { flex: 2.6 1 0; } }

/* Simplified member area */
.file-list { display: grid; gap: 12px; margin: 22px auto 0; max-width: 640px; text-align: left; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); }
.file-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-hover); flex: none; }
.file-head { font-size: 11px; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.file-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.preview-tabs { margin: 0 0 14px; }
details.card.advanced > summary { padding: 2px 0; }

/* spacing between the fields of a single-page form step */
.step > .field, .step > .form-grid, .step > .alert { margin-bottom: 16px; }
.step > .form-grid > .field { margin-bottom: 0; }

/* Bulk generator */
.qty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; max-width: 700px; }
.qty-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--card); cursor: pointer; transition: all .15s; }
.qty-card input { position: absolute; opacity: 0; pointer-events: none; }
.qty-card:hover { border-color: var(--primary); }
.qty-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.qty-num { font-size: 34px; font-weight: 750; letter-spacing: -0.03em; }
.qty-label { font-size: 13px; color: var(--muted); }
.radio-stack { display: grid; gap: 8px; }
.anchor-list { display: grid; gap: 10px; margin-bottom: 12px; }
.anchor-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.bulk-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.bulk-toolbar .select { max-width: 260px; }
.page-rows { display: grid; gap: 12px; }
.page-row { display: grid; grid-template-columns: 90px 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); }
.page-row-num { font-size: 11px; letter-spacing: .1em; font-weight: 700; color: var(--muted); }
.page-row-thumb { width: 96px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #e5e7eb; }
.page-cards { display: grid; gap: 16px; }
.page-card + .page-card { margin-top: 0; }
.summary-box { margin-top: 6px; }
.summary-title { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
@media (max-width: 700px) {
  .anchor-row { grid-template-columns: 1fr; }
  .page-row { grid-template-columns: 1fr; }
  .page-row-thumb { width: 100%; height: 90px; }
}

/* bulk: content mode cards */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.mode-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1.5px solid var(--border-strong); border-radius: var(--radius); background: var(--card); cursor: pointer; transition: all .15s; }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.mode-title { font-weight: 700; }
.mode-text { font-size: 13px; color: var(--muted); }
.qty-card.disabled { opacity: .4; cursor: not-allowed; }

/* ===== Quick Create: prompt, uploads, anchors, bulk table ===== */
.prompt-box { min-height: 150px; font-size: 16px; line-height: 1.55; }
.example-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -4px 0 14px; }
.chip-btn { border: 1px solid var(--border-strong); background: var(--field); color: var(--text-soft); border-radius: 999px; padding: 5px 13px; font: inherit; font-size: 13px; font-weight: 560; cursor: pointer; transition: all .15s; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.uploader-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.uploader-title { font-weight: 650; margin-bottom: 8px; }
.mode-pick { display: flex; gap: 6px 20px; flex-wrap: wrap; margin: 0 0 12px; }
.mode-pick .check { margin: 0; }
.mode-pick .check.disabled { opacity: .45; cursor: not-allowed; }
.uploader-urlbox[hidden], .uploader-filebox[hidden] { display: none; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; min-height: 190px; display: grid; place-items: center; text-align: center; cursor: pointer; background: var(--field); transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--primary); outline: none; }
.dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.has-file { border-style: solid; cursor: default; padding: 14px; }
.dropzone.is-off { opacity: .6; cursor: not-allowed; }
.dropzone.is-busy { cursor: progress; }
.dz-empty { display: grid; gap: 8px; justify-items: center; }
.dz-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.dz-help { margin: 0; }
.dz-filled { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; text-align: left; }
.dz-preview { width: 120px; height: 90px; object-fit: contain; border-radius: 10px; border: 1px solid var(--border); background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 50% / 16px 16px; }
.dz-info { display: grid; gap: 6px; min-width: 0; }
.dz-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dz-busy { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.dz-busy .spinner { width: 18px; height: 18px; }
.uploader-url { margin-top: 12px; }
.uploader-url > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.uploader-error { margin-top: 8px; }
.segmented label.disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 520px) { .dz-filled { grid-template-columns: 1fr; } .dz-preview { width: 100%; height: 130px; } }

/* bulk: template pool + compact page table */
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.pool-card { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; margin: 0; }
.pool-card input { position: absolute; opacity: 0; pointer-events: none; }
.pool-card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; display: block; background: #e5e7eb; }
.pool-name { padding: 7px 9px; font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-check { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: var(--gradient); color: #fff; }
.pool-card:hover { border-color: var(--primary); }
.pool-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pool-card.selected .pool-check { display: grid; }
.pool-card:focus-within { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.pg-table { display: grid; gap: 8px; margin-top: 14px; }
.pg-head, .pg-line { --c: 34px minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 2fr); display: grid; grid-template-columns: var(--c); gap: 10px; align-items: center; }
.show-amp .pg-head, .show-amp .pg-line { --c: 34px minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 2fr); }
.pg-row .input.is-bad { border-color: var(--danger, #dc2626); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.plain-list { margin: 8px 0 0; padding-left: 18px; }
.plain-list li { margin: 2px 0; }
.pg-head { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 0 10px; }
.amp-col, .hero-col, .pg-cell.amp-col, .pg-cell.hero-col { display: none; }
.show-amp .amp-col, .show-hero .hero-col, .show-amp .pg-cell.amp-col, .show-hero .pg-cell.hero-col { display: block; }
.pg-row { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); padding: 10px; }
.pg-num { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.pg-cell { display: block; min-width: 0; margin: 0; }
.pg-lab { display: none; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pg-ov { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.hero-mini { display: inline-flex; align-items: center; gap: 6px; }
.hero-mini img { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.summary-request { margin: 0 0 14px; padding: 12px 14px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--text-soft); }
@media (max-width: 820px) {
  .pg-head { display: none; }
  .pg-head, .pg-line, .show-amp .pg-line, .show-hero .pg-line, .show-amp.show-hero .pg-line { --c: 30px minmax(0, 1fr); }
  .pg-line { align-items: start; }
  .pg-cell { grid-column: 2; }
  .pg-num { grid-row: 1; padding-top: 10px; }
  .pg-more { grid-column: 3; grid-row: 1; }
  .pg-lab { display: block; }
  .show-amp .pg-cell.amp-col, .show-hero .pg-cell.hero-col { display: block; }
}

/* Create Landing Page: one page */
.create-one .field { margin-bottom: 22px; }
.create-one .field:last-child { margin-bottom: 0; }
.create-one .form-section-title { display: flex; align-items: center; margin: 0 0 18px; font-size: 18px; }
.step-pill { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gradient); color: #fff; font-size: 13px; font-weight: 700; margin-right: 10px; flex: none; }
.theme-block { margin-top: 26px; }
.swatch-auto { background: conic-gradient(#7c3aed, #2563eb, #16a34a, #d4a017, #dc2626, #7c3aed); }
.domain-field { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--field); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.domain-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.domain-prefix { display: flex; align-items: center; padding: 0 12px; background: var(--primary-soft); color: var(--muted); font-weight: 650; font-size: 14px; user-select: none; border-right: 1px solid var(--border); white-space: nowrap; }
.domain-field .input { border: 0; border-radius: 0; box-shadow: none; background: transparent; flex: 1; min-width: 0; }
.has-error .domain-field { border-color: var(--danger, #dc2626); }
.kw-row { margin-bottom: 12px; }
.kw-main { display: flex; gap: 8px; align-items: center; }
.kw-main .input { flex: 1; min-width: 0; }
.kw-link { margin-top: 8px; }
.link-btn { background: none; border: 0; padding: 4px 0; margin-top: 4px; font: inherit; font-size: 13.5px; font-weight: 650; color: var(--primary); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn[hidden], .kw-link[hidden], .kw-remove[hidden] { display: none; }
.field-label.small { font-size: 12px; }
.regen-box { width: 100%; text-align: left; display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--field); }
.regen-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.regen-item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* live template + theme preview on the Create page */
.theme-preview { margin-top: 26px; }
.theme-preview .preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.theme-preview .preview-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-preview .preview-frame-wrap { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #e5e7eb; }
.theme-preview .preview-frame { display: block; width: 100%; border: 0; background: #fff; transition: max-width .2s; }
.theme-preview .preview-frame-wrap.is-mobile { background: repeating-linear-gradient(45deg, #eef0f4 0 10px, #e5e7eb 10px 20px); }
.theme-preview .preview-frame-wrap.is-mobile .preview-frame { max-width: 390px; margin: 0 auto; box-shadow: 0 0 0 1px var(--border), 0 10px 40px rgba(0, 0, 0, .15); }
.preview-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .6); z-index: 2; pointer-events: none; }
.preview-loading[hidden] { display: none; }
@media (max-width: 640px) { .theme-preview .preview-tools { margin-left: 0; } .theme-preview .preview-frame { height: 440px !important; } }

/* toasts sit at the top so they never cover the wizard buttons (Back / Continue) at the bottom of the page */
.toasts .toast { pointer-events: auto; }

/* segmented controls wrap on narrow screens instead of pushing the page sideways */
@media (max-width: 640px) {
  .segmented { display: grid; grid-auto-flow: row; grid-template-columns: 1fr; width: 100%; max-width: 100%; }
  .segmented span { white-space: normal; text-align: center; }
}

/* =====================================================================
   RAFAELA - Create page: brand, template carousel, theme, images, preview modal
   ===================================================================== */
.brand-text .brand-name { display: block; }
.brand-text .brand-sub { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.site-brand .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-brand .brand-name { font-size: 17px; font-weight: 800; letter-spacing: .06em; }
@media (max-width: 1100px) { .site-brand .brand-sub { display: none; } }
@media (max-width: 1400px) { .site-link { padding: 8px 9px; font-size: 13.5px; } .sitebar-in { gap: 14px; padding: 0 18px; } .site-nav { gap: 0; } }

.create-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.create-brand-name { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .22em; color: var(--primary); background: var(--primary-soft); padding: 5px 13px; border-radius: 999px; }
.create-brand-sub { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; letter-spacing: -0.025em; margin: 12px 0 6px; }
.create-tagline { margin: 0; font-size: 16px; color: var(--muted); max-width: 640px; }
.create-credit { flex: none; padding-top: 4px; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-bar .link-btn { margin: 0; white-space: nowrap; }

/* template carousel: ONE horizontal row */
.carousel { position: relative; }
.car-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; padding: 6px 4px 14px; margin: 0 -4px; scrollbar-width: none; -ms-overflow-style: none; outline: none; cursor: grab; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.car-track.dragging * { pointer-events: none; }
.tpl-card { position: relative; flex: 0 0 calc((100% - 48px) / 3.5); min-width: 210px; max-width: 340px; scroll-snap-align: start; display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; margin: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tpl-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tpl-thumb { display: block; aspect-ratio: 8 / 5; background: #14141d; overflow: hidden; border-bottom: 1px solid var(--border); }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; user-select: none; -webkit-user-drag: none; }
.tpl-meta { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px 13px; }
.tpl-name { font-weight: 650; font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-cat { font-size: 12.5px; color: var(--muted); }
.tpl-check { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: none; place-items: center; background: var(--gradient); color: #fff; box-shadow: 0 6px 16px -4px rgba(124, 58, 237, .8); }
.tpl-card.selected { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124, 58, 237, .16), var(--shadow); }
.tpl-card.selected .tpl-check { display: grid; }
.tpl-card:focus-within { outline: 2px solid var(--primary-hover); outline-offset: 2px; }

/* Create page: Auto Generate | Manual Setup, template card actions, reuse confirmation */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin: 0 0 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.mode-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.mode-tab strong { font-size: 15px; color: var(--text); }
.mode-tab small { font-size: 12px; line-height: 1.35; }
.mode-tab:hover { background: var(--primary-soft); }
.mode-tab.is-on { background: var(--gradient); color: #fff; box-shadow: 0 8px 20px -10px rgba(124, 58, 237, .9); }
.mode-tab.is-on strong, .mode-tab.is-on small { color: #fff; }
.mode-tab:focus-visible { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.mode-help { margin: 0 2px 16px; }
.manual-only[hidden], .auto-only[hidden] { display: none !important; }
.tpl-used { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: rgba(15, 15, 22, .82); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.tpl-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 13px; }
.tpl-prev { border: 1px solid var(--border-strong); background: transparent; color: var(--text); border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tpl-prev:hover { background: var(--primary-soft); color: var(--primary); }
.tpl-select { font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.tpl-select .t-on { display: none; }
.tpl-card.selected .tpl-select { background: var(--gradient); color: #fff; }
.tpl-card.selected .tpl-select .t-on { display: inline; }
.tpl-card.selected .tpl-select .t-off { display: none; }
.loc-box { margin-top: 4px; }
.loc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.loc-note { margin: 8px 2px 0; }
.pl-loc .g-input { min-width: 150px; }
@media (max-width: 560px) { .loc-grid { grid-template-columns: minmax(0, 1fr); } }
.reuse-box { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid #d49a1a; background: rgba(212, 154, 26, .12); font-size: 13.5px; }
.reuse-box[hidden] { display: none; }
.reuse-box .g-check { margin-top: 8px; }
@media (max-width: 560px) { .mode-switch { grid-template-columns: 1fr; } }
.car-btn { position: absolute; top: 36%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: #1a1a24; color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: opacity .15s, background .15s; }
.car-btn:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.car-prev { left: -14px; } .car-next { right: -14px; }
@media (max-width: 760px) {
  .tpl-card { flex-basis: 84%; min-width: 0; max-width: none; scroll-snap-align: center; }
  .car-btn { display: none; }
  .car-track { scroll-snap-type: x mandatory; }
}

.theme-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.theme-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.swatch[hidden] { display: none; }
.swatches-sm .swatch { padding: 6px 11px 6px 8px; font-size: 12.5px; border-radius: 10px; }
.swatches-sm .swatch-dot { width: 16px; height: 16px; }
.bad-text { color: #f87171; } .ok-text { color: #4ade80; }

/* images */
.img-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.img-mode { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
.img-mode:hover { border-color: var(--border-strong); }
.img-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.img-mode.selected { border-color: var(--primary); background: var(--primary-soft); }
.img-mode.disabled { opacity: .5; cursor: not-allowed; }
.img-mode:focus-within { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.im-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 4px; }
.img-mode.selected .im-ico { background: var(--gradient); color: #fff; }
.im-title { font-weight: 650; font-size: 14px; color: var(--text); }
.im-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.img-panel { margin-top: 16px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--field); }
.img-panel[hidden] { display: none; }
.img-panel-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.url-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.url-preview[hidden] { display: none; }
.url-preview img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #eee; }
@media (max-width: 860px) { .img-modes { grid-template-columns: repeat(2, 1fr); } .img-panel-extra { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .img-modes { grid-template-columns: 1fr; } }

/* Preview Design modal */
.modal-preview { width: min(1180px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 18px 20px; }
.mp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.mp-frame-wrap { position: relative; flex: 1; min-height: 320px; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: #e5e7eb; }
.mp-frame { display: block; width: 100%; height: min(66vh, 720px); border: 0; background: #fff; margin: 0 auto; }
.mp-frame-wrap.is-mobile { background: repeating-linear-gradient(45deg, #eef0f4 0 10px, #e5e7eb 10px 20px); }
.mp-frame-wrap.is-mobile .mp-frame { width: 390px; max-width: 100%; box-shadow: 0 0 0 1px var(--border), 0 10px 40px rgba(0, 0, 0, .18); }
.mp-actions { margin-top: 14px; }
@media (max-width: 640px) { .modal-preview { padding: 14px; } .mp-frame { height: 56vh; } }

/* template catalog + Coming Soon */
.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.cat-filters a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13.5px; font-weight: 560; color: var(--text-soft); text-decoration: none; background: var(--card); }
.cat-filters a.active, .cat-filters a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cat-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cat-card .tpl-meta { padding: 14px 16px 6px; }
.cat-actions { display: flex; gap: 8px; padding: 6px 16px 16px; margin-top: auto; flex-wrap: wrap; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cs-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cs-card.is-active { border-color: rgba(124, 58, 237, .45); }
.cs-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.cs-card h3 { margin: 4px 0 0; font-size: 16.5px; letter-spacing: -0.01em; }
.cs-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.cs-status { margin-top: auto; padding-top: 8px; }
.cs-status .button[disabled] { opacity: .55; cursor: not-allowed; }
.zip-box { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--field); }
.zip-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.zip-list li { margin: 2px 0; }
.link-btn { align-self: flex-start; text-align: left; }

.gate-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 16px; }
.gate-steps li { display: flex; gap: 14px; align-items: flex-start; }
.gate-steps li > div { display: flex; flex-direction: column; gap: 2px; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* =====================================================================
   RAFAELA generator panel (compact, centered, dark) - one form for 1..N landing pages
   ===================================================================== */
.gen-wrap { display: flex; justify-content: center; padding: 8px 0 40px; }
.gen-panel { width: 100%; max-width: 880px; background: #0a0a0f; border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px; padding: 22px 22px 26px; box-shadow: 0 30px 80px -40px rgba(124, 58, 237, .45); }
.gen-form { display: block; }
.gen-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gen-brand { font-size: 20px; font-weight: 800; letter-spacing: .06em; color: #fff; }
.gen-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.gen-pill { flex: none; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px; font-weight: 650; color: #e5e7eb; white-space: nowrap; }
.gen-tagline { margin: 10px 0 18px; font-size: 13.5px; color: var(--muted); }
.g-field { margin: 0 0 16px; }
.g-field.has-error .g-input { border-color: #f87171; }
.g-label { display: block; font-size: 14px; font-weight: 650; color: #fff; margin: 0 0 7px; }
.g-label .req { color: #c4a7ff; }
.g-input { width: 100%; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 12px 18px; font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.g-input::placeholder { color: #8b93a3; }
.g-input:focus { border-color: var(--primary-hover); box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
.g-area { border-radius: 18px; resize: vertical; min-height: 92px; line-height: 1.55; }
.g-select { appearance: none; padding-right: 30px; background: #0a0a0f; }
.g-select option { background: #0f1729; color: #fff; }
.g-help { margin: 7px 2px 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.g-count { margin-left: 6px; font-size: 12.5px; }
.g-check { display: flex; align-items: center; gap: 9px; margin: 10px 2px 0; font-size: 13.5px; color: #e5e7eb; cursor: pointer; }
.g-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.g-rule { border: 0; border-top: 1px solid rgba(255, 255, 255, .12); margin: 20px 0; }
.g-radios { display: flex; gap: 22px; flex-wrap: wrap; margin: 2px 0 4px; }
.g-radio { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14.5px; color: #fff; }
.g-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.g-radio-dot { width: 19px; height: 19px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); display: inline-grid; place-items: center; transition: border-color .15s; }
.g-radio input:checked + .g-radio-dot { border-color: #fff; }
.g-radio input:checked + .g-radio-dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.g-radio input:focus-visible + .g-radio-dot { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.pt-row { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 10px; align-items: center; margin-top: 8px; }
.pt-dom { font-size: 13px; color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.per-title[hidden] { display: none; }
.auto-plan[hidden], #manualBox[hidden] { display: none; }
.plan-details { margin-top: 8px; }
.plan-details summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--primary-hover); }
.plan-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.plan-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; }
.plan-dom { color: #fff; font-weight: 600; } .plan-arrow { color: var(--muted); } .plan-tpl { color: #e5e7eb; }
.plan-list .link-btn { margin: 0 0 0 auto; }
.swatches-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches-dots .swatch { position: relative; padding: 0; width: 38px; height: 38px; border-radius: 50%; justify-content: center; background: transparent; border: 2px solid rgba(255, 255, 255, .22); }
.swatches-dots .swatch-dot { width: 26px; height: 26px; border: 0; }
.swatches-dots .swatch-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.swatches-dots .swatch-tick { position: absolute; display: none; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.swatches-dots .swatch.selected { border-color: var(--primary-hover); background: transparent; box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.swatches-dots .swatch.selected .swatch-tick { display: block; }
.swatches-dots .swatch[data-theme="black"] .swatch-dot { border: 1px solid rgba(255, 255, 255, .35); }
.style-pills, .cta-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.style-pill { position: relative; margin: 0; cursor: pointer; }
.style-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-pill span { display: inline-block; padding: 7px 15px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .24); font-size: 13.5px; font-weight: 560; color: #e5e7eb; transition: all .15s; }
.style-pill input:checked + span { background: var(--primary-soft); border-color: var(--primary-hover); color: #fff; }
.style-pill input:focus-visible + span { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.adv { border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; margin: 20px 0; background: rgba(255, 255, 255, .02); }
.adv-sum { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; color: #fff; font-size: 15px; }
.adv-sum::-webkit-details-marker { display: none; }
.adv-chev { margin-left: auto; transition: transform .2s; color: var(--muted); }
.adv[open] .adv-chev { transform: rotate(90deg); }
.adv-body { padding: 0 16px 18px; }
.adv-sec { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.adv-h { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.adv-h .opt { font-weight: 450; color: var(--subtle); font-size: 12px; margin-left: 6px; }
.cta-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cta-f[hidden], .cta-fields[hidden] { display: none; }
.ov-rows { display: grid; gap: 12px; }
.ov-row { border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 14px; }
.ov-dom { font-weight: 650; font-size: 13.5px; margin-bottom: 8px; color: #fff; }
.ov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ov-grid label { display: block; font-size: 12px; color: var(--muted); }
.ov-grid .g-input { margin-top: 4px; padding: 8px 12px; font-size: 13.5px; border-radius: 12px; }
#ovSection[hidden] { display: none; }
.credit-box { margin: 20px 0 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.credit-box.is-low { border-color: rgba(248, 113, 113, .55); }
.cb-row { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; font-weight: 600; color: #fff; }
.cb-row strong { font-size: 16px; }
.cb-note { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.cb-note a { color: var(--primary-hover); font-weight: 650; }
.g-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; border: 0; border-radius: 999px; background: var(--gradient); color: #fff; font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; box-shadow: 0 14px 34px -14px rgba(124, 58, 237, .9); transition: transform .12s, opacity .15s; }
.g-btn:hover { transform: translateY(-1px); }
.g-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
#genBox .small-links { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .gen-panel { padding: 16px 14px 20px; border-radius: 18px; }
  .cta-fields, .ov-grid { grid-template-columns: 1fr; }
  .pt-row { grid-template-columns: 1fr; gap: 4px; }
}

.gen-form .kw-row { margin-bottom: 2px; }

/* simplified options: Gambar Website + footer buttons */
.g-radios-sub { margin: 0 0 12px; }
.g-radio.disabled { opacity: .5; cursor: not-allowed; }
.img-sub[hidden] { display: none; }
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.up-grid .uploader { min-width: 0; }
.g-check-lg { font-size: 15px; font-weight: 650; color: #fff; margin-top: 2px; }
.g-check-lg input { width: 19px; height: 19px; }
#footerFields { margin-top: 12px; }
@media (max-width: 640px) { .up-grid { grid-template-columns: 1fr; } }

/* Logo Website */
.logo-sub[hidden] { display: none; }
.logo-prev { width: auto !important; max-width: 160px; height: 44px !important; object-fit: contain; background: rgba(255, 255, 255, .06); padding: 4px 8px; }
.g-label .opt { font-weight: 450; color: var(--subtle); font-size: 12.5px; }
#logoField .uploader { max-width: 360px; }

#logoField .uploader-title { display: none; }

/* ===== Bulk improvements: AI titles, template pool / hybrid, color per page, Review table ===== */
.title-modes { display: flex; flex-wrap: wrap; gap: 0 26px; }
.g-check.disabled { opacity: .5; cursor: not-allowed; }
.ai-titles { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.ai-titles[hidden] { display: none; }
.ai-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.ai-confirm { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .08); font-size: 13.5px; color: #fde68a; }
.ai-confirm[hidden] { display: none; }
.ai-confirm-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ok-text { color: #4ade80; } .bad-text { color: #f87171; }
.tpl-count { color: #c4b5fd; margin-left: 6px; }
#hybridHint[hidden] { display: none; }
.color-modes { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .14); }
.color-modes[hidden] { display: none; }
.swatches.is-dim { opacity: .4; }
.plan-scroll { overflow-x: auto; margin: 0 -2px; }
.plan-t { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 13px; min-width: 700px; }
.plan-t th { text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 10px 2px; white-space: nowrap; }
.plan-t td { vertical-align: top; padding: 10px; background: rgba(255, 255, 255, .04); border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); color: #e5e7eb; }
.plan-t td:first-child { border-left: 1px solid rgba(255, 255, 255, .1); border-radius: 12px 0 0 12px; width: 34px; color: var(--muted); }
.plan-t td:last-child { border-right: 1px solid rgba(255, 255, 255, .1); border-radius: 0 12px 12px 0; }
.plan-t .pl-dom { font-weight: 650; color: #fff; word-break: break-all; min-width: 110px; }
.plan-t .pl-title { min-width: 210px; } .plan-t .pl-tpl { min-width: 150px; } .plan-t .pl-col { min-width: 128px; }
.plan-t .field + .field { margin-top: 6px; }
.plan-t .ov-in { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.plan-t .ov-kw { font-size: 12.5px; color: #cbd5e1; }
.plan-t .g-select { padding-right: 26px; background: #0a0a0f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.pl-static { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #e5e7eb; line-height: 1.4; }
.pl-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.pl-prev { margin: 4px 0 0; font-size: 12px; }
.pl-colbox { display: flex; align-items: center; gap: 8px; }
.pl-colbox .g-select { flex: 1; min-width: 0; }
.pl-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); flex: none; display: inline-block; background: #444; }
.pl-badge { display: block; width: fit-content; margin: 0 0 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #cbd5e1; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; }
.pl-badge.is-manual { color: #c4b5fd; border-color: rgba(167, 139, 250, .5); background: rgba(124, 58, 237, .16); }
@media (max-width: 720px) {
  .plan-t { min-width: 0; border-spacing: 0; }
  .plan-t thead { display: none; }
  .plan-t, .plan-t tbody, .plan-t tr, .plan-t td { display: block; width: 100%; }
  .plan-t tr { margin: 0 0 12px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .03); }
  .plan-t td, .plan-t td:first-child, .plan-t td:last-child { border: 0; border-radius: 0; background: transparent; padding: 8px 12px; width: 100%; min-width: 0 !important; }
  .plan-t td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
  .plan-t td.pl-n { display: none; }
  .plan-t td.pl-dom { font-size: 14.5px; padding-top: 12px; }
  .plan-t td.pl-as { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .plan-t td.pl-as::before { width: 100%; }
  .plan-t .ov-in { font-size: 15px; }
}

.gen-panel { max-width: 960px; }
.plan-t .pl-dom { overflow-wrap: anywhere; word-break: normal; min-width: 120px; }
.plan-t .pl-title { min-width: 250px; }
.plan-t .field.pl-colbox { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.plan-t .pl-colbox .pl-dot { margin: 0; }

/* tool first: a compact introduction right above the generator */
.gen-wrap { padding: 0 0 40px; }
.gen-panel { padding: 18px 22px 24px; }
.gen-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.gen-title { margin: 0; font-size: clamp(21px, 3.2vw, 28px); font-weight: 760; letter-spacing: -.025em; line-height: 1.15; color: #fff; }
.gen-lead { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.hm-hero-sm { padding-top: 6px; }
.hm-hero-sm h1 { font-size: clamp(26px, 4vw, 38px); margin-top: 0; }
.hm-hero-sm .hm-cta { margin-top: 16px; }
@media (max-width: 640px) { .gen-intro { flex-direction: column; gap: 8px; } .page { padding-top: 18px; } }

/* footer: ownership notice + license links */
.site-foot { margin: 28px auto 0; padding: 18px 20px 26px; max-width: 1240px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid rgba(255, 255, 255, .08); }
.site-foot a { color: var(--muted); } .site-foot a:hover { color: #fff; }

/* walkthrough fixes: skip link, mobile select/label/tap-target polish */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: #111827; color: #fff; padding: 10px 14px; border-radius: 0 0 10px 0; font-weight: 600; }
.skip-link:focus { left: 0; outline: 2px solid #a78bfa; }
@media (max-width: 760px) {
  .table.stack-mobile td { flex-wrap: wrap; }
  .table.stack-mobile td.nowrap { white-space: normal; }
  .table.stack-mobile td .cell-sub { flex: 1 0 100%; text-align: right; white-space: normal; }
  .select { padding-right: 40px; text-overflow: ellipsis; background-position: right 14px center; }
  .button-sm { min-height: 40px; padding: 9px 13px; }
  .link-btn, .topbar a { min-height: 40px; display: inline-flex; align-items: center; }
}