/* BE HELIO · Hub. Hoja escrita a mano, sin pasos de compilación.
   Los colores viven en variables: cambiar uno aquí lo cambia en todo el Hub. */

:root {
  --ink: #16161a;
  --ink-soft: #55555e;
  --muted: #6b6b74; /* texto pequeño: nunca más claro que esto (contraste AA) */
  --line: #ecebf0;
  --line-input: #dadae0;
  --line-strong: #bdbcb4;
  --surface: #ffffff;
  --surface-alt: #f7f7fa;
  --surface-hover: #f4f3f8;
  --page: #f2f0fd;
  --black: #111111;
  --black-hover: #2c2c33;

  /* Colores por plataforma. `-ink` es la versión legible como texto pequeño. */
  --people: #4b5bea;
  --people-ink: #3b48c4;
  --people-tint: #eceefd;
  --finance: #e2f24a;
  --finance-ink: #5e6b00;
  --finance-tint: #f4f9c8;
  --sales: #e94ba8;
  --sales-ink: #b8247c;
  --sales-tint: #fce6f2;
  --lavender: #8b8ff0;

  --danger-bg: #fce6f2;
  --danger-ink: #9c1f68;
  --ok-bg: #e7f7ee;
  --ok-ink: #0f6b50;

  --radius-card: 20px;
  --radius-input: 12px;
  --focus: #4b5bea;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { color: var(--people-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

img { max-width: 100%; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--black); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Tipografía ---------- */
.display {
  margin: 0;
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: -1px;
  line-height: 1.1;
  font-size: clamp(30px, 3.6vw, 44px);
}
.lead { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.5; }
.small { font-size: 14px; color: var(--muted); }
.mark {
  background: var(--finance); border-radius: 14px; padding: 0 12px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__logo { height: 30px; width: auto; display: block; mix-blend-mode: multiply; }
.brand__tag {
  font-size: 15px; font-weight: 600; font-stretch: 110%; letter-spacing: 1px; line-height: 1;
  background: var(--finance); border-radius: 999px; padding: 6px 11px 5px; margin-left: -2px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  font: 500 15px "Archivo", sans-serif; padding: 14px 22px; text-decoration: none;
  transition: background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--black); color: #fff; }
.btn--primary:hover { background: var(--black-hover); }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { background: var(--surface-alt); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn[aria-busy="true"] { opacity: .85; cursor: progress; }
.btn__spinner {
  width: 18px; height: 18px; border: 2px solid #555; border-top-color: var(--finance);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn-link {
  border: 0; background: transparent; padding: 4px 0; cursor: pointer;
  font: 500 14px "Archivo", sans-serif; color: var(--sales-ink);
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-hover); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 14px; font-weight: 500; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__row a { font-size: 14px; }
.input {
  width: 100%; height: 50px; border: 1px solid var(--line-input); border-radius: var(--radius-input);
  padding: 0 16px; font: 400 16px "Archivo", sans-serif; background: #fff; color: var(--ink);
}
.input--sm { height: 46px; padding: 0 14px; font-size: 15px; }
.input:focus { outline: none; border-color: var(--people); box-shadow: 0 0 0 3px var(--people-tint); }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--sales-ink); }
.input:disabled { background: var(--surface-alt); color: var(--muted); border-color: var(--line); }
/* Flecha propia (la nativa queda pegada al borde y cambia según el navegador). */
select.input {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 42px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2355555f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 14px;
}
select.input:hover { border-color: var(--ink-soft); }

/* Selector de organización dentro de la tarjeta: caja gris como las del
   prototipo, flecha propia y un solo anillo de foco (sin borde + contorno). */
.org-picker { display: flex; flex-direction: column; gap: 6px; }
.org-picker__label { font-size: 13px; font-weight: 500; color: var(--ink-soft); padding-left: 2px; }
.org-picker__control { position: relative; display: block; }
.org-picker__select {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 46px; margin: 0;
  padding: 0 40px 0 42px;
  border: 1px solid transparent; border-radius: var(--radius-input);
  background: var(--surface-alt); color: var(--ink);
  font: 500 15px "Archivo", sans-serif;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.org-picker__select:hover { background: var(--surface-hover); }
.org-picker__select:focus { outline: none; }
.org-picker__select:focus-visible {
  background: var(--surface); border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(22, 22, 26, .12);
}
.org-picker__icon, .org-picker__chevron {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--ink-soft); pointer-events: none;
}
.org-picker__icon { left: 14px; }
.org-picker__chevron { right: 14px; }
@media (prefers-reduced-motion: reduce) { .org-picker__select { transition: none; } }
.field__error { font-size: 14px; color: var(--danger-ink); margin: 0; }
.field__help { font-size: 14px; color: var(--muted); margin: 0; }
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 5px; top: 5px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }

