/* =============================================================
   GOPLENTY LANDING BUILDER · Chrome styles
   gstack industrial system · zinc chrome + amber accent
   Satoshi (display) · DM Sans (body) · JetBrains Mono (labels)
   ============================================================= */

:root {
  /* Surfaces — near-black warm-neutral, gstack scale */
  --bg: #0C0C0C;            /* base */
  --bg-elev: #141414;       /* surface / cards */
  --bg-elev-2: #1A1A1A;     /* raised */
  --bg-input: #111111;      /* inputs, insets */

  /* Chrome stays neutral — amber is rare and meaningful */
  --stroke: rgba(255, 255, 255, 0.09);        /* ≈ #262626 default border */
  --stroke-strong: rgba(255, 255, 255, 0.16); /* hover / active border */
  --stroke-soft: rgba(255, 255, 255, 0.05);

  /* Amber accent — terminal-cursor warmth, used sparingly */
  --gold: #F59E0B;          /* amber-500 · primary accent (token name kept for compat) */
  --gold-hi: #FBBF24;       /* amber-400 · text accent / hover lift */
  --gold-lo: #D97706;       /* amber-600 · deep / pressed */
  --gold-glow: rgba(245, 158, 11, 0.18);

  /* Text — cool zinc ramp, neutral so the accent carries the warmth */
  --text: #FAFAFA;          /* zinc-50 · headings, strong */
  --text-2: #D4D4D8;        /* zinc-300 · body */
  --text-3: #A1A1AA;        /* zinc-400 · meta, captions */
  --text-4: #71717A;        /* zinc-500 · faint, disabled */

  --danger: #EF4444;
  --ok: #22C55E;

  /* Radii — gstack sm4 / md8 / lg12 */
  --radius-sm: 8px;         /* buttons, inputs */
  --radius: 12px;           /* cards, panels */
  --radius-lg: 16px;        /* large overlays */

  /* Type — Satoshi display, DM Sans body, JetBrains Mono data/labels */
  --serif: "Satoshi", "DM Sans", system-ui, -apple-system, sans-serif; /* display (token name kept for compat) */
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Elevation — mostly flat, depth from material + hairlines */
  --shadow-1: 0 1px 0 rgba(255,255,255,0.03) inset, 0 4px 18px rgba(0,0,0,0.45);
  --shadow-2: 0 16px 40px -12px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.03) inset;

  /* Motion — gstack easings */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,158,11,0.05), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245,158,11,0.035), transparent 60%),
    var(--bg);
}

/* gstack grain — subtle noise overlay for materiality */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: inherit; }

/* ========== LUCIDE ICONS ========== */
.lucide { stroke-width: 2; flex-shrink: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.eyebrow .lucide { width: 13px; height: 13px; }
.key-icon { display: inline-flex; align-items: center; }
.key-icon .lucide { width: 15px; height: 15px; opacity: 0.7; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; }
.demo-pill .lucide { width: 13px; height: 13px; }
.fsection-meta { display: inline-flex; align-items: center; }
.fsection-meta .lucide { width: 15px; height: 15px; color: var(--text-3); }
.gen-icon { display: inline-flex; align-items: center; }
.gen-icon .lucide { width: 16px; height: 16px; }
.image-drop .ico .lucide { width: 20px; height: 20px; color: var(--gold); opacity: 0.85; }

/* ========== TOPBAR ========== */
.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(420px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--bg);
  position: relative;
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px;
  color: var(--gold);
  display: grid; place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-name span {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.72em;
  margin-left: 5px;
}
.brand-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 5px;
}

.topbar-status { justify-self: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.015);
}
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.api-key-control {
  display: flex; gap: 8px;
  align-items: center;
  justify-self: end;
}
.provider-select select {
  appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  color: var(--text-2);
  padding: 9px 30px 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 12px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.provider-select select:focus { outline: none; border-color: var(--stroke-strong); }

.key-input-wrap {
  display: flex; align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding-left: 10px;
  min-width: 280px;
}
.key-input-wrap:focus-within { border-color: var(--stroke-strong); }
.key-icon { font-size: 12px; opacity: 0.7; margin-right: 6px; }
.key-input-wrap input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 9px 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  min-width: 0;
}
.key-input-wrap input::placeholder { color: var(--text-4); }
.key-input-wrap input:focus { outline: none; }
.key-save {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--stroke);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  padding: 9px 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.key-save:hover { color: var(--gold-hi); }

