/* ================================================================
   vox.css — Bran.Vox · "Cristal líquido" (misma marca que branflores.com)
   Paleta: Tinta · Mandarina · Iris · Agua · Lima · Perla
   Tipos:  Unbounded (display) · Geist (texto) · Geist Mono (etiquetas)
   ================================================================ */
:root {
  --ink: #0d0a1f;
  --ink2: #17122f;
  --mandarina: #ff7a45;
  --iris: #a98bff;
  --agua: #4fe3c1;
  --lima: #e4ff6b;
  --perla: #f6f3ff;
  --rosa: #ff6b9a;
  --txt2: rgba(246, 243, 255, 0.78);
  --txt3: rgba(246, 243, 255, 0.58);
  --line: rgba(255, 255, 255, 0.14);
  --field: rgba(255, 255, 255, 0.06);
  --field-h: rgba(255, 255, 255, 0.1);
  --ff-d: 'Unbounded', system-ui, sans-serif;
  --ff-b: 'Geist', system-ui, -apple-system, sans-serif;
  --ff-m: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --iri: linear-gradient(100deg, #ff7a45, #ffd6c2 18%, #a98bff 38%, #4fe3c1 58%, #e4ff6b 78%, #ff7a45);
  --r-lg: 28px; --r-md: 18px; --r-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  background: var(--ink); color: var(--perla);
  font-family: var(--ff-b); font-size: 16px; line-height: 1.55;
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: var(--lima); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lima); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── AURORA + grano ─────────────────────────────────────── */
.aurora { position: fixed; inset: -10%; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: var(--mandarina); opacity: .36; animation: drift1 21s ease-in-out infinite; }
.b2 { width: 50vmax; height: 50vmax; right: -18vmax; top: 8vmax; background: var(--iris); opacity: .44; animation: drift2 25s ease-in-out infinite; }
.b3 { width: 40vmax; height: 40vmax; left: -14vmax; bottom: -8vmax; background: var(--agua); opacity: .28; animation: drift3 23s ease-in-out infinite; }
.b4 { width: 32vmax; height: 32vmax; right: -8vmax; bottom: -12vmax; background: var(--lima); opacity: .16; animation: drift1 27s ease-in-out infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vmax, 9vmax) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1.08); } 50% { transform: translate(-9vmax, 6vmax) scale(.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vmax, -9vmax) scale(1.2); } }
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ── CRISTAL ────────────────────────────────────────────── */
.glass {
  position: relative; isolation: isolate;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.05), 0 16px 38px -14px rgba(4,2,18,.6);
}
.glass.dense { background: linear-gradient(160deg, rgba(40,31,78,.78), rgba(18,13,38,.72)); }
.sheen { overflow: hidden; }
.sheen::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 55%; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transform: translateX(-130%) skewX(-12deg); animation: sheen 10s ease-in-out infinite; animation-delay: var(--sheen, 0s);
}
@keyframes sheen { 0%,76% { transform: translateX(-130%) skewX(-12deg); } 100% { transform: translateX(260%) skewX(-12deg); } }

/* ── FIRMA (logo) ───────────────────────────────────────── */
.firma { display: block; aspect-ratio: 900 / 525; }
.firma img { width: 100%; height: 100%; }
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .firma {
    background: var(--iri); background-size: 300% 100%;
    -webkit-mask: url("/assets/img/firma-bran-flores.png") center / contain no-repeat;
            mask: url("/assets/img/firma-bran-flores.png") center / contain no-repeat;
    animation: flow 9s linear infinite;
  }
  .firma img { opacity: 0; }
}
@keyframes flow { to { background-position: 300% 0; } }

