/* Miguel Molina Studio · hoja única (portal y admin). Fuente de verdad visual: design/prototype.html.
   No reutilizar nombres de clase para otra cosa: buscar aquí antes de crear una. */

/* ───────── Tokens ───────── */
/* ───────── Tokens (SaaS moderno estilo Tailwind Zinc) ───────── */
:root {
    --ink: #09090b;       /* Zinc 950 */
    --ink-2: #141416;     /* Zinc 900 */
    --ink-3: #202024;     /* Zinc 800 */
    --line: #2e2e34;      /* Zinc 700 */
    --text: #fafafa;      /* Zinc 50 */
    --muted: #a1a1aa;     /* Zinc 400 */
    --amber: #f59e0b;     /* Amber 500 */
    --amber-2: #fbbf24;   /* Amber 400 */
    --ok: #10b981;        /* Emerald 500 */
    --warn: #f59e0b;      /* Amber 500 */
    --bad: #ef4444;       /* Red 500 */
    --brand: var(--amber);
    --r: 12px; --r-lg: 18px;
    --sans: 'Inter Tight', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --display: var(--sans);
    --mono: 'JetBrains Mono', monospace;
}
[data-theme="light"] { --ink: #f4f4f5; --ink-2: #ffffff; --ink-3: #e4e4e7; --line: #d4d4d8; --text: #18181b; --muted: #71717a; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; }
body { background: var(--ink); color: var(--text); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; min-width: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; }
.eyebrow { font: 600 .72rem/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--amber); }
.display { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; line-height: 1.02; }
.display i { font-style: italic; font-weight: 400; color: var(--amber-2); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* ───────── Marca del estudio ───────── */
.studio-mark { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.studio-mark .frame { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; position: relative;
    background: var(--amber); color: #1A1714; font: 700 .95rem var(--display); letter-spacing: -.04em; }
.studio-mark .frame::before, .studio-mark .frame::after { content: ""; position: absolute; left: 4px; right: 4px; height: 3px;
    background: repeating-linear-gradient(90deg, #1A1714 0 3px, transparent 3px 7px); }
.studio-mark .frame::before { top: 4px; } .studio-mark .frame::after { bottom: 4px; }
.studio-mark img { width: 38px; height: 38px; border-radius: 9px; }
.studio-mark span { font: 500 1.05rem var(--display); font-style: italic; }
.studio-mark small { display: block; font: 500 .62rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); font-style: normal; }

.film { height: 18px; border-block: 1px solid var(--line);
    background: repeating-linear-gradient(90deg, transparent 0 10px, var(--ink) 10px 20px) 0 4px / 100% 10px no-repeat, var(--ink-3); }

/* ───────── Botones y formularios ───────── */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .9rem 1.4rem; border-radius: 99px; font-weight: 600;
    text-decoration: none; border: 0; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 14px 40px -12px var(--brand); }
.btn-amber { background: var(--amber); color: #1A1714; }
.btn-wa { background: #1FA855; color: #fff; }
.btn-ghost { border: 1px solid var(--line); background: none; color: var(--text); }
.field { display: grid; gap: .35rem; margin: 1rem 0; }
.field label { font-size: .8rem; font-weight: 600; }
.input { padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); color: var(--text); font: inherit; }
.alert { padding: .7rem 1rem; border-radius: 10px; background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--text); font-size: .9rem; }

/* ───────── Portada provisional del portal ───────── */
.soon { min-height: 100vh; display: grid; align-content: center; gap: 1.4rem; max-width: 760px; margin: 0 auto; padding: 40px 16px; }
.soon h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
.soon p { color: var(--muted); max-width: 48ch; }

/* ───────── Microsite público (home) ───────── */
.pf-wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.pf-head { display: flex; justify-content: space-between; align-items: center; padding-block: 22px; }
.pf-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; padding-block: clamp(28px, 6vw, 80px); }
.pf-hero-text { display: grid; gap: 1.4rem; justify-items: start; }
.pf-hero h1 { font-size: clamp(2.4rem, 7vw, 4.8rem); max-width: 16ch; }
.pf-hero p, .pf-lead { color: var(--muted); max-width: 58ch; font-size: 1.08rem; }
.pf-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }
.pf-sec { display: grid; gap: 1.2rem; padding-block: clamp(36px, 6vw, 72px); justify-items: start; }
.pf-sec h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); max-width: 22ch; }
.pf-grid { display: grid; gap: 14px; width: 100%; list-style: none; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pf-sites { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pf-sites a:first-child { grid-column: span 2; }
.pf-do li, .pf-sites a { display: grid; gap: .45rem; align-content: start; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); text-decoration: none; }
.pf-do span, .pf-sites span { color: var(--muted); font-size: .92rem; }
.pf-sites a { transition: transform .15s, border-color .15s; } .pf-sites a:hover { transform: translateY(-3px); border-color: var(--amber); }
.pf-sites small { color: var(--amber); font-family: var(--mono); overflow-wrap: anywhere; }
.pf-tabs { display: inline-flex; gap: 6px; padding: 4px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: .6rem 1.4rem; }
.pf-tab { border: 0; background: none; color: var(--muted); font: 600 .86rem/1.2 var(--sans); padding: .55rem 1.1rem; border-radius: 99px; cursor: pointer; transition: all .2s; white-space: nowrap; }
.pf-tab:hover { color: var(--text); }
.pf-tab.active { background: var(--amber); color: #1A1714; }
.pf-reels { display: grid; gap: 18px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: start; }
.pf-reel { margin: 0; display: grid; gap: .6rem; }
.pf-reel video { width: 100%; border-radius: var(--r); background: #000; border: 1px solid var(--line); aspect-ratio: 9 / 16; object-fit: cover; }
.pf-reel figcaption { font-size: .88rem; color: var(--muted); } .pf-reel b { display: block; color: var(--text); }
.pf-shots { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; width: 100%; align-items: stretch; }
.pf-shot { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); overflow: hidden; }
.pf-shot .frame { position: relative; flex: 1 1 auto; min-height: 320px; background: #0B0A09; overflow: hidden; }
.pf-shot.wide .frame { flex: 0 0 auto; aspect-ratio: 16 / 9; }
.pf-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.pf-shot.phone img { object-position: top center; }
.pf-shot figcaption { padding: 1rem 1.2rem 1.2rem; font-size: .9rem; color: var(--muted); display: grid; gap: .35rem; align-content: start; }
.pf-shot b { color: var(--text); font-size: 1rem; } .pf-shot a { color: var(--amber); text-decoration: none; font-weight: 600; }
@media (max-width: 760px) { .pf-shots { grid-template-columns: 1fr; }  .pf-head .btn { padding: .7rem 1rem; } }
.pf-yt { position: relative; display: block; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.pf-yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; } .pf-yt:hover img { transform: scale(1.04); }
.pf-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: #1A1714; font-size: 1.6rem; padding-left: 5px; box-shadow: 0 0 0 10px color-mix(in srgb, var(--amber) 30%, transparent); }
.pf-path { padding-block: 8px 48px; color: var(--muted); } .pf-path b { color: var(--text); } .pf-path a { color: var(--amber); font-weight: 600; text-decoration: none; }
.pf-foot { display: flex; justify-content: space-between; padding-block: 28px 40px; color: var(--muted); font-size: .85rem; }

/* ───────── Panel (portal y admin): barra lateral + contenido ───────── */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.mobile-bar, .nav-toggle, .nav-backdrop, .side .close-btn { display: none; }

.side { background: var(--ink-2); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 1.2rem;
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.side-top { display: flex; justify-content: space-between; align-items: center; }
.nav { display: grid; gap: .25rem; }
.nav a { display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; border-radius: 10px; text-decoration: none; color: var(--muted);
    font-weight: 500; font-size: .92rem; transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.nav a:hover { background: var(--ink-3); color: var(--text); }
.nav a.active { background: var(--ink-3); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.nav a .n { margin-left: auto; font: 600 .7rem var(--mono); background: var(--brand); color: #1A1714; border-radius: 99px; padding: .1rem .45rem; }
.side-foot { margin-top: auto; padding: .9rem; border-radius: var(--r); background: var(--ink-3); border: 1px solid var(--line); font-size: .8rem; }
.side-foot .w-full { width: 100%; justify-content: center; }

.main-wrap { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
.main { width: 100%; max-width: 1280px; padding: 32px 32px 80px; display: grid; gap: 32px; align-content: start; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.hello h1 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); font-weight: 700; letter-spacing: -.02em; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.h2 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.h2 h2 { font: 600 1.35rem var(--sans); }
.h2 a { font-size: .85rem; color: var(--muted); }

/* ───────── Admin: indicadores y embudo ───────── */
.kpi { padding: 18px; border-radius: var(--r); background: var(--ink-2); border: 1px solid var(--line); display: block; text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
a.kpi:hover { border-color: var(--amber); background: var(--ink-3); }
.kpi b { display: block; font: 500 2.4rem/1.1 var(--display); }
.kpi small { color: var(--muted); font-size: .78rem; }
.funnel { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.funnel-col { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-height: 190px; }
.funnel-col h4 { font: 600 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex;
    justify-content: space-between; gap: .4rem; margin-bottom: .7rem; }
.agency-chip { display: block; text-decoration: none; color: inherit; background: var(--ink-3); border-radius: 10px; padding: 10px; margin-bottom: 8px; border-left: 3px solid var(--c); font-size: .82rem; transition: background .15s, transform .15s; }
a.agency-chip:hover { background: color-mix(in srgb, var(--c) 16%, var(--ink-3)); transform: translateX(2px); }
.agency-chip b { display: block; }
.agency-chip small { color: var(--muted); font-size: .72rem; }

/* ───────── Login ───────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(420px, 100%); display: grid; gap: .6rem; }
.login h1 { font-size: 2rem; margin-top: 1rem; }

/* ───────── Admin: tablas, formularios, regalos, mail ───────── */
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.back { font-size: .85rem; text-decoration: none; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row .input { flex: 1; min-width: 0; }
.input.num { width: 70px; min-width: 0; flex: none; padding: .45rem .5rem; }
textarea.input { resize: vertical; font: inherit; max-width: 100%; }
select.input { min-width: 0; max-width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 1rem; }
.swatches input[type=color] { width: 46px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: .4rem; }
.card { min-width: 0; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card:has(> .tbl), .card:has(> form > .tbl) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font: 600 .68rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: .6rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: .75rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.link-row { cursor: pointer; } .link-row:hover td { background: var(--ink-3); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .65rem; border-radius: 99px; font-size: .72rem; font-weight: 600; border: 1px solid var(--line); }
.pill.st-Prospect { color: var(--muted); } .pill.st-GiftReady { color: var(--amber); border-color: var(--amber); }
.pill.st-Sent, .pill.st-LandingViewed { color: var(--warn); } .pill.st-AccessCreated, .pill.st-Client { color: var(--ok); border-color: var(--ok); }
.pill.st-Discarded { color: var(--bad); }
.filters-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; width: 100%; }
.filters-bar .search-box { flex: 1 1 200px; min-width: 0; position: relative; }
.filters-bar .search-box .clear-btn { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .85rem; padding: .2rem .4rem; }
.filters-bar .search-box .clear-btn:hover { color: var(--text); }
.filters-bar select.input { flex: 1 1 140px; min-width: 0; }
.filters-meta { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: .75rem; }
.filters-meta b { color: var(--text); }
.filter-check { display: flex; align-items: center; gap: .45rem; cursor: pointer; user-select: none; font-size: .88rem; color: var(--text); padding: .45rem .75rem; border-radius: 8px; border: 1px solid var(--line); background: var(--ink-3); }
.filter-check:has(input:checked) { border-color: var(--amber); color: var(--amber-2); background: rgba(245,166,35,.12); }
.note { padding: .65rem .9rem; border-radius: 10px; font-size: .88rem; margin: .6rem 0; border: 1px solid var(--line); }
.note.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.note.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.s-ok { color: var(--ok); } .s-bad { color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.file { position: relative; overflow: hidden; cursor: pointer; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.soon-link { opacity: .4; cursor: default; }
.contact { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: .6rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.contact.new { grid-template-columns: 1fr 1fr 1fr auto; border: 0; }
.gift { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.gift-media img, .gift-empty { width: 150px; aspect-ratio: 9/16; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.gift-empty { display: grid; place-items: center; color: var(--muted); font-size: .8rem; background: var(--ink-3); }
.gift-body h3 { font: 500 1.25rem var(--display); }
.steps-list { display: grid; gap: .9rem; margin-top: 1rem; }
.step { padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); display: grid; gap: .5rem; }
.step.done { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.step.done > b::after { content: "  ✓"; color: var(--ok); }
.gift-new { margin-top: 1.2rem; }
code { font-family: var(--mono); font-size: .78rem; background: var(--ink-3); padding: .1rem .35rem; border-radius: 6px; word-break: break-all; }
.check { display: flex; gap: .6rem; align-items: center; padding: .4rem 0; font-size: .92rem; }
.send { display: grid; gap: .7rem; margin-top: 1.4rem; }
.confirm { padding: 1rem; border-radius: 12px; border: 1px solid var(--amber); display: grid; gap: .6rem; }
.mail-grid { grid-template-columns: minmax(300px, .8fr) 1.2fr; }
.preview { padding: 0; overflow: hidden; }
.preview iframe { width: 100%; height: 1900px; border: 0; background: #E9E4DB; display: block; }
.texts textarea { min-height: 2.6rem; }

/* ───────── Portal: menciones con @ y clips de IA ───────── */
.mention-box { position: relative; }
.mention-list { display: grid; gap: 2px; padding: 6px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); max-width: 420px; }
.mention-list button { text-align: left; background: none; border: 0; color: var(--text); padding: .45rem .6rem; border-radius: 8px; font-size: .88rem; }
.mention-list button:hover { background: var(--ink-3); }
.comp code, .mention-list code { font-size: .68rem; }
.clip { border: 1px solid var(--line); border-radius: 12px; padding: .6rem; display: grid; gap: .4rem; background: var(--ink-2); }
.clip-head { display: flex; gap: .6rem; align-items: baseline; }
.clip-head .link-btn { margin-left: auto; }
input[type=range] { accent-color: var(--brand); width: 100%; }
.demo-edit { margin-top: .4rem; font-size: .8rem; }
.demo-edit[open] { display: grid; gap: .4rem; }

/* ───────── Portal: visor de componentes ───────── */
.picker { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; outline: none; margin-top: .8rem; width: 100%; min-width: 0; }
.picker-list { display: grid; align-content: start; gap: .7rem; max-height: 76vh; min-height: 0; min-width: 0; }
.picker-tabs { display: flex; gap: .4rem; }
.picker-tabs button { flex: 1; min-width: 0; padding: .55rem .6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-3); color: var(--muted); font-weight: 600; }
.picker-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.picker-tabs button span { font: 600 .7rem var(--mono); opacity: .8; margin-left: .3rem; }
.picker-tabs button[disabled] { opacity: .35; }
.picker-cats { display: flex; flex-wrap: wrap; gap: .35rem; }
.picker-cats .chip { padding: .3rem .7rem; font-size: .75rem; }
.picker-list ul { list-style: none; overflow: auto; max-height: 58vh; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.picker-list li { display: grid; grid-template-columns: 22px 1fr; gap: .4rem; padding: .6rem .7rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker-list li:last-child { border-bottom: 0; }
.picker-list li:hover { background: var(--ink-3); }
.picker-list li.cur { background: color-mix(in srgb, var(--brand) 22%, var(--ink-3)); box-shadow: inset 3px 0 0 var(--brand); }
.picker-list li b { display: block; font-size: .88rem; font-weight: 600; }
.picker-list li code { font-size: .66rem; background: none; padding: 0; color: var(--muted); }
.picker-list .tick { color: var(--ok); font-weight: 700; }
.picker-main { display: grid; gap: 12px; justify-items: center; align-content: start; min-width: 0; width: 100%; }
.picker-stage { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 30% 20%, #3a3530, #141210 70%) center / cover no-repeat;
    box-shadow: 0 30px 70px -35px rgba(0,0,0,.8); border: 1px solid var(--line); max-width: 100%; }
.picker-stage.portrait { height: min(72vh, 680px); max-width: min(100%, 380px); aspect-ratio: 9 / 16; }
.picker-stage.landscape { width: 100%; max-width: 900px; aspect-ratio: 16 / 9; }
.picker-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.picker-stage .own { position: absolute; top: 10px; left: 10px; font: 600 .62rem var(--sans); letter-spacing: .14em; background: var(--brand); color: #fff; padding: .25rem .5rem; border-radius: 6px; }
.picker-info { width: 100%; max-width: 900px; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.picker-info h3 { font: 500 1.3rem var(--display); }
.picker-info h3 code { font-size: .72rem; }
.picker-sum { padding: 0 .2rem; }
@media (max-width: 900px) {
    .picker { grid-template-columns: minmax(0, 1fr); }
    .picker-list ul { max-height: 240px; }
    .picker-stage.portrait { height: auto; width: min(100%, 300px); aspect-ratio: 9 / 16; }
}

/* ───────── Admin: Catálogo de componentes ───────── */
.cat-kpis { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1rem; align-items: center; }
.cat-kpi { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem; border-radius: 99px; font-size: .8rem; font-weight: 500; border: 1px solid var(--line); background: var(--ink-3); color: var(--text); cursor: pointer; user-select: none; transition: border-color .15s, background .15s, color .15s; }
.cat-kpi:hover { border-color: var(--amber); }
.cat-kpi.active { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, var(--ink-3)); color: var(--amber-2); }
.cat-kpi .count { font: 600 .75rem var(--mono); padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.09); color: var(--text); }
.cat-modes { display: inline-flex; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: var(--ink-3); }
.cat-modes button { border: 0; background: none; color: var(--muted); padding: .45rem .85rem; font-size: .82rem; cursor: pointer; transition: background .15s, color .15s; display: inline-flex; align-items: center; gap: .4rem; }
.cat-modes button:hover { color: var(--text); }
.cat-modes button.on { background: var(--brand); color: #fff; font-weight: 600; }
.cat-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 99px; line-height: 1.2; }
.cat-status.pub { background: rgba(39, 174, 96, .16); color: #2ecc71; border: 1px solid rgba(39, 174, 96, .35); }
.cat-status.exc { background: rgba(155, 89, 182, .18); color: #c39bd3; border: 1px solid rgba(155, 89, 182, .35); }
.cat-status.hid { background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--line); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; margin-top: 1rem; }
.cat-card { display: flex; flex-direction: column; justify-content: space-between; padding: 1.1rem 1.2rem; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-card:hover { border-color: var(--amber); transform: translateY(-2px); box-shadow: 0 10px 25px -10px rgba(0,0,0,.5); }
.cat-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .6rem; }
.cat-card-body { flex: 1; display: grid; gap: .45rem; }
.cat-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.cat-inspector { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; width: 100%; outline: none; margin-top: 1rem; align-items: start; }
.cat-nav-list { display: grid; align-content: start; gap: .6rem; }
.cat-nav-list ul { list-style: none; overflow-y: auto; max-height: calc(82vh - 80px); border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); padding: 0; margin: 0; }
.cat-nav-item { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .65rem .8rem; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .12s; }
.cat-nav-item:last-child { border-bottom: 0; }
.cat-nav-item:hover { background: var(--ink-3); }
.cat-nav-item.cur { background: color-mix(in srgb, var(--brand) 20%, var(--ink-3)); box-shadow: inset 3px 0 0 var(--brand); }
.cat-nav-info { min-width: 0; flex: 1; }
.cat-nav-info b { display: block; font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-nav-info code { font-size: .66rem; background: none; padding: 0; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-stage-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; width: 100%; max-width: 900px; padding: .65rem .9rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .9rem; }
.cat-stage-group { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.cat-stage-group select.input { padding: .35rem .6rem; font-size: .8rem; }
.cat-action-box { width: 100%; max-width: 900px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .85rem 1.1rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; margin-bottom: .8rem; }
.cat-edit-card { width: 100%; max-width: 900px; margin-top: 1rem; padding: 1.1rem 1.25rem; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.badge-tag { font: 500 .68rem var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--ink-3); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 960px) {
    .cat-inspector { grid-template-columns: minmax(0, 1fr); }
    .cat-nav-list ul { max-height: 260px; }
}

/* ───────── Admin: tablero de encargos ───────── */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.order-chip { display: block; text-decoration: none; color: var(--text); }
.order-chip:hover { background: var(--ink-2); }
.brief { max-height: 520px; overflow: auto; font: 400 .74rem/1.55 var(--mono); background: #0A0908; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; white-space: pre-wrap; }
.quote { border-left: 3px solid var(--amber); padding: .4rem .9rem; color: var(--muted); font-style: italic; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr 1fr; } }

/* ───────── Landing del regalo (/regalo/{token}): se viste con --brand/--brand-2 de la agencia. Prefijo gl- ───────── */
.gl { --brand-2: #F6EFE4; background: var(--brand-2); color: #1C1917; min-height: 100vh; overflow-x: hidden; }
.gl .display { color: #1C1917; } .gl .display i { color: var(--brand); }
.gl-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.gl-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 22px 0; flex-wrap: wrap; }
.gl .studio-mark span { color: #1C1917; }
.gl-for { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: #6B6258; }
.gl-for img { height: 44px; width: auto; }
.gl-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding: 30px 0 80px; position: relative; }
.gl-hero::before { content: ""; position: absolute; right: -200px; top: -80px; width: 720px; height: 720px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 65%); pointer-events: none; }
.gl-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); }
.gl-lead { font-size: 1.12rem; max-width: 36ch; margin: 1.4rem 0 2rem; color: #4A433B; }
.gl-ribbon { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .9rem .5rem .5rem; border-radius: 99px; background: #fff;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,.3); font-size: .85rem; margin-bottom: 1.4rem; max-width: 100%; }
.gl-ribbon b { background: var(--brand); color: #fff; border-radius: 99px; padding: .2rem .6rem; font-size: .7rem; letter-spacing: .14em; flex: none; }
.gl-ctas { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn-soft { border: 1px solid #D3C8B6; color: #1C1917; background: rgba(255,255,255,.5); }
.gl-phone-wrap { position: relative; justify-self: center; }
.phone { position: relative; width: min(300px, 78vw); aspect-ratio: 9/16.4; border-radius: 44px; padding: 11px;
    background: linear-gradient(145deg, #2c2a27, #0c0b0a); box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), inset 0 0 0 1.5px #3a3733; }
/* Safari (iPhone) saca el <video> del recorte de un contenedor con border-radius + overflow:hidden (y peor si está girado):
   la máscara y el isolation lo obligan a recortar. Por eso el móvil ya no va girado. */
.phone .screen { position: absolute; inset: 11px; border-radius: 34px; overflow: hidden; background: #000; isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); }
/* El reel es 9:16: se ve ENTERO (contain) bajo la isla, que ya no lo tapa. La pantalla mide 9:16 + 32px de isla (ver aspect-ratio de .phone). */
.phone .screen video { position: absolute; inset: 32px 0 0 0; width: 100%; height: calc(100% - 32px); object-fit: contain; display: block; }
.phone .notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; border-radius: 20px; background: #000; z-index: 2; pointer-events: none; }
.gl-tag { position: absolute; z-index: 3; background: #fff; border-radius: 14px; padding: .7rem .9rem; box-shadow: 0 20px 40px -18px rgba(0,0,0,.35); font-size: .8rem; line-height: 1.3; }
.gl-tag b { display: block; font: 600 1.15rem var(--display); }
.gl-t1 { left: -120px; top: 20%; } .gl-t2 { right: -70px; bottom: 18%; }
.gl-sec { padding: 70px 20px; }
.gl-sec h3 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); text-align: center; margin-bottom: .5rem; }
.gl-sub { text-align: center; color: #6B6258; margin-bottom: 2.2rem; }
.gl-letter { background: #fff; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 60px); max-width: 820px; margin: 0 auto; position: relative;
    box-shadow: 0 40px 90px -50px rgba(0,0,0,.4); }
.gl-letter::before { content: ""; position: absolute; inset: 14px; border: 1px dashed #E2D8C8; border-radius: 16px; pointer-events: none; }
.gl-letter h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin: .8rem 0 1rem; }
.gl-letter p { color: #4A433B; margin-bottom: 1rem; max-width: 62ch; }
.gl-brand { color: var(--brand); }
.gl-sign { font: italic 400 1.8rem var(--display); color: var(--brand); margin-top: 1rem; }
.gl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gl-cards.four { grid-template-columns: repeat(4, 1fr); }
.gl-cards article { background: #fff; border-radius: var(--r); padding: 1.5rem; border-top: 4px solid #1C1917; }
.gl-cards h4 { font: 600 1.05rem var(--sans); margin-bottom: .4rem; }
.gl-cards p { color: #6B6258; font-size: .93rem; }
.gl-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.gl-price { background: #fff; border-radius: var(--r-lg); padding: 2rem 1.6rem; display: flex; flex-direction: column; gap: .4rem; position: relative; }
.gl-price.hot { background: #1C1917; color: #F4EFE6; transform: translateY(-12px); }
.gl-price.hot .gl-muted { color: #A39B8E; }
.gl-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font: 600 .68rem var(--sans);
    letter-spacing: .2em; padding: .35rem .8rem; border-radius: 99px; white-space: nowrap; }
.gl-price h5 { font: 600 .8rem var(--sans); letter-spacing: .26em; text-transform: uppercase; }
.gl-amt { font: 500 3rem/1 var(--display); } .gl-amt small { font: 400 1rem var(--sans); }
.gl-price .btn { margin-top: 1.2rem; justify-content: center; }
.gl-price.hot .btn-soft { color: #F4EFE6; }
.gl-muted { color: #6B6258; } .gl-small { font-size: .88rem; margin-top: 1.4rem; text-align: center; }
.gl-addon { margin: 2rem auto 0; max-width: 820px; display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: var(--r);
    padding: 1.1rem 1.4rem; border: 1px dashed var(--brand); }
.gl-addon b { font: 600 1.4rem var(--display); color: var(--brand); white-space: nowrap; }
.gl-addon p { color: #6B6258; }
.gl-access { text-align: center; }
.gl-form { max-width: 420px; margin: 0 auto; text-align: left; background: #fff; border-radius: var(--r-lg); padding: 1.6rem;
    box-shadow: 0 30px 70px -40px rgba(0,0,0,.4); }
.gl-form .input { background: #FBF8F2; border-color: #D9CFBF; color: #1C1917; }
.gl-form .btn { width: 100%; justify-content: center; }
.survey { color: #1C1917; display: grid; gap: 1rem; }
.survey fieldset { border: 1px solid #D9CFBF; border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .45rem; margin: 0; }
.survey legend { padding: 0 .4rem; }
.survey label { display: flex; gap: .55rem; align-items: center; cursor: pointer; }
.survey label.stack { display: grid; gap: .4rem; }
.survey textarea { width: 100%; }
.gl .alert { color: #7a1c1c; }
.gl-foot { padding: 34px 20px; border-top: 1px solid #DDD3C3; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
    font-size: .85rem; color: #6B6258; }

/* ───────── Portal ───────── */
.agency-card { padding: .8rem; border-radius: var(--r); background: color-mix(in srgb, var(--brand) 16%, var(--ink-3));
    border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.agency-card b { display: block; } .agency-card small { color: var(--muted); font-size: .74rem; word-break: break-all; }
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.vid { border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.vid video { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; }
.vid-meta { padding: .7rem .9rem; background: var(--ink-2); display: flex; justify-content: space-between; gap: .6rem; font-size: .85rem; }
.vid-meta a { color: var(--muted); }
.agency-logo { height: 70px; width: auto; border-radius: 10px; padding: 6px; }

/* ───────── Portal: encargos, asistente, catálogo ───────── */
.brand-i { color: var(--brand); filter: brightness(1.35); }
.logout { margin-top: .6rem; }
.credits .bar { height: 8px; border-radius: 9px; background: var(--ink); margin: .6rem 0 .4rem; overflow: hidden; }
.credits .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--amber)); }
.reel { display: grid; gap: 14px; }
.job { display: grid; grid-template-columns: 86px 1fr; gap: 18px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--ink-3); border: 1px solid var(--line); }
.job-thumb { width: 86px; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--ink); }
.job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.job h3 { font-size: 1.02rem; font-weight: 600; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: .9rem; position: relative; }
.strip::before { content: ""; position: absolute; left: 12px; right: 12px; top: 11px; height: 2px; background: var(--line); }
.strip .st { position: relative; display: grid; justify-items: start; gap: .35rem; font-size: .72rem; color: var(--muted); }
.strip .st i { width: 24px; height: 24px; border-radius: 6px; background: var(--ink); border: 2px solid var(--line); z-index: 1; }
.strip .st.done i { background: var(--brand); border-color: var(--brand); }
.strip .st.now i { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px color-mix(in srgb, var(--amber) 25%, transparent); animation: pulse 1.6s infinite; }
.strip .st.now { color: var(--text); font-weight: 600; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px transparent; } }
.steps { display: flex; gap: .5rem; flex-wrap: wrap; }
.steps button { padding: .5rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: .85rem; }
.steps button.on { border-color: var(--brand); color: var(--text); background: color-mix(in srgb, var(--brand) 18%, transparent); }
.steps button.ok { color: var(--ok); }
.wizard-nav { display: flex; justify-content: space-between; gap: 1rem; }
.drop { position: relative; display: block; border: 1.5px dashed var(--line); border-radius: var(--r); padding: 1.6rem; text-align: center; color: var(--muted); cursor: pointer; margin: 1rem 0; }
.drop b { color: var(--text); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.small-drop { padding: .9rem; }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.asset { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--ink-3); }
.asset img, .asset-icon { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: grid; place-items: center; font-size: 1.6rem; }
.asset small { display: block; padding: .3rem .5rem; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.asset-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chip { padding: .5rem .9rem; border-radius: 99px; border: 1px solid var(--line); font-size: .85rem; background: var(--ink-3); color: var(--text); }
.chip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.chip-input { width: 130px; min-width: 0; flex: none; padding: .45rem .8rem; border-radius: 99px; }
.comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: .8rem; }
.comps.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.comp { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; position: relative; cursor: pointer; }
.comp iframe { width: 100%; aspect-ratio: 9/16; border: 0; display: block; pointer-events: none; background: #111; }
.comp.sel { outline: 3px solid var(--brand); outline-offset: 2px; }
.comp p { padding: .55rem .7rem; font-size: .76rem; line-height: 1.3; background: var(--ink-2); }
.comp .own { position: absolute; top: 8px; left: 8px; z-index: 1; font: 600 .6rem var(--sans); letter-spacing: .14em; background: var(--brand); color: #fff; padding: .2rem .45rem; border-radius: 6px; }
.ai { background: radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--amber) 22%, transparent), transparent 55%), var(--ink-3);
    border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line)); border-radius: var(--r-lg); padding: 20px; display: grid; gap: .7rem; }
.ai h3, .summary h3 { font: 500 1.35rem var(--display); }
.ai input[type=range] { width: 100%; accent-color: var(--amber); }
.summary { display: grid; gap: .8rem; align-content: start; }
.lines { font-size: .88rem; display: grid; gap: .35rem; color: var(--muted); }
.lines div { display: flex; justify-content: space-between; gap: 1rem; }
.total { display: flex; justify-content: space-between; align-items: end; padding-top: .8rem; border-top: 1px dashed var(--line); }
.total b { font: 500 2.2rem/1 var(--display); }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .8rem; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pack { padding: 1.4rem; border-radius: var(--r-lg); background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: .5rem; align-content: start; }
.pack.hot { border-color: var(--brand); }
.pack h5 { font: 600 .75rem var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.pack .amt { font: 500 2.4rem/1 var(--display); } .pack .amt small { font: 400 .9rem var(--sans); color: var(--muted); }
.ai-strip { margin-top: 14px; padding: 1rem 1.2rem; border-radius: var(--r); border: 1px dashed var(--amber); color: var(--muted); }
.ai-strip b { color: var(--amber); font: 600 1.2rem var(--display); margin-right: .6rem; }

@media (max-width: 900px) {
    .gl-hero { grid-template-columns: 1fr; }
    .gl-tag { display: none; }
    .gl-cards, .gl-cards.four, .gl-prices { grid-template-columns: 1fr; }
    .gl-price.hot { transform: none; }
    .gl-addon { flex-direction: column; align-items: flex-start; }
    .grid2, .mail-grid { grid-template-columns: 1fr; }
    .gift { grid-template-columns: 1fr; }
}

/* ───────── Panel (Admin y Portal): Drawer móvil moderno ───────── */
@media (max-width: 860px) {
    .app { display: block; width: 100%; min-width: 0; }
    .mobile-bar {
        display: flex; justify-content: space-between; align-items: center;
        height: 56px; padding: 0 16px; position: sticky; top: 0; z-index: 45;
        background: color-mix(in srgb, var(--ink-2) 96%, #000);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
    }
    .mobile-bar-right { display: flex; align-items: center; gap: .6rem; }
    .agency-pill {
        padding: .25rem .65rem; border-radius: 99px; font-size: .78rem; font-weight: 600;
        background: color-mix(in srgb, var(--brand) 18%, var(--ink-3));
        border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); color: var(--text);
    }
    .burger-btn {
        display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px;
        border: 1px solid var(--line); background: var(--ink-3); color: var(--text); cursor: pointer;
    }
    .nav-backdrop {
        display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .7);
        backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s ease;
    }
    .side {
        position: fixed; inset: 0 auto 0 0; width: 280px; max-width: 85vw; height: 100vh; height: 100dvh;
        background: var(--ink-2); z-index: 60; transform: translateX(-100%);
        transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .8); border-right: 1px solid var(--line);
        display: flex; flex-direction: column; gap: 1.2rem; padding: 18px 16px; overflow-y: auto;
    }
    .side .close-btn {
        display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
        border: 1px solid var(--line); background: var(--ink-3); color: var(--muted); cursor: pointer;
    }
    .nav-toggle:checked ~ .nav-backdrop { opacity: 1; pointer-events: auto; }
    .nav-toggle:checked ~ .side { transform: translateX(0); }

    .main { padding: 20px 16px 60px; gap: 20px; min-width: 0; width: 100%; }
    .hello { gap: .6rem; align-items: flex-start; }
    .hello h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .funnel-col { min-height: auto; min-width: 0; }
    .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tbl { min-width: 440px; font-size: .82rem; }
    .tbl th { font-size: .64rem; padding: .5rem .45rem; white-space: nowrap; }
    .tbl td { padding: .65rem .45rem; }
}

@media (max-width: 600px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .kpi { padding: 12px 14px; min-width: 0; }
    .kpi b { font-size: 1.7rem; }
    .kpi small { font-size: .72rem; }
    .funnel { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .board { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .contact { grid-template-columns: 1fr; gap: .4rem; }
    .contact.new { grid-template-columns: 1fr; }
    .job { grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .job-thumb { width: 74px; }
    .strip { gap: 4px; margin-top: .7rem; }
    .strip .st { font-size: .65rem; }
    .strip .st i { width: 18px; height: 18px; border-radius: 4px; }
    .strip::before { top: 9px; left: 8px; right: 8px; }
    .vids { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .steps { gap: .35rem; }
    .steps button { padding: .4rem .75rem; font-size: .78rem; }
    .import-row { flex-direction: column; }
    .wizard-nav { flex-wrap: wrap; gap: .6rem; }
    .wizard-nav .btn { flex: 1; justify-content: center; }
    .card { padding: 16px; border-radius: var(--r); }
}

/* ───────── Gemma AI Loader Widget ───────── */
.ai-loader-card {
    display: flex; gap: 16px; align-items: center; padding: 16px 20px;
    border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(168,85,247,.12), rgba(245,158,11,.1));
    border: 1px solid rgba(168,85,247,.35); box-shadow: 0 10px 30px -10px rgba(168,85,247,.25);
    margin: 1rem 0; position: relative; overflow: hidden;
}
.ai-loader-card::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
    animation: ai-shimmer 2.2s infinite; pointer-events: none;
}
@keyframes ai-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.ai-loader-aura { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.ai-loader-spinner {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2.5px solid rgba(168,85,247,.2); border-top-color: #a855f7; border-right-color: #f59e0b;
    animation: ai-spin .9s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-loader-sparkles { font-size: 1.2rem; color: #fbbf24; animation: ai-pulse 1.4s ease-in-out infinite alternate; }
.ai-loader-icon { display: grid; place-items: center; color: #fbbf24; animation: ai-pulse 1.4s ease-in-out infinite alternate; }
.bot-copilot-svg { stroke-width: 2.2; filter: drop-shadow(0 0 6px rgba(251,191,36,.5)); }
@keyframes ai-pulse { from { transform: scale(.88); opacity: .75; } to { transform: scale(1.12); opacity: 1; } }
.ai-loader-content { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ai-loader-header { display: flex; align-items: center; gap: 8px; }
.ai-loader-badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #d8b4fe; }
.ai-loader-pulse { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; animation: ai-dot 1.2s infinite alternate; }
@keyframes ai-dot { from { opacity: .4; } to { opacity: 1; } }
.ai-loader-title { font-size: 1.02rem; font-weight: 600; color: var(--text); margin: 0; }
.ai-loader-bar { width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.ai-loader-bar-fill {
    height: 100%; width: 40%; border-radius: 99px;
    background: linear-gradient(90deg, #a855f7, #f59e0b);
    animation: ai-indeterminate 1.6s ease-in-out infinite;
}
@keyframes ai-indeterminate {
    0% { transform: translateX(-100%); width: 25%; }
    50% { transform: translateX(120%); width: 55%; }
    100% { transform: translateX(300%); width: 25%; }
}
.ai-loader-sub { font-size: .78rem; color: var(--muted); margin: 0; }

@media (max-width: 480px) {
    .btn { padding: .75rem 1.1rem; font-size: .9rem; }
    .hello .btn { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
    .kpis { grid-template-columns: 1fr; }
    .job { grid-template-columns: 1fr; }
    .job-thumb { width: 100%; aspect-ratio: 16 / 9; }
    .hello h1 { font-size: 1.6rem; }
}

.gl-contact { margin-top: .4rem; font-size: .92rem; } .gl-contact a { color: var(--brand); font-weight: 600; text-decoration: none; }
.side-wa { display: block; margin-top: .8rem; font-size: .78rem; color: var(--muted); text-decoration: none; } .side-wa:hover { color: var(--text); }

/* ───────── Microsite: efecto "espectacular" ───────── */
.pf-hero-media { position: relative; display: grid; place-items: center; isolation: isolate; min-height: 520px; }
.pf-hero-media::before { content: ""; position: absolute; inset: -12%; z-index: -2; filter: blur(30px);
    background: radial-gradient(closest-side, color-mix(in srgb, var(--amber) 38%, transparent), transparent); }
.pf-phone { width: min(290px, 62vw); aspect-ratio: 9 / 19.5; padding: 10px; border-radius: 44px; background: #0B0A09; border: 1px solid var(--line);
    box-shadow: 0 0 0 2px #2A2621, 0 40px 90px -30px color-mix(in srgb, var(--amber) 55%, #000); animation: pf-float 7s ease-in-out infinite; }
.pf-phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; display: block; }
.pf-float { position: absolute; z-index: -1; width: 44%; border-radius: var(--r); border: 1px solid var(--line); opacity: .6; filter: saturate(.8); box-shadow: 0 30px 60px -30px #000; }
.pf-float.a { left: -4%; bottom: 6%; rotate: -8deg; } .pf-float.b { right: -8%; top: 4%; rotate: 6deg; }
@keyframes pf-float { 50% { transform: translateY(-12px) rotate(.6deg); } }
.film { animation: pf-roll linear both; animation-timeline: scroll(root); }
@keyframes pf-roll { to { background-position: 400px 4px, 0 0; } }
@media (prefers-reduced-motion: no-preference) { @supports (animation-timeline: view()) {
    .pf-sec > *, .pf-contact { animation: pf-in both ease-out; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes pf-in { from { translate: 0 24px; } } } }
@media (prefers-reduced-motion: reduce) { .pf-phone, .film { animation: none; } }
.pf-do { counter-reset: s; }
.pf-do li { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.2rem 0 0; counter-increment: s; }
.pf-do li::before { content: "0" counter(s); font: italic 400 2.6rem/1 var(--display); color: var(--amber); }
.pf-do b { font-size: 1.05rem; }
.pf-sites a { position: relative; } .pf-sites a:first-child b { font: 500 1.5rem var(--display); }
.pf-reel video { border-radius: 26px; box-shadow: 0 30px 60px -30px #000; transition: transform .4s, box-shadow .4s; }
.pf-reel:hover video { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 30px 70px -25px color-mix(in srgb, var(--amber) 50%, #000); }
.pf-also { display: grid; gap: 1.2rem 2rem; list-style: none; width: 100%; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pf-also li { display: grid; gap: .3rem; padding-top: .9rem; border-top: 1px solid var(--line); } .pf-also span { color: var(--muted); font-size: .9rem; }
.pf-contact { display: grid; gap: 1.4rem; justify-items: start; margin-block: clamp(24px, 5vw, 56px); padding: clamp(28px, 6vw, 64px);
    border-radius: var(--r-lg); background: var(--amber); color: #1A1714; }
.pf-contact h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); max-width: 20ch; } .pf-contact .display i { color: #1A1714; opacity: .72; }
.btn-ink { background: #1A1714; color: var(--amber-2); } .btn-ink-ghost { border: 1.5px solid #1A1714; color: #1A1714; }
.pf-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-weight: 600; } .pf-links a { color: #1A1714; }
@media (max-width: 860px) { .pf-hero { grid-template-columns: 1fr; } .pf-hero-media { order: -1; min-height: 420px; } .pf-float { display: none; }
    .pf-sites a:first-child { grid-column: auto; }
    .pf-reels { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; } .pf-reel { scroll-snap-align: center; } }
.pf-sec > * { min-width: 0; max-width: 100%; }
.pf { overflow-x: clip; }

/* Voz, pagos e incidencias */
.job.voice { grid-template-columns: 1fr auto; } .job.voice audio { width: 100%; max-width: 360px; margin-top: .4rem; height: 36px; }
.kind-opt { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; align-items: start; padding: .8rem 1rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-3); cursor: pointer; margin-bottom: .6rem; }
.pay-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; width: 100%; }
.pay-form .input { flex: 1 1 120px; min-width: 0; padding: .5rem .7rem; }
.pay-form .btn { flex: none; }
@media (max-width: 480px) {
    .pay-form { flex-direction: column; align-items: stretch; }
    .pay-form .input, .pay-form .btn { width: 100%; justify-content: center; }
}

/* Voces extra, estilos de visuales y entregas de imágenes */
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; margin-top: .6rem; }
.voice-mini { display: grid; gap: .35rem; padding: .7rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-3); justify-items: start; }
.voice-mini audio { width: 100%; height: 32px; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.style-card { display: grid; gap: .25rem; justify-items: start; padding: .5rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-3); }
.style-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.img-grid figure { display: grid; gap: .3rem; margin: 0; } .img-grid img { width: 100%; border-radius: 10px; display: block; }
.gl-gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px; }
.gl-gallery figure { flex: 0 0 min(300px, 78%); scroll-snap-align: center; margin: 0; display: grid; gap: .5rem; justify-items: center; }
.gl-gallery img { width: 100%; border-radius: 14px; display: block; box-shadow: 0 18px 40px -22px #000; }

/* ───────── Demo chat (fase 9): el chat conserva los colores de WhatsApp ───────── */
.dc { display: grid; gap: 1.2rem; width: 100%; min-width: 0; }
.dc-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.dc-ficha { border: 1px solid var(--line); background: var(--ink-3); border-radius: var(--r-lg); overflow: hidden; }
.dc-photo { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 3rem; background: linear-gradient(135deg, #3b6f8f, #e8a33d); }
.dc-ficha-body { display: grid; gap: .4rem; padding: 1rem; }
.dc-price { font: 500 1.6rem var(--display); color: var(--amber-2); }
.dc-ficha ul { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; }
.dc-ficha li { font-size: .8rem; padding: .15rem .55rem; border: 1px solid var(--line); border-radius: 99px; }
.dc-ficha small { color: var(--muted); font-size: .75rem; }
.dc-main { display: grid; gap: 1rem; min-width: 0; }
.dc-chat { display: grid; grid-template-rows: auto auto 1fr auto auto auto; border-radius: var(--r-lg); overflow: hidden; background: #efeae2; color: #111; border: 1px solid var(--line); max-width: 560px; width: 100%; }
.dc-head { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; background: #075e54; color: #fff; }
.dc-head div { flex: 1; min-width: 0; display: grid; line-height: 1.25; } .dc-head small { opacity: .8; font-size: .72rem; }
.dc-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff3; display: grid; place-items: center; }
.dc-badge { font: 600 .65rem var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: .25rem .5rem; border-radius: 99px; background: #25d366; color: #053b33; }
.dc-warn { background: #fff3bf; color: #5c4a00; font-size: .78rem; padding: .45rem .9rem; }
.dc-body { height: 340px; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .45rem; }
.dc-msg { max-width: 82%; padding: .45rem .65rem; border-radius: 10px; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; box-shadow: 0 1px 1px #0002; }
.dc-msg time { display: block; text-align: right; font-size: .65rem; color: #667781; margin-top: .1rem; }
.dc-bot { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.dc-user { background: #d9fdd3; align-self: flex-end; border-top-right-radius: 2px; }
.dc-sys { align-self: center; max-width: 92%; background: #fff3bf; color: #5c4a00; font-size: .8rem; text-align: center; }
.dc-typing { display: grid; gap: .2rem; } .dc-wait { color: #667781; font-size: .72rem; }
.dc-dots { display: inline-flex; gap: 4px; } .dc-dots i { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: dc-bounce 1.2s infinite ease-in-out; }
.dc-dots i:nth-child(2) { animation-delay: .15s; } .dc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dc-bounce { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) { .dc-dots i { animation: none; opacity: .6; } }
.dc-lead { align-self: stretch; background: #fff; border-left: 4px solid #25d366; border-radius: 8px; padding: .7rem .8rem; font-size: .88rem; box-shadow: 0 1px 2px #0003; }
.dc-lead p { margin-top: .2rem; }
.dc-cta { padding: .6rem .9rem; background: #fff; font-size: .85rem; text-align: center; } .dc-cta a { color: #075e54; font-weight: 600; }
.dc-cta[hidden] { display: none; }
.dc-foot { display: flex; gap: .5rem; padding: .6rem; background: #f0f2f5; }
.dc-input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: .6rem .9rem; border: 0; border-radius: 99px; background: #fff; color: #111; }
.dc-send { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #075e54; color: #fff; }
.dc-send:disabled, .dc-input:disabled { opacity: .55; cursor: not-allowed; }
.dc-meta { display: flex; justify-content: space-between; padding: .2rem .9rem .5rem; background: #f0f2f5; color: #667781; font-size: .75rem; }
.dc-chips { display: grid; gap: .5rem; max-width: 560px; }
.dc-chip { text-align: left; display: grid; gap: .15rem; padding: .6rem .9rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-3); color: var(--text); }
.dc-chip:hover { border-color: var(--amber); } .dc-chip small { font: 600 .65rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.dc-waiting .dc-chip { opacity: .6; pointer-events: none; }
.dc-pitch-cta { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; color: var(--muted); }
.dc-how { display: grid; gap: .5rem; padding-left: 1.2rem; max-width: 60ch; }
@media (max-width: 760px) { .dc-grid { grid-template-columns: minmax(0, 1fr); } .dc-body { height: 300px; } .dc-photo { aspect-ratio: 16 / 5; font-size: 2rem; } }

/* ── Editor de planos (asistente de encargo) ── */
.import-row { display: flex; gap: 8px; }
.import-row .input { flex: 1; min-width: 0; }
.shots-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.shots { list-style: none; padding: 0; margin: .6rem 0 1rem; display: grid; gap: 10px; }
.shot { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-3); }
.shot-n { color: var(--muted); font-size: .8rem; }
.shot-thumb { width: 84px; aspect-ratio: 9/16; overflow: hidden; border-radius: 10px; background: #000; }
.shot-thumb.h { width: 150px; aspect-ratio: 16/9; }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; animation: 3.2s ease-in-out infinite alternate; }
.shot-fields { display: grid; gap: 6px; min-width: 0; }
.shot-fields small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-ai { display: flex; gap: 6px; align-items: center; font-size: .85rem; }
.shot-move { display: flex; flex-direction: column; gap: 4px; }
.shot-move button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.shot-move button:disabled { opacity: .3; cursor: default; }
.carousel-ed { margin-top: 1.4rem; }
.cs-row { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); }
.cs-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-head { display: flex; align-items: center; gap: 8px; }
.cs-head .shot-move { margin-left: auto; }
.cs-photos { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.cs-photos button { flex: none; width: 48px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.cs-photos button.on { border-color: var(--amber); }
.cs-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pill { font: 500 .65rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.pill.ai { color: #D8CFFF; border-color: rgba(185,166,255,.6); }
.pill.edited { color: var(--ok); border-color: rgba(111,207,151,.6); }
.cs-prev { position: relative; flex: none; width: 168px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #221F1B; color: #F4EFE6; border: 1px solid var(--line); }
.cs-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cs-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,14,12,.9), rgba(15,14,12,.15) 70%); }
.cs-body { position: absolute; inset: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; box-sizing: border-box; }
.cs-hook { justify-content: space-between; }
.cs-close { justify-content: center; align-items: center; text-align: center; background: rgba(15,14,12,.55); }
.cs-tag { align-self: flex-start; font: 500 .45rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; border-radius: 999px; background: rgba(15,14,12,.7); border: 1px solid rgba(244,239,230,.35); }
.cs-close .cs-tag { align-self: center; border: 0; background: none; color: var(--muted); }
.cs-title { display: block; font: 500 1.05rem/1.05 var(--display); }
.cs-hook .cs-title { font-size: 1.25rem; }
.cs-num { font: 500 2rem/.9 var(--display); color: var(--cs-accent); }
.cs-text { display: block; font-size: .6rem; line-height: 1.35; margin-top: 4px; }
.cs-next { display: block; margin-top: 6px; font-size: .55rem; font-weight: 600; color: var(--cs-accent); }
.cs-cta { padding: 4px 10px; border-radius: 999px; background: var(--cs-accent); color: #0F0E0C; font-weight: 600; font-size: .6rem; }
.shot-comp { display: flex; gap: 6px; }
.shot-comp select { flex: 1; min-width: 0; }
.shot-fields textarea { resize: vertical; font-size: .9rem; }
.shot-picker { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-3); }
.shot .narr { white-space: normal; font-style: italic; }
/* Vista previa del movimiento elegido sobre la miniatura (la imagen va al revés que la cámara) */
.mv-dolly_in { animation-name: mv-in; }
.mv-dolly_out { animation-name: mv-out; }
.mv-pan_left { animation-name: mv-pl; }
.mv-pan_right { animation-name: mv-pr; }
.mv-tilt_up { animation-name: mv-tu; }
.mv-tilt_down { animation-name: mv-td; }
@keyframes mv-in { from { transform: scale(1); } to { transform: scale(1.25); } }
@keyframes mv-out { from { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes mv-pl { from { transform: scale(1.25) translateX(-8%); } to { transform: scale(1.25) translateX(8%); } }
@keyframes mv-pr { from { transform: scale(1.25) translateX(8%); } to { transform: scale(1.25) translateX(-8%); } }
@keyframes mv-tu { from { transform: scale(1.25) translateY(-8%); } to { transform: scale(1.25) translateY(8%); } }
@keyframes mv-td { from { transform: scale(1.25) translateY(8%); } to { transform: scale(1.25) translateY(-8%); } }
@media (prefers-reduced-motion: reduce) { .shot-thumb img { animation: none; } }
@media (max-width: 600px) {
  .shot { grid-template-columns: auto auto 1fr; }
  .shot-move { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}
.shot.plan { grid-template-columns: auto auto 1fr; }
.built { margin: .6rem 0 0; padding-left: 1.4rem; display: grid; gap: .55rem; }
.built li span { display: block; }

/* ── Importar ficha (paso 1) ── */
.import-hero { border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--ink-3));
  border-radius: var(--r-lg); padding: 1.1rem 1.2rem 1rem; margin-bottom: 1.4rem; display: grid; gap: .8rem; }
.import-hero-head { display: flex; gap: .9rem; align-items: flex-start; }
.import-hero-head b { display: block; font-size: 1.05rem; margin-bottom: .15rem; }
.import-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.import-row .btn { white-space: nowrap; }
.import-progress { margin: 0; }
.import-result { border-top: 1px solid var(--line); padding-top: .8rem; display: grid; gap: .7rem; }
.ir-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ir-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .3rem 1.2rem; font-size: .88rem; }
.ir-list li { padding-left: 1.3rem; position: relative; }
.ir-list li::before { position: absolute; left: 0; font-weight: 700; }
.ir-list li.ok::before { content: "✓"; color: var(--ok); }
.ir-list li.no { color: var(--muted); }
.ir-list li.no::before { content: "–"; color: var(--warn); }
.ir-thumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ir-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ir-more { font-size: .8rem; color: var(--muted); padding: 0 .4rem; }
@media (max-width: 600px) { .import-row { flex-direction: column; } }

/* ───────── Rediseño Asistente de Encargos (10.13) ───────── */
.note.warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.note.ai-run { border-color: rgba(185,166,255,.5); background: rgba(185,166,255,.1); color: #D8CFFF; }
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 1rem; }
.kind-card, .tone-card { display: grid; gap: .2rem; text-align: left; min-height: 44px; padding: .8rem 1rem; border-radius: var(--r); border: 1px solid var(--line); background: transparent; color: var(--text); }
.kind-card small, .tone-card small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.kind-card.on, .tone-card.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.tones { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.more { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.more summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.sum-label { font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 1.2rem 0 .5rem; }
.sum-hero { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--ink-3); }
.sum-hero img, .sum-hero-empty { flex: none; width: 84px; height: 84px; border-radius: var(--r); object-fit: cover; display: grid; place-items: center; background: var(--ink); font-size: 1.8rem; color: var(--muted); }
.sum-hero > div { display: grid; gap: .2rem; min-width: 0; justify-items: start; }
.sum-title { font: 500 1.25rem/1.15 var(--display); }
.sum-facts { color: var(--amber-2); font-weight: 600; font-size: .88rem; }
.sum-photos-head { display: flex; justify-content: space-between; align-items: baseline; }
.sum-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-bottom: .4rem; }
.ph { position: relative; aspect-ratio: 1; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid var(--amber); background: var(--ink); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.off { border-color: transparent; opacity: .4; }
.ph-ok { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--amber); color: var(--ink); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.field.narrow { max-width: 280px; }
.voice-now { display: grid; gap: .3rem; margin-top: .5rem; } .voice-now audio { width: min(100%, 320px); height: 36px; }
.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.fork { display: grid; gap: 8px; margin-top: 1rem; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--ink) 70%, transparent); z-index: 5; }
.fork-main { display: grid; justify-items: center; gap: 1px; min-height: 58px; border-radius: var(--r); }
.fork-main b { font-size: 1.02rem; } .fork-main small { font-size: .78rem; font-weight: 500; opacity: .9; }
.fork-alt { justify-content: center; min-height: 48px; border-radius: var(--r); }
/* editor plano a plano */
.ed-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ed { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ed-view { display: grid; gap: 10px; justify-items: center; position: sticky; top: 12px; }
.ed-stage { position: relative; width: 100%; overflow: hidden; border-radius: 16px; background: var(--ink); border: 1px solid var(--line); }
.ed-stage.portrait { max-width: 300px; aspect-ratio: 9 / 16; }
.ed-stage.landscape { aspect-ratio: 16 / 9; }
.ed-stage img, .ed-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: 3.2s ease-in-out infinite alternate; }
/* El grafismo está medido para 1080×1920: se pinta a 3× y se reduce, si no a 220 px el texto se sale del cuadro */
.ed-stage iframe { position: absolute; left: 0; top: 0; width: 300%; height: 300%; border: 0; background: transparent; transform: scale(calc(1 / 3)); transform-origin: 0 0; }
.ed-auto { position: absolute; left: 12px; right: 12px; bottom: 16px; padding: 10px; border: 1px dashed rgba(244,239,230,.6); border-radius: 10px; background: rgba(15,14,12,.45); text-align: center; font-size: .78rem; color: #F4EFE6; }
.ed-auto.clean { border-color: rgba(255,255,255,.2); color: var(--muted); }
.ed-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ed-tools .btn { padding: .55rem .9rem; min-height: 44px; }
.ed-tools .bad-line { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.ed-panel { display: grid; gap: .2rem; min-width: 0; }
.ed-panel .field { margin: .6rem 0; }
.ed-label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.comp-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: .4rem; }
.comp-mode-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .65rem .6rem;
    font-size: .82rem; font-weight: 500; border: 1px solid var(--line); border-radius: var(--r);
    background: var(--ink-3); color: var(--text); cursor: pointer; text-align: center; transition: all .15s ease;
}
.comp-mode-btn span { font-size: .95rem; opacity: .8; }
.comp-mode-btn:hover { border-color: var(--amber); }
.comp-mode-btn.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, var(--ink-3)); color: #fff; font-weight: 600; box-shadow: 0 0 0 1px var(--brand); }
.comp-hint { margin-top: .5rem; line-height: 1.4; }
.comp-picker-box {
    margin-top: .75rem; padding: 12px; border: 1px solid var(--line); border-radius: var(--r);
    background: color-mix(in srgb, var(--ink-3) 70%, var(--ink)); display: grid; gap: 10px;
}
.comp-cats { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.comp-cats::-webkit-scrollbar { display: none; }
.comp-cat-tab {
    display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; padding: .35rem .65rem;
    font-size: .78rem; border-radius: 99px; border: 1px solid var(--line); background: var(--ink-2);
    color: var(--muted); cursor: pointer; transition: all .15s ease;
}
.comp-cat-tab:hover { color: var(--text); border-color: var(--muted); }
.comp-cat-tab.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--text); font-weight: 600; }
.comp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; max-height: 230px; overflow-y: auto; padding-right: 4px; }
.comp-card {
    display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--ink-2); color: var(--text);
    cursor: pointer; transition: all .15s ease;
}
.comp-card:hover { border-color: var(--amber); }
.comp-card.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--ink-2)); box-shadow: 0 0 0 1px var(--brand); }
.comp-card-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.comp-card-head b { font-size: .84rem; line-height: 1.2; }
.comp-check { color: var(--brand); font-weight: bold; font-size: .85rem; }
.comp-card small { font-size: .72rem; line-height: 1.3; }
.steps { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1.2rem; }
.steps::-webkit-scrollbar { display: none; }
.steps button { padding: .5rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: var(--ink-2); color: var(--muted); font-size: .84rem; white-space: nowrap; cursor: pointer; transition: all .15s ease; }
.steps button:hover { color: var(--text); border-color: var(--muted); }
.steps button.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, var(--ink-2)); color: #fff; font-weight: 600; }
.steps button.ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); color: var(--ok); }
.kind-card b { font-size: 1.05rem; }
.kind-card .price-tag { color: var(--amber-2); font-weight: 600; font-size: .88rem; margin-top: .15rem; }
.ed-top-nav { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.ed-pager { display: inline-flex; align-items: center; gap: .5rem; }
.ed-strip-top { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.ed-strip-top .ed-th { width: 52px; }
.ed-strip-top .ed-th.h { width: 92px; }
.ed-view { position: sticky; top: 12px; z-index: 10; }
.ed-picker { grid-column: 1 / -1; }
.ed-th { position: relative; flex: none; width: 46px; aspect-ratio: 9 / 16; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--ink); cursor: pointer; }
.ed-th.h { width: 90px; aspect-ratio: 16 / 9; }
.ed-th.on { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber); }
.ed-th img { width: 100%; height: 100%; object-fit: cover; }
.ed-n { position: absolute; left: 4px; bottom: 2px; font: 500 .62rem var(--mono); color: #F4EFE6; text-shadow: 0 1px 2px #000; }
/* hoja inferior de confirmación */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 50; }
.sheet { position: fixed; left: 50%; bottom: 0; translate: -50% 0; width: min(560px, 100%); z-index: 51; display: grid; gap: 14px;
    padding: 22px 20px 24px; background: var(--ink-2); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 90vh; overflow-y: auto; }
.sheet h2 { font-size: 1.7rem; }
.sheet .lines b { color: var(--text); font-weight: 600; text-align: right; }
.sheet .row { flex-wrap: nowrap; } .sheet-go { flex: 1; justify-content: center; min-height: 52px; }
@media (max-width: 760px) {
    .kinds { grid-template-columns: minmax(0, 1fr); }
    .tones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs-row { flex-direction: column; } .cs-prev { width: min(220px, 70%); } .cs-fields { width: 100%; min-width: 0; }
    .tone-card:not(.on) small { display: none; }
    .ed { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .ed-view { position: static; width: 100%; }
    .ed-stage.portrait { max-width: min(240px, 100%); }
    .comp-modes { grid-template-columns: 1fr; }
    .ed-top-nav { flex-direction: column; align-items: stretch; gap: .6rem; }
    .ed-top-nav .ed-pager { justify-content: space-between; width: 100%; }
}
@media (max-width: 480px) {
    .tones { grid-template-columns: minmax(0, 1fr); }
    .sheet { padding: 18px 14px 20px; }
    .sheet .row { flex-wrap: wrap; }
    .sum-hero { flex-direction: column; align-items: flex-start; }
    .sum-hero img, .sum-hero-empty { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .ed-stage img { animation: none; } }

/* ───────── Demo chat: importar un piso por enlace, fotos en el chat ───────── */
.dc-import { display: grid; gap: .5rem; padding: 1rem; border: 1px dashed var(--amber); border-radius: var(--r-lg); background: var(--ink-3); }
.dc-import-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.dc-url { flex: 1 1 260px; min-width: 0; font: inherit; font-size: 16px; padding: .65rem .9rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink); color: var(--text); }
.dc-import-status { color: var(--muted); min-height: 1.2em; }
.dc-photo { overflow: hidden; }
.dc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-where { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dc-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .3rem; margin-top: .35rem; }
.dc-imgs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.dc-msg:has(.dc-imgs) { max-width: 92%; }

/* ───────── Home: bloque único de inmobiliarias ───────── */
.pf-realestate { background: linear-gradient(180deg, var(--ink-3), transparent 70%); border-radius: var(--r-lg); padding-inline: clamp(16px, 3vw, 36px); border: 1px solid var(--line); }
.pf-h3 { font: 500 1.35rem var(--display); color: var(--amber-2); margin-top: .8rem; }
.pf-h3 small { font: 600 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: .6rem; }

/* ───────── Home: cabecera con navegación y bloque grande de inmobiliarias ───────── */
.pf-nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.pf-nav a { color: var(--muted); text-decoration: none; } .pf-nav a:hover { color: var(--text); }
.pf-nav .pf-nav-hot { color: var(--amber-2); font-weight: 600; padding: .35rem .8rem; border: 1px solid var(--amber); border-radius: 99px; }
.pf-nav .pf-nav-hot:hover { background: var(--amber); color: #1a1208; }
.pf-re { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 56px); align-items: center; margin-block: clamp(36px, 6vw, 72px);
  padding: clamp(24px, 5vw, 64px); border: 1px solid var(--amber); border-radius: var(--r-lg);
  background: radial-gradient(120% 120% at 100% 0%, #e8a33d33, transparent 60%), linear-gradient(180deg, var(--ink-3), var(--ink-2)); }
.pf-re-text { display: grid; gap: 1.1rem; justify-items: start; min-width: 0; }
.pf-re h2 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; }
.pf-re-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.pf-re-list li { display: contents; }
.pf-re-list a, .pf-re-list span { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 99px; font-size: .88rem; color: var(--text); text-decoration: none; background: var(--ink-3); transition: border-color .15s, color .15s, background .15s, transform .15s; }
.pf-re-list a:hover { border-color: var(--amber); color: var(--amber-2); background: color-mix(in srgb, var(--amber) 12%, var(--ink-3)); transform: translateY(-2px); }
.pf-re-cta { font-size: 1.05rem; padding: .95rem 1.6rem; }
.pf-re-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; transform: rotate(2deg); }
.pf-re-media img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; border-radius: 14px; box-shadow: 0 14px 40px #0008; }
.pf-re-media img:nth-child(even) { translate: 0 22px; }
@media (max-width: 860px) { .pf-re { grid-template-columns: minmax(0, 1fr); } .pf-re-media { transform: none; max-width: 420px; } .pf-nav a:not(.pf-nav-hot) { display: none; } .pf-head { gap: .6rem; flex-wrap: wrap; } }

/* ───────── Muestras de imágenes: miniaturas con su formato y visor a tamaño completo (sin JS) ───────── */
.pf-h4 { font: 600 1rem var(--sans); margin-top: .4rem; } .pf-h4 small { font-weight: 400; color: var(--muted); margin-left: .5rem; }
.pf-samples { display: grid; gap: 16px; width: 100%; }
.pf-s-historias { grid-template-columns: repeat(3, minmax(0, 260px)); }
.pf-s-carrusel { grid-template-columns: repeat(3, minmax(0, 340px)); }
.pf-sample { display: grid; gap: .3rem; text-decoration: none; color: var(--text); padding: .5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-3); transition: border-color .2s, translate .2s; }
.pf-sample:hover { border-color: var(--amber); translate: 0 -3px; }
.pf-sample img { width: 100%; height: auto; border-radius: 10px; display: block; }
.pf-s-historias img { aspect-ratio: 9 / 16; } .pf-s-carrusel img { aspect-ratio: 4 / 5; }
.pf-sample small { color: var(--amber-2); font-size: .75rem; }
.pf-lb { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: #000d; }
.pf-lb:target { display: grid; }
.pf-lb-bg { position: absolute; inset: 0; cursor: zoom-out; }
.pf-lb figure { position: relative; display: grid; gap: .5rem; justify-items: center; margin: 0; pointer-events: none; }
.pf-lb img { max-width: min(92vw, 560px); max-height: 86vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 20px 80px #000; }
.pf-lb-carrusel img { max-width: min(92vw, 640px); }
.pf-lb figcaption { color: #fff; font-size: .85rem; }
.pf-lb-x, .pf-lb-n { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff2; color: #fff; text-decoration: none; font-size: 1.6rem; }
.pf-lb-x { top: 16px; right: 16px; font-size: 1.2rem; } .pf-lb-n { top: 50%; translate: 0 -50%; } .pf-lb-n.prev { left: 16px; } .pf-lb-n.next { right: 16px; }
.pf-lb-x:hover, .pf-lb-n:hover { background: var(--amber); color: #1a1208; }
@media (max-width: 760px) { .pf-s-historias, .pf-s-carrusel { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } .pf-lb-n { top: auto; bottom: 16px; translate: 0; } }
.gl-consent { display: flex; gap: .7rem; align-items: flex-start; margin: 1rem 0; padding: .9rem 1rem; border: 2px solid var(--brand); border-radius: var(--r-lg); background: #FFF9EC; font-size: .92rem; line-height: 1.45; cursor: pointer; color: #1C1917; }
.gl-consent input { width: 1.4rem; height: 1.4rem; flex: none; margin-top: .1rem; accent-color: var(--brand); }