/* ========== MAIN GRID ========== */
.builder {
  display: grid;
  grid-template-columns: minmax(420px, 460px) 1fr;
  min-height: 0;
  overflow: hidden;
}

/* ========== FORM COLUMN ========== */
.form-col {
  border-right: 1px solid var(--stroke);
  overflow-y: auto;
  padding: 24px 24px 120px 24px;
  background:
    linear-gradient(180deg, rgba(201,168,76,0.025), transparent 240px),
    var(--bg);
  position: relative;
}
.form-col::-webkit-scrollbar { width: 8px; }
.form-col::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.18); border-radius: 4px; }
.form-col::-webkit-scrollbar-track { background: transparent; }

.form-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.form-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.06;
  margin: 0;
  letter-spacing: -0.02em;
  max-width: 300px;
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.ghost-btn:hover {
  border-color: var(--stroke-strong);
  color: var(--text);
  background: rgba(201,168,76,0.04);
}
.ghost-btn.small { padding: 6px 10px; font-size: 10.5px; }

/* ========== FORM SECTIONS ========== */
.fsection {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--stroke);
}
.fsection:last-child { border-bottom: 0; }

.fsection-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.fsection-num {
  width: 22px; height: 22px;
  border: 1px solid var(--stroke-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0;
}
.fsection-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.fsection-meta {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.field-grid {
  display: grid;
  gap: 12px 10px;
  grid-template-columns: 1fr 1fr;
}
.field-grid .full { grid-column: 1 / -1; }

.field {
  display: flex; flex-direction: column;
}
.field-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 6px;
}
.field-label .req { color: var(--gold); }

.input,
.textarea {
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--sans);
  transition: border-color 0.15s ease, background 0.15s ease;
  width: 100%;
}
.input:hover, .textarea:hover { border-color: var(--stroke-strong); }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--bg-elev);
}
.textarea { min-height: 70px; resize: vertical; line-height: 1.5; }

/* Color picker pair */
.color-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.color-row:hover { border-color: var(--stroke-strong); }
.color-row input[type="color"] {
  width: 28px; height: 28px; padding: 0;
  background: none; border: none; cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}
.color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input[type="color"]::-webkit-color-swatch { border: 1px solid var(--stroke-strong); border-radius: 50%; }
.color-row .hex {
  flex: 1;
  background: transparent;
  border: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
}
.color-row .hex:focus { outline: none; color: var(--text); }

