/* =========================================================
   Panel y editor
   ========================================================= */
:root {
    --paper: #f2f3f6;
    --surface: #ffffff;
    --ink: #15171c;
    --muted: #5d6474;
    --line: #dfe2e9;
    --line-strong: #c9cdd7;
    --brand: #3b30c9;
    --brand-hover: #2e25a8;
    --brand-soft: #ecebfc;
    --ok: #127a50;
    --ok-soft: #e4f4ec;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 18px;
    --shadow: 0 1px 2px rgba(20, 22, 30, .06), 0 8px 24px rgba(20, 22, 30, .06);
    --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.app {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.ic { width: 18px; height: 18px; flex: 0 0 auto; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand__mark {
    width: 26px; height: 18px; border-radius: 4px; position: relative;
    background: var(--brand);
    transform: rotate(-8deg);
}
.brand__mark::after {
    content: ""; position: absolute; left: 5px; top: 5px; width: 7px; height: 7px;
    border-radius: 50%; background: #fff;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 16px;
    border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink);
    font: 600 14px/1.2 var(--font);
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: #f6f7f9; border-color: #b9bec9; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: rgba(20, 22, 30, .06); border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--danger:not(.btn--ghost) { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.btn--lg { min-height: 52px; padding: 12px 24px; font-size: 16px; border-radius: var(--r); }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 38px; min-height: 38px; }
.btn--sm.btn--icon { width: 34px; min-height: 34px; }
.btn.is-done { color: var(--ok); border-color: var(--ok); }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.link-sm { font-size: 13px; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field__label, .field > legend { font-weight: 600; font-size: 13.5px; padding: 0; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=url], input:not([type]), select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font: 15px/1.4 var(--font);
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.help { font-size: 12.5px; color: var(--muted); }
.field__error { font-size: 13px; color: var(--danger); font-weight: 600; }
.help.is-ok { color: var(--ok); }
.help.is-bad { color: var(--danger); }

.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.input-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input-prefix > span { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--muted); font-size: 14px; background: #f7f8fa; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line); padding-right: 10px; }
.input-prefix input { border: 0; box-shadow: none !important; border-radius: 0; min-width: 0; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--brand); }

/* Interruptor */
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 40px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #c6cad4; transition: background-color .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.switch-row small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.switch-row--strong { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fafbfc; }

/* Botones segmentados */
.segmented { display: flex; padding: 3px; gap: 3px; background: #eceef2; border-radius: 10px; }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.segmented span { display: block; text-align: center; padding: 7px 6px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20,22,30,.12); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }

/* Selector de color */
.color-pick { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.color-pick input[type=color] { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; cursor: pointer; flex: 0 0 auto; }
.color-pick input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.color-pick input[type=color]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.color-pick input[type=color]::-moz-color-swatch { border: 0; border-radius: 7px; }
.color-pick small { display: block; font-weight: 400; color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 12px; text-transform: uppercase; }
.color-pick--field { padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }

/* Subida de imagen */
.img-field { display: flex; align-items: center; gap: 14px; }
.img-field__preview { flex: 0 0 auto; display: grid; place-items: center; background: #eceef2; color: #9aa0ad; overflow: hidden; border: 1px dashed var(--line-strong); }
.img-field__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-field--round .img-field__preview { width: 76px; height: 76px; border-radius: 50%; }
.img-field--wide .img-field__preview { width: 128px; height: 64px; border-radius: 10px; }
.img-field--tall .img-field__preview { width: 64px; height: 96px; border-radius: 10px; }
.img-field__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.img-field__actions label { cursor: pointer; }
.img-field.is-loading .img-field__preview { opacity: .5; }

/* ---------- Avisos ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); margin-bottom: 18px; font-weight: 600; font-size: 14px; }
.flash--ok { background: var(--ok-soft); color: var(--ok); }
.flash--error { background: var(--danger-soft); color: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }
.badge--muted { background: #eceef2; color: var(--muted); }
.badge .ic { width: 13px; height: 13px; }

.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 100;
    transform: translate(-50%, 20px); opacity: 0;
    padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff;
    font-weight: 600; font-size: 14px; box-shadow: var(--shadow);
    transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--danger); }

/* ---------- Diálogos ---------- */
.dialog {
    width: min(94vw, 440px);
    max-height: 90vh;
    border: 0; padding: 20px;
    border-radius: var(--r-lg);
    background: var(--surface); color: var(--ink);
    box-shadow: 0 30px 80px rgba(10, 12, 20, .3);
}
.dialog--wide { width: min(94vw, 640px); }
.dialog::backdrop { background: rgba(14, 16, 24, .5); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* QR */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr-box__canvas { width: 240px; max-width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.qr-box__canvas svg { width: 100%; height: 100%; display: block; }
.qr-box__url { font-weight: 600; word-break: break-all; }
.qr-box__colors { display: flex; gap: 18px; }
.qr-box__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Menú desplegable */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px;
}
.menu__list a, .menu__list button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px;
    border: 0; background: none; font: 600 14px var(--font); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.menu__list a:hover, .menu__list button:hover { background: #f3f4f7; }
.menu__list .danger { color: var(--danger); }
.menu__list form { margin: 0; }

/* =========================================================
   Layout del panel
   ========================================================= */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar__inner { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 24px; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; }
.topnav a:hover { color: var(--ink); background: #f3f4f7; }
.topnav a.is-active { color: var(--ink); background: var(--brand-soft); }
.topbar__user { display: flex; align-items: center; gap: 8px; margin: 0; }
.topbar__name { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
    .topbar__inner { gap: 10px; flex-wrap: wrap; }
    .topbar__name, .topbar__user .btn span { display: none; }
    .topnav { order: 3; flex-basis: 100%; }
}

.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }

.panels { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel h2 { margin-bottom: 16px; }

/* Tarjetas del panel: miniatura con aspecto de tarjeta física */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; }
.card-tile__visual {
    position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px;
    align-items: center; align-content: center;
    margin: 14px 14px 0; padding: 22px 18px; min-height: 124px;
    border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink);
    background: #f7f7f9; border: 1px solid #eceef2;
}
.card-tile__band { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--tile-accent); }
.card-tile__avatar { grid-row: 1 / span 2; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.card-tile__avatar--initials { display: grid; place-items: center; background: var(--tile-accent); color: var(--tile-on); font-weight: 700; font-size: 1.4rem; }
.card-tile__name { font-weight: 700; font-size: 1.05rem; align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tile__role { color: var(--muted); font-size: 13.5px; align-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tile__visual:hover { border-color: var(--tile-accent); }
.card-tile__body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 4px; }
.card-tile__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-tile__title h2 { font-size: 1rem; }
.card-tile__url { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.card-tile__url:hover { text-decoration: underline; }
.card-tile__stats { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.card-tile__stats .ic { width: 15px; height: 15px; }
.card-tile__actions { display: flex; gap: 6px; padding: 10px 14px 14px; margin-top: auto; flex-wrap: wrap; }

.empty { text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty p { color: var(--muted); max-width: 42ch; margin-bottom: 8px; }
.empty__art { position: relative; width: 120px; height: 84px; margin-bottom: 10px; }
.empty__art span { position: absolute; width: 96px; height: 60px; border-radius: 10px; border: 2px solid var(--line-strong); background: #fff; }
.empty__art span:first-child { left: 0; top: 18px; transform: rotate(-8deg); }
.empty__art span:last-child { right: 0; top: 0; transform: rotate(6deg); border-color: var(--brand); box-shadow: inset 10px 0 0 var(--brand); }

/* Selector de plantilla */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.tpl { position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.tpl input { position: absolute; opacity: 0; }
.tpl__img { display: block; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #eceef2; border: 2px solid var(--line); transition: border-color .15s; }
.tpl__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl__name { font-weight: 600; font-size: 13.5px; text-align: center; }
.tpl input:checked + .tpl__img { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.tpl input:focus-visible + .tpl__img { outline: 3px solid var(--brand); outline-offset: 2px; }

/* =========================================================
   Autenticación
   ========================================================= */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 20px; gap: 28px; }
.auth__panel { width: min(100%, 400px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 28px; box-shadow: var(--shadow); }
.auth__title { margin-bottom: 20px; }
.auth__lead { color: var(--muted); margin: -8px 0 18px; }
.auth__aside { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; align-items: baseline; }
.auth__aside a { font-weight: 600; }

/* =========================================================
   Portada
   ========================================================= */
.site-head { max-width: 1120px; margin: 0 auto; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.site-head__nav { display: flex; gap: 8px; }
.hero { max-width: 1120px; margin: 0 auto; padding: 40px 20px 20px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; max-width: 14ch; }
.hero p { margin-top: 20px; font-size: 1.12rem; color: var(--muted); max-width: 46ch; line-height: 1.6; }
.hero__cta { margin-top: 28px; }
.hero__demo { display: flex; justify-content: center; }
.demo-phone { width: 300px; padding: 12px; border-radius: 44px; background: #16181d; box-shadow: 0 40px 80px rgba(20, 22, 30, .25); transform: rotate(3deg); }
.demo-card { border-radius: 34px; overflow: hidden; background: #f1f0f7; padding-bottom: 22px; text-align: center; }
.demo-card__cover { height: 110px; background: linear-gradient(135deg, var(--brand), #9f98f0); }
.demo-card__avatar { width: 84px; height: 84px; margin: -42px auto 0; border-radius: 50%; border: 4px solid #f1f0f7; background: #231c8f; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; position: relative; }
.demo-card__name { font-weight: 800; font-size: 1.25rem; margin-top: 10px; }
.demo-card__role { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.demo-card__btn { margin: 8px 16px 0; padding: 12px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; justify-content: center; }
.demo-card__btn--main { background: #fff; color: var(--ink); border: 1.5px solid #d8d6ea; }
.demo-card__socials { display: flex; justify-content: center; gap: 10px; margin-top: 16px; color: var(--brand); }
.demo-card__socials .ic { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: #e3e1f7; }
.points { max-width: 1120px; margin: 40px auto 0; padding: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.point { padding-top: 18px; border-top: 2px solid var(--ink); }
.point__ic { width: 26px; height: 26px; color: var(--brand); margin-bottom: 10px; }
.point h2 { margin-bottom: 6px; }
.point p { color: var(--muted); }
.site-foot { max-width: 1120px; margin: 40px auto 0; padding: 24px 20px 40px; color: var(--muted); font-size: 14px; }
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 20px; }
    .points { grid-template-columns: 1fr; }
}

/* Páginas de error */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.bare__box { text-align: center; max-width: 420px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.bare__code { font-size: 4rem; font-weight: 800; color: var(--brand); letter-spacing: -0.04em; line-height: 1; }
.bare__box p { color: var(--muted); }

/* =========================================================
   Editor
   ========================================================= */
.app--editor { height: 100vh; height: 100dvh; overflow: hidden; }
.ed { height: 100%; display: flex; flex-direction: column; }
.ed-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.ed-bar__title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.ed-bar__title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-bar__url { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ed-bar__actions { display: flex; gap: 4px; }
.save-status { font-size: 13px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.save-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.save-status.is-saving::before { background: #e0a100; }
.save-status.is-saved::before { background: var(--ok); }
.save-status.is-error { color: var(--danger); }
.save-status.is-error::before { background: var(--danger); }

.ed-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 480px) 1fr; }
.ed-panel { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }

.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 5; }
.tabs button {
    flex: 1; display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px 10px; border: 0; background: none; cursor: pointer;
    font: 600 12.5px var(--font); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

.pane { padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 18px; }
.pane__intro { color: var(--muted); font-size: 13.5px; }
.pane__sub { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin-top: 8px; }
.subpanel { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.subpanel--danger .pane__sub { color: var(--danger); }
.inline-form { display: flex; gap: 8px; width: 100%; }
.inline-form input { flex: 1; }

/* Lista de bloques */
.block-list { display: flex; flex-direction: column; gap: 8px; }
.block-empty { text-align: center; color: var(--muted); padding: 24px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.bi { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: box-shadow .15s, opacity .15s; }
.bi.is-open { border-color: var(--line-strong); box-shadow: var(--shadow); }
.bi.is-off .bi__head { opacity: .55; }
.bi.is-dragging { opacity: .4; }
.bi.is-drop-before { box-shadow: 0 -3px 0 var(--brand); }
.bi.is-drop-after { box-shadow: 0 3px 0 var(--brand); }
.bi__head { display: flex; align-items: center; gap: 4px; padding: 6px 10px 6px 4px; }
.bi__grip { display: grid; place-items: center; width: 28px; height: 40px; color: #a3a8b4; cursor: grab; flex: 0 0 auto; }
.bi__grip:active { cursor: grabbing; }
.bi__toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.bi__icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.bi__label { min-width: 0; display: flex; flex-direction: column; }
.bi__name { font-weight: 700; font-size: 14px; }
.bi__summary { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi__chev { color: var(--muted); margin-left: auto; transition: transform .15s; }
.bi.is-open .bi__chev { transform: rotate(180deg); }
.bi__form { padding: 6px 14px 14px; border-top: 1px solid var(--line); padding-top: 14px; gap: 14px; }
.bi__foot { display: flex; gap: 4px; }
.bi__foot .btn--danger { margin-left: auto; }

/* Selector de bloques */
.picker__cat { font-size: 13px; color: var(--muted); margin: 16px 0 8px; font-weight: 700; }
.picker__cat:first-of-type { margin-top: 0; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.picker__item { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.picker__item:hover { border-color: var(--brand); background: #fafaff; }
.picker__item strong { display: block; font-size: 14px; }
.picker__item small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.picker__icon { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.picker__item[disabled] { opacity: .5; cursor: wait; }

/* Vista previa: teléfono */
.ed-preview { overflow: auto; display: flex; align-items: center; justify-content: center; padding: 24px; background:
    radial-gradient(circle at 1px 1px, #d5d8e0 1px, transparent 0) 0 0 / 22px 22px, var(--paper); }
.phone {
    width: 380px; height: min(780px, calc(100dvh - 120px)); min-height: 520px;
    padding: 12px; border-radius: 52px; background: #15171c;
    box-shadow: 0 0 0 2px #2b2e36, 0 40px 80px rgba(20, 22, 30, .28);
    position: relative; flex: 0 0 auto;
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #15171c; z-index: 2; }
.phone__screen { width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: #fff; }
.phone__screen iframe { width: 100%; height: 100%; border: 0; display: block; transition: opacity .2s; }
.phone__screen iframe.is-loading { opacity: .6; }
.ed-preview-toggle { display: none; }
.hide-sm { }

@media (max-width: 900px) {
    .ed-main { grid-template-columns: 1fr; position: relative; }
    .ed-panel { border-right: 0; }
    .ed-preview { position: absolute; inset: 0; z-index: 10; display: none; padding: 12px; }
    .ed.is-previewing .ed-preview { display: flex; }
    .phone { width: min(380px, 100%); height: 100%; min-height: 0; border-radius: 44px; }
    .phone__screen { border-radius: 34px; }
    .ed-preview-toggle { display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 20; border-radius: 999px; box-shadow: var(--shadow); min-height: 46px; padding: 10px 18px; }
    .save-status { display: none; }
    .save-status.is-error, .save-status.is-saving { display: inline-flex; }
}
@media (max-width: 560px) {
    .hide-sm { display: none; }
    .ed-bar { gap: 6px; padding: 8px 8px; }
    .pane { padding: 16px 14px 90px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* =========================================================
   Fase 2: planes, pagos y administración
   ========================================================= */
.is-ok { color: var(--ok); font-weight: 600; }
.is-bad { color: var(--danger); font-weight: 600; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.flash--warn { background: #fff6e0; color: #7a5200; }
.flash--info { background: #e8f0fe; color: #1d4fbf; }
.lock-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12.5px; }
.lock-link .ic { width: 13px; height: 13px; }
.locked-set { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; opacity: .55; }
.tpl--locked { cursor: not-allowed; }
.tpl--locked .tpl__img { position: relative; filter: grayscale(.6); opacity: .7; }
.tpl__lock { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.tpl__lock .ic { width: 14px; height: 14px; }
.tpl { position: relative; }
.picker__item--locked { text-decoration: none; opacity: .7; }
.picker__item--locked .picker__icon { background: #eceef2; color: var(--muted); }
.btn.is-static { cursor: default; background: #f3f4f7; }
.form-wide { max-width: 820px; }
.form-actions { display: flex; justify-content: flex-end; }
.danger-zone { max-width: 820px; margin-top: 16px; display: flex; justify-content: flex-end; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel__head h2 { margin: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plain-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }

/* Estados */
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #eceef2; color: var(--muted); }
.status--lg { font-size: 13.5px; padding: 5px 12px; }
.status--pending { background: #fff3d6; color: #7a5200; }
.status--review { background: #e6eefe; color: #1d4fbf; }
.status--paid { background: var(--ok-soft); color: var(--ok); }
.status--rejected, .status--refunded { background: var(--danger-soft); color: var(--danger); }

/* Tablas y filtros */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table tr.is-muted td { opacity: .55; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 16px; }
.pager a { min-width: 34px; padding: 6px 10px; text-align: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.pager a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Franja del plan en "Mis tarjetas" */
.plan-strip { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin: -8px 0 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.plan-strip span { color: var(--muted); margin-left: 8px; font-size: 14px; }
.plan-strip--warn { background: #fff6e0; border-color: #f3dca0; }

/* Página de precios */
.pricing__head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0 30px; }
.pricing__head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; }
.pricing__toggles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.pricing__toggles .segmented span { white-space: nowrap; padding: 7px 14px; }
@media (max-width: 480px) { .pricing__toggles .segmented { width: 100%; } .pricing__toggles .segmented span { white-space: normal; padding: 7px 6px; } }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.plan--highlight { border: 2px solid var(--brand); box-shadow: 0 18px 40px rgba(59, 48, 201, .12); }
.plan--current { background: #fafbff; }
.plan__tag { position: absolute; top: -12px; left: 22px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan__name { font-size: 1.3rem; }
.plan__desc { color: var(--muted); font-size: 14px; margin-top: -8px; }
.plan__price { min-height: 44px; display: flex; align-items: baseline; }
.plan__opt { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan__amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.plan__unit { color: var(--muted); font-size: 14px; }
.plan__na { color: var(--muted); font-size: 14px; }
.plan__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; flex: 1; }
.plan__list li { display: flex; gap: 8px; align-items: flex-start; }
.plan__list .ic { color: var(--ok); margin-top: 2px; width: 16px; height: 16px; }
.plan__list li.is-off { color: #9aa0ad; }
.plan__list li.is-off .ic { color: #b5bac5; }
.plan__cta { display: flex; flex-direction: column; gap: 6px; align-items: center; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.checkout__side { position: sticky; top: 80px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .checkout__side { position: static; } }
.pay-methods { display: grid; gap: 10px; }
.pay-method, .period { position: relative; cursor: pointer; }
.pay-method input, .period input { position: absolute; opacity: 0; }
.pay-method__box { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.pay-method__box .ic { width: 26px; height: 26px; color: var(--brand); flex: 0 0 auto; }
.pay-method__box small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.pay-method input:checked + .pay-method__box, .period input:checked + .period__box { border-color: var(--brand); background: #fafaff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.pay-method input:focus-visible + .pay-method__box, .period input:focus-visible + .period__box { outline: 3px solid var(--brand); outline-offset: 2px; }
.period-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.period__box { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); }
.period__box span { color: var(--muted); font-size: 14px; }
.summary h2 { margin-bottom: 12px; }
.summary__plan { font-weight: 700; margin-bottom: 10px; }
.summary dl { margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.summary dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary__total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }
.summary__total dt, .summary__total dd { font-size: 16px; font-weight: 800; color: var(--ink); }
.summary .field { margin-bottom: 14px; }
.summary form { margin-top: 8px; }

/* Mi plan */
.plan-now__name { font-size: 1.7rem; letter-spacing: -0.02em; margin: 2px 0 6px; }
.plan-now__state { color: var(--muted); }
.plan-now--warn { border-color: #f3dca0; background: #fffbf0; }
.usage { margin: 18px 0; }
.usage__row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.usage__bar { height: 8px; border-radius: 999px; background: #eceef2; overflow: hidden; }
.usage__bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.plan-now__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Pedido y pago por QR */
.pay-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .pay-layout { grid-template-columns: 1fr; } }
.qr-pay h2 { margin-bottom: 14px; }
.qr-pay .flash { margin-bottom: 16px; }
.qr-pay__grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
@media (max-width: 620px) { .qr-pay__grid { grid-template-columns: 1fr; } }
.qr-pay__img { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.qr-pay__img img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.ref { font-family: ui-monospace, Menlo, monospace; background: var(--brand-soft); color: var(--brand); padding: 1px 7px; border-radius: 6px; cursor: pointer; }
.bank { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 20px 0 8px; padding: 14px; border-radius: var(--r); background: #f7f8fa; }
.bank dt { font-size: 12.5px; color: var(--muted); }
.bank dd { margin: 0; font-weight: 700; }
.proof-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.proof-form h3 { font-size: 1rem; }
.proof-img { max-width: 100%; max-height: 640px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.decide { gap: 18px; }

/* Administración */
.app--admin { background: var(--paper); }
.adm { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.adm__side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.adm__side .brand { padding: 4px 8px 10px; }
.adm__label { font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px 2px; }
.adm__nav { display: flex; flex-direction: column; gap: 2px; }
.adm__nav a, .adm__back { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.adm__nav a:hover, .adm__back:hover { background: #f3f4f7; }
.adm__nav a.is-active { background: var(--brand-soft); color: var(--brand); }
.adm__nav .count { margin-left: auto; background: var(--brand); color: #fff; font-size: 11.5px; border-radius: 999px; padding: 1px 7px; }
.adm__back { margin-top: auto; color: var(--muted); }
.adm__main { padding: 28px 28px 60px; min-width: 0; max-width: 1180px; }
@media (max-width: 860px) {
    .adm { grid-template-columns: 1fr; }
    .adm__side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .adm__nav { flex-direction: row; flex-wrap: wrap; }
    .adm__back { margin-top: 4px; }
    .adm__main { padding: 20px 16px 60px; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { font-size: 1.7rem; letter-spacing: -0.02em; }
.stat small { color: var(--muted); }
.price-grid { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 8px 12px; align-items: center; max-width: 520px; }
.price-grid strong { font-size: 13px; color: var(--muted); }
.qr-row { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid #eef0f3; align-items: start; }
.qr-row:first-of-type { border-top: 0; }
.qr-row__img { width: 96px; height: 96px; border-radius: 10px; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: #a3a8b4; overflow: hidden; background: #fff; }
.qr-row__img img { width: 100%; height: 100%; object-fit: contain; }
.qr-row__img .ic { width: 30px; height: 30px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }
.check-grid.is-disabled { opacity: .45; }
.cron-box { background: #f7f8fa; border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.cron-box code { display: block; background: #15171c; color: #e8e9ef; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.panel h2 .ic { vertical-align: -3px; margin-right: 4px; }

/* =========================================================
   Fase 3: crecimiento
   ========================================================= */
.topnav .count, .adm__nav .count { display: inline-block; margin-left: 4px; background: var(--brand); color: #fff; font-size: 11px; line-height: 1.5; border-radius: 999px; padding: 0 6px; vertical-align: 1px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.row-actions--end { justify-content: flex-end; }
.kv { margin: 0; display: grid; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.empty-mini { text-align: center; padding: 34px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-mini .ic { width: 34px; height: 34px; color: #b3b8c4; }
.upsell { display: flex; gap: 18px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.upsell > .ic { width: 40px; height: 40px; color: var(--brand); flex: 0 0 auto; }
.upsell > div { flex: 1 1 260px; }
.upsell h2 { margin-bottom: 4px; }
.pager--center { justify-content: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Estadísticas */
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 520px; height: auto; display: block; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart__bar { fill: var(--brand); rx: 3; }
.chart__bar:hover { fill: color-mix(in srgb, var(--brand) 75%, #000); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.stat-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stat-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; }
.stat-list__k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-list__n { font-weight: 700; }
.stat-list__bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: #eceef2; overflow: hidden; }
.stat-list__bar span { display: block; height: 100%; background: color-mix(in srgb, var(--brand) 70%, #fff); border-radius: 999px; }

/* Mensajes */
.inbox { list-style: none; margin: 0 -8px; padding: 0; }
.inbox li + li { border-top: 1px solid #eef0f3; }
.inbox a { display: grid; grid-template-columns: 220px 1fr auto; gap: 14px; align-items: center; padding: 12px 8px; text-decoration: none; color: var(--ink); border-radius: 8px; }
.inbox a:hover { background: #f7f8fa; }
.inbox__who { display: flex; flex-direction: column; min-width: 0; }
.inbox__who strong, .inbox__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__who small, .inbox__msg { color: var(--muted); }
.inbox__msg { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox__meta { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.inbox li:not(.is-unread) strong { font-weight: 500; }
.inbox li.is-unread .inbox__msg { color: var(--ink); }
.inbox li.is-unread a { box-shadow: inset 3px 0 0 var(--brand); }
@media (max-width: 720px) { .inbox a { grid-template-columns: 1fr auto; } .inbox__msg { grid-column: 1 / -1; grid-row: 2; } }
.message-body { white-space: pre-wrap; background: #f7f8fa; border-radius: var(--r); padding: 16px; line-height: 1.6; margin: 0; }

/* Dominios */
.domain { margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.domain__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.domain__head h2 { margin-bottom: 4px; word-break: break-all; }
.domain__foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid #eef0f3; padding-top: 14px; }
.domain__foot select { width: auto; }
.table.dns code, .domain code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: #f3f4f7; padding: 2px 6px; border-radius: 5px; word-break: break-all; }
.table.dns code[data-copy] { cursor: pointer; }
.table.dns code[data-copy]:hover { background: var(--brand-soft); color: var(--brand); }
.howto { margin-bottom: 16px; }
.howto summary { cursor: pointer; }
.howto[open] summary { margin-bottom: 12px; }

/* Afiliados */
.ref-link input { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }

/* Directorio público */
.dir-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0 22px; }
.dir-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.03em; }
.dir-search { display: flex; gap: 8px; width: 100%; max-width: 680px; margin-top: 10px; flex-wrap: wrap; }
.dir-search input[type=search] { flex: 2 1 240px; width: auto; }
.dir-search input[name=city] { flex: 1 1 140px; width: auto; }
.dir-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; scrollbar-width: thin; }
.dir-cats a { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.dir-cats a span { color: var(--muted); font-weight: 500; }
.dir-cats a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.dir-cats a.is-active span { color: #c9ccd4; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dir-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.dir-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(20, 22, 30, .06); }
.dir-card > .ic { color: var(--muted); flex: 0 0 auto; }
.dir-card__avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 20px; }
.dir-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dir-card__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dir-card__body span, .dir-card__body small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-card__body span { font-size: 14px; }
.dir-cta { text-align: center; margin: 44px auto 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.site-foot a { color: inherit; }

/* Editor: listas repetibles */
.rep { display: flex; flex-direction: column; gap: 10px; }
.rep__list { display: flex; flex-direction: column; gap: 10px; }
.rep__item { border: 1px solid var(--line); border-radius: var(--r); background: #fafbfc; }
.rep__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.rep__head strong { font-size: 13px; }
.rep__tools { display: flex; gap: 2px; }
.rep__tools .btn { min-height: 30px; padding: 4px 8px; }
.rep__fields { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.rep__add { align-self: flex-start; }
.img-field--square .img-field__preview { width: 84px; height: 84px; aspect-ratio: 1; }
@media (max-width: 960px) {
    .topnav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
    .topnav a { white-space: nowrap; padding: 7px 10px; }
    .topbar__user { margin-left: auto; }
}

/* =========================================================
   Fase 4: administración, contenido y soporte
   ========================================================= */
.brand__logo { max-height: 34px; max-width: 180px; display: block; }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.danger-panel { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.block-code { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: #f3f4f7; padding: 8px 10px; border-radius: 8px; white-space: pre-wrap; margin: 0; }
.plain-list code[data-copy] { cursor: pointer; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #f3f4f7; padding: 2px 6px; border-radius: 5px; }

/* Aviso de "Entrar como" */
.imp-bar { position: sticky; top: 0; z-index: 40; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; background: #15171c; color: #fff; font-size: 14px; }
.imp-bar form { margin: 0; }
.imp-bar .btn { background: #fff; }

/* Anuncios */
.ann { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; border: 1px solid; }
.ann--info { background: #eef3ff; border-color: #cddbfd; color: #1b3a86; }
.ann--success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, #fff); color: #0d5c3c; }
.ann--warning { background: #fff6e0; border-color: #f3dca0; color: #6d4a00; }
.ann__body { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14.5px; }
.ann__body a { font-weight: 700; color: inherit; }
.ann form { margin: 0; }
.ann__close { border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; padding: 2px; }
.ann__close:hover { opacity: 1; }
.ann-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: #5b7be8; }
.ann-dot--success { background: var(--ok); }
.ann-dot--warning { background: #e0a100; }

/* Soporte */
.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; max-width: 92%; }
.msg--mine { align-self: flex-end; background: #f7f7ff; border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.msg--staff:not(.msg--mine) { border-left: 3px solid var(--brand); }
.msg header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13.5px; }
.msg header small { color: var(--muted); }
.msg p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.msg__file { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-weight: 600; font-size: 14px; }
.reply-box textarea { min-height: 110px; }

/* Páginas y Markdown */
.prose-page { max-width: 760px; margin: 20px auto 40px; }
.prose-page h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -0.02em; margin-bottom: 18px; }
.prose-page__date { margin-top: 30px; font-size: 13px; }
.prose { line-height: 1.7; font-size: 16px; }
.prose h2 { font-size: 1.35rem; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
.prose h4 { font-size: 1rem; margin: 1.2em 0 .3em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose blockquote { border-left: 3px solid var(--brand); padding: 4px 14px; color: var(--muted); }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose > :first-child { margin-top: 0; }
.md-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.md-editor textarea { min-height: 440px; font-size: 13.5px; line-height: 1.55; }
.md-preview { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-height: 440px; max-height: 640px; overflow: auto; background: #fff; font-size: 15px; }
@media (max-width: 960px) { .md-editor { grid-template-columns: 1fr; } .md-editor textarea, .md-preview { min-height: 260px; } }

/* Traducciones */
.tr-list { display: flex; flex-direction: column; }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #eef0f3; align-items: start; }
.tr-src { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.tr-src small { font-size: 11.5px; }
.tr-row textarea { min-height: 38px; font-size: 14px; }
@media (max-width: 720px) { .tr-row { grid-template-columns: 1fr; } }

/* Portada: planes, preguntas y llamado final */
.home-plans, .faq, .final-cta { max-width: 1040px; margin: 20px auto 48px; padding: 0 20px; text-align: center; }
.home-plans h2, .faq h2, .final-cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em; margin-bottom: 20px; }
.home-plans__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.home-plan { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.home-plan.is-hl { border: 2px solid var(--brand); }
.home-plan strong { font-size: 1.1rem; }
.home-plan span { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.home-plan small { color: var(--muted); }
.faq { max-width: 760px; text-align: left; }
.faq h2 { text-align: center; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.final-cta { padding: 36px 20px; border-radius: var(--r-lg); background: var(--brand-soft); }
.final-cta p { color: var(--muted); margin-bottom: 18px; }

/* Pie del sitio */
.site-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.site-foot__links, .site-foot__langs { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.site-foot__links a, .site-foot__langs a { color: inherit; text-decoration: none; }
.site-foot__links a:hover { text-decoration: underline; }
.site-foot__langs a { font-size: 13px; opacity: .75; }
.site-foot__langs a.is-active { opacity: 1; font-weight: 700; }
.prefix-input { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff; overflow: hidden; }
.prefix-input span { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; background: #f7f8fa; }
.prefix-input input { border: 0; border-radius: 0; min-width: 0; flex: 1; box-shadow: none; }

/* =========================================================
   Fase 5: IA, NFC, equipos, API, verificación, S3
   ========================================================= */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tool { display: flex; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.tool:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(20, 22, 30, .06); }
.tool__icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tool__body { display: flex; flex-direction: column; gap: 3px; }
.tool__body span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.tool__body small { color: var(--muted); font-weight: 600; margin-top: 4px; }
.tool--locked { opacity: .75; }
.tool--locked .tool__icon { background: #eceef2; color: var(--muted); }
.tools-ai { background: var(--brand-soft); padding: 10px 14px; border-radius: var(--r); margin: 0 0 16px; font-size: 14.5px; }

/* IA en el editor */
.ai-btn { align-self: flex-start; margin-top: 6px; border: 0; background: transparent; color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 2px 0; }
.ai-btn:hover span { text-decoration: underline; }
.ai-pop { margin-top: 6px; padding: 12px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); background: #fafaff; display: flex; flex-direction: column; gap: 8px; }
.ai-pop__row label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ai-pop__row select { width: auto; }
.ai-pop input { font-size: 14px; }
.ai-pop__foot { display: flex; gap: 8px; align-items: center; }
.ai-pop__foot small { color: var(--muted); margin-right: auto; font-size: 12px; }

/* NFC */
.nfc-tag { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.nfc-tag__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nfc-tag__taps { text-align: right; display: flex; flex-direction: column; }
.nfc-tag__taps strong { font-size: 1.5rem; line-height: 1; }
.nfc-tag__taps small { color: var(--muted); }
.nfc-tag__form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #eef0f3; padding-top: 12px; }
.nfc-tag__form input { flex: 1 1 180px; width: auto; }
.nfc-tag__form select { width: auto; }

/* Equipo */
.team-block { margin-top: 28px; }
.team-block h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; margin-bottom: 12px; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.team-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.team-card > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.team-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* API */
.key-new { border: 2px solid var(--brand); margin-bottom: 20px; }
.http { display: inline-block; font: 700 11.5px ui-monospace, Menlo, monospace; padding: 2px 7px; border-radius: 5px; background: #eceef2; }
.http--get { background: #e6f4ec; color: #127a50; }
.http--post { background: #e6eefe; color: #1d4fbf; }
.http--patch { background: #fff3d6; color: #7a5200; }
.http--delete { background: var(--danger-soft); color: var(--danger); }
.docs pre.block-code { overflow-x: auto; white-space: pre; }

/* Verificación y S3 */
.c-verified { color: #1d9bf0; display: inline-flex; }
.c-verified svg { width: 1em; height: 1em; }
.upsell .c-verified svg { width: 40px; height: 40px; }
.dir-verified { color: #1d9bf0; font-weight: 800; }
.sync-box { background: #f7f8fa; border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sync-box .usage__bar { max-width: 420px; }

/* Editor: burbuja de video */
.bubble-ed { margin-top: 28px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.bubble-ed__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.bubble-ed__head h3 { font-size: 1.02rem; margin-bottom: 2px; }
.bubble-ed__head p { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 0; }
.bubble-ed__icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.bubble-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 14px; border: 2px dashed var(--line-strong); border-radius: var(--r); text-align: center; cursor: pointer; color: var(--muted); transition: border-color .15s, background .15s; }
.bubble-drop strong { color: var(--ink); }
.bubble-drop .ic { width: 26px; height: 26px; color: var(--brand); }
.bubble-drop:hover, .bubble-drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.bubble-file { display: flex; gap: 14px; align-items: center; }
.bubble-file video { width: 72px; height: 108px; object-fit: cover; border-radius: 12px; background: #111; flex: 0 0 auto; }
.bubble-file .row-actions label.btn { cursor: pointer; }
.bubble-progress { position: relative; height: 26px; border-radius: 999px; background: #eceef2; overflow: hidden; }
.bubble-progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); transition: width .2s ease; }
.bubble-progress small { position: relative; display: block; text-align: center; line-height: 26px; font-weight: 700; font-size: 12.5px; color: var(--ink); mix-blend-mode: difference; filter: invert(1); }

/* Anti-bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.captcha { display: flex; justify-content: center; min-height: 65px; }
.captcha .cf-turnstile { width: 100%; }
.captcha-note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.grecaptcha-badge { visibility: hidden; }
.help-box summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.help-box ul { margin: 10px 0; padding-left: 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.pending-captcha { border: 2px solid var(--brand); }


/* Plantillas agrupadas (Generales / Profesiones) */
.tpl-group { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tpl-group:first-child { margin-top: 0; }
.tpl-starter { margin-top: 14px; align-items: flex-start; font-size: 14px; }

/* ---------- Tienda NFC ---------- */
.status--production { background: #e6eefe; color: #1d4fbf; }
.status--ready, .status--shipped { background: #efe7ff; color: #5b3cc4; }
.status--delivered { background: var(--ok-soft); color: var(--ok); }
.status--cancelled { background: #eceef2; color: var(--muted); }

.site-head__extra { display: none; }
@media (min-width: 640px) { .site-head__extra { display: inline-flex; } }
.st-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.st-kicker .ic { width: 16px; height: 16px; }
.st-coverage { display: flex; align-items: center; gap: 8px; margin-top: 14px !important; font-weight: 600; color: var(--ink) !important; font-size: 15px !important; }
.st-coverage .ic { color: var(--brand); flex: 0 0 auto; }
.st-hero { max-width: 1120px; margin: 0 auto; padding: 36px 20px 10px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.st-hero h1 { margin-top: 14px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; }
.st-hero p { margin-top: 16px; font-size: 1.1rem; color: var(--muted); line-height: 1.6; max-width: 48ch; }
.st-hero__cta { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.st-hero__img img { width: 100%; height: auto; border-radius: 28px; display: block; }
.st-steps { max-width: 1040px; margin: 40px auto; padding: 0 20px; text-align: center; }
.st-steps h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.02em; margin-bottom: 20px; }
.st-steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; text-align: left; }
.st-steps li { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.st-steps li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; }
.st-steps li small { color: var(--muted); line-height: 1.5; }
.st-products { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: grid; gap: 28px; }
.st-product { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; padding: 28px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.st-product--rev .st-gallery { order: 2; }
.st-gallery__main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; display: block; background: #f1f4f8; }
.st-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.st-gallery__thumbs button { flex: 0 0 auto; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f1f4f8; cursor: pointer; }
.st-gallery__thumbs button.is-active { border-color: var(--brand); }
.st-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.st-type { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.st-product h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.025em; margin: 6px 0 8px; }
.st-summary { color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.st-price { margin: 14px 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.st-price strong { font-size: 2rem; letter-spacing: -0.03em; }
.st-price small { color: var(--muted); }
.st-desc p { color: var(--ink); line-height: 1.6; margin-bottom: 10px; }
.st-features { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 8px; }
.st-features li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.st-features .ic { color: var(--ok); flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.st-designs__label { font-weight: 700; margin: 6px 0 8px; font-size: 14px; }
.st-designs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.st-designs figure { margin: 0; width: 96px; text-align: center; }
.st-designs img { width: 96px; height: 64px; object-fit: contain; display: block; margin: 0 auto 4px; }
.st-designs figcaption { font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) {
    .st-hero, .st-product { grid-template-columns: 1fr; }
    .st-product--rev .st-gallery { order: 0; }
    .st-product { padding: 18px; gap: 20px; }
}
.home-shop { max-width: 1120px; margin: 30px auto 50px; padding: 28px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; border-radius: 28px; background: linear-gradient(135deg, #f0faf8, #eef4fd); }
.home-shop__img img { width: 100%; height: auto; border-radius: 22px; display: block; }
.home-shop h2 { margin-top: 12px; font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.12; }
.home-shop p { margin-top: 12px; color: var(--muted); line-height: 1.6; }
.home-shop__list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.home-shop__list li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: #fff; }
.home-shop__list li span { flex: 1; font-weight: 600; }
.home-shop__list .ic { color: var(--brand); }
.home-shop__cta { margin-top: 18px !important; }
@media (max-width: 860px) { .home-shop { grid-template-columns: 1fr; margin: 20px 14px 40px; padding: 18px; } }

/* Compra */
.shop { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.shop__main { display: grid; gap: 16px; }
.shop__side { position: sticky; top: 16px; }
@media (max-width: 900px) { .shop { grid-template-columns: 1fr; } .shop__side { position: static; } }
.shop-item__head { display: flex; gap: 16px; align-items: center; }
.shop-item__img { width: 110px; height: 82px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; }
.shop-item__title { flex: 1; min-width: 0; }
.shop-item__title h2 { font-size: 1.1rem; }
.shop-item__title p { font-size: 13.5px; margin-top: 2px; }
.shop-item__price { margin-top: 6px !important; }
.shop-item__body { margin-top: 16px; display: grid; gap: 14px; }
.shop-item.is-off .shop-item__body { display: none; }
.shop-item.is-off { opacity: .85; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; flex: 0 0 auto; }
.qty button { width: 38px; height: 40px; border: 0; background: #f4f5f8; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty input { width: 48px; height: 40px; border: 0; text-align: center; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 560px) {
    .shop-item__head { flex-wrap: wrap; align-items: flex-start; }
    .shop-item__img { width: 84px; height: 64px; }
    .shop-item__title { flex: 1 1 calc(100% - 100px); }
    .shop-item .qty { margin-left: auto; }
}
.design-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.design-pick label { cursor: pointer; }
.design-pick input { position: absolute; opacity: 0; pointer-events: none; }
.design-pick span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 14px; height: 100%; }
.design-pick img { width: 100%; height: 64px; object-fit: contain; }
.design-pick em { font-style: normal; font-size: 13px; font-weight: 600; text-align: center; }
.design-pick input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.design-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.design-pick__custom .ic { width: 28px; height: 28px; margin: 18px 0 12px; color: var(--brand); }
.segmented--block { display: grid; grid-template-columns: 1fr 1fr; }
.shop-summary__lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.shop-summary__lines li, .shop-summary__row, .shop-summary__total { display: flex; justify-content: space-between; gap: 10px; margin: 0; }
.shop-summary__total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.15rem; }
/* Pedido */
.order-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.order-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); position: relative; }
.order-steps li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eceef2; font-weight: 800; z-index: 1; }
.order-steps li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 50%; width: 100%; height: 3px; background: #eceef2; }
.order-steps li.is-done { color: var(--ink); }
.order-steps li.is-done span { background: var(--ok); color: #fff; }
.order-steps li.is-done:not(.is-current)::after { background: var(--ok); }
.order-steps li.is-current span { box-shadow: 0 0 0 4px var(--ok-soft); }
.order-steps .ic { width: 16px; height: 16px; }
.order-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-item > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.order-item small { font-size: 12.5px; overflow-wrap: anywhere; }
.order-item--total { border-bottom: 0; font-size: 1.1rem; }
.order-pay { border: 2px solid #f0c55a; background: #fffbef; margin-bottom: 18px; }
.nfc-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nfc-code { padding: 10px; border: 1px solid var(--line); border-radius: 12px; text-align: center; font-size: 12.5px; }
.nfc-code svg { width: 100%; height: auto; display: block; }
.nfc-code strong { display: block; font-family: ui-monospace, Menlo, monospace; font-size: 14px; margin-top: 4px; letter-spacing: .06em; }
.admin-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.admin-imgs label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.admin-imgs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.admin-design { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.admin-design img { width: 110px; height: 72px; object-fit: contain; flex: 0 0 auto; }
.admin-design--new { border-style: dashed; }
@media (max-width: 640px) { .admin-design { flex-wrap: wrap; } }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tabs a { padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.filter-tabs a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-tabs small { opacity: .75; }
.order-grid { align-items: start; }
@media print {
    body * { visibility: hidden; }
    .nfc-codes, .nfc-codes * { visibility: visible; }
    .nfc-codes { position: absolute; left: 0; top: 0; width: 100%; }
}
.nfc-shop-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border-radius: 16px; background: linear-gradient(135deg, #e7f8f5, #e8f1fd); color: var(--ink); text-decoration: none; }
.nfc-shop-banner > .ic:first-child { color: var(--brand); width: 26px; height: 26px; flex: 0 0 auto; }
.nfc-shop-banner span { flex: 1; line-height: 1.45; }
.st-hero > *, .st-product > *, .home-shop > *, .shop > *, .shop__main > * { min-width: 0; }

/* Página Contacto y mensajes */
.contact-box { margin-top: 28px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.contact-box h2 { font-size: 1.3rem; margin-bottom: 14px; }
.contact-msg.is-unread { border-left: 4px solid var(--brand); }
.contact-msg__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.contact-msg__body { margin-top: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
