/* ==========================================================================
   Plataforma — Panel, Super Admin, autenticación y landing
   Mobile first · minimalista · sin dependencias de compilación
   ========================================================================== */
:root {
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --on-primary: #ffffff;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .10);
  --green: #16a34a; --green-50: #ecfdf3;
  --red: #dc2626; --red-50: #fef2f2;
  --amber: #b45309; --amber-50: #fffbeb;
  --blue: #2563eb; --blue-50: #eff6ff;
  --gray: #4b5563; --gray-50: #f3f4f6;
  --sidebar: 252px;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; align-items: center; gap: .75rem; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 1rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Botones ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; white-space: nowrap; background: var(--gray-50); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: #cbd5e1; background: #fafafa; }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: var(--green); color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--gray-50); color: var(--text); }
.btn-sm { min-height: 36px; padding: .35rem .75rem; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { min-height: 38px; width: 38px; padding: 0; }
.btn .bi { font-size: 1.1em; }

/* ── Formularios ───────────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.input, input:not([type]), input[type=text], input[type=month], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: .65rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
input[type=color] { width: 54px; height: 46px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
input[type=file] { font-size: .9rem; max-width: 100%; }
.is-invalid { border-color: var(--red) !important; }
.error { color: var(--red); font-size: .82rem; margin-top: .3rem; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: flex; align-items: center; padding: 0 .75rem; background: var(--gray-50); border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.input-group input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-weight: 500; margin-bottom: .6rem; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--primary); flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { width: 44px; height: 26px; background: #d1d5db; border-radius: 99px; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transition: transform .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--primary-50); }

/* ── Tarjetas ──────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; }
.card + .card { margin-top: 1rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.card-header h2, .card-header h3 { margin: 0; }
.card-flush { padding: 0; overflow: hidden; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 1.5rem 0 .6rem; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: .4rem; }
.stat .value { font-size: 1.55rem; font-weight: 750; letter-spacing: -.02em; margin-top: .2rem; }
.stat .sub { color: var(--muted); font-size: .78rem; }
.stat .bi { color: var(--primary); }

/* ── Badges y alertas ──────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 650; background: var(--gray-50); color: var(--gray); white-space: nowrap; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-blue { background: var(--blue-50); color: var(--blue); }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; }
.alert .bi { font-size: 1.15rem; line-height: 1.3; }
.alert-success { background: var(--green-50); color: #166534; }
.alert-error { background: var(--red-50); color: #991b1b; }
.alert-warning { background: var(--amber-50); color: #92400e; }
.alert-info { background: var(--blue-50); color: #1e40af; }

/* ── Tablas (se convierten en tarjetas en móvil) ───────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: #fafbfc; white-space: nowrap; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfcfd; }
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
  .table-cards td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; }
  .table-cards td.td-main { display: block; text-align: left; font-weight: 600; }
  .table-cards td.td-main::before { content: none; }
}

/* ── Lista de productos ────────────────────────────────── */
.item-list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.item:last-child { border-bottom: 0; }
.item .thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--gray-50); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 1.4rem; overflow: hidden; }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .info { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { color: var(--muted); font-size: .82rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.item .actions { display: flex; gap: .25rem; align-items: center; }
.item.is-off { opacity: .6; }
.handle { cursor: grab; color: #9ca3af; padding: .25rem; font-size: 1.2rem; touch-action: none; }
.sortable-ghost { opacity: .4; background: var(--primary-50); }

/* ── Menú desplegable ──────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 190px; padding: .35rem; z-index: 40; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .6rem .7rem; border: 0; background: none; border-radius: 8px; color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; text-decoration: none !important; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--gray-50); }
.dropdown-menu .danger { color: var(--red); }

/* ── Layout del panel ──────────────────────────────────── */
.app { min-height: 100vh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); height: 60px; display: flex; align-items: center; gap: .75rem; padding: 0 1rem; }
.topbar .brand { font-weight: 800; font-size: 1.05rem; color: var(--text); display: flex; align-items: center; gap: .55rem; min-width: 0; text-decoration: none !important; }
.topbar .brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.main { padding: 1rem 1rem 6.5rem; max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1.25rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: .15rem 0 0; font-size: .92rem; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); display: flex; padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
.bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem 0; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none !important; background: none; border: 0; font-family: inherit; cursor: pointer; }
.bottom-nav .bi { font-size: 1.35rem; }
.bottom-nav .active { color: var(--primary); }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 10px; color: #374151; font-weight: 550; font-size: .93rem; text-decoration: none !important; }
.nav-link .bi { font-size: 1.15rem; color: #9ca3af; }
.nav-link:hover { background: var(--gray-50); }
.nav-link.active { background: var(--primary-50); color: var(--primary); }
.nav-link.active .bi { color: var(--primary); }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; font-weight: 700; padding: 1rem .8rem .35rem; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 50; display: none; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 85vw; background: var(--surface); z-index: 51; transform: translateX(-100%); transition: transform .25s; padding: 1rem .75rem; overflow-y: auto; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { display: block; }
.impersonation { background: #111827; color: #fff; text-align: center; padding: .5rem 1rem; font-size: .85rem; }
.impersonation a { color: #a5b4fc; font-weight: 700; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 1.4rem; }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .stats.stats-4 { grid-template-columns: repeat(4, 1fr); }
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); padding: 1rem .8rem; overflow-y: auto; z-index: 20; }
  .sidebar .brand { font-weight: 800; display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; color: var(--text); font-size: 1.05rem; text-decoration: none !important; }
  .sidebar .brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
  .app-content { margin-left: var(--sidebar); }
  .bottom-nav, .topbar .menu-btn { display: none; }
  .main { padding: 1.75rem 2rem 3rem; }
  h1 { font-size: 1.65rem; }
}
.layout-2 { display: grid; gap: 1rem; }
@media (min-width: 1024px) { .layout-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }

/* ── Componentes varios ───────────────────────────────── */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .bi { font-size: 2.5rem; color: #c7cbd4; display: block; margin-bottom: .5rem; }
.empty h3 { color: var(--text); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li a { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; color: var(--text); border-bottom: 1px dashed var(--border); text-decoration: none !important; font-weight: 550; }
.checklist li:last-child a { border-bottom: 0; }
.checklist .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: .85rem; }
.checklist .done .dot { background: var(--green); border-color: var(--green); }
.checklist .done span { color: var(--muted); text-decoration: line-through; }
.progress { height: 8px; background: var(--gray-50); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); border-radius: 99px; }
.url-box { display: flex; align-items: center; gap: .5rem; background: var(--primary-50); border-radius: var(--radius-sm); padding: .6rem .6rem .6rem .9rem; }
.url-box > a:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.img-preview { width: 100%; max-width: 220px; aspect-ratio: 1; border-radius: var(--radius-sm); border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fafafa; color: #9ca3af; cursor: pointer; position: relative; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview.wide { max-width: 100%; aspect-ratio: 3 / 1; }
.img-preview.logo img { object-fit: contain; padding: 8px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem; }
.gallery-grid .g-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--gray-50); }
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid .g-item button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.theme-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.theme-option { border: 2px solid var(--border); border-radius: var(--radius); padding: .65rem; cursor: pointer; display: block; transition: border-color .15s; }
.theme-option input { position: absolute; opacity: 0; }
.theme-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.theme-option .preview { height: 70px; border-radius: 8px; margin-bottom: .5rem; display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.theme-option .preview i { display: block; height: 10px; border-radius: 4px; }
.theme-option strong { font-size: .9rem; }
.pill-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; scrollbar-width: none; }
.pill-tabs a { padding: .45rem .9rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .85rem; white-space: nowrap; text-decoration: none !important; }
.pill-tabs a.active { background: var(--text); color: #fff; border-color: var(--text); }
.chart-box { position: relative; height: 260px; }
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-list li { position: relative; padding: .5rem .7rem; margin-bottom: .35rem; border-radius: 8px; overflow: hidden; display: flex; justify-content: space-between; gap: .75rem; font-size: .9rem; }
.bar-list li .bar { position: absolute; inset: 0 auto 0 0; background: var(--primary-50); z-index: 0; border-radius: 8px; }
.bar-list li span { position: relative; z-index: 1; }
.bar-list li span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 2rem)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(17,24,39,.45); }
dialog.modal .modal-body { padding: 1.25rem; }
dialog.modal .modal-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; background: #fafbfc; }
.pagination { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 .75rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.pagination .active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.pagination .disabled { opacity: .45; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #111827; color: #fff; padding: .7rem 1.1rem; border-radius: 99px; font-size: .9rem; z-index: 100; box-shadow: var(--shadow-lg); }

/* ── Autenticación ─────────────────────────────────────── */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem; background: radial-gradient(1200px 600px at 10% -10%, var(--primary-100) 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e0f2fe 0, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 640px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; margin-bottom: 1.25rem; color: var(--text); text-decoration: none !important; }
.auth h1 { text-align: center; font-size: 1.45rem; }
.auth .lead { text-align: center; color: var(--muted); margin-bottom: 1.5rem; }
.slug-status { font-size: .82rem; margin-top: .35rem; font-weight: 600; }
.slug-status.ok { color: var(--green); }
.slug-status.bad { color: var(--red); }

@media print { .sidebar, .topbar, .bottom-nav { display: none !important; } .app-content { margin: 0 !important; } }
.save-bar { position: sticky; bottom: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem; }
.save-bar .btn { flex: 1 1 220px; }
@media (min-width: 1024px) { .save-bar { bottom: 1rem; } }

/* ── Ajustes en lista (estilo app) y selector de color ─── */
.settings-title { font-size: 1rem; font-weight: 750; margin: 1.6rem 0 .6rem .15rem; }
.settings-title:first-child { margin-top: 0; }
.settings-group { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.settings-group + .settings-group { margin-top: .75rem; }
.setting-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; min-height: 64px; }
.settings-group > .setting-row + .setting-row, .settings-group > * + .setting-row, .settings-group > .color-picker + .color-picker { border-top: 1px solid var(--border); }
.setting-label { color: var(--muted); min-width: 120px; flex-shrink: 0; font-size: .95rem; }
.setting-control { flex: 1; min-width: 0; }
.setting-control input:not([type=checkbox]):not([type=color]), .setting-control select, .setting-control textarea { border-color: transparent; background: transparent; padding-left: 0; min-height: 40px; }
.setting-control input:not([type=checkbox]):not([type=color]):focus, .setting-control select:focus, .setting-control textarea:focus { background: var(--gray-50); padding-left: .6rem; border-color: var(--border); }
.setting-row .hint { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.setting-row.stack-sm { flex-wrap: wrap; }
@media (max-width: 560px) { .setting-row { flex-wrap: wrap; gap: .25rem; } .setting-label { min-width: 100%; font-size: .85rem; } }
.color-control { display: flex; align-items: center; gap: .9rem; }
.color-swatch-big { width: 66px; height: 40px; border-radius: 6px; border: 1px solid rgba(0,0,0,.25); cursor: pointer; position: relative; flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.color-swatch-big input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.color-control .hex { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 1.05rem !important; max-width: 140px; text-transform: lowercase; }
.swatches { display: flex; flex-wrap: wrap; gap: .55rem; padding: .9rem 1.1rem 1.1rem; }
.settings-group > .color-picker > .swatches { border-top: 1px dashed var(--border); }
.swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--sw); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; transition: transform .12s, box-shadow .12s; padding: 0; }
.swatch:hover { transform: scale(1.08); }
.swatch.selected { box-shadow: 0 0 0 2px var(--text); }
.swatch:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 560px) { .swatch { width: 38px; height: 38px; } }
.option-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; padding: .25rem 0; }
.option-card { position: relative; border: 2px solid var(--border); border-radius: 14px; padding: .7rem; cursor: pointer; text-align: center; font-weight: 600; font-size: .85rem; transition: border-color .15s, background .15s; background: var(--surface); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); }
.option-card:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-100); }
.option-card .demo { height: 46px; border-radius: 10px; margin-bottom: .45rem; display: flex; align-items: center; justify-content: center; gap: 4px; background: var(--gray-50); overflow: hidden; }

