/* ==========================================================================
   wiio.online · núcleo de la interfaz (estructura compartida)
   Las tres pieles (skin-a/b/c) cambian tokens y apariencia; la estructura,
   el responsive y la accesibilidad viven aquí, en un solo lugar.
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* Marca Wiio (fija en las tres propuestas) */
  --brand: #f53d5c; --brand-2: #f57087; --coral: #ff5769; --accent: #fcad67;
  --grad: linear-gradient(135deg, #f53d5c 0%, #f77778 55%, #fcad67 100%);
  --grad-text: linear-gradient(90deg, #ff5769 0%, #fcad67 100%);
  /* Neutros (cada piel los ajusta) */
  --ink: #1c1c1c; --text: #1d1a1b; --muted: #6f6767; --faint: #a39b9c;
  --canvas: #fff7f8; --surface: #ffffff; --surface-2: #fdf3f5; --line: rgba(28, 20, 22, .08);
  --ok: #1f9d5c; --warn: #d97706; --err: #e5484d; --info: #5b6cff;
  --c1: #f53d5c; --c2: #fcad67; --c3: #25c16f; --c4: #9a8f91; --c5: #5b6cff;
  /* Forma y movimiento */
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(60, 20, 30, .04), 0 8px 24px rgba(60, 20, 30, .06);
  --shadow-lg: 0 24px 64px rgba(60, 20, 30, .16);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-num: var(--font);
  --icon-stroke: 1.75;
  --sidebar-w: 264px; --topbar-h: 68px; --gap: 20px; --pad: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--canvas); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea { min-width: 0; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
svg.i[stroke="currentColor"] * { stroke-width: var(--icon-stroke); }
.muted { color: var(--muted); }
.link { color: var(--brand-t, var(--brand)); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link .i { width: 15px; height: 15px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; margin-top: 20px; }
.stack { display: grid; gap: var(--gap); align-content: start; }
.num, .kpi__value, .kpi-mini__value, .t-num, .geo__num, .funnel__num, .watch__num, .progress__num, .inbox-kpi b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ───────────── Armazón ───────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 8px var(--pad) 48px; width: 100%; max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; }
.app--fill { height: 100vh; overflow: hidden; }
.app--fill .main { height: 100vh; }
.content--app { flex: 1; min-height: 0; padding-bottom: 20px; grid-template-rows: auto auto minmax(0, 1fr); max-width: none; }

.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; min-height: 0; z-index: 30; }
.sidebar__top { display: flex; align-items: center; justify-content: space-between; }
.sidebar .sidebar__close { display: none; }
.nav { flex: 1; overflow-y: auto; min-height: 0; display: grid; align-content: start; gap: 14px; }
.nav__group { display: grid; gap: 2px; }
.nav__item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 12px; font-weight: 500; transition: background-color .2s var(--ease), color .2s var(--ease); }
.nav__icon { position: relative; display: grid; place-items: center; }
.nav__icon .i { width: 20px; height: 20px; }
.nav__label { flex: 1; white-space: nowrap; }
.nav__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.nav__dot { position: absolute; top: -2px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.sidebar__search { display: none; }
.sidebar__foot { display: grid; gap: 8px; }
.sidebar__status { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; font-size: 12px; line-height: 1.35; }
.sidebar__status b { display: block; font-size: 13px; }
.sidebar__status span { color: var(--muted); }
.sidebar__collapse { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; padding: 6px 12px; }
.sidebar__collapse .i { width: 16px; height: 16px; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); flex: none; }

.brand-lockup { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -.03em; }
.brand-lockup em { white-space: nowrap; flex: none; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; align-self: center; }
/* Logo oficial de Wiio (assets/img/marca, fuente en design/marca): la palabra es parte de la imagen */
.logo-wiio { display: block; height: 30px; width: auto; flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; display: inline-block; background: url("../img/marca/wiio-simbolo.webp") center / contain no-repeat; }

.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 var(--pad); }
.topbar .topbar__menu, .topbar .topbar__mark { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; color: var(--muted); }
.crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 100 auto; }   /* las anteriores se recortan primero */
.crumb.is-current { flex: 0 1 auto; min-width: min(14ch, 100%); }
.crumbs { flex: 1 1 auto; }
.seg--mode .seg__item { gap: 6px; }
.crumb.is-current { color: var(--text); font-weight: 600; }
.crumb-sep .i { width: 14px; height: 14px; opacity: .5; }
.topbar__search { display: flex; align-items: center; gap: 10px; height: 40px; min-width: 240px; padding: 0 8px 0 14px; border-radius: var(--r-pill); color: var(--muted); margin-left: 12px; }
.topbar__search span { flex: 1; text-align: left; }
.topbar__search .i { width: 16px; height: 16px; }
kbd { font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
/* Pantallas medianas: la búsqueda queda en ícono + ⌘K y el modo en íconos, para que las migas se lean. */
@media (min-width: 768px) and (max-width: 1440px) {
  .topbar__search { min-width: 0; margin-left: 4px; }
  .topbar__search > span { display: none; }
  .seg--mode .seg__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.topbar__bell { position: relative; }
.bell-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--canvas); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); }
.user-chip__text { display: grid; text-align: left; line-height: 1.15; }
.user-chip__text b { font-size: 13px; }
.user-chip__text span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.user-chip > .i { width: 15px; height: 15px; color: var(--muted); }

.viewing-as { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 9px 16px; font-size: 13px; font-weight: 600; color: #fff; background: var(--grad); }
.viewing-as a { display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; text-underline-offset: 3px; }
.viewing-as .i { width: 16px; height: 16px; }

.tabbar, .scrim { display: none; }

/* ───────────── Controles ───────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill); font-weight: 600; white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .3s var(--ease), transform .12s var(--ease); }
.btn:active { transform: scale(.97); }
.btn .i { width: 17px; height: 17px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--sm .i { width: 15px; height: 15px; }
.btn--lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { color: #fff; background: var(--grad); box-shadow: 0 8px 20px -6px rgba(245, 61, 92, .45); }
.btn--icon { width: 40px; padding: 0; color: var(--muted); }
.btn--icon:hover { color: var(--text); }
.btn--danger { color: var(--err-t, var(--err)); }
.btn--send { width: 44px; height: 44px; padding: 0; flex: none; }

.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); }
.seg__item { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.seg__item .i { width: 15px; height: 15px; }
.seg__item.is-active { color: var(--text); }
.seg--sm .seg__item { height: 28px; padding: 0 10px; font-size: 12px; }
.seg--block { display: flex; }
.seg--block .seg__item { flex: 1; justify-content: center; }

.switch { position: relative; display: inline-block; width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--line); flex: none; transition: background-color .25s var(--ease); }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.switch.is-on { background: var(--grad); }
.switch.is-on .switch__knob { transform: translateX(16px); }
.switch-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--ok-t, var(--ok)); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge--new { color: var(--info-t, var(--info)); background: color-mix(in srgb, var(--info) 12%, transparent); }
.badge--warn { color: var(--warn-t, var(--warn)); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.badge--info { color: var(--brand-t, var(--brand)); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.badge--off { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.badge--err { color: var(--err-t, var(--err)); background: color-mix(in srgb, var(--err) 12%, transparent); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--muted); background: var(--surface-2); }
.chip b { font-weight: 700; color: var(--brand); }
.chip.is-active { color: #fff; background: var(--ink); }
.chip.is-active b { color: var(--accent); }
.tag { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .02em; }
.avatar--lg { width: 52px; height: 52px; font-size: 17px; }
.avatar--xl { width: 72px; height: 72px; font-size: 22px; }
.avatar.t1 { background: linear-gradient(135deg, #f53d5c, #fcad67); } .avatar.t2 { background: linear-gradient(135deg, #7c7cff, #f57087); }
.avatar.t3 { background: linear-gradient(135deg, #1f9d5c, #8fdcb0); } .avatar.t4 { background: linear-gradient(135deg, #4d8cfc, #9cc2ff); }
.avatar.t5 { background: linear-gradient(135deg, #d97706, #fcd34d); } .avatar.t6 { background: linear-gradient(135deg, #6b4f57, #b39aa1); }
.avatar--brand { background: var(--grad); }
.country { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text); background: var(--surface-2); }

.progress { position: relative; display: inline-block; flex: 1; min-width: 60px; height: 6px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--brand) 10%, var(--surface-2)); overflow: hidden; vertical-align: middle; }
.progress__bar { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--grad); }
.progress__num { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 38px; text-align: right; }

.input { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.input input { flex: 1; border: 0; outline: 0; background: none; height: 100%; }
.input .i { width: 17px; height: 17px; color: var(--muted); }
.input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.select input { cursor: pointer; }
.select { position: relative; }
.select select { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: inherit; font: inherit; appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 22px; }
.select select + svg { position: absolute; right: 14px; pointer-events: none; }
.theme-dark .select select option { background: #1d1a20; color: #fff; }
.textarea { width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); resize: vertical; line-height: 1.55; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }   /* un select con opciones largas (País) no se sale de su columna */
.field__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field__hint { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.field__hint .i { width: 14px; height: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.form-grid--tight { margin: 0; flex: 1; }
.phone__cc { padding-right: 10px; border-right: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.check.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.check .i { width: 12px; height: 12px; }
.checkline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }

/* ───────────── Tarjetas y encabezados ───────────── */
.card { border-radius: var(--r-lg); padding: 22px; min-width: 0; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card__title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.mini-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin: 18px 0 10px; }
.mini-title .i { width: 16px; height: 16px; color: var(--brand); }
.block-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-t, var(--brand)); }
.eyebrow .i { width: 14px; height: 14px; }

.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 8px; }
.page-hero__title { font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.page-hero__sub { color: var(--muted); margin-top: 6px; font-size: 14px; }
.page-hero__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ai-brief { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); }
.ai-brief__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none; color: #fff; background: var(--grad); }
.ai-brief__text { flex: 1; font-size: 13.5px; line-height: 1.5; }
.ai-brief__actions { display: flex; gap: 8px; flex: none; }

/* KPI grandes del tablero */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.kpi { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 18px 18px 54px; min-width: 0; }
.kpi__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi__label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.kpi__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.kpi__icon .i { width: 17px; height: 17px; }
.kpi__value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; }
.kpi__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; }
.kpi__sub { color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); }
.delta .i { width: 13px; height: 13px; }
.delta.is-up { color: var(--ok-t, var(--ok)); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.delta.is-down { color: var(--err-t, var(--err)); background: color-mix(in srgb, var(--err) 10%, transparent); }
.kpi__spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42px; color: var(--brand); }
.kpi--context { padding-bottom: 18px; display: flex; flex-direction: column; }
.kpi__link { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.kpi__link .i { width: 15px; height: 15px; }

/* Rejilla del tablero */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.dash__chart { grid-column: span 8; } .dash__funnel { grid-column: span 4; }
.dash__geo, .dash__sources, .dash__watch { grid-column: span 4; }
.dash__who, .dash__alerts { grid-column: span 6; }
.chart-wrap { position: relative; }
.chart { display: block; width: 100%; height: 240px; }
.chart .grid { stroke: var(--line); stroke-dasharray: 4 6; }
.chart .line-main { stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; }
.chart .line-prev { stroke: color-mix(in srgb, var(--muted) 55%, transparent); stroke-width: 2; stroke-dasharray: 5 6; }
.chart .area-top { stop-color: var(--brand); stop-opacity: .22; } .chart .area-bottom { stop-color: var(--brand); stop-opacity: 0; }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 3; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 8px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend b { color: var(--text); font-family: var(--font-num); }
.legend__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.legend__dot--main { background: var(--brand); } .legend__dot--prev { background: color-mix(in srgb, var(--muted) 55%, transparent); }

.funnel { display: grid; gap: 14px; }
.funnel__row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.funnel__label { font-size: 13px; font-weight: 500; display: flex; justify-content: space-between; }
.funnel__bar { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.funnel__fill { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.funnel__fill.f1 { opacity: .85; } .funnel__fill.f2 { opacity: .72; } .funnel__fill.f3 { opacity: .6; } .funnel__fill.f4 { opacity: .5; }
.funnel__row { position: relative; }
.funnel__num { position: absolute; right: 0; top: 0; font-size: 13px; font-weight: 700; }

.geo { display: grid; gap: 12px; }
.geo__row { display: grid; grid-template-columns: auto 82px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.geo__bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.geo__bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.geo__num { font-weight: 700; }

.sources { display: flex; align-items: center; gap: 18px; }
.donut { flex: none; }
.donut-track { stroke: var(--surface-2); }
.sources__list { flex: 1; display: grid; gap: 10px; min-width: 0; }
.sources__list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sources__list li span { flex: 1; }
.sources__list .i { width: 16px; height: 16px; color: var(--muted); }

.watch { display: grid; gap: 10px; }
.watch__row { display: flex; align-items: center; gap: 12px; }
.watch__rank { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); flex: none; }
.watch__text { flex: 1; min-width: 0; display: grid; }
.watch__text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch__text span { font-size: 12px; color: var(--muted); }
.watch__num { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }

.who { display: grid; gap: 4px; }
.who__row { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 12px; }
.who__text { flex: 1; min-width: 0; display: grid; }
.who__text b { font-size: 13px; }
.who__text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__when { font-size: 12px; color: var(--muted); white-space: nowrap; }

.alerts { display: grid; gap: 10px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.alert__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; }
.alert--warn .alert__icon { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.alert--info .alert__icon { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); }
.alert--ok .alert__icon { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.alert__text { flex: 1; min-width: 0; display: grid; }
.alert__text b { font-size: 13px; } .alert__text span { font-size: 12px; color: var(--muted); }
.alert__link { font-size: 12px; font-weight: 700; color: var(--brand-t, var(--brand)); white-space: nowrap; }

/* ───────────── Secciones con tabla ───────────── */
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-bar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; font-weight: 600; color: var(--muted); white-space: nowrap; border-radius: 12px; transition: color .2s var(--ease), background-color .2s var(--ease); }
.tab.is-active { color: var(--text); }
.tab__count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }

.kpi-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi-mini { position: relative; overflow: hidden; text-align: left; display: grid; gap: 2px; padding: 14px 16px 30px; border-radius: 16px; transition: box-shadow .25s var(--ease), transform .12s var(--ease); }
.kpi-mini:active { transform: scale(.98); }
.kpi-mini__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi-mini__value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.kpi-mini__spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26px; color: var(--brand); opacity: .9; }
.kpi-mini.is-total .kpi-mini__spark { color: var(--muted); }

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters__sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); transition: background-color .2s var(--ease), color .2s var(--ease); }
.pill .i { width: 15px; height: 15px; }
.pill.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }

