@charset "UTF-8";
/* Estilos base compartidos por la plataforma, los paneles y las tiendas. */
@font-face { font-family: "Onest"; src: url("/assets/fonts/onest.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --ink: #17181c;
  --ink-2: #4a4d57;
  --ink-3: #7b7f8a;
  --line: #e4e5e9;
  --line-2: #d3d5db;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --primary: #1f5eff;
  --primary-ink: #ffffff;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, white);
  --ok: #157a46;
  --ok-soft: #e7f5ec;
  --warn: #9a5b00;
  --warn-soft: #fdf3e1;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 30, .06), 0 1px 1px rgba(20, 22, 30, .04);
  --font: "Onest", ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--primary-text, var(--primary)); text-decoration: none; }
[hidden] { display: none !important; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Estructura de paneles ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1rem; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 500; color: var(--ink-3); margin-left: .4rem; }
.nav { display: flex; gap: .25rem; margin-left: 1rem; }
.nav a { padding: .45rem .75rem; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text, var(--primary)); }
.topbar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: var(--ink-2); }
.btn.nav-toggle { display: none; }

.page { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head p { margin: 0; color: var(--ink-3); }

@media (max-width: 760px) {
  .btn.nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; margin: 0; padding: .5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .userbox .who { display: none; }
}

/* ---------- Tarjetas, rejillas y métricas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card + .card, .grid + .card, .card + .grid { margin-top: 1rem; }
.grid > .card { margin-top: 0; }
.card h2 { margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat .label { font-size: .82rem; color: var(--ink-3); }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: .15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; background: #fafafa; }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }

/* ---------- Etiquetas de estado ---------- */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; align-content: start; }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .82rem; color: var(--ink-3); margin: 0; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .84rem; margin: 0; }
.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 500; }
.check input { margin-top: .25rem; width: 1rem; height: 1rem; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 8px 8px 0; background: var(--bg); color: var(--ink-3); font-size: .9rem; white-space: nowrap; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; display: grid; gap: 1rem; }
legend { font-weight: 700; padding: 0 .35rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.inline-form { display: inline; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { max-width: 180px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; font: inherit; font-weight: 600; line-height: 1.2;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--bg); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, white); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: .35rem .65rem; font-size: .85rem; }
.btn.link { border: 0; background: none; color: var(--primary); padding: .35rem .4rem; }
.btn.block { width: 100%; }

/* ---------- Avisos ---------- */
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid transparent; }
.alert.success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, white); }
.alert.error { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 20%, white); }
.alert.info { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 20%, white); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, white); }
.alert p:last-child { margin: 0; }

/* ---------- Páginas mínimas (login, errores, instalación) ---------- */
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.35rem; margin-bottom: .25rem; }
.auth-card .sub { color: var(--ink-3); margin-bottom: 1.25rem; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--line-2); line-height: 1; margin-bottom: .5rem; }

/* ---------- Paginación ---------- */
.pager { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; margin-top: 1rem; font-size: .9rem; }

/* ---------- Pasos de dominio ---------- */
.steps { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--ink-2); font-size: .9rem; }
.steps li { margin-bottom: .3rem; }
.copy { font-family: var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .1rem .4rem; overflow-wrap: anywhere; }

/* ---------- Tienda (provisional hasta la Fase 6) ---------- */
.store-hero { text-align: center; max-width: 560px; }
.store-hero h1 { font-size: 2rem; }

/* ---------- Utilidades de espacio (sin estilos inline por la CSP) ---------- */
.mt-1 { margin-top: 1rem; }
.mt-075 { margin-top: .75rem; }
.mb-1 { margin-bottom: 1rem; }

/* Campo trampa del registro: invisible para personas. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-card { max-width: 460px; }

/* ---------- Fase 2: configuración de la tienda ---------- */
.brand-logo { display: flex; align-items: center; gap: .5rem; }
.brand-logo img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tabs a { padding: .6rem .9rem; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--primary); }
.card-warn { border-color: color-mix(in srgb, var(--warn) 35%, white); background: var(--warn-soft); }
.logo-preview { display: grid; place-items: center; width: 160px; height: 160px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: repeating-conic-gradient(#f2f2f2 0 25%, #fff 0 50%) 50% / 16px 16px; }
.logo-preview img { max-width: 140px; max-height: 140px; object-fit: contain; }
.color-row { display: flex; align-items: center; gap: .75rem; }
.color-row input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer; }
.color-sample { display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.color-sample .badge { background: color-mix(in srgb, var(--primary) 14%, white); color: color-mix(in srgb, var(--primary) 70%, black); }
.color-sample .btn { pointer-events: none; }
.field .label { font-weight: 600; font-size: .9rem; }
fieldset.day { gap: .6rem; }
fieldset.day.has-error { border-color: var(--bad); }
.periods { display: grid; gap: .5rem; }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.period input[type=time] { width: auto; min-width: 7.5rem; }
.periods .btn.link { justify-self: start; }
ul.plain { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .35rem; }
.facts.hours dt.today, .facts.hours dd.today { font-weight: 700; color: var(--ink); }

/* ---------- Tienda pública ---------- */
body.store { background: var(--bg); }
.store-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; height: 64px; padding: 0 1rem; background: var(--surface); border-bottom: 3px solid var(--primary); }
.store-brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; font-size: 1.1rem; }
.store-brand:hover { text-decoration: none; }
.store-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.store-main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 6rem; }
.store-intro { margin-bottom: 1.25rem; }
.store-intro h1 { font-size: 1.9rem; }
.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 20; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.wa-float:hover { filter: brightness(.95); }
.setup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.setup-list li { display: flex; align-items: center; gap: .5rem; }
.setup-list .dot { width: 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; }
.setup-list .done .dot { background: var(--ok-soft); color: var(--ok); }
.setup-list .todo .dot { background: var(--bg); color: var(--ink-3); border: 1px solid var(--line-2); }