/* ── Página de diseño con vista previa en vivo ─────────── */
.design-layout { display: grid; gap: 1.5rem; }
.design-preview { order: -1; }
.preview-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: .5rem; text-align: center; }
.phone { width: 300px; max-width: 100%; margin: 0 auto; background: #0f1115; border-radius: 40px; padding: 10px; box-shadow: 0 30px 60px rgba(17,24,39,.25), inset 0 0 0 2px #2a2d33; }
@media (max-width: 1023px) {
  .design-preview { position: fixed; right: 12px; bottom: 156px; z-index: 25; order: 0; transform: scale(.4); transform-origin: bottom right; transition: transform .3s cubic-bezier(.2,.8,.2,1); cursor: zoom-in; }
  .design-preview.big { transform: scale(.82); cursor: zoom-out; }
  .design-preview .preview-label { display: none; }
  .design-preview .phone { box-shadow: 0 30px 60px rgba(17,24,39,.45), inset 0 0 0 2px #2a2d33; }
  .design-layout > div:first-child { padding-bottom: 120px; }
}
@media (min-width: 1024px) { .design-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .design-preview { order: 0; position: sticky; top: 84px; } }
.lp { --c-primary: #4f46e5; --c-secondary: #0ea5e9; --c-bg: #f6f7fb; --c-on-primary: #fff; --c-surface: #fff; --c-text: #111827; --c-muted: #6b7280; --c-border: #eceef2; --r: 14px; --rb: 10px;
  height: 560px; overflow: hidden; border-radius: 32px; background: var(--c-bg); color: var(--c-text); font-family: var(--c-font, Inter), system-ui, sans-serif; position: relative; font-size: 12px; transition: background .25s; }
.lp.is-dark { --c-surface: #161c27; --c-text: #f3f4f6; --c-muted: #9aa3b2; --c-border: #263041; }
.lp.btn-pill { --rb: 999px; } .lp.btn-square { --rb: 4px; }
.lp-head { text-align: center; padding-bottom: 10px; }
.lp-cover { height: 86px; background: linear-gradient(135deg, var(--c-primary), var(--c-secondary)); background-size: cover; background-position: center; transition: all .25s; }
.lp.hdr-solid .lp-cover { background: var(--c-primary); }
.lp.hdr-minimal .lp-cover { height: 18px; background: transparent; }
.lp.hdr-cover .lp-cover:not([style*="url"]) { background: linear-gradient(160deg, color-mix(in srgb, var(--c-primary) 70%, #000), var(--c-secondary)); }
.lp-logo { width: 54px; height: 54px; border-radius: 16px; margin: -27px auto 6px; background: var(--c-surface); border: 3px solid var(--c-surface); box-shadow: 0 4px 14px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 800; font-size: 20px; color: var(--c-primary); position: relative; }
.lp.hdr-minimal .lp-logo { margin-top: 0; }
.lp-logo img { width: 100%; height: 100%; object-fit: contain; }
.lp-name { font-weight: 800; font-size: 15px; }
.lp-sub { color: var(--c-muted); font-size: 10.5px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.lp-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.lp-actions { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.lp-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: var(--rb); font-weight: 700; font-size: 11px; }
.lp-wa { background: #25d366; color: #fff; }
.lp-ghost { background: var(--c-surface); border: 1px solid var(--c-border); }
.lp-search { margin: 4px 12px 8px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--rb); padding: 8px 10px; color: var(--c-muted); font-size: 11px; }
.lp-chips { display: flex; gap: 5px; padding: 0 12px 8px; }
.lp-chips span { padding: 4px 10px; border-radius: 99px; background: var(--c-surface); border: 1px solid var(--c-border); font-weight: 600; font-size: 10.5px; }
.lp-chips .on { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }
.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; }
.lp-card { background: var(--c-surface); border-radius: var(--r); overflow: hidden; }
.lp.card-shadow .lp-card { box-shadow: 0 4px 16px rgba(16,24,40,.09); }
.lp.card-border .lp-card { border: 1px solid var(--c-border); }
.lp.card-flat .lp-card { background: transparent; }
.lp.card-flat .lp-img { border-radius: var(--r); }
.lp-img { aspect-ratio: 1; background: color-mix(in srgb, var(--c-primary) 9%, var(--c-surface)); display: flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--c-primary) 45%, transparent); font-size: 22px; position: relative; }
.lp-tag { position: absolute; top: 6px; left: 6px; background: var(--c-secondary); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 6px; }
.lp-add { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: var(--rb); background: var(--c-primary); color: var(--c-on-primary); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.lp.btn-pill .lp-add { border-radius: 50%; }
.lp-body { padding: 7px 8px 9px; }
.lp-pname { font-weight: 650; font-size: 11px; }
.lp-old { color: var(--c-muted); text-decoration: line-through; font-size: 9.5px; }
.lp-price { color: var(--c-primary); font-weight: 800; font-size: 12.5px; }
.lp.is-dark .lp-price { color: color-mix(in srgb, var(--c-primary) 70%, #fff); }
.lp-cart { position: absolute; left: 12px; right: 12px; bottom: 14px; background: var(--c-primary); color: var(--c-on-primary); border-radius: calc(var(--rb) + 2px); padding: 10px 12px; display: flex; justify-content: space-between; font-weight: 700; font-size: 11px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.option-card .demo.hdr-demo-cover { background: linear-gradient(160deg, #475569, #94a3b8); }
.option-card .demo.hdr-demo-gradient { background: linear-gradient(135deg, var(--primary), #0ea5e9); }
.option-card .demo.hdr-demo-solid { background: var(--primary); }
.option-card .demo.hdr-demo-minimal { background: var(--gray-50); box-shadow: inset 0 -2px 0 var(--border); }
.btn-demo { background: var(--primary); color: var(--on-primary); font-size: .72rem; padding: .3rem .7rem; }
.btn-demo-rounded { border-radius: 8px; } .btn-demo-pill { border-radius: 99px; } .btn-demo-square { border-radius: 2px; }
.card-demo { width: 34px; height: 34px; background: #fff; border-radius: 6px; }
.card-demo-shadow { box-shadow: 0 3px 8px rgba(0,0,0,.18); } .card-demo-border { border: 1.5px solid #cbd5e1; } .card-demo-flat { background: #e2e8f0; }
.theme-options { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
