/* =====================================================================
   NFKings 2.0 · Panel de la plataforma
   Identidad: tinta azul noche + violeta/cian (corona + ondas NFC).
   ===================================================================== */
:root {
  --bg: #f4f5fa; --surface: #fff; --surface-2: #f8f9fc; --ink: #0f1222; --ink-2: #3a3f55; --muted: #6b7088;
  --line: #e5e7f0; --line-2: #d5d8e4;
  --brand: #6c4dff; --brand-2: #1fc2dc; --brand-ink: #fff; --brand-soft: #f0ecff; --brand-deep: #4b2fe0;
  --primary: var(--brand); --primary-ink: #fff;
  --grad: linear-gradient(135deg, #7c5cff 0%, #4f7bff 55%, #22c7e0 100%);
  --ok: #10a35a; --ok-soft: #e4f7ec; --warn: #b86e00; --warn-soft: #fff4dc; --err: #d92d48; --err-soft: #fde8ec;
  --side: #0c0f1d; --side-2: #161a2e; --side-ink: #a9adc6; --side-hi: #fff;
  --radius: 16px; --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(15 18 34 / .06), 0 1px 3px rgb(15 18 34 / .04);
  --shadow: 0 10px 30px -12px rgb(15 18 34 / .18);
  --shadow-lg: 0 30px 70px -24px rgb(15 18 34 / .4);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --edtop: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.ml-auto { margin-left: auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
[hidden] { display: none !important; }
.boot { padding: 60px 20px; text-align: center; color: var(--muted); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.demo-note { background: var(--warn-soft); color: #7a4a00; border-radius: 10px; padding: 9px 12px; font-size: .85rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 650; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s, filter .15s;
}
.btn .ico { width: 18px; height: 18px; }
.btn:hover:not(:disabled) { border-color: #b3b7c8; box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-primary:hover:not(:disabled) { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: rgb(15 18 34 / .05); border-color: transparent; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 11px; font-size: .84rem; border-radius: 9px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .15s, border-color .15s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 0; color: var(--brand); font-weight: 650; text-decoration: none; cursor: pointer; font-size: .88rem; }
.link .ico { width: 16px; height: 16px; }
.link:hover { text-decoration: underline; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Estados y etiquetas ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-live { background: var(--ok-soft); color: #0b7a43; }
.pill-live .pill-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.pill-draft { background: var(--warn-soft); color: #8a5300; }
.pill-muted { background: #eef0f5; color: var(--muted); }
.pill-edit { background: var(--brand-soft); color: var(--brand-deep); }
.pill-edit .pill-dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 750; padding: 2px 8px; border-radius: 6px; background: #eef0f5; color: var(--ink-2); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.badge.plan-basico { background: #eef0f5; color: #4b5068; }
.badge.plan-plus { background: #e2ecff; color: #2147b8; }
.badge.plan-pro { background: linear-gradient(135deg, #efe7ff, #dff6fb); color: #4b2fe0; }
.badge.plan-especial { background: #fdf0e1; color: #9a4b00; }
.badge.on { background: var(--ok-soft); color: #0b7a43; text-transform: none; letter-spacing: 0; }
.badge.off { background: #eef0f5; color: var(--muted); text-transform: none; letter-spacing: 0; }
.soon-tag { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgb(124 92 255 / .14); color: #8f7bff; }
.soon-tag.big { font-size: .74rem; padding: 4px 10px; }
.count-chip { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--err-soft); color: var(--err); font-size: .74rem; font-weight: 800; }
.tone-err { color: var(--err); } .tone-warn { color: var(--warn); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: .86rem; color: var(--ink); }
.hint { color: var(--muted); font-size: .8rem; line-height: 1.45; }
p.hint { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
p.hint .ico { width: 15px; height: 15px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], textarea, select {
  width: 100%; font: inherit; font-size: .94rem; color: inherit; background: #fff; border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 13px; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, textarea:hover, select:hover { border-color: #b8bccd; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; }
.invalid { border-color: var(--err) !important; box-shadow: 0 0 0 4px rgb(217 45 72 / .12) !important; }
.field-error { color: var(--err); font-weight: 650; font-size: .82rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.form-plain { display: grid; gap: 14px; padding: 6px 22px 22px; }
.form-sub { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 4px; }
.form-sub .ico { width: 15px; height: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.slug-row, .money-row { display: flex; align-items: center; }
.slug-row .prefix, .money-row .prefix { padding: 0 12px; min-height: 44px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); border-right: 0; border-radius: 11px 0 0 11px; color: var(--muted); white-space: nowrap; font-size: .88rem; }
.slug-row input, .money-row input { border-radius: 0 11px 11px 0; min-width: 0; }
.slug-row .btn { margin-left: 8px; }
@media (max-width: 560px) { .slug-row { flex-wrap: wrap; } .slug-row .prefix { display: none; } .slug-row input { border-radius: 11px; } .slug-row .btn { margin: 8px 0 0; } }
.warn { display: flex; gap: 8px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; background: var(--warn-soft); color: #7a4a00; font-weight: 600; font-size: .88rem; }
.okmsg { display: flex; gap: 8px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; background: var(--ok-soft); color: #0b6b3b; font-size: .88rem; }
.warn .ico, .okmsg .ico { width: 18px; height: 18px; margin-top: 1px; }
.warnings { display: grid; gap: 6px; }

/* ---------- Avisos ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.callout > .ico { width: 22px; height: 22px; color: var(--brand); margin-top: 1px; }
.callout p { color: var(--ink-2); font-size: .88rem; margin-top: 2px; }
.callout .btn { margin-top: 10px; }
.callout-warn { background: #fffaf0; border-color: #f6dfae; }
.callout-warn > .ico { color: var(--warn); }
.callout-err { background: #fff6f7; border-color: #f7c8d0; }
.callout-err > .ico { color: var(--err); }
.callout-soft { background: var(--brand-soft); border-color: transparent; box-shadow: none; }

/* ---------- Inicio de sesión ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.login-art { position: relative; overflow: hidden; background: var(--side); color: #fff; display: grid; align-items: end; padding: 56px; }
.login-art::before { content: ""; position: absolute; inset: -30% -20% auto auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgb(124 92 255 / .55), transparent 65%); }
.login-art::after { content: ""; position: absolute; inset: auto auto -30% -20%; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgb(34 199 224 / .4), transparent 65%); }
.login-art-inner { position: relative; max-width: 460px; display: grid; gap: 18px; }
.login-kicker { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9f8cff; }
.login-art h2 { font-size: 2.3rem; line-height: 1.1; letter-spacing: -.03em; }
.login-art ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: #c9cce0; }
.login-art li { display: flex; gap: 10px; align-items: center; }
.login-art li .ico { width: 18px; height: 18px; color: #22c7e0; }
.login { width: min(420px, 100%); margin: auto; padding: 32px 24px; display: grid; gap: 16px; }
.login h1 { font-size: 1.7rem; letter-spacing: -.02em; }
.login .muted { margin-top: 4px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.login-brand strong { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.login-brand small { color: var(--muted); font-size: .82rem; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- Estructura de la app ---------- */
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.main-wrap { min-width: 0; }
.view { outline: none; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; background: var(--side); color: var(--side-ink); scrollbar-width: thin; scrollbar-color: #2a2f48 transparent; }
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 6px; text-decoration: none; color: #fff; }
.sb-brand-text { display: grid; line-height: 1.15; }
.sb-brand-text strong { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; }
.sb-brand-text small { font-size: .74rem; color: #8b90ad; }
.sb-nav { display: grid; gap: 2px; align-content: start; flex: 1; }
.sb-label { margin: 14px 10px 6px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #5f6482; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; text-decoration: none; color: var(--side-ink); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--side-2); color: #fff; }
.nav-link.on { background: linear-gradient(90deg, rgb(124 92 255 / .28), rgb(124 92 255 / .08)); color: #fff; }
.nav-link.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-link.on .ico { color: #b3a4ff; }
.nav-text { flex: 1; min-width: 0; }
.nav-count { font-size: .74rem; font-weight: 700; color: #8b90ad; }
.nav-count:empty { display: none; }
.nav-link[data-nav^="modulo-"] { color: #7d82a0; }
.nav-link[data-nav^="modulo-"]:hover, .nav-link[data-nav^="modulo-"].on { color: #fff; }
.sb-foot { display: grid; gap: 8px; border-top: 1px solid #1d2136; padding-top: 12px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px 2px 10px; }
.sb-user-av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: .85rem; }
.sb-user-mail { flex: 1; min-width: 0; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: #8b90ad; cursor: pointer; }
.sb-logout:hover { background: var(--side-2); color: #fff; }

/* En el editor la barra lateral se vuelve angosta (solo iconos) para dar espacio */
body.in-editor .app { grid-template-columns: 76px minmax(0, 1fr); }
body.in-editor .sidebar { padding: 18px 12px; align-items: center; }
body.in-editor .sb-brand { padding: 4px 0; }
body.in-editor :is(.sb-brand-text, .nav-text, .nav-count, .sb-label, .soon-tag, .sb-user-mail, .sb-user-av) { display: none; }
body.in-editor .nav-link { justify-content: center; padding: 11px; }
body.in-editor .nav-link.on::before { left: -12px; }
body.in-editor .sb-nav { gap: 4px; }
body.in-editor .sb-nav::before { content: ""; height: 12px; }
body.in-editor .sb-user { padding: 0; justify-content: center; }

/* Celular: barra superior + barra inferior */
.m-top { display: none; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .app, body.in-editor .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .m-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--side); color: #fff; position: sticky; top: 0; z-index: 30; }
  .m-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; font-size: 1.05rem; }
  body.in-editor .m-top { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  body.in-editor .tabbar { display: none; }
  .tab-link { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 0; background: none; border-radius: 12px; color: var(--muted); font-size: .7rem; font-weight: 700; text-decoration: none; cursor: pointer; }
  .tab-link .ico { width: 22px; height: 22px; }
  .tab-link.on { color: var(--brand); }
  .tab-link.on .ico { background: var(--brand-soft); border-radius: 10px; padding: 2px 10px; width: 44px; box-sizing: content-box; height: 22px; margin: -2px 0; }
}

/* Hoja "Más" (celular) */
.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border: 0; border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.sheet[open] { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet::backdrop { background: rgb(12 15 29 / .5); }
.sheet .sb-label { margin: 6px 4px 0; color: var(--muted); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-mod { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; font-size: .78rem; font-weight: 700; text-align: center; }
.sheet-mod .ico { width: 24px; height: 24px; color: var(--brand); }
.sheet-mod.is-soon { color: var(--muted); }
.sheet-mod.is-soon .ico { color: #a3a7bd; }
.sheet-mod small { font-size: .62rem; color: #8f7bff; font-weight: 800; text-transform: uppercase; }
.sheet-list { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sheet-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; background: #fff; text-decoration: none; font-weight: 650; text-align: left; cursor: pointer; }
.sheet-row + .sheet-row { border-top: 1px solid var(--line); }

/* ---------- Páginas ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 30px 34px 90px; display: grid; gap: 22px; }
.page-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title h1 { font-size: 1.85rem; letter-spacing: -.025em; font-weight: 800; }
.page-title p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px !important; }
.back-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--muted); font-weight: 650; text-decoration: none; font-size: .88rem; margin-bottom: -8px; }
.back-link:hover { color: var(--ink); }
.back-link .ico { width: 17px; height: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); display: grid; gap: 14px; align-content: start; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h2 { font-size: 1.02rem; font-weight: 750; }
.section-title { display: grid; gap: 2px; margin-bottom: -8px; }
.section-title h2 { font-size: 1.15rem; font-weight: 800; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 56px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.empty-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.empty-ico .ico { width: 28px; height: 28px; }
.empty h3 { font-size: 1.1rem; }
.empty p { color: var(--muted); max-width: 420px; }
.empty .btn { margin-top: 8px; }
@media (max-width: 900px) { .page { padding: 20px 16px 110px; gap: 18px; } .page-title h1 { font-size: 1.5rem; } }

/* Barra de herramientas: búsqueda + filtros */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; }
.search .ico { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search .search-input { padding-left: 40px; background: var(--surface); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; max-width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: .84rem; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip:hover { border-color: #b3b7c8; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-n { font-size: .74rem; padding: 0 6px; border-radius: 999px; background: rgb(15 18 34 / .07); }
.chip.on .chip-n { background: rgb(255 255 255 / .18); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: #e9ebf3; margin-left: auto; }
.seg-btn { display: grid; place-items: center; width: 38px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-btn .ico { width: 18px; height: 18px; }
.sort-select { width: auto; min-height: 38px; padding: 6px 12px; margin-left: auto; font-size: .86rem; font-weight: 600; }
@media (max-width: 640px) { .search { max-width: none; flex-basis: 100%; } .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .seg, .sort-select { margin-left: 0; } }

/* Avatar */
.avatar { flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 30%; background: var(--av, var(--brand)); color: #fff; font-weight: 800; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.av-sm { width: 34px; height: 34px; font-size: .74rem; border-radius: 10px; }
.av-md { width: 42px; height: 42px; font-size: .86rem; border-radius: 12px; }
.av-lg { width: 52px; height: 52px; font-size: 1rem; border-radius: 15px; }
.av-xl { width: 84px; height: 84px; font-size: 1.6rem; border-radius: 24px; box-shadow: var(--shadow); }
.avatar:has(img) { background: #fff; border: 1px solid var(--line); }

/* Medidor */
.meter { display: block; height: 6px; border-radius: 999px; background: #e9ebf3; overflow: hidden; flex: 1; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .6s cubic-bezier(.2,.8,.2,1); }

/* ---------- Inicio (dashboard) ---------- */
.hero-dash { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 30px 32px; border-radius: 22px; color: #fff; background: var(--side); box-shadow: var(--shadow); }
.hero-dash::before { content: ""; position: absolute; right: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgb(124 92 255 / .6), transparent 66%); }
.hero-dash::after { content: ""; position: absolute; right: 180px; bottom: -220px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgb(34 199 224 / .35), transparent 66%); }
.hero-dash > * { position: relative; }
.hero-dash .eyebrow { color: #a99aff; }
.hero-dash .eyebrow::first-letter { text-transform: uppercase; }
.hero-dash h1 { font-size: 2.1rem; letter-spacing: -.03em; font-weight: 800; }
.hero-sub { color: #c3c6dc; margin-top: 6px !important; }
.hero-dash .btn-primary { background: #fff; color: var(--ink); border-color: #fff; box-shadow: 0 10px 30px -10px rgb(124 92 255 / .8); }
.hero-dash .btn-primary:hover:not(:disabled) { background: #f0ecff; border-color: #f0ecff; }
.hero-dash .btn-primary .ico { color: var(--brand); }
@media (max-width: 640px) { .hero-dash { padding: 24px 20px; } .hero-dash h1 { font-size: 1.6rem; } .hero-actions, .hero-actions .btn { width: 100%; } }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 2px 10px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .15s, box-shadow .15s; overflow: hidden; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-ico { grid-column: 2; grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--k-soft); color: var(--k); }
.kpi-value { grid-row: 1; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi-label { grid-row: 2; font-weight: 650; color: var(--ink-2); font-size: .9rem; }
.kpi-foot { grid-column: 1 / -1; margin-top: 10px; font-size: .78rem; color: var(--muted); display: flex; }
.kpi-violet { --k: #6c4dff; --k-soft: #efeaff; }
.kpi-cyan { --k: #0e9fb5; --k-soft: #e0f7fb; }
.kpi-green { --k: #10a35a; --k-soft: #e4f7ec; }
.kpi-amber { --k: #c47a06; --k-soft: #fff1d6; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-col { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: 1fr; } }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .recent-grid { grid-template-columns: 1fr; } }
.recent { display: grid; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; text-decoration: none; background: var(--surface); transition: transform .15s, box-shadow .15s, border-color .15s; }
.recent:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.recent-info { display: grid; gap: 3px; padding: 11px 12px 12px; min-width: 0; }
.recent-info strong, .recent-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-info small { color: var(--muted); font-size: .8rem; }
.recent-meta .small { white-space: nowrap; }
.recent-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li + li { border-top: 1px solid var(--line); }
.timeline a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; text-decoration: none; }
.timeline a:hover .tl-text strong { color: var(--brand); }
.tl-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.tl-ico .ico { width: 17px; height: 17px; }
.tl-text { flex: 1; min-width: 0; display: grid; }
.tl-text strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-text small { color: var(--muted); font-size: .78rem; }
.tl-time { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn { display: grid; justify-items: start; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.quick-btn:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: #fff; transform: translateY(-1px); }
.quick-btn:disabled { opacity: .6; }
.quick-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 8px; }
.quick-ico .ico { width: 18px; height: 18px; }
.quick-btn strong { font-size: .88rem; }
.quick-btn small { color: var(--muted); font-size: .76rem; }
.attn { list-style: none; margin: 0; padding: 0; display: grid; }
.attn li + li { border-top: 1px solid var(--line); }
.attn a { display: flex; align-items: center; gap: 12px; padding: 9px 0; text-decoration: none; }
.attn-text { flex: 1; min-width: 0; display: grid; }
.attn-text strong { font-size: .88rem; }
.attn-text small { display: flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; }
.attn-text small .ico { width: 14px; height: 14px; }
.all-good { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--ok-soft); color: #0b6b3b; font-weight: 600; font-size: .88rem; }
.plan-bars { display: grid; gap: 10px; }
.plan-bar { display: grid; grid-template-columns: 70px 1fr 26px; align-items: center; gap: 10px; }
.plan-bar strong { text-align: right; }
.plan-fill-basico { background: #9aa0b8 !important; }
.plan-fill-plus { background: #3b6cf5 !important; }
.plan-fill-pro { background: var(--grad) !important; }
.mod-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .mod-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mod-tile { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 16px 8px; border-radius: 14px; border: 1px dashed var(--line-2); text-decoration: none; color: var(--muted); transition: border-color .15s, background .15s; }
.mod-tile:hover { background: var(--surface-2); }
.mod-tile strong { font-size: .84rem; color: var(--ink-2); }
.mod-tile small { font-size: .7rem; font-weight: 700; }
.mod-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #eef0f5; color: #9a9fb6; }
.mod-tile.is-ready { border-style: solid; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: linear-gradient(180deg, #faf8ff, #fff); }
.mod-tile.is-ready .mod-ico { background: var(--grad); color: #fff; }
.mod-tile.is-ready small { color: var(--ok); }

/* ---------- Miniatura de menú ---------- */
.mthumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: flex; flex-direction: column; align-items: center; background: var(--b); color: var(--ink); isolation: isolate; }
.mthumb-cover { position: absolute; inset: 0 0 auto; height: 44%; z-index: -1; background: var(--p) center / cover no-repeat; }
.mthumb-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / .18)); }
.mthumb-logo { width: 22%; aspect-ratio: 1; max-width: 54px; margin-top: 12%; border-radius: 50%; border: 3px solid var(--b); background: var(--b); box-shadow: 0 6px 14px -6px rgb(0 0 0 / .4); overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: var(--p); }
.mthumb-logo img { width: 100%; height: 100%; object-fit: cover; }
.mthumb-name { max-width: 88%; margin-top: 4%; font-family: var(--hf); font-size: clamp(.8rem, 1.6vw, 1.05rem); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mthumb-rows { width: 74%; display: grid; gap: 5px; margin-top: 5%; }
.mthumb-row { display: flex; align-items: center; gap: 6px; }
.mthumb-row i { flex: 1; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.mthumb-row b { width: 20%; height: 9px; border-radius: 5px; background: var(--p); }
.mthumb-row + .mthumb-row i { flex: .75; }
.mt-urbano .mthumb-row b, .mt-micheladas .mthumb-row b { background: var(--a); }
.mt-elegante .mthumb-name, .mt-cortes .mthumb-name { letter-spacing: .02em; }
.mt-elegante .mthumb-row b, .mt-cortes .mthumb-row b { background: var(--a); height: 4px; }

/* ---------- Clientes ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.client-card { display: grid; grid-template-rows: 1fr auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; overflow: hidden; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.cc-main { display: grid; gap: 6px; align-content: start; padding: 18px 18px 14px; text-decoration: none; }
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.cc-main h3 { font-size: 1.08rem; font-weight: 750; }
.cc-cat { color: var(--muted); font-size: .86rem; }
.cc-menus { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cc-menus .ico { width: 14px; height: 14px; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px 11px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cc-foot .muted { display: flex; align-items: center; gap: 5px; }
.cc-foot .muted .ico { width: 15px; height: 15px; }
.cc-foot .btn .ico { width: 15px; height: 15px; margin-right: -4px; }
.mod-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.mod-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 8px; background: #f1f2f7; color: #a3a7bd; font-size: .76rem; }
.mod-chip .ico { width: 15px; height: 15px; }
.mod-chip.is-on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 800; }
.mod-chip.is-soon { background: transparent; border: 1px dashed #dadde8; padding: 0 6px; }
.table-card { padding: 6px 0; }
.client-table { display: grid; }
.ct-row { display: grid; grid-template-columns: minmax(200px, 2fr) 130px minmax(170px, 1.4fr) 110px 120px; align-items: center; gap: 12px; padding: 10px 18px; text-decoration: none; }
.ct-row:not(.ct-head):hover { background: var(--surface-2); }
.ct-row + .ct-row { border-top: 1px solid var(--line); }
.ct-head { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-block: 8px; }
.ct-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ct-name > span { display: grid; min-width: 0; }
.ct-name small { color: var(--muted); font-size: .8rem; }
.ct-row .mod-chips { margin: 0; }
.ct-go { text-align: right; }
@media (max-width: 900px) { .ct-row { grid-template-columns: 1fr auto; } .ct-row > :nth-child(3), .ct-row > :nth-child(4), .ct-row > :nth-child(5), .ct-head { display: none; } }

.client-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  background-image: radial-gradient(600px 200px at 100% 0, rgb(124 92 255 / .09), transparent 70%), radial-gradient(500px 200px at 0 100%, rgb(34 199 224 / .08), transparent 70%); }
.ch-text { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.ch-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ch-title h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.025em; }
.ch-cat { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.ch-cat .ico { width: 17px; height: 17px; color: var(--muted); }
.info-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.info-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); text-decoration: none; }
.info-chip .ico { width: 15px; height: 15px; color: var(--muted); }
a.info-chip:hover { border-color: var(--line-2); color: var(--brand); }
.ch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .client-hero { padding: 18px; } .ch-title h1 { font-size: 1.4rem; } .ch-actions, .ch-actions .btn { flex: 1; } }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-card.span-2 { grid-column: span 3; }
@media (max-width: 1000px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .module-card.span-2 { grid-column: span 2; } }
@media (max-width: 600px) { .module-grid { grid-template-columns: 1fr; } .module-card.span-2 { grid-column: auto; } }
.module-card { display: grid; gap: 14px; align-content: start; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.module-card.is-soon { background: transparent; border-style: dashed; box-shadow: none; }
.mc-head { display: flex; align-items: center; gap: 12px; }
.mc-head > div { flex: 1; min-width: 0; display: grid; }
.mc-head h3 { font-size: 1rem; font-weight: 750; }
.mc-head small { color: var(--muted); font-size: .8rem; }
.mc-ico { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: #eef0f5; color: #9a9fb6; }
.module-card.is-ready .mc-ico { background: var(--grad); color: #fff; }
.mc-projects { display: grid; gap: 10px; }
.mc-project { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.mc-thumb { display: block; text-decoration: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.mc-info { display: grid; gap: 4px; min-width: 0; }
.mc-info strong { font-size: 1rem; }
.mc-url { color: var(--brand); font-weight: 600; font-size: .84rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .mc-project { grid-template-columns: 110px minmax(0, 1fr); } .mc-actions { grid-column: 1 / -1; justify-content: stretch; } .mc-actions .btn { flex: 1; } }
.mc-foot { display: flex; }
.notes { white-space: pre-wrap; color: var(--ink-2); }

/* ---------- Biblioteca de menús ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 18px; }
.menu-card { display: grid; grid-template-rows: auto 1fr auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.menu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.menu-card-thumb { position: relative; display: block; text-decoration: none; border-bottom: 1px solid var(--line); }
.mc-status { position: absolute; top: 10px; left: 10px; }
.mc-status .pill { box-shadow: 0 4px 12px -4px rgb(0 0 0 / .3); }
.menu-card-body { display: grid; gap: 4px; align-content: start; padding: 14px 16px 6px; min-width: 0; }
.mcb-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mcb-title h3 { font-size: 1.04rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcb-sub { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcb-url, .mcb-date { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.mcb-url { color: var(--ink-2); font-weight: 600; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mcb-url .ico, .mcb-date .ico { width: 15px; height: 15px; }
.menu-card-actions { display: flex; gap: 6px; align-items: center; padding: 10px 14px 14px; }
.menu-card-new { place-content: center; justify-items: center; gap: 6px; min-height: 260px; border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; cursor: pointer; color: var(--ink-2); grid-template-rows: none; }
.menu-card-new:hover { border-color: var(--brand); background: #faf8ff; }
.menu-card-new small { color: var(--muted); }
.new-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 4px; }

/* ---------- Próximamente / Configuración ---------- */
.soon-hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  background-image: radial-gradient(500px 220px at 50% 0, rgb(124 92 255 / .1), transparent 70%); }
.soon-hero h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.soon-hero p { max-width: 520px; }
.soon-hero .row { margin-top: 10px; }
.soon-ico { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 16px 40px -14px rgb(108 77 255 / .7); }
.soon-ico .ico { width: 34px; height: 34px; }
.tree { display: grid; gap: 8px; }
.tree-root { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 14px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 700; }
.tree ul { list-style: none; margin: 0 0 0 22px; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 6px; }
.tree li { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px dashed var(--line-2); width: fit-content; color: var(--muted); font-weight: 600; font-size: .88rem; }
.tree li::before { content: ""; position: absolute; left: -20px; top: 50%; width: 18px; border-top: 2px solid var(--line); }
.tree li small { font-size: .7rem; font-weight: 800; color: #8f7bff; text-transform: uppercase; }
.tree li.is-ready { border-style: solid; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--ink); background: #faf8ff; }
.tree li.is-ready small { color: var(--ok); }
.tree li.is-here { border-color: var(--brand); color: var(--brand-deep); }
.set-card { gap: 0; padding: 8px 20px; }
.set-title { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 0 4px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.set-text { flex: 1; min-width: 0; }
.set-text p { color: var(--muted); font-size: .86rem; margin-top: 2px; }
@media (max-width: 640px) { .set-row { flex-wrap: wrap; } .set-action { width: 100%; padding-left: 54px; } }

/* ---------- Crear proyecto ---------- */
.np { display: grid; gap: 14px; padding: 4px 22px 22px; }
.np-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .np-grid { grid-template-columns: 1fr 1fr; } }
.np-opt { position: relative; display: grid; justify-items: start; gap: 6px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.np-opt:hover:not(:disabled) { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); transform: translateY(-2px); }
.np-opt small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.np-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.np-opt.is-soon { cursor: not-allowed; background: var(--surface-2); border-style: dashed; }
.np-opt.is-soon .np-ico { background: #e7e9f1; color: #9a9fb6; }
.np-opt.is-soon strong { color: var(--muted); }
.np-go { margin-top: 4px; font-size: .78rem; font-weight: 800; color: var(--brand); }

.new-flow { display: grid; gap: 16px; }
.step-card { display: grid; gap: 16px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.step-head { display: flex; gap: 14px; align-items: flex-start; }
.step-head h2 { font-size: 1.1rem; font-weight: 750; }
.step-head p { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.step-num { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .choice-row { grid-template-columns: 1fr; } }
.choice { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); cursor: pointer; transition: border-color .15s, background .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > .ico { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.choice span { display: grid; }
.choice small { color: var(--muted); font-size: .78rem; }
.choice:has(input:checked) { border-color: var(--brand); background: #faf8ff; }
.choice:has(input:checked) > .ico { background: var(--brand); color: #fff; }
.choice:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.choice.is-disabled { opacity: .5; cursor: not-allowed; }
.new-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.new-actions .hint { margin-right: auto; }
@media (max-width: 640px) { .new-actions .btn-lg { width: 100%; } }

.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; }
@media (max-width: 720px) { .plan-cards { grid-template-columns: 1fr; } }
.plan-card { position: relative; display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; }
.plan-card-head strong { font-size: 1rem; }
.plan-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.plan-check .ico { width: 14px; height: 14px; stroke-width: 3; }
.plan-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .8rem; }
.plan-card li { display: flex; gap: 6px; align-items: flex-start; }
.plan-card li .ico { width: 15px; height: 15px; margin-top: 1px; }
.plan-card li.yes .ico { color: var(--ok); }
.plan-card li.no { color: #a8acc0; }
.plan-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.plan-card:has(input:checked) .plan-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.plan-card:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.plan-card-pro .plan-card-head strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Ventanas y avisos flotantes ---------- */
.dialog { width: min(580px, calc(100% - 24px)); max-height: calc(100vh - 40px); border: 0; border-radius: 22px; padding: 0; box-shadow: var(--shadow-lg); }
.dialog.wide { width: min(760px, calc(100% - 24px)); }
.dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.dialog::backdrop { background: rgb(12 15 29 / .55); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 12px; position: sticky; top: 0; background: #fff; z-index: 2; }
.dialog-head h2 { font-size: 1.2rem; font-weight: 800; }
.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: 440px; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px; color: #fff; background: var(--ink); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); transform: translateY(160%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.toast .ico { width: 20px; height: 20px; color: #4ade80; }
.toast.show { transform: none; }
.toast.error { background: var(--err); }
.toast.error .ico { color: #fff; }
@media (max-width: 900px) { .toast { left: 12px; right: 12px; bottom: 84px; } body.in-editor .toast { bottom: 84px; } }

/* =====================================================================
   EDITOR DE MENÚ
   ===================================================================== */
.ed-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px; color: var(--muted); }
.ed { min-height: 100vh; }
.ed-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: var(--edtop); padding: 10px 22px; background: rgb(255 255 255 / .88); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.ed-back { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); background: #fff; }
.ed-back:hover { background: var(--surface-2); }
.ed-id { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ed-id h1 { font-size: 1.12rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-id p { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: .8rem; }
.ed-client { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.ed-client:hover { color: var(--brand); }
.ed-client .ico, .ed-url .ico { width: 14px; height: 14px; }
.ed-url { display: inline-flex; align-items: center; gap: 5px; min-width: 0; border: 0; padding: 0; background: none; color: var(--brand); font-weight: 650; font-size: .8rem; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ed-url .ico:last-child { opacity: .5; }
.ed-url:hover .ico:last-child { opacity: 1; }
.ed-states { display: flex; align-items: center; gap: 8px; }
.ed-actions { display: flex; align-items: center; gap: 8px; }

.ed-body { display: grid; grid-template-columns: 216px minmax(0, 1fr) 410px; align-items: start; }
.ed-nav { position: sticky; top: var(--edtop); display: grid; gap: 3px; padding: 22px 12px; }
.ed-nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; text-decoration: none; color: var(--ink-2); font-weight: 650; font-size: .92rem; transition: background .15s, color .15s; }
.ed-nav-link .ico { color: var(--muted); }
.ed-nav-link span { flex: 1; }
.ed-nav-link:hover { background: #eceef6; }
.ed-nav-link.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.ed-nav-link.on .ico { color: var(--brand); }
.ed-nav-meta { font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #e8eaf2; color: var(--muted); }
.ed-nav-link.on .ed-nav-meta { background: var(--brand-soft); color: var(--brand-deep); }
.ed-nav-meta.warn { background: var(--err-soft); color: var(--err); }
.ed-main { min-width: 0; padding: 24px 28px 70px; display: grid; gap: 18px; align-content: start; }
.sec-head { display: flex; align-items: center; gap: 14px; }
.sec-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -12px rgb(108 77 255 / .8); }
.sec-head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.sec-head p { color: var(--muted); font-size: .9rem; }
.ed-panel { display: grid; gap: 16px; min-width: 0; }
.ed-form { display: grid; gap: 12px; }

/* Vista previa */
.ed-preview { position: sticky; top: var(--edtop); height: calc(100vh - var(--edtop)); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 18px 14px; border-left: 1px solid var(--line); background: linear-gradient(180deg, #eef0f7, #f4f5fa); }
.pv-head { width: 100%; max-width: 352px; display: flex; align-items: center; justify-content: space-between; }
.pv-title { display: flex; align-items: center; gap: 8px; }
.pv-mode { font-size: .72rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.pv-mode.is-live { background: var(--ok-soft); color: #0b7a43; }
.pv-mode.is-draft { background: var(--warn-soft); color: #8a5300; }
.pv-mode.is-edit { background: var(--brand-soft); color: var(--brand-deep); }
.pv-tools { display: flex; gap: 6px; }
.pv-close { display: none; }
.phone { position: relative; width: 352px; flex: 1; max-height: 740px; min-height: 0; border: 11px solid #0f1222; border-radius: 44px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -24px rgb(15 18 34 / .5), 0 0 0 1px #2a2f48; }
.phone-notch { position: absolute; z-index: 2; top: 7px; left: 50%; translate: -50% 0; width: 92px; height: 22px; border-radius: 14px; background: #0f1222; }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.pv-foot { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); }
.pv-foot .ico { width: 15px; height: 15px; }
.preview-fab { display: none; }

@media (max-width: 1320px) {
  .ed-body { grid-template-columns: 200px minmax(0, 1fr); }
  .ed-preview { position: fixed; inset: 0; z-index: 80; height: auto; padding: 18px 14px; border: 0; background: rgb(12 15 29 / .78); backdrop-filter: blur(8px);
    visibility: hidden; opacity: 0; transform: translateY(24px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
  .ed-preview.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .ed-preview .pv-head { color: #fff; }
  .ed-preview .pv-foot { color: #c3c6dc; }
  .pv-close { display: inline-grid; }
  .phone { width: min(380px, 100%); max-height: none; }
  .preview-fab { position: fixed; z-index: 50; right: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; height: 50px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); cursor: pointer; }
  .preview-fab .ico { color: #a99aff; }
}
@media (max-width: 900px) {
  :root { --edtop: 60px; }
  .ed-top { position: relative; padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
  .ed-top > .avatar { display: none; }
  .ed-id h1 { font-size: 1rem; }
  .ed-client { display: none; }
  .ed-states .badge { display: none; }
  .ed-actions { width: 100%; order: 5; }
  .ed-actions .btn { flex: 1; min-height: 38px; }
  .hide-sm { display: none; }
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .ed-nav { position: sticky; top: 0; z-index: 25; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 12px; background: rgb(244 245 250 / .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .ed-nav-link { flex: none; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .84rem; }
  .ed-nav-link.on { background: var(--ink); color: #fff; box-shadow: none; border-color: var(--ink); }
  .ed-nav-link.on .ico { color: #b3a4ff; }
  .ed-nav-link .ico { width: 17px; height: 17px; }
  .ed-main { padding: 18px 14px 110px; }
  .sec-head { display: none; }
  .preview-fab { left: 50%; right: auto; translate: -50% 0; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .ed-preview { padding: 12px 10px calc(12px + env(safe-area-inset-bottom)); }
  .phone { width: 100%; border-width: 8px; border-radius: 34px; }
}

/* Tarjetas del editor */
.ecard { display: grid; gap: 14px; align-content: start; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.ecard-head { display: grid; gap: 3px; }
.ecard-head h3 { font-size: 1.05rem; font-weight: 750; }
.ecard-head p { color: var(--muted); font-size: .86rem; }

/* Acordeones */
.acc { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.acc[open] { border-color: var(--line-2); box-shadow: var(--shadow); }
.acc > summary { display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; list-style: none; border-radius: 16px; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--surface-2); }
.acc[open] > summary { border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.acc-ico { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.acc-ico .ico { width: 19px; height: 19px; }
.acc-title { flex: 1; min-width: 0; display: grid; }
.acc-title strong { font-size: .98rem; }
.acc-title small { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-chev { color: var(--muted); transition: transform .2s; }
.acc[open] .acc-chev { transform: rotate(180deg); }
.acc-body { display: grid; gap: 14px; padding: 18px; }

/* Barra de guardar */
.save-bar { position: sticky; bottom: 14px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 18px; border-radius: 16px; background: rgb(255 255 255 / .92); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: 0 12px 30px -14px rgb(15 18 34 / .3); }
.save-state { display: grid; gap: 1px; font-weight: 700; font-size: .88rem; }
.save-state > span { display: flex; align-items: center; gap: 7px; }
.save-state .ico { width: 17px; height: 17px; color: var(--ok); }
.save-state .hint { font-weight: 500; }
.when-dirty { display: none !important; color: var(--brand-deep); }
.ed.is-dirty .when-dirty { display: flex !important; }
.ed.is-dirty .when-clean { display: none !important; }
.ed.is-dirty .save-bar { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent), 0 12px 30px -14px rgb(15 18 34 / .3); }
.dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 1.4s ease-in-out infinite; }
@media (max-width: 900px) { .save-bar { bottom: 80px; } .save-bar .btn { width: 100%; } }

/* Información */
.brand-card { position: relative; display: grid; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.brand-cover { height: 84px; background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 55%, #000)); background-size: cover; background-position: center; }
.brand-pickers { display: grid; grid-template-columns: auto 1fr; gap: 18px 30px; align-items: start; padding: 16px 20px 4px; }
.brand-pickers .img-preview.round { box-shadow: var(--shadow); border: 3px solid #fff; outline: 1px solid var(--line); }
.brand-hint { padding: 8px 20px 16px; }
@media (max-width: 640px) { .brand-pickers { grid-template-columns: 1fr; } }
.url-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #f4f0ff, #ecfbfd); border: 1px solid #e3dcff; }
.url-hero > div:nth-child(2) { flex: 1; min-width: 180px; display: grid; }
.url-hero strong { font-size: 1.02rem; word-break: break-all; }
.url-hero small { color: var(--muted); font-size: .8rem; }
.url-hero-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; }

/* Imágenes */
.img-picker { display: flex; align-items: center; gap: 14px; }
.img-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.img-preview { position: relative; flex: none; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: .74rem; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview.is-loading::after { content: ""; position: absolute; inset: 0; background: rgb(255 255 255 / .6) ; animation: pulse 1s infinite; }
.img-empty { display: grid; justify-items: center; gap: 2px; }
.img-empty .ico { width: 22px; height: 22px; opacity: .6; }
.img-preview.square { width: 96px; height: 96px; border-radius: 14px; }
.img-preview.round { width: 96px; height: 96px; border-radius: 50%; }
.img-preview.wide { width: 170px; height: 96px; border-radius: 14px; }
/* Logo con transparencia: se ve completo sobre cuadritos (para notar que no tiene fondo) */
.img-preview.contain { width: 170px; height: 96px; border-radius: 14px; background: repeating-conic-gradient(#eceef2 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.img-preview.contain img { object-fit: contain; padding: 6px; }
.hide-logo-row { display: flex; align-items: flex-start; gap: 10px; margin: 4px 20px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.hide-logo-row[hidden] { display: none; }
.hide-logo-row input { margin-top: 3px; accent-color: var(--brand); }
.hide-logo-row span { display: grid; gap: 1px; }
.hide-logo-row small { color: var(--muted); font-size: .8rem; }

/* Apariencia */
.look-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.ls-item { display: grid; gap: 3px; padding: 12px 16px; min-width: 0; }
.ls-item + .ls-item { border-left: 1px solid var(--line); }
.ls-item small { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ls-item strong { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-dots { display: flex; gap: 4px; }
.ls-dots i { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgb(0 0 0 / .1); }
@media (max-width: 760px) { .look-summary { grid-template-columns: 1fr 1fr; } .ls-item:nth-child(3) { border-left: 0; } .ls-item:nth-child(n+3) { border-top: 1px solid var(--line); } }
.subtabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #e9ebf3; overflow-x: auto; scrollbar-width: none; }
.subtab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.subtab .ico { width: 17px; height: 17px; }
.subtab:hover { color: var(--ink); }
.subtab.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.subtab.on .ico { color: var(--brand); }
.sub-panel { display: grid; gap: 16px; }
.color-card { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }

/* Productos y categorías */
.stat-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stat { display: grid; padding: 9px 16px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); min-width: 92px; }
.stat strong { font-size: 1.25rem; font-weight: 800; line-height: 1.15; }
.stat small { color: var(--muted); font-size: .76rem; font-weight: 600; }
@media (max-width: 640px) { .stat { flex: 1; min-width: 0; padding: 8px 12px; } .stat-row > .btn, .stat-row > .ml-auto { width: 100%; } .stat-row .ml-auto .btn { width: 100%; } }
.toolbar-tight .search { max-width: 320px; }
.prod-groups { display: grid; gap: 14px; }
.prod-group { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.pg-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pg-cover { width: 56px; height: 40px; flex: none; border-radius: 9px; object-fit: cover; }
.pg-cover-empty { display: grid; place-items: center; background: #e9ebf3; color: #a3a7bd; }
.pg-cover-empty .ico { width: 18px; height: 18px; }
.pg-title { flex: 1; min-width: 0; display: grid; }
.pg-title h3 { font-size: 1rem; font-weight: 750; }
.pg-title small { color: var(--muted); font-size: .78rem; }
.prod-group.is-off .pg-title, .prod-group.is-off .pg-cover { opacity: .5; }
.pg-empty { padding: 16px; color: var(--muted); font-size: .88rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prod-rows { list-style: none; margin: 0; padding: 0; }
.prod-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.prod-row + .prod-row { border-top: 1px solid var(--line); }
.prod-row:hover { background: #fbfbfe; }
.pr-thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; }
.pr-thumb-empty { display: grid; place-items: center; background: var(--surface-2); border: 1px dashed var(--line-2); color: #b3b7c8; }
.pr-thumb-empty .ico { width: 18px; height: 18px; }
.pr-text { flex: 1; min-width: 0; display: grid; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.pr-text strong { font-size: .94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-text small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-text:hover strong { color: var(--brand); }
.pr-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prod-row.is-off :is(.pr-thumb, .pr-text, .pr-price) { opacity: .45; }
.order { display: grid; gap: 2px; }
.order-btn { display: grid; place-items: center; width: 26px; height: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); cursor: pointer; padding: 0; }
.order-btn .ico { width: 14px; height: 14px; stroke-width: 2.4; }
.order-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.order-btn:disabled { opacity: .25; cursor: default; }
.vis-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; min-width: 92px; }
.vis-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vis-track { position: relative; width: 36px; height: 21px; border-radius: 999px; background: #d3d6e2; transition: background .2s; flex: none; }
.vis-track::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .2s; }
.vis-switch input:checked + .vis-track { background: var(--ok); }
.vis-switch input:checked + .vis-track::after { transform: translateX(15px); }
.vis-switch input:focus-visible + .vis-track { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.vis-label { font-size: .8rem; font-weight: 650; color: var(--ink-2); }
/* Agotado hoy: rojo cuando está activo (al día siguiente vuelve solo). */
.sold-btn { white-space: nowrap; }
.sold-btn.on { background: #fde8e8; border-color: #f3b4b4; color: #b91c1c; }
@media (max-width: 640px) {
  .prod-row { flex-wrap: wrap; row-gap: 8px; padding: 12px; }
  .prod-row .pr-text { flex-basis: calc(100% - 110px); }
  .prod-row .order { order: 5; display: flex; }
  .prod-row .pr-price { order: 4; margin-left: 98px; }
  .prod-row .vis-switch { order: 6; margin-left: auto; min-width: 0; }
  .prod-row .icon-btn { order: 7; }
  .prod-row .sold-btn { order: 6; margin-left: auto; }
  .prod-row .sold-btn + .vis-switch { margin-left: 0; }
  .vis-label { display: none; }
}
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.cat-card { display: grid; grid-template-rows: auto 1fr auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.cat-card.is-off .cc-cover, .cat-card.is-off .cc-body { opacity: .5; }
.cc-cover { position: relative; aspect-ratio: 16 / 7; background: #eceef5 center / cover; display: grid; place-items: center; }
.cc-cover-empty { display: grid; justify-items: center; gap: 4px; color: #a3a7bd; font-size: .78rem; font-weight: 600; }
.cc-pos { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgb(15 18 34 / .75); color: #fff; font-size: .78rem; font-weight: 800; backdrop-filter: blur(4px); }
.cc-body { display: grid; gap: 2px; align-content: start; padding: 12px 16px 4px; }
.cc-body h3 { font-size: 1.02rem; font-weight: 750; }
.cc-tools { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px 16px; flex-wrap: wrap; }
.cc-tools .order { display: flex; gap: 4px; }
.cc-tools .order-btn { width: 30px; height: 28px; }
.cc-tools .vis-label { display: none; }
.cc-tools .vis-switch { min-width: 0; }

/* Enlaces */
.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .channels { grid-template-columns: 1fr; } }
.channel { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); gap: 9px; }
.channel:first-child { grid-column: 1 / -1; }
.channel.is-locked { background: var(--surface-2); }
.ch-head { display: flex; align-items: center; gap: 10px; }
.ch-head label { flex: 1; font-weight: 750; font-size: .94rem; }
.ch-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.ch-ico .ico { width: 19px; height: 19px; }
.tone-green { background: #e3f8ea; color: #12a150; }
.tone-amber { background: #fff3d6; color: #c47a06; }
.tone-red { background: #fde8ea; color: #db3a4b; }
.tone-blue { background: #e4ecff; color: #2c5ce0; }
.tone-pink { background: #fde7f3; color: #d0347f; }

/* Pedidos */
.order-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.order-status > div { flex: 1; min-width: 200px; }
.order-status strong { font-size: 1.02rem; }
.order-status p { color: var(--muted); font-size: .86rem; }
.os-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.order-status.is-on { background: linear-gradient(135deg, #ecfbf2, #fff); border-color: #c6ecd6; }
.order-status.is-on .os-ico { background: var(--ok); color: #fff; }
.order-status.is-locked .os-ico { background: #eceef5; color: var(--muted); }
.order-status.is-warn { background: #fffaf0; border-color: #f6dfae; }
.order-status.is-warn .os-ico { background: var(--warn-soft); color: var(--warn); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { position: relative; display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.steps li p { color: var(--muted); font-size: .82rem; }
.step-n { position: absolute; top: 12px; right: 14px; font-size: 1.5rem; font-weight: 800; color: #e2e4ee; }
.step-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.wa-bubble { justify-self: start; max-width: 100%; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: #e7fbd8; border: 1px solid #cdeeb4; }
.wa-bubble pre { margin: 0; white-space: pre-wrap; font: .84rem/1.5 var(--font); color: #1c2a17; }

/* =====================================================================
   APARIENCIA: estilos, decoración, tipografías e imagen de referencia
   (mismas piezas de antes)
   ===================================================================== */
/* ---------- Diseño ---------- */
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.variant { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 8px 8px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, transform .15s, box-shadow .15s; }
/* Coronita del logo: plantillas rediseñadas por NFKings */
.variant-crown { position: absolute; top: -12px; left: 50%; z-index: 2; translate: -50% 0; display: grid; place-items: center; width: 34px; height: 26px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #7c5cff, #22c7e0); box-shadow: 0 0 0 3px #fff, 0 4px 10px rgb(80 60 200 / .35); }
.variant-crown svg { width: 18px; height: 16px; }
.variant:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgb(15 18 34 / .35); }
.variant.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.variant-pick { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 9px; }
.variant-pick:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.variant.on .variant-pick { cursor: default; }
.variant-text { display: grid; gap: 4px; align-content: start; padding: 0 4px; }
.variant-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.variant-text strong { font-size: .95rem; }
.variant-text small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.variant-layout { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.variant-layout .ico { width: 13px; height: 13px; flex: none; }
.variant-tag { padding: 1px 7px; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .02em; }
.variant-tag.new { background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); }
.variant-tag.rec { background: #e4f7ec; color: #0b7a43; }
.variant-apply { justify-self: start; margin: 0 4px; min-width: 96px; }
.variant-apply.is-on { background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); border-color: transparent; opacity: 1; }
.variant-filters { margin: 4px 0 14px; }

/* Miniaturas: versión reducida de cada estilo del menú (ver estilos.css) */
.mini { position: relative; display: grid; align-content: end; gap: 10px; height: 132px; padding: 12px 14px; overflow: hidden;
  border-radius: 9px; background: var(--b); color: var(--ink); font-family: var(--bf), sans-serif; }
.mini-deco { position: absolute; pointer-events: none; }
.mini-name { position: relative; font-family: var(--hf), serif; font-size: 1.35rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row { position: relative; display: flex; align-items: baseline; gap: 6px; font-size: .78rem; }
.mini-item { font-weight: 700; }
.mini-leader { flex: 1; }
.mini-price { font-weight: 700; }

.mini-clasico { text-align: center; background-image: radial-gradient(color-mix(in srgb, var(--p) 12%, transparent) 1px, transparent 1.5px); background-size: 12px 12px; background-color: var(--b); }
.mini-clasico .mini-deco { inset: 0 0 auto 0; height: 26px;
  background: linear-gradient(var(--ink), var(--ink)) 0 3px / 100% 1px no-repeat,
    conic-gradient(from -26.57deg at 25% 100%, var(--p) 53.13deg, transparent 0) 0 4px / 36px 18px repeat-x,
    conic-gradient(from -26.57deg at 75% 100%, var(--a) 53.13deg, transparent 0) 0 4px / 36px 18px repeat-x; }
.mini-clasico .mini-name { color: var(--p); text-shadow: 2px 2px 0 color-mix(in srgb, var(--a) 30%, transparent); }
.mini-clasico .mini-row { padding: 7px 9px; background: color-mix(in srgb, var(--b) 80%, #fff); border-top: 3px solid var(--p); border-radius: 3px; text-align: left; box-shadow: 0 4px 10px -4px rgb(0 0 0 / .25); }
.mini-clasico .mini-leader { border-bottom: 2px dotted color-mix(in srgb, var(--ink) 30%, transparent); }
.mini-clasico .mini-price { color: var(--p); }

.mini-elegante { text-align: center; align-content: center; }
.mini-elegante .mini-deco { inset: 6px; border: 1px solid var(--a); outline: 1px solid color-mix(in srgb, var(--a) 40%, transparent); outline-offset: -4px; }
.mini-elegante .mini-name { font-size: 1.6rem; font-weight: 500; }
.mini-elegante .mini-row { margin: 0 14px; font-family: var(--hf), serif; font-size: .95rem; }
.mini-elegante .mini-item { font-weight: 700; }
.mini-elegante .mini-leader { border-bottom: 1px solid color-mix(in srgb, var(--a) 60%, transparent); }
.mini-elegante .mini-price { color: var(--a); }

.mini-urbano .mini-deco { inset: 0; background: radial-gradient(color-mix(in srgb, var(--p) 60%, transparent) 1.3px, transparent 1.7px) 0 0 / 9px 9px;
  -webkit-mask-image: linear-gradient(120deg, #000 0 20%, transparent 60%); mask-image: linear-gradient(120deg, #000 0 20%, transparent 60%); }
.mini-urbano .mini-name { font-size: 1.9rem; text-transform: uppercase; text-shadow: 3px 3px 0 var(--p); }
.mini-urbano .mini-row { flex-direction: column; align-items: flex-start; gap: 5px; margin-right: 6px; padding: 7px 9px; border: 2px solid var(--ink); border-radius: 7px; box-shadow: 3px 3px 0 var(--p); background: color-mix(in srgb, var(--b) 88%, #fff); }
.mini-urbano .mini-item { font-family: var(--hf), sans-serif; font-weight: 400; text-transform: uppercase; font-size: .9rem; }
.mini-urbano .mini-leader { display: none; }
.mini-urbano .mini-price { padding: 1px 7px; border-radius: 3px; background: var(--a); color: var(--aink); transform: rotate(-3deg); box-shadow: 2px 2px 0 #000; }

.mini-fresco .mini-deco { top: -40px; right: -30px; width: 120px; height: 105px; border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; background: color-mix(in srgb, var(--a) 32%, var(--b)); }
.mini-fresco .mini-name { color: var(--p); font-weight: 600; font-size: 1.5rem; }
.mini-fresco .mini-row { flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px 10px; border-radius: 16px; background: color-mix(in srgb, var(--p) 8%, color-mix(in srgb, var(--b) 85%, #fff)); }
.mini-fresco .mini-item { font-family: var(--hf), sans-serif; font-weight: 500; font-size: .9rem; }
.mini-fresco .mini-leader { display: none; }
.mini-fresco .mini-price { padding: 1px 9px; border-radius: 999px; background: var(--p); color: var(--pink); }

.mini-mariscos { text-align: center; align-content: start; padding-top: 16px; background: linear-gradient(var(--p) 0 56%, var(--b) 56%); }
.mini-mariscos .mini-deco { left: 0; right: 0; top: calc(56% - 10px); height: 10px;
  background: radial-gradient(circle at 50% 100%, var(--b) 7px, transparent 7.5px) 0 100% / 16px 10px repeat-x; }
.mini-mariscos .mini-name { color: var(--pink); }
.mini-mariscos .mini-row { margin-top: 30px; padding: 6px 9px; border-radius: 12px; text-align: left; background: color-mix(in srgb, var(--b) 80%, #fff); }
.mini-mariscos .mini-item { color: var(--p); font-family: var(--hf), sans-serif; font-weight: 400; font-size: .9rem; }
.mini-mariscos .mini-leader { border-bottom: 2px dotted color-mix(in srgb, var(--p) 30%, transparent); }
.mini-mariscos .mini-price { padding: 1px 8px; border-radius: 999px; background: var(--a); color: var(--aink); }
.mini-micheladas { text-align: center; background: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--a) 70%, transparent) 1.2px, transparent 1.7px) 0 0 / 15px 13px, var(--b); }
.mini-micheladas .mini-deco { inset: 0 0 auto 0; height: 28px;
  background: linear-gradient(var(--p), var(--p)) 0 0 / 100% 7px no-repeat,
    radial-gradient(ellipse 5px 14px at 50% 0, var(--p) 97%, transparent) 0 0 / 26px 22px repeat-x,
    radial-gradient(ellipse 4px 9px at 50% 0, var(--p) 97%, transparent) 13px 0 / 26px 18px repeat-x; }
.mini-micheladas .mini-name { color: var(--a); font-size: 1.2rem; text-shadow: 0 0 10px color-mix(in srgb, var(--a) 60%, transparent), 2px 2px 0 var(--p); }
.mini-micheladas .mini-row { padding: 7px 10px; border-radius: 14px; text-align: left; background: color-mix(in srgb, var(--b) 85%, var(--a)); }
.mini-micheladas .mini-item { font-family: var(--hf), sans-serif; font-weight: 400; font-size: .78rem; }
.mini-micheladas .mini-leader { display: none; }
.mini-micheladas .mini-price { margin-left: auto; padding: 1px 8px; border-radius: 7px; background: var(--p); color: var(--pink); transform: rotate(-3deg); }

.mini-cortes { text-align: center; align-content: center; padding-bottom: 24px; background: radial-gradient(120% 70% at 50% 0, color-mix(in srgb, var(--a) 14%, transparent), transparent 70%), var(--b); }
.mini-cortes .mini-deco { left: 16px; right: 16px; bottom: 10px; height: 5px; border-block: 1px solid var(--a); }
.mini-cortes .mini-name { font-weight: 800; font-size: 1.5rem; }
.mini-cortes .mini-row { margin: 0 8px; font-family: var(--hf), serif; font-size: .9rem; }
.mini-cortes .mini-item { font-weight: 600; }
.mini-cortes .mini-leader { border-bottom: 1px dotted var(--a); }
.mini-cortes .mini-price { color: var(--a); }

/* ---------- Miniaturas de las plantillas nuevas ----------
   Misma composición que el menú real (js/plantillas.js): encabezado .mh-* y productos .ml-*.
   Sin fotos: los cuadros de color representan las fotos de los productos. */
.mini-tpl { display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 10px; text-align: left; }
.mt-hero { position: relative; display: flex; align-items: center; gap: 7px; min-width: 0; }
.mt-logo { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 2px var(--b); }
.mt-name { min-width: 0; font-family: var(--hf), sans-serif; font-size: 1.05rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-prods { position: relative; display: grid; gap: 6px; }
.mt-prod { position: relative; display: flex; align-items: center; gap: 7px; min-width: 0; }
.mt-ph { flex: none; width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--a), var(--p)); }
.mt-txt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 4px; font-size: .64rem; line-height: 1.15; }
.mt-item { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-lead { flex: 1; min-width: 4px; }
.mt-price { flex: none; font-weight: 800; }

/* Encabezados */
.mh-left .mt-hero { flex-direction: column; align-items: flex-start; gap: 5px; }
.mh-left .mt-name { font-size: 1.25rem; }
.mh-center .mt-hero { flex-direction: column; gap: 5px; text-align: center; }
.mh-split .mt-hero { padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.mh-split .mt-logo { border-radius: 5px; width: 24px; height: 24px; }
.mh-band .mt-hero, .mh-cover .mt-hero { margin: -10px -10px 0; padding: 12px 10px 10px; background: var(--p); color: var(--pink); border-radius: 0 0 14px 14px; }
.mh-band .mt-logo { background: var(--pink); box-shadow: none; }
.mh-cover .mt-hero { min-height: 50px; align-items: flex-end; border-radius: 0; color: #fff;
  background: linear-gradient(to top, rgb(0 0 0 / .78), rgb(0 0 0 / .15)), linear-gradient(120deg, var(--a), var(--p)); }
.mh-poster .mt-hero { flex-direction: column; align-items: flex-start; gap: 3px; }
.mh-poster .mt-logo { width: 14px; height: 14px; border-radius: 4px; }
.mh-poster .mt-name { font-size: 1.6rem; line-height: .9; text-transform: uppercase; }
.mh-card .mt-hero { justify-content: center; margin-top: 8px; padding: 12px 8px 7px; border-radius: 10px; background: color-mix(in srgb, var(--b) 45%, #fff); color: #1a1a1a; box-shadow: 0 6px 14px -8px rgb(0 0 0 / .4); }
.mh-card .mt-logo { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); }

/* Productos */
.ml-stack .mt-prods, .ml-tiles .mt-prods, .ml-plate .mt-prods, .ml-polaroid .mt-prods, .ml-bento .mt-prods, .ml-overlay .mt-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ml-stack .mt-prod, .ml-tiles .mt-prod, .ml-bento .mt-prod { flex-direction: column; align-items: stretch; gap: 0; overflow: hidden; border-radius: 7px; background: color-mix(in srgb, var(--b) 45%, #fff); color: #1a1a1a; }
.ml-stack .mt-ph, .ml-tiles .mt-ph, .ml-bento .mt-ph { width: 100%; height: 30px; border-radius: 0; }
.ml-stack .mt-txt, .ml-tiles .mt-txt, .ml-bento .mt-txt { padding: 5px 6px 6px; }
.ml-tiles .mt-ph { height: 36px; }
.ml-tiles .mt-txt { flex-direction: column; gap: 2px; }
.ml-bento .mt-prods { grid-template-columns: 1.5fr 1fr; }
.ml-bento .mt-prod { border-radius: 10px; box-shadow: 0 4px 10px -6px rgb(0 0 0 / .35); }
.ml-media-left .mt-prod { padding: 5px; border-radius: 8px; background: color-mix(in srgb, var(--b) 45%, #fff); color: #1a1a1a; }
.ml-list .mt-prod, .ml-leaders .mt-prod, .ml-feature .mt-prod { padding-bottom: 5px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.ml-list .mt-ph { width: 22px; height: 22px; border-radius: 5px; }
.ml-leaders .mt-ph { display: none; }
.ml-leaders .mt-lead { border-bottom: 1.5px dotted color-mix(in srgb, var(--ink) 40%, transparent); }
.ml-overlay .mt-prod, .ml-feature .mt-prod:first-child { height: 46px; align-items: flex-end; overflow: hidden; border-radius: 7px; }
.ml-overlay .mt-ph, .ml-feature .mt-prod:first-child .mt-ph { position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; }
.ml-overlay .mt-prod::after, .ml-feature .mt-prod:first-child::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .8), transparent 75%); }
.ml-overlay .mt-txt, .ml-feature .mt-prod:first-child .mt-txt { position: relative; z-index: 1; padding: 4px 6px; color: #fff; }
.ml-feature .mt-prod:first-child { border-bottom: 0; }
.ml-feature .mt-prod:not(:first-child) .mt-ph { width: 20px; height: 20px; }
.ml-plate .mt-prod { flex-direction: column; gap: 3px; padding: 5px 4px; border-radius: 9px; background: color-mix(in srgb, var(--b) 45%, #fff); color: #1a1a1a; text-align: center; }
.ml-plate .mt-ph { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 5px rgb(0 0 0 / .25); }
.ml-plate .mt-txt { flex-direction: column; align-items: center; gap: 1px; width: 100%; }
.ml-polaroid .mt-prod { flex-direction: column; align-items: stretch; gap: 3px; padding: 4px 4px 5px; background: #fffdf8; color: #1d1d1d; border-radius: 2px; box-shadow: 0 3px 8px -3px rgb(0 0 0 / .4); transform: rotate(-2deg); }
.ml-polaroid .mt-prod + .mt-prod { transform: rotate(2deg); }
.ml-polaroid .mt-ph { width: 100%; height: 30px; border-radius: 1px; }
.ml-polaroid .mt-txt { flex-direction: column; gap: 1px; }
/* Composiciones por capas */
.ml-arch .mt-prods, .ml-overlap .mt-prods, .ml-cutout .mt-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ml-arch .mt-prod { flex-direction: column; align-items: stretch; gap: 0; }
.ml-arch .mt-ph { width: 100%; height: 28px; border-radius: 99px 99px 5px 5px; }
.ml-arch .mt-txt { align-items: center; gap: 4px; margin-top: -7px; padding: 0 2px; }
.ml-arch .mt-price { order: -1; align-self: flex-start; padding: 1px 6px; border-radius: 99px; background: var(--p); color: var(--pink); box-shadow: 0 2px 5px rgb(0 0 0 / .3); }
.ml-overlap .mt-prod { flex-direction: column; align-items: stretch; gap: 0; }
.ml-overlap .mt-ph { width: 100%; height: 36px; border-radius: 3px; }
.ml-overlap .mt-txt { margin: -12px 0 0 8px; padding: 4px 5px; border-radius: 3px; background: #fff; color: #1a1a1a; box-shadow: 0 4px 8px -4px rgb(0 0 0 / .45); }
.ml-cutout .mt-prod { padding: 6px 4px 6px 5px; border-radius: 4px; background: #fff; color: #1a1a1a; overflow: visible; }
.ml-cutout .mt-ph { order: 2; margin: -10px -8px 0 0; transform: rotate(5deg); box-shadow: 3px 3px 0 var(--a); }
.ml-cutout .mt-txt { flex-direction: column; gap: 1px; }
.mh-arch .mt-hero { flex-direction: column; gap: 4px; text-align: center; }
.mh-arch .mt-hero::before { content: ""; width: 34px; height: 26px; border-radius: 99px 99px 3px 3px; background: linear-gradient(135deg, var(--a), var(--p)); }
.mh-arch .mt-logo { margin-top: -12px; }
.mh-layered .mt-hero { flex-direction: column; align-items: flex-start; gap: 3px; padding-top: 4px; }
.mh-layered .mt-hero::before { content: ""; position: absolute; right: -16px; top: -18px; width: 52px; height: 52px; border-radius: 50%; background: var(--a); }
.mh-layered .mt-hero::after { content: ""; position: absolute; right: 18px; top: 16px; width: 22px; height: 22px; border-radius: 50%; background: var(--p); mix-blend-mode: multiply; }
.mh-layered .mt-name { position: relative; z-index: 1; font-size: 1.3rem; }
/* Acomodos extra (se eligen en Apariencia → Acomodo de los platillos) */
.ml-hero-grid .mt-prods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ml-hero-grid .mt-prod { flex-direction: column; align-items: stretch; gap: 2px; }
.ml-hero-grid .mt-ph { width: 100%; height: 16px; border-radius: 4px; }
.ml-hero-grid .mt-txt { display: none; }
.ml-hero-grid .mt-prod:first-child { grid-column: 1 / -1; }
.ml-hero-grid .mt-prod:first-child .mt-ph { height: 40px; }
.ml-hero-grid .mt-prod:first-child .mt-txt { display: flex; }
.ml-hero-carousel .mt-prods { grid-template-columns: repeat(3, 42%); gap: 4px; overflow: hidden; }
.ml-hero-carousel .mt-prod { flex-direction: column; align-items: stretch; gap: 2px; }
.ml-hero-carousel .mt-ph { width: 100%; height: 26px; border-radius: 4px; }
.ml-hero-carousel .mt-txt { flex-direction: column; gap: 1px; }
.ml-hero-carousel .mt-prod:first-child { grid-column: 1 / 3; }
.ml-hero-carousel .mt-prod:first-child .mt-ph { height: 40px; }
.ml-hero-carousel .mt-prod:first-child .mt-txt { flex-direction: row; }
.ml-carousel .mt-prods { grid-auto-flow: column; grid-auto-columns: 44%; overflow: hidden; }
.ml-carousel .mt-prod { flex-direction: column; align-items: stretch; gap: 3px; }
.ml-carousel .mt-ph { width: 100%; height: 50px; }
.ml-carousel .mt-txt { flex-direction: column; gap: 1px; }
.ml-delivery .mt-prod { flex-direction: row-reverse; padding-bottom: 5px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.ml-delivery .mt-ph { width: 24px; height: 24px; border-radius: 6px; }
.ml-delivery .mt-txt { flex-direction: column; gap: 1px; }
.ml-overlap-hero-grid .mt-txt, .ml-overlap-hero-carousel .mt-txt, .ml-overlap-carousel .mt-txt { position: relative; margin: -9px 0 0 4px; padding: 2px 4px; border-radius: 3px; background: #fff; color: #1a1a1a; box-shadow: 0 3px 6px -3px rgb(0 0 0 / .45); }
.ml-overlap-hero-grid .mt-ph, .ml-overlap-hero-carousel .mt-ph, .ml-overlap-carousel .mt-ph { border-radius: 5px; }
.layout-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.layout-pick { display: grid; gap: 6px; padding: 6px 6px 8px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: center; cursor: pointer; }
.layout-pick.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.layout-pick small { font-size: .78rem; font-weight: 600; line-height: 1.2; }
.mini-lay { height: 118px; padding: 8px; }
.mini-recorte .mt-name { text-transform: uppercase; color: var(--p); text-shadow: 1px 1px 0 var(--a); }

/* Toques propios de algunas plantillas */
.mini-premium-dark .mt-price, .mini-premium-dark .mt-name { color: var(--p); }
.mini-street-food .mt-prod { border: 2px solid #111; box-shadow: 2px 2px 0 #111; }
.mini-street-food .mt-price { padding: 0 4px; background: var(--a); color: var(--aink); border: 1px solid #111; }
.mini-street-food .mt-name, .mini-taqueria .mt-name { color: var(--p); }
.mini-mexican-modern .mt-hero { box-shadow: inset 0 -5px 0 var(--a); }
.mini-taqueria .mt-name { font-weight: 900; }
.mini-asian .mt-logo { border-radius: 3px; background: var(--p); }
.mini-asian .mt-prods { border-left: 2px solid var(--p); padding-left: 6px; }
.mini-italian { box-shadow: inset 0 9px 0 -3px var(--p); padding-top: 14px; }
.mini-italian .mt-name { color: var(--p); }
.mini-coffee .mt-ph { border-radius: 50%; outline: 1px dashed var(--a); outline-offset: 1px; }
.mini-bakery .mt-prod { outline: 1px dashed var(--a); outline-offset: -3px; }
.mini-fitness .mt-price { padding: 0 5px; border-radius: 99px; background: var(--a); color: var(--aink); }
.mini-organic .mt-ph { border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%; }
.mini-organic .mt-name { color: var(--p); }
.mini-luxury { box-shadow: inset 0 0 0 4px var(--b), inset 0 0 0 5px var(--a); }
.mini-luxury .mt-name { font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; }
.mini-luxury .mt-lead { border-bottom-color: var(--a); }
.mini-neon .mt-name { text-shadow: 0 0 6px var(--p), 0 0 14px var(--p); }
.mini-neon .mt-hero { background: linear-gradient(160deg, color-mix(in srgb, var(--p) 35%, var(--b)), var(--b)); color: var(--ink); box-shadow: 0 1px 0 var(--p); }
.mini-neon .mt-prod { box-shadow: 0 0 0 1px var(--a), 0 0 10px -2px var(--a); background: color-mix(in srgb, var(--b) 90%, #fff); color: var(--ink); }
.mini-neon .mt-price { color: var(--a); }
.mini-retro .mt-hero { box-shadow: inset 0 -4px 0 var(--a), inset 0 -8px 0 #e9c46a; padding-bottom: 14px; }
.mini-pop .mt-prod { border: 1.5px solid #151515; box-shadow: 2px 2px 0 #151515; }
.mini-pop .mt-prod:first-child { background: color-mix(in srgb, var(--p) 18%, #fff); }
.mini-pop .mt-prod + .mt-prod { background: color-mix(in srgb, var(--a) 18%, #fff); }
.mini-pop .mt-name { color: var(--p); text-shadow: 2px 2px 0 var(--a); }
.mini-monochrome .mt-name { color: var(--p); }
.mini-monochrome .mt-prod::after { background: linear-gradient(to top, color-mix(in srgb, var(--p) 75%, #000), transparent 80%); }
.mini-editorial .mt-hero { border-top: 4px solid var(--ink); padding-top: 5px; }
.mini-editorial .mt-name { font-size: 1.2rem; }
.mini-cards .mt-prod { background: #fff; box-shadow: 0 3px 8px -4px rgb(16 24 40 / .35); }
.mini-premium-dynamic .mt-hero { background: linear-gradient(to top, rgb(0 0 0 / .7), rgb(0 0 0 / .1)), linear-gradient(120deg, var(--p), var(--a)); }
.mini-premium-dynamic .mt-price { padding: 0 5px; border-radius: 99px; background: var(--a); color: var(--aink); }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 42px; padding: 2px; border: 1px solid #d4d4d8; border-radius: 10px; background: #fff; cursor: pointer; }
.color-row .hex { font-family: ui-monospace, monospace; text-transform: lowercase; }

/* ---------- Encabezado con interruptor grande (portada difuminada, mover elementos) ---------- */
.decor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.decor-head p { margin: 4px 0 0; }
.switch-big { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: none; user-select: none; }
.switch-big input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #d4d4d8; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .2s; }
.switch-big input:checked + .switch-track { background: var(--ok); }
.switch-big input:checked + .switch-track::after { transform: translateX(22px); }
.switch-big input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.switch-big strong { min-width: 96px; font-size: .92rem; }
@media (max-width: 720px) { .decor-head { flex-direction: column; } }

/* ---------- Tipografías ---------- */
.font-picker { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.font-picker[open] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.font-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; list-style: none; }
.font-summary::-webkit-details-marker { display: none; }
.font-summary-title, .font-summary-current { display: grid; gap: 2px; min-width: 0; }
.font-summary-title small, .font-summary-current small { color: var(--muted); font-size: .78rem; }
.font-sample { font-size: 1.45rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-picker[open] .font-change { background: var(--ink); color: #fff; border-color: var(--ink); }
.font-body { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 10px; }
.font-tools { display: grid; gap: 8px; }
.font-tools input[type=search] { width: 100%; font: inherit; border: 1px solid #d4d4d8; border-radius: 10px; padding: 8px 12px; min-height: 40px; }
.font-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px; }
.font-opt { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink); font: inherit; }
.font-opt:hover { border-color: #a1a1aa; }
.font-opt.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.font-opt small { color: var(--muted); font-size: .72rem; }
/* Tamaño de letra y combinaciones de tipografías */
.size-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.size-range { flex: 1 1 200px; accent-color: var(--brand); height: 28px; cursor: pointer; }
.size-a { font-weight: 700; color: var(--muted); line-height: 1; }
.size-a.sm { font-size: .8rem; } .size-a.lg { font-size: 1.35rem; }
.nl-thumb { max-width: 220px; max-height: 70px; object-fit: contain; padding: 6px; border-radius: 8px; background: repeating-conic-gradient(#eceef2 0 25%, #fff 0 50%) 0 0 / 14px 14px; border: 1px solid var(--line); }
.size-out { min-width: 4.5ch; font-weight: 650; font-variant-numeric: tabular-nums; }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.pair { display: grid; gap: 4px; align-content: start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; font: inherit; min-width: 0; }
.pair:hover { border-color: #a1a1aa; }
.pair.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.pair-head { font-size: 1.35rem; line-height: 1.1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair-body { font-size: .9rem; color: var(--ink-2); }
.pair small { color: var(--muted); font-size: .74rem; line-height: 1.4; margin-top: 4px; }
.pair small strong { color: var(--ink); font-weight: 600; }
.pair small em { font-style: normal; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.own-color { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; cursor: pointer; }
.color-row input[type=color]:disabled { opacity: .35; cursor: not-allowed; }
.font-name { font-size: 1.3rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .font-summary { grid-template-columns: 1fr auto; } .font-summary-current { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Imagen de referencia ---------- */
.ref { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 5%, #fff), #fff 60%); }
.ref-result { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 720px) { .ref-result { grid-template-columns: 1fr; } }
.ref-thumb { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.ref-info { display: grid; gap: 12px; }
.ref-why { margin: 0; font-weight: 700; font-size: 1.02rem; }
.ref-proposal { display: flex; flex-wrap: wrap; gap: 10px; }
.ref-sw { display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
.ref-sw i { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgb(0 0 0 / .12); }
.ref-sw small { color: var(--muted); font-size: .72rem; }
.ref-sw code, .ref-color code { font-size: .78rem; }
.ref-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ref-color { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 4px 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ref-chip { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgb(0 0 0 / .12); }
.ref-roles { grid-column: 1 / -1; display: flex; gap: 4px; }
.ref-roles .btn-sm { min-height: 28px; padding: 0 7px; font-size: .72rem; flex: 1; }

/* Las columnas de una sola pieza nunca se ensanchan más que la pantalla
   (las listas con desplazamiento horizontal, como los filtros, se quedan dentro). */
:is(.page, .ed-main, .ed-panel, .ed-form, .sub-panel, .new-flow, .dash-col, .card, .ecard, .acc-body, .step-card, .module-card, .prod-groups) { grid-template-columns: minmax(0, 1fr); }

/* Plan de pago (mensualidades) */
.bill-list { display: grid; gap: 10px; }
.bill-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.bill-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bill-top strong { display: block; }
.bill-actions { display: flex; gap: 8px; align-items: center; }
.bill-actions select { min-height: 36px; }
.bill-st { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; }
.bill-st .ico { width: 16px; height: 16px; }
.bill-st.fijo { color: var(--muted); }
.bill-st.activo { color: var(--ok); }
.bill-st.tolerancia { color: var(--warn); }
.bill-st.pausado { color: var(--err); }
.bill-hist summary { cursor: pointer; font-size: .85rem; color: var(--muted); }
.bill-hist ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: .85rem; }
.bill-hist li { display: flex; gap: 10px; justify-content: space-between; }
/* Avisos de mensualidad en el portal del negocio */
.bill-notices:empty { display: none; }
.bill-notices { display: grid; gap: 6px; padding: 10px 16px 0; }
.bill-notice { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-size: .88rem; font-weight: 600; }
.bill-notice .ico { width: 16px; height: 16px; flex: none; }
.bill-notice.ok { background: var(--ok-soft); color: var(--ok); }
.bill-notice.warn { background: var(--warn-soft); color: var(--warn); }
.bill-notice.err { background: var(--err-soft); color: var(--err); }
/* Forma de los botones del menú (Apariencia → Plantilla) */
.shape-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(110px, 100%), 1fr)); gap: 8px; }
.shape-opt { display: grid; justify-items: center; gap: 8px; padding: 12px 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.shape-opt:hover { border-color: #a1a1aa; }
.shape-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.shape-opt small { font-size: .78rem; font-weight: 550; }
.shape-demo { display: flex; align-items: center; gap: 5px; }
.sd-btn { width: 44px; height: 22px; background: var(--ink); border-radius: 11px; }
.sd-ico { display: grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--ink); border-radius: 7px; color: var(--ink); }
.sd-ico .ico { width: 13px; height: 13px; }
.sh-tpl .sd-btn { background: color-mix(in srgb, var(--ink) 35%, transparent); }
.sh-tpl .sd-ico { border-style: dashed; }
.sh-square :is(.sd-btn, .sd-ico) { border-radius: 2px; }
.sh-rounded :is(.sd-btn, .sd-ico) { border-radius: 6px; }
.sh-round .sd-btn { border-radius: 11px; } .sh-round .sd-ico { border-radius: 50%; }
.sh-leaf :is(.sd-btn, .sd-ico) { border-radius: 9px 2px 9px 2px; }
.sh-plain .sd-btn { border-radius: 5px; } .sh-plain .sd-ico { border-color: transparent; }
.sh-plain .sd-ico .ico { width: 17px; height: 17px; }
/* Sucursales (Información → Dirección) */
.branch-card { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed #e3dcff; }
.branch-rows { display: grid; gap: 4px; }
.branch-row .row { flex-wrap: nowrap; }
.branch-row .row input { flex: 1; min-width: 0; }
.badge.plan-nfpos { background: #e7f6ee; color: #1f6b43; }

/* Miniatura de la composición de tienda (catálogos): fotos altas sin caja */
.ml-shop .mt-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ml-shop .mt-prod { flex-direction: column; align-items: stretch; gap: 3px; background: none; }
.ml-shop .mt-ph { width: 100%; height: 46px; border-radius: 3px; }
.ml-shop .mt-txt { flex-direction: column; gap: 1px; padding: 0 1px; }
.ml-shop .mt-lead { display: none; }.ml-shop-square .mt-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ml-shop-square .mt-prod { flex-direction: column; align-items: stretch; gap: 0; overflow: hidden; border-radius: 6px; background: color-mix(in srgb, var(--b) 40%, #fff); color: #1a1a1a; }
.ml-shop-square .mt-ph { width: 100%; height: 36px; border-radius: 0; background: #fff; }
.ml-shop-square .mt-txt { flex-direction: column; gap: 1px; padding: 4px 5px 5px; }
.ml-shop-square .mt-lead { display: none; }
.ml-shop-list .mt-prod { border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); padding-bottom: 4px; }
.ml-shop-list .mt-ph { width: 16px; height: 16px; border-radius: 3px; }
/* Agotado hoy por sucursal */
.form-plain .check-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.form-plain .check-row input { width: 18px; height: 18px; }
