/* Panel de gestión DAYIA Carta */
:root {
  --navy: #071e52; --navy-2: #0c2a6b; --ink: #0e1733; --muted: #5d6b8f; --faint: #8a95b3;
  --line: #e3e7f1; --line-2: #eef1f7; --bg: #f4f6fb; --surface: #fff;
  --violet: #746dff; --violet-50: #f0efff; --cyan: #20d5ed; --coral: #ff6a55;
  --green: #12a173; --green-50: #e6f7f0; --amber: #e5940c; --amber-50: #fdf4e3; --red: #d6453d; --red-50: #fdecea;
  --radius: 14px; --shadow: 0 1px 2px rgb(14 23 51 / .05), 0 6px 20px -10px rgb(14 23 51 / .14);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet); }
img { display: block; max-width: 100%; }
svg { flex: none; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--violet); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Botones y formularios ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; color: var(--ink); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { border-color: #cfd5e5; background: #fafbfe; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.accent { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.accent:hover { background: #645cf2; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-50); border-color: #f5c9c5; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.block { width: 100%; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-weight: 600; font-size: 13px; }
.hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgb(116 109 255 / .14); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.input-group:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgb(116 109 255 / .14); }
.input-group span { display: grid; place-items: center; padding: 0 11px; background: var(--line-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.input-group input { border: 0; outline: 0; flex: 1; min-width: 0; padding: 0 12px; height: 38px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 38px; height: 22px; border-radius: 11px; background: #cfd5e5; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px rgb(116 109 255 / .2); }
.lang-tabs { display: flex; gap: 4px; margin-bottom: -1px; }
.lang-tabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 5px 10px; border-radius: 8px 8px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.lang-tabs button.on { background: #fff; border-color: var(--line); color: var(--ink); }
.lang-tabs button.missing::after { content: "•"; color: var(--amber); margin-left: 3px; }
.lang-panes .input { border-top-left-radius: 0; }

/* ── Autenticación ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { position: relative; overflow: hidden; background: radial-gradient(90% 70% at 85% 10%, rgb(116 109 255 / .55), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgb(32 213 237 / .35), transparent 60%), var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; max-width: 520px; }
.auth-side p { color: #c9d2ee; font-size: 16px; max-width: 460px; margin: 0; }
.auth-points { display: grid; gap: 12px; margin-top: 34px; }
.auth-points div { display: flex; gap: 10px; align-items: center; color: #e3e7f6; }
.auth-points svg { width: 20px; height: 20px; color: var(--cyan); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line-2); border-radius: 12px; padding: 4px; margin: 22px 0; }
.seg button { border: 0; background: transparent; height: 36px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.demo-box { margin-top: 22px; padding: 14px; border-radius: 12px; background: var(--violet-50); display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: 13px; }
.form-error { color: var(--red); background: var(--red-50); padding: 9px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .01em; color: inherit; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand small { font-weight: 600; opacity: .7; }

/* ── Estructura ── */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #c9d2ee; display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; }
.side .brand { color: #fff; padding: 4px 8px 18px; }
.venue { display: flex; gap: 10px; align-items: center; padding: 11px; border-radius: 12px; background: rgb(255 255 255 / .06); margin-bottom: 16px; }
.venue-logo { width: 38px; height: 38px; border-radius: 10px; background: #fff; object-fit: cover; flex: none; display: grid; place-items: center; color: var(--navy); font-weight: 800; }
.venue b { display: block; color: #fff; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venue > div { min-width: 0; }
.plan-chip { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: rgb(32 213 237 / .16); color: var(--cyan); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px; color: #c9d2ee; text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.nav a.on { background: rgb(116 109 255 / .22); color: #fff; }
.nav a.on svg { color: var(--cyan); opacity: 1; }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--coral); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgb(255 106 85 / .2); } }
.nav-sep { height: 1px; background: rgb(255 255 255 / .08); margin: 10px 4px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid rgb(255 255 255 / .08); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.side-foot div { min-width: 0; flex: 1; font-size: 12.5px; }
.side-foot b { display: block; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot button { background: none; border: 0; color: #c9d2ee; padding: 6px; border-radius: 8px; }
.side-foot button:hover { background: rgb(255 255 255 / .08); color: #fff; }
.side-foot svg { width: 18px; height: 18px; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgb(244 246 251 / .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 19px; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { display: none; }
.content { padding: 24px 28px 60px; max-width: 1280px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; }
.banner svg { width: 20px; height: 20px; }
.banner.trial { background: var(--violet-50); color: #3f37b8; }
.banner.warn { background: var(--amber-50); color: #8a5a06; }
.banner.danger { background: var(--red-50); color: #9a2a24; }
.banner .btn { margin-left: auto; }

/* ── Tarjetas ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { margin: 0; font-size: 15.5px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.kpi { padding: 18px 20px; }
.kpi .k-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .k-label svg { width: 16px; height: 16px; }
.kpi .k-val { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k-sub { color: var(--faint); font-size: 12px; margin-top: 2px; }
.ico-bubble { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--violet-50); color: var(--violet); }
.ico-bubble svg { width: 16px; height: 16px; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hello h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.hello p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.checklist { display: grid; gap: 4px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.check-row:hover { background: var(--line-2); }
.check-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check-row.done .check-dot { background: var(--green); border-color: var(--green); color: #fff; }
.check-row.done span { color: var(--muted); text-decoration: line-through; }
.check-dot svg { width: 13px; height: 13px; }
.progress { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: 6px 0 14px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); border-radius: 4px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 8px; }
.empty-state h3 { color: var(--ink); margin: 0 0 4px; font-size: 16px; }

/* ── Editor de carta ── */
.menu-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.cat-list { padding: 8px; position: sticky; top: 82px; }
.cat-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; user-select: none; }
.cat-item:hover { background: var(--line-2); }
.cat-item.on { background: var(--violet-50); border-color: #dcd9ff; }
.cat-item .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .count { font-size: 12px; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 1px 8px; }
.cat-item.on .count { background: #fff; }
.cat-item.hidden .name { color: var(--faint); text-decoration: line-through; }
.handle { color: var(--faint); cursor: grab; display: grid; place-items: center; width: 18px; }
.handle svg { width: 16px; height: 16px; }
.dragging { opacity: .4; }
.drop-before { box-shadow: inset 0 2px 0 var(--violet); }
.drop-after { box-shadow: inset 0 -2px 0 var(--violet); }
.items-toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.items-toolbar h2 { margin: 0; font-size: 17px; flex: 1; min-width: 160px; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search-input input { padding-left: 34px; width: 220px; }
.item-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); background: #fff; }
.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: #fbfbfe; }
.item-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--line-2); flex: none; display: grid; place-items: center; color: var(--faint); }
.item-thumb svg { width: 20px; height: 20px; }
.item-info { flex: 1; min-width: 0; cursor: pointer; }
.item-info b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-info .sub { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; margin-top: 3px; flex-wrap: wrap; }
.item-info .alg { width: 16px; height: 16px; }
.mini-algs { display: inline-flex; gap: 2px; }
.tagdot { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.item-price { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.star { color: var(--faint); background: none; border: 0; padding: 6px; border-radius: 8px; }
.star.on { color: #f0a020; }
.star svg { width: 18px; height: 18px; }
.star:hover { background: var(--line-2); }
.st-label { font-size: 11.5px; color: var(--muted); width: 62px; }
.status-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .02em; }
.status-pill.out { background: var(--red-50); color: var(--red); }
.status-pill.hid { background: var(--line-2); color: var(--muted); }

/* ── Panel lateral (drawer) y modales ── */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgb(7 30 82 / .35); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; }
.overlay.open { opacity: 1; }
.drawer { position: fixed; z-index: 81; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: -20px 0 50px -20px rgb(7 30 82 / .35); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 17px; flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfcfe; }
.drawer-foot .spacer { flex: 1; }
.modal { position: fixed; z-index: 81; left: 50%; top: 50%; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .22s, opacity .22s; background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px -20px rgb(7 30 82 / .45); }
.modal.open { transform: translate(-50%, -50%); opacity: 1; }
.modal-body { padding: 22px; }
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 20px; }
.section-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.section-label:first-child { margin-top: 0; }
.uploader { position: relative; border: 1.5px dashed #cfd5e5; border-radius: 14px; background: #fafbfe; overflow: hidden; display: grid; place-items: center; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.uploader:hover, .uploader.drag { border-color: var(--violet); background: var(--violet-50); }
.uploader.has { border-style: solid; border-color: var(--line); }
.uploader img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.uploader .up-empty { padding: 18px; }
.uploader .up-empty svg { width: 28px; height: 28px; color: var(--violet); margin-bottom: 6px; }
.uploader .up-actions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; z-index: 2; }
.uploader .up-actions .btn { background: rgb(255 255 255 / .92); }
.uploader .loading { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgb(255 255 255 / .7); }
.alg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.alg-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-align: left; font-weight: 500; font-size: 13px; transition: border-color .15s, background .15s; }
.alg-opt .alg { width: 24px; height: 24px; }
.alg-opt[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-50); font-weight: 600; }
.alg-opt:not([aria-pressed="true"]) .alg { filter: grayscale(1) opacity(.45); }
.tag-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-opt { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.tag-opt[aria-pressed="true"] { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); }
.variant-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; margin-bottom: 8px; }
.toggles { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--line-2); }

/* ── Diseño ── */
.design-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tpl { position: relative; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; text-align: left; padding: 0; transition: border-color .15s, transform .15s; }
.tpl:hover { transform: translateY(-2px); }
.tpl.on { border-color: var(--violet); box-shadow: 0 0 0 4px rgb(116 109 255 / .15); }
.tpl-swatch { height: 92px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.tpl-swatch b { font-size: 22px; line-height: 1; }
.tpl-swatch span { display: flex; gap: 5px; }
.tpl-swatch span i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .6); }
.tpl-info { padding: 10px 12px 12px; }
.tpl-info b { font-size: 13.5px; }
.tpl-info p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.tpl .lock { position: absolute; top: 10px; right: 10px; background: rgb(7 30 82 / .8); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .04em; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch.on { box-shadow: 0 0 0 2px var(--violet); }
.color-input { width: 44px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.phone { position: sticky; top: 84px; margin: 0 auto; width: 340px; height: 690px; border-radius: 46px; padding: 12px; background: #0b0f1d; box-shadow: 0 30px 60px -24px rgb(7 30 82 / .55), inset 0 0 0 2px #2b3150; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 35px; background: #fff; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 14px; background: #0b0f1d; z-index: 2; }
.preview-caption { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 12px; }

/* ── Mesas y QR ── */
.qr-hero { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: center; }
.qr-box { width: 200px; height: 200px; border-radius: 16px; border: 1px solid var(--line); padding: 10px; background: #fff; }
.qr-box img, .qr-box svg { width: 100%; height: 100%; }
.url-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--line-2); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; margin: 12px 0; }
.url-box span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 16px; }
.table-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; background: #fff; position: relative; }
.table-card img { width: 112px; height: 112px; margin: 2px auto 8px; }
.table-card b { display: block; font-size: 16px; }
.table-card small { color: var(--muted); }
.table-card .t-actions { display: flex; gap: 4px; justify-content: center; margin-top: 10px; }
.table-card input[type=checkbox] { position: absolute; top: 10px; left: 10px; width: 16px; height: 16px; accent-color: var(--violet); }
.zone-title { padding: 14px 16px 0; font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ── Avisos ── */
.call-list { display: grid; gap: 10px; }
.call { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; animation: pop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.call.urgent { border-color: #ffc2b8; background: #fff8f6; }
.call-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.call-ico svg { width: 22px; height: 22px; }
.call-ico.waiter { background: var(--violet-50); color: var(--violet); }
.call-ico.bill { background: var(--green-50); color: var(--green); }
.call-table { font-size: 22px; font-weight: 800; min-width: 74px; letter-spacing: -.01em; }
.call-table small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.call-info { flex: 1; min-width: 0; }
.call-info b { display: block; }
.call-info span { color: var(--muted); font-size: 12.5px; }

/* ── Estadísticas ── */
.chart { width: 100%; height: 220px; display: block; }
.chart .bar { fill: var(--violet); }
.chart .bar.weekend { fill: #a5a0ff; }
.chart .bar:hover { fill: var(--navy); }
.chart text { fill: var(--faint); font-size: 10.5px; font-family: var(--font); }
.chart .grid-line { stroke: var(--line-2); }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0; }
.hbar .track { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.hbar b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar span { font-weight: 700; font-variant-numeric: tabular-nums; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.top-item:last-child { border-bottom: 0; }
.top-item .rank { width: 22px; font-weight: 800; color: var(--faint); }
.top-item img, .top-item .ph { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--line-2); }
.top-item div { flex: 1; min-width: 0; }
.top-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-item small { color: var(--muted); }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 120px; }
.hours i { display: block; border-radius: 4px 4px 2px 2px; background: var(--violet); opacity: .25; min-height: 3px; }
.hours-axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: 10px; color: var(--faint); text-align: center; margin-top: 4px; }
.locked { position: relative; }
.locked-cover { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgb(244 246 251 / .72); backdrop-filter: blur(3px); border-radius: var(--radius); text-align: center; padding: 30px; }
.locked-cover > div { max-width: 380px; }
.locked-cover svg { width: 34px; height: 34px; color: var(--violet); }
.locked-cover h3 { margin: 8px 0 4px; font-size: 18px; }
.locked-cover p { color: var(--muted); margin: 0 0 14px; }
.segmented { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ── Planes y clientes ── */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 18px; position: relative; background: #fff; }
.plan.current { border-color: var(--violet); box-shadow: 0 0 0 3px rgb(116 109 255 / .14); }
.plan h3 { margin: 0; font-size: 16px; }
.plan .price { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.plan .price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 7px; font-size: 13px; }
.plan li { display: flex; gap: 8px; }
.plan li svg { width: 16px; height: 16px; color: var(--green); margin-top: 2px; }
.ribbon { position: absolute; top: -10px; right: 14px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table select.input { height: 32px; width: auto; padding: 0 8px; font-size: 12.5px; }
.state { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.state.active { background: var(--green-50); color: var(--green); }
.state.trial { background: var(--violet-50); color: var(--violet); }
.state.expired { background: var(--amber-50); color: var(--amber); }
.state.suspended { background: var(--red-50); color: var(--red); }
.scroll-x { overflow-x: auto; }

/* ── Avisos flotantes ── */
#toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 500; box-shadow: 0 16px 40px -14px rgb(7 30 82 / .5); animation: slidein .3s cubic-bezier(.2,.8,.2,1); }
.toast svg { width: 18px; height: 18px; color: var(--cyan); }
.toast.error svg { color: var(--coral); }
.toast.alert { background: var(--coral); }
.toast.alert svg { color: #fff; }
@keyframes slidein { from { transform: translateY(16px); opacity: 0; } }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .design-layout { grid-template-columns: 1fr; }
  .phone { position: static; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .25s; box-shadow: 20px 0 50px rgb(0 0 0 / .3); }
  .side.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 60px; }
  .menu-layout, .g-main, .g2, .g3, .plans { grid-template-columns: 1fr; }
  .cat-list { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 24px; }
  .auth-points { display: none; }
  .qr-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .search-input input { width: 100%; }
  .item-row { flex-wrap: wrap; }
  .st-label { display: none; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .kpi .k-val { font-size: 24px; }
  .topbar .hide-sm { display: none; }
  .phone { width: 100%; max-width: 340px; }
}

/* Textos legales en la pantalla de acceso */
.check-legal { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 12px; line-height: 1.45; cursor: pointer; }
.check-legal input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--violet); flex: none; }
.legal-links { order: 9; margin: 18px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