.alert {
  border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 0;
  background: var(--danger-bg); color: var(--danger-ink);
}
.alert--ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert--info { background: var(--people-tint); color: var(--people-ink); }
.status-msg { font-size: 14px; color: var(--ok-ink); font-weight: 500; }

/* Medidor de contraseña: las barras llevan además un texto, no solo color. */
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.meter__bars span { height: 5px; border-radius: 99px; background: var(--line); transition: background .2s; }
/* Solo las barras: el texto de ayuda también es un <span> hijo del medidor y,
   sin `.meter__bars`, desde el nivel 2 quedaba pintado como una barra más. */
.meter[data-level="1"] .meter__bars span:nth-child(-n+1),
.meter[data-level="2"] .meter__bars span:nth-child(-n+2),
.meter[data-level="3"] .meter__bars span:nth-child(-n+3),
.meter[data-level="4"] .meter__bars span:nth-child(-n+4) { background: var(--sales); }
.meter[data-ok="true"][data-level="3"] .meter__bars span:nth-child(-n+3),
.meter[data-ok="true"][data-level="4"] .meter__bars span:nth-child(-n+4) { background: var(--people); }
.meter__label { font-size: 14px; color: var(--muted); }

/* ---------- Pantallas de acceso ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.auth__main {
  display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 64px);
  background: linear-gradient(160deg, #f3f1fc 0%, #fafaf8 55%, #f7faec 100%);
}
.auth__center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.auth__box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.auth__box form { display: flex; flex-direction: column; gap: 20px; }
.auth__box h1 { margin: 0 0 8px; }
.auth__foot { font-size: 14px; color: var(--muted); }
.auth__aside {
  position: relative; overflow: hidden; background: #111; color: #fff; display: flex;
  flex-direction: column; justify-content: flex-end; padding: clamp(32px, 5vw, 64px); min-height: 520px;
}
.auth__aside-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
.auth__aside h2 {
  margin: 0; font-size: clamp(32px, 3.8vw, 52px); font-weight: 500; font-stretch: 125%;
  letter-spacing: -1.2px; line-height: 1.1; text-wrap: balance;
}
.auth__aside h2 span {
  background: var(--lavender); color: #111; border-radius: 16px; padding: 0 12px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pills li {
  display: flex; align-items: center; gap: 8px; border: 1px solid #3a3a40; border-radius: 999px;
  padding: 9px 16px 9px 10px; font-size: 15px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot--people { background: var(--people); }
.dot--finance { background: var(--finance); }
.dot--sales { background: var(--sales); }

/* ---------- Formas animadas ---------- */
.shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.shapes--top { bottom: auto; height: 55%; }
.shape-ring {
  position: absolute; right: -140px; top: -260px; width: 400px; height: 460px;
  border: 70px solid var(--finance); border-radius: 50%; animation: floatA 14s ease-in-out infinite;
}
.shape-rays { position: absolute; width: 220px; height: 220px; left: 40px; top: 40px; animation: spinB 40s linear infinite; }
.shape-dot {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; background: var(--sales);
  right: 22%; top: 62%; animation: floatC 6s ease-in-out infinite;
}

