/* MatchUP — estilos. Identidad: ciruela (busco trabajo) + coral (ofrezco trabajo).
   Diseño de un solo tema claro, con todos los colores definidos aquí. */
:root {
  --plum: #3b1e54; --plum-2: #5a3477; --plum-3: #8a63ab; --plum-soft: #efe7f5; --plum-line: #d9c6e8;
  --coral: #ff6b4a; --coral-2: #e9583a; --coral-soft: #ffe6df; --coral-ink: #3a0f04;
  --ink: #241a2c; --muted: #6b6076; --faint: #a99db5; --line: #e4dbe9; --bg: #f7f4f8; --white: #ffffff;
  --ok: #1f7a45; --ok-bg: #e2f4e8; --bad: #b8321f; --bad-bg: #fbe5e2; --gold: #f2a33a; --gold-ink: #3b2400;
  --f-d: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --f-b: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-m: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px;
  --shadow: 0 1px 2px rgb(36 26 44 / .05), 0 8px 24px rgb(36 26 44 / .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-b); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-d); margin: 0; line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.mono { font-family: var(--f-m); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-d); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo b { color: var(--coral); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 11px 18px; font-weight: 700; border: 1.5px solid transparent; text-decoration: none; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.98); }
.btn.coral { background: var(--coral); color: var(--coral-ink); }
.btn.coral:hover { background: var(--coral-2); }
.btn.plum { background: var(--plum); color: #fff; }
.btn.plum:hover { background: var(--plum-2); }
.btn.ghost { background: var(--white); border-color: var(--line); }
.btn.ghost:hover { background: var(--plum-soft); }
.btn.link { background: none; padding: 6px 4px; color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: .88rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Fichas */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: .82rem; font-weight: 600; background: var(--plum-soft); color: var(--plum); border: 0; white-space: nowrap; }
.chip.hit { background: var(--coral); color: var(--coral-ink); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.gold { background: var(--gold); color: var(--gold-ink); }
.chip.solid { background: var(--plum); color: #fff; }
.chip button { background: none; border: 0; padding: 0 0 0 2px; font-weight: 800; color: inherit; opacity: .65; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ================= Landing ================= */
.land { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.land-nav { position: absolute; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(16px, 4vw, 44px); z-index: 2; }
.land-nav .logo { color: #fff; }
.land-nav .btn { background: rgb(255 255 255 / .16); color: #fff; padding: 9px 16px; }
.door { padding: 116px clamp(16px, 5vw, 60px) 48px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; min-height: 600px; text-decoration: none; }
.door.a { background: var(--plum); color: #fff; }
.door.b { background: var(--coral); color: var(--coral-ink); }
.door .who { font-family: var(--f-d); font-weight: 600; font-size: .92rem; text-transform: uppercase; letter-spacing: .14em; opacity: .82; }
.door h1 { font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.door p { font-size: 1.12rem; max-width: 440px; opacity: .92; }
.door .tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 480px; }
.door .tags span { padding: 5px 12px; border-radius: 99px; font-size: .88rem; font-weight: 600; }
.door.a .tags span { background: rgb(255 255 255 / .12); }
.door.b .tags span { background: rgb(58 15 4 / .1); }
.door .cta { margin-top: auto; padding-top: 18px; }
.door .btn { font-size: 1.1rem; padding: 15px 24px; border-radius: 14px; }
.door.a .btn { background: var(--coral); color: var(--coral-ink); }
.door.b .btn { background: var(--plum); color: #fff; }
.door .ring { position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 34px solid currentColor; opacity: .07; top: -60px; pointer-events: none; }
.door.a .ring { right: -170px; } .door.b .ring { left: -170px; }
.door:hover .btn { transform: translateX(3px); }
.explica { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(32px, 5vw, 56px) clamp(16px, 5vw, 60px); background: var(--bg); }
.explica .vid { border-radius: 18px; overflow: hidden; background: var(--plum); box-shadow: 0 18px 50px rgb(36 26 44 / .22); aspect-ratio: 16 / 9; max-width: 100%; }
.explica video { display: block; width: 100%; height: 100%; object-fit: cover; }
.explica .txt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.explica h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.025em; color: var(--plum); }
.explica h2 em { font-style: normal; color: var(--coral-2); }
.explica p { font-size: 1.05rem; color: #4b3f57; max-width: 52ch; }
.pasos { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: p; }
.pasos li { counter-increment: p; position: relative; padding-left: 40px; font-size: .96rem; color: #4b3f57; }
.pasos li::before { content: counter(p); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); color: var(--coral-ink); display: grid; place-items: center; font-family: var(--f-d); font-weight: 800; font-size: .9rem; }
.pasos b { color: var(--ink); }
@media (max-width: 860px) { .explica { grid-template-columns: minmax(0, 1fr); } }
.howto { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 32px clamp(16px, 5vw, 60px) 36px; background: #fff; }
.howto div { display: flex; gap: 12px; align-items: flex-start; }
.howto .n { width: 34px; height: 34px; border-radius: 50%; background: var(--plum-soft); color: var(--plum); display: grid; place-items: center; font-family: var(--f-d); font-weight: 800; flex: none; }
.howto b { font-family: var(--f-d); font-size: 1.02rem; display: block; }
.howto p { font-size: .9rem; color: var(--muted); }
.land-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px clamp(16px, 5vw, 60px); font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.land-foot a { color: var(--plum); font-weight: 600; }
@media (max-width: 860px) {
  .land { grid-template-columns: 1fr; }
  .door { min-height: 0; padding-top: 96px; }
  .door.b { padding-top: 44px; }
  .door.b .ring { display: none; }
  .howto { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .howto { grid-template-columns: 1fr; } }

/* ================= Formularios ================= */
.page { max-width: 600px; margin: 0 auto; padding: 22px 16px 60px; }
.topnav { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; max-width: 1100px; margin: 0 auto; }
.topnav .logo { color: var(--plum); }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--coral); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .form { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea { background: #fff; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 12px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.field textarea { resize: vertical; min-height: 78px; }
.hint { font-size: .78rem; color: var(--muted); }
.kwbox { background: #fff; border: 1.5px dashed var(--coral); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; gap: 9px; }
.kwbox .eyebrow { color: var(--coral-2); }
.kwadd { display: flex; gap: 6px; }
.kwadd input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: .86rem; }
.error { background: var(--bad-bg); color: var(--bad); font-weight: 600; padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.card-soft { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 13px; position: relative; text-align: left; }
.plan[aria-pressed="true"] { border: 2.5px solid var(--coral); box-shadow: 0 12px 30px rgb(255 107 74 / .18); }
.plan .tag { position: absolute; top: -12px; left: 22px; background: var(--coral); color: var(--coral-ink); font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.plan h3 { font-size: 1.5rem; }
.price { font-family: var(--f-d); font-weight: 800; font-size: 1.9rem; color: var(--plum); display: flex; align-items: baseline; gap: 6px; }
.price .blank { display: inline-block; width: 100px; border-bottom: 3px dashed var(--plum-line); height: 26px; }
.price small { font-family: var(--f-b); font-size: .84rem; font-weight: 600; color: var(--muted); }
.meter { display: flex; gap: 4px; align-items: center; font-size: .78rem; font-weight: 700; color: var(--muted); }
.meter i { width: 22px; height: 8px; border-radius: 2px; background: var(--line); }
.meter i.on { background: var(--coral); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.plan li { display: flex; gap: 8px; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.plan li.no { color: var(--faint); } .plan li.no::before { content: "–"; color: var(--faint); }
.plan .pick { margin-top: auto; }
.plan[aria-pressed="true"] .pick { background: var(--coral); color: var(--coral-ink); border-color: var(--coral); }

/* ================= App (persona registrada) ================= */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; position: relative; }
@media (min-width: 560px) { body.en-app { background: #e6dfeb; } .app { box-shadow: 0 0 40px rgb(36 26 44 / .1); } }
.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--plum); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.appbar .logo { font-size: 1.2rem; } .appbar .logo svg { width: 28px; height: 28px; }
.appbar h2 { font-size: 1.35rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: #fff; flex: none; font-family: var(--f-d); }
.avatar.lg { width: 72px; height: 72px; font-size: 1.6rem; }
.avatar.xl { width: 110px; height: 110px; font-size: 2.3rem; border: 5px solid #fff; }
.content { flex: 1; padding: 14px 16px 100px; display: flex; flex-direction: column; gap: 12px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; justify-content: space-around; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); z-index: 6; }
.tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); position: relative; padding: 4px 14px; }
.tabbar button[aria-current="page"] { color: var(--plum); }
.tabbar svg { width: 24px; height: 24px; }
.tabbar .dot { position: absolute; top: -2px; right: 6px; background: var(--coral); color: var(--coral-ink); font-size: .64rem; font-weight: 800; border-radius: 99px; padding: 0 5px; min-width: 17px; }

/* Filtros */
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button { white-space: nowrap; background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: .82rem; font-weight: 600; }
.filters button.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.filters button.lock { color: var(--faint); }
.quota { font-size: .8rem; color: var(--muted); text-align: center; }

/* Mazo */
.deck { position: relative; height: min(560px, calc(100vh - 250px)); min-height: 440px; }
.card { position: absolute; inset: 0 0 84px 0; border-radius: 24px; background: #fff; box-shadow: 0 14px 34px rgb(36 26 44 / .16); overflow: hidden; display: flex; flex-direction: column; touch-action: pan-y; user-select: none; will-change: transform; }
.card.back { transform: scale(.94) translateY(16px); opacity: .55; box-shadow: none; pointer-events: none; }
.card.dragging { transition: none; cursor: grabbing; }
.card.fly { transition: transform .32s ease-in, opacity .32s; }
.card.snap { transition: transform .2s ease-out; }
.card .hero { min-height: 190px; position: relative; display: flex; align-items: flex-end; padding: 16px; color: #fff; flex: none; }
.card.t-adm .hero { background: linear-gradient(160deg, var(--plum-2), var(--plum)); }
.card.t-col .hero { background: linear-gradient(160deg, #ff8466, var(--coral-2)); color: var(--coral-ink); }
.card .big { font-family: var(--f-d); font-weight: 800; font-size: 1.7rem; line-height: 1.04; }
.card .sub { font-size: .9rem; opacity: .9; margin-top: 4px; }
.card .aff { position: absolute; top: 14px; right: 14px; background: #fff; color: var(--plum); border-radius: 14px; padding: 6px 10px; text-align: center; font-weight: 800; font-family: var(--f-d); font-size: 1.35rem; line-height: 1; }
.card .aff small { display: block; font-family: var(--f-b); font-size: .6rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.card .badges { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; overflow: auto; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: var(--bg); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.fact b { display: block; font-size: .95rem; overflow-wrap: anywhere; }
.fact span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.quote { font-size: .92rem; font-style: italic; color: #4b3f57; border-left: 3px solid var(--coral); padding-left: 10px; }
.stamp { position: absolute; top: 34px; z-index: 3; font-family: var(--f-d); font-weight: 800; font-size: 1.6rem; padding: 2px 12px; border-radius: 10px; background: rgb(255 255 255 / .9); opacity: 0; pointer-events: none; }
.stamp.yes { right: 22px; border: 4px solid var(--ok); color: var(--ok); transform: rotate(14deg); }
.stamp.no { left: 22px; border: 4px solid var(--bad); color: var(--bad); transform: rotate(-14deg); }
.actions { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 26px; align-items: center; }
.act { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgb(36 26 44 / .15); font-size: 1.6rem; font-weight: 800; border: 0; color: var(--muted); }
.act.yes { width: 76px; height: 76px; background: var(--coral); color: var(--coral-ink); font-size: 2.2rem; line-height: 1; }
.act:hover { transform: scale(1.05); }
.empty { text-align: center; padding: 38px 18px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty .big-ico { font-size: 2.6rem; }
.empty h3 { font-size: 1.3rem; }

/* Match */
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgb(20 10 28 / .6); padding: 16px; }
.matchov { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 28px; background: linear-gradient(170deg, var(--plum) 0%, #24102f 100%); color: #fff; display: flex; flex-direction: column; align-items: center; padding: 40px 22px 24px; text-align: center; gap: 12px; }
.matchov h2 { font-size: 3rem; font-weight: 800; color: var(--coral); letter-spacing: -.03em; line-height: .95; }
.duo { display: flex; align-items: center; margin: 8px 0 2px; }
.duo { position: relative; }
.duo .avatar + .trato + .avatar { margin-left: -24px; }
.duo .trato { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); z-index: 2; width: 62px; height: 62px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 2.1rem; box-shadow: 0 6px 18px rgb(0 0 0 / .3); }
.duo .avatar:last-child { position: relative; z-index: 1; }
.contact { background: rgb(255 255 255 / .08); border-radius: 16px; padding: 14px; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.contact .r { display: flex; justify-content: space-between; gap: 10px; }
.contact .r b { text-align: right; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) { .matchov { animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); } @keyframes pop { from { transform: scale(.85); opacity: 0; } } }

/* Hoja inferior (filtros) */
.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; max-width: 480px; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 31; display: flex; flex-direction: column; gap: 12px; max-height: 85vh; overflow: auto; }
.lockrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 9px 12px; font-size: .88rem; color: var(--muted); }

/* Matches + notas */
.mrow { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.mhead { display: flex; gap: 12px; align-items: center; width: 100%; background: none; border: 0; padding: 0; text-align: left; }
.mhead h4 { font-size: 1.05rem; }
.notas { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.notas button { height: 42px; border-radius: 10px; font-family: var(--f-d); font-weight: 800; font-size: 1.05rem; background: var(--bg); border: 1.5px solid var(--line); color: var(--muted); padding: 0; }
.notas button:hover { border-color: var(--coral); }
.notas button[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); }
.scale { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 700; color: var(--muted); }
.grade { font-family: var(--f-d); font-weight: 800; color: var(--plum); }
.grade-big { font-family: var(--f-d); font-weight: 800; font-size: 2.6rem; color: var(--plum); line-height: 1; }
.grade-big small { font-size: 1.1rem; color: var(--muted); }
.dist { display: flex; flex-direction: column; gap: 3px; font-size: .72rem; color: var(--muted); font-weight: 700; min-width: 130px; }
.dist div { display: grid; grid-template-columns: 12px 1fr 18px; gap: 6px; align-items: center; }
.dist i { display: block; height: 7px; border-radius: 3px; background: var(--plum); min-width: 2px; }
.dist .trk { background: var(--bg); border-radius: 3px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; z-index: 40; box-shadow: var(--shadow); max-width: calc(100% - 32px); font-size: .92rem; }
.toast.err { background: var(--bad); }
.toast.match { background: var(--coral); color: var(--coral-ink); }

/* ================= Panel de administración ================= */
.adm { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--plum); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .logo { margin: 0 6px 22px; color: #fff; }
.side button { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: rgb(255 255 255 / .78); background: none; border: 0; text-align: left; }
.side button[aria-current="page"] { background: rgb(255 255 255 / .13); color: #fff; }
.side button .n { background: var(--coral); color: var(--coral-ink); border-radius: 99px; font-size: .7rem; font-weight: 800; padding: 1px 7px; }
.side .foot { margin-top: auto; font-size: .78rem; color: rgb(255 255 255 / .6); padding: 0 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.side .foot #adm-salir { padding: 4px 0; color: #fff; text-decoration: underline; font-size: .82rem; }
.main { padding: 24px clamp(16px, 3vw, 30px) 40px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; height: auto; flex-direction: row; overflow-x: auto; padding: 10px 12px; gap: 4px; z-index: 5; }
  .side .logo { margin: 0 10px 0 0; } .side .logo span { display: none; }
  .side button { white-space: nowrap; gap: 6px; }
  .side .foot { margin: 0 0 0 auto; padding: 0 4px; flex: none; justify-content: center; }
  .side .foot .quien, .side .foot a { display: none; }
  .side .foot #adm-salir { padding: 10px 8px; white-space: nowrap; }
}
.bell { position: relative; width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.15rem; }
.bell b { position: absolute; top: -6px; right: -6px; background: var(--coral); color: var(--coral-ink); font-size: .7rem; border-radius: 99px; padding: 1px 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.kpi .v { font-family: var(--f-d); font-weight: 800; font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.kpi .s b { color: var(--ok); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.box h3 { font-size: 1.05rem; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .78rem; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); }
.notif { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.notif:last-child { border-bottom: 0; }
.notif .t { margin-left: auto; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.pill-new { background: var(--coral); color: var(--coral-ink); font-size: .66rem; font-weight: 800; border-radius: 99px; padding: 2px 7px; flex: none; }
.pill-seen { background: var(--plum-soft); color: var(--plum); font-size: .66rem; font-weight: 800; border-radius: 99px; padding: 2px 7px; flex: none; }
.stackbar { display: flex; height: 24px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--bg); }
.stackbar i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.kwrow { display: grid; grid-template-columns: minmax(80px, 120px) 1fr 34px; align-items: center; gap: 8px; font-size: .86rem; }
.kwrow .track { height: 10px; border-radius: 5px; background: var(--bg); }
.kwrow .track i { display: block; height: 100%; border-radius: 5px; background: var(--plum); }
.kwrow.c .track i { background: var(--coral); }
.kwrow .v { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pl { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.pl.basico { background: var(--plum-soft); color: var(--plum); }
.pl.destacado { background: var(--plum-line); color: var(--plum); }
.pl.premium { background: var(--plum); color: #fff; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: .82rem; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.login-box { max-width: 420px; margin: 12vh auto; padding: 0 16px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.jornadas .seg button { padding: 8px 18px; font-size: .92rem; }

.door .para { font-family: var(--f-d); font-weight: 600; font-size: 1.15rem; max-width: 460px; opacity: 1; }

/* ================= Chat ================= */
.chatrow { flex-direction: row; align-items: center; gap: 12px; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.chatrow:hover { border-color: var(--plum-line); }
.cr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cr-txt h4 { font-size: 1.02rem; }
.cr-sub, .cr-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-prev { font-size: .88rem; color: var(--muted); }
.cr-prev.nuevo { color: var(--ink); font-weight: 700; }
.badge-n { background: var(--coral); color: var(--coral-ink); font-weight: 800; font-size: .74rem; border-radius: 99px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; flex: none; }
.content.en-chat { padding-bottom: 92px; gap: 10px; }
.appbar .avatar { width: 38px; height: 38px; }
.chat-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.datos-card { background: var(--ok-bg); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.datos-card .eyebrow { color: var(--ok); }
.datos-card b { text-align: right; overflow-wrap: anywhere; }
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 240px; }
.chat-aviso { align-self: center; text-align: center; background: var(--plum-soft); color: var(--plum); border-radius: 14px; padding: 10px 14px; font-size: .82rem; max-width: 92%; }
.chat-aviso span { color: var(--muted); font-size: .76rem; }
.msg { max-width: 80%; align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.msg.mio { align-self: flex-end; background: var(--plum); color: #fff; border-color: var(--plum); border-radius: 16px 16px 4px 16px; }
.msg p { margin: 0; overflow-wrap: anywhere; }
.msg time { display: block; font-size: .68rem; opacity: .65; margin-top: 2px; text-align: right; }
.msg-sis { align-self: center; font-size: .8rem; color: var(--ok); background: var(--ok-bg); border-radius: 99px; padding: 4px 12px; }
.evaluar { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.evaluar summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.evaluar[open] summary { margin-bottom: 10px; }
.composer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); z-index: 6; }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line); border-radius: 18px; padding: 9px 14px; max-height: 120px; }
.composer textarea:focus { outline: none; border-color: var(--coral); }
.composer .btn { border-radius: 18px; padding: 9px 16px; }
/* Registro de conversaciones (panel) */
.log { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.log-row { display: grid; grid-template-columns: 150px 110px 170px 1fr; gap: 10px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .86rem; }
.log-row:last-child { border-bottom: 0; }
.log-row.datos { background: var(--ok-bg); }
.log-row time { color: var(--muted); font-size: .76rem; }
.log-row .txt { overflow-wrap: anywhere; }
@media (max-width: 760px) { .log-row { grid-template-columns: 1fr; gap: 2px; } }

/* ================= App en computador (pantallas anchas) ================= */
@media (max-width: 899px) { .tabbar.oculta-movil { display: none; } }
@media (min-width: 900px) {
  body.en-app { background: #efeaf3; }
  .app { max-width: 1180px; display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; box-shadow: none; background: transparent; }
  .appbar { grid-column: 1 / -1; top: 0; border-radius: 0 0 18px 18px; padding: 14px 24px; }
  .tabbar { grid-column: 1; grid-row: 2; position: sticky; top: 84px; left: auto; transform: none; max-width: none; width: auto; align-self: start; flex-direction: column; justify-content: flex-start; gap: 4px; margin: 20px 0 0 16px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; }
  .tabbar button { flex-direction: row; gap: 10px; font-size: .95rem; padding: 10px 12px; border-radius: 12px; justify-content: flex-start; }
  .tabbar button[aria-current="page"] { background: var(--plum-soft); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .dot { position: static; margin-left: auto; font-size: .72rem; padding: 1px 7px; }
  .content { grid-column: 2; grid-row: 2; padding: 20px 24px 40px; width: 100%; max-width: 820px; margin: 0 auto; }
  .sec-descubrir .content { max-width: 560px; }
  .deck { height: min(620px, calc(100vh - 220px)); }
  .content.en-chat { padding-bottom: 20px; }
  .composer { position: sticky; bottom: 0; left: auto; transform: none; max-width: none; border: 1px solid var(--line); border-radius: 18px; margin-top: auto; }
  .sheet { bottom: 50%; transform: translateY(50%); border-radius: 22px; max-width: 520px; }
  .toast { bottom: 28px; }
}