/* ── LAYOUT ─────────────────────────────────────────────── */
.wrap { position: relative; z-index: 2; width: min(760px, calc(100% - 32px)); margin: 0 auto; }
.wrap.wide { width: min(1120px, calc(100% - 32px)); }
.label { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--ff-m); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--txt3); }
.label::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.title { font-family: var(--ff-d); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1.08; letter-spacing: -0.01em; color: #fff; }
.hl { background: var(--iri); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 12s linear infinite; }
.subtitle { margin-top: .8rem; color: var(--txt2); max-width: 58ch; }
.muted { color: var(--txt3); }
.small { font-size: .86rem; }
.mono { font-family: var(--ff-m); font-size: .78rem; letter-spacing: .04em; }

/* ── BOTONES ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .7rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .94rem; transition: transform .3s var(--ease), background .25s, box-shadow .3s, opacity .2s; text-decoration: none !important; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-lima { background: var(--lima); color: #1b1530; box-shadow: 0 10px 26px -10px rgba(228,255,107,.75); }
.btn-lima:hover { transform: translateY(-2px); }
.btn-glass { color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn-glass:hover { background: rgba(255,255,255,.17); }
.btn-ghost { color: var(--txt2); min-height: 40px; padding: .5rem .9rem; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.08); }
.btn-danger { color: #ffd0dc; background: rgba(255,80,120,.14); border: 1px solid rgba(255,107,154,.35); }
.btn-danger:hover { background: rgba(255,80,120,.24); }
.btn-sm { min-height: 36px; padding: .4rem .85rem; font-size: .84rem; }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.icon-btn:hover { background: rgba(255,255,255,.15); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── FORMULARIOS ────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field > span, .field-label { font-size: .86rem; font-weight: 500; color: var(--txt2); }
.field > span em, .field-label em { font-style: normal; color: var(--lima); }
.field small, .hint { font-size: .78rem; color: var(--txt3); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: #fff;
  background: var(--field); border: 1px solid rgba(255,255,255,.16); border-radius: 14px;
  padding: .78rem .95rem; min-height: 48px;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6f3ff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px; padding-right: 2.4rem; }
select option { background: var(--ink2); color: #fff; }
input::placeholder, textarea::placeholder { color: rgba(246,243,255,.35); }
input:hover, select:hover, textarea:hover { background: var(--field-h); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--iris); background: rgba(169,139,255,.1); box-shadow: 0 0 0 4px rgba(169,139,255,.18); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .7; }
.is-invalid { border-color: var(--rosa) !important; box-shadow: 0 0 0 4px rgba(255,107,154,.18) !important; }
.field-error { color: #ffb3c8; font-size: .8rem; }

/* Opciones tipo mosaico (radio / checkbox) */
.choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choices.cols-1 { grid-template-columns: 1fr; }
.choice { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 16px; background: var(--field); border: 1px solid rgba(255,255,255,.14); cursor: pointer; transition: border-color .2s, background .2s, transform .25s var(--ease); }
.choice:hover { background: var(--field-h); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 1.6px solid rgba(255,255,255,.4); display: grid; place-items: center; transition: all .2s; }
.choice input[type=checkbox] ~ .dot { border-radius: 6px; }
.choice .dot::after { content: ''; width: 10px; height: 10px; border-radius: inherit; background: #1b1530; transform: scale(0); transition: transform .2s var(--ease); }
.choice input:checked ~ .dot { background: var(--lima); border-color: var(--lima); }
.choice input:checked ~ .dot::after { transform: scale(1); }
.choice input[type=checkbox]:checked ~ .dot::after { width: 11px; height: 6px; border-radius: 0; background: none; border-left: 2.2px solid #1b1530; border-bottom: 2.2px solid #1b1530; transform: rotate(-45deg) translate(1px, -1px); }
.choice:has(input:checked) { border-color: rgba(228,255,107,.7); background: rgba(228,255,107,.09); }
.choice:has(input:focus-visible) { outline: 2px solid var(--lima); outline-offset: 2px; }
.choice b { display: block; font-weight: 600; color: #fff; }
.choice small { display: block; color: var(--txt3); font-size: .8rem; line-height: 1.4; margin-top: .15rem; }

/* ── SECCIONES DEL FORMULARIO ───────────────────────────── */
.step { padding: clamp(1.25rem, 4vw, 2rem); margin-top: 1.1rem; }
.step-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.step-num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--ff-m); font-size: .8rem; color: #1b1530; background: var(--iri); background-size: 300% 100%; animation: flow 12s linear infinite; font-weight: 600; }
.step-head h2 { font-family: var(--ff-d); font-weight: 600; font-size: 1.12rem; color: #fff; letter-spacing: .005em; }
.step-head p { font-size: .84rem; color: var(--txt3); margin-top: .1rem; }
.callout { display: flex; gap: .75rem; padding: .9rem 1rem; border-radius: 16px; background: rgba(169,139,255,.12); border: 1px solid rgba(169,139,255,.3); color: var(--txt2); font-size: .88rem; }
.callout.lima { background: rgba(228,255,107,.08); border-color: rgba(228,255,107,.3); }
.callout.warn { background: rgba(255,122,69,.1); border-color: rgba(255,122,69,.35); }
.callout svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* Horarios */
.slots { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.slot { position: relative; display: block; padding: 1rem 1.1rem; border-radius: 18px; background: var(--field); border: 1px solid rgba(255,255,255,.14); cursor: pointer; transition: all .25s var(--ease); }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot:hover { background: var(--field-h); transform: translateY(-2px); }
.slot .t { font-family: var(--ff-d); font-weight: 600; font-size: 1.02rem; color: #fff; }
.slot .d { font-size: .8rem; color: var(--txt3); margin-top: .25rem; }
.slot:has(input:checked) { border-color: var(--lima); background: rgba(228,255,107,.1); box-shadow: 0 0 0 4px rgba(228,255,107,.12); }
.slot:has(input:checked) .t::after { content: ' ✓'; color: var(--lima); }
.slot:has(input:focus-visible) { outline: 2px solid var(--lima); outline-offset: 2px; }

/* Consentimientos */
.consent { display: flex; gap: .8rem; align-items: flex-start; padding: .95rem 1rem; border-radius: 16px; background: var(--field); border: 1px solid rgba(255,255,255,.14); }
.consent + .consent { margin-top: .6rem; }
.consent label { display: flex; gap: .75rem; align-items: flex-start; flex: 1; cursor: pointer; }
.consent input { position: absolute; opacity: 0; }
.consent .dot { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.6px solid rgba(255,255,255,.45); display: grid; place-items: center; transition: all .2s; }
.consent input:checked ~ .dot { background: var(--lima); border-color: var(--lima); }
.consent input:checked ~ .dot::after { content: ''; width: 11px; height: 6px; border-left: 2.2px solid #1b1530; border-bottom: 2.2px solid #1b1530; transform: rotate(-45deg) translate(1px, -1px); }
.consent input:focus-visible ~ .dot { outline: 2px solid var(--lima); outline-offset: 2px; }
.consent:has(input:checked) { border-color: rgba(228,255,107,.55); }
.consent b { color: #fff; font-weight: 600; }
.consent .opt { font-family: var(--ff-m); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--agua); margin-left: .35rem; }
.consent .req { font-family: var(--ff-m); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lima); margin-left: .35rem; }
.consent p { font-size: .82rem; color: var(--txt3); margin-top: .2rem; }
.consent .read { flex-shrink: 0; }

/* Firma */
.sigpad-wrap { position: relative; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, #fbfaff, #efeaff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 14px 30px -14px rgba(0,0,0,.6); }
.sigpad { display: block; width: 100%; height: 210px; touch-action: none; cursor: crosshair; }
.sigpad-line { position: absolute; left: 7%; right: 7%; bottom: 52px; border-bottom: 1.5px dashed rgba(20,16,42,.28); pointer-events: none; }
.sigpad-x { position: absolute; left: 7%; bottom: 58px; font-family: var(--ff-d); color: rgba(20,16,42,.35); font-size: 1.1rem; pointer-events: none; }
.sigpad-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: .78rem; color: rgba(20,16,42,.45); pointer-events: none; transition: opacity .3s; }
.sigpad-wrap.has-ink .sigpad-hint { opacity: 0; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }

/* Barra de envío */
.submit-bar { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30; margin-top: 1.4rem; padding: .8rem .8rem .8rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 999px; }
.submit-bar .progress { font-family: var(--ff-m); font-size: .74rem; color: var(--txt2); letter-spacing: .04em; }
@media (max-width: 460px) {
  .submit-bar { border-radius: 22px; padding: .55rem .55rem .55rem .95rem; gap: .6rem; }
  .submit-bar .progress { font-size: .68rem; line-height: 1.3; }
  .submit-bar .btn { padding: .65rem 1rem; }
  .submit-bar .btn svg { display: none; }
}

/* Hoja/modal */
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(6,4,16,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .3s var(--ease); }
.sheet-back.open { opacity: 1; }
.sheet { width: min(720px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; border-radius: 28px 28px 0 0; padding: 0; transform: translateY(30px); transition: transform .35s var(--ease); background: linear-gradient(160deg, rgba(44,34,86,.94), rgba(18,13,38,.96)); }
.sheet-back.open .sheet { transform: none; }
@media (min-width: 720px) { .sheet-back { align-items: center; } .sheet { border-radius: 28px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-family: var(--ff-d); font-weight: 600; font-size: 1.02rem; color: #fff; }
.sheet-body { overflow-y: auto; padding: 1.2rem 1.5rem 1.5rem; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: .9rem 1.2rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.doc h4 { font-family: var(--ff-d); font-weight: 600; font-size: .92rem; color: #fff; margin: 1.1rem 0 .4rem; }
.doc p, .doc li { color: var(--txt2); font-size: .92rem; }
.doc ul { padding-left: 1.2rem; display: grid; gap: .35rem; }
.doc .ver { font-family: var(--ff-m); font-size: .7rem; color: var(--txt3); letter-spacing: .06em; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 100; padding: .8rem 1.2rem; border-radius: 999px; font-size: .9rem; color: #fff; opacity: 0; pointer-events: none; transition: all .35s var(--ease); max-width: calc(100% - 32px); text-align: center; background: linear-gradient(160deg, rgba(50,40,96,.95), rgba(22,16,46,.95)); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 16px 36px -12px rgba(0,0,0,.6); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255,107,154,.6); }

/* Cargando */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.2); border-top-color: var(--lima); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-state { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 2rem 1rem; }
.center-card { padding: clamp(1.6rem, 5vw, 2.6rem); max-width: 520px; width: 100%; }
.center-card .firma { width: 140px; margin: 0 auto 1.2rem; }
.big-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: .8rem; }

/* ── CABECERA ───────────────────────────────────────────── */
.topbar { position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 40; margin: 10px auto 0; width: min(1120px, calc(100% - 20px)); display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .5rem .55rem .5rem 1rem; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none !important; }
.brand .firma { width: 58px; }
.brand .app { font-family: var(--ff-d); font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.brand .app i { font-style: normal; color: var(--lima); }
@media (max-width: 560px) { .brand .app { display: none; } .brand .firma { width: 50px; } .tab { padding: .5rem .7rem; font-size: .82rem; } .topbar { padding-left: .8rem; } }
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: .5rem .9rem; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--txt2); white-space: nowrap; transition: background .25s, color .25s; }
.tab:hover { color: #fff; background: rgba(255,255,255,.1); }
.tab.active { color: #1b1530; background: var(--lima); }

/* ── PANEL ──────────────────────────────────────────────── */
.page { padding: 1.6rem 0 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head .title { font-size: clamp(1.4rem, 4vw, 2rem); margin-top: .4rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.stat { padding: 1rem 1.1rem; border-radius: 20px; }
.stat .n { font-family: var(--ff-d); font-weight: 800; font-size: 1.7rem; color: #fff; line-height: 1.1; }
.stat .l { font-family: var(--ff-m); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--txt3); margin-top: .3rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.pill { padding: .42rem .85rem; border-radius: 999px; font-size: .82rem; color: var(--txt2); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.pill.active { color: #1b1530; background: var(--perla); border-color: var(--perla); }
.pill .c { opacity: .6; margin-left: .25rem; }
.cards { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.scard { display: block; padding: 1.1rem 1.15rem; border-radius: 22px; color: inherit; text-decoration: none !important; transition: transform .35s var(--ease), border-color .3s; }
.scard:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.32); }
.scard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.scard h3 { font-family: var(--ff-d); font-weight: 600; font-size: 1rem; color: #fff; line-height: 1.25; }
.scard .meta { font-size: .82rem; color: var(--txt3); margin-top: .25rem; }
.scard .row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.avatar { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--ff-d); font-weight: 600; font-size: .86rem; color: #1b1530; background: var(--iri); background-size: 300% 100%; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 500; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--txt2); white-space: nowrap; }
.chip.voice { color: #1b1530; background: var(--agua); border-color: transparent; font-weight: 600; }
.chip.voice.prov { background: rgba(79,227,193,.18); color: var(--agua); border-color: rgba(79,227,193,.45); }
.chip.st-activo { color: var(--lima); border-color: rgba(228,255,107,.4); }
.chip.st-pausa { color: #ffc9a8; border-color: rgba(255,122,69,.45); }
.chip.st-espera { color: var(--iris); border-color: rgba(169,139,255,.45); }
.chip.st-baja { color: var(--txt3); }
.chip.warn { color: #ffd0b8; background: rgba(255,122,69,.15); border-color: rgba(255,122,69,.45); }
.chip.ok { color: var(--lima); border-color: rgba(228,255,107,.35); }
.empty { padding: 2.4rem 1.4rem; text-align: center; border-radius: 24px; color: var(--txt2); }
.empty .big-emoji { margin-bottom: .6rem; }

/* Ficha */
.hero { padding: clamp(1.2rem, 4vw, 1.8rem); display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center; }
.hero .avatar { width: 64px; height: 64px; font-size: 1.15rem; }
.hero h1 { font-family: var(--ff-d); font-weight: 800; font-size: clamp(1.25rem, 4vw, 1.8rem); color: #fff; line-height: 1.15; }
.hero .meta { color: var(--txt3); font-size: .86rem; margin-top: .3rem; }
.hero .row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }
.voicebadge { text-align: center; padding: .9rem 1.1rem; border-radius: 20px; background: rgba(79,227,193,.1); border: 1px solid rgba(79,227,193,.35); min-width: 140px; }
.voicebadge .v { font-family: var(--ff-d); font-weight: 800; font-size: 1.1rem; color: var(--agua); text-transform: capitalize; }
.voicebadge .k { font-family: var(--ff-m); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--txt3); margin-top: .2rem; }
@media (max-width: 640px) { .hero { grid-template-columns: auto 1fr; } .voicebadge { grid-column: 1 / -1; } }
.subtabs { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; margin: 1rem 0; padding: .3rem; border-radius: 999px; }
.subtabs::-webkit-scrollbar { display: none; }
.panel { padding: clamp(1.1rem, 3.5vw, 1.6rem); margin-bottom: .9rem; }
.panel h3 { font-family: var(--ff-d); font-weight: 600; font-size: 1rem; color: #fff; margin-bottom: .8rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .55rem 1rem; font-size: .92rem; }
.kv dt { color: var(--txt3); }
.kv dd { color: var(--perla); white-space: pre-wrap; word-break: break-word; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .5rem; } }
.list { display: grid; gap: .6rem; }
.item { padding: .95rem 1.05rem; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.item h4 { font-weight: 600; color: #fff; font-size: .98rem; }
.item .meta { color: var(--txt3); font-size: .8rem; margin-top: .15rem; }
.item p { color: var(--txt2); font-size: .9rem; margin-top: .45rem; white-space: pre-wrap; }
.item p b { color: #fff; font-weight: 600; }
.notes-grid { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .notes-grid { grid-template-columns: 1fr; } }
.tagbox { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem; border-radius: 14px; background: var(--field); border: 1px solid rgba(255,255,255,.16); min-height: 48px; }
.tagbox input { border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 32px; padding: .2rem .4rem; flex: 1; min-width: 120px; }
.tag { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .4rem .25rem .65rem; border-radius: 999px; background: rgba(169,139,255,.2); border: 1px solid rgba(169,139,255,.4); font-size: .8rem; color: #fff; }
.tag button { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; color: var(--txt2); }
.tag button:hover { background: rgba(255,255,255,.15); color: #fff; }
.suggest { padding: 1rem 1.1rem; border-radius: 18px; background: linear-gradient(135deg, rgba(79,227,193,.14), rgba(169,139,255,.12)); border: 1px solid rgba(79,227,193,.35); }
.suggest .v { font-family: var(--ff-d); font-weight: 800; font-size: 1.25rem; color: #fff; text-transform: capitalize; }
.suggest .why { font-size: .82rem; color: var(--txt2); margin-top: .3rem; }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--txt3); margin-top: .5rem; }
.legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; margin-right: .35rem; vertical-align: middle; }
.sig-img { background: #fbfaff; border-radius: 16px; padding: .6rem; max-width: 360px; }
.linkbox { display: flex; gap: .5rem; align-items: center; padding: .4rem .4rem .4rem .9rem; border-radius: 999px; background: rgba(228,255,107,.08); border: 1px solid rgba(228,255,107,.35); }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ff-m); font-size: .8rem; color: var(--lima); }
.switch { position: relative; width: 46px; height: 28px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.16); transition: background .25s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--lima); }
.switch input:checked + span::after { transform: translateX(18px); background: #1b1530; }
.switch input:focus-visible + span { outline: 2px solid var(--lima); outline-offset: 2px; }
.slotrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.slotrow + .slotrow { margin-top: .5rem; }
.slotrow .t { font-weight: 600; color: #fff; }
.slotrow .d { font-size: .8rem; color: var(--txt3); }
.footer { position: relative; z-index: 2; text-align: center; padding: 2.5rem 1rem max(2.5rem, env(safe-area-inset-bottom)); font-family: var(--ff-m); font-size: .68rem; letter-spacing: .06em; color: var(--txt3); }
.footer a { color: var(--txt2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