/* Image upload */
.image-drop {
  position: relative;
  border: 1px dashed var(--stroke-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  min-height: 88px;
  background: var(--bg-input);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.image-drop:hover { background: var(--bg-elev); border-color: var(--gold); }
.image-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.image-drop .ico { font-size: 18px; opacity: 0.6; }
.image-drop .text { font-size: 11.5px; color: var(--text-3); letter-spacing: 0.04em; }
.image-drop .text strong { color: var(--gold); font-weight: 500; }
.image-drop.has-image {
  padding: 0;
  border-style: solid;
  overflow: hidden;
  min-height: 110px;
}
.image-drop.has-image .ico,
.image-drop.has-image .text { display: none; }
.image-drop.has-image img {
  width: 100%; height: 110px;
  object-fit: cover;
  display: block;
}
.image-drop .clear {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); font-size: 10px;
  padding: 3px 7px; border-radius: 4px;
  display: none;
}
.image-drop.has-image .clear { display: inline-block; }

/* ========== THEME PICKER ========== */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-card {
  position: relative;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 0;
  background: var(--bg-input);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.18s ease;
  text-align: left;
  color: inherit;
}
.theme-card:hover { transform: translateY(-2px); border-color: var(--stroke-strong); }
.theme-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 24px -8px rgba(201,168,76,0.4);
}
.theme-card .swatch {
  height: 56px;
  display: flex;
  align-items: stretch;
}
.theme-card .swatch > div { flex: 1; }
.theme-card .meta {
  padding: 10px 10px 12px;
}
.theme-card .tname {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}
.theme-card .tdesc {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.theme-card .badge-active {
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  display: none;
  align-items: center; justify-content: center;
  color: var(--bg);
  font-size: 11px;
}
.theme-card.active .badge-active { display: inline-flex; }

/* Theme card preview-style fonts */
.theme-card[data-theme="modern"] .tname { font-family: "Playfair Display", serif; }
.theme-card[data-theme="western"] .tname { font-family: "Rye", serif; font-size: 13px; }
.theme-card[data-theme="traditional"] .tname { font-family: "Cormorant Garamond", serif; font-style: italic; }

/* ========== DISH LIST ========== */
.dish-list {
  display: flex; flex-direction: column; gap: 10px;
}
.dish-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 12px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  position: relative;
  transition: all 0.15s ease;
}
.dish-card:hover { border-color: var(--stroke-strong); }
.dish-card--editing {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.24), 0 18px 36px -24px rgba(245,158,11,0.55);
}
.dish-thumb {
  position: relative;
  width: 78px; height: 78px;
  border-radius: 8px;
  background: var(--bg-input);
  overflow: hidden;
  border: 1px dashed var(--stroke-strong);
  cursor: pointer;
  display: grid; place-items: center;
}
.dish-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-thumb .plus { color: var(--text-4); font-size: 24px; font-weight: 100; }
.dish-thumb input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.dish-body {
  display: grid;
  gap: 6px;
}
.dish-row1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-right: 96px;
}
.dish-input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--stroke);
  padding: 4px 0;
  font-size: 13px;
  color: var(--text);
  font-family: var(--sans);
}
.dish-input:focus { outline: none; border-color: var(--gold); }
.dish-input.name { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.dish-input.price {
  width: min(150px, 100%);
  text-align: left;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.dish-input.desc { font-size: 11.5px; color: var(--text-2); }
.content-toggle {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 99px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.02);
  color: var(--text-2);
  font-size: 10.5px;
  cursor: pointer;
}
.content-toggle:hover { color: var(--gold); border-color: var(--gold); }
.content-toggle .lucide { width: 13px; height: 13px; }
.content-panel {
  padding: 8px 10px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
}
.content-panel[hidden] { display: none; }
.content-panel textarea.dish-input {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border-bottom: 0;
  line-height: 1.45;
}

.dish-meta {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.variant-tag {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--stroke-strong);
  color: var(--text-2);
  padding: 3px 6px 3px 8px;
  border-radius: 99px;
  font-size: 10.5px;
}
.variant-tag .x {
  cursor: pointer;
  color: var(--text-4);
  font-size: 12px;
  line-height: 1;
}
.variant-tag .x:hover { color: var(--danger); }
.add-variant {
  background: transparent;
  border: 1px dashed var(--stroke-strong);
  color: var(--text-3);
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 10.5px;
}
.add-variant:hover { color: var(--gold); border-color: var(--gold); }

.dish-meta label.allow-custom {
  font-size: 10.5px; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto;
  cursor: pointer;
}
.dish-meta label.allow-custom input { accent-color: var(--gold); }

.dish-remove {
  position: absolute;
  top: 8px; right: 8px;
  background: transparent;
  border: 0; color: var(--text-4);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
}
.dish-remove:hover { color: var(--danger); background: rgba(196,90,74,0.08); }

.add-dish-btn {
  margin-top: 4px;
  border: 1px dashed var(--stroke-strong);
  background: transparent;
  color: var(--gold);
  padding: 12px;
  border-radius: var(--radius);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  width: 100%;
}
.add-dish-btn:hover { background: rgba(201,168,76,0.06); border-color: var(--gold); }

/* ========== CTA ========== */
.form-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
}
.primary-btn {
  background: var(--gold);
  color: #1A1206;
  border: 1px solid transparent;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 10px;
  width: 100%;
  justify-content: center;
  font-family: var(--sans);
  box-shadow: 0 8px 24px -10px rgba(245,158,11,0.55);
  transition: background 0.15s var(--ease-out), transform 0.1s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.primary-btn:hover { background: var(--gold-hi); transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(245,158,11,0.6); }
.primary-btn:active { transform: translateY(0); background: var(--gold-lo); }
.primary-btn.small { padding: 8px 14px; font-size: 12px; width: auto; }
.primary-btn .gen-icon { display: inline-flex; }
.primary-btn .gen-shortcut {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.6;
  background: rgba(26,18,6,0.18);
  padding: 2px 6px;
  border-radius: 4px;
}
.primary-btn.small .gen-shortcut { display: none; }
.cta-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin: 12px 0 0;
  font-family: var(--sans);
}

