:root {
  --bg: #0b0d12;
  --panel: #12151d;
  --panel2: #181c27;
  --line: #242a3a;
  --text: #e9ebf2;
  --muted: #8b92a7;
  --good: #22c55e;
  --bad: #ef4444;
  --warn: #f59e0b;
  --over: #6366f1;
  --brand1: #0ea5e9;
  --brand2: #1e3a8a;
  --accent: #f97316;
  --accent2: #fbbf24;
  --radius: 16px;
}
body[data-industry="discoteca"] { --accent: #a855f7; --accent2: #22d3ee; }
body[data-industry="moda"] { --accent: #ec4899; --accent2: #f9a8d4; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body { overflow: hidden; -webkit-tap-highlight-color: transparent; }
button, .nav, .tabbar, .topbar, .sidebar, .wcard, .tag { -webkit-user-select: none; user-select: none; }
button:not(:disabled):active { transform: scale(.97); }
img { -webkit-user-drag: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.muted { color: var(--muted); }
.txt-bad { color: var(--bad); font-weight: 600; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Marca ---------- */
.logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
}
.logo img { width: 74%; height: auto; display: block; }
.logo.xl { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 20px 60px -15px rgba(14,165,233,.6); }
.wordmark { height: 19px; width: auto; display: block; }
.wordmark.xl { height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; }

/* ---------- Pantalla de carga ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(700px 500px at 50% 40%, rgba(14,165,233,.25), transparent 70%), var(--bg);
  transition: opacity .45s ease, visibility .45s;
}
#splash.hide { opacity: 0; visibility: hidden; }
#splash .logo.xl { animation: pop .7s cubic-bezier(.2,1.4,.4,1) both; }
#splash .wordmark { animation: rise .6s .15s ease both; }
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, var(--brand1), #818cf8); animation: load 1s ease-in-out infinite; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Bienvenida ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(14,165,233,.28), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(249,115,22,.12), transparent 60%),
    radial-gradient(600px 400px at 90% 90%, rgba(168,85,247,.14), transparent 60%),
    var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: calc(40px + env(safe-area-inset-top)) 16px calc(30px + env(safe-area-inset-bottom));
  transition: opacity .35s ease, transform .35s ease;
}
.welcome.hide { opacity: 0; pointer-events: none; transform: scale(1.02); }
.welcome-inner { max-width: 980px; width: 100%; text-align: center; }
.welcome-logo { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.welcome h1 { font-size: clamp(28px, 5vw, 50px); font-weight: 800; letter-spacing: -.02em; margin: 28px 0 14px; }
.welcome .grad { background-image: linear-gradient(90deg, #38bdf8, #818cf8, #ec4899); }
.lead { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 auto 26px; }
.pick-title { font-weight: 700; margin-bottom: 14px; }
.welcome-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.wcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px; text-align: left; display: flex; align-items: center; gap: 14px; width: 100%;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.wcard:hover { transform: translateY(-3px); border-color: var(--c, var(--accent)); box-shadow: 0 12px 40px -12px var(--c, var(--accent)); }
.wcard.sel { border-color: var(--accent); }
.wicon { font-size: 30px; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--panel2); flex-shrink: 0; }
.wtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wcard strong { font-size: 17px; }
.wcard small { color: var(--muted); font-size: 13.5px; }
.chev { color: var(--muted); font-size: 22px; }
.welcome-foot { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fine { color: var(--muted); font-size: 13px; }

/* ---------- Estructura de app ---------- */
.app { display: flex; height: 100vh; height: 100dvh; }
.sidebar {
  width: 262px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto;
}
.biz-card { display: flex; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; width: 100%; }
.biz-card > div { flex: 1; min-width: 0; }
.biz-card b { display: block; font-size: 14px; }
.biz-card small { color: var(--muted); font-size: 12px; }
.biz-card .chev { font-size: 16px; }
.biz-e { font-size: 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-g { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 12px 4px; font-weight: 600; }
.nav-g.excl { color: var(--accent); }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; background: none; border: 0; text-align: left; color: var(--muted); font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.nav-item span { width: 22px; text-align: center; }
.nav-item:hover { background: var(--panel2); color: var(--text); }
.nav-item.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
.live { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.cta { display: block; text-align: center; padding: 12px; border-radius: 12px; font-weight: 700; background: linear-gradient(135deg, var(--brand1), var(--brand2)); color: #fff; text-decoration: none; }

.main { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; scroll-behavior: smooth; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 16px 28px; margin-bottom: 6px;
  background: rgba(11,13,18,.78); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.title-wrap { flex: 1; min-width: 0; }
.title-wrap h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-wrap p { font-size: 13px; }
.appbar-logo, .icon-btn, .tabbar { display: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); place-items: center; font-size: 19px; flex-shrink: 0; }
.switch { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.switch button { background: none; border: 0; padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.switch button.active { background: var(--accent); color: #fff; }
.view { padding: 12px 28px 60px; }
.view.anim { animation: viewIn .32s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Barra de pestañas (celular) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(18,21,29,.86); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid rgba(255,255,255,.07);
}
.tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 12px; }
.tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.tabbar button.active { color: var(--accent); }
.tabbar button.active svg { fill: color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-1px); }

/* Hoja deslizable */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 88vh; max-height: 88dvh; overflow: hidden;
  display: flex; flex-direction: column; max-width: 620px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0;
  transform: translateY(105%); transition: transform .38s cubic-bezier(.2,.9,.25,1);
  box-shadow: 0 -20px 60px rgba(0,0,0,.5);
}
.sheet.open { transform: translateY(0); }
.grabber { width: 42px; height: 5px; border-radius: 5px; background: #3a4152; margin: 10px auto 4px; flex-shrink: 0; }
#sheetBody { overflow-y: auto; padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet-title { font-size: 18px; margin: 6px 0 14px; }
.sheet-biz { display: flex; align-items: center; gap: 12px; background: var(--panel2); border-radius: 16px; padding: 12px 14px; margin: 6px 0 4px; }
.sheet-biz > div { flex: 1; min-width: 0; }
.sheet-biz b { display: block; }
.sheet-biz small { color: var(--muted); font-size: 12.5px; }
.sheet-g { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 18px 2px 10px; }
.sheet-g.excl { color: var(--accent); }
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.app-tile { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: #d7dae4; text-align: center; line-height: 1.25; padding: 0; }
.app-ic { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; font-size: 26px; background: var(--panel2); border: 1px solid var(--line); }
.app-tile.active .app-ic { background: color-mix(in srgb, var(--accent) 22%, var(--panel2)); border-color: var(--accent); }
.sheet-foot { margin-top: 22px; display: grid; gap: 12px; }
.biz-list { display: grid; gap: 10px; }

/* Notificación tipo app */
.notif {
  position: fixed; z-index: 90; top: calc(12px + env(safe-area-inset-top)); left: 50%; width: min(420px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; cursor: pointer;
  background: rgba(36,40,52,.88); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 18px 50px rgba(0,0,0,.5);
  transform: translate(-50%, -150%); transition: transform .45s cubic-bezier(.2,1.1,.3,1);
}
.notif.show { transform: translate(-50%, 0); }
.notif > div { flex: 1; min-width: 0; }
.notif b { display: block; font-size: 13.5px; }
.notif small { display: block; color: #c9cdd8; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif time { color: var(--muted); font-size: 11.5px; align-self: flex-start; }

/* ---------- Componentes base ---------- */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.mt { margin-top: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h p { font-size: 13px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); white-space: nowrap; display: inline-block; }
.tag.good { background: rgba(34,197,94,.14); color: var(--good); }
.tag.bad { background: rgba(239,68,68,.14); color: var(--bad); }
.tag.warn { background: rgba(245,158,11,.14); color: var(--warn); }
.tag.over { background: rgba(99,102,241,.18); color: #a5b4fc; }
.tag.neutral { background: var(--panel2); color: var(--muted); }

.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -.01em; }
.delta { font-size: 13px; font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.big-num { font-size: 34px; font-weight: 800; }

.ai-banner {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); margin-bottom: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, var(--panel)), var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
}
.ai-badge { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: 22px; background: var(--accent); }
.ai-banner h3 { font-size: 15px; margin-bottom: 4px; }
.ai-banner p { color: #d7dae4; min-height: 1.5em; }

.connected { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.conn { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px 4px 4px; font-size: 13px; font-weight: 500; }
.conn i { font-style: normal; color: var(--good); font-weight: 700; }
.conn-note { font-size: 12px; margin-left: 4px; }
.live-tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.live-tile .label { color: var(--muted); font-size: 13px; }
.live-tile > div { flex: 1; min-width: 0; }
.lt-ic { font-size: 26px; }
.lt-v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Redes: logos oficiales */
.net { display: inline-block; width: 26px; height: 26px; flex-shrink: 0; vertical-align: middle; line-height: 0; }
.net svg { width: 100%; height: 100%; display: block; }
.net.lg { width: 44px; height: 44px; }
.legend i.lg-instagram { background: #e1306c; }
.legend i.lg-tiktok { background: #22d3ee; }
.legend i.lg-facebook { background: #3b82f6; }

.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.chart-box.tall { height: 380px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.insight { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.insight:last-child { border-bottom: 0; padding-bottom: 0; }
.insight:first-child { padding-top: 0; }
.insight .ic { font-size: 20px; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); }
.insight h4 { font-size: 14px; margin-bottom: 3px; }
.insight p { font-size: 13.5px; color: var(--muted); }
.insight .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

.btn { background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: 13px; transition: filter .15s; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.btn:disabled { opacity: .55; cursor: default; }

.heat { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.heat .cell { aspect-ratio: 1.6; border-radius: 5px; background: var(--accent); min-width: 0; }
@media (max-width: 520px) { .heat { gap: 3px; } .heat .cell { aspect-ratio: auto; height: 20px; border-radius: 4px; } }
.heat .lbl { display: flex; align-items: center; justify-content: center; }
.heat .rl { justify-content: flex-start; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.wrap { white-space: normal; min-width: 220px; color: var(--muted); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.bar { height: 6px; border-radius: 4px; background: var(--panel2); overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bar.big { height: 10px; margin: 10px 0; }

.staff { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.staff div { background: var(--panel2); border-radius: 12px; padding: 12px 4px; text-align: center; }
.staff b { display: block; font-size: 22px; }
.staff small { color: var(--muted); font-size: 11.5px; }

/* Finanzas */
.cost-list { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; }
.cost-list div { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.cost-list i { width: 10px; height: 10px; border-radius: 3px; }
.cost-list small { color: var(--muted); min-width: 64px; text-align: right; }

/* Automatizaciones */
.auto { display: flex; gap: 14px; align-items: flex-start; }
.auto .ic { font-size: 22px; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--panel2); }
.auto h4 { font-size: 15px; margin-bottom: 4px; }
.auto p { font-size: 13.5px; color: var(--muted); }
.auto .meta { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.auto .meta b { color: var(--text); }
.auto .body { flex: 1; min-width: 0; }
.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; border-radius: 999px; background: var(--line); border: 0; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--good); }
.toggle.on::after { transform: translateX(20px); }
.feed { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; }
.feed-item { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; animation: slidein .35s ease; }
.feed-item time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 1px; flex-shrink: 0; }
@keyframes slidein { from { opacity: 0; transform: translateX(-8px); background: color-mix(in srgb, var(--accent) 12%, transparent); } to { opacity: 1; transform: none; } }

/* Chatbot */
.chat-layout { grid-template-columns: 380px 1fr; align-items: start; }
.chat-layout > *, .grid > * { min-width: 0; }
.channel-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.channel-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.channel-tabs button .net { width: 20px; height: 20px; }
.channel-tabs button.active { border-color: var(--accent); color: var(--text); }
.phone { border: 8px solid #1f2430; border-radius: 34px; overflow: hidden; height: 620px; display: flex; flex-direction: column; background: #0b141a; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #1f2c34; }
.ph-head b { display: block; font-size: 14.5px; }
.ph-head small { color: #a7b3ba; font-size: 12px; }
.ph-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand1), var(--brand2)); }
.ph-av img { width: 70%; }
.ph-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px;
  background-color: #0b141a; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 18px 18px; }
.ph-msg { max-width: 84%; padding: 8px 11px 6px; border-radius: 10px; font-size: 14px; white-space: pre-wrap; line-height: 1.42; animation: fade .25s ease; }
.ph-msg time { display: block; text-align: right; font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 3px; }
.ph-msg.bot { background: #202c33; align-self: flex-start; border-top-left-radius: 2px; }
.ph-msg.me { background: #005c4b; align-self: flex-end; border-top-right-radius: 2px; }
.ph-quick { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; background: #0b141a; }
.ph-quick:empty { display: none; }
.ph-quick button { flex-shrink: 0; background: transparent; border: 1px solid #00a884; color: #00d9a6; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }
.ph-input { display: flex; gap: 8px; padding: 8px 10px 10px; background: #0b141a; }
.ph-input input { flex: 1; min-width: 0; background: #202c33; border: 0; border-radius: 999px; padding: 10px 14px; color: #fff; font: inherit; font-size: 14px; outline: none; }
.ph-input button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #00a884; color: #fff; font-size: 16px; }
.phone.ch-instagram { background: #000; }
.phone.ch-instagram .ph-head, .phone.ch-instagram .ph-msgs, .phone.ch-instagram .ph-quick, .phone.ch-instagram .ph-input { background: #000; }
.phone.ch-instagram .ph-head { border-bottom: 1px solid #262626; }
.phone.ch-instagram .ph-msg.bot { background: #262626; border-radius: 18px; }
.phone.ch-instagram .ph-msg.me { background: linear-gradient(135deg, #7c3aed, #db2777); border-radius: 18px; }
.phone.ch-instagram .ph-quick button { border-color: #7c3aed; color: #c4b5fd; }
.phone.ch-instagram .ph-input input { background: #121212; border: 1px solid #262626; }
.phone.ch-instagram .ph-input button { background: #7c3aed; }
.phone.ch-tiktok { background: #121212; }
.phone.ch-tiktok .ph-head, .phone.ch-tiktok .ph-msgs, .phone.ch-tiktok .ph-quick, .phone.ch-tiktok .ph-input { background: #121212; }
.phone.ch-tiktok .ph-msg.bot { background: #2a2a2a; border-radius: 14px; }
.phone.ch-tiktok .ph-msg.me { background: #fe2c55; border-radius: 14px; }
.phone.ch-tiktok .ph-quick button { border-color: #fe2c55; color: #ff8aa1; }
.phone.ch-tiktok .ph-input input { background: #2a2a2a; }
.phone.ch-tiktok .ph-input button { background: #fe2c55; }
.conv { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.conv:last-child { border-bottom: 0; }
.conv > div { flex: 1; min-width: 0; }
.conv b { display: block; font-size: 14px; }
.conv small { color: var(--muted); font-size: 12.5px; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.skills li { color: #d7dae4; }

/* Redes */
.accounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.acc { display: flex; flex-direction: column; gap: 10px; padding: 16px; position: relative; }
.acc .tag { position: absolute; top: 14px; right: 12px; font-size: 10.5px; padding: 3px 8px; }
.acc-b b { display: block; font-size: 14.5px; }
.acc-b small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-m { font-weight: 700; margin-top: 6px; font-size: 14px; }
.best-time { font-size: 15px; line-height: 1.55; background: var(--panel2); padding: 14px; border-radius: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.post { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.post:last-child { border-bottom: 0; }
.post-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.post-b { flex: 1; min-width: 180px; }
.post-b b { display: block; font-size: 14px; }
.post-b small { color: var(--muted); font-size: 12.5px; }
.idea { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.idea:last-child { border-bottom: 0; }
.idea-d { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); flex-shrink: 0; }
.idea-b { flex: 1; min-width: 0; }
.idea-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.idea-h .net { width: 20px; height: 20px; }
.idea p { color: var(--muted); font-size: 13.5px; margin: 4px 0 8px; }

/* Clientes */
.seg { border-left: 4px solid var(--c); }
.seg .count { font-size: 30px; font-weight: 800; margin: 4px 0; }
.seg p { font-size: 13.5px; color: var(--muted); }
.gen { margin-top: 14px; background: var(--panel2); border-radius: 12px; padding: 14px; font-size: 14px; white-space: pre-wrap; display: none; }
.gen.show { display: block; }
.gen .gh { font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }

/* Reseñas */
.review { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review:first-child { padding-top: 0; }
.review:last-child { border-bottom: 0; }
.review .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.stars { color: #fbbf24; letter-spacing: 1px; }
.review .txt { margin: 8px 0 10px; color: #d7dae4; font-size: 14px; }
.reply { margin-top: 10px; background: var(--panel2); border-radius: 10px; padding: 12px; font-size: 13.5px; border-left: 3px solid var(--accent); display: none; white-space: pre-wrap; }
.reply.show { display: block; }
.topic { display: grid; grid-template-columns: 140px 1fr 44px; gap: 10px; align-items: center; font-size: 13.5px; margin-bottom: 12px; }
.split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel2); }
.split .p { background: var(--good); }
.split .n { background: var(--bad); }

/* Asistente */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 130px); min-height: 420px; padding: 0; overflow: hidden; }
.msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 16px; font-size: 14.5px; white-space: pre-wrap; }
.msg.bot { background: var(--panel2); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.suggest { display: flex; gap: 8px; padding: 0 20px 12px; flex-wrap: wrap; }
.suggest button { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 13px; color: var(--text); }
.suggest button:hover { border-color: var(--accent); }
.composer { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.composer input { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); font: inherit; outline: none; }
.composer input:focus { border-color: var(--accent); }

/* Restaurante: plano de mesas */
.zone + .zone { margin-top: 16px; }
.zone-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.tables { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.tbl { border-radius: 12px; padding: 9px 10px; background: var(--panel2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 12px; min-height: 86px; transition: background .4s, border-color .4s; position: relative; min-width: 0; }
.tbl small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-h { display: flex; justify-content: space-between; align-items: center; }
.tbl-h b { font-size: 14px; }
.tbl-s { font-weight: 700; font-size: 12px; }
.tbl em { font-style: normal; font-size: 11px; color: var(--warn); font-weight: 600; }
.tbl.st-libre { border-color: rgba(34,197,94,.35); }
.tbl.st-libre .tbl-s { color: var(--good); }
.tbl.st-ocupada { background: color-mix(in srgb, var(--accent) 16%, var(--panel2)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tbl.st-ocupada .tbl-s { color: var(--accent); }
.tbl.st-reservada { border-color: rgba(56,189,248,.4); border-style: dashed; }
.tbl.st-reservada .tbl-s { color: #38bdf8; }
.tbl.st-cuenta { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.08); }
.tbl.st-cuenta .tbl-s { color: var(--warn); }
.tbl.long { box-shadow: 0 0 0 2px var(--warn); }
.legend i.lg-libre { background: var(--good); }
.legend i.lg-ocupada { background: var(--accent); }
.legend i.lg-reservada { background: #38bdf8; }
.legend i.lg-cuenta { background: var(--warn); }
.resv { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.resv:last-child { border-bottom: 0; }
.resv-h { font-weight: 700; color: var(--accent); width: 82px; flex-shrink: 0; font-size: 13px; }
.resv-b small { display: block; color: var(--muted); font-size: 12.5px; }
.resv-b .net { width: 18px; height: 18px; margin-left: 4px; }

/* Discoteca */
.gauge-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: center; }
.gauge { position: relative; height: 220px; }
.gauge-c { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; }
.gauge-c b { display: block; font-size: 46px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-c span { color: var(--muted); font-size: 13px; }
.gauge-c em { display: block; font-style: normal; font-weight: 700; color: var(--accent2); font-size: 18px; }
.gauge-side { display: grid; gap: 8px; }
.mini { display: flex; justify-content: space-between; gap: 10px; background: var(--panel2); padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.mini span { color: var(--muted); }
.mini b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.alert-line { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 500; }
.alert-line.good { background: rgba(34,197,94,.1); color: #86efac; }
.alert-line.warn { background: rgba(245,158,11,.12); color: #fcd34d; }
.alert-line.bad { background: rgba(239,68,68,.14); color: #fca5a5; }
.vip-grid { grid-template-columns: repeat(4, 1fr); }
.tbl.vip { min-height: 96px; gap: 4px; }
.tbl.vip.plat { background-image: linear-gradient(135deg, rgba(251,191,36,.12), transparent 60%); }
.tbl.vip.plat .tbl-h small { color: #fbbf24; }
.barra { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.barra small { display: block; color: var(--muted); font-size: 12.5px; }
.barra-n { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.event .ev-num { font-size: 14px; }
.event .ev-num b { font-size: 24px; }
.ev-ai { font-size: 13.5px; color: #d7dae4; background: var(--panel2); padding: 10px 12px; border-radius: 10px; }
.mini-list { display: grid; gap: 8px; margin-top: 14px; }
.mini-list div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; background: var(--panel2); padding: 9px 12px; border-radius: 10px; }
.mini-list span { color: var(--muted); }

/* Moda */
.prod-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.prod-tabs button { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.prod-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.matrix { display: grid; gap: 6px; overflow-x: auto; }
.mx-h { text-align: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.mx-c { display: flex; align-items: center; font-size: 13px; font-weight: 600; }
.mx { border-radius: 10px; padding: 10px 4px; text-align: center; min-width: 46px; }
.mx b { display: block; font-size: 18px; }
.mx small { font-size: 11px; opacity: .85; }
.mx.st-bad { background: rgba(239,68,68,.2); color: #fca5a5; }
.mx.st-warn { background: rgba(245,158,11,.18); color: #fcd34d; }
.mx.st-good { background: rgba(34,197,94,.13); color: #86efac; }
.mx.st-over { background: rgba(99,102,241,.2); color: #c7d2fe; }
.trend p { color: #d7dae4; font-size: 14px; }
.trend.hot { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tr-h { display: flex; align-items: center; gap: 10px; }
.look { background: var(--panel2); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.look-img { height: 130px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 44px; }
.look-b { padding: 14px; }
.look-b h4 { margin-bottom: 8px; }
.look-i { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: #d7dae4; }
.look-t { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.look-t b { font-size: 18px; }

.toast {
  position: fixed; bottom: calc(24px + var(--tab-h, 0px)); left: 50%; transform: translateX(-50%) translateY(30px);
  background: #fff; color: #111; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: all .3s; z-index: 80; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .accounts { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g-2-1, .g3, .chat-layout { grid-template-columns: 1fr; }
  .phone-wrap { max-width: 420px; width: 100%; margin: 0 auto; }
  .tables { grid-template-columns: repeat(4, 1fr); }
  .switch button span { display: none; }
  .switch button { font-size: 18px; padding: 6px 12px; }
}
/* Celular y tablet: experiencia de app nativa */
@media (max-width: 860px) {
  :root { --tab-h: 64px; }
  .welcome-cards { grid-template-columns: 1fr; }
  .sidebar, .switch { display: none; }
  .tabbar { display: grid; }
  .appbar-logo { display: grid; width: 34px; height: 34px; }
  .icon-btn { display: grid; }
  .topbar { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; gap: 12px; margin-bottom: 4px; }
  .title-wrap h1 { font-size: 18px; }
  .title-wrap p { font-size: 12px; }
  .view { padding: 8px 14px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
  .card { border-radius: 18px; }
  .g2 { grid-template-columns: 1fr; }
  .staff { grid-template-columns: repeat(4, 1fr); }
  .msg { max-width: 90%; }
  .chat { height: calc(100dvh - 128px - var(--tab-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .accounts { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 4px; scrollbar-width: none; }
  .accounts::-webkit-scrollbar { display: none; }
  .acc { min-width: 200px; scroll-snap-align: start; }
  .connected { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px; scrollbar-width: none; }
  .connected::-webkit-scrollbar { display: none; }
  .conn { flex-shrink: 0; }
  .gauge-wrap { grid-template-columns: 1fr; }
  .ai-banner { padding: 16px; gap: 12px; }
  .ai-badge { width: 38px; height: 38px; font-size: 19px; }
}

@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid { gap: 12px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 20px; }
  .app-grid { grid-template-columns: repeat(4, 1fr); }
  .app-ic { width: 54px; height: 54px; }
  .topic { grid-template-columns: 96px 1fr 38px; }
  .chart-box { height: 240px; }
  .chart-box.tall { height: 320px; }
  .tables { grid-template-columns: repeat(3, 1fr); }
  .vip-grid { grid-template-columns: repeat(2, 1fr); }
  .phone { height: 560px; }
  .lead { font-size: 16px; }
  .wordmark.xl { height: 34px; }
  .logo.xl { width: 76px; height: 76px; }
}

/* =========================================================
   Imágenes de producto, catálogos y mapas interactivos
   ========================================================= */
.pimg { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--panel2); }
.pimg.thumb { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.pimg.mini { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.pimg.mid { width: 64px; height: 64px; border-radius: 14px; flex-shrink: 0; }
.pimg.tab { width: 28px; height: 28px; border-radius: 8px; }
.cell-p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thumbs { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.thumbs .pimg { width: 30px; height: 30px; }

/* Ranking con fotos */
.rank { display: grid; gap: 10px; }
.rank-it { display: flex; align-items: center; gap: 10px; }
.rank-b { flex: 1; min-width: 0; }
.rank-b b { display: block; font-size: 13.5px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-v { font-weight: 700; font-size: 13.5px; white-space: nowrap; }

/* Tarjetas de producto */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 4px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 14px 34px -18px var(--accent); }
.pcard:active { transform: scale(.98); }
.pcard-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.pcard-img.tall { aspect-ratio: 4 / 5; }
.pcard-img .pimg { transition: transform .4s; }
.pcard:hover .pcard-img .pimg { transform: scale(1.04); }
.pcard .rec { position: absolute; left: 10px; top: 10px; font-size: 11.5px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: rgba(11,13,18,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; }
.pcard .sold { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; letter-spacing: .12em; background: rgba(11,13,18,.62); color: #fca5a5; }
.pcard.off .pimg { filter: grayscale(1); }
.pcard-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard-b p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.pcard-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard-t b, .pname { font-size: 14.5px; }
.price { font-weight: 800; white-space: nowrap; color: var(--text); }
.price s { font-weight: 500; font-size: 12px; }
.price.big { font-size: 20px; }
.pcard .chips .tag { font-size: 11px; padding: 3px 8px; }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); }
.sizes { display: flex; gap: 4px; flex-wrap: wrap; }
.sizes span { font-size: 11.5px; font-weight: 600; min-width: 28px; text-align: center; padding: 3px 6px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); }
.sizes span.low { border-color: var(--warn); color: var(--warn); }
.sizes span.out { color: #6b7280; text-decoration: line-through; opacity: .6; }
.sizes.big { gap: 8px; margin-bottom: 14px; }
.sizes.big span { padding: 8px 10px; min-width: 56px; display: flex; flex-direction: column; }
.sizes.big b { font-size: 15px; }
.sizes.big small { font-size: 11px; color: var(--muted); font-weight: 500; }
.img-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; }

/* Paquetes de botellas y barras */
.pack { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pack-img { display: grid; grid-template-columns: repeat(3, 1fr); height: 130px; }
.pack-b { padding: 14px; }
.pack-b h4 { margin-bottom: 4px; }
.pack-b p { font-size: 13px; margin-bottom: 10px; }
.barra-card { text-align: left; width: 100%; color: var(--text); }
.barra-card:hover { border-color: var(--accent); }

/* Tarjetas dentro del chatbot */
.ph-cards { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; align-self: stretch; scrollbar-width: none; animation: fade .3s ease; flex-shrink: 0; }
.ph-cards::-webkit-scrollbar { display: none; }
.ph-card { flex-shrink: 0; width: 124px; background: #202c33; border-radius: 12px; overflow: hidden; font-size: 12px; display: flex; flex-direction: column; }
.ph-card .pimg { height: 100px; }
.ph-card b { padding: 6px 8px 0; line-height: 1.25; }
.ph-card span { padding: 2px 8px 8px; color: #00d9a6; font-weight: 700; }
.phone.ch-instagram .ph-card { background: #262626; }
.phone.ch-instagram .ph-card span { color: #c4b5fd; }
.phone.ch-tiktok .ph-card { background: #2a2a2a; }
.phone.ch-tiktok .ph-card span { color: #ff8aa1; }

/* Tendencias y looks */
.trend-in { display: flex; gap: 14px; align-items: flex-start; }
.pimg.trend-img { width: 92px; height: 112px; border-radius: 14px; flex-shrink: 0; }
.look-imgs { display: grid; grid-template-columns: repeat(3, 1fr); height: 150px; }

/* Hoja: detalle */
.sheet-hero { margin: 4px -18px 14px; height: 240px; overflow: hidden; background: var(--panel2); }
.sheet-hero.fashion { height: 300px; }
.sheet-hero .pimg { object-fit: cover; }
.sheet-hero.fashion .pimg, .sheet-hero.dark .pimg { object-fit: contain; }
.sheet-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 6px 0 12px; }
.sheet-hd h3 { font-size: 20px; }
.sheet-hd small { font-size: 13px; }
#sheetBody .mini-list { margin-top: 0; }
#sheetBody .alert-line { margin-top: 12px; }
#sheetBody .bar.big { margin: 10px 0 4px; }
.order-list { display: grid; gap: 8px; }
.order-it { display: flex; align-items: center; gap: 12px; background: var(--panel2); border-radius: 14px; padding: 8px 12px 8px 8px; }
.order-it > div { flex: 1; min-width: 0; }
.order-it b { display: block; font-size: 14px; }
.order-it small { color: var(--muted); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { padding: 13px 12px; font-size: 14px; border-radius: 13px; }
.sheet-actions .btn:only-child { grid-column: 1 / -1; }
.form { display: grid; gap: 12px; margin-top: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.form input, .form select { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px; font: inherit; font-size: 15px; outline: none; -webkit-appearance: none; appearance: none; }
.form input:focus, .form select:focus { border-color: var(--accent); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.qr { background: #fff; border-radius: 16px; padding: 12px; max-width: 220px; margin: 0 auto; }
.qr svg { display: block; width: 100%; }

/* Mapas (SVG) */
.map-wrap { border-radius: 16px; overflow: hidden; background: #0d1018; touch-action: manipulation; }
.map-wrap svg { display: block; width: 100%; height: auto; }
.floor-svg text, .club-svg text, .city-svg text { font-family: Inter, system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.zl { fill: #cbd5e1; font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.zl.dark { fill: #fff; }
.zs { fill: #8b92a7; font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.zh { fill: #475569; font-size: 15px; font-weight: 800; letter-spacing: .3em; }
.zone-bar { fill: #3b2f25; stroke: #5b4636; stroke-width: 2; }
.zone-k { fill: #1f2633; stroke: #334155; stroke-width: 2; }
.stool { fill: #2b3445; }
.plant { fill: #166534; } .plant2 { fill: #22c55e; opacity: .6; }
.chair { fill: #2d3546; transition: fill .3s; }
.ftbl, .vtbl, .vbar, .dest, .courier { cursor: pointer; }
.ftbl .top, .vtbl .top { fill: #232a38; stroke: #4b5563; stroke-width: 2.5; transition: fill .4s, stroke .4s; }
.ftbl:hover .top, .vtbl:hover .top { stroke-width: 4; }
.tn { fill: #f8fafc; font-size: 16px; font-weight: 800; }
.ts { fill: #e2e8f0; font-size: 12px; font-weight: 600; opacity: .85; }
.st-libre .top { fill: rgba(34,197,94,.16); stroke: #22c55e; }
.st-ocupada .top { fill: color-mix(in srgb, var(--accent) 34%, #151a24); stroke: var(--accent); }
.st-ocupada .chair { fill: color-mix(in srgb, var(--accent) 45%, #2d3546); }
.st-reservada .top { fill: rgba(56,189,248,.14); stroke: #38bdf8; stroke-dasharray: 7 5; }
.st-cuenta .top { fill: rgba(245,158,11,.22); stroke: #f59e0b; }
.ring { fill: none; stroke: #f59e0b; stroke-width: 3; animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
/* Discoteca */
.sofa { fill: none; stroke: #3b2a4d; stroke-width: 12; stroke-linecap: round; }
.vtbl.plat .sofa { stroke: #5a4520; }
.vtbl.plat .top { stroke-width: 3.5; }
.prog { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray .6s; }
.spk { fill: #1f2430; stroke: #3a4152; stroke-width: 2; }
.vbar rect { fill: #2a2235; stroke: var(--accent); stroke-opacity: .6; stroke-width: 2; transition: fill .2s; }
.vbar:hover rect { fill: #3a2d4d; }
.vbar text { font-size: 14px; }
.person { fill: var(--accent2); opacity: .75; transition: transform 2s ease-in-out; }
.person.alt { fill: #f9a8d4; opacity: .6; }
/* Ciudad */
.street { fill: #64748b; font-size: 13px; font-weight: 600; text-anchor: start !important; }
.street.river { fill: #38bdf8; opacity: .7; font-style: italic; }
.zlabel { fill: #e2e8f0; font-size: 14px; font-weight: 700; paint-order: stroke; stroke: #0b0d12; stroke-width: 4px; }
.route { fill: none; stroke: var(--accent); stroke-width: 4; stroke-dasharray: 10 8; stroke-linecap: round; opacity: .85; animation: dash 1s linear infinite; }
.route.prep { stroke: #64748b; opacity: .4; animation: none; }
@keyframes dash { to { stroke-dashoffset: -18; } }
.courier { transition: transform 1s linear, opacity .4s; }
.courier circle { fill: var(--accent); stroke: #fff; stroke-width: 3; }
.courier text { font-size: 17px; }
.pulse { fill: #0ea5e9; opacity: .25; transform-origin: center; animation: pulseMap 2s ease-out infinite; }
@keyframes pulseMap { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.5); opacity: 0; } }
.order-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); }
.order-row .tag { font-size: 11px; }
.app-badge { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0; }
.app-badge.rappi { background: #ff441f; }
.app-badge.didi { background: #fc4c02; }

@media (max-width: 860px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pcard-b { padding: 10px 11px 12px; }
  .pcard-b p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pcard-t { flex-wrap: wrap; gap: 4px; }
  .pcard .rec { font-size: 10px; left: 6px; top: 6px; padding: 4px 7px; }
  .map-wrap { margin: 0 -8px; border-radius: 12px; }
  .sheet-hero { height: 210px; }
  .sheet-hero.fashion { height: 260px; }
  .pimg.trend-img { width: 72px; height: 90px; }
}
.sheet { position: fixed; }
.sheet-x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--panel2); color: var(--muted); font-size: 15px; z-index: 2; }
.sheet-x:hover { color: var(--text); }
.sheet-hd { padding-right: 44px; }
.map-hint { display: none; font-size: 12.5px; color: var(--muted); margin: -4px 0 8px; }
@media (max-width: 860px) {
  .map-hint { display: block; }
  .map-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .map-wrap::-webkit-scrollbar { display: none; }
  .map-wrap svg { width: 700px; max-width: none; }
  .prod-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 12px; padding: 0 14px 2px; scrollbar-width: none; }
  .prod-tabs::-webkit-scrollbar { display: none; }
  .prod-tabs button { flex-shrink: 0; }
  .ai-banner p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}

/* =========================================================
   Realidad aumentada (visor 3D)
   ========================================================= */
.ar-badge { position: absolute; right: 10px; bottom: 10px; border: 0; font-size: 12px; font-weight: 800; padding: 7px 11px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--brand1), #818cf8); box-shadow: 0 6px 18px -4px rgba(14,165,233,.7); animation: arGlow 2.4s ease-in-out infinite; }
@keyframes arGlow { 50% { box-shadow: 0 6px 26px 0 rgba(129,140,248,.8); } }
.ar-cta { width: 100%; margin: 4px 0 6px; padding: 13px; font-size: 14.5px; border-radius: 13px; background: linear-gradient(135deg, var(--brand1), #818cf8); }
.ar-pill { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: linear-gradient(135deg, var(--brand1), #818cf8); color: #fff; }
.ar-promo { display: flex; gap: 16px; align-items: center; border-color: rgba(129,140,248,.45); background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(129,140,248,.08) 60%, var(--panel)); }
.ar-promo h3 { font-size: 16px; margin-bottom: 4px; }
.ar-promo p { font-size: 13.5px; }
.ar-promo-img { position: relative; width: 110px; height: 110px; border-radius: 18px; overflow: hidden; flex-shrink: 0; }
.ar-promo-img .ar-pill { position: absolute; left: 8px; bottom: 8px; }
.ar-promo.wide .ar-promo-img { width: 130px; height: 130px; }

.ar-layer { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; background: radial-gradient(800px 600px at 50% 40%, #1b2335, #07090d 70%);
  opacity: 0; transform: scale(1.02); transition: opacity .3s, transform .3s; }
.ar-layer.show { opacity: 1; transform: none; }
.ar-layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.ar-layer.cam { background: #000; }
.ar-layer.cam video { display: block; }
.ar-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 10px; }
.ar-top > div { flex: 1; min-width: 0; }
.ar-top b { display: block; font-size: 16px; }
.ar-top small { color: #cbd5e1; font-size: 12.5px; }
.ar-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 16px; }
.ar-stage { position: relative; z-index: 1; flex: 1; min-height: 0; }
.ar-stage model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; --progress-bar-color: transparent; }
.ar-layer.cam .ar-stage model-viewer { --min-hotspot-opacity: 0; }
.ar-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #cbd5e1; font-size: 14px; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--brand1); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ar-hint { position: relative; z-index: 2; text-align: center; font-size: 12.5px; color: #e2e8f0; margin: 0 16px 10px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ar-bottom { position: relative; z-index: 2; margin: 0 12px calc(12px + env(safe-area-inset-bottom)); padding: 16px; border-radius: 22px;
  background: rgba(18,21,29,.82); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255,255,255,.08);
  max-width: 560px; width: calc(100% - 24px); align-self: center; }
.ar-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ar-info b { display: block; font-size: 16px; }
.ar-info small { color: var(--muted); font-size: 13px; }
.ar-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.ar-actions .btn, .ar-order { padding: 13px 10px; font-size: 14px; border-radius: 13px; }
.ar-actions .btn:first-child { background: linear-gradient(135deg, var(--brand1), #818cf8); }
.ar-order { width: 100%; margin-top: 10px; }
@media (max-width: 520px) {
  .ar-promo { flex-direction: column; align-items: stretch; }
  .ar-promo-img, .ar-promo.wide .ar-promo-img { width: 100%; height: 150px; }
}
.ar-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ar-btns .btn { flex: 1; min-width: 150px; padding: 11px 12px; }
.ar-credit { font-size: 11.5px; color: var(--muted); margin: -4px 0 10px; }

/* =========================================================
   Realidad aumentada destacada en los menús
   ========================================================= */
.nav-item.nav-ar { color: #fff; background: linear-gradient(135deg, rgba(14,165,233,.22), rgba(129,140,248,.22)); border: 1px solid rgba(129,140,248,.45); margin: 2px 0 4px; }
.nav-item.nav-ar.active { background: linear-gradient(135deg, rgba(14,165,233,.4), rgba(129,140,248,.4)); }
.nav-new { margin-left: auto; font-style: normal; font-size: 9.5px; font-weight: 800; padding: 3px 7px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, var(--brand1), #818cf8); animation: arGlow 2.4s ease-in-out infinite; }
.app-tile.ar-tile .app-ic { background: linear-gradient(135deg, var(--brand1), #818cf8); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(129,140,248,.9); }
.w-ar { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--brand1), #818cf8); align-self: flex-start; }

/* Botón central «Prueba 3D» en la barra de pestañas */
.tabbar .tab-ar { color: #fff; }
.tabbar .tab-ar i { display: grid; place-items: center; width: 54px; height: 54px; margin-top: -26px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand1), #818cf8); box-shadow: 0 10px 26px -6px rgba(129,140,248,.85), 0 0 0 4px var(--bg); animation: arGlow 2.4s ease-in-out infinite; }
.tabbar .tab-ar svg { width: 27px; height: 27px; stroke: #fff; }
.tabbar .tab-ar.active svg { fill: rgba(255,255,255,.25); }
.tabbar .tab-ar span { color: #c7d2fe; font-weight: 800; }

/* Aviso grande en el panel */
.ar-banner { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; color: #fff; margin-bottom: 16px; padding: 14px 18px 14px 14px; border-radius: 20px;
  border: 1px solid rgba(129,140,248,.55); background: linear-gradient(120deg, rgba(14,165,233,.28), rgba(129,140,248,.22) 55%, rgba(236,72,153,.16)); box-shadow: 0 14px 40px -18px rgba(129,140,248,.9); }
.ar-banner:hover { border-color: #a5b4fc; }
.ar-banner-imgs { display: flex; flex-shrink: 0; }
.ar-banner-imgs .pimg { width: 64px; height: 64px; border-radius: 16px; border: 2px solid rgba(255,255,255,.25); }
.ar-banner-imgs .pimg + .pimg { margin-left: -18px; transform: rotate(6deg); }
.ar-banner-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ar-banner-t .ar-pill { align-self: flex-start; }
.ar-banner-t b { font-size: 17px; }
.ar-banner-t small { color: #dbeafe; font-size: 13px; }
.ar-banner-go { font-weight: 800; white-space: nowrap; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.16); }

/* Vista «Prueba en 3D» */
.ar-hero { padding: 24px; border-radius: 22px; margin-bottom: 16px; border: 1px solid rgba(129,140,248,.45);
  background: radial-gradient(600px 300px at 90% 0%, rgba(129,140,248,.35), transparent 70%), linear-gradient(135deg, rgba(14,165,233,.22), var(--panel)); }
.ar-pill.big { font-size: 12.5px; padding: 6px 12px; }
.ar-hero h2 { font-size: clamp(22px, 3vw, 30px); margin: 12px 0 8px; letter-spacing: -.01em; }
.ar-hero p { color: #d7dae4; max-width: 720px; }
.ar-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; max-width: 720px; }
.ar-steps div { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.ar-steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand1), #818cf8); flex-shrink: 0; }
.ar-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ar-item { text-align: left; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; padding: 0 0 14px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s, border-color .2s; }
.ar-item:hover { transform: translateY(-3px); border-color: #818cf8; }
.ar-item-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.ar-item-img .rec { position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: rgba(11,13,18,.72); }
.ar-play { position: absolute; right: 12px; bottom: 12px; font-weight: 800; font-size: 14px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--brand1), #818cf8); animation: arGlow 2.4s ease-in-out infinite; }
.ar-item-b { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 16px 0; font-size: 16px; }
.ar-item small { color: var(--muted); padding: 0 16px; font-size: 13px; }
@media (max-width: 860px) {
  .ar-gallery { grid-template-columns: 1fr; }
  .ar-steps { grid-template-columns: 1fr; }
  .ar-banner { flex-wrap: wrap; }
  .ar-banner-go { width: 100%; text-align: center; }
  .ar-banner-imgs .pimg { width: 54px; height: 54px; }
  .ar-hero { padding: 18px; }
}

/* =========================================================
   Bienvenida viva (efectos y movimiento)
   ========================================================= */
.welcome { align-items: flex-start; }
.welcome-inner { position: relative; z-index: 2; padding-bottom: 120px; margin: auto 0; }
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(70px); opacity: .45; mix-blend-mode: screen; }
.aurora i:nth-child(1) { background: #0ea5e9; left: -15vmax; top: -20vmax; animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: #7c3aed; right: -20vmax; top: -10vmax; opacity: .35; animation: drift2 26s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: #db2777; left: 20vmax; bottom: -35vmax; opacity: .25; animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, 18vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-12vmax, -14vmax) scale(1.2); } }
.bubbles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.waves { position: fixed; left: 0; right: 0; bottom: 0; height: 150px; z-index: 1; pointer-events: none; }
.wv { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background-repeat: repeat-x; background-position: 0 bottom; background-size: 1200px 100%; }
.wv.w1 { opacity: .35; animation: waveX 26s linear infinite; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 150' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C150 30 300 110 450 70 S750 30 900 70 S1100 110 1200 70 V150 H0Z' fill='%230ea5e9'/%3E%3C/svg%3E"); }
.wv.w2 { opacity: .28; height: 80%; animation: waveX 17s linear infinite reverse; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 150' preserveAspectRatio='none'%3E%3Cpath d='M0 80 C200 40 400 120 600 80 S1000 40 1200 80 V150 H0Z' fill='%236366f1'/%3E%3C/svg%3E"); }
.wv.w3 { opacity: .9; height: 46%; animation: waveX 11s linear infinite; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 150' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C150 40 300 100 450 70 S750 40 900 70 S1100 100 1200 70 V150 H0Z' fill='%230b0d12'/%3E%3C/svg%3E"); }
@keyframes waveX { to { background-position-x: 1200px; } }

/* Logo vivo: flota y emite ondas */
.logo-wrap { position: relative; display: grid; place-items: center; }
.floaty { animation: floaty 5s ease-in-out infinite; position: relative; z-index: 1; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-2deg); } }
.ring { position: absolute; width: 92px; height: 92px; border-radius: 26px; border: 2px solid rgba(56,189,248,.55); animation: ripple 3.6s ease-out infinite; }
.ring.r2 { animation-delay: 1.2s; } .ring.r3 { animation-delay: 2.4s; }
@keyframes ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(2.3); opacity: 0; border-radius: 50%; } }

.live-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 14px; border-radius: 999px; font-size: 13px; color: #d7dae4;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.live-chip b { color: #fff; font-variant-numeric: tabular-nums; display: inline-block; }
.live-chip b.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: translateY(-3px) scale(1.12); color: #38bdf8; } }
.welcome h1 { margin-top: 18px; }
.shimmer { background-size: 200% auto; animation: shimmer 5s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.rotator { position: relative; display: inline-grid; vertical-align: bottom; overflow: hidden; height: 1.2em; }
.rotator span { grid-area: 1 / 1; white-space: nowrap; color: #38bdf8; }
.rotator span.in { animation: rotIn .5s cubic-bezier(.2,.9,.3,1.2) both; }
.rotator span.out { animation: rotOut .45s ease both; }
@keyframes rotIn { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rotOut { to { transform: translateY(-100%); opacity: 0; } }

.marquee { overflow: hidden; margin: 0 auto 28px; max-width: 760px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee .track { display: flex; gap: 10px; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { white-space: nowrap; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); color: #dbe3f0; }
@keyframes marquee { to { transform: translateX(-50%); } }
.pick-title .muted { font-weight: 500; font-size: 13px; display: block; margin-top: 2px; }

/* Aparición escalonada */
.welcome.play .reveal { animation: revealUp .8s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--d, 0) * 90ms + 120ms); }
@keyframes revealUp { from { opacity: 0; transform: translateY(18px); } }

/* Tarjetas con inclinación 3D y brillo */
.welcome-cards { perspective: 900px; }
.wcard.tilt { position: relative; overflow: hidden; transform-style: preserve-3d; transition: transform .25s ease, border-color .25s, box-shadow .25s;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), var(--panel); }
.wcard.tilt:hover { transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-4px); }
.wcard .sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c) 30%, transparent), transparent 60%); }
.wcard:hover .sheen { opacity: 1; }
.wcard .wicon { animation: bob 4s ease-in-out infinite; }
.wcard:nth-child(2) .wicon { animation-delay: .6s; } .wcard:nth-child(3) .wicon { animation-delay: 1.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px) rotate(-4deg); } }
.wcard .chev { transition: transform .25s; }
.wcard:hover .chev { transform: translateX(4px); color: var(--c); }
.wcard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(120deg, transparent 30%, color-mix(in srgb, var(--c) 70%, transparent), transparent 70%) border-box; background-size: 250% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: border-run 6s linear infinite; }
@keyframes border-run { from { background-position: 150% 0; } to { background-position: -150% 0; } }

.install-cta { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 13px 22px; font-size: 15px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand1), #818cf8); box-shadow: 0 14px 34px -12px rgba(56,189,248,.8); animation: arGlow 2.6s ease-in-out infinite; }
.install-cta small { font-size: 11.5px; font-weight: 600; opacity: .85; }
.trust { display: flex; gap: 8px 16px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; color: var(--muted); }
.help-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sidebar .help-row .link-btn { font-size: 12.5px; text-align: left; }

/* =========================================================
   Guía de instalación
   ========================================================= */
.guide { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(5,7,12,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.guide.show { opacity: 1; }
.guide[hidden] { display: none; }
.guide-card { position: relative; width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 22px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); transform: translateY(14px) scale(.98); transition: transform .3s cubic-bezier(.2,.9,.3,1.1); }
.guide.show .guide-card { transform: none; }
.guide-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--panel2); color: var(--muted); }
.guide-h h3 { font-size: 22px; margin: 10px 0 4px; }
.guide-tabs { display: flex; gap: 6px; background: var(--panel2); padding: 4px; border-radius: 14px; margin: 16px 0; }
.guide-tabs button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.guide-tabs button.active { background: linear-gradient(135deg, var(--brand1), #818cf8); color: #fff; }
.guide-body { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: center; min-height: 360px; }
.guide-mk { animation: fade .35s ease; display: grid; place-items: center; }
.guide-txt { animation: fade .35s ease; }
.guide-n { font-size: 12px; font-weight: 800; color: #818cf8; letter-spacing: .06em; text-transform: uppercase; }
.guide-txt h4 { font-size: 21px; margin: 6px 0 8px; }
.guide-txt p { color: #d7dae4; line-height: 1.6; }
.guide-txt .btn { margin-top: 14px; padding: 12px 18px; }
.guide-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.guide-dots { display: flex; gap: 6px; }
.guide-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .3s, background .3s; }
.guide-dots i.on { width: 26px; background: #818cf8; }
.guide-nav { display: flex; gap: 8px; }
.guide-nav .btn { padding: 11px 18px; font-size: 14px; border-radius: 12px; }
.guide-tips { margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--panel2); font-size: 13.5px; color: #d7dae4; line-height: 1.55; }
.guide-tips .link-btn { display: block; margin-top: 8px; color: #38bdf8; font-weight: 700; padding: 0; }

/* Maquetas de pantalla */
.mk { position: relative; width: 210px; height: 380px; border-radius: 30px; border: 7px solid #262b38; background: #f2f4f8; overflow: hidden; color: #111; font-size: 11px; box-shadow: 0 20px 50px -18px rgba(0,0,0,.8); }
.mk.wide { width: 230px; height: 200px; border-radius: 14px; border-width: 5px; }
.mk-top { display: flex; align-items: center; gap: 6px; padding: 26px 8px 8px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.mk.wide .mk-top { padding-top: 8px; }
.mk-top.plain { justify-content: space-between; font-size: 11px; }
.mk-url { flex: 1; background: #eef0f4; border-radius: 9px; padding: 6px 8px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-btn { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; }
.ico { width: 18px; height: 18px; fill: none; stroke: #2563eb; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: #374151; stroke: none; }
.mk-body { position: absolute; inset: 64px 0 0; display: grid; place-items: center; background: #0b0d12; }
.mk.wide .mk-body { inset: 42px 0 0; }
.mk-body.dim::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.mk-hero { display: grid; justify-items: center; gap: 4px; color: #fff; }
.mk-hero small { color: #94a3b8; }
.mk-icon { width: 46px; height: 46px; border-radius: 12px; }
.mk-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; padding: 10px 6px 14px; background: #f8f9fb; border-top: 1px solid #e5e7eb; font-size: 16px; color: #2563eb; }
.mk-sheet, .mk-menu { position: absolute; left: 6px; right: 6px; bottom: 6px; background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 -10px 30px rgba(0,0,0,.25); animation: sheetUp .45s ease both; }
.mk-menu { top: 50px; bottom: auto; left: auto; width: 150px; right: 6px; animation-name: fade; }
.mk-sheet-h { display: flex; align-items: center; gap: 8px; padding: 6px 4px 10px; border-bottom: 1px solid #eee; }
.mk-sheet-h .mk-icon { width: 30px; height: 30px; border-radius: 8px; }
.mk-sheet-h small, .mk-form small { display: block; color: #6b7280; }
.mk-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 6px; border-radius: 9px; }
.mk-row .ico { stroke: #111; width: 15px; height: 15px; }
.mk-form { display: flex; align-items: center; gap: 10px; background: #fff; margin: 14px; padding: 10px; border-radius: 12px; color: #111; }
.mk-note { color: #94a3b8; padding: 0 16px; font-size: 10.5px; position: absolute; top: 90px; }
.mk-dialog { position: absolute; left: 14px; right: 14px; top: 34%; background: #fff; border-radius: 16px; padding: 14px; display: grid; justify-items: center; gap: 4px; text-align: center; animation: fade .4s ease; z-index: 1; }
.mk-dialog.static { position: static; margin: 10px; }
.mk-dialog small { color: #6b7280; }
.mk-dlg-btns { display: flex; gap: 18px; margin-top: 8px; font-weight: 700; }
.mk.home { background: linear-gradient(160deg, #1e3a8a, #6d28d9 60%, #db2777); }
.mk-grid { position: absolute; inset: 40px 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; align-content: start; }
.mk-grid i { aspect-ratio: 1; border-radius: 11px; opacity: .75; }
.mk-app { display: grid; justify-items: center; gap: 3px; color: #fff; animation: popIn .6s .2s cubic-bezier(.2,1.4,.4,1) both; }
.mk-app .mk-icon { width: 100%; height: auto; box-shadow: 0 0 0 3px rgba(255,255,255,.5), 0 0 22px rgba(56,189,248,.9); }
.mk-app small { font-size: 9px; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.hl { position: relative; background: rgba(37,99,235,.12); outline: 2px solid #2563eb; border-radius: 9px; animation: hlPulse 1.4s ease-in-out infinite; }
.hl.txt { background: none; outline: none; color: #2563eb; animation: none; text-decoration: underline 2px; }
@keyframes hlPulse { 50% { box-shadow: 0 0 0 6px rgba(37,99,235,.18); } }

/* =========================================================
   Recorrido guiado
   ========================================================= */
.tour { position: fixed; inset: 0; z-index: 110; opacity: 0; transition: opacity .25s; }
.tour.show { opacity: 1; }
.tour[hidden] { display: none; }
.tour-spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(5,7,12,.72), 0 0 0 3px #818cf8, 0 0 30px 6px rgba(129,140,248,.6); transition: all .4s cubic-bezier(.2,.9,.3,1); pointer-events: none; }
.tour-tip { position: fixed; background: var(--panel); border: 1px solid rgba(129,140,248,.5); border-radius: 18px; padding: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6); transition: top .4s, left .4s; }
.tour-n { font-size: 11.5px; font-weight: 800; color: #818cf8; text-transform: uppercase; letter-spacing: .06em; }
.tour-t { display: block; font-size: 17px; margin: 4px 0 6px; }
.tour-d { color: #d7dae4; font-size: 14px; line-height: 1.5; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.tour-btns .btn { padding: 10px 18px; }

@media (max-width: 860px) {
  .guide { align-items: end; padding: 0; }
  .guide-card { border-radius: 26px 26px 0 0; max-height: 94dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .guide-body { grid-template-columns: 1fr; gap: 14px; min-height: 0; }
  .mk { width: 180px; height: 300px; }
  .guide-txt { text-align: center; }
  .waves { height: 110px; }
  .welcome-inner { padding-bottom: 90px; }
  .marquee { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i, .wv, .floaty, .ring, .shimmer, .marquee .track, .wcard .wicon, .wcard::after, .install-cta, .hl { animation: none !important; }
  .welcome.play .reveal { animation: none; }
}
.link-btn { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px; }
.link-btn:hover { color: var(--text); }
.guide .btn:not(.ghost), .tour .btn { background: linear-gradient(135deg, var(--brand1), #818cf8); }
.live-chip .lc-long { display: inline; }
@media (max-width: 520px) {
  .live-chip { display: inline-block; font-size: 12px; line-height: 1.5; }
  .live-chip .lc-long { display: none; }
}
.live-chip .dot { display: inline-block; vertical-align: middle; margin-right: 4px; }

/* =========================================================
   Estilo olaventas.com (Apple / Linear) — paleta, tipografía y botones
   ========================================================= */
:root {
  --bg: #08090a; --panel: #0f1011; --panel2: #161718; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #f7f8f8; --muted: #8a8f98; --soft: #d0d6e0;
  --brand: #7170ff; --brand1: #7170ff; --brand2: #4c4bd6;
  --font: "InterVariable", "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(.19,1,.22,1);
}
html { background: var(--bg); }
body { font-family: var(--font); font-feature-settings: "cv01", "ss03"; letter-spacing: -.005em; background: var(--bg); }
h1, h2, h3, h4, .kpi .value, .big-num, .lt-v, .price, .title-wrap h1 { font-weight: 590; letter-spacing: -.018em; }
.welcome h1 { font-weight: 510; letter-spacing: -.03em; line-height: 1.02; }
.card, .wcard, .pcard, .ar-item, .look, .pack, .live-tile { border-color: var(--line); }
.card { background: var(--panel); border-radius: 16px; }
.tag, .nav-g, .guide-n, .tour-n, .sheet-g, .zone-h { font-feature-settings: normal; }
.nav-g, .sheet-g { font-family: var(--mono); font-weight: 500; letter-spacing: .06em; font-size: 10.5px; }

/* Botones en píldora como olaventas.com: claro (principal) y con borde (secundario) */
.btn { border-radius: 9999px; font-weight: 510; letter-spacing: -.005em; padding: 9px 16px; }
.btn:not(.ghost) { background: #e5e5e6; color: #08090a; }
.btn:not(.ghost):hover { background: #fff; filter: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--text); }
.btn.ghost:hover { background: rgba(255,255,255,.05); }
.cta, .pill-light { display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: #e5e5e6; color: #08090a; font-weight: 510; text-decoration: none; transition: background .2s; }
.cta:hover, .pill-light:hover { background: #fff; }
.pill-light { height: 34px; padding: 0 16px; font-size: 13.5px; }
.ar-cta, .ar-actions .btn:first-child, .ar-play, .ar-pill, .nav-new, .w-ar, .tabbar .tab-ar i, .guide-tabs button.active, .ar-steps b { background: var(--brand); color: #fff; }
.ar-badge { background: var(--brand); box-shadow: 0 6px 18px -6px rgba(113,112,255,.8); }
.nav-item.nav-ar { background: rgba(113,112,255,.12); border-color: rgba(113,112,255,.35); }
.ar-banner { background: linear-gradient(120deg, rgba(113,112,255,.22), rgba(113,112,255,.06) 60%, rgba(0,184,204,.08)); border-color: rgba(113,112,255,.35); box-shadow: none; }
.ar-banner-go { background: #e5e5e6; color: #08090a; border-radius: 9999px; }
.ar-hero { background: radial-gradient(600px 300px at 90% 0%, rgba(113,112,255,.25), transparent 70%), var(--panel); border-color: var(--line2); }
.ai-banner { background: var(--panel); border-color: var(--line); }
.ai-badge { background: color-mix(in srgb, var(--accent) 85%, #000); border-radius: 10px; }
.topbar { background: rgba(8,9,10,.72); border-bottom: 1px solid var(--line); }
.sidebar { background: #0b0c0d; border-right-color: var(--line); }
.tabbar { background: rgba(15,16,17,.82); border-top-color: var(--line); }
.sheet { background: #111213; border-color: var(--line); }
.back-site { font-size: 12.5px; padding: 2px 4px; }

/* =========================================================
   Bienvenida: sobria y elegante como olaventas.com
   ========================================================= */
.welcome { background: radial-gradient(900px 500px at 20% -5%, rgba(113,112,255,.16), transparent 60%), radial-gradient(700px 420px at 85% 35%, rgba(0,184,204,.10), transparent 65%), var(--bg); }
.aurora i { opacity: .16 !important; filter: blur(90px); }
.aurora i:nth-child(1) { background: #7170ff; } .aurora i:nth-child(2) { background: #00b8cc; } .aurora i:nth-child(3) { background: #fc7840; opacity: .08 !important; }
.welcome .grad { background-image: linear-gradient(90deg, #f7f8f8 0%, #b8b7ff 45%, #7170ff 60%, #f7f8f8 100%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.6; }
.w-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: rgba(8,9,10,.6); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.w-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 590; font-size: 16px; }
.w-brand img { width: 26px; height: auto; }
.w-brand em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line2); border-radius: 9999px; padding: 1px 8px; }
.welcome-inner { padding-top: calc(70px + env(safe-area-inset-top)); }
.mark-xl { width: 96px; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 10px 30px rgba(113,112,255,.45)); }
.ring { width: 110px; height: 110px; border-radius: 50%; border: 1px solid rgba(113,112,255,.45); }
.live-chip { background: rgba(255,255,255,.04); border-color: var(--line2); font-family: var(--font); }
.marquee span { background: transparent; border-color: var(--line2); color: var(--soft); font-weight: 500; }
.wcard { background: rgba(15,16,17,.72) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-color: var(--line2); border-radius: 18px; }
.wicon { background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.install-cta { background: #e5e5e6; color: #08090a; border-radius: 9999px; box-shadow: none; animation: none; padding: 12px 24px; }
.install-cta:hover { background: #fff; }
.install-cta small { color: #4b4f57; }
.bubbles { opacity: .55; }
/* Olas suaves en índigo; la última capa es del color del fondo (sin recuadro negro) */
.wv.w1 { opacity: .16; filter: hue-rotate(25deg); }
.wv.w2 { opacity: .14; }
.wv.w3 { opacity: 1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 150' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C150 40 300 100 450 70 S750 40 900 70 S1100 100 1200 70 V150 H0Z' fill='%2308090a'/%3E%3C/svg%3E"); }
/* La palabra que cambia: una sola a la vez, sin superponerse */
.rotator { display: inline-block; height: auto; overflow: visible; vertical-align: baseline; }
.rotator span { display: inline-block; transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), filter .3s; }
.rotator span.out { opacity: 0; transform: translateY(8px); filter: blur(4px); }

/* =========================================================
   iPhone con la app instalada: pantalla completa hasta abajo
   ========================================================= */
.app { height: calc(100dvh + var(--vh-gap, 0px)); }
.welcome, #splash, .ar-layer, .guide, .tour, .sheet-backdrop { bottom: calc(-1 * var(--vh-gap, 0px)); }
.tabbar, .sheet { bottom: calc(-1 * var(--vh-gap, 0px)); }
.waves { bottom: calc(-1 * var(--vh-gap, 0px)); }
body.standalone .chat { height: calc(100dvh + var(--vh-gap, 0px) - 128px - var(--tab-h, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
/* La notificación queda totalmente fuera de la pantalla cuando no se usa (sin sombra arriba) */
.notif { transform: translate(-50%, calc(-100% - 40px - env(safe-area-inset-top))); opacity: 0; visibility: hidden; transition: transform .45s cubic-bezier(.2,1.1,.3,1), opacity .3s, visibility 0s .45s; }
.notif.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .45s cubic-bezier(.2,1.1,.3,1), opacity .3s, visibility 0s; }
.notif { background: rgba(28,29,31,.86); }
@media (max-width: 860px) {
  .welcome-inner { padding-top: calc(66px + env(safe-area-inset-top)); }
  .mark-xl { width: 80px; }
  .lead { font-size: 15.5px; }
  .pill-light { height: 32px; padding: 0 13px; font-size: 13px; }
}
/* Logo blanco sin recuadro, como en olaventas.com */
.logo { background: none !important; box-shadow: none !important; }
.logo img { width: 100%; }
#splash .logo.xl { width: 96px; height: auto; }
.ph-av { background: #1f2124; }

/* =========================================================
   Bolita flotante de WhatsApp con nube de mensaje
   ========================================================= */
.wa-fab { position: fixed; z-index: 85; right: max(18px, env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom) - var(--vh-gap, 0px) * 0);
  display: flex; align-items: flex-end; gap: 10px; flex-direction: row-reverse; pointer-events: none;
  opacity: 0; transform: translateY(30px) scale(.6); transition: opacity .5s, transform .6s cubic-bezier(.2,1.4,.4,1); }
.wa-fab.in { opacity: 1; transform: none; }
.wa-fab.off { opacity: 0; transform: translateY(30px) scale(.6); }
.wa-fab.off * { pointer-events: none !important; }
.wa-btn { pointer-events: auto; position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(145deg, #2fe174, #1ebe5d); box-shadow: 0 12px 30px -8px rgba(37,211,102,.7), inset 0 1px 0 rgba(255,255,255,.35);
  animation: waFloat 4s ease-in-out infinite; transition: transform .2s; }
.wa-btn:hover { transform: scale(1.08); }
.wa-btn:active { transform: scale(.94); }
.wa-btn svg { width: 31px; height: 31px; position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.wa-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(37,211,102,.6); animation: waRing 2.8s ease-out infinite; }
.wa-ring.r2 { animation-delay: 1.4s; }
.wa-badge { position: absolute; top: -2px; right: -2px; z-index: 2; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center;
  background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; border: 2px solid var(--bg); animation: waBadge 2.8s ease-in-out infinite; }
.wa-fab.wiggle .wa-btn { animation: waWiggle .9s ease, waFloat 4s ease-in-out .9s infinite; }
@keyframes waFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes waRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
@keyframes waBadge { 0%, 85%, 100% { transform: scale(1); } 90% { transform: scale(1.25); } }
@keyframes waWiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -14deg; } 40% { rotate: 12deg; } 60% { rotate: -8deg; } 80% { rotate: 5deg; } }

/* Nube de mensaje */
.wa-cloud { position: relative; margin-bottom: 8px; max-width: 250px; opacity: 0; transform: translateX(12px) scale(.85); transform-origin: right bottom;
  transition: opacity .35s, transform .45s cubic-bezier(.2,1.3,.4,1); pointer-events: none; }
.wa-cloud.show { opacity: 1; transform: none; pointer-events: auto; }
.wa-cloud-body { display: block; text-decoration: none; color: #111b21; background: #fff; padding: 12px 15px; border-radius: 18px 18px 4px 18px;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.6); font-size: 14px; line-height: 1.35; }
.wa-cloud-body::after { content: ""; position: absolute; right: -6px; bottom: 8px; border: 8px solid transparent; border-left-color: #fff; border-bottom-color: #fff; transform: rotate(10deg); }
.wa-cloud-txt { display: none; }
.wa-cloud-txt b { display: block; font-weight: 650; }
.wa-cloud-txt span { color: #1ebe5d; font-weight: 650; }
.wa-cloud.typed .wa-cloud-txt { display: block; animation: fade .35s ease; }
.wa-cloud.typed .wa-typing { display: none; }
.wa-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa3a8; animation: blink 1.2s infinite; }
.wa-typing i:nth-child(2) { animation-delay: .2s; } .wa-typing i:nth-child(3) { animation-delay: .4s; }
.wa-cloud-x { position: absolute; top: -9px; left: -9px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #2c2e31; color: #d0d6e0; font-size: 11px;
  box-shadow: 0 4px 10px rgba(0,0,0,.4); }

/* En el celular, por encima de la barra de pestañas (y del botón 3D central) */
@media (max-width: 860px) {
  .wa-fab { right: 14px; bottom: calc(var(--tab-h, 64px) + 18px + env(safe-area-inset-bottom)); }
  .wa-btn { width: 54px; height: 54px; }
  .wa-btn svg { width: 28px; height: 28px; }
  .wa-cloud { max-width: 210px; }
  .wa-cloud-body { font-size: 13.5px; }
}
/* En la bienvenida (sin barra de pestañas) va más abajo */
body:has(#welcome:not(.hide)) .wa-fab { bottom: calc(22px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .wa-btn, .wa-ring, .wa-badge { animation: none !important; } }
/* Orden: nube a la izquierda, bolita pegada al borde derecho */
.wa-fab { flex-direction: row; justify-content: flex-end; }

/* Bolita de WhatsApp: oculta; sale desde «Más», 5 s en pantalla y vuelve encogiéndose */
.wa-fab, .wa-fab.in { opacity: 1; transform: none; transition: none; }
.wa-fab { visibility: hidden; pointer-events: none; }
.wa-fab.ready { visibility: visible; }
.wa-fab .wa-btn { animation: none; opacity: 0; transform: translate(var(--ox, 0), var(--oy, 0)) scale(.15); }
.wa-fab.in .wa-btn { opacity: 1; transform: none; pointer-events: auto; transition: transform .6s cubic-bezier(.18,1.35,.4,1), opacity .25s; }
.wa-fab.out .wa-btn { opacity: 0; transform: translate(var(--ox, 0), var(--oy, 0)) scale(.15); transition: transform .5s cubic-bezier(.55,0,.75,.2), opacity .45s ease-in; }
.wa-fab.in .wa-btn svg { animation: waWiggle .9s .6s ease; }
#tabbar button.wa-pop svg { animation: waPop .5s ease; }
@keyframes waPop { 40% { transform: scale(1.3); color: #25d366; } }

/* Notificaciones interactivas */
.notif { touch-action: none; user-select: none; -webkit-user-select: none; padding-bottom: 16px; }
.notif.dragging { transition: none !important; }
.notif:active { cursor: grabbing; }
.nt-b { flex: 1; min-width: 0; }
.nt-b em { display: block; font-style: normal; font-size: 11.5px; color: #a5b4fc; margin-top: 2px; }
.nt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: stretch; }
.nt-side time { color: var(--muted); font-size: 11.5px; }
.nt-mute { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); font-size: 13px; }
.nt-mute:hover { background: rgba(255,255,255,.16); }
.nt-grab { position: absolute; left: 50%; bottom: 6px; width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); transform: translateX(-50%); }
.mute-btn { font-size: 12.5px; text-align: left; }
.mute-btn.muted { color: #fbbf24; }

/* =========================================================
   Notificación estilo «Liquid Glass» (Apple) — centrada sin translate(-50%)
   ========================================================= */
.notif { left: 0 !important; right: 0 !important; margin: 0 auto; width: min(440px, calc(100vw - 20px)); top: calc(10px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 16px 12px; border-radius: 28px; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06)) , rgba(28,30,36,.38);
  -webkit-backdrop-filter: blur(28px) saturate(190%) brightness(1.08); backdrop-filter: blur(28px) saturate(190%) brightness(1.08);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(255,255,255,.08), inset 0 0 22px rgba(255,255,255,.06), 0 18px 50px -12px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.25);
  transform: translateY(calc(-100% - 40px - env(safe-area-inset-top))) scale(.9); opacity: 0; visibility: hidden; filter: blur(6px);
  transition: transform .55s cubic-bezier(.2,1.25,.35,1), opacity .35s, filter .4s, visibility 0s .55s; }
.notif.show { transform: none; opacity: 1; visibility: visible; filter: none; transition: transform .6s cubic-bezier(.2,1.25,.35,1), opacity .3s, filter .4s, visibility 0s; }
.notif::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 80% at 15% -20%, rgba(255,255,255,.35), transparent 55%), radial-gradient(90% 70% at 110% 130%, rgba(113,112,255,.22), transparent 60%); }
.notif::after { content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.18), transparent); transform: skewX(-18deg); }
.notif.show::after { animation: glassSweep 1.4s .25s ease; }
@keyframes glassSweep { to { left: 130%; } }
.nt-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 21px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.nt-b { flex: 1; min-width: 0; }
.nt-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(255,255,255,.72); margin-bottom: 2px; }
.nt-top img { width: 13px; height: auto; opacity: .9; }
.nt-top span { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: 10.5px; }
.nt-top time { margin-left: auto; color: rgba(255,255,255,.6); font-size: 11.5px; }
.notif .nt-b b { display: block; font-size: 14.5px; font-weight: 650; color: #fff; letter-spacing: -.01em; }
.notif .nt-b small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; color: rgba(255,255,255,.82); font-size: 13.5px; line-height: 1.35; }
.notif .nt-mute { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); font-size: 12px; align-self: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.notif .nt-grab { bottom: 6px; width: 34px; height: 4px; background: rgba(255,255,255,.4); }
.notif.dragging { transition: none !important; }
.notif:active .nt-ic { transform: scale(.94); transition: transform .15s; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .notif { background: rgba(36,38,44,.96); } }
@media (min-width: 861px) { .notif { top: 14px; } }

/* =========================================================
   Marketing y pauta con IA
   ========================================================= */
.ads-plats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ads-plat { position: relative; overflow: hidden; }
.ads-plat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--pc); opacity: .8; }
.ads-plat-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ads-plat-h > div { flex: 1; min-width: 0; }
.ads-plat-h b { display: block; font-size: 16px; }
.ads-plat-h small { color: var(--muted); font-size: 12.5px; }
.ads-plat-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ads-plat-n small { display: block; color: var(--muted); font-size: 12px; }
.ads-plat-n b { font-size: 20px; font-weight: 650; }
.ads-plat-n b.g { color: var(--good); } .ads-plat-n b.r { color: var(--bad); }
.ads-plat-f { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.funnel { display: grid; gap: 8px; margin-bottom: 16px; }
.fn { width: var(--w); margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 12px; font-size: 13px;
  background: linear-gradient(90deg, rgba(113,112,255,.28), rgba(113,112,255,.1)); border: 1px solid rgba(113,112,255,.3); }
.fn span { flex: 1; min-width: 0; color: var(--soft); }
.fn b { font-size: 15px; }
.fn em { font-style: normal; font-size: 11.5px; color: #a5b4fc; }
.rule { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rule > div { flex: 1; } .rule b { font-size: 14px; } .rule p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.split-list { display: grid; gap: 8px; margin-top: 12px; }
.split-list div { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 10px; font-size: 13.5px; }
.split-list small { color: var(--muted); min-width: 92px; text-align: right; }
.prod-tabs button .net { width: 20px; height: 20px; }
.strat-h { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.strat-h h4 { font-size: 18px; }
.strat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.strat-grid > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.strat-grid small { color: var(--muted); font-size: 12px; font-weight: 600; }
.strat-grid p { font-size: 13.5px; margin-top: 4px; line-height: 1.5; }
.strat-grid .tag { margin: 2px 2px 0 0; }
.strat-plan { margin-top: 12px; padding: 14px; border-radius: 14px; border: 1px solid rgba(113,112,255,.3); background: rgba(113,112,255,.08); font-size: 13.5px; }
.strat-plan ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--soft); }
.ad-cr { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.ad-img { position: relative; height: 170px; }
.ad-net { position: absolute; left: 10px; top: 10px; }
.ad-b { padding: 12px 14px 14px; display: grid; gap: 8px; }
.ad-copy { font-size: 13px; color: var(--soft); line-height: 1.5; min-height: 3em; }
@media (max-width: 1100px) { .ads-plats { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .strat-grid { grid-template-columns: 1fr; } .fn { width: 100%; } }
.strat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.strat-grid .tag { white-space: normal; }
@media (max-width: 860px) { .strat-grid { grid-template-columns: minmax(0, 1fr); } }