/* ---------- Fase 3: catálogo ---------- */
.nowrap { white-space: nowrap; }
.products-table td { vertical-align: middle; }
.thumb-cell { width: 56px; }
.thumb { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.thumb.empty { background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 6px, #ececec 6px, #ececec 12px); }
.badge-btn { border: 0; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.badge-btn.ok { background: var(--ok-soft); color: var(--ok); }
.badge-btn:hover { filter: brightness(.96); }
.star { border: 0; background: none; cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--line-2); padding: .2rem .3rem; }
.star.on { color: #E8A100; }
.star:hover { color: #E8A100; }

.type-cards { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .type-cards { grid-template-columns: 1fr; } }
.type-card { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.type-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-soft); }
.type-card.disabled { cursor: not-allowed; opacity: .6; background: var(--bg); }
.type-card input { margin-top: .25rem; }
.discount-preview { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .35rem 0 0; }

.opt-groups { display: grid; gap: 1rem; margin-bottom: 1rem; }
.opt-group { background: var(--bg); }
.opt-values { display: grid; gap: .5rem; }
.opt-value { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.opt-value > input[type=text] { flex: 1 1 200px; width: auto; }
.opt-value .check { font-weight: 500; }
.input-prefix { display: inline-flex; align-items: stretch; }
.input-prefix > span { display: flex; align-items: center; padding: 0 .55rem; border: 1px solid var(--line-2); border-right: 0; border-radius: 8px 0 0 8px; background: var(--bg); color: var(--ink-3); font-size: .9rem; }
.input-prefix input { width: 7rem; border-radius: 0 8px 8px 0; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: .75rem 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }

.image-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.image-grid li { display: grid; gap: .4rem; justify-items: start; }
.image-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }

.cat-tree, .cat-tree ul { list-style: none; padding: 0; margin: 0; }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cat-row.sub { padding-left: 1.75rem; position: relative; }
.cat-row.sub::before { content: "↳"; position: absolute; left: .5rem; color: var(--ink-3); }
.cat-row.inactive .cat-name input { color: var(--ink-3); }
.cat-name { display: flex; gap: .4rem; flex: 1 1 260px; }
.cat-name input { max-width: 320px; }
.cat-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin-left: auto; }
.cat-children { border: 0; }

.map-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.preview-table td, .preview-table th { font-size: .82rem; white-space: nowrap; }
.import-bar { width: 100%; height: 14px; accent-color: var(--primary); margin-bottom: .5rem; }

/* Lista de productos en celular: cada fila como tarjeta. */
@media (max-width: 640px) {
  .products-table thead { display: none; }
  .products-table, .products-table tbody, .products-table td { display: block; }
  .products-table tr { display: grid; grid-template-columns: 56px 1fr; gap: .35rem .75rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .products-table td { border: 0; padding: 0; }
  .products-table .thumb-cell { grid-row: span 4; }
  .products-table td.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem; text-align: left; white-space: normal; }
  .sticky-actions { position: static; background: none; }
}

/* ---------- Navegación del panel de tienda (Fases 4–10) ---------- */
.admin-nav { position: sticky; top: 56px; z-index: 9; display: flex; gap: .15rem; overflow-x: auto; padding: 0 1rem; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.admin-nav a { flex: none; padding: .7rem .8rem; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; }
.admin-nav a:hover { color: var(--ink); text-decoration: none; }
.admin-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--primary); }
.userbox .who { color: var(--ink-2); font-weight: 500; }
@media (max-width: 760px) { .userbox .who { display: inline; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.badge.info { background: var(--primary-soft); color: var(--primary-text, var(--primary)); }
.status-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: .75rem; font-size: .92rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: .1rem; } }
.order-items td { vertical-align: top; }
.adjust-form { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.adjust-form select { width: auto; }
.adjust-form input[type=number] { width: 6rem; }
.adjust-form input[type=text] { width: 10rem; }
.period-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.period-tabs a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem; }
.period-tabs a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.stat.highlight { border-color: color-mix(in srgb, var(--ok) 40%, white); background: var(--ok-soft); }
.stat .hint { font-size: .78rem; color: var(--ink-3); margin-top: .2rem; }
.address-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; display: grid; gap: .5rem; }
.address-card summary { cursor: pointer; font-weight: 600; }
.addresses { display: grid; gap: .75rem; }
.banner-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); display: block; }