/* ========== PREVIEW COLUMN ========== */
.preview-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(201,168,76,0.04), transparent 60%),
    var(--bg);
}

.preview-toolbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(255,255,255,0.01);
}

.device-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.device-btn {
  background: transparent;
  border: 0;
  color: var(--text-3);
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.device-btn:hover { color: var(--text-2); }
.device-btn.active {
  background: var(--bg-elev);
  color: var(--gold);
  box-shadow: 0 1px 0 rgba(201,168,76,0.2);
}

.preview-meta {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  flex: 1;
  text-align: center;
}
.preview-meta #preview-name { color: var(--text); font-weight: 500; }
.preview-meta .meta-sep { margin: 0 8px; opacity: 0.4; }

.preview-actions {
  display: flex; gap: 8px;
  align-items: center;
}

.preview-stage {
  flex: 1;
  display: grid; place-items: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.device-frame {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  max-height: 100%;
  transition: max-width 0.25s ease;
  position: relative;
  border: 1px solid rgba(201,168,76,0.12);
}
.device-frame[data-device="mobile"] {
  max-width: 390px;
  border-radius: 28px;
  border: 8px solid #1F1B14;
  box-shadow: 0 30px 60px -10px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.15);
}

.device-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #FFFFFF;
}

.preview-watermark {
  position: absolute;
  bottom: 14px; right: 20px;
  font-size: 10px;
  color: var(--text-4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.preview-watermark strong { color: var(--gold); font-weight: 500; }

/* ========== GENERATION OVERLAY ========== */
.gen-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
}
.gen-overlay[hidden] { display: none; }

.gen-card {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg) 80%);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  min-width: 420px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.06);
  position: relative;
  overflow: hidden;
}
.gen-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: var(--radius-lg);
  background: radial-gradient(600px 200px at 50% -10%, rgba(201,168,76,0.18), transparent 60%);
  pointer-events: none;
}

.gen-orb {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  position: relative;
}
.gen-orb div {
  position: absolute; inset: 0;
  border: 2px solid var(--gold);
  border-radius: 50%;
  border-top-color: transparent;
  animation: orb 1.4s linear infinite;
}
.gen-orb div:nth-child(2) {
  inset: 8px;
  border-color: var(--gold-hi);
  border-bottom-color: transparent;
  animation-duration: 1.8s;
  animation-direction: reverse;
}
.gen-orb div:nth-child(3) {
  inset: 18px;
  border-color: var(--gold-lo);
  border-left-color: transparent;
  animation-duration: 1.2s;
}
@keyframes orb { to { transform: rotate(360deg); } }

.gen-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.gen-sub {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.gen-steps {
  text-align: left;
  margin-bottom: 24px;
  display: flex; flex-direction: column;
  gap: 9px;
}
.gen-step {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  color: var(--text-4);
  transition: color 0.3s ease;
}
.gen-step .g-mark {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-4);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.gen-step.active {
  color: var(--text);
}
.gen-step.active .g-mark {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}
.gen-step.done {
  color: var(--text-2);
}
.gen-step.done .g-mark {
  border-color: var(--gold);
  background: var(--gold);
}
.gen-step.done .g-mark::after {
  content: "";
  width: 4px; height: 7px;
  border-right: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  transform: rotate(45deg) translate(-1px, -1px);
}

.gen-progress {
  height: 2px;
  background: var(--stroke);
  border-radius: 1px;
  overflow: hidden;
}
.gen-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi), var(--gold-lo));
  transition: width 0.4s ease;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev);
  border: 1px solid var(--stroke-strong);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  z-index: 200;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== UTILITY ========== */
.hidden { display: none !important; }

@media (max-width: 920px) {
  .builder { grid-template-columns: 1fr; }
  .form-col { border-right: 0; border-bottom: 1px solid var(--stroke); max-height: 60vh; }
  .topbar { grid-template-columns: 1fr; gap: 12px; }
  .api-key-control { justify-self: stretch; }
}

