/* MGRest — sistema de diseño (panel, administración, web y autenticación)
   Tokens claros/oscuros; [data-theme] en <html> = light | dark | system. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --border: #e3e6eb; --border-strong: #cfd4dc;
  --text: #15181d; --text-2: #4a525e; --text-3: #6b7380;
  --brand: #e2552d; --brand-hover: #c9461f; --brand-soft: #fdebe5; --on-brand: #ffffff;
  --ok: #157f3c; --ok-soft: #e3f4e9; --warn: #9a5b00; --warn-soft: #fdf1dc; --danger: #c22a2a; --danger-soft: #fbe6e6;
  --info: #1f5fbf; --info-soft: #e5eefb; --focus: #1f5fbf;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
  --radius: 10px; --radius-sm: 7px; --radius-lg: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar: 248px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1e232b; --border: #2a3039; --border-strong: #3a424e;
  --text: #eef1f5; --text-2: #b6bfcb; --text-3: #8d97a5;
  --brand: #ff7a50; --brand-hover: #ff906b; --brand-soft: #3a2119; --on-brand: #1a0d07;
  --ok: #4fd187; --ok-soft: #13301f; --warn: #f2b34b; --warn-soft: #33270f; --danger: #ff7272; --danger-soft: #3a1717;
  --info: #7fb0ff; --info-soft: #172741; --focus: #7fb0ff;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0f1216; --surface: #171b21; --surface-2: #1e232b; --border: #2a3039; --border-strong: #3a424e;
    --text: #eef1f5; --text-2: #b6bfcb; --text-3: #8d97a5;
    --brand: #ff7a50; --brand-hover: #ff906b; --brand-soft: #3a2119; --on-brand: #1a0d07;
    --ok: #4fd187; --ok-soft: #13301f; --warn: #f2b34b; --warn-soft: #33270f; --danger: #ff7272; --danger-soft: #3a1717;
    --info: #7fb0ff; --info-soft: #172741; --focus: #7fb0ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--text); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.tpl-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.allergen-svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--text-3); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .5rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .92rem;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: .3rem .65rem; font-size: .84rem; }
.btn-lg { min-height: 48px; padding: .7rem 1.4rem; font-size: 1rem; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Formularios */
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label, .label { font-weight: 600; font-size: .9rem; }
.hint { font-size: .82rem; color: var(--text-3); }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: .55rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; }
.textarea { min-height: 84px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 0; }
.is-invalid { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: .84rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 22px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }

/* Tarjetas y bloques */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.card-flat { box-shadow: none; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--text-2); font-size: .85rem; }
.delta-up { color: var(--ok); font-size: .8rem; font-weight: 600; } .delta-down { color: var(--danger); font-size: .8rem; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.alert { display: block; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); } .alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); } .alert-info { background: var(--info-soft); color: var(--info); }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-2); }
.empty .icon { width: 40px; height: 40px; color: var(--text-3); margin-bottom: .5rem; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.list > li:last-child { border-bottom: 0; }

/* Layout del panel */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 1rem .75rem; display: flex; flex-direction: column; gap: .25rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; padding: .35rem .5rem .9rem; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: .9rem .6rem .3rem; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); display: grid; gap: .25rem; }
.restaurant-switch { padding: .55rem .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .5rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar .menu-toggle { display: none; }
.content { padding: 1.5rem; width: 100%; min-width: 0; }
.page-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { color: var(--text-2); margin: .25rem 0 0; }
.banner { padding: .6rem 1.5rem; font-size: .9rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.banner-info { background: var(--info-soft); color: var(--info); } .banner-warn { background: var(--warn-soft); color: var(--warn); } .banner-free { background: var(--ok-soft); color: var(--ok); }
.help-fab { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text-2); text-decoration: none; font-weight: 800; font-family: Georgia, serif; font-style: italic; }
.help-fab:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin .sidebar { background: #10141a; border-right-color: #232a33; }
.admin .sidebar .brand, .admin .sidebar .nav-link { color: #d9dee6; }
.admin .sidebar .nav-link:hover { background: #1b222b; color: #fff; }
.admin .sidebar .nav-link[aria-current="page"] { background: #2a1f1a; color: #ff9a72; }
.admin .sidebar .nav-section { color: #8a94a3; }
.admin .sidebar-foot { border-top-color: #232a33; }

/* Pasos (checklist de inicio) */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { display: flex; gap: .75rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: .8rem; font-weight: 800; color: var(--text-3); }
.steps li.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.done .step-label { color: var(--text-3); text-decoration: line-through; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }

/* Diálogos */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10,12,16,.55); }
.modal-head { padding: 1.1rem 1.25rem .5rem; } .modal-body { padding: .25rem 1.25rem 1rem; } .modal-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: .5rem; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: .9rem; }
.toast.err { background: var(--danger); color: #fff; }

/* Tabs y pills */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tab { padding: .6rem .9rem; color: var(--text-2); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.pills { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.pills a, .pills button, .pills label { padding: .4rem .8rem; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--text-2); background: var(--surface); border: 0; cursor: pointer; }
.pills [aria-current="true"], .pills input:checked + span { background: var(--brand-soft); color: var(--brand); }
.pills label { display: inline-flex; } .pills label input { position: absolute; opacity: 0; pointer-events: none; }
.pills label span { padding: 0; }

/* Gráficos simples (SVG/CSS, sin dependencias) */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: .5rem; }
.bars .bar { flex: 1 1 0; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.bars .bar:hover { opacity: 1; }
.bars-x { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-3); margin-top: .35rem; }
.hbar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: .6rem; align-items: center; font-size: .88rem; margin-bottom: .45rem; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--info); border-radius: 99px; }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.heat span { aspect-ratio: 1; border-radius: 3px; background: var(--brand); }

/* Plantillas */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.tpl-card { border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; }
.tpl-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tpl-card input { position: absolute; opacity: 0; }
.tpl-swatch { height: 96px; display: flex; flex-direction: column; justify-content: flex-end; padding: .7rem; gap: .2rem; }
.tpl-swatch b { font-size: 1.05rem; } .tpl-swatch i { font-style: normal; font-size: .75rem; opacity: .8; }
.tpl-meta { padding: .6rem .7rem; font-size: .82rem; color: var(--text-2); display: grid; gap: .2rem; flex: 1; }
.tpl-meta strong { color: var(--text); font-size: .9rem; }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.phone-frame { width: 390px; max-width: 100%; height: 720px; border: 10px solid #1d2026; border-radius: 34px; margin: 0 auto; display: block; background: #fff; }

/* Editor de menús/catálogos */
.editor-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; }
.editor-section-head { display: flex; gap: .5rem; align-items: center; padding: .75rem; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.editor-section-head .input { font-weight: 700; flex: 1 1 200px; }
.editor-section-mode { flex: none; gap: .55rem; padding: .3rem .75rem .3rem .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; transition: border-color .15s, background .15s; user-select: none; }
.editor-section-mode:hover { border-color: var(--border-strong); }
.editor-section-mode.is-on { border-color: color-mix(in srgb, var(--ok) 55%, var(--border)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.editor-section-mode input { width: 34px; height: 20px; }
.editor-section-mode input::after { width: 14px; height: 14px; }
.editor-section-mode input:checked::after { transform: translateX(14px); }
.editor-section-mode-text { font-size: .8rem; font-weight: 600; color: var(--text-2, var(--text)); white-space: nowrap; }
.editor-items { padding: .5rem .75rem .75rem; }
.editor-item { display: grid; grid-template-columns: 56px 1fr auto; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px dashed var(--border); }
.editor-item:last-child { border-bottom: 0; }
.editor-thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--surface-2); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--text-3); overflow: hidden; }
.editor-item-name { font-weight: 600; overflow-wrap: anywhere; }
.editor-item-meta { font-size: .8rem; color: var(--text-3); display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.editor-actions { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .35rem .75rem; }
.savebar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: .75rem 1rem; display: flex; gap: .75rem; align-items: center; justify-content: space-between; z-index: 10; margin: 1rem -1.5rem -1.5rem; flex-wrap: wrap; }
details.advanced > summary { cursor: pointer; font-weight: 600; color: var(--text-2); margin: .25rem 0 .75rem; }
.allergen-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-size: .66rem; font-weight: 800; border: 1px solid var(--border); }

/* Autenticación */

/* Web pública */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-nav { max-width: 1180px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.site-nav .links { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.site-nav .links a:not(.btn) { color: var(--text-2); text-decoration: none; font-weight: 600; padding: .45rem .6rem; border-radius: var(--radius-sm); font-size: .93rem; }
.site-nav .links a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.site-nav .nav-toggle { display: none; margin-left: auto; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 4rem 0; } .section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.price-old { text-decoration: line-through; color: var(--text-3); font-size: 1.25rem; font-weight: 700; }
.price-now { font-size: 3rem; font-weight: 900; color: var(--brand); line-height: 1; margin: .25rem 0; }
.checklist { list-style: none; padding: 0; margin: 1rem 0; text-align: left; display: grid; gap: .45rem; }
.checklist li { display: flex; gap: .5rem; align-items: flex-start; }
.checklist li::before { content: "✓"; color: var(--ok); font-weight: 900; }
.prose { max-width: 760px; } .prose h2 { margin-top: 2.25rem; } .prose h3 { margin-top: 1.5rem; }
.prose img { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); height: auto; margin: .5rem 0 1rem; }
.prose ol, .prose ul { padding-left: 1.3rem; } .prose li { margin-bottom: .35rem; }
.toc { position: sticky; top: 84px; align-self: start; font-size: .9rem; }
.toc ol { padding-left: 1.1rem; margin: 0; } .toc a { color: var(--text-2); text-decoration: none; } .toc a:hover { color: var(--brand); }
.manual-grid { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: 280px; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .topbar .menu-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .topbar { padding: .6rem 1rem; }
  .savebar { margin: 1rem -1rem -1rem; }
  .manual-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .site-nav .nav-toggle { display: inline-flex; }
  .site-nav .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
  .site-nav .links.open { display: flex; }
  .banner { padding: .6rem 1rem; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .editor-item { grid-template-columns: 44px 1fr; }
  .editor-item .editor-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .editor-thumb { width: 44px; height: 44px; }
  .section { padding: 2.75rem 0; }
  .hbar { grid-template-columns: 1fr auto; } .hbar .track { grid-column: 1 / -1; grid-row: 2; }
}

/* Web pública — portada */
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.02em; line-height: 1.15; margin: .25rem 0 0; }
.section-head { margin-bottom: 2.25rem; }
.section-head.center { text-align: center; }

.hero-photo { position: relative; color: #fff; padding: 5rem 0 4.5rem; background: #14100d var(--hero-img) center / cover no-repeat; isolation: isolate; overflow: hidden; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(14,10,8,.88) 0%, rgba(14,10,8,.72) 45%, rgba(14,10,8,.35) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero-photo h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.025em; line-height: 1.08; margin: 1rem 0; color: #fff; }
.hero-photo .lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 34rem; margin: 0 0 1.75rem; }
.hero-pill { display: inline-block; padding: .35rem .85rem; border-radius: 99px; font-size: .8rem; font-weight: 700; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-glass { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); color: #fff; }
.btn-glass:hover { background: rgba(255,255,255,.2); }
.hero-checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .9rem; color: rgba(255,255,255,.8); }
.hero-checks li::before { content: "✓"; margin-right: .4rem; color: var(--brand); font-weight: 900; }
.hero-phone img { display: block; width: 100%; max-width: 330px; height: auto; margin: 0 auto; border-radius: 28px; border: 8px solid #111; box-shadow: 0 30px 60px rgba(0,0,0,.45); transform: rotate(2deg); }

/* Carruseles continuos (marquee): la pista contiene el contenido duplicado */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 1rem; width: max-content; animation: mg-marquee 50s linear infinite; padding: .5rem 0 1rem; }
.marquee-slow .marquee-track { animation-duration: 70s; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes mg-marquee { to { transform: translateX(calc(-50% - .5rem)); } }

.photo-strip { padding: 1.5rem 0 0; background: var(--bg); }
.strip-item { position: relative; margin: 0; width: 240px; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; flex: none; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .9rem .7rem; color: #fff; font-weight: 700; font-size: .92rem; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* Funciones: lista compacta + carrusel de capturas */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: center; }
.feature-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1.5rem; }
.feature-list li { display: flex; gap: .8rem; align-items: flex-start; }
.feature-list strong { display: block; font-size: .98rem; }
.feature-list span:not(.icon-box) { color: var(--text-3); font-size: .9rem; }
.icon-box { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }

.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); background: var(--surface); }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; }
.carousel-slide img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: top left; }
.carousel-slide figcaption { position: absolute; left: 1rem; bottom: 1rem; background: rgba(15,18,22,.78); color: #fff; padding: .35rem .75rem; border-radius: 99px; font-size: .82rem; font-weight: 600; }
.carousel-dots { display: flex; justify-content: center; gap: .45rem; margin-top: 1rem; }
.carousel-dots button { width: 9px; height: 9px; padding: 0; border-radius: 99px; border: 0; background: var(--border-strong); cursor: pointer; transition: width .25s, background .25s; }
.carousel-dots button[aria-current="true"] { width: 26px; background: var(--brand); }

/* Tres pasos: tarjetas idénticas */
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: none; }
.how-steps .step { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.step-img { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.step-img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.step-body { display: flex; gap: .9rem; padding: 1.2rem 1.25rem 1.4rem; flex: 1; }
.step-body h3 { margin: 0 0 .2rem; font-size: 1.08rem; }
.step-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* Plantillas en carrusel */
.tpl-phone { flex: none; width: 220px; border-radius: 22px; overflow: hidden; background: var(--t-bg); color: var(--t-text); border: 6px solid #15181d; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transition: transform .2s; }
.tpl-phone:hover { transform: translateY(-4px); }
.tpl-phone img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tpl-phone-body { display: flex; flex-direction: column; gap: .45rem; padding: .9rem .9rem 1rem; }
.tpl-phone-body b { font-family: var(--t-head); font-size: 1.12rem; line-height: 1.2; }
.tpl-line { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--t-accent); font-weight: 700; border-bottom: 1px solid var(--t-line); padding-bottom: .3rem; }
.tpl-row { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; }
.tpl-row em { font-style: normal; font-weight: 700; color: var(--t-accent); white-space: nowrap; }
.tpl-cta { margin-top: .3rem; font-size: .75rem; font-weight: 700; color: var(--t-accent); }

/* Plan */
.plan { display: grid; grid-template-columns: 1fr 1.1fr 1.2fr; max-width: 1060px; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); }
.plan-media { min-height: 260px; background: center / cover no-repeat; border-radius: 21px 0 0 21px; position: relative; }
.plan-name { position: absolute; left: 1rem; top: 1rem; background: var(--brand); color: var(--on-brand); font-weight: 800; padding: .35rem .9rem; border-radius: 99px; font-size: .85rem; }
.plan-price { padding: 2rem; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border); }
.plan-list { padding: 2rem; margin: 0; align-content: center; }
.price-old { text-decoration: line-through; color: var(--text-3); font-size: 1.1rem; font-weight: 700; }
.price-now { font-size: 3.2rem; font-weight: 900; color: var(--text); line-height: 1; margin: .2rem 0 .5rem; letter-spacing: -.03em; }
.plan-note { display: flex; align-items: center; gap: .45rem; color: var(--text-2); font-size: .92rem; }
.info-tip { position: relative; display: inline-flex; }
.info-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: italic 700 .78rem/1 Georgia, serif; cursor: pointer; padding: 0; }
.info-btn:hover, .info-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.info-pop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(300px, 80vw); background: var(--text); color: var(--bg); font-size: .82rem; line-height: 1.45; padding: .75rem .9rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .15s; z-index: 5; }
.info-tip:hover .info-pop, .info-btn:focus-visible + .info-pop, .info-btn[aria-expanded="true"] + .info-pop { opacity: 1; visibility: visible; }