@keyframes floatA { 0%, 100% { transform: translate(0, 0) rotate(-24deg); } 50% { transform: translate(-18px, 22px) rotate(-14deg); } }
@keyframes spinB { to { transform: rotate(360deg); } }
@keyframes floatC { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drawIn { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }

/* ---------- Estructura autenticada ---------- */
/* `overflow: clip` recorta las formas decorativas igual que `hidden`, pero sin
   crear un contenedor de scroll: con `hidden` la barra superior perdía el sticky. */
.shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; overflow: clip; background: var(--page); }
.topbar {
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
  padding: 14px clamp(16px, 3vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.page { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 32px) 56px; }
.page--narrow { max-width: 1100px; }
.page--wide { max-width: 1440px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--finance);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.avatar--lg { width: 72px; height: 72px; font-size: 24px; }
.avatar--md { width: 44px; height: 44px; font-size: 15px; }

/* Menú de cuenta con <details>: se abre con teclado sin JS. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__trigger {
  display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 12px;
}
.menu__trigger:hover, .menu[open] > .menu__trigger { background: var(--surface-hover); }
.menu__who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; text-align: left; }
.menu__name { font-size: 14px; font-weight: 500; }
.menu__email { font-size: 12px; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__chevron { transition: transform .2s; color: var(--muted); }
.menu[open] .menu__chevron { transform: rotate(180deg); }
.menu__panel {
  position: absolute; right: 0; top: 54px; width: 300px; max-width: calc(100vw - 32px); z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px;
  box-shadow: 0 24px 48px -20px rgba(22, 22, 26, .3);
}
.menu__head { display: flex; align-items: center; gap: 12px; padding: 12px; }
.menu__sep { height: 1px; background: #f0eff3; margin: 6px 4px; border: 0; }
.menu__item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent;
  border-radius: 10px; padding: 10px 12px; font: 400 14px "Archivo", sans-serif; color: var(--ink); cursor: pointer;
}
.menu__item:hover { background: var(--surface-hover); text-decoration: none; }
.menu__item--danger { color: var(--sales-ink); }
.menu__item--danger:hover { background: var(--sales-tint); }
.menu__item svg { flex-shrink: 0; }

/* ---------- Selector ---------- */
.greeting { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.greeting svg { stroke-dasharray: 40; animation: drawIn .8s ease-out .3s both; }
.today { font-size: 16px; color: var(--muted); margin: 8px 0 32px; }
.section-title { margin: 0 0 14px; font-size: 20px; font-weight: 500; font-stretch: 125%; letter-spacing: -.3px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.card-app {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px;
  display: flex; flex-direction: column; gap: 18px; transition: box-shadow .2s, border-color .2s;
}
.card-app--people:hover { border-color: #c9ccf7; box-shadow: 0 12px 32px -18px rgba(75, 91, 234, .45); }
.card-app--finance:hover { border-color: #d6e36a; box-shadow: 0 12px 32px -18px rgba(120, 140, 20, .45); }
.card-app--sales:hover { border-color: #f2b3d8; box-shadow: 0 12px 32px -18px rgba(233, 75, 168, .45); }
.card-app--off { border-style: dashed; border-color: var(--line-strong); }
.card-app__head { display: flex; align-items: center; gap: 12px; }
.card-app__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon--people { background: var(--people-tint); color: var(--people-ink); }
.icon--finance { background: var(--finance-tint); color: var(--finance-ink); }
.icon--sales { background: var(--sales-tint); color: var(--sales-ink); }
.card-app__name { margin: 0; font-size: 22px; font-weight: 500; font-stretch: 125%; letter-spacing: -.4px; line-height: 1.1; }
.card-app__sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.card-app__body { font-size: 15px; line-height: 1.45; color: var(--ink); margin: 0; }
.card-app__note { background: var(--surface-alt); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.45; margin: 0; }
.card-app__actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.card-app__actions form { display: flex; flex-direction: column; gap: 10px; }
.card-app__soon { margin-top: auto; font-size: 15px; font-weight: 500; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  background: var(--surface-hover); color: var(--ink-soft); border-radius: 6px; padding: 4px 8px;
}

/* ---------- «Abriendo» ---------- */
.opening {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center; animation: fadeIn .3s ease;
}
.opening__eyebrow { font-size: 20px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; margin: 0; }
.opening__logo { height: clamp(30px, 3.6vw, 44px); width: auto; }
.opening__name {
  margin: 0; font-weight: 500; font-stretch: 125%; font-size: clamp(40px, 6.5vw, 80px);
  letter-spacing: -1.5px; line-height: 1;
}
.opening__msg { max-width: 460px; font-size: 18px; margin: 0; }
.opening__back {
  margin-top: 12px; color: inherit; border: 1px solid currentColor; border-radius: 12px; padding: 10px 18px;
  font: 500 15px "Archivo", sans-serif; background: transparent; text-decoration: none;
}
.opening__back:hover { text-decoration: none; background: rgba(255, 255, 255, .14); }
.opening--finance .opening__back:hover { background: rgba(22, 22, 26, .08); }
.opening a:focus-visible { outline-color: currentColor; }

/* ---------- Mi cuenta ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.account { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 28px; }
.tabs {
  flex: 0 1 240px; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
}
.tab {
  display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 14px; font-size: 14px;
  color: var(--ink); border-left: 4px solid transparent;
}
.tab:hover { background: var(--surface-hover); text-decoration: none; }
.tab[aria-current="page"] { background: var(--page); font-weight: 600; border-left-color: var(--people); }
.tab svg { color: var(--muted); }
.tab[aria-current="page"] svg { color: var(--people-ink); }
.account__content { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px; animation: fadeUp .35s ease-out both; }
.panel h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.panel > .small { margin: 0 0 24px; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.panel__foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel__head h2 { margin: 0; }
.sessions { list-style: none; margin: 0; padding: 0; }
.session { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #f0eff3; }
.session__icon {
  width: 40px; height: 40px; border-radius: 12px; background: var(--surface-hover); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.session__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.session__device { font-size: 15px; font-weight: 500; }
.session__meta { font-size: 14px; color: var(--muted); }
.chip {
  font-size: 13px; font-weight: 600; background: var(--people-tint); color: var(--people-ink);
  border-radius: 999px; padding: 5px 10px; white-space: nowrap;
}

.htmx-request .btn { opacity: .7; }

@media (max-width: 560px) {
  .menu__who { display: none; }
  .panel { padding: 20px; }
}

/* Quien lo pide sin animaciones, no las ve. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Tarjeta «no contratada» ---------- */
.promo { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-alt); }
.card-app--people .promo { background: var(--people-tint); }
.card-app--finance .promo { background: var(--finance-tint); }
.card-app--sales .promo { background: var(--sales-tint); }
.promo__tag {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--ink);
  background: var(--lavender); border-radius: 5px; padding: 3px 7px;
}
.promo__tag--finance { background: var(--finance); }
.promo__tag--sales { background: #f58ac4; }
.promo__text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.promo__note { margin: 0; font-size: 13px; color: var(--ink-soft); }
.card-app__cta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card-app__cta-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-app__cta .btn--outline { align-self: stretch; }
.btn--sent, .btn--sent:disabled {
  background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-bg);
  cursor: default; width: 100%; opacity: 1;
}

/* ---------- Bloque Enterprise ---------- */
.enterprise {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px clamp(20px, 3vw, 32px); margin: 16px 0 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
/* El bloque es más bajo que en el prototipo: con la posición original el
   círculo subía hasta el texto. Ahora solo asoma en la esquina, detrás. */
.enterprise__blob {
  position: absolute; z-index: 0; left: -120px; bottom: -150px; width: 200px; height: 200px; border-radius: 50%;
  background: var(--finance); opacity: .7; pointer-events: none; z-index: 0;
}
.enterprise__body { position: relative; z-index: 1; z-index: 1; display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.enterprise__title { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: clamp(22px, 2.4vw, 28px); font-stretch: 110%; }
.enterprise__brand { font-weight: 700; letter-spacing: -.5px; }
.enterprise__label {
  font-weight: 400; letter-spacing: -.3px; color: #fff; background: var(--people); padding: 2px 14px 4px;
  border-radius: 40% 55% 45% 60% / 60% 45% 55% 40%; transform: rotate(-2deg);
}
.enterprise__text { margin: 0; font-size: 15px; color: #44443f; line-height: 1.55; text-wrap: pretty; }
.enterprise__text strong { color: var(--ink); }
.enterprise__integrates { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.enterprise__integrates svg { color: var(--people); flex-shrink: 0; }
.enterprise__actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.enterprise__actions form { display: flex; }
.btn--enterprise { white-space: nowrap; }
.btn--enterprise:hover { background: var(--people); }

/* ---------- Resumen de tarjeta ---------- */
.summary__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface-alt); border-radius: 12px; padding: 12px 14px; min-width: 0; container-type: inline-size; }
.tile__label { font-size: 12px; color: var(--muted); }
/* Un monto nunca se parte («₡2,500,000.» y «00» abajo): los largos achican la letra
   según el ancho de la casilla para entrar en una línea. */
.tile__value { font-size: 20px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile__value--long { font-size: min(20px, 12.5cqi); white-space: nowrap; }
.tile__tone { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; margin-top: 4px; }
.tile__tone--ok { color: var(--ok-ink); }
.tile__tone--warning { color: #8a5a00; }
.tile__tone--danger { color: var(--danger-ink); }
.tile--skeleton { display: flex; flex-direction: column; gap: 8px; min-height: 68px; }
.skeleton { display: block; background: #e4e3ea; border-radius: 6px; animation: pulse 1.4s ease-in-out infinite; }
.skeleton--label { height: 10px; width: 60%; }
.skeleton--value { height: 18px; width: 40%; }
.summary__note { margin: 0; font-size: 13px; color: var(--muted); }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------- Banner «Próximamente» ---------- */
.soon {
  position: relative; overflow: hidden; background: #111; color: #fff; border-radius: var(--radius-card);
  padding: 24px clamp(20px, 3vw, 32px); margin: 0 0 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.soon__ring {
  position: absolute; z-index: 0; right: -60px; top: -90px; width: 220px; height: 220px;
  border: 40px solid var(--finance); border-radius: 50%; opacity: .9; pointer-events: none;
}
.soon__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.soon__tag {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--ink);
  background: var(--finance); border-radius: 5px; padding: 3px 7px;
}
.soon__heading { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; font-stretch: 125%; letter-spacing: -.5px; line-height: 1.15; }
.soon__brand { font-weight: 700; font-stretch: 110%; letter-spacing: .5px; }
.soon__text { margin: 0; font-size: 15px; color: #c9c9cf; line-height: 1.5; }
.soon__actions { position: relative; z-index: 1; }
.soon__actions form { display: flex; }
.btn--light { background: #fff; color: var(--ink); white-space: nowrap; justify-content: center; }
.btn--light:hover { background: var(--finance); }
.btn--lime, .btn--lime:disabled { background: var(--finance); color: var(--ink); border-color: var(--finance); cursor: default; opacity: 1; white-space: nowrap; }

/* ---------- Login: tarjetas de ejemplo (decorativas) ---------- */
.auth__aside { justify-content: space-between; gap: 24px; }
.auth__cards { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.auth__cards-stack { width: min(100%, 420px); display: flex; flex-direction: column; gap: 12px; animation: breathe 16s ease-in-out infinite; }
.demo-card { background: #1c1c21; border: 1px solid #2c2c33; border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.demo-card--people { margin-right: 60px; }
.demo-card--finance { margin-left: 60px; }
.demo-card--sales { margin-right: 30px; }
.demo-card__head { display: flex; align-items: center; gap: 10px; }
.demo-card__badge { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.demo-card--people .demo-card__badge { background: #2a2e5c; }
.demo-card--finance .demo-card__badge { background: #3a4012; }
.demo-card--sales .demo-card__badge { background: #4a1c36; }
.demo-card__badge .dot { width: 8px; height: 8px; }
.demo-card__app { font-size: 14px; font-weight: 600; color: #fff; }
.demo-card__data { display: flex; flex-direction: column; gap: 2px; }
.demo-card__label { font-size: 12px; color: #8a8a93; }
.demo-card__value { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.demo-card__sub { font-size: 12px; color: #a0a196; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* Con el panel debajo del formulario no hay lugar para ellas. */
@media (max-width: 879px) { .auth__cards { display: none; } }
@media (prefers-reduced-motion: reduce) { .auth__cards-stack { animation: none; } }

/* ---------- Enterprise: logo y mancha ---------- */
.enterprise__logo { height: 30px; width: auto; display: block; }
.enterprise__label { position: relative; display: inline-block; background: none; border-radius: 0; transform: none; padding: 4px 16px 6px 18px; line-height: 1.1; }
.enterprise__splash { position: absolute; inset: -6px -4px -4px -8px; width: calc(100% + 12px); height: calc(100% + 10px); z-index: 0; overflow: visible; fill: var(--people); }
.enterprise__label-text { position: relative; z-index: 1; }

/* ---------- «Pendientes para ti hoy» ---------- */
.tasks { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-top: 20px; }
.tasks__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tasks__title { margin: 0; font-size: 20px; font-weight: 500; font-stretch: 125%; letter-spacing: -.3px; }
.tasks__hint { font-size: 13px; color: var(--muted); }
.tasks__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tasks__list form { margin: 0; }
.task {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid #f0eff3; border-radius: 14px; padding: 14px 16px;
  font-family: "Archivo", sans-serif; color: var(--ink);
}
.task:hover { background: #fafafc; }
.task:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.task__tag {
  flex: 0 0 auto; min-width: 64px; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .8px;
  color: var(--ink); background: var(--lavender); border-radius: 5px; padding: 3px 6px;
}
.task__tag--finance { background: var(--finance); }
.task__tag--sales { background: #f58ac4; }
.task__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task__title { font-size: 15px; font-weight: 500; }
.task__detail { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.task__chevron { flex: 0 0 auto; color: #a5a5ae; }
.task--skeleton { cursor: default; }
.skeleton--tag { width: 64px; height: 18px; }
.skeleton--line { flex: 1; height: 14px; max-width: 320px; }
.tasks__empty { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--ok-ink); }
.tasks__note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- «Entrar directo a la última plataforma» ---------- */
.auto-enter { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
.auto-enter__label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.auto-enter__label input { width: 16px; height: 16px; margin: 0; accent-color: var(--people); }
.auto-enter__help { font-size: 13px; color: var(--muted); padding-left: 26px; }
.auto-enter__status { font-size: 13px; color: var(--ok-ink); padding-left: 26px; }
.auto-enter__status:empty { display: none; }

/* ---------- Equipo ---------- */
.team { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.team__org {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px 20px;
}
.team__org .org-picker { flex: 1 1 260px; max-width: 420px; }
.team__messages { display: flex; flex-direction: column; gap: 8px; }
.team__note { margin: 0 0 14px; }
.team__note .alert { margin: 0; }

.alert--success { background: var(--ok-bg); color: var(--ok-ink); }
.alert--warn, .alert--warning { background: var(--finance-tint); color: var(--finance-ink); }
.alert:has(.alert__icon) { display: flex; gap: 10px; align-items: flex-start; }
.alert__icon { font-weight: 700; flex: 0 0 auto; width: 14px; text-align: center; }

.team-head, .member {
  display: grid; column-gap: 20px;
  grid-template-columns: minmax(230px, 1.5fr) repeat(var(--team-apps, 3), minmax(0, 1fr));
}
.team-head {
  padding: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.team-list { list-style: none; margin: 0; padding: 0; }
.member { padding: 18px 0; row-gap: 12px; align-items: start; border-top: 1px solid #f0eff3; }
.member:first-child { border-top: 0; }
.team-empty { padding: 18px 0; font-size: 15px; color: var(--muted); }
.member__who { display: flex; gap: 12px; min-width: 0; }
.member__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member__name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.member__email { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.member__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.member--off .member__name { color: var(--ink-soft); }
.member--off .avatar { opacity: .55; }

.chip--quiet { background: var(--surface-hover); color: var(--ink-soft); padding: 2px 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600;
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.pill svg { flex: 0 0 auto; }
.pill--active { background: var(--ok-bg); color: var(--ok-ink); }
.pill--inactive { background: var(--surface-hover); color: var(--ink-soft); }
.pill--never_entered { background: var(--people-tint); color: var(--people-ink); }
.pill--warn { background: var(--finance-tint); color: var(--finance-ink); }
.pill--ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill--info { background: var(--people-tint); color: var(--people-ink); }
.pill--danger { background: var(--danger-bg); color: var(--danger-ink); }
.pill--quiet { background: var(--surface-hover); color: var(--ink-soft); }
.pill[hidden] { display: none; }

.member__app { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.member__applabel { display: none; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.member__switch { display: flex; align-items: center; gap: 10px; }
.member__state { font-size: 14px; font-weight: 500; }
.member__pending { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.member__reason { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.member__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 22px; }
.member__notice { grid-column: 1 / -1; }
.member__notice .alert { margin: 0; }
.btn-link--ink { color: var(--people-ink); }

.switch {
  position: relative; flex: 0 0 auto; width: 46px; height: 26px; border-radius: 999px; border: 0; padding: 0;
  cursor: pointer; background: var(--muted); transition: background .15s;
}
.switch[aria-checked="true"] { background: var(--ok-ink); }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] .switch__knob { transform: translateX(20px); }

.confirm summary { list-style: none; cursor: pointer; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm[open] { flex: 1 0 100%; }
.confirm__box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 480px;
  margin-top: 8px; padding: 16px; border-radius: 14px; background: var(--surface-alt);
}
.confirm__text { margin: 0; font-size: 14px; color: var(--ink-soft); }
.confirm__text strong { color: var(--ink); }
/* Sólido, y con otro nombre: el backoffice carga también esta hoja y su `.btn--danger` es de contorno. */
.btn--danger-solid { background: var(--danger-ink); color: #fff; }
.btn--danger-solid:hover { background: #7d1853; }

.team__apps { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.team__apps legend { padding: 0; margin-bottom: 10px; }
.team__apps-list { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.team__check { font-size: 15px; color: var(--ink); }

/* ---------- Registro, estados de suscripción y planes (fase 3) ---------- */
.auth__alt { margin: 0; text-align: center; }
.auth__email { overflow-wrap: anywhere; }
.field__opt { font-weight: 400; color: var(--muted); }
.choices { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 8px; }
.choices__list { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--line-input); border-radius: var(--radius-input); background: #fff; font-size: 15px;
}
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface-alt); font-weight: 600; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.home__messages { display: flex; flex-direction: column; gap: 8px; margin: 0 0 24px; }
.card-app__status { display: flex; }
.card-app__status .pill { white-space: normal; }
.card-app__cta--stack { flex-direction: column; }
.card-app__cta--stack .btn--outline { align-self: stretch; }
.card-app__cta--stack .card-app__cta-main { flex: none; }
.card-app__fine { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

.plans { width: 100%; border-collapse: collapse; }
.plans th {
  text-align: left; padding: 0 16px 10px 0; font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.plans td { padding: 16px 16px 16px 0; border-top: 1px solid #f0eff3; vertical-align: top; font-size: 15px; }
.plans tbody tr:first-child td { border-top: 0; }
.plans__app { font-weight: 600; }
.plans__note { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--muted); }
.plans__help { margin: 20px 0 0; font-size: 14px; color: var(--ink-soft); }

@media (max-width: 760px) {
  .team-head { display: none; }
  .member { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .member__applabel { display: block; }
  .team__org { padding: 14px; }
  .plans thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .plans, .plans tbody, .plans tr, .plans td { display: block; }
  .plans tr { padding: 16px 0; border-top: 1px solid #f0eff3; display: grid; gap: 8px; }
  .plans tbody tr:first-child { border-top: 0; padding-top: 0; }
  .plans td { border: 0; padding: 0; }
  .plans td[data-label]::before {
    content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 2px;
  }
}

/* Otras organizaciones con algo por hacer en una tarjeta (configurar o empezar la prueba). */
.card-app__others { border-top: 1px solid #f0eff3; padding-top: 12px; }
.card-app__others-title { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.card-app__others-list { list-style: none; margin: 0; padding: 0; }
.card-app__other { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.card-app__other-name { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.card-app__other form { flex: none; margin: 0; }
@media (max-width: 480px) {
  .card-app__other { flex-wrap: wrap; }
  .card-app__other form { margin-left: auto; }
}

/* Páginas de texto públicas (términos y condiciones, etc.) */
.docpage { min-height: 100vh; display: flex; flex-direction: column; padding: 0 24px; }
.docpage__head { max-width: 760px; width: 100%; margin: 0 auto; padding: 32px 0 0; }
.docpage__main { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 40px 0 56px; }
.docpage__article > .small { margin: 8px 0 32px; }
.docpage__foot { max-width: 760px; width: 100%; margin: 0 auto; padding: 24px 0 32px; font-size: 14px; color: var(--muted); }
.prose { font-size: 16px; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; }
.prose h2 { font-size: 22px; font-weight: 700; margin: 36px 0 12px; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
.prose h4 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--people-ink); text-decoration: underline; }