/* ========== DEMO SWITCHER ========== */
.demo-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.demo-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.demo-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.demo-pill {
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  color: var(--text-3);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}
.demo-pill:hover {
  border-color: var(--stroke-strong);
  color: var(--text-2);
}
.demo-pill.active {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* ========== VERSION TOGGLE (toolbar) — SwiftUI-style sliding segmented ========== */
.version-toggle {
  position: relative;
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
/* sliding amber pill */
.version-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 2px 8px -2px rgba(245,158,11,0.6);
  transition: transform 0.28s var(--ease-out);
  z-index: 0;
}
.version-toggle[data-active="pro"]::before { transform: translateX(100%); }
.version-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 78px;
  text-align: center;
  background: transparent;
  border: 0;
  color: var(--text-3);
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s var(--ease-out);
}
.version-btn:not(.active):hover { color: var(--text); }
.version-btn.active { color: #1A1206; }

/* ========== VERSION SELECTOR (form) ========== */
.version-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.version-opt {
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: inherit;
  transition: all 0.15s ease;
}
.version-opt:hover { border-color: var(--stroke-strong); }
.version-opt.active {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
  box-shadow: 0 0 0 1px var(--gold), 0 4px 16px -6px rgba(201,168,76,0.3);
}
.vo-icon {
  font-size: 18px;
  color: var(--gold);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.vo-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vo-badge { font-size: 12px; }
.vo-desc {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* ========== DEPLOY SECTION ========== */
.deploy-section {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed var(--stroke-strong);
  border-radius: var(--radius);
  background: rgba(201,168,76,0.025);
}
.deploy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.deploy-head-meta {
  font-size: 10px;
  color: var(--text-4);
  letter-spacing: 0.06em;
}
.github-row {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding-left: 10px;
  gap: 0;
  margin-bottom: 8px;
}
.github-row:focus-within { border-color: var(--stroke-strong); }
.github-row input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 9px 8px;
  font-size: 12px;
  color: var(--text);
  min-width: 0;
}
.github-row input::placeholder { color: var(--text-4); font-size: 11px; }
.github-row input:focus { outline: none; }
.publish-btn {
  background: var(--gold);
  color: #1A1206;
  border: 0;
  padding: 9px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex-shrink: 0;
  transition: background 0.15s var(--ease-out);
}
.publish-btn:hover { background: var(--gold-hi); }
.deploy-hint {
  font-size: 11px;
  color: var(--text-4);
  line-height: 1.5;
  margin: 0;
}
.clear-creds-btn {
  margin-top: 12px;
  background: transparent;
  border: 0;
  color: var(--text-4);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  transition: color 0.15s var(--ease-out);
}
.clear-creds-btn:hover { color: var(--danger); }
.clear-creds-btn .lucide { width: 12px; height: 12px; }

/* ========== DEPLOY OVERLAY SUCCESS / ERROR ========== */
.deploy-success {
  margin-top: 24px;
  text-align: center;
}
.deploy-success-icon { font-size: 36px; margin-bottom: 10px; }
.deploy-success-note {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
  line-height: 1.5;
}
.deploy-success-note strong { color: var(--text); }
.deploy-url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 16px;
}
.deploy-url {
  flex: 1;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.02em;
  word-break: break-all;
  text-align: left;
}
.deploy-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.deploy-error { margin-top: 24px; text-align: center; }
.deploy-error-icon { font-size: 32px; margin-bottom: 10px; }
.deploy-error-msg {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.5;
  margin: 0;
}

/* ========== PITCH MODE ========== */
body.pitch-mode .topbar { display: none; }
body.pitch-mode .form-col { display: none; }
body.pitch-mode .preview-toolbar { display: none; }
body.pitch-mode .preview-watermark { display: none; }
body.pitch-mode { grid-template-rows: 1fr; }
body.pitch-mode .builder { grid-template-columns: 1fr; }
body.pitch-mode .preview-col {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
}
body.pitch-mode .preview-stage {
  flex: 1;
  padding: 0;
  height: 100%;
}
body.pitch-mode .device-frame {
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  height: 100%;
}

/* Pitch exit button */
.pitch-exit {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 600;
}
.pitch-exit button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10,10,10,0.85);
  border: 1px solid var(--stroke-strong);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  transition: all 0.15s ease;
}
.pitch-exit button:hover {
  border-color: var(--gold);
  color: var(--text);
}