a.stat { color: var(--ink); }
a.stat:hover { text-decoration: none; border-color: var(--line-2); }
.table-wrap td.mono, .table-wrap td .mono, .folio { white-space: nowrap; }

/* ---------- Menú del panel: operación a la izquierda, pasos de configuración a la derecha ---------- */
.admin-nav { justify-content: space-between; gap: 1rem; }
.admin-nav-group { display: flex; gap: .15rem; flex: none; }
.admin-nav a { display: inline-flex; align-items: center; gap: .45rem; }
.step-num { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: .74rem; font-weight: 700; }
.admin-nav a[aria-current="page"] .step-num { background: var(--primary); color: var(--primary-ink); }
.admin-nav-steps { border-left: 1px solid var(--line); padding-left: .75rem; }

/* ---------- Selector de color de tienda ---------- */
.theme-picker { display: flex; flex-wrap: wrap; gap: .6rem; }
.theme-option { position: relative; display: flex; align-items: center; gap: .55rem; padding: .55rem .9rem .55rem .6rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; }
.theme-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.theme-swatch { width: 1.6rem; height: 1.6rem; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.theme-azul { background: #1F5EFF; }
.theme-verde { background: #16A34A; }
.theme-naranja { background: #EA580C; }
.theme-rojo { background: #DC2626; }
.theme-option:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Botón «Ver tienda» y página «Mejorar plan» ---------- */
.userbox { display: flex; align-items: center; gap: .6rem; }
.view-store { white-space: nowrap; }
.plan-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.plan-card { margin: 0; display: grid; gap: .75rem; align-content: start; }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan-card h2 { margin: 0; }
.plan-price { margin: 0; font-size: 1.8rem; font-weight: 700; }
.plan-price small { font-size: .9rem; font-weight: 500; color: var(--ink-3); margin-left: .2rem; }
.plan-card ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; color: var(--ink-2); }
.plan-grid > .card { margin: 0; }
.plan-card > .badge { justify-self: start; }

/* ---------- Grupos de «Otros modelos» ---------- */
.grp-list { list-style: none; margin: 0; padding: 0; }
.grp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.grp-row:last-child { border-bottom: 0; }
.grp-name { display: grid; gap: .3rem; }
.grp-name small { color: var(--ink-3); }
.grp-thumbs { display: flex; }
.grp-thumbs img { width: 40px; height: 40px; border-radius: 8px; border: 2px solid var(--surface); background: var(--bg); margin-left: -8px; object-fit: cover; }
.grp-thumbs img:first-child { margin-left: 0; }
@media (max-width: 760px) { .grp-row { grid-template-columns: 1fr; } }
.inline-h2 { display: inline; margin: 0; } details > summary { cursor: pointer; }
/* Registro en dos pasos */
.center { text-align: center; }
.signup-steps { display: flex; gap: .5rem; list-style: none; margin: 0 0 1rem; padding: 0; font-size: .85rem; color: var(--ink-3); }
.signup-steps li { display: flex; align-items: center; gap: .4rem; flex: 1; padding-bottom: .5rem; border-bottom: 3px solid var(--line-2); }
.signup-steps li span { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--line-2); color: var(--ink-2); font-weight: 700; font-size: .8rem; }
.signup-steps li.is-current { color: var(--ink); font-weight: 600; border-color: var(--brand, #1F5EFF); }
.signup-steps li.is-current span, .signup-steps li.is-done span { background: var(--brand, #1F5EFF); color: #fff; }
.signup-steps li.is-done { border-color: var(--brand, #1F5EFF); }
.cf-turnstile { min-height: 65px; }
/* Selector de diseño de la tienda */
.layout-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.layout-option { position: relative; display: grid; gap: .6rem; padding: .6rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; }
.layout-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.layout-option:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.layout-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.lp-text { display: grid; gap: .15rem; padding: 0 .2rem .2rem; }
.lp-text small { color: var(--ink-3); font-size: .8rem; line-height: 1.35; }
.lp-mock { display: grid; gap: 4px; padding: 6px; height: 128px; border-radius: 8px; background: #fff; border: 1px solid var(--line); grid-template-rows: 9px 8px 1fr 0 14px; overflow: hidden; }
.lp-mock i, .lp-mock b { display: block; }
.lp-head { display: flex; align-items: center; gap: 6px; }
.lp-head i { width: 22px; height: 7px; border-radius: 2px; background: #2b2b2b; }
.lp-head b { flex: 1; max-width: 70px; height: 7px; border-radius: 4px; border: 1px solid #d7d9de; }
.lp-nav { border-radius: 2px; background: var(--primary); }
.lp-hero { display: grid; gap: 4px; }
.lp-hero i { border-radius: 4px; background: color-mix(in srgb, var(--primary) 22%, white); }
.lp-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.lp-cats i { border-radius: 3px; background: #eceef2; }
/* Clásico: categorías + banner + 2 promos */
.lp-clasico .lp-hero { grid-template-columns: 1fr 2.4fr 1.2fr; grid-template-rows: 1fr 1fr; }
.lp-clasico .lp-hero i:nth-child(1) { grid-row: span 2; background: #fff; border: 1px solid var(--primary); }
.lp-clasico .lp-hero i:nth-child(2) { grid-row: span 2; }
.lp-clasico .lp-hero i:nth-child(4) { background: #e6f1ee; }
.lp-clasico .lp-cats i { border-radius: 4px; }
/* Mercado: menú oscuro, banner oscuro + promo alta + 2 chicas, círculos */
.lp-mercado .lp-nav { background: #141414; }
.lp-mercado .lp-hero { grid-template-columns: 2.4fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.lp-mercado .lp-hero i:nth-child(1) { grid-row: span 2; background: #222; }
.lp-mercado .lp-hero i:nth-child(2) { grid-row: span 2; background: var(--primary); }
.lp-mercado .lp-hero i:nth-child(3) { background: color-mix(in srgb, var(--primary) 70%, black); }
.lp-mercado .lp-hero i:nth-child(4) { background: color-mix(in srgb, var(--primary) 60%, white); }
.lp-mercado .lp-cats i { border-radius: 50%; aspect-ratio: 1; height: 14px; margin: auto; }
/* Boutique: menú blanco, banner a todo lo ancho, barra de beneficios, tarjetas de color */
.lp-boutique { grid-template-rows: 9px 6px 1fr 9px 20px; padding: 6px 0; }
.lp-boutique .lp-head, .lp-boutique .lp-nav, .lp-boutique .lp-feat, .lp-boutique .lp-cats { margin: 0 6px; }
.lp-boutique .lp-nav { background: #fff; border-top: 1px solid #e3e5e9; border-bottom: 1px solid #e3e5e9; }
.lp-boutique .lp-hero { grid-template-columns: 1fr; }
.lp-boutique .lp-hero i { border-radius: 0; background: var(--primary); }
.lp-boutique .lp-hero i + i { display: none; }
.lp-boutique .lp-feat { border: 1px solid #e3e5e9; border-radius: 2px; }
.lp-boutique .lp-cats i:nth-child(1) { background: #fbefef; } .lp-boutique .lp-cats i:nth-child(2) { background: #eef1fb; }
.lp-boutique .lp-cats i:nth-child(3) { background: #f6effa; } .lp-boutique .lp-cats i:nth-child(4) { background: #fbf4ea; }
.lp-boutique .lp-cats i:nth-child(5) { background: #eef6ee; }
.danger-zone { border-color: var(--danger, #d61f3a); }
.danger-zone h2 { color: var(--danger, #d61f3a); }
/* Pantalla «Estamos creando tu tienda» */
.wait-card { max-width: 480px; text-align: center; }
.wait-card .facts { text-align: left; }
.wait-art { position: relative; width: 168px; height: 168px; margin: .25rem auto 1.1rem; display: grid; place-items: center; border-radius: 50%; background: #FFF3E6; }
.wait-art img { width: 108px; height: auto; animation: wait-bounce 1.4s ease-in-out infinite; }
.wait-art.is-ready img { animation: none; }
.wait-ring { position: absolute; inset: -6px; border-radius: 50%; border: 5px solid #FFE1C2; border-top-color: #F57C00; animation: wait-spin 1s linear infinite; }
@keyframes wait-spin { to { transform: rotate(360deg); } }
@keyframes wait-bounce { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .wait-art img, .wait-ring { animation-duration: 6s; } }
.wait-steps { list-style: none; padding: 0; margin: 1rem auto; display: grid; gap: .5rem; text-align: left; max-width: 300px; }
.wait-steps li { display: flex; align-items: center; gap: .6rem; color: var(--ink-3); }
.wait-steps li::before { content: ""; width: 1.1rem; height: 1.1rem; flex: none; border-radius: 50%; border: 2px solid var(--line-2); }
.wait-steps li.done { color: var(--ink); }
.wait-steps li.done::before { border-color: #16A34A; background: #16A34A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.wait-steps li.doing { color: var(--ink); font-weight: 600; }
.wait-steps li.doing::before { border-color: #FFD3A6; border-top-color: #F57C00; animation: wait-spin .9s linear infinite; }
.mt-075 { margin-top: .75rem; }
/* Pedido consolidado */
.col-check { width: 2.2rem; }
.col-check input { width: 1.1rem; height: 1.1rem; }
.supplier-badge { background: #EEF4FF; color: #1D4ED8; text-decoration: none; }
.consolidate-bar { position: sticky; bottom: 1rem; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .75rem 1rem; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.toolbar input[type=date] { width: auto; max-width: 170px; }
.toolbar .check { align-items: center; white-space: nowrap; }
.toolbar .check input { margin-top: 0; }
.wait-art { background: #fff; box-shadow: 0 0 0 8px #FFF3E6; overflow: visible; }
.wait-art img { border-radius: 50%; }
/* Ícono de información junto a una etiqueta */
.label-row { display: flex; align-items: center; gap: .45rem; position: relative; }
.label-row label { margin: 0; }
.info-tip { position: static; }
.info-tip summary { list-style: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1.5px solid var(--ink-3); color: var(--ink-2); font: 700 .75rem/1 Georgia, serif; font-style: italic; cursor: pointer; user-select: none; }
.info-tip summary::-webkit-details-marker { display: none; }
.info-tip[open] summary, .info-tip summary:hover { border-color: var(--primary); background: var(--primary); color: var(--primary-ink, #fff); }
.info-tip-box { position: absolute; left: 0; right: 0; top: calc(100% + .45rem); z-index: 30; padding: .85rem 1rem; border-radius: 10px; background: var(--ink); color: #fff; font-size: .86rem; line-height: 1.45; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45); }
.info-tip-box p { margin: 0; }
.info-tip-box p + p { margin-top: .45rem; }
.info-tip-box .mono { color: #fff; word-break: break-all; }
/* Botón con indicador de carga */
.btn.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; opacity: 1; cursor: progress; }
.btn.block.is-loading { display: flex; }
.btn-spinner { width: 1.05rem; height: 1.05rem; flex: none; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ======================================================================
   Páginas de acceso (registro y entrada al panel) con la imagen de Kovito
   ====================================================================== */
body.kv-auth { --primary: #1c1410; --primary-ink: #fff; --kv-orange: #f57c00; position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip;
  background:
    radial-gradient(circle, rgba(60, 21, 2, .12) 1px, transparent 1.4px) 0 0 / 22px 22px,
    linear-gradient(180deg, #f6f3ef 0%, #efebe6 100%); }
.kv-auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.kv-blob { position: absolute; border-radius: 50%; filter: blur(10px); }
.kv-blob-a { width: 620px; height: 620px; right: -160px; top: -180px; background: radial-gradient(circle, #ffe3c6 0%, rgba(255, 227, 198, 0) 68%); }
.kv-blob-b { width: 520px; height: 520px; left: -200px; bottom: -220px; background: radial-gradient(circle, #ffeedd 0%, rgba(255, 238, 221, 0) 68%); }
.kv-auth-watermark { position: absolute; right: -60px; bottom: -70px; width: 340px; height: auto; opacity: .06; transform: rotate(-8deg); mix-blend-mode: multiply; }
.kv-auth-top, .kv-auth-main, .kv-auth-foot { position: relative; z-index: 1; }
.kv-auth-top { padding: 1.4rem 1.5rem 0; max-width: 1180px; width: 100%; margin: 0 auto; }
.kv-auth-logo { display: inline-flex; padding: .45rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .35); border: 1px solid rgba(0, 0, 0, .05); }
.kv-auth-logo img { height: 34px; width: auto; display: block; }
.kv-auth-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 3rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 4rem; align-items: center; }
.kv-auth-main.no-side { grid-template-columns: minmax(0, 520px); justify-content: center; }
.kv-auth-side { color: #1c1410; }
.kv-auth-dog { width: min(300px, 80%); aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 12px rgba(255, 246, 236, .95), 0 40px 70px -40px rgba(60, 21, 2, .5); margin: 0 0 2.2rem 12px; animation: kv-auth-float 6s ease-in-out infinite; }
.kv-auth-dog img { width: 60%; height: auto; margin-top: 4%; }
@keyframes kv-auth-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .kv-auth-dog { animation: none; } }
.kv-auth-side h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; max-width: 13em; margin: 0; }
.kv-auth-side ul { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .7rem; color: #5b524c; }
.kv-auth-side li { display: flex; align-items: center; gap: .6rem; }
.kv-auth-side li svg { flex: none; color: #fff; background: var(--kv-orange); border-radius: 50%; padding: 3px; width: 22px; height: 22px; }
.kv-auth-form { position: relative; }
.kv-auth .center-wrap { min-height: 0; padding: 0; display: block; }
.kv-auth .auth-card { max-width: none; border: 1px solid rgba(0, 0, 0, .06); border-radius: 24px; padding: 2rem 2rem 1.8rem; background: rgba(255, 255, 255, .96); box-shadow: 0 30px 60px -36px rgba(60, 21, 2, .45); }
.kv-auth .auth-card h1 { font-size: 1.6rem; letter-spacing: -.03em; font-weight: 650; }
.kv-auth .btn { border-radius: 999px; }
.kv-auth .btn.primary { background: var(--primary); border-color: var(--primary); }
.kv-auth .btn.primary:hover { background: #000; }
.kv-auth input:focus, .kv-auth select:focus { border-color: var(--kv-orange); box-shadow: 0 0 0 3px rgba(245, 124, 0, .18); }
.kv-auth a { color: #c25f00; }
.kv-auth .signup-steps li.is-current, .kv-auth .signup-steps li.is-done { border-color: var(--kv-orange); }
.kv-auth .signup-steps li.is-current span, .kv-auth .signup-steps li.is-done span { background: var(--kv-orange); }
.kv-auth .wait-card { max-width: none; }
.kv-auth-peek { display: none; }
.kv-auth-foot { text-align: center; padding: 0 1rem 1.5rem; color: #8c837c; font-size: .85rem; }
.kv-auth-foot a { color: #5b524c; text-decoration: none; }
.kv-auth-foot a:hover { text-decoration: underline; }
@media (max-width: 960px) {
  .kv-auth-main { grid-template-columns: minmax(0, 520px); justify-content: center; gap: 0; padding-top: 4.5rem; }
  .kv-auth-side { display: none; }
  .kv-auth-peek { display: grid; place-items: center; position: absolute; left: 50%; top: -62px; transform: translateX(-50%); z-index: 2; width: 104px; height: 104px; border-radius: 50%; background: #fff; overflow: hidden; box-shadow: 0 0 0 7px rgba(255, 246, 236, .95), 0 16px 30px -18px rgba(60, 21, 2, .55); }
  .kv-auth-peek img { width: 64%; height: auto; margin-top: 6%; }
  .kv-auth .auth-card { padding-top: 3.2rem; }
  .kv-auth-main.no-side { padding-top: 2rem; }
  .kv-auth-main.no-side .kv-auth-peek { display: none; }
  .kv-auth .auth-card .wait-art { margin-top: 0; }
}
@media (max-width: 520px) { .kv-auth .auth-card { padding: 3rem 1.25rem 1.5rem; border-radius: 20px; } .kv-auth-main { padding-left: 1rem; padding-right: 1rem; } }

/* Asistente de productos */
.pw-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .pw-types { grid-template-columns: 1fr; } }
.pw-type { flex-direction: column; align-items: stretch; text-align: left; position: relative; }
.pw-type input { position: absolute; top: .9rem; left: .9rem; margin: 0; }
.pw-art { width: 100%; height: auto; max-height: 170px; background: var(--bg); border-radius: calc(var(--radius) - 2px); padding: .5rem; }
.pw-step1 .form-actions { margin-top: 1rem; }
.comp-cards { display: grid; gap: .6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: .4rem; }
@media (max-width: 760px) { .comp-cards { grid-template-columns: 1fr; } }
.comp-card { display: flex; flex-direction: column; gap: .3rem; padding: .7rem; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; background: var(--surface); position: relative; }
.comp-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-soft); }
.comp-card input { position: absolute; top: .6rem; left: .6rem; margin: 0; }
.pc-art { width: 100%; height: auto; max-height: 80px; background: var(--bg); border-radius: 8px; padding: .3rem; }
.inv-empty { color: var(--danger, #c0392b); font-weight: 600; }
.banner-example { width: 100%; height: auto; border-radius: var(--radius); border: 1px dashed var(--line-2); background: var(--bg); }
.invoice-box { border: 1px solid var(--line-2); border-radius: var(--radius); padding: .9rem; margin-top: .6rem; background: var(--bg); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }

/* Configuración en un solo formulario */
.settings-form { display: grid; gap: 1rem; }
.settings-panel { display: grid; gap: 1rem; }
.settings-panel[hidden] { display: none; }
.settings-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap;
  padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 -6px 20px rgba(20, 24, 33, .08); }
.settings-save p { margin: 0 auto 0 0; }
.settings-save .dirty { color: var(--warn-ink, #9a6200); font-weight: 600; }
.tab-error { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--danger, #c0392b); color: #fff; font-size: .7rem; font-weight: 700; margin-left: .2rem; }
/* Pestañas internas llamativas (banners) */
.seg-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: .3rem; background: var(--bg); border: 1px solid var(--line-2); border-radius: calc(var(--radius) + 4px); }
.seg-tab { appearance: none; border: 0; background: transparent; padding: .85rem 1rem; border-radius: var(--radius); font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink-2); cursor: pointer; }
.seg-tab:hover { color: var(--ink); background: var(--surface); }
.seg-tab[aria-selected="true"] { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(20, 24, 33, .15); }
.seg-tab:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 640px) { .seg-tabs { grid-template-columns: 1fr; } }
.switch-row { padding: .8rem; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); }
/* Menú de Productos con 4 tarjetas */
.pmenu { margin: 0 0 1.25rem; }
.pmenu-title { text-align: center; font-size: 1.5rem; margin: 0 0 1rem; }
.pmenu-grid { display: grid; gap: .9rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .pmenu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pmenu-grid { gap: .6rem; } .pmenu-card { padding: .9rem .6rem; } .pmenu-card span { display: none; } }
.pmenu-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 1.2rem 1rem; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: calc(var(--radius) + 2px); color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pmenu-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 6px 18px rgba(20, 24, 33, .08); transform: translateY(-1px); }
.pmenu-card svg { color: var(--primary); margin-bottom: .25rem; }
.pmenu-card strong { font-size: 1.02rem; }
.pmenu-card span { color: var(--ink-3); font-size: .9rem; line-height: 1.35; }
.pmenu-card[aria-current="page"] { background: var(--primary-soft); border: 2px solid var(--primary); padding: calc(1.2rem - 1px) calc(1rem - 1px); }
/* Importar por CSV en 3 pasos */
.csv-hero { padding: 1.5rem; }
.csv-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.4rem; }
.csv-head h1 { margin: 0; font-size: 1.5rem; }
.csv-icon { color: var(--primary); flex: none; }
.csv-body { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.csv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.csv-steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; padding: 0 .5rem; }
.csv-steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.15rem; left: calc(50% + 1.7rem); right: calc(-50% + 1.7rem); height: 2px; background: var(--line-2); }
.csv-n { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); font-weight: 700; margin-bottom: .45rem; }
.csv-steps li:first-child .csv-n { background: var(--primary); border-color: var(--primary); color: #fff; }
.csv-steps strong { font-size: 1rem; }
.csv-steps span:last-child { color: var(--ink-3); font-size: .9rem; }
.csv-actions { display: flex; flex-direction: column; gap: .6rem; min-width: 250px; }
.csv-actions form { margin: 0; }
.csv-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; padding: .8rem 1.1rem; font-size: 1rem; cursor: pointer; }
.csv-chosen { margin: .3rem 0 0; text-align: center; }
.csv-help summary { cursor: pointer; }
.csv-help { margin-top: 1rem; }
@media (max-width: 860px) { .csv-body { grid-template-columns: 1fr; } .csv-actions { min-width: 0; } }
@media (max-width: 560px) { .csv-steps { grid-template-columns: 1fr; gap: 1rem; } .csv-steps li::after { display: none; } }
/* Último paso: fotos del producto */
.photo-step { max-width: 820px; margin: 0 auto; }
.photo-step > .card { padding: 1.6rem; }
.photo-step h1 { margin: .2rem 0 .4rem; font-size: 1.45rem; }
.photo-step-kicker { margin: 0; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.photo-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: 2rem 1rem; border: 2px dashed var(--line-2);
  border-radius: calc(var(--radius) + 2px); background: var(--bg); cursor: pointer; color: var(--ink); }
.photo-drop svg { color: var(--primary); }
.photo-drop:hover, .photo-drop:focus-within { border-color: var(--primary); background: var(--primary-soft); }
/* Asignar productos a una categoría */
.assign-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; max-height: 460px; overflow: auto; }
.assign-list li { padding: .55rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.assign-list li:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.photo-step { display: grid; gap: 1rem; }
.variant-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 720px) { .variant-choices { grid-template-columns: 1fr; } }
.variant-choice { padding: 1rem; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); }
.variant-choice h3 { margin: 0 0 .6rem; font-size: 1rem; }
.step-of { margin: .15rem 0 0; color: var(--primary); font-weight: 700; font-size: .9rem; }
a.seg-tab { display: block; text-align: center; text-decoration: none; }
a.seg-tab[aria-current="page"] { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(20, 24, 33, .15); }
.grp-members { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.grp-members li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); }
.grp-members img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.grp-members .grow { flex: 1 1 160px; min-width: 0; }
.grp-card + .grp-card { margin-top: .8rem; }
/* Explicación con ilustración (Categorías / Agrupaciones) */
.explain { display: grid; grid-template-columns: 1fr minmax(240px, 360px); gap: 1.25rem; align-items: center; }
.explain h1 { margin: 0 0 .4rem; }
.explain p { margin: 0 0 .5rem; }
.explain ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .2rem; }
.explain-art { width: 100%; height: auto; background: var(--bg); border-radius: var(--radius); padding: .4rem; }
@media (max-width: 760px) { .explain { grid-template-columns: 1fr; } .explain-art { max-width: 380px; } }
/* Cada agrupación en su propia caja */
.grp-card { border: 1px solid var(--line-2); border-left: 4px solid var(--primary); border-radius: var(--radius); background: var(--surface); padding: .9rem 1rem; box-shadow: 0 2px 8px rgba(20, 24, 33, .05); }
.grp-card + .grp-card { margin-top: 1.1rem; }
.grp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--line-2); }
.grp-head .grp-name { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.grp-head .cat-name input { font-weight: 700; }
.grp-empty { margin: .6rem 0 0; }
/* Recibo y edición de pedido */
.receipt-grid { display: grid; grid-template-columns: 180px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 640px) { .receipt-grid { grid-template-columns: 1fr; } .receipt-thumb img { width: 160px; } }
.receipt-thumb img { width: 180px; height: auto; border-radius: 10px; border: 1px solid var(--line-2); box-shadow: 0 4px 14px rgba(20, 24, 33, .08); display: block; }
.receipt-card h2 { margin-top: 0; }
.receipt-highlight { border: 2px solid #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }
.btn.whatsapp { background: #25D366; border-color: #25D366; color: #fff; display: inline-flex; align-items: center; gap: .45rem; }
.btn.whatsapp:hover { background: #1EBE5A; text-decoration: none; }
.qty-edit { display: inline-flex; align-items: center; gap: .3rem; }
.qty-edit input { width: 4.2rem; text-align: center; }
.row-removed { opacity: .45; text-decoration: line-through; }
.row-removed input { text-decoration: none; }
.row-new { background: var(--primary-soft); }
.add-options { display: grid; gap: .2rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 1rem; }
.add-btn-field { display: flex; align-items: flex-end; }
/* Ejemplo de la dirección en el navegador (registro) */
.url-demo { margin-top: .6rem; border: 1px solid #DADDE3; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 4px 16px rgba(20, 24, 33, .08); }
.url-demo-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; background: #EEF0F3; border-bottom: 1px solid #DADDE3; }
.url-demo-dots { display: inline-flex; gap: 5px; flex: none; }
.url-demo-dots i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; display: block; }
.url-demo-dots i:nth-child(2) { background: #FEBC2E; }
.url-demo-dots i:nth-child(3) { background: #28C840; }
.url-demo-address { flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; padding: .35rem .7rem; background: #fff; border-radius: 999px; font-size: .88rem; color: #4B5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 0 0 2px var(--primary, #1F5EFF); }
.url-demo-address svg { color: #16A34A; flex: none; }
.url-demo-address strong { color: var(--primary, #1F5EFF); }
.url-demo-page { display: grid; gap: .5rem; padding: .7rem .9rem .9rem; }
.url-demo-arrow { font-size: .8rem; font-weight: 700; color: var(--primary, #1F5EFF); }
.url-demo-name { font-weight: 800; font-size: 1rem; color: #111827; }
.url-demo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.url-demo-cards i { display: block; height: 42px; border-radius: 8px; background: #F1F3F7; }
.url-demo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cron-status { padding: .75rem 1rem; border-left: 4px solid var(--line-2); font-size: .95rem; }
.cron-status.is-ok { border-left-color: #16A34A; background: #F0FDF4; }
.cron-status.is-bad { border-left-color: #DC2626; background: #FEF2F2; }
.cron-status.is-unknown { border-left-color: #9CA3AF; }

/* Términos y Condiciones: casillas de aceptación y texto en el panel */
.consent { display: grid; gap: .7rem; margin: .4rem 0 1.1rem; padding: 1rem 1.05rem; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fcfbfa; }
.consent .field { margin: 0; }
.consent-check { font-weight: 450; line-height: 1.45; cursor: pointer; }
.consent-check input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .12rem; accent-color: var(--kv-orange, #f57c00); cursor: pointer; }
.consent-check .req { color: var(--bad, #b91c1c); font-weight: 600; }
.consent-note { font-size: .82rem; color: var(--ink-3, #6b7280); margin: 0; }
.terms-card { max-width: 760px !important; }
.kv-auth-main.no-side:has(.terms-card) { grid-template-columns: minmax(0, 780px); }
.terms-box { max-height: min(52vh, 520px); overflow-y: auto; padding: .4rem 1.2rem; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fff; font-size: .93rem; line-height: 1.6; color: #374151; }
.terms-box:focus-visible { outline: 2px solid var(--kv-orange, #f57c00); outline-offset: 2px; }
.terms-box .kv-doc-sec { padding: .9rem 0; border-top: 1px solid var(--line, #eee); }
.terms-box .kv-doc-sec:first-child { border-top: 0; }
.terms-box h2 { font-size: 1rem; margin: 0 0 .5rem; }
.terms-box .kv-doc-n { color: #c25f00; }
.terms-box p { margin: 0 0 .6rem; }
.terms-box ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.kv-ph { background: #fff3c4; color: #7a5200; padding: 0 .3em; border-radius: 4px; border: 1px dashed #e7c25b; }

/* Superadmin › editor de Términos */
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row-actions form { margin: 0; }
.terms-secs { display: grid; gap: 1rem; margin: 1rem 0; }
.terms-sec { position: relative; margin: 0; padding: 1rem 1.1rem .4rem; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: #fcfcfd; min-width: 0; }
.terms-sec legend { padding: 0 .4rem; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.terms-sec-n { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; margin-right: .2rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .8rem; }
.terms-sec-tools { position: absolute; top: -.85rem; right: .8rem; display: flex; gap: .3rem; background: #fcfcfd; padding: 0 .3rem; }
.terms-sec textarea { width: 100%; font-family: inherit; line-height: 1.55; resize: vertical; }
.terms-note { margin: .4rem 0 0; padding: .45rem .7rem; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .85rem; }
.terms-help { margin: .2rem 0 .4rem; }
.terms-help summary { cursor: pointer; color: var(--primary); font-weight: 500; }
.terms-help ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.terms-log { list-style: none; margin: 0; padding: 0; display: grid; }
.terms-log li { display: block; padding: .5rem 0; border-top: 1px solid var(--line, #eee); line-height: 1.45; }
.terms-log li:first-child { border-top: 0; }
.wait-art img.wait-dog { width: 138px; border-radius: 0; margin-top: 6px; }
.pw-chosen { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 14px; background: var(--primary-soft); }
.btn.success { background: #16a34a; border-color: #16a34a; color: #fff !important; font-weight: 650; }
.btn.success:hover { background: #12863d; border-color: #12863d; text-decoration: none; }
.btn.btn-lg { padding: .8rem 1.6rem; font-size: 1.02rem; }
.specs-rows { display: grid; gap: .5rem; margin: .4rem 0 .7rem; }
.specs-row { gap: .6rem; }
.specs-row .field { margin: 0; }
.specs-row.is-extra { display: none; }

/* Mis tiendas (entrar con la Cuenta Expansión México) */
.pick-list { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.pick-item { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; background: #fff; }
.pick-main { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.pick-main small { color: var(--muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item .btn { white-space: nowrap; }
.cuenta-btn { display: flex; align-items: center; justify-content: center; gap: .55rem; }
.cuenta-note { text-align: center; margin-top: .9rem; }
.readonly-banner { background: #fff4e3; color: #8a5300; border: 1px solid #f6dfae; border-radius: 10px; padding: .6rem .9rem; margin-bottom: 1rem; font-size: .92rem; }