.table-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; white-space: nowrap; }
.table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table .num { text-align: right; font-weight: 600; }
.table tbody tr { transition: background-color .15s var(--ease); }
.table tr.is-selected td { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.col-check { width: 44px; } .col-actions { width: 132px; text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; opacity: .55; transition: opacity .2s var(--ease); }
.table tbody tr:hover .row-actions, .table tr.is-selected .row-actions { opacity: 1; }
.row-actions .btn--icon { width: 32px; height: 32px; }
.row-actions .i { width: 16px; height: 16px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person > div { display: grid; min-width: 0; }
.person b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person--lg b { font-size: 18px; }
.course-cell { display: grid; gap: 6px; min-width: 180px; }
.course-cell__bar { display: flex; align-items: center; gap: 8px; }
.source { font-size: 12px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.source .i { width: 16px; height: 16px; color: var(--text); }
.link-cell { display: grid; gap: 2px; }
.link-cell code { font-size: 12px; color: var(--brand); }
.conv { display: flex; align-items: center; gap: 10px; }
.conv__bar { width: 80px; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.conv__bar span { display: block; height: 100%; background: var(--grad); }
.conv__txt { font-size: 12px; font-weight: 600; color: var(--muted); font-family: var(--font-num); }
.bulk { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; }
.bulk > span { margin-right: auto; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager__size { display: inline-flex; align-items: center; gap: 4px; }
.pager__size .i { width: 14px; height: 14px; }
.pager__nav { display: flex; }
.pager__nav .btn--icon { width: 32px; height: 32px; }

/* ───────────── Ventana centrada ───────────── */
.modal-layer { position: fixed; inset: 0; z-index: 1200; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px; background: rgba(28, 16, 20, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { width: min(720px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-lg); padding: 24px; display: grid; gap: 16px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__head-actions { display: flex; align-items: center; gap: 8px; }
.modal__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts div { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.facts dt { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { font-weight: 600; margin-top: 2px; }
.mini-courses { display: grid; gap: 10px; }
.mini-courses li { display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 10px; font-weight: 500; }
.timeline { display: grid; gap: 10px; border-left: 2px solid var(--line); padding-left: 16px; margin-left: 4px; }
.timeline li { position: relative; font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.timeline span { color: var(--muted); margin-left: auto; font-size: 12px; }
.memory { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.memory > .i { color: var(--brand); width: 20px; height: 20px; }
.memory div { display: grid; font-size: 13px; } .memory span { color: var(--muted); }

/* ───────────── Contenido ───────────── */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: var(--gap); }
.course-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; min-width: 0; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.course-card__body { padding: 16px 18px 6px; display: grid; gap: 8px; flex: 1; }
.course-card__top { display: flex; align-items: center; justify-content: space-between; }
.course-card__top .btn--icon { width: 32px; height: 32px; }
.course-card__title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.course-card__desc { font-size: 13px; color: var(--muted); }
.course-card__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); font-weight: 500; }
.course-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-card__meta .i { width: 15px; height: 15px; }
.course-card__progress { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.course-card__foot { display: flex; gap: 8px; padding: 12px 18px 18px; }
.course-card--new { align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 260px; border: 2px dashed color-mix(in srgb, var(--brand) 30%, transparent); color: var(--muted); }
.course-card--new .i { width: 30px; height: 30px; color: var(--brand); margin-bottom: 6px; }
.course-card--new b { color: var(--text); font-size: 15px; }
.course-card--row { flex-direction: row; align-items: center; }
.course-card--row .cover { width: 180px; height: 100%; min-height: 120px; aspect-ratio: auto; }

.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 8; display: grid; place-items: center; isolation: isolate; }
.cover--sm { aspect-ratio: auto; width: 74px; height: 74px; border-radius: 16px; flex: none; }
.cover--sm .cover__icon { width: 34px; height: 34px; }
.cover--sm .cover__icon .i { width: 18px; height: 18px; }
.cover--1 { background: linear-gradient(135deg, #f53d5c 0%, #f77778 50%, #fcad67 100%); }
.cover--2 { background: linear-gradient(135deg, #7c6cff 0%, #b67cf5 45%, #f57087 100%); }
.cover--3 { background: linear-gradient(135deg, #12a174 0%, #3fc79a 50%, #b6f0c9 100%); }
.cover--4 { background: linear-gradient(135deg, #3a6ff7 0%, #6aa2ff 50%, #c6dcff 100%); }
.cover__art { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .45), transparent 38%),
  radial-gradient(circle at 10% 110%, rgba(0, 0, 0, .18), transparent 45%),
  linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px) 0 0 / 22px 22px,
  linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px) 0 0 / 22px 22px; }
.cover__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #fff; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cover__icon .i { width: 28px; height: 28px; }

.insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.insight { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.insight > .i { width: 22px; height: 22px; color: var(--muted); }
.insight--warn > .i { color: var(--warn); }
.insight div { display: grid; font-size: 13px; } .insight span { color: var(--muted); }

.editor-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.back .i { width: 18px; height: 18px; }
.editor-bar__title { display: grid; }
.editor-bar__title h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.editor-bar__title span { font-size: 12px; }
.editor-bar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.editor { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.editor__main { display: grid; gap: var(--gap); min-width: 0; }
.editor__tree { padding: 18px 12px; position: sticky; top: calc(var(--topbar-h) + 8px); }
.editor__tree .card__head { padding: 0 8px; }
.tree-module { border-radius: 14px; margin-bottom: 6px; }
.tree-module__head { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: 13px; }
.tree-module__head b { flex: 1; }
.tree-module__head .i { width: 15px; height: 15px; color: var(--faint); }
.tree-module ul { display: none; padding: 0 6px 8px; }
.tree-module.is-open ul { display: grid; gap: 2px; }
.tree-lesson { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.tree-lesson .i { width: 15px; height: 15px; color: var(--faint); flex: none; }
.tree-lesson__t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-lesson__d { font-size: 11px; color: var(--muted); font-family: var(--font-num); }
.tree-lesson.is-current { color: var(--brand); font-weight: 600; background: color-mix(in srgb, var(--brand) 8%, transparent); }
.tree-lesson.is-current .i { color: var(--brand); }
.dot-on, .dot-off { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-on { background: var(--ok); } .dot-off { background: var(--faint); }
.tree-add { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--brand); }
.tree-add .i { width: 15px; height: 15px; }
.bunny { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); margin-bottom: 18px; }
.bunny__bar { display: grid; grid-template-columns: 240px 1fr; gap: 10px; }
.bunny__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bunny__item { position: relative; display: grid; gap: 6px; text-align: left; padding: 6px; border-radius: 14px; background: var(--surface); border: 2px solid transparent; }
.bunny__item.is-selected { border-color: var(--brand); }
.bunny__thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 10px; color: #fff; }
.bunny__thumb .i { width: 22px; height: 22px; }
.bunny__thumb em { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .45); font-family: var(--font-num); }
.bunny__name { font-size: 12px; font-weight: 600; padding: 0 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bunny__ok { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--brand); }
.bunny__ok .i { width: 13px; height: 13px; }
.drop { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--brand) 28%, transparent); color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.drop b { color: var(--brand); }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.file-chip > .i { width: 18px; height: 18px; color: var(--brand); }
.file-chip span { flex: 1; min-width: 0; }
.file-chip em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.file-chip .btn--icon { width: 30px; height: 30px; }

.settings-list { display: grid; }
.settings-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.settings-list li:first-child { border-top: 0; padding-top: 0; }
.settings-list li > div { display: grid; min-width: 0; }
.settings-list b { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.settings-list b .i { width: 16px; height: 16px; color: var(--muted); }
.settings-list span { font-size: 12.5px; color: var(--muted); }
.settings-list .li-col { display: grid; gap: 10px; }
.settings-list .li-col .progress { width: 100%; }
.provider { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.provider .i { color: var(--brand); width: 16px; height: 16px; }

/* ───────────── Conversaciones ───────────── */
.inbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inbox-bar__right { display: flex; align-items: center; gap: 14px; }
.engine { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.engine i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.engine--ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.inbox-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.inbox-kpi { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 16px; border-radius: 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.inbox-kpi b { font-size: 20px; color: var(--text); letter-spacing: -.02em; }
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; gap: 0; min-height: 0; height: 100%; border-radius: var(--r-xl); overflow: hidden; }
.inbox__list, .inbox__side { display: flex; flex-direction: column; min-height: 0; }
.inbox__list { border-right: 1px solid var(--line); }
.inbox__search { padding: 14px 14px 10px; }
.inbox__chips { display: flex; gap: 6px; padding: 0 14px 12px; overflow-x: auto; scrollbar-width: none; }
.threads { overflow-y: auto; flex: 1; padding: 0 8px 8px; }
.thread { position: relative; display: flex; gap: 12px; padding: 12px 10px; border-radius: 16px; transition: background-color .15s var(--ease); }
.thread__body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.thread__top { display: flex; justify-content: space-between; gap: 8px; }
.thread__top b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread__top time { font-size: 11px; color: var(--muted); flex: none; }
.thread__last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 22px; }
.thread__chips { display: flex; gap: 5px; align-items: center; }
.thread__chips .country { height: 20px; font-size: 10px; min-width: 26px; }
.unread { position: absolute; right: 12px; top: 34px; min-width: 20px; height: 20px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: var(--brand); }
.mode { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; }
.mode--ia { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.mode--humano { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); }
.score { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 6px; font-size: 10.5px; font-weight: 800; color: var(--muted); background: var(--surface-2); font-family: var(--font-num); }
.score--hot { color: #fff; background: var(--grad); }
.thread--caliente::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--grad); }

.inbox__thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.thread-head__who { flex: 1; min-width: 0; display: grid; }
.thread-head__who b { font-size: 15px; }
.thread-head__who span { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-head__who .i { width: 14px; height: 14px; color: var(--ok); }
.thread-head__chips { display: flex; align-items: center; gap: 8px; }
.back--icon { width: 36px; height: 36px; justify-content: center; border-radius: 50%; }
.messages { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; }
.day { text-align: center; margin: 4px 0 8px; }
.day span { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); }
.msg { max-width: min(72%, 520px); display: grid; gap: 3px; padding: 9px 13px 7px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
.msg p { margin: 0; }
.msg time { justify-self: end; font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.msg time .i { width: 13px; height: 13px; color: var(--info); }
.msg--in { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--surface-2); }
.msg--out { align-self: flex-end; border-bottom-right-radius: 6px; }
.msg__by { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--brand); }
.msg__by .i { width: 12px; height: 12px; }
.typing { align-self: flex-end; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 18px; background: color-mix(in srgb, var(--brand) 7%, transparent); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .5; }
.typing i:nth-child(3) { opacity: .75; } .typing i:nth-child(4) { opacity: 1; }
.composer { padding: 12px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.composer__window { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.composer__window .i { width: 14px; height: 14px; }
.composer__suggest { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.suggest { display: inline-flex; align-items: center; gap: 6px; max-width: 360px; padding: 7px 12px; border-radius: 12px; font-size: 12.5px; text-align: left; color: var(--text); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent); }
.suggest span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .i { width: 14px; height: 14px; color: var(--brand); }
.composer__box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.composer__box input { flex: 1; border: 0; outline: 0; background: none; height: 40px; }
.inbox__side { border-left: 1px solid var(--line); padding: 14px; gap: 12px; overflow-y: auto; }
.side-card { padding: 14px; border-radius: 16px; display: grid; gap: 10px; }
.side-card__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.side-card__title .i { width: 16px; height: 16px; color: var(--brand); }
.side-card__row { display: flex; gap: 8px; flex-wrap: wrap; }
.side-card p { font-size: 13px; }
.side-facts { display: grid; gap: 8px; }
.side-facts dt { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.side-facts dd { font-size: 13px; font-weight: 600; }
.next-action { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.next-action span { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.next-action p { margin-top: 2px; }
.memory-list { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.status-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 22%, transparent); }
.status-banner__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: var(--ok); flex: none; }
.status-banner > div { flex: 1; display: grid; }
.status-banner span { font-size: 13px; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tester { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--surface-2); }
.tester .msg--in { background: var(--surface); }
.tester__meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.tester__meta span { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; color: var(--muted); background: var(--surface); }
.identity { display: flex; align-items: center; gap: 16px; }

.lead-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.lead-note .i { width: 16px; height: 16px; color: var(--ok); }
.int-group { display: grid; gap: 12px; }
.int-group__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--gap); }
.int-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 14px; align-items: center; padding: 18px; border-radius: var(--r-lg); }
.int-card__logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); }
.int-card__logo .i { width: 22px; height: 22px; color: var(--text); }
.int-card__body { display: grid; min-width: 0; }
.int-card__body span { font-size: 12.5px; color: var(--muted); }
.int-card__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.int-card--err .int-card__foot .muted { color: var(--err); font-weight: 600; }

/* ───────────── Alumno ───────────── */
.week-goal { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: var(--r-pill); }
.week-goal div { display: grid; line-height: 1.25; }
.week-goal span { font-size: 12px; color: var(--muted); }
.ring { width: 52px; height: 52px; }
.ring__track { stroke: var(--surface-2); } .ring__fill { stroke: var(--brand); }
.continue { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; padding: 18px; border-radius: var(--r-xl); align-items: center; }
.continue__body { display: grid; gap: 10px; padding-right: 12px; }
.continue__title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.continue__progress { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.continue__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; display: grid; place-items: center; color: #fff; background: #120c0e; }
.player__poster { position: absolute; inset: 0; opacity: .9; }
.player__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .55)); }
.player__play { position: relative; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; color: var(--brand); background: rgba(255, 255, 255, .9); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.player__play .i { width: 28px; height: 28px; margin-left: 4px; }
.player__mark { position: absolute; top: 22%; left: 58%; font-size: 11px; opacity: .3; }
.player__controls { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; }
.player__controls .i { width: 18px; height: 18px; }
.player__time { font-family: var(--font-num); white-space: nowrap; }
.player__track { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.player__track span { display: block; height: 100%; background: #fff; }
.player__hd { font-size: 10px; padding: 1px 5px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 4px; }
.student-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.student-grid__main { display: grid; gap: 6px; min-width: 0; }
.student-grid__side { display: grid; gap: var(--gap); }
.my-courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.my-course { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; min-width: 0; }
.my-course__body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.my-course__body b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-course__body span.muted { font-size: 12px; }
.my-course__body .progress__num { display: none; }
.news { display: grid; gap: 8px; }
.news__item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; }
.news__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none; color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.news__item > div { flex: 1; display: grid; min-width: 0; }
.news__item span { font-size: 12.5px; color: var(--muted); }
.news__item time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.live { display: grid; gap: 10px; }
.live h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.live p { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.live p .i { width: 15px; height: 15px; }
.eyebrow--live { color: var(--err-t, var(--err)); }
.eyebrow--live i { width: 8px; height: 8px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 20%, transparent); }
.noa-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.noa-card > div { display: grid; font-size: 13px; } .noa-card span { color: var(--muted); }
.noa-card .btn { grid-column: 1 / -1; }
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.lesson__main { display: grid; gap: 14px; min-width: 0; }
.lesson__context { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 500; }
.lesson__context .i { width: 15px; height: 15px; }
.lesson__title { font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
.player--big { border-radius: var(--r-xl); }
.lesson__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lesson__nav { margin-left: auto; display: flex; gap: 8px; }
.prose h2 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.prose p { color: var(--muted); line-height: 1.65; }
.materials { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.materials summary { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; list-style: none; margin-bottom: 10px; }
.materials summary::-webkit-details-marker { display: none; }
.materials summary .muted { font-weight: 500; font-size: 12px; }
.materials summary .i:last-child { margin-left: auto; width: 16px; height: 16px; }
.next-lesson { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 16px 20px; border-radius: var(--r-lg); }
.next-lesson b { font-size: 15px; grid-column: 1; }
.next-lesson .i { grid-row: 1 / span 2; grid-column: 2; width: 22px; height: 22px; color: var(--brand); }
.syllabus { position: sticky; top: calc(var(--topbar-h) + 8px); display: grid; gap: 14px; }
.syllabus__head { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.syllabus__head > b { font-size: 15px; }
.syllabus__head .progress { width: 100%; }
.syllabus__module h3 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.syllabus__module ul { display: grid; gap: 2px; }
.syl { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 13px; }
.syl__icon { display: grid; place-items: center; }
.syl .i { width: 17px; height: 17px; }
.syl--done .i { color: var(--ok); }
.syl--now { font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.syl--now .i { color: var(--brand); }
.syl--todo .i, .syl--lock .i { color: var(--faint); }
.syl--lock { color: var(--muted); flex-wrap: wrap; }
.syl em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); margin-left: auto; }
.resources { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: var(--gap); }
.resource { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; }
.resource__cover { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: end center; padding-top: 18px; overflow: hidden; }
.resource__page { width: 56%; height: 100%; border-radius: 10px 10px 0 0; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 16px 14px; display: grid; gap: 8px; align-content: start; transform: translateY(14px) rotate(-2deg); }
.resource__page i { height: 7px; border-radius: 4px; background: #eee6e8; }
.resource__page i:first-child { width: 70%; height: 10px; background: #f6c7cf; }
.resource__page i:nth-child(3) { width: 85%; } .resource__page i:nth-child(4) { width: 60%; }
.resource__type { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 800; color: #fff; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px); }
.resource__body { padding: 14px 16px 4px; display: grid; gap: 4px; flex: 1; }
.resource__body b { font-size: 14px; }
.resource__body span { font-size: 12px; }
.resource__foot { display: flex; gap: 6px; padding: 10px 16px 16px; }
.account { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.profile-head > div { flex: 1; display: grid; }
.profile-head b { font-size: 18px; }

/* ───────────── Inicio de sesión ───────────── */
.is-standalone { background: var(--canvas); }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth__brand { position: relative; overflow: hidden; display: grid; place-items: center; padding: 48px; }
.auth__brand-inner { position: relative; max-width: 520px; display: grid; gap: 22px; }
.auth__brand h1 { font-size: 44px; line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth__points { display: grid; gap: 12px; font-size: 15px; }
.auth__points li { display: flex; align-items: center; gap: 10px; }
.auth__points .i { width: 20px; height: 20px; color: var(--brand); }
.auth__float { display: flex; align-items: center; gap: 12px; width: fit-content; padding: 12px 18px 12px 12px; border-radius: 20px; }
.auth__float div { display: grid; font-size: 13px; } .auth__float span { color: var(--muted); }
.auth__form-side { display: grid; place-items: center; padding: 48px 24px; }
.auth__form { width: min(400px, 100%); display: grid; gap: 16px; }
.auth__form h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.auth__alt { text-align: center; font-size: 14px; color: var(--muted); }
.auth__trust { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--faint); }
.auth__trust .i { width: 15px; height: 15px; color: var(--ok); }

/* ───────────── Ficha del sistema ───────────── */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.tile--colors, .tile--type { grid-column: span 1; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.swatch { display: grid; gap: 6px; font-size: 10px; color: var(--muted); }
.swatch b { font-weight: 600; font-family: ui-monospace, monospace; }
.swatch__chip { height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.grad-bar { height: 36px; border-radius: 12px; background: var(--grad); margin-top: 14px; }
.t-display { font-size: 38px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.t-h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.t-h2 { font-size: 18px; font-weight: 700; }
.t-body { font-size: 15px; color: var(--muted); }
.t-num { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.t-small { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.tile--type > p { margin-bottom: 8px; }
.icon-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.icon-cell { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: var(--surface-2); }
.icon-cell .i { width: 24px; height: 24px; }
.demo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tile--kpi { align-self: start; }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash__geo, .dash__sources { grid-column: span 6; } .dash__watch { grid-column: span 12; }
  .inbox { grid-template-columns: 300px minmax(0, 1fr) 280px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .my-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  :root { --pad: 20px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); transform: translateX(-104%); transition: transform .35s var(--ease); }
  .sidebar.is-open { transform: none; }
  .sidebar .sidebar__close { display: grid; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(28, 16, 20, .4); backdrop-filter: blur(4px); }
  .topbar .topbar__menu { display: grid; }
  .dash__chart, .dash__funnel { grid-column: span 12; }
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox__side { display: none; }
  .editor, .lesson, .student-grid, .split, .account { grid-template-columns: minmax(0, 1fr); }
  .editor__tree, .syllabus { position: static; }
  .continue { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  :root { --pad: 16px; --gap: 14px; --topbar-h: 60px; }
  body { font-size: 14px; }
  .content { padding-bottom: 120px; }
  .topbar { gap: 10px; }
  .topbar .topbar__mark { display: inline-block; width: 32px; height: 24px; }
  .topbar__search, .user-chip__text, .user-chip > .i, .topbar__theme, .seg--mode { display: none; }
  .crumbs .crumb:not(.is-current), .crumbs .crumb-sep { display: none; }
  .crumbs { font-size: 16px; }
  .user-chip { padding: 0; }
  .page-hero__title { font-size: 24px; }
  .page-hero__actions { width: 100%; }
  .page-hero__actions .seg--period { flex: 1; overflow-x: auto; }
  .ai-brief { flex-wrap: wrap; }
  .ai-brief__actions { width: 100%; }
  .ai-brief__actions .btn { flex: 1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px 14px 46px; }
  .kpi__value { font-size: 24px; }
  .kpi__sub { display: none; }
  .kpi--context { grid-column: span 2; }
  .dash > * { grid-column: span 12 !important; }
  .chart { height: 180px; }
  .sources { flex-direction: column; align-items: stretch; }
  .sources .donut { align-self: center; }
  .section-bar { flex-direction: column; align-items: stretch; }
  .section-bar > * { min-width: 0; max-width: 100%; }
  .section-bar__actions { margin-left: 0; flex-wrap: wrap; }
  .section-bar__actions .search-inline { flex: 1 1 100%; min-width: 0; }
  .section-bar__actions .btn--primary { flex: 1; }
  .section-bar__actions .input { flex: 1; }
  .kpi-strip { grid-template-columns: repeat(5, minmax(132px, 1fr)); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad); }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .pill { flex: none; }
  /* Tabla → tarjetas apiladas */
  .table-wrap { background: none !important; box-shadow: none !important; border: 0 !important; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody { display: grid; gap: 10px; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 14px; border-radius: 18px; }
  .table td { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; border: 0; white-space: normal; min-width: 0; }
  .table td > * { min-width: 0; }
  .table td.col-check { display: none; }
  .table td[data-col="principal"], .table td[data-col="enlace"] { grid-column: 1; }
  .table td.col-actions { grid-column: 2; grid-row: 1; width: auto; align-self: start; }
  .table td[data-col="estado"] { grid-column: 2; grid-row: 2; justify-content: flex-end; }
  .table td[data-label]:not([data-col="principal"]):not([data-col="enlace"]):not([data-col="estado"]) { grid-column: 1 / -1; font-size: 12.5px; }
  .table td[data-label]:not([data-col="principal"]):not([data-col="enlace"]):not([data-col="estado"])::before { content: attr(data-label); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  .table td[data-col="curso"] { display: grid; }
  .table td[data-label]:empty { display: none; }   /* A5: sin etiquetas huérfanas */
  .course-cell { min-width: 0; }
  .row-actions { opacity: 1; }
  .row-actions .btn--icon:not(:first-child) { display: none; }
  .bulk { flex-wrap: wrap; border-radius: 16px; margin-bottom: 10px; }
  .pager { border: 0; justify-content: space-between; padding: 10px 0; }
  .pager__size { display: none; }
  .modal-layer { place-items: end center; padding: 0; }
  .modal { border-radius: 26px 26px 0 0; max-height: 92vh; padding: 20px 16px 28px; }
  .modal__head .person span { white-space: normal; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .mini-courses li { grid-template-columns: 1fr auto; }
  .mini-courses li span:first-child { grid-column: 1 / -1; }
  .insights { grid-template-columns: minmax(0, 1fr); }
  .editor-bar__actions { width: 100%; margin: 0; }
  .editor-bar__actions .btn--primary { flex: 1; }
  .bunny__bar, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .bunny__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-bar { display: none; }
  .inbox-kpis { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad); }
  .content--app { padding-left: 0; padding-right: 0; padding-bottom: 92px; }
  .content--app .inbox-kpis { margin: 0; padding: 2px var(--pad); }
  .inbox { grid-template-columns: minmax(0, 1fr); border-radius: 0; background: none !important; box-shadow: none !important; border: 0 !important; }
  .inbox__list { border: 0; }
  .inbox__thread { display: none; }
  .is-thread .inbox__thread { display: flex; }
  .is-thread .tabbar, .is-thread .topbar { display: none !important; }
  .is-thread .content--app { padding: 0; grid-template-rows: minmax(0, 1fr); }
  .is-thread .inbox { height: 100vh; }
  .msg { max-width: 84%; }
  .composer__suggest .suggest { max-width: 260px; }
  .continue { padding: 12px; gap: 16px; }
  .continue__body { padding: 0 4px 6px; }
  .continue__title { font-size: 21px; }
  .continue__actions .btn { flex: 1; }
  .week-goal { width: 100%; border-radius: 18px; }
  .my-courses { grid-template-columns: minmax(0, 1fr); }
  .lesson__title { font-size: 22px; }
  .lesson__nav { margin-left: 0; width: 100%; }
  .lesson__nav .btn { flex: 1; }
  .lesson__actions > .btn--primary { flex: 1; }
  .course-card--row { flex-direction: column; align-items: stretch; }
  .course-card--row .cover { width: 100%; aspect-ratio: 16 / 8; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__brand { padding: 32px 20px 24px; }
  .auth__brand h1 { font-size: 30px; }
  .auth__points, .auth__float { display: none; }
  .auth__form-side { padding: 8px 20px 40px; align-items: start; }
  .tile-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-list li { flex-wrap: wrap; }
  .card { padding: 18px; }
  .tabbar { display: flex; }
}

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

/* ───────────── Ajustes tras la revisión visual ───────────── */
.sources__list b { white-space: nowrap; }
.kpi__head { min-height: 34px; align-items: flex-start; }
.kpi__label { line-height: 1.3; padding-top: 2px; }
.modal__body { display: grid; gap: 4px; }
.modal__body .memory { margin-top: 14px; }
.settings-list li > div.seg { display: inline-flex; flex: none; }
.tree-module.is-open ul { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 767px) {
  .sidebar { z-index: 60; }
  .nav-open .scrim { z-index: 55; }
  .thread-head { padding: 10px 12px; gap: 10px; }
  .thread-head .mode { display: none; }
  .thread-head__who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ===========================================================================
   Piezas de la plataforma (además de las de la propuesta)
   =========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.legend__dot.c1, .donut-seg.c1 { background: var(--c1); stroke: var(--c1); }
.legend__dot.c2, .donut-seg.c2 { background: var(--c2); stroke: var(--c2); }
.legend__dot.c3, .donut-seg.c3 { background: var(--c3); stroke: var(--c3); }
.legend__dot.c4, .donut-seg.c4 { background: var(--c4); stroke: var(--c4); }
.legend__dot.c5, .donut-seg.c5 { background: var(--c5); stroke: var(--c5); }
.progress__bar, .funnel__fill, .geo__bar span, .conv__bar span { width: 0; transition: width .6s var(--ease); }

/* Tema: el ícono del botón cambia según el modo */
.topbar__theme .tema-sol, .user-menu__tema .tema-sol { display: none; }
.theme-dark .topbar__theme .tema-sol, .theme-dark .user-menu__tema .tema-sol { display: inline-block; }
.theme-dark .topbar__theme .tema-luna, .theme-dark .user-menu__tema .tema-luna { display: none; }

/* Buscador dentro de una sección */
.search-inline { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--muted); min-width: 220px; }
.search-inline input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); }
.search-inline .i { width: 16px; height: 16px; }
.search-inline:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }

/* Menú de usuario */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 240px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.user-menu__who { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu__who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.user-menu__panel a, .user-menu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; font-weight: 600; font-size: 13.5px; text-align: left; }
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--surface-2); }
.user-menu__panel .i { width: 17px; height: 17px; color: var(--muted); }
.user-menu__panel form { margin: 0; }

.viewing-as form { margin: 0; }
.viewing-as button { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.seg--mode { margin: 0; }

/* Buscador ⌘K */
.palette { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(28, 16, 20, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.palette[hidden] { display: none; }
.palette__box { width: min(560px, 100%); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette__input { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette__input input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.palette__input .i { color: var(--muted); }
.palette__list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette__list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; }
.palette__list a span { font-size: 12px; font-weight: 500; color: var(--muted); }
.palette__list a.is-sel, .palette__list a:hover { background: var(--surface-2); color: var(--brand); }
.palette__vacio { padding: 18px; text-align: center; color: var(--muted); }

/* Avisos emergentes */
.toasts { position: fixed; z-index: 1400; right: 20px; bottom: 20px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; animation: toast-in .35s var(--ease) both; }
.toast .i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast--ok .i { color: #6fe3a4; } .toast--err .i { color: #ff8a8a; } .toast--info .i { color: var(--accent); }
.toast.is-out { animation: toast-out .25s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* Ventana centrada (oculta por defecto) */
.modal-layer[hidden] { display: none; }
.modal-layer { animation: fade-in .2s var(--ease) both; }
.modal-layer .modal { animation: modal-in .32s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal--sm { width: min(520px, 100%); }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.modal__note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13px; color: var(--muted); background: var(--surface-2); }
.modal__note .i { width: 18px; height: 18px; color: var(--brand); flex: none; }

/* Estados vacíos y «en construcción» */
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 20px; }
.empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -10px rgba(245, 61, 92, .55); }
.empty__icon .i { width: 30px; height: 30px; }
.empty h3 { font-size: 20px; letter-spacing: -.01em; }
.empty p { max-width: 460px; color: var(--muted); }
.soon-list { display: grid; gap: 10px; max-width: 520px; margin: 8px auto 0; text-align: left; }
.soon-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.soon-list .i { width: 18px; height: 18px; color: var(--brand); margin-top: 2px; flex: none; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.pulse-dot--demo { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); }

/* Filas ocultas por filtros y búsqueda */
.is-hidden { display: none !important; }
.table tbody tr[data-href] { cursor: pointer; }
.table-empty td { text-align: center; padding: 32px 14px; color: var(--muted); }

/* Bandeja: estados de carga y vista de conversación en móvil */
.thread { cursor: pointer; text-align: left; width: 100%; }
.messages.is-loading { opacity: .5; }
.composer.is-demo input { cursor: not-allowed; }
.composer__demo { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.composer__demo .i { width: 14px; height: 14px; color: var(--warn); }
.inbox__thread[hidden] { display: none; }

/* Inicio de sesión */
.auth__error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); border: 1px solid color-mix(in srgb, var(--err) 22%, transparent); }
.auth__error .i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.auth__demo { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; font-size: 13px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.auth__demo b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.input .ver-clave { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; color: var(--muted); border-radius: 8px; }
.input .ver-clave .i { width: 17px; height: 17px; }
.auth__theme { position: fixed; top: 16px; right: 16px; z-index: 5; }

/* Formularios guardando */
[aria-busy="true"] { opacity: .65; pointer-events: none; }

@media (max-width: 1100px) {
  .search-inline { min-width: 0; flex: 1; }
}
@media (max-width: 767px) {
  .toasts { right: 16px; left: 16px; bottom: 96px; max-width: none; }
  .search-inline kbd { display: none; }
  .user-menu__panel { position: fixed; top: 64px; right: 12px; }
  .palette { padding-top: 8vh; }
  .inbox.is-hilo .inbox__list { display: none; }
  .inbox.is-hilo .inbox__thread { display: flex; position: fixed; inset: 0; z-index: 70; background: var(--canvas); }
  .inbox:not(.is-hilo) .inbox__thread { display: none; }
}
.auth--simple { grid-template-columns: minmax(0, 1fr); }
.auth--simple .auth__form-side { min-height: 100vh; }
.engine--demo { color: var(--warn); background: color-mix(in srgb, var(--warn) 11%, transparent); }
.engine--demo i { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.thread-head__who > span .i { width: 14px; height: 14px; color: var(--ok); }
.thread-head .back--icon { display: none; }
@media (max-width: 767px) { .thread-head .back--icon { display: inline-flex; } }
@media (max-width: 767px) {
  .status-banner { flex-wrap: wrap; align-items: flex-start; }
  .status-banner > div { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .status-banner > .btn { flex: 1 1 100%; justify-content: center; }
}
.status-banner--demo { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 24%, transparent); }
.status-banner--demo .status-banner__icon { background: var(--warn); }
/* 032: la IA sin saldo o en su límite de gasto (Noa y Configuración → Integraciones). */
.status-banner--err { background: color-mix(in srgb, var(--err) 10%, var(--surface)); border-color: color-mix(in srgb, var(--err) 32%, transparent); margin-bottom: var(--gap, 16px); }
.status-banner--err .status-banner__icon { background: var(--err); }
.status-banner--err > .btn { flex: none; white-space: nowrap; }

/* ── Captación: leads, integraciones, editor de páginas, sistema ── */
.bandera { width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); flex: none; }
.idioma-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.source > span { display: grid; line-height: 1.25; }
.source em { font-style: normal; font-weight: 500; color: var(--faint); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source--meta .i { color: #0866ff; } .source--tiktok .i { color: var(--text); } .source--google .i { color: #ea4335; }
.source--pinterest .i { color: #e60023; } .source--snap .i { color: #e5c100; } .source--whatsapp .i { color: #25d366; }
tr[data-lead] { cursor: pointer; }
.form-grid--1 { grid-template-columns: minmax(0, 1fr); }
.field__hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.int-switch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; cursor: pointer; }
.int-resultado { padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 550; }
.int-resultado--ok { background: color-mix(in srgb, var(--ok) 11%, transparent); color: var(--ok); }
.int-resultado--err { background: color-mix(in srgb, var(--err) 11%, transparent); color: var(--err); }
.int-resultado[hidden] { display: none; }
/* Varios píxeles por plataforma: una pestaña por píxel y «Agregar otro» */
.int-pixeles { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.int-pixel { display: inline-flex; align-items: center; gap: 7px; height: 32px; max-width: 100%; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.int-pixel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.int-pixel:hover { color: var(--text); }
.int-pixel.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }
.int-pixel--agregar { border-style: dashed; color: var(--brand); background: transparent; }
.int-pixel--agregar .i { width: 15px; height: 15px; }
.int-pixel__punto { width: 7px; height: 7px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--muted) 55%, transparent); }
.int-pixel__punto--ok { background: var(--ok); }
.int-pixel__punto--err { background: var(--err); }
.int-panel[hidden] { display: none; }
.int-pixeles__nota { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.int-pixeles__nota .i { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.modal__foot .int-quitar { margin-right: auto; color: var(--err); }
.lead-estado { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lead-estado select { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.facts--lista { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.facts--lista div { display: flex; gap: 12px; justify-content: space-between; padding: 9px 12px; }
.facts--lista dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-size: 13px; }
.timeline li.timeline--lead b { color: var(--brand); }
.timeline li.timeline--lead::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.editor-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.editor-pagina { display: grid; gap: 12px; }
.editor-bloque { padding: 0; }
.editor-bloque > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; }
.editor-bloque > summary::-webkit-details-marker { display: none; }
.editor-bloque > summary .i { margin-left: auto; color: var(--muted); transition: transform .2s; }
.editor-bloque[open] > summary .i { transform: rotate(180deg); }
.editor-bloque > .form-grid { padding: 0 20px 18px; margin: 0; }
.editor-bloque__n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 750; color: #fff; background: var(--grad); flex: none; }
.editor-acciones { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 18px; background: var(--glass-strong, var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi-num { font-weight: 750; font-variant-numeric: tabular-nums; }
.log { margin: 0; padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.settings-form .form-grid { margin-top: 6px; }
.auth__top { position: fixed; top: 16px; right: 16px; z-index: 30; display: flex; align-items: center; gap: 8px; }
.auth__top .auth__theme { position: static; }
.pub-idioma { position: relative; }
.pub-idioma summary { list-style: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 650; background: var(--surface); border: 1px solid var(--line); }
.pub-idioma summary::-webkit-details-marker { display: none; }
.pub-idioma summary .i { width: 14px; height: 14px; }
.pub-idioma__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.pub-idioma__menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 550; }
.pub-idioma__menu a:hover, .pub-idioma__menu a[aria-current] { background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand-t, var(--brand)); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-cab { flex-wrap: wrap; }
  .editor-acciones { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .editor-acciones .btn { flex: 1; }
  .modal__actions { flex-wrap: wrap; }
}

/* ── Páginas (lista de embudos y crear nueva) ── */
.paginas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.pagina-card { display: grid; gap: 14px; align-content: start; }
.pagina-card__cab { display: flex; align-items: flex-start; gap: 12px; }
.pagina-card__cab > div { flex: 1; display: grid; min-width: 0; }
.pagina-card__cab b { font-size: 15px; }
.pagina-card__cab span, .pagina-card__cab a { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagina-card__datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.pagina-card__datos div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pagina-card__datos dt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pagina-card__datos dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.pagina-card__pie { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagina-card--nueva { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 200px; border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, transparent) !important; background: color-mix(in srgb, var(--brand) 4%, transparent) !important; box-shadow: none !important; text-align: center; color: var(--muted); }
.pagina-card--nueva .i { width: 28px; height: 28px; color: var(--brand); }
.pagina-card--nueva b { color: var(--text); }
.mas-menu { position: relative; margin-left: auto; }
.mas-menu > summary { list-style: none; } .mas-menu > summary::-webkit-details-marker { display: none; }
.mas-menu__panel { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 250px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.mas-menu__panel a, .mas-menu__panel button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; text-align: left; width: 100%; }
.mas-menu__panel a:hover, .mas-menu__panel button:hover { background: var(--surface-2); }
.mas-menu__panel .i { width: 16px; height: 16px; color: var(--muted); }
.cz-rojo, .mas-menu__panel .cz-rojo .i { color: var(--err-t, var(--err)); }
.archivadas { margin-top: var(--gap); }
.archivadas > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 650; color: var(--muted); padding: 8px 0; }
.archivadas > summary::-webkit-details-marker { display: none; }
.archivadas .settings-list { margin-top: 8px; padding: 6px 18px; border-radius: 18px; background: var(--glass, var(--surface)); border: 1px solid var(--line); }
.nueva-pagina { display: grid; gap: 18px; max-width: 980px; }
.plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.plantilla { position: relative; display: grid; gap: 10px; padding: 10px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.plantilla:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.plantilla input { position: absolute; opacity: 0; pointer-events: none; }
.plantilla:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.plantilla__vista { display: grid; gap: 6px; padding: 12px; height: 120px; border-radius: 12px; background: linear-gradient(160deg, #fff1f4, #ffe3d2); align-content: start; }
.plantilla__vista i { display: block; height: 10px; border-radius: 5px; background: rgba(245, 61, 92, .22); }
.plantilla__vista i:nth-child(1) { width: 40%; height: 8px; background: rgba(245, 61, 92, .35); }
.plantilla__vista i:nth-child(2) { width: 85%; height: 16px; background: rgba(29, 20, 22, .55); }
.plantilla__vista i:nth-child(4) { width: 46%; height: 18px; border-radius: 9px; background: var(--grad); }
.plantilla__vista--vsl { grid-template-columns: 1fr 1fr; } .plantilla__vista--vsl i:nth-child(3) { grid-row: 1 / 4; grid-column: 2; height: 64px; border-radius: 8px; background: var(--grad); }
.plantilla__vista--captacion i:nth-child(3) { height: 44px; background: #fff; border: 1px solid rgba(245, 61, 92, .25); }
.plantilla__vista--encuesta i:nth-child(3) { height: 32px; background: repeating-linear-gradient(180deg, rgba(245, 61, 92, .18) 0 9px, transparent 9px 12px); }
.plantilla__vista--blanco { background: repeating-linear-gradient(45deg, #fafafa 0 8px, #f2eef0 8px 16px); } .plantilla__vista--blanco i { visibility: hidden; }
.plantilla__txt { display: grid; gap: 3px; }
.plantilla__txt b { font-size: 14px; } .plantilla__txt span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.plantilla__txt em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--brand-t, var(--brand)); }
.bunny-buscar { margin: 4px 0 12px; } .bunny-buscar input { padding-left: 4px; }
.bunny-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; max-height: 60vh; overflow-y: auto; }
.bunny-video { display: grid; gap: 4px; text-align: left; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; }
.bunny-video:hover { border-color: var(--brand); }
.bunny-video__img { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--grad); }
.bunny-video__img img { width: 100%; height: 100%; object-fit: cover; }
.bunny-video span { color: var(--muted); font-size: 11.5px; } .bunny-video code { font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagina-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagina-chip .i { width: 15px; height: 15px; color: var(--brand); flex: none; }
.lead-editar { padding: 14px 16px; margin: 0 0 6px; border-radius: 16px; background: var(--surface-2); }
.lead-editar[hidden] { display: none; }
.lead-editar .form-grid { margin-bottom: 10px; }
.totp-pasos { margin: 14px 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.totp-pasos b { color: var(--text); }
.totp-alta { display: grid; gap: 12px; }
.totp-alta[hidden] { display: none; }
.totp-clave { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.totp-clave code { flex: 1; min-width: 200px; font-size: 15px; font-weight: 700; letter-spacing: .08em; overflow-wrap: anywhere; }
.totp-form { margin-top: 14px; }
.seguridad-lista li > div span { font-size: 12.5px; }
.auth__2fa-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--grad); margin-bottom: 6px; }
.auth__2fa-ic .i { width: 28px; height: 28px; }
.auth__2fa-ic + h2, .reg-paso + h2 { margin-top: -4px; }
/* Verificación pública de un certificado: etiqueta chica y gris, valor grande (lo lee un empleador). */
.cert-validar__ok { background: var(--ok); }
.cert-validar__datos { margin: 0; display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.cert-validar__datos > div { display: grid; gap: 2px; padding: 12px 16px; min-width: 0; }
.cert-validar__datos > div + div { border-top: 1px solid var(--line); }
.cert-validar__datos dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cert-validar__datos dd { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.cert-validar__datos code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .14em; }
.cert-validar__form { display: grid; gap: 12px; margin-top: 4px; }
.skin-a .cert-validar__datos { background: rgba(255, 255, 255, .72); border-color: var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.theme-dark .skin-a .cert-validar__datos { background: rgba(32, 20, 25, .72); }

/* Crear cuenta (Wiio Academy): paso 1 datos · paso 2 confirmar correo */
.reg-paso { display: inline-flex; align-items: center; width: fit-content; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.reg-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-tel { gap: 0; padding: 0; overflow: hidden; }
.reg-tel select { height: 100%; flex: none; padding: 0 28px 0 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; outline: 0; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer;
  background: color-mix(in srgb, var(--text) 3%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23998a8f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px; -webkit-appearance: none; appearance: none; }
.reg-tel select option { color: #1d1a20; background: #fff; }
.reg-tel input { padding: 0 14px; }
.input.is-error, .input:has([aria-invalid="true"]) { border-color: var(--err); }
.reg-acepto { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.reg-acepto input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--brand); cursor: pointer; }
.reg-acepto .link { display: inline; font-weight: 600; }
.reg-acepto.is-error { color: var(--err); }
.reg-nota { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.reg-nota .i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.reg-siguiente { display: grid; gap: 6px; margin-top: 6px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 36px -26px rgba(60, 20, 30, .45); }
.reg-siguiente__eti { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.reg-siguiente b { font-size: 16px; letter-spacing: -.01em; }
.reg-siguiente p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.reg-siguiente__btn { color: #fff; background: linear-gradient(180deg, #2a2326 0%, #121011 100%); }
.reg-siguiente__btn:hover { box-shadow: 0 10px 24px -10px rgba(18, 16, 17, .7); }
.theme-dark .reg-siguiente__btn { background: #fff; color: #121011; }

/* ── Páginas v2: filtro de periodo y tarjetas con métricas ── */
.periodo { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: var(--gap); }
.periodo__lab { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
.periodo__lab .i { width: 16px; height: 16px; color: var(--brand); }
.periodo__rango { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.periodo__rango[hidden] { display: none; }
.periodo__rango input { height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.periodo__txt { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.pcard { display: grid; gap: 14px; align-content: start; padding: 18px; }
.pcard__cab { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pcard__ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.pcard__ic .i { width: 19px; height: 19px; }
.pcard__tit { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pcard__tit b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__tit a { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.pcard__cab .mas-menu { margin-left: 0; }
.pcard__cab .mas-menu__panel { top: calc(100% + 6px); bottom: auto; }
.pcard__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcard__chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.pcard__met { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.pcard__m { display: grid; gap: 2px; padding: 12px 14px; min-width: 0; }
.pcard__m + .pcard__m { border-left: 1px solid var(--line); }
.pcard__m span { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__m b { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pcard__m--conv b { color: var(--brand); }
.pcard__m--suave b { color: var(--faint); }
.pcard__pie { display: flex; gap: 8px; flex-wrap: wrap; }
.pagina-card--nueva { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 230px; border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, transparent) !important; background: color-mix(in srgb, var(--brand) 4%, transparent) !important; box-shadow: none !important; text-align: center; color: var(--muted); padding: 18px; }
/* Ventana de estadísticas */
.modal--stats { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.stats-periodo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.stats-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stats-kpis div { padding: 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 2px; }
.stats-kpis span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats-kpis b { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stats-graf { width: 100%; height: 190px; display: block; margin-bottom: 6px; }
.stats-graf .g-bar { fill: color-mix(in srgb, var(--brand) 30%, transparent); }
.stats-graf .g-lead { fill: var(--brand); }
.stats-graf text { font-size: 10px; fill: var(--muted); }
.stats-leyenda { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.stats-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.stats-leyenda .l1 { background: color-mix(in srgb, var(--brand) 30%, transparent); } .stats-leyenda .l2 { background: var(--brand); border-radius: 50%; }
.stats-pasos { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stats-pasos th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.stats-pasos td { padding: 10px; border-bottom: 1px solid var(--line); }
.stats-pasos td:not(:first-child), .stats-pasos th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.stats-barra { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.stats-barra i { display: block; height: 100%; background: var(--grad); border-radius: 3px; }
@media (max-width: 767px) { .stats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .periodo__txt { margin-left: 0; width: 100%; } }
.etq-lista { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.etq-lista--ficha { margin: 0 0 12px; }
.etq { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 650; color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, transparent); }
.filtro-etq { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.filtro-etq .i { width: 15px; height: 15px; color: var(--brand); }
.filtro-etq select { border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; outline: 0; }
.filtro-etq:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }   /* el select no tiene anillo propio */
tr.is-oculta-etq { display: none !important; }
.field--ancho { grid-column: 1 / -1; }

a.sidebar__status { color: inherit; text-decoration: none; }
/* ── Tablero real (Inicio) ── */
.tb-vivo { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.tb-vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.tb-vivo b { color: var(--text); font-family: var(--font-num); }
.tb-vivo.is-on i { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: tb-pulso 1.8s infinite; }
.tb-vivo--mini { height: 24px; padding: 0 9px; font-size: 11px; }
@keyframes tb-pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tb-periodo { margin-bottom: 0; }
.tb-lecturas { align-items: flex-start; }
.tb-lecturas__txt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.tb-lecturas__txt ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.tb-l { position: relative; padding-left: 16px; color: var(--text); }
.tb-l::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.tb-l--ok::before { background: var(--ok); } .tb-l--warn::before { background: var(--warn); }
.tb-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tb-kpi .kpi__value { font-size: 27px; }
.delta.is-igual { color: var(--muted); background: var(--surface-2); }
.tb-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.tb-c { min-width: 0; }
.tb-c--grafico { grid-column: span 8; } .tb-c--embudo { grid-column: span 4; }
.tb-c--mapa { grid-column: span 12; }
.tb-c--fuentes, .tb-c--campanas { grid-column: span 6; }
.tb-c--paginas { grid-column: span 7; } .tb-c--horario { grid-column: span 5; }
.tb-c--equipos, .tb-c--actividad, .tb-c--leads { grid-column: span 4; }
.tb-c--alertas { grid-column: span 12; }
/* Gráfica */
.tb-grafico svg { display: block; width: 100%; height: auto; }
.tg__guia { stroke: var(--line); stroke-dasharray: 4 6; }
.tg__y { font-size: 10px; fill: var(--faint); text-anchor: end; font-family: var(--font-num); }
.tg__x { font-size: 10px; fill: var(--faint); text-anchor: middle; font-family: var(--font-num); }
.tg__barra { fill: color-mix(in srgb, var(--brand) 30%, transparent); transition: fill .15s; }
.tg__barra:hover { fill: var(--brand); }
.tg__linea { fill: none; stroke: var(--accent-strong, #f08a2c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tg__punto { fill: var(--surface); stroke: var(--accent-strong, #f08a2c); stroke-width: 2.5; }
.tb-dot-reg { background: var(--accent-strong, #f08a2c); }
/* Barras finas reutilizables */
.tb-barra { display: block; height: 7px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; min-width: 30px; }
.tb-barra > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .6s var(--ease); }
/* Embudo */
.tb-embudo { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tb-embudo__fila { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.tb-embudo__ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.tb-embudo__ic .i { width: 15px; height: 15px; }
.tb-embudo__txt { display: grid; gap: 5px; min-width: 0; }
.tb-embudo__txt b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-embudo__num { display: grid; justify-items: end; line-height: 1.15; }
.tb-embudo__num b { font-size: 14px; font-family: var(--font-num); }
.tb-embudo__num em { font-style: normal; font-size: 11px; color: var(--muted); }
/* Mapa */
.tb-mapa { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: center; }
.tb-mapa__lienzo { position: relative; }
.tb-mapa__lienzo img { display: block; width: 100%; height: auto; opacity: .55; }
.theme-dark .tb-mapa__lienzo img { opacity: .3; filter: invert(1); }
.tb-mapa__capa { position: absolute; inset: 0; width: 100%; height: 100%; }
.tb-burbuja__c { fill: color-mix(in srgb, var(--brand) 55%, transparent); stroke: var(--brand); stroke-width: 1.5; cursor: help; transition: fill .15s; }
.tb-burbuja:hover .tb-burbuja__c { fill: var(--brand); }
.tb-burbuja__halo { fill: none; stroke: var(--brand); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.tb-burbuja.is-vivo .tb-burbuja__halo { animation: tb-halo 1.8s ease-out infinite; }
.tb-burbuja.is-vivo .tb-burbuja__c { fill: color-mix(in srgb, var(--ok) 60%, transparent); stroke: var(--ok); }
.tb-burbuja.is-vivo .tb-burbuja__halo { stroke: var(--ok); }
@keyframes tb-halo { 0% { opacity: .8; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.6); } }
.tb-paises { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tb-paises li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 60px auto; align-items: center; gap: 8px; font-size: 13px; }
.tb-paises li .tb-paises__n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-paises li b { font-family: var(--font-num); text-align: right; min-width: 34px; }
.tb-paises li em { grid-column: 2 / -1; margin-top: -6px; font-style: normal; font-size: 11px; color: var(--muted); }
/* Tablas */
.tb-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb-tabla th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--muted); padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.tb-tabla td { padding: 9px 8px; border-bottom: 1px solid var(--line); font-family: var(--font-num); white-space: nowrap; }
.tb-tabla td:first-child { font-family: inherit; display: flex; align-items: center; gap: 7px; }
.tb-tabla td:first-child .i { width: 15px; height: 15px; color: var(--muted); flex: none; }
.tb-tabla th:not(:first-child), .tb-tabla td:not(:first-child) { text-align: right; }
.tb-tabla tr:last-child td { border-bottom: 0; }
.tb-tabla__largo { white-space: normal !important; display: grid !important; gap: 1px; max-width: 280px; word-break: break-word; }
.tb-tabla__largo small { font-size: 11px; color: var(--muted); }
.tb-c--fuentes .sources { align-items: center; }
.tb-c--fuentes .sources > svg { flex: 0 1 auto; min-width: 110px; height: auto; }   /* el anillo cede espacio: la tabla no se sale de la tarjeta */
.tb-c--fuentes .tb-tabla { flex: 1; min-width: auto; }
.tb-vacio { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--muted); }
.tb-vacio .i { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 2px; }
.tb-vacio code { font-size: 12px; word-break: break-all; color: var(--text); }
.tb-ref { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tb-ref li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tb-ref li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-ref .i { width: 14px; height: 14px; color: var(--muted); }
/* Mapa de calor */
.tb-calor { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.tb-calor__h { font-size: 9.5px; color: var(--faint); text-align: center; font-family: var(--font-num); }
.tb-calor__d { font-size: 11px; color: var(--muted); font-weight: 600; }
.tb-calor__c { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.tb-calor__c.n1 { background: color-mix(in srgb, var(--brand) 18%, var(--surface-2)); }
.tb-calor__c.n2 { background: color-mix(in srgb, var(--brand) 36%, var(--surface-2)); }
.tb-calor__c.n3 { background: color-mix(in srgb, var(--brand) 55%, var(--surface-2)); }
.tb-calor__c.n4 { background: color-mix(in srgb, var(--brand) 75%, var(--surface-2)); }
.tb-calor__c.n5 { background: var(--brand); }
/* Equipos */
.tb-mini { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 7px; }
.tb-mini li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 44px; align-items: center; gap: 8px; font-size: 12.5px; }
.tb-mini li span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-mini li b { text-align: right; font-family: var(--font-num); }
/* Actividad */
.tb-act { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.tb-act__i { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-radius: 12px; }
.tb-act__i div { display: grid; min-width: 0; }
.tb-act__i b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-act__i span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-act__i time { font-size: 11px; color: var(--faint); white-space: nowrap; }
.tb-act__ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.tb-act__ic .i { width: 15px; height: 15px; }
.tb-act__i--lead .tb-act__ic { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tb-act__i--whatsapp_click .tb-act__ic { color: #128c4b; background: color-mix(in srgb, #25d366 14%, transparent); }
.tb-act__i--form_start .tb-act__ic, .tb-act__i--video_play .tb-act__ic { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.tb-c--alertas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
.tb-c--alertas > .card__head { grid-column: 1 / -1; }
.tb-c--alertas > .mini-title { grid-column: 2; grid-row: 2; margin-top: 0; }
.tb-c--alertas > .alerts { grid-column: 1; grid-row: 2 / span 2; }
.tb-c--alertas > .who { grid-column: 2; grid-row: 3; }
@media (max-width: 1360px) {
  .tb-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-c--equipos, .tb-c--actividad, .tb-c--leads { grid-column: span 6; }
  .tb-c--actividad { grid-column: span 12; }
}
@media (max-width: 1100px) {
  .tb-c--grafico, .tb-c--embudo, .tb-c--fuentes, .tb-c--campanas, .tb-c--paginas, .tb-c--horario { grid-column: span 12; }
  .tb-mapa { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .tb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-kpi { padding: 14px 14px 48px; }
  .tb-kpi .kpi__value { font-size: 22px; }
  .tb-kpi .kpi__sub { font-size: 11px; }
  .tb-c--equipos, .tb-c--actividad, .tb-c--leads { grid-column: span 12; }
  .tb-c--alertas { grid-template-columns: minmax(0, 1fr); }
  .tb-c--alertas > .alerts, .tb-c--alertas > .mini-title, .tb-c--alertas > .who { grid-column: 1; grid-row: auto; }
  .tb-c--alertas > .mini-title { margin-top: 16px; }
  .tb-c--fuentes .sources { flex-direction: column; }
  .tb-calor { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .tb-calor__c { border-radius: 2px; }
  .tb-tabla { font-size: 12px; }
  .tb-tabla td, .tb-tabla th { padding-left: 5px; padding-right: 5px; }
  .tb-tabla__largo { max-width: 150px; }
  .page-hero__actions { flex-wrap: wrap; }
  .tb-periodo .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tb-periodo .seg::-webkit-scrollbar { display: none; }
  .tb-paises li { grid-template-columns: 34px minmax(0, 1fr) 46px auto; }
}

/* ── Manual (/admin/ayuda) ── */
.ay { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.ay-indice { position: sticky; top: 84px; display: grid; gap: 10px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 2px; }
.ay-buscar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ay-buscar .i { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ay-buscar input { border: 0; background: none; outline: none; width: 100%; min-width: 0; font: inherit; font-size: 13.5px; color: var(--text); }
.ay-buscar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.ay-indice nav { display: grid; gap: 2px; }
.ay-indice nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--muted); font-size: 13.5px; text-decoration: none; }
.ay-indice nav a span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.ay-indice nav a:hover { background: var(--surface); color: var(--text); }
.ay-indice nav a.is-on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 0 var(--line); }
.ay-indice nav a.is-on span { background: var(--brand); color: #fff; }
.ay-cuerpo { display: grid; gap: 16px; min-width: 0; }
.ay-portada { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, var(--accent) 14%, var(--surface))); border: 1px solid var(--line); }
.ay-portada__ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
.ay-portada__ic .i { width: 24px; height: 24px; }
.ay-portada > div { flex: 1; min-width: 0; }
.ay-portada h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ay-portada p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ay-cap { padding: 22px 24px; scroll-margin-top: 84px; }
.ay-cap h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; letter-spacing: -.01em; }
.ay-cap h2 em { font-style: normal; color: var(--faint); font-weight: 600; }
.ay-cap__ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); flex: none; }
.ay-cap__ic .i { width: 18px; height: 18px; }
.ay-texto { font-size: 14.5px; line-height: 1.65; color: var(--text); max-width: 760px; overflow-wrap: anywhere; }   /* direcciones largas (UTM) no desbordan en el celular */
.ay-texto p { margin: 0 0 12px; }
.ay-texto h3 { margin: 18px 0 8px; font-size: 15px; }
.ay-texto ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.ay-lead { font-size: 15.5px; }
.ay-pasos { counter-reset: paso; list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.ay-pasos li { counter-increment: paso; position: relative; padding: 10px 12px 10px 46px; border-radius: 12px; background: var(--surface-2); }
.ay-pasos li::before { content: counter(paso); position: absolute; left: 12px; top: 9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #cf1f45; color: #fff; font-size: 12px; font-weight: 700; }
.ay-tip, .ay-ojo { display: block; padding: 11px 14px 11px 14px; border-radius: 12px; border-left: 3px solid; }
.ay-tip { background: color-mix(in srgb, #12a150 9%, transparent); border-color: #12a150; }
.ay-tip::before { content: "Consejo · "; font-weight: 700; color: var(--ok-t, #0e8a44); }
.ay-ojo { background: color-mix(in srgb, #f5a524 12%, transparent); border-color: #f5a524; }
.ay-ojo::before { content: "Ojo · "; font-weight: 700; color: var(--warn-t, #b07300); }
html[lang="en"] .ay-tip::before { content: "Tip · "; } html[lang="en"] .ay-ojo::before { content: "Note · "; }
html[lang="zh-CN"] .ay-tip::before { content: "提示 · "; } html[lang="zh-CN"] .ay-ojo::before { content: "注意 · "; }
.ay-glosario, .ay-zonas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0 0 14px; }
.ay-glosario > div, .ay-zonas > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.ay-glosario span, .ay-zonas span { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ay-ejemplo { padding: 14px 16px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); background: color-mix(in srgb, var(--brand) 4%, transparent); margin: 0 0 14px; }
.ay-ejemplo ul { margin: 8px 0 0; }
.ay-tabla { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 13.5px; }
.ay-tabla th, .ay-tabla td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ay-tabla th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ay-tabla td:first-child { font-weight: 600; white-space: nowrap; }
.ay-faq dt { font-weight: 700; margin-top: 12px; }
.ay-faq dd { margin: 4px 0 0; color: var(--muted); }
.ay-nada { text-align: center; color: var(--muted); padding: 30px; }
.ay-cap[hidden], .ay-indice a[hidden] { display: none; }
@media (max-width: 900px) {
  .ay { grid-template-columns: minmax(0, 1fr); }
  .ay-indice { position: sticky; top: 56px; z-index: 5; max-height: none; overflow: visible; background: var(--canvas); padding: 8px 0; margin: -8px 0 0; }
  .ay-indice nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .ay-indice nav a { flex: none; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); }
  .ay-portada { flex-wrap: wrap; padding: 18px; }
  .ay-cap { padding: 18px 16px; scroll-margin-top: 140px; }
  .ay-tabla td:first-child { white-space: normal; }
}

/* Aviso flotante de WhatsApp nuevo (cualquier pantalla) */
.toast--chat { text-decoration: none; cursor: pointer; }
.toast--chat span { display: grid; gap: 2px; }
.toast--chat b { font-size: 13px; }
.toast--chat .i { color: #25d366 !important; }

/* Idioma del panel (ES · EN · 中文) */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu__btn { width: auto !important; padding: 0 10px; gap: 6px; }
.lang-menu__btn b { font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.lang-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 190px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; margin: 0; }
.lang-menu__panel p { margin: 0; padding: 6px 10px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lang-menu__panel button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; font-weight: 600; font-size: 14px; text-align: left; }
.lang-menu__panel button:hover, .lang-menu__panel button.is-active { background: var(--surface-2); }
.lang-menu__panel .i { width: 16px; height: 16px; color: var(--brand); }
.skin-a .lang-menu__panel { background: rgba(255, 255, 255, .97); border-color: var(--glass-line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.theme-dark .skin-a .lang-menu__panel { background: rgba(32, 20, 25, .97); }
@media (max-width: 767px) { .lang-menu__panel { position: fixed; top: 64px; right: 12px; } }
/* Dentro de una tarjeta (Mi cuenta): .card usa backdrop-filter y crea su propio apilado; mientras el menú está abierto,
   la tarjeta sube sobre las siguientes. En el celular el menú se abre junto a su botón, no bajo la barra superior. */
.card:has(.lang-menu[open]) { position: relative; z-index: 5; }
@media (max-width: 767px) { .card .lang-menu__panel { position: absolute; top: calc(100% + 8px); right: 0; } }
/* Chino: Inter no trae esos caracteres; se usan las fuentes del sistema */
html[lang="zh-CN"] { --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", system-ui, sans-serif; }

/* Confirmación con el diseño del panel (confirmar() en app.js) */
.confirmar__texto { margin: 0; font-size: 15px; line-height: 1.55; }
.btn.confirmar--peligro { background: var(--err); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--err) 80%, transparent); }

/* ── Video de Bunny: reproductor de la lección y video elegido en el editor ── */
.player--video { display: block; background: #000; }
.player--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player--video .player__mark { pointer-events: none; z-index: 1; top: 12px; left: auto; right: 14px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.player__vacio { position: relative; display: grid; justify-items: center; gap: 8px; margin: 0; padding: 0 20px; text-align: center; font-weight: 600; }
.player__vacio .i { width: 30px; height: 30px; opacity: .85; }
.bunny-elegido { display: grid; grid-template-columns: 148px minmax(0, 1fr); grid-template-areas: "img txt" "img acc"; align-items: center; column-gap: 14px; row-gap: 8px; }
.bunny-elegido__img { grid-area: img; position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; color: #fff; background: var(--grad); }
.bunny-elegido__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bunny-elegido__img .i { position: relative; width: 22px; height: 22px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.bunny-elegido__txt { grid-area: txt; align-self: end; display: grid; gap: 3px; min-width: 0; }
.bunny-elegido__txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bunny-elegido__txt code { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bunny-elegido__acc { grid-area: acc; align-self: start; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .bunny-elegido { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "img txt" "acc acc"; }
}
.pcard__chip--aviso { color: var(--warn-t, var(--warn)); background: rgba(245, 158, 11, .12); }
.plantilla__vista--grupo { grid-template-columns: 1.3fr 1fr; } .plantilla__vista--grupo i:nth-child(3) { grid-row: 1 / 4; grid-column: 2; height: 70px; width: 60%; justify-self: center; border-radius: 8px; background: var(--grad); } .plantilla__vista--grupo i:nth-child(4) { background: #25d366; }
.error-detalle__tit { max-width: 560px; margin: 0 auto 8px; font-size: 12px; color: var(--muted); }
.error-detalle { max-width: 560px; margin: 0 auto 16px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; white-space: pre-wrap; word-break: break-word; text-align: left; }
.importar-pagina { margin-top: 16px; }
.importar-pagina__zona { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1.5px dashed rgba(245, 61, 92, .35); border-radius: 16px; cursor: pointer; background: var(--surface-2); }
.importar-pagina__zona:hover { border-color: var(--brand); }
.importar-pagina__zona > .i { width: 26px; height: 26px; color: var(--brand); flex: none; }
.importar-pagina__zona span { display: grid; gap: 2px; } .importar-pagina__zona b { font-size: 14px; } .importar-pagina__zona em { font-style: normal; font-size: 12px; color: var(--muted); }
.importar-pagina__zona input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.importar-pagina[aria-busy="true"] { opacity: .6; pointer-events: none; }
.lead-banderas { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lead-bandera { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.lead-bandera .i { width: 12px; height: 12px; }
.lead-bandera--alumno { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }

/* ── Ficha del lead: una persona, una ficha (16/10/2026) ── */
.camino { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; min-width: 0; max-width: 100%; }
.camino li { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; font-size: 11px; color: var(--muted); }
.camino li::before { content: ""; position: absolute; top: 11px; left: calc(-50% + 12px); right: calc(50% + 12px); height: 2px; background: var(--line); }
.camino li:first-child::before { display: none; }
.camino li.is-hecho::before { background: var(--grad); }
.camino__punto { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: #fff; }
.camino li.is-hecho .camino__punto { border: 0; background: var(--grad); }
.camino__punto .i { width: 13px; height: 13px; }
.camino b { font-size: 11px; line-height: 1.25; color: var(--text); font-weight: 600; }
.camino li:not(.is-hecho) b { color: var(--muted); font-weight: 500; }
.camino em { font-style: normal; font-size: 10.5px; }
.persona-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; min-width: 0; }
.persona-card { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.persona-card header { display: flex; align-items: center; gap: 8px; }
.persona-card header .i { width: 17px; height: 17px; color: var(--brand); }
.persona-card header .badge { margin-left: auto; }
.persona-card p { margin: 0; font-size: 12.5px; }
.persona-card .btn { justify-self: start; }
.persona-card--vacia { opacity: .75; }
.persona-curso { display: grid; grid-template-columns: minmax(0, 1fr) 70px 36px; align-items: center; gap: 8px; font-size: 12.5px; }
.persona-curso span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.persona-curso em { font-style: normal; font-size: 11.5px; color: var(--muted); text-align: right; }
.persona-obj b { font-weight: 600; }
.persona-resumen { padding: 8px 10px; border-radius: 10px; background: var(--surface); line-height: 1.45; }
.persona-chat { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.persona-chat__m { display: grid; gap: 2px; max-width: 88%; padding: 7px 10px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; background: var(--surface); }
.persona-chat__m em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.persona-chat__m--noa, .persona-chat__m--equipo { justify-self: end; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.historial-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.timeline--persona li { align-items: baseline; }
.timeline__origen { display: inline-grid; place-items: center; color: var(--muted); }
.timeline__origen .i { width: 13px; height: 13px; }
.timeline--persona li[data-origen="noa"] b { color: var(--brand); }
.timeline--persona li[data-origen="academia"] b { color: var(--ok); }
@media (max-width: 760px) {
  .persona-cards { grid-template-columns: minmax(0, 1fr); }
  .camino { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 92px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
}
/* Las etiquetas ocultas (sr-only) de una fila con desplazamiento lateral no deben ensanchar la página en celular. */
.filters, .kpi-strip { position: relative; }

/* ── Configuración → Medición para anuncios (16/10/2026) ── */
.medicion-estado { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.medicion-estado li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.medicion-estado li > b { min-width: 60px; }
.medicion-estado em { font-style: normal; font-size: 12px; color: var(--muted); }
.medicion-estado__err { color: var(--err); font-size: 12px !important; } .medicion-estado__err .i { width: 14px; height: 14px; }
.medicion-tabla { display: grid; gap: 8px; margin-bottom: 16px; }
.medicion-fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.medicion-fila > span:first-child { display: grid; gap: 2px; } .medicion-fila__plataformas { font-size: 11px; color: var(--muted); opacity: .85; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .medicion-fila b { font-size: 13.5px; } .medicion-fila em { font-style: normal; font-size: 12px; color: var(--muted); }
.medicion-ayuda { display: flex; gap: 10px; margin: 6px 0 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); font-size: 12.5px; line-height: 1.5; }
.medicion-ayuda > .i { flex: none; width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.medicion-ayuda p { margin: 4px 0 0; color: var(--body); }
@media (max-width: 640px) { .medicion-fila { grid-template-columns: minmax(0, 1fr); } }
.timeline li.timeline--grupo_click b { color: var(--ok); }
.timeline li.timeline--grupo_click::before { background: var(--ok); }
.timeline li.timeline--form_abandono b { color: var(--warn); }
.timeline li.timeline--form_abandono::before { background: var(--warn); }

/* ───────────── Selección de filas (Alumnos, Leads): barra flotante y eliminar ───────────── */
.barra-flotante { position: fixed; left: 50%; bottom: 24px; z-index: 900; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 18px 44px -14px rgba(160, 40, 70, .35);
  transform: translate(-50%, 0); transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .25s; }
.barra-flotante.is-hidden { display: flex !important; opacity: 0; pointer-events: none; transform: translate(-50%, 140%); }
.barra-flotante__n { display: inline-flex; align-items: baseline; gap: 5px; margin-right: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.barra-flotante__n b { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.barra-flotante__eliminar { color: #fff; background: #c2272d; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--err) 80%, transparent); }   /* blanco sobre #c2272d: 5.8:1 */
.barra-flotante__eliminar:hover { background: color-mix(in srgb, #c2272d 88%, #000); }
.theme-dark .barra-flotante { background: rgba(40, 22, 28, .97); border-color: rgba(255, 255, 255, .1); }

/* ── Eliminar: alcance y botón de mantener presionado ── */
.eliminar-nombres { margin: -6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.eliminar-nombres:empty { display: none; }
.eliminar-alcance { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.eliminar-alcance legend { margin-bottom: 8px; padding: 0; }
.eliminar-alcance label { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, background .2s; }
.eliminar-alcance label:has(input:checked) { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: color-mix(in srgb, var(--err) 6%, transparent); }
.eliminar-alcance input { accent-color: var(--err); }
.eliminar-alcance label > span { display: grid; gap: 2px; }
.eliminar-alcance small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.eliminar-alcance input { margin-top: 3px; }
.modal__note--riesgo .i { color: var(--err); }
.mantener { position: relative; overflow: hidden; min-width: 236px; justify-content: center; color: #fff; background: color-mix(in srgb, var(--err) 78%, #fff); user-select: none; -webkit-user-select: none; touch-action: none; }
.mantener__relleno { position: absolute; inset: 0; background: color-mix(in srgb, var(--err) 88%, #000); transform: scaleX(0); transform-origin: left; transition: transform .25s ease-out; }
.mantener.is-lleno .mantener__relleno { transform: scaleX(1); transition: transform var(--mantener-ms, 1400ms) linear; }
.mantener__texto { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.mantener__carga { position: relative; display: none; gap: 5px; }
.mantener__carga i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: mantener-punto 1s infinite ease-in-out; }
.mantener__carga i:nth-child(2) { animation-delay: .15s; }
.mantener__carga i:nth-child(3) { animation-delay: .3s; }
.mantener.is-cargando { pointer-events: none; }
.mantener.is-cargando .mantener__texto { display: none; }
.mantener.is-cargando .mantener__carga { display: inline-flex; }
@keyframes mantener-punto { 0%, 80%, 100% { opacity: .3; transform: scale(.7); } 40% { opacity: 1; transform: scale(1); } }

@media (max-width: 760px) {
  .barra-flotante { bottom: calc(104px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; justify-content: space-between; padding-left: 14px; }
  .barra-flotante.is-hidden { transform: translateY(160%); }
  .barra-flotante .btn span:not(.sr-only) { display: none; }
  .barra-flotante .btn { width: 42px; padding: 0; justify-content: center; }
  .mantener { min-width: 0; flex: 1; }
  /* En el celular la tabla es de tarjetas: la casilla para seleccionar queda a la izquierda de la persona */
  .tabla-seleccion .table tr:has(> td.col-check) { position: relative; }
  .tabla-seleccion .table td.col-check { display: flex; position: absolute; left: 16px; top: 18px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .barra-flotante, .mantener__relleno { transition: none; }
}

/* Estado de Noa en el menú lateral: su avatar con el punto encendido/apagado */
.noa-av-estado { position: relative; flex: none; width: 34px; height: 34px; }
.noa-av-estado .noa-av { width: 34px; height: 34px; }
.noa-av-estado .pulse-dot { position: absolute; right: -1px; bottom: -1px; box-shadow: 0 0 0 2px var(--surface); }

/* Tarjeta de Noa en las pantallas de acceso y en el inicio del alumno */
.auth__float--noa .noa-av { width: 44px; height: 44px; }
a.auth__float--noa { color: inherit; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
a.auth__float--noa:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(160, 40, 70, .4); }
.auth__float-cta { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ok-t, #13803f); }
.auth__float-cta .i { width: 13px; height: 13px; }
.noa-card > .noa-av { width: 44px; height: 44px; }

/* ── Niveles de acceso: candados, página bloqueada, Mi seguridad y Configuración → Equipo ── */
.nav__item.is-locked { width: 100%; text-align: left; color: var(--muted); opacity: .62; cursor: not-allowed; background: none; border: 0; font: inherit; }
.nav__item.is-locked:hover { opacity: .85; background: color-mix(in srgb, var(--muted) 7%, transparent); }
.nav__lock { margin-left: auto; display: inline-flex; color: var(--muted); }
.nav__lock .i { width: 14px; height: 14px; }
.tabbar__item.is-locked { opacity: .5; background: none; border: 0; font: inherit; color: inherit; cursor: not-allowed; }
.bloqueo { display: grid; place-items: center; min-height: 55vh; }
.bloqueo__card { max-width: 460px; text-align: center; display: grid; gap: 10px; justify-items: center; padding: 34px 28px; }
.bloqueo__card h1 { margin: 6px 0 0; font-size: 22px; }
.bloqueo__card p { margin: 0; line-height: 1.6; }
.bloqueo__icono { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--brand) 60%, transparent); }
.bloqueo__icono .i { width: 28px; height: 28px; }
.aviso-2fa { margin-bottom: var(--gap); }
.aviso-2fa .btn { margin-left: auto; flex: none; }
.mi-seg__ir { margin-bottom: var(--gap); }
.nivel-lista li b { display: inline-flex; align-items: center; gap: 10px; }
.nivel-lista li b .i { width: 16px; height: 16px; color: var(--muted); }
.nivel-lista li.is-off b { color: var(--muted); font-weight: 500; }
.nivel-lista .badge .i, .equipo-tabla .badge .i { width: 12px; height: 12px; margin-right: 4px; }
.equipo-intro { margin-bottom: var(--gap); }
.equipo-tabla .equipo-rol { min-width: 150px; height: 36px; }
.equipo-tabla .equipo-rol select { font-size: 13px; }
.equipo-tabla td[data-col="idioma"] .equipo-rol { min-width: 112px; }
.equipo-tabla tr.is-off td:not(.col-actions) { opacity: .55; }
.equipo-tabla .row-actions { opacity: 1; }
/* WhatsApp de cada persona del equipo (Noa Admin la reconoce por ese número). */
.equipo-wa { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.equipo-wa__num { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 768px) {
  /* Con la columna de WhatsApp, la tabla se desliza de lado antes que cortar los nombres. */
  .table-wrap:has(> .equipo-tabla) { overflow-x: auto; }
  .equipo-tabla td:first-child { min-width: 210px; }
  .equipo-tabla td:first-child .person b, .equipo-tabla td:first-child .person > div > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; display: block; }
}
.equipo-matriz th:not(:first-child), .equipo-matriz td:not(:first-child) { text-align: center; }
.equipo-si { color: var(--ok); display: inline-flex; } .equipo-no { color: var(--muted); opacity: .55; display: inline-flex; }
.equipo-si .i, .equipo-no .i { width: 16px; height: 16px; }
.equipo-niveles { border: 0; padding: 0; margin: 4px 0 12px; display: grid; gap: 8px; }
.equipo-nivel { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.equipo-nivel:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.equipo-nivel input { margin-top: 3px; accent-color: var(--brand); }
.equipo-nivel span { display: grid; gap: 2px; }
.equipo-nivel small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.equipo-noa { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.equipo-noa .noa-av { width: 52px; height: 52px; flex: none; }
.equipo-noa p { margin: 0; font-weight: 600; }
.equipo-unirse__nota { margin: 0 0 6px; font-size: 13px; }
@media (max-width: 767px) {
  .aviso-2fa { flex-wrap: wrap; }
  .aviso-2fa .btn { margin-left: 0; width: 100%; }
  .equipo-matriz .table tr, .equipo-matriz tr { grid-template-columns: 1fr 1fr; }
  .equipo-matriz td:first-child { grid-column: 1 / -1 !important; }
  .equipo-matriz td:first-child::before { content: none !important; }
  .equipo-matriz td[data-label] { justify-content: space-between; }
  .equipo-tabla td:first-child { grid-column: 1 / 2 !important; grid-row: 1; font-size: inherit !important; }
  .equipo-tabla td:first-child::before { content: none !important; }
  .equipo-tabla td.col-actions { grid-column: 2; grid-row: 1; }
  .equipo-tabla .row-actions .btn--icon:not(:first-child) { display: inline-flex; }
  .equipo-tabla .equipo-rol { min-width: 0; width: 60%; }
}

/* ── Código de 6 dígitos en casillas ── */
.otp { display: flex; gap: 10px; justify-content: center; margin: 6px 0 4px; }
.otp__caja { width: 52px; height: 62px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--text) 16%, transparent); background: color-mix(in srgb, var(--text) 4%, var(--surface)); color: var(--text); text-align: center;
  font: 700 26px/1 var(--font-num, inherit); font-variant-numeric: tabular-nums; caret-color: var(--brand); transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.otp__caja:nth-child(3) { margin-right: 10px; }
.otp__caja:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); transform: translateY(-1px); }
.otp__caja.is-llena { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.otp.is-error { animation: otp-temblor .38s var(--ease); }
.otp.is-error .otp__caja { border-color: var(--err); }
@keyframes otp-temblor { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
input.otp-texto { display: block; width: 100%; max-width: 260px; margin: 6px auto; height: 54px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  text-align: center; font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
input.otp-texto:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.otp-respaldo { margin-top: 2px; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
@media (max-width: 420px) { .otp { gap: 7px; } .otp__caja { width: 42px; height: 54px; font-size: 22px; } .otp__caja:nth-child(3) { margin-right: 6px; } }

/* ── Mi seguridad: tarjeta de la verificación en dos pasos ── */
.btn--riesgo { color: var(--err-t, var(--err)); }
.btn--riesgo:hover { background: color-mix(in srgb, var(--err) 10%, transparent); }
.tfa { display: grid; gap: 16px; align-content: start; }
.tfa__cabeza { display: flex; align-items: center; gap: 14px; }
.tfa__cabeza .card__title { margin: 0 0 6px; }
.tfa__escudo { position: relative; width: 56px; height: 56px; border-radius: 18px; flex: none; display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--brand) 70%, transparent); }
.tfa__escudo > .i { width: 28px; height: 28px; }
.tfa__escudo.is-ok { background: linear-gradient(135deg, #1fb26b, #4fd18f); box-shadow: 0 12px 26px -12px rgba(31, 178, 107, .6); }
.tfa__escudo i { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: #1fb26b; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.tfa__escudo i .i { width: 13px; height: 13px; }
.tfa__desde { font-size: 12.5px; }
.tfa__texto { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.tfa__pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tfa__pasos li { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.tfa__pasos li > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.tfa__pasos b { font-size: 13.5px; display: block; }
.tfa__pasos small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.tfa__datos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tfa__datos li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.tfa__datos li > div { display: grid; gap: 2px; min-width: 0; }
.tfa__datos b { font-size: 13.5px; }
.tfa__datos span:not(.tfa__ic) { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.tfa__ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.tfa__ic.is-alerta { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.tfa__ic .i { width: 18px; height: 18px; }
.tfa__acciones { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Ventana: activar / cambiar de celular / respaldo / quitar ── */
.tfa-modal { width: min(640px, calc(100vw - 32px)); }
.tfa-pasos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.tfa-pasos li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.tfa-pasos li + li::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--line); margin-right: 2px; }
.tfa-pasos i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--surface-2); color: var(--muted); }
.tfa-pasos li.is-actual { color: var(--text); }
.tfa-pasos li.is-actual i { background: var(--grad); color: #fff; }
.tfa-pasos li.is-hecho i { background: #1fb26b; color: #fff; }
.tfa-paso { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 4px 4px 0; }
.tfa-paso h3 { margin: 4px 0 0; font-size: 19px; }
.tfa-paso p { margin: 0; max-width: 440px; line-height: 1.6; }
.tfa-paso form { width: 100%; }
.tfa-paso form.is-cargando { opacity: .55; pointer-events: none; }
.tfa-paso .modal__foot { width: 100%; }
.tfa-paso__ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.tfa-paso__ic .i { width: 26px; height: 26px; }
.tfa-paso__ic.is-riesgo { color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.tfa-paso__alt { font-size: 13px; }
.tfa-qr { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; text-align: left; }
.tfa-qr__marco { width: 220px; height: 220px; padding: 10px; border-radius: 22px; background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line), 0 16px 34px -18px rgba(160, 40, 70, .35); position: relative; }
.tfa-qr__marco::before { content: ""; position: absolute; inset: -6px; border-radius: 26px; padding: 2px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.tfa-qr__marco svg { width: 100%; height: 100%; display: block; border-radius: 10px; }
.tfa-qr__carga { width: 34px; height: 34px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--brand) 20%, transparent); border-top-color: var(--brand); animation: tfa-gira .8s linear infinite; }
@keyframes tfa-gira { to { transform: rotate(360deg); } }
.tfa-qr__texto h3 { margin: 0 0 8px; font-size: 17px; }
.tfa-qr__texto ol { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.tfa-clave summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 600; }
.tfa-clave__caja { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.tfa-clave__caja code { flex: 1 1 180px; font: 600 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; overflow-wrap: anywhere; }
.tfa-clave__app { margin-top: 8px; }
.tfa-ok { width: 84px; height: 84px; margin: 6px auto 2px; }
.tfa-ok svg { width: 100%; height: 100%; }
.tfa-ok circle { fill: none; stroke: #1fb26b; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: tfa-trazo .6s var(--ease) forwards; }
.tfa-ok path { fill: none; stroke: #1fb26b; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: tfa-trazo .35s .5s var(--ease) forwards; }
.tfa-paso[data-paso="listo"]:not([hidden]) .tfa-ok { animation: tfa-salta .5s .75s var(--ease); }
@keyframes tfa-trazo { to { stroke-dashoffset: 0; } }
@keyframes tfa-salta { 50% { transform: scale(1.08); } }
.tfa-respaldo { list-style: none; margin: 4px 0 0; padding: 14px; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; border-radius: 16px; background: var(--surface-2); counter-reset: r; }
.tfa-respaldo li { counter-increment: r; display: flex; align-items: center; gap: 8px; justify-content: center; }
.tfa-respaldo li::before { content: counter(r); font-size: 11px; color: var(--muted); width: 16px; text-align: right; }
.tfa-respaldo code { font: 700 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.tfa-respaldo__acciones { display: flex; gap: 8px; justify-content: center; }
.tfa-guarde { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.tfa-guarde input { width: 18px; height: 18px; accent-color: var(--brand); }
@media (max-width: 620px) {
  .tfa__pasos { grid-template-columns: minmax(0, 1fr); }
  .tfa__pasos li { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .tfa-qr { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .tfa-qr__texto ol { text-align: left; }
  .tfa-qr__marco { width: 200px; height: 200px; }
  .tfa-pasos li span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tfa-ok circle, .tfa-ok path { animation: none; stroke-dashoffset: 0; } .otp.is-error { animation: none; } }

/* ── Mi cuenta: correo con «Cambiar», WhatsApp con prefijo, ventanas de correo y contraseña ── */
.cuenta-correo { grid-column: 1 / -1; }
.cuenta-correo__fila { display: flex; gap: 8px; align-items: center; }
.cuenta-correo__fila .input { flex: 1; min-width: 0; }
.cuenta-correo__fila input[readonly] { color: var(--muted); }
.cuenta-tel { display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.cuenta-tel select { flex: none; width: 112px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; padding: 0 8px 0 12px; }
.cuenta-tel input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; }
.cuenta-tel select:focus, .cuenta-tel input:focus { outline: none; }
.cuenta-tel:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.cuenta-modal { display: grid; gap: 12px; }
.cuenta-paso { display: grid; gap: 12px; }
.cuenta-paso[data-correo-paso="2"], .cuenta-paso[data-correo-paso="3"] { justify-items: center; text-align: center; }
.cuenta-paso .modal__foot { width: 100%; }
.cuenta-paso__titulo { margin: 0; font-size: 19px; }
.cuenta-2fa { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.cuenta-2fa .otp { justify-content: flex-start; }
.cuenta-2fa .otp__caja { width: 44px; height: 52px; font-size: 22px; }
.cuenta-nota { margin: 0; font-size: 12.5px; }
@media (max-width: 520px) { .cuenta-correo__fila { flex-wrap: wrap; } .cuenta-correo__fila .btn { width: 100%; } .cuenta-tel select { width: 96px; } }
.equipo-nivel.is-off { opacity: .55; cursor: not-allowed; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; filter: saturate(.6); }
.otp-campo { margin: 8px 0 2px; }

/* Estado de Noa en la barra de arriba (21/10/2026): su carita y un punto verde (encendida) o gris (apagada). */
.topbar__noa { position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--glass-line, var(--line)); transition: transform .2s ease; }
.topbar__noa:hover { transform: translateY(-1px); }
.topbar__noa .noa-av { width: 34px; height: 34px; }
.topbar__noa .pulse-dot { position: absolute; right: 1px; bottom: 2px; box-shadow: 0 0 0 2px var(--surface); }
.theme-dark .topbar__noa { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .08); }
/* Su casa en el pie del menú (Noa Admin / Noa Academy encendida): espacio libre donde se para de cuerpo entero. */
.noa-casita { width: 100px; height: 96px; }
@media (max-width: 767px) {
  .topbar__noa { width: 36px; height: 36px; }
  .topbar__noa .noa-av { width: 30px; height: 30px; }
}

/* QA 024: migas legibles. Las anteriores (cortas: «Contenido», «Cursos») no se encogen hasta volverse «Conte…»;
   si son largas se cortan en 16ch con el nombre completo en title. La última es la que cede espacio. */
.crumb:not(.is-current) { flex: 0 0 auto; max-width: 16ch; }
.crumb.is-current { flex: 0 1 auto; min-width: 0; }
.crumbs { overflow: hidden; }
/* Tableta: solo la miga actual (como en el celular); las anteriores quedarían en «…». */
@media (min-width: 768px) and (max-width: 1023px) {
  .crumbs .crumb:not(.is-current), .crumbs .crumb-sep { display: none; }
}

/* ── Lote 029: páginas archivadas · «Eliminar para siempre» y «Vaciar archivadas» ── */
.archivadas .archivadas__acc { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.archivadas .archivadas__acc .btn span, .archivadas__pie .btn span { font-size: inherit; color: inherit; }
.archivadas .btn--danger { color: var(--err-txt, var(--err-t, var(--err))); }
.archivadas__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 10px; padding: 12px 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--err) 18%, transparent); }
.archivadas__pie p { flex: 1 1 260px; min-width: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) {
  .archivadas .archivadas__acc { width: 100%; justify-content: flex-start; }
  .archivadas__pie .btn { flex: 1 1 100%; }
}

/* 039: tarjetas lado a lado alineadas arriba (Mi seguridad). */
.grid-2--arriba { align-items: start; }

/* ══ Lote BF · Componente KPI único (kpi_card / wiioDelta) y acabado UX ══ */
.kpi--plano { padding-bottom: 16px; }
.kpi--link { display: block; color: inherit; text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s var(--ease); }
.kpi--link:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(160, 40, 70, .4); }
.kpi--link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.kpi--hero .kpi__value { font-size: 36px; }
.kpi--hero { background-image: linear-gradient(150deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%); }
.kpi--alerta .kpi__value { color: var(--warn-t, var(--warn)); }
.kpi--peligro .kpi__value { color: var(--err-t, var(--err)); }
.kpi--peligro { box-shadow: inset 3px 0 0 var(--err); }
.kpi--alerta:not(.kpi--peligro) { box-shadow: inset 3px 0 0 var(--warn); }
.kpi__vs { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi__label { min-height: 1.3em; }
.delta.is-neutro, .delta.is-nuevo { color: var(--muted); background: var(--surface-2); }
.delta.is-igual { font-weight: 600; }
.kpis__titulo { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 -4px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.kpis__titulo span { font-weight: 500; color: var(--muted); font-size: 12px; }
.tb-kpis--landing { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); }
.tb-kpis--chat { grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); }
.tb-kpis--landing .kpi--hero, .tb-kpis--chat .kpi--hero { grid-column: auto; }
@media (max-width: 1100px) {
  .tb-kpis--landing, .tb-kpis--chat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-kpis--landing .kpi--hero, .tb-kpis--chat .kpi--hero { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .kpi--hero .kpi__value { font-size: 30px; }
  .kpi--link .kpi__sub { display: block; }
  .tb-kpis--landing .kpi__sub, .tb-kpis--chat .kpi__sub { display: block; font-size: 11px; }
}

/* Inicio · I1 mapa sin datos, I2 cabecera de tarjeta con chip, I5 gráfico vacío */
.tb-paises li.muted { display: block; grid-template-columns: none; }
.tb-vacio--mapa, .tb-vacio--grafico { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 22px 16px; color: var(--muted); }
.tb-vacio--mapa .i, .tb-vacio--grafico .i { flex: none; width: 18px; height: 18px; }
.tb-vacio--grafico a { color: var(--brand-t, var(--brand)); font-weight: 700; }
.tb-c--vacio { align-self: start; }
.card__head { flex-wrap: wrap; }
.card__head > div { flex: 1 1 200px; min-width: 0; }

/* Leads · L1 la columna de la persona no se aplasta; L2 idioma como texto, no como bandera de país */
.table td .person { min-width: 140px; }
.tabla-leads .table td[data-col="whatsapp"] { white-space: nowrap; }
.tabla-leads .row-actions { flex-wrap: wrap; width: 76px; justify-content: flex-end; }
.lead-idioma { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); vertical-align: middle; }

/* Cuadros de estado (P8): el ícono se ve blanco sobre el verde */
.status-banner__icon .i { color: #fff; }
/* Insignias largas que no desbordan (P6) */
@media (max-width: 767px) { .badge { white-space: normal; } }

@media (max-width: 767px) {
  /* L3: ficha compacta de lead (lo demás está en la ficha) */
  .tabla-leads .table td[data-label]::before { display: none; }
  .tabla-leads .table td[data-col="pagina"], .tabla-leads .table td[data-col="whatsapp"] { display: none; }
}

/* Z1 · «Disponibles para ti»: portada de ancho fijo y texto con espacio */
.courses--student:has(.course-card--row) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.course-card--row .cover { flex: 0 0 160px; width: 160px; align-self: stretch; }
.course-card--row .course-card__body { flex: 1; min-width: 0; }
.course-card--row .course-card__foot { flex: none; padding-right: 14px; }
@media (max-width: 767px) { .course-card--row .cover { flex: none; width: 100%; } .course-card--row .course-card__foot { padding: 0 14px 14px; } }

/* Lote A2: «Recordar este dispositivo 30 días» (paso del código de la app) */
.auth__recordar { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 14px; cursor: pointer; }
.auth__recordar input { margin-top: 3px; flex: none; }
.auth__recordar span { display: grid; gap: 2px; }
.auth__recordar small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 767px) { .kpi-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr); } }

/* F2 · P12: la ayuda se lee en párrafos de unas 3 líneas (ancho de lectura, aire entre párrafos) */
.ay-cap p { max-width: 68ch; line-height: 1.65; margin: 0 0 12px; }
.ay-cap p:last-child { margin-bottom: 0; }
.plantilla__vista--pais { grid-template-columns: 1.3fr 1fr; } .plantilla__vista--pais i:nth-child(3) { grid-row: 1 / 4; grid-column: 2; height: 44px; background: #fff; border: 1px solid rgba(245, 61, 92, .25); }