/* ============================================================= */
/* V2 · A2 — FLOATING TOOLTIP MENUBAR (preview toolbar)          */
/* ============================================================= */
.menubar-float { position: relative; margin-left: auto; }
.menubar-track {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 0 8px 16px -6px rgba(0,0,0,0.5);
}
.menubar-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text-2);
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out), transform 0.1s var(--ease-out);
}
.menubar-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.menubar-btn:active { transform: scale(0.92); }
.menubar-btn .lucide { width: 16px; height: 16px; }
.menubar-btn--primary { background: var(--gold); color: #1A1206; }
.menubar-btn--primary:hover { background: var(--gold-hi); color: #1A1206; }
.menubar-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 0;
  transform: translateY(4px);
  opacity: 0;
  pointer-events: none;
  background: #000;
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.12);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), left 0.2s var(--ease-out);
}

/* ============================================================= */
/* V2 · A3 — MOBILE BOTTOM NAV (webapp)                          */
/* ============================================================= */
.mobile-nav { display: none; }

@media (max-width: 768px) {
  body { padding-bottom: 62px; }
  .builder { grid-template-columns: 1fr; }
  .form-col, .preview-col { display: none; max-height: none; border-right: 0; }
  .form-col.mobile-active { display: block; }
  .preview-col.mobile-active { display: flex; }

  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    z-index: 100;
    background: rgba(12,12,12,0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--stroke);
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav-ind {
    position: absolute;
    top: 0;
    height: 2px;
    width: 28px;
    background: var(--gold);
    border-radius: 2px;
    transition: left 0.3s var(--ease-out);
  }
  .mobile-tab {
    flex: 1;
    background: none;
    border: 0;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
  }
  .mobile-tab .lucide { width: 19px; height: 19px; }
  .mobile-tab.active { color: var(--gold); }
}

/* V3 Lote 2 — form controls */
.field-hint { font-size: 10.5px; color: var(--text-4); margin: 6px 0 0; line-height: 1.4; }
.toggle-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); cursor: pointer; padding: 4px 0; }
.toggle-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; cursor: pointer; }
.field textarea.textarea { min-height: 64px; resize: vertical; line-height: 1.5; }
.zone-input-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.zone-set-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(201,168,76,0.08);
  color: var(--gold);
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}
.zone-set-btn:hover { border-color: var(--gold); background: rgba(201,168,76,0.14); }
.zone-set-btn .lucide { width: 13px; height: 13px; }
.token-example {
  margin: 8px 0 0;
  font-size: 10.5px;
  color: var(--text-4);
  line-height: 1.45;
}
.token-example code {
  color: var(--gold);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.14);
  border-radius: 5px;
  padding: 2px 5px;
}

/* ============================================================= */
/* V3 Lote 6 — W1 webapp footer + B10 toolbar responsive         */
/* ============================================================= */
.webapp-footer {
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--stroke);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-4);
  background: var(--bg);
}
.webapp-footer strong { color: var(--text-2); font-weight: 600; }
.webapp-logo-circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(245,158,11,0.14);
  display: grid; place-items: center;
  color: var(--gold);
}
.webapp-logo-circle svg { width: 15px; height: 15px; }

@media (max-width: 768px) {
  .webapp-footer { display: none; }
  /* B10 — preview toolbar wraps cleanly on mobile */
  .preview-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }
  .preview-meta { display: none; }
  .device-toggle { order: 1; }
  .version-toggle { order: 2; }
  .menubar-float {
    order: 3;
    width: 100%;
    margin-left: 0;
    display: flex;
    justify-content: center;
  }
  .zone-input-wrap { grid-template-columns: 1fr; }
}

/* V3 Lote 6 — B7 dish actions + B2 shake */
.dish-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.product-card-actions { position: absolute; }
.product-minibar-tooltip {
  position: absolute;
  top: -30px;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s var(--ease-out), transform 0.16s var(--ease-out), left 0.16s var(--ease-out);
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255,255,255,0.95);
  color: #111;
  font-size: 10px;
  box-shadow: var(--shadow-sm);
}
.dish-act {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: 7px;
  color: var(--text-3);
  transition: all 0.15s var(--ease-out);
}
.dish-act:hover { color: var(--text); border-color: var(--stroke-strong); }
.dish-act--del:hover { color: var(--danger); border-color: var(--danger); background: rgba(239,68,68,0.08); }
.dish-act .lucide { width: 13px; height: 13px; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.shake { animation: shake 0.5s ease; }
.key-input-wrap.shake { border-color: var(--danger); }

/* B3 generation confirmation */
.gen-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10,10,10,0.78);
  backdrop-filter: blur(10px);
}
.gen-confirm-modal[hidden] { display: none; }
.gen-confirm-card {
  width: min(480px, 100%);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-elev), var(--bg));
  box-shadow: var(--shadow-xl);
  padding: 24px;
}
.gen-confirm-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.gen-confirm-title {
  margin: 8px 0 16px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}