/* Preguntas frecuentes */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: .75rem; transition: border-color .15s; }
.faq details[open] { border-color: var(--brand); }
.faq summary { cursor: pointer; font-weight: 700; padding: 1.1rem 1.3rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 1.3rem 1.2rem; color: var(--text-2); }
.faq-lg summary { font-size: 1.05rem; padding: 1.35rem 1.5rem; }
.faq-lg details p { padding: 0 1.5rem 1.4rem; font-size: 1rem; }
.faq-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3.5rem; align-items: start; }
.faq-aside .hero-actions { margin: 1.25rem 0 1.5rem; }
.faq-photo { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); display: block; }

/* Footer */
.site-footer { background: #121417; color: #aab2bd; font-size: .92rem; padding: 0 0 1.5rem; margin-top: 4rem; }
.site-footer a { color: #d5dae1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-cta { position: relative; isolation: isolate; transform: translateY(-3rem); margin-bottom: -1rem; border-radius: 22px; overflow: hidden; padding: 2.5rem; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #222 center / cover; color: #fff; }
.footer-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14,10,8,.9), rgba(14,10,8,.55)); }
.footer-cta h2 { margin: 0 0 .35rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: #fff; }
.footer-cta p { margin: 0; color: rgba(255,255,255,.8); }
.site-footer .footer-cta .btn-primary { color: var(--on-brand); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; padding: 3rem 1rem 2.5rem; }
.footer-brand .brand { color: #fff; font-size: 1.15rem; padding: 0; margin-bottom: .75rem; }
.footer-brand p { max-width: 18rem; margin: 0; }
.footer-grid h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin: 0 0 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid #2a2f36; padding-top: 1.5rem; font-size: .85rem; }

@media (max-width: 960px) {
  .hero-photo { padding: 3.5rem 0; }
  .hero-grid, .split, .faq-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-phone img { max-width: 260px; transform: none; }
  .how-steps { grid-template-columns: 1fr 1fr; }
  .plan { grid-template-columns: 1fr 1fr; }
  .plan-media { grid-column: 1 / -1; min-height: 200px; border-radius: 21px 21px 0 0; }
  .faq-photo { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hero-photo::before { background: rgba(14,10,8,.78); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-phone { display: none; }
  .strip-item { width: 180px; }
  .feature-list { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .plan { grid-template-columns: 1fr; }
  .plan-price { border-right: 0; border-bottom: 1px solid var(--border); padding: 1.5rem; }
  .plan-list { padding: 1.5rem; }
  .plan-note { position: relative; } .plan-note .info-tip { position: static; }
  .info-pop { left: 0; right: 0; width: auto; transform: none; }
  .tpl-phone { width: 190px; }
  .faq-lg summary { padding: 1.1rem 1.15rem; font-size: 1rem; }
  .faq-lg details p { padding: 0 1.15rem 1.1rem; }
  .footer-cta { padding: 1.75rem 1.4rem; }
  .footer-cta .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
.site-footer:not(:has(.footer-cta)) { margin-top: 0; }

/* Cabeceras con foto de páginas interiores */
.page-hero { padding: 4.5rem 0 4rem; }
.page-hero .eyebrow { color: #ffb59c; }
.page-hero .lead { max-width: 40rem; }

/* Página de plantillas */
.tpl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2.5rem 1.75rem; }
.tpl-item { display: flex; flex-direction: column; gap: 1rem; }
.tpl-item .tpl-phone { width: 100%; }
.tpl-info h2 { font-size: 1.1rem; margin: 0; }
.tpl-info p { margin: .3rem 0 .6rem; color: var(--text-3); font-size: .9rem; }
.tpl-dots { display: inline-flex; }
.tpl-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -5px; box-shadow: 0 0 0 1px var(--border); }
.tpl-links { display: flex; gap: 1rem; font-size: .88rem; font-weight: 700; }
.tpl-links a { color: var(--brand); text-decoration: none; }
.tpl-links a:hover { text-decoration: underline; }

/* Centro de ayuda */
.help-hero { padding-bottom: 6rem; }
.help-search { display: flex; align-items: center; gap: .6rem; max-width: 560px; margin-top: 1.75rem; background: #fff; color: #15181d; border-radius: 99px; padding: .35rem .5rem .35rem 1.2rem; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.help-search .icon { color: #6b7380; width: 20px; height: 20px; }
.help-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: .7rem 0; background: transparent; color: inherit; min-width: 0; }
.help-topics-wrap { margin-top: -3.5rem; position: relative; }
.help-topics { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; }
.help-topic { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); text-decoration: none; color: var(--text); transition: transform .2s, border-color .2s; }
.help-topic:hover { transform: translateY(-3px); border-color: var(--brand); }
.help-topic strong { display: block; font-size: .95rem; }
.help-topic small { color: var(--text-3); font-size: .8rem; }
.manual-grid { grid-template-columns: 250px 1fr; gap: 3.5rem; }
.toc { top: 90px; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); max-height: calc(100vh - 110px); overflow-y: auto; }
.toc ol { list-style: none; padding: 0; counter-reset: toc; display: grid; gap: .1rem; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: .55rem; padding: .35rem .5rem; border-radius: var(--radius-sm); font-size: .88rem; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--text-3); font-size: .75rem; font-weight: 700; padding-top: .1rem; }
.toc a:hover { background: var(--surface-2); }
.toc a[aria-current="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.toc a[aria-current="true"]::before { color: var(--brand); }
.prose { max-width: 780px; font-size: 1rem; line-height: 1.7; }
.prose h2 { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 1.55rem; letter-spacing: -.01em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose ol { counter-reset: st; list-style: none; padding-left: 0; }
.prose ol > li { counter-increment: st; position: relative; padding-left: 2.4rem; margin-bottom: .7rem; }
.prose ol > li::before { content: counter(st); position: absolute; left: 0; top: .05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; }
.prose img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
details.faq { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: .7rem; }
details.faq[open] { border-color: var(--brand); }
details.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: 0; padding: 0 1.2rem 1rem; color: var(--text-2); }
.help-contact { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding: 1.5rem 1.75rem; border-radius: var(--radius-lg); background: var(--brand-soft); }
.help-contact p { margin: .2rem 0 0; color: var(--text-2); }
.help-hidden { display: none !important; }

/* Acceso y registro */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; background: var(--surface); }
.auth-main { display: flex; flex-direction: column; padding: 2rem clamp(1.25rem, 5vw, 4.5rem); }
.auth-brand { font-size: 1.25rem; padding: 0; }
.auth-form { width: 100%; max-width: 420px; margin: auto; padding: 2.5rem 0; }
.auth-title { font-size: clamp(1.8rem, 3vw, 2.3rem); letter-spacing: -.02em; margin: .3rem 0 .4rem; }
.auth-form .input { min-height: 48px; border-radius: 12px; background: var(--bg); }
.auth-form .input:focus { background: var(--surface); }
.auth-form .btn-lg { border-radius: 12px; min-height: 52px; }
.auth-pill { display: inline-block; margin-top: .6rem; padding: .3rem .8rem; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-size: .8rem; font-weight: 700; }
.auth-legal { font-size: .82rem; color: var(--text-3); margin: 0; }
.auth-legal a { color: var(--text-3); }
.auth-visual { position: relative; isolation: isolate; background: #222 center / cover no-repeat; display: flex; align-items: flex-end; padding: 3rem; margin: .75rem; border-radius: 24px; overflow: hidden; }
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,10,8,.1) 20%, rgba(14,10,8,.85) 100%); }
.auth-visual-inner { display: flex; align-items: flex-end; gap: 2rem; width: 100%; }
.auth-phone { width: 190px; height: auto; flex: none; border-radius: 22px; border: 6px solid #111; box-shadow: 0 25px 50px rgba(0,0,0,.5); transform: rotate(-4deg); }
.auth-quote { color: #fff; }
.auth-quote strong { display: block; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.25; letter-spacing: -.01em; margin-bottom: 1rem; }
.auth-quote ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; color: rgba(255,255,255,.85); }
.auth-quote li::before { content: "✓"; color: var(--brand); font-weight: 900; margin-right: .5rem; }

@media (max-width: 1100px) { .help-topics { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .manual-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .toc { max-height: none; position: static; }
}
@media (max-width: 640px) {
  .tpl-gallery { grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
  .tpl-links { flex-direction: column; gap: .3rem; }
  .help-topics { grid-template-columns: 1fr 1fr; }
  .help-topic { padding: .9rem; }
  .prose h2 { font-size: 1.3rem; }
  .auth-main { padding: 1.25rem; }
}
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { width: min(440px, 100%); }
.auth-card .brand { justify-content: center; font-size: 1.3rem; }

/* Contacto */
.contact-hero { padding-bottom: 7rem; }
.contact-section { padding-top: 0; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; margin-top: -4.5rem; position: relative; }
.contact-aside { padding-top: 6.5rem; }
.contact-photo { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-lg); display: block; box-shadow: var(--shadow-lg); }
.contact-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.contact-points li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-points strong { display: block; }
.contact-points span:not(.icon-box) { color: var(--text-3); font-size: .92rem; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 2.25rem; }
.contact-card h2 { margin: 0 0 .25rem; font-size: 1.5rem; }
.contact-card .input, .contact-card .textarea { border-radius: 12px; background: var(--bg); }
.contact-card .btn-lg { border-radius: 12px; min-height: 52px; }
.contact-done { text-align: center; padding: 2rem 0; }
.contact-done .icon-box { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); margin-bottom: 1rem; }
.contact-done .icon { width: 26px; height: 26px; }

/* Bandeja de mensajes (administración) */
.inbox-fab { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text-2); text-decoration: none; flex: none; }
.inbox-fab:hover { background: var(--surface-2); color: var(--text); }
.inbox-badge { position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: #e5372b; border: 2px solid var(--surface); }
.site-nav .inbox-fab { margin-right: .25rem; }
.inbox { overflow: hidden; }
.inbox-row { display: grid; grid-template-columns: 12px 220px 1fr auto; gap: 1rem; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row strong { font-weight: 500; }
.inbox-row.is-unread strong { font-weight: 800; }
.inbox-from { display: grid; min-width: 0; }
.inbox-from span, .inbox-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-dot { width: 9px; height: 9px; border-radius: 50%; }
.inbox-row.is-unread .inbox-dot { background: #e5372b; }
.message-view { display: grid; gap: 1.5rem; padding: 1.75rem; }
.message-body { white-space: pre-wrap; line-height: 1.7; font-size: 1rem; padding: 1.25rem; background: var(--surface-2); border-radius: var(--radius); }

@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { padding-top: 0; order: 2; }
  .contact-card { order: 1; }
}
@media (max-width: 640px) {
  .contact-card { padding: 1.4rem; }
  .inbox-row { grid-template-columns: 12px 1fr; gap: .3rem .8rem; }
  .inbox-row .inbox-text, .inbox-row time { grid-column: 2; }
}

/* Panel y administración — acabado moderno */
a { color: var(--brand-hover); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.app { --radius: 12px; --radius-sm: 9px; background: var(--bg); }
.app :where(a:not(.btn, .nav-link, .brand, .tab, .inbox-row, .help-fab, .inbox-fab)) { color: var(--brand-hover); font-weight: 600; text-decoration: none; }
.app :where(a:not(.btn, .nav-link, .brand, .tab, .inbox-row, .help-fab, .inbox-fab)):hover { text-decoration: underline; }
.app .table a:not(.btn) { color: var(--text); }
.app .table a:not(.btn):hover { color: var(--brand-hover); }

/* Barra superior y contenido */
.app .topbar { background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px); padding: .7rem 2rem; min-height: 60px; }
.app .content { padding: 1.75rem 2rem; }
.app .page-head { margin-bottom: 1.75rem; align-items: center; }
.app .page-head h1 { font-size: 1.75rem; letter-spacing: -.02em; margin: 0; }
.app .page-head p { font-size: .95rem; }

/* Navegación lateral */
.app .sidebar { padding: 1.1rem .85rem; gap: .15rem; }
.app .nav-link { position: relative; padding: .6rem .75rem; border-radius: 10px; transition: background .15s, color .15s; }
.app .nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.admin .sidebar .nav-link[aria-current="page"] { background: rgba(255,122,80,.14); color: #ffb196; }
.admin .sidebar .badge-brand { background: rgba(255,122,80,.18); color: #ffb196; }

/* Tarjetas y métricas */
.app .card { border-radius: 14px; padding: 1.4rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.app .card-title { font-size: 1.05rem; }
.app .stat { border-radius: 14px; padding: 1.15rem 1.25rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); display: grid; gap: .3rem; transition: border-color .15s; }
.app .stat:hover { border-color: var(--border-strong); }
.app .stat-label { font-size: .86rem; font-weight: 600; color: var(--text-2); }
.app .stat-value { font-size: 1.9rem; letter-spacing: -.02em; }
.app .list > li { padding: .8rem 0; }

/* Tablas: filas amplias, resaltado al pasar y cabecera discreta */
.app .table-wrap { border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.app .table th { background: transparent; font-size: .74rem; letter-spacing: .06em; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.app .table td { padding: .9rem 1rem; }
.app .table tbody tr { transition: background .12s; }
.app .table tbody tr:hover { background: var(--surface-2); }

/* Botones y formularios */
.app .btn { border-radius: 10px; }
.app .btn-primary { box-shadow: 0 1px 2px rgba(226,85,45,.25); }
.app .input, .app .select, .app .textarea { border-radius: 10px; border-color: var(--border); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.app .input:hover, .app .select:hover, .app .textarea:hover { border-color: var(--border-strong); }
.app .input:focus, .app .select:focus, .app .textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.app form.row .input { max-width: 340px; }
.app .badge { border: 0; padding: .2rem .6rem; }
.app .alert { border-radius: 12px; padding: .9rem 1.1rem; }
.app code { background: var(--surface-2); padding: .1rem .4rem; border-radius: 6px; font-size: .85em; }


@media (max-width: 960px) {
  .app .content { padding: 1.25rem 1rem; }
  .app .topbar { padding: .6rem 1rem; }
  .app .nav-link[aria-current="page"]::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Panel minimalista: perfil centrado y accesos con iconos grandes */
.app .restaurant-switch.profile { border: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; padding: .5rem .5rem 1.1rem; margin-bottom: .6rem; border-bottom: 1px solid var(--border); border-radius: 0; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; overflow: hidden; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 1.05rem; overflow-wrap: anywhere; color: var(--text); }
.app .sidebar .nav-link { font-size: .98rem; padding: .7rem .8rem; }
.app .sidebar .nav-link .icon { width: 22px; height: 22px; }
.action-card { padding: 0 !important; overflow: hidden; }
.action-head { font-size: 1rem; margin: 0; padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.action-list { display: grid; }
.app .action-row { display: flex; align-items: center; gap: 1.25rem; padding: 1.1rem 1.4rem; color: var(--text); font-weight: 400; text-decoration: none; border-bottom: 1px solid var(--border); transition: background .15s; }
.action-row:last-child { border-bottom: 0; }
.app .action-row:hover { background: var(--surface-2); text-decoration: none; }
.action-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.action-icon { width: 36px; height: 36px; flex: none; color: var(--text); stroke-width: 1.6; }
.action-row:hover .action-icon { color: var(--brand); }
.action-title { display: block; font-size: 1.15rem; font-weight: 600; color: var(--text); }
.action-desc { display: block; font-size: .88rem; color: var(--text-3); margin-top: .15rem; }
.action-go { transform: rotate(90deg); color: var(--text-3); flex: none; }
@media (max-width: 640px) {
  .app .action-row { gap: .9rem; padding: 1rem; }
  .action-icon { width: 30px; height: 30px; }
  .action-title { font-size: 1.05rem; }
}

/* Panel a todo el ancho: cabeceras compactas, tarjetas planas y bloques reutilizables */
.app .page-head { margin-bottom: 1.25rem; }
.app .page-head h1 { font-size: 1.5rem; }
.app .card, .app .stat, .app .table-wrap { box-shadow: none; }
.app .card + .card { margin-top: 1.25rem; }
.app .grid > .card + .card { margin-top: 0; }

/* Inicio: las nueve opciones en cuadrícula */
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.app .action-tile { display: flex; align-items: center; gap: 1.1rem; min-height: 128px; padding: 1.25rem 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); font-weight: 400; text-decoration: none; transition: border-color .15s, background .15s; }
.app .action-tile:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface)); text-decoration: none; }
.action-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.action-tile .action-icon { width: 40px; height: 40px; color: var(--brand); }
.action-tile .action-title { font-size: 1.12rem; }
@media (min-height: 760px) and (min-width: 1100px) { .app .action-tile { min-height: clamp(128px, calc((100vh - 60px - 3.5rem - 2rem) / 3), 220px); } }
@media (max-width: 1100px) { .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .action-grid { grid-template-columns: 1fr; gap: .6rem; } .app .action-tile { min-height: 0; padding: 1rem; } .action-tile .action-icon { width: 32px; height: 32px; } }

/* Diseño de la carta: plantillas 60 % y vista previa 40 %, personalización debajo */
.design-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
.design-top > .card { margin: 0; }
.design-top .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.design-top .tpl-swatch { height: 64px; padding: .5rem .6rem; }
.design-top .tpl-swatch b { font-size: 1.2rem; line-height: 1; }
.design-top .tpl-meta { padding: .45rem .6rem; display: flex; gap: .4rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.design-top .tpl-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.design-preview { position: sticky; top: 76px; }
.design-preview .phone-frame { height: min(720px, calc(100vh - 210px)); min-height: 480px; }
.design-custom { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 2rem; }
@media (max-width: 1100px) {
  .design-top { grid-template-columns: 1fr; }
  .design-preview { position: static; order: -1; }
  .design-preview .phone-frame { height: 640px; }
}
@media (max-width: 560px) { .design-top .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .design-preview .phone-frame { height: 560px; min-height: 0; border-width: 6px; border-radius: 26px; } }

/* Código QR */
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.25rem; align-items: start; }
.qr-layout > .card { margin: 0; }
.qr-card { text-align: center; }
.qr-img { background: #fff; padding: 12px; border-radius: 12px; border: 1px solid var(--border); width: min(260px, 100%); height: auto; }
@media (max-width: 860px) { .qr-layout { grid-template-columns: 1fr; } }

/* Estadísticas */
.stats-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.stats-filters .select, .stats-filters .input { min-width: 160px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi { display: grid; gap: .35rem; padding: 1.15rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.kpi-label { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.kpi-value { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi-delta { font-size: .85rem; }
.rank { list-style: none; padding: 0; margin: 0; counter-reset: rk; }
.rank li { counter-increment: rk; display: flex; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(rk); width: 1.5rem; height: 1.5rem; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.stats-more > summary { cursor: pointer; list-style: none; display: flex; gap: .6rem; align-items: baseline; }
.stats-more > summary::-webkit-details-marker { display: none; }
.stats-more > summary::before { content: "+"; font-weight: 800; color: var(--brand); }
.stats-more[open] > summary::before { content: "−"; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpi-grid { gap: .6rem; } .kpi { padding: .9rem; } .kpi-value { font-size: 1.7rem; } .stats-filters .field { flex: 1 1 100%; } .stats-filters .select, .stats-filters .input { width: 100%; } }

/* Formularios a dos columnas en pantallas anchas */
.form-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 1.25rem; align-items: start; }
.form-columns > .card { margin: 0; }

/* Web pública: capturas nítidas. Los archivos son 2560×1720 (2× DPR); se recorta la barra lateral
   y se amplía el área de contenido para que el texto no se reduzca hasta volverse ilegible. */
.step-img { position: relative; }
.step-img img { width: 200%; max-width: none; height: auto; margin-left: -38%; margin-top: -2%; object-fit: initial; }
.carousel-slide { overflow: hidden; aspect-ratio: 3 / 2; }
.carousel-slide img { width: 125%; max-width: none; height: auto; aspect-ratio: auto; margin-left: -23.8%; object-fit: initial; }

/* Centro de ayuda: capturas al ancho del texto */
.manual-grid .prose { max-width: 920px; }
.prose .shot { margin: 1.25rem 0 2rem; }
.prose .shot a { display: block; border-radius: var(--radius-lg); }
.prose .shot img { display: block; width: 100%; height: auto; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 6px 20px rgba(16,24,40,.08); cursor: zoom-in; }
.prose .shot figcaption { margin-top: .5rem; }
.prose .shot-narrow { max-width: 420px; }
@media (max-width: 640px) { .prose .shot { margin: 1rem 0 1.5rem; } .prose .shot-narrow { max-width: 100%; } }

/* Portada: bloque de contenido sobre la carta digital QR */
.seo-block { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3rem; align-items: start; }
.seo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.seo-cols h3 { font-size: 1.05rem; margin: 0 0 .35rem; }
.seo-cols p { margin: 0; font-size: .95rem; }
@media (max-width: 960px) { .seo-block { grid-template-columns: 1fr; gap: 1.5rem; } }
@media (max-width: 560px) { .seo-cols { grid-template-columns: 1fr; } }
.table-wrap { position: relative; }

/* Ajustes: filtros alineados, tarjetas a la misma altura y listado en Inicio */
.stats-filters .field { margin-bottom: 0; }
.stats-filters .btn { min-height: 42px; }
.qr-layout { align-items: stretch; }
.qr-card { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.design-top { align-items: stretch; }
.design-preview { position: static; display: flex; flex-direction: column; }
.design-preview .phone-frame { flex: 1; }
/* La columna de plantillas toma la altura de la vista previa y hace scroll interno */
.design-tpls { height: 0; min-height: 100%; display: flex; flex-direction: column; }
.design-tpls .tpl-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 3px; margin: -3px; }
@media (max-width: 1100px) { .design-tpls { height: auto; min-height: 0; } .design-tpls .tpl-scroll { max-height: 70vh; } }
.action-card.full { width: 100%; }

/* Listados de menús y catálogos: acciones alineadas en columna en todas las filas */
.btn-publish { min-width: 112px; }
.btn-edit { min-width: 82px; }

/* Menús y catálogos: listado y editor en filas más legibles */
.collection-table td { padding-top: 1rem; padding-bottom: 1rem; }
.collection-name { font-weight: 700; font-size: 1.02rem; text-decoration: none; }
.collection-meta { font-size: .84rem; color: var(--text-3); margin-top: .15rem; }
.collection-meta strong { color: var(--text-2); }
.collection-actions, .editor-actions { display: flex; gap: .4rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.editor-tools { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.editor-tools form { display: contents; }
.editor-tools .btn { border: 0; background: transparent; }
.editor-tools .btn:hover:not(:disabled) { background: var(--surface); }
.editor-tools .btn-danger { color: var(--danger, #c0392b); }
.editor-tools .btn-danger:hover { background: rgba(192, 57, 43, .1); }

.editor-section { overflow: hidden; margin-bottom: 1.25rem; }
.editor-section-head { padding: .85rem 1rem; gap: .65rem; }
.editor-section-head .input { font-size: 1.05rem; background: var(--surface); }
.editor-section-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.editor-count { font-size: .8rem; font-weight: 600; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.editor-items { padding: 0; }
.editor-items > p { padding: 0 1rem; }
.editor-item { grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); transition: background .12s; }
.editor-item:hover { background: var(--surface-2); }
.editor-item-name { font-size: 1rem; }
.editor-item-desc { font-size: .85rem; color: var(--text-3); margin-top: .1rem; line-height: 1.4; }
.editor-item-meta { margin-top: .35rem; }
.editor-item-meta:empty { display: none; }
.editor-item-price { text-align: right; white-space: nowrap; font-size: 1rem; min-width: 70px; }
.editor-item.is-sold-out .editor-item-name, .editor-item.is-hidden .editor-item-name { color: var(--text-3); }
.editor-item.is-hidden .editor-thumb { opacity: .5; }
.editor-add { display: flex; width: 100%; align-items: center; justify-content: center; gap: .4rem; padding: .8rem; border: 0; border-top: 1px dashed var(--border-strong); background: transparent; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.editor-add:hover { background: var(--brand-soft); }
@media (max-width: 640px) {
  .editor-item { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .65rem; padding: .75rem; }
  .editor-item .editor-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .collection-actions { justify-content: flex-start; }
}

/* Tarjetas de opción (Personalización) */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; max-width: 560px; }
.choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 720px; }
.choice-card { position: relative; display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.choice-card:hover { border-color: var(--brand); }
.choice-card > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input[type=radio]:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.choice-card:has(input[type=radio]:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-card > span:last-child { min-width: 0; }
.choice-card strong { display: block; font-size: .92rem; }
.choice-card small { display: block; font-size: .78rem; color: var(--text-3); line-height: 1.3; }
.choice-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.choice-card:has(input:checked) .choice-icon { background: var(--brand); color: #fff; }
.choice-swatch, .choice-color { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.choice-swatch-tpl { background: conic-gradient(#e2552d, #d4a017, #2e8b57, #2b6cb0, #8e44ad, #e2552d); }
.choice-color { padding: 0; cursor: pointer; background: none; -webkit-appearance: none; appearance: none; }
.choice-color::-webkit-color-swatch-wrapper { padding: 0; }
.choice-color::-webkit-color-swatch { border: 0; border-radius: 50%; }
.choice-color::-moz-color-swatch { border: 0; border-radius: 50%; }
.choice-card.is-muted .choice-color { filter: grayscale(.6); opacity: .6; }
@media (max-width: 640px) { .choice-grid, .choice-grid-3 { grid-template-columns: 1fr; } }

/* Subida de archivos: arrastrar y soltar */
.dropzone { position: relative; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border: 2px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.is-over { border-style: solid; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.dropzone:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.dropzone-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.dropzone-text { font-size: .9rem; color: var(--text-2); }
.dropzone-text strong { color: var(--text); }
.dropzone-thumb, .dropzone-file, .dropzone-clear { display: none; }
.dropzone.has-file { border-style: solid; border-color: var(--brand); background: var(--surface); }
.dropzone.has-file .dropzone-icon, .dropzone.has-file .dropzone-text { display: none; }
.dropzone.has-file .dropzone-thumb[src] { display: block; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.dropzone.has-file .dropzone-file { display: block; flex: 1; min-width: 0; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone.has-file .dropzone-clear { display: inline-flex; margin-left: auto; }

/* Ajustes puntuales */
.app .card.design-preview { margin-top: 0; }
.app .card.qr-link-card { margin-top: 0; }
.app .qr-link-card .field > label { margin-top: 0; }

/* Modo mantenimiento */
.maint-body { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 16px; background: var(--bg, #f6f7f9); }
.maint-backdrop { position: fixed; inset: 0; background: radial-gradient(circle at 30% 20%, var(--brand-soft), transparent 60%), radial-gradient(circle at 80% 90%, var(--brand-soft), transparent 55%); }
.maint-modal { position: relative; width: min(440px, 100%); text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2.25rem 1.75rem 1.5rem; box-shadow: 0 24px 60px rgba(16, 24, 40, .14); animation: maint-in .35s ease-out; }
.maint-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.maint-modal h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
.maint-modal p { margin: 0 0 .75rem; color: var(--text-2); }
.maint-small { font-size: .88rem; color: var(--text-3) !important; }
.maint-actions { display: flex; gap: .5rem; justify-content: center; margin: 1.25rem 0; flex-wrap: wrap; }
.maint-contact { font-size: .88rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.maint-contact a { color: var(--brand); font-weight: 600; overflow-wrap: anywhere; }
.maint-logout { border: 0; background: none; color: var(--text-3); font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline; }
@keyframes maint-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .maint-modal { animation: none; } }
.maint-switch.is-on { border-color: var(--warn, #d97706); box-shadow: 0 0 0 3px rgba(217, 119, 6, .12); }

/* Diseño: personalización a una columna hasta escritorio grande; el radio oculto
   de cada plantilla queda dentro de su tarjeta para que enfocarlo no mueva la página. */
.design-top .tpl-card { position: relative; }
@media (max-width: 1440px) {
  .design-custom { grid-template-columns: minmax(0, 1fr); }
  .design-custom .choice-grid { max-width: none; }
}
@media (max-width: 900px) and (min-width: 641px) { .choice-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.design-preview { scroll-margin-top: 76px; }