.gen-confirm-data {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}
.gen-confirm-data div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stroke);
}
.gen-confirm-data span {
  color: var(--text-4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.gen-confirm-data strong { color: var(--text); text-align: right; }
.gen-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.gen-cooking {
  position: relative;
  height: 54px;
  margin: -2px 0 8px;
  overflow: hidden;
  color: var(--gold);
}
.gen-cooking-walker {
  position: absolute;
  bottom: 0;
  left: 0;
  animation: moonwalk 3s linear infinite;
}
@keyframes moonwalk {
  0% { transform: translateX(-60px) scaleX(-1); }
  49% { transform: translateX(380px) scaleX(-1); }
  50% { transform: translateX(380px) scaleX(1); }
  100% { transform: translateX(-60px) scaleX(1); }
}

/* =============================================================
   V4 · AUTH + THEME PREVIEWS + COLLAPSIBLE FORM + QR + CHIP
   ============================================================= */

/* ---------- AUTH SCREEN ---------- */
body.auth-locked .topbar,
body.auth-locked .builder,
body.auth-locked .webapp-footer,
body.auth-locked .mobile-nav { display: none !important; }

.auth-screen {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,158,11,0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245,158,11,0.045), transparent 60%),
    var(--bg);
}
.auth-screen[hidden] { display: none; }
.auth-particles {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  background: var(--bg-elev);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 34px 30px 26px;
  box-shadow: var(--shadow-2);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 38px; height: 38px; color: var(--gold); }
.auth-brand-text .brand-name { font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.auth-brand-text .brand-name span { color: var(--gold); }
.auth-brand-text .brand-tag { font-family: var(--mono); font-size: 10px; color: var(--text-4); letter-spacing: 0.08em; }
.auth-title {
  font-family: var(--serif);
  font-size: 22px; font-weight: 600;
  margin: 0 0 6px; color: var(--text);
}
.auth-sub { font-size: 12.5px; color: var(--text-3); margin: 0 0 22px; line-height: 1.5; }
.auth-fields { display: flex; flex-direction: column; }
/* Campo con label flotante (versión ligera del componente LOGIN) */
.auth-field { position: relative; margin-top: 14px; }
.auth-fields .input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 19px 44px 7px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}
.auth-fields .input:focus { border-color: var(--gold); }
.auth-float-label {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  font-size: 13px; color: var(--text-4);
  pointer-events: none;
  transition: top 0.18s ease, transform 0.18s ease, font-size 0.18s ease, color 0.18s ease, letter-spacing 0.18s ease;
}
.auth-field .input:focus ~ .auth-float-label,
.auth-field .input:not(:placeholder-shown) ~ .auth-float-label {
  top: 8px; transform: none;
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold);
}
.auth-eye {
  position: absolute; right: 7px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px;
  color: var(--text-4); cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.auth-eye:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.auth-eye svg { width: 18px; height: 18px; }
.auth-error {
  color: var(--danger);
  font-size: 12px;
  margin: 12px 0 0;
}
.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}
.auth-foot {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
  text-align: center;
}

/* ---------- USER CHIP (topbar) ---------- */
.api-key-control { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
@media (max-width: 1320px) {
  .topbar { grid-template-columns: minmax(220px, auto) minmax(0, 1fr); }
  .topbar-status { display: none; }
}
.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 8px 6px 12px;
  margin-left: 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.user-chip[hidden] { display: none; }
.user-chip-ico .lucide { width: 14px; height: 14px; color: var(--gold); }
.user-chip-name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.user-chip-btn {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  transition: background 0.15s ease, color 0.15s ease;
}
.user-chip-btn:hover { background: var(--bg-elev-2); color: var(--text); }
.user-chip-btn .lucide { width: 14px; height: 14px; }

/* ---------- DISTRIBUIDORES MODAL ---------- */
.dist-card { max-width: 480px; }
.dist-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; max-height: 240px; overflow-y: auto; }
.dist-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
}
.dist-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dist-row-info strong { font-size: 13px; color: var(--text); }
.dist-row-info span { font-family: var(--mono); font-size: 10px; color: var(--text-4); }
.dist-del {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; flex-shrink: 0;
  border: 1px solid var(--stroke); border-radius: 50%;
  background: transparent; color: var(--text-3);
  transition: all 0.15s ease;
}
.dist-del:hover { color: var(--danger); border-color: var(--danger); }
.dist-del .lucide { width: 13px; height: 13px; }
.dist-empty { font-size: 12px; color: var(--text-4); text-align: center; padding: 14px 0; }
.dist-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.dist-form input {
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
}
.dist-form input:focus { border-color: var(--gold); }
.dist-form input#dist-name { grid-column: 1 / -1; }
.dist-form .primary-btn { justify-content: center; }
.dist-error { color: var(--danger); font-size: 11.5px; margin: 0 0 8px; }
.dist-hint { font-size: 10.5px; color: var(--text-4); line-height: 1.5; margin: 0 0 14px; }

/* ---------- COLLAPSIBLE FORM SECTIONS ---------- */
.fsection--collapsible .fsection-head {
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-sm);
  margin-left: -8px; margin-right: -8px;
  padding: 6px 8px;
  transition: background 0.15s ease;
}
.fsection--collapsible .fsection-head:hover { background: rgba(255,255,255,0.03); }
.fsection-chev { display: inline-flex; color: var(--text-4); }
.fsection-chev .lucide { width: 15px; height: 15px; transition: transform 0.22s var(--ease-out); }
.fsection.collapsed .fsection-chev .lucide { transform: rotate(-90deg); }
.fsection.collapsed .fsection-body { display: none; }
.fsection.collapsed { padding-bottom: 10px; margin-bottom: 16px; }
.fsection-count {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-4);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 2px 8px;
}
.field-hint { font-size: 10.5px; color: var(--text-4); line-height: 1.5; margin: 6px 0 0; }

/* ---------- THEME PICKER V2 (previews reales) ---------- */
.theme-picker--v2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
.theme-card--v2 { display: flex; flex-direction: column; }
.theme-card--v2 .tprev {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  width: 100%;
  padding: 14px 14px 12px;
  min-height: 112px;
  border-bottom: 1px solid var(--stroke);
}
.tprev-eyebrow {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tprev-title {
  font-size: 19px;
  line-height: 1.05;
  font-weight: 700;
}
.tprev-cta {
  margin-top: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.theme-card--v2 .meta { display: flex; flex-direction: column; padding: 9px 12px 11px; }
.theme-card--v2 .tname { font-family: var(--serif); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.theme-card--v2 .tdesc { font-size: 9.5px; color: var(--text-3); letter-spacing: 0.03em; line-height: 1.4; }

/* ---------- RESET / NUEVO PILL ---------- */
.demo-pill--reset { border-style: dashed; color: var(--text-3); }
.demo-pill--reset:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- DEMO SWITCHER · CATEGORÍAS ---------- */
.demo-switcher { flex-direction: column; align-items: stretch; gap: 10px; }
.demo-switcher-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-cats { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--stroke); border-radius: 999px; background: var(--bg-input); }
.demo-cat {
  border: 0; background: transparent;
  padding: 5px 13px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: all 0.15s ease;
}
.demo-cat:hover { color: var(--text); }
.demo-cat.active { background: var(--gold); color: #1a1206; font-weight: 700; }
.demo-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- INDUSTRY TOGGLE (Comida / Servicios) ---------- */
.industry-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ind-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.ind-opt .lucide { width: 14px; height: 14px; }
.ind-opt:hover { border-color: var(--stroke-strong); color: var(--text); }
.ind-opt.active {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: rgba(245,158,11,0.08);
}

/* ---------- QR DEL DEPLOY ---------- */
.deploy-qr {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 16px auto 4px;
}
.deploy-qr[hidden] { display: none; }
.deploy-qr img {
  width: 140px; height: 140px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 6px;
}
.deploy-qr span { font-size: 11px; color: var(--text-3); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .user-chip-name { display: none; }
  .theme-picker--v2 { grid-template-columns: 1fr 1fr; }
  .dist-form { grid-template-columns: 1fr; }
}
