/* ═══════════════════════════════════════════════════════════════════════════
   SAELYX · SX-STUDIO · shell de aplicación para el área de cuenta
   Réplica web del Studio de macOS (SXColor/SXSurfaces/SXTypography/SXLayout):
   sidebar fija con marca + navegación icono/label + bloque de usuario, y zona
   de contenido por capas (#0B0E10 base · cards #13171A · elevadas #1B2125),
   hairlines al 8% y acento #6E8BFF quirúrgico.
   Tokens: hereda TODAS las custom properties de sx.css (no se redeclara hex de
   marca): true black de base y elevaciones --bg-elev-1..4 por encima.
   ═════════════════════════════════════════════════════════════════════════ */

:root {
  /* 240 es el ancho ideal del sidebar de la app (min 220 / max 280). Estaba en 248. */
  --sxs-side-w: 240px;
  /* Rótulo de grupo · la app los pinta al 45 %; aquí estaban al 30 % (--text-disabled)
     y se leían MÁS apagados que en la app. No hay token para .45: se nombra aquí, en la
     hoja que solo cargan el panel y la cuenta. */
  --sxs-group-ink: rgba(255, 255, 255, 0.45);
  /* La regla de la app es «fila activa = ACENTO al 14 %». Derivándolo del token se
     cumple sola cuando el acento cambia — y de hecho ya ha cambiado una vez.
     La primera declaración es el respaldo para navegadores sin color-mix, así que
     hay que mantenerla en el mismo hex que --accent o los navegadores viejos
     pintan la fila de otro color (con el verde anterior pasaba justo eso). */
  --sxs-accent-row: rgba(110, 139, 255, 0.14);
  --sxs-accent-row: color-mix(in srgb, var(--accent) 14%, transparent);
  --sxs-danger-soft: rgba(255, 107, 107, 0.10);
  --sxs-topbar-h: 56px;
}

/* ── 1. App frame ─────────────────────────────────────────────────────────── */
.sxs-body { background: var(--bg-base); min-height: 100vh; min-height: 100dvh; }

.sxs-app { display: flex; min-height: 100vh; min-height: 100dvh; }

/* ── 2. Sidebar (SidebarView · bgElev1 a sangre + hairline derecha) ───────── */
.sxs-side {
  width: var(--sxs-side-w); flex: 0 0 var(--sxs-side-w);
  display: flex; flex-direction: column;
  background: var(--bg-elev-1);
  border-right: 1px solid var(--stroke-hairline);
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  z-index: var(--z-nav);
}

/* Brand · orbe canónico 24px + wordmark + badge Founders (mono, capsule elev2) */
.sxs-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 16px 20px;
}
.sxs-brand .orb-wrap { width: 24px; height: 24px; flex: 0 0 auto; }
.sxs-brand-name {
  font-size: var(--fs-body); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-head); color: var(--text-primary);
}
.sxs-badge {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px; font-weight: var(--fw-medium);
  letter-spacing: 0.04em; color: var(--text-secondary);
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--bg-elev-2);
  box-shadow: inset 0 0 0 1px var(--stroke-hairline);
  white-space: nowrap;
}

/* Navegación · filas icono(18 frame)+label, radio 12, activa accent 14% */
.sxs-nav {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 8px;
  scrollbar-width: none;
}
.sxs-nav::-webkit-scrollbar { display: none; }
.sxs-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: var(--r-md);
  font-size: var(--fs-callout); font-weight: var(--fw-medium);
  /* El interlineado de 1.6 del cuerpo viene del CSS de marketing, donde tiene sentido
     (párrafos largos). Heredado en una fila de navegación de una línea, infla la caja a
     40 px cuando la misma fila en la app mide ~34: un 18 % de aire de más en CADA fila,
     que recorre el sidebar entero. No es el color lo que aplana esta capa, es esto. */
  line-height: 1.25;
  color: var(--text-secondary); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
/* La app usa 13 pt en un carril de 18; 16 se veía más gordo. 14 es el punto
   donde el trazo del icono web no se afina de más. */
.sxs-nav a svg { width: 14px; height: 14px; flex: 0 0 18px; color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-out); }
.sxs-nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); }
/* Con el dedo, la densidad cede: se recupera la altura cómoda de toque. */
@media (pointer: coarse) {
  .sxs-nav a { padding-top: 12px; padding-bottom: 12px; }
}
.sxs-nav a.active, .sxs-nav a.is-active {
  background: var(--sxs-accent-row); color: var(--text-primary);
}
.sxs-nav a.active svg, .sxs-nav a.is-active svg { color: var(--accent); }
.sxs-nav a.danger { color: var(--text-tertiary); }
.sxs-nav a.danger svg { color: var(--text-tertiary); }
.sxs-nav a.danger:hover, .sxs-nav a.danger.active {
  background: var(--sxs-danger-soft); color: #ff9b9b;
}
.sxs-nav a.danger:hover svg, .sxs-nav a.danger.active svg { color: #ff9b9b; }
.sxs-nav-sep { height: 1px; flex: 0 0 1px; background: var(--stroke-hairline); margin: 8px 10px; }

/* Etiqueta de grupo de navegación (réplica de las secciones del sidebar Mac:
   "Tu Saelyx", "Conexiones", "Cuenta"). Mono, micro, muda — agrupa filas. */
.sxs-nav-group {
  font-family: var(--font-mono); font-size: 10px; font-weight: var(--fw-medium);
  /* La app usa tracking 1.2 sobre 10 pt = 0.12em. Aquí había 0.06em, la mitad: el
     rótulo se leía apretado y perdía el aire de rótulo. */
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sxs-group-ink);
  padding: 14px 12px 4px;
}
.sxs-nav-group:first-child { padding-top: 4px; }
/* Contador a la derecha de una fila (p. ej. nº de reuniones / memorias) */
.sxs-nav a .sxs-count {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); background: var(--bg-elev-2);
  padding: 1px 7px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--stroke-hairline);
}

/* Footer nav · filas secundarias mudas (footerRow del Studio) */
.sxs-side-foot {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 8px 12px;
}
.sxs-side-foot a {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 10px; border-radius: var(--r-md);
  font-size: var(--fs-caption); color: var(--text-tertiary);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.sxs-side-foot a svg { width: 15px; height: 15px; flex: 0 0 18px; opacity: .75; }
.sxs-side-foot a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-secondary); }

/* User pill inferior · avatar inicial + nombre + meta mono, sobre white 3% */
.sxs-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--stroke-hairline);
}
.sxs-avatar {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px; font-weight: var(--fw-semibold); text-transform: uppercase;
}
.sxs-user-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sxs-user-meta strong {
  font-size: 12px; font-weight: var(--fw-semibold); color: rgba(255, 255, 255, 0.92);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sxs-user-meta span {
  font-family: var(--font-mono); font-size: 10px; color: rgba(255, 255, 255, 0.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sxs-user-action {
  margin-left: auto; flex: 0 0 auto;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--r-sm); color: var(--text-tertiary);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.sxs-user-action svg { width: 15px; height: 15px; }
.sxs-user-action:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }

/* ── 3. Zona principal ───────────────────────────────────────────────────── */
.sxs-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
  position: relative;
}
/* Glow tenue del acento tras el contenido (sxScreenBackground) · barato */
.sxs-main::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 420px;
  background: radial-gradient(60% 100% at 50% 0%, var(--accent-glow-soft), transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Topbar de la zona de contenido (toolbar de ventana) */
.sxs-topbar {
  position: sticky; top: 0; z-index: calc(var(--z-nav) - 1);
  height: var(--sxs-topbar-h);
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(0, 0, 0, 0.92);                    /* fallback sólido WebKit */
  border-bottom: 1px solid var(--stroke-hairline);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sxs-topbar {
    background: rgba(0, 0, 0, 0.74);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
}
.sxs-crumb {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-caption); color: var(--text-tertiary); min-width: 0;
}
.sxs-crumb b { color: var(--text-secondary); font-weight: var(--fw-medium); white-space: nowrap; }
.sxs-crumb svg { width: 13px; height: 13px; opacity: .55; flex: 0 0 auto; }
.sxs-topbar-spacer { flex: 1 1 auto; }
.sxs-topbar-mail {
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-tertiary);
  max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* El plan NO se encoge ni se oculta en móvil, al revés que el correo de al lado:
   cabe siempre (la etiqueta más larga es «Premium») y es justo el dato que en las
   dos apps había que ir a buscar. El correo sí se puede sacrificar -- se sigue
   viendo en Perfil. */
#acct-plan { flex: 0 0 auto; }
.sxs-toplink {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px var(--stroke-hairline);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.sxs-toplink svg { width: 14px; height: 14px; }
.sxs-toplink:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }

/* Contenido */
.sxs-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 880px;
  padding: clamp(24px, 4vh, 40px) clamp(16px, 3vw, 32px) var(--sp-16);
  margin-inline: auto;
}

/* ── 4. Cabecera de sección (icono en tile + título + descripción) ───────── */
.acct-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin: 0 0 var(--sp-6); }
.acct-head-ico {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--bg-elev-2);
  box-shadow: inset 0 0 0 1px var(--stroke-hairline), inset 0 1px 0 rgba(255,255,255,0.05);
  color: var(--accent);
}
.acct-head-ico svg { width: 19px; height: 19px; }
.acct-h1 {
  font-size: var(--fs-h3); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-head); color: var(--text-primary); line-height: 1.2;
}
.acct-sub { color: var(--text-secondary); font-size: var(--fs-label); margin: 3px 0 0; line-height: var(--lh-snug); }

/* ── 4b. Home (encargo 29-ago: primera pantalla del panel, no Chat) ───────── */
.acct-home .acct-h1 { margin-bottom: var(--sp-2); }
.acct-home .acct-sub { margin-bottom: var(--sp-6); }
.acct-home-card { display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
.acct-home-orb { width: 96px; flex: 0 0 96px; }
.acct-home-card-body { flex: 1 1 260px; min-width: 200px; }
.acct-home-title { font-size: var(--fs-h3); font-weight: var(--fw-semibold); color: var(--text-primary); }
.acct-home-note { color: var(--text-tertiary); font-size: var(--fs-caption); margin: var(--sp-4) 0 0; }
@media (max-width: 560px) {
  .acct-home-card { flex-direction: column; align-items: flex-start; text-align: left; }
  .acct-home-orb { width: 72px; flex-basis: 72px; }
}

/* ── 5. Cards (sxCard · elev1 + hairline + sombra doble suave) ────────────── */
.acct-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--stroke-hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 28px -14px rgba(0, 0, 0, 0.55);
  transition: border-color var(--dur-base) var(--ease-out);
}
.acct-card:hover { border-color: var(--stroke-soft); }
.acct-card h3 {
  font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-label);
  color: var(--text-tertiary); font-weight: var(--fw-semibold); margin: 0 0 var(--sp-4);
}

/* Filas clave/valor */
.acct-row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  padding: 12px 0; border-bottom: 1px solid var(--stroke-hairline);
}
.acct-row:first-of-type { padding-top: 0; }
.acct-row:last-child { border-bottom: 0; padding-bottom: 0; }
.acct-row .k { color: var(--text-tertiary); font-size: var(--fs-caption); }
.acct-row .v { color: var(--text-primary); font-weight: var(--fw-medium); font-size: var(--fs-label); text-align: right; }
.acct-row .v .sub2 { display: block; font-size: var(--fs-micro); color: var(--text-tertiary);
  font-weight: var(--fw-regular); font-family: var(--font-mono); }

/* ── 6. Pills de plan/estado ──────────────────────────────────────────────── */
.acct-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: var(--fw-semibold); padding: 3px 11px;
  border-radius: var(--r-pill); border: 1px solid var(--stroke-hairline);
  font-variant-numeric: tabular-nums;
}
.acct-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.acct-pill.free { color: var(--text-secondary); }
.acct-pill.pro, .acct-pill.premium, .acct-pill.pro_plus, .acct-pill.ultra,
.acct-pill.team, .acct-pill.enterprise {
  color: var(--accent-bright); background: var(--accent-glow-soft);
  border-color: var(--stroke-accent);
}
/* Suscripción ACTIVA: verde de ÉXITO, no acento. Se queda verde a propósito.
   Los rgba son --success al 40 / 10 % (respaldo sin color-mix): que ninguna
   limpieza de verde se los lleve por delante. */
.acct-pill.st-active, .acct-pill.active {
  color: var(--success); border-color: rgba(61, 214, 140, 0.40); background: rgba(61, 214, 140, 0.10);
  border-color: color-mix(in srgb, var(--success) 40%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent); }
.acct-pill.st-trialing {
  color: var(--accent-bright); border-color: var(--stroke-accent); background: var(--accent-glow-soft); }
.acct-pill.st-past_due, .acct-pill.st-canceled, .acct-pill.past_due {
  color: var(--warm); border-color: rgba(242, 177, 121, 0.40); background: var(--warm-glow); }
.acct-pill.st-none, .acct-pill.none { color: var(--text-tertiary); }

/* ── 7. Medidor de uso + stats ────────────────────────────────────────────── */
.acct-meter-num {
  font-size: var(--fs-h3); font-weight: var(--fw-semibold); letter-spacing: -0.01em;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.acct-meter-num small { font-size: var(--fs-label); font-weight: var(--fw-regular); color: var(--text-tertiary); }
.acct-meter {
  height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06);
  overflow: hidden; margin: 14px 0 10px;
}
.acct-meter > i {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width var(--dur-slow) var(--ease-out);
}
.acct-meter.warn > i { background: linear-gradient(90deg, var(--warm), #f7c79b); }
.acct-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.acct-stat {
  background: var(--bg-elev-2); border: 1px solid var(--stroke-hairline);
  border-radius: var(--r-md); padding: var(--sp-4);
}
.acct-stat .n { font-size: var(--fs-h3); font-weight: var(--fw-semibold);
  color: var(--text-primary); font-variant-numeric: tabular-nums; }
.acct-stat .l { font-size: var(--fs-micro); color: var(--text-tertiary); margin-top: 2px; }

/* ── 7b. Galería de fotos (Memoria · personas/imágenes, 30-ago) ─────────────
   Dato que ya viajaba en /me/memory (image_url presignada) sin ninguna
   interfaz que lo pintara -- solo layout, cero endpoint nuevo. */
.acct-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--sp-3); }
.acct-photo { display: flex; flex-direction: column; gap: 6px; }
.acct-photo-img {
  aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-elev-2); border: 1px solid var(--stroke-hairline);
}
.acct-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-photo-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-disabled); }
.acct-photo-ph svg { width: 28px; height: 28px; }
.acct-photo-cap { font-size: var(--fs-micro); color: var(--text-secondary); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-photo-actions { display: flex; gap: var(--sp-2); }
.acct-photo-btn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: var(--fs-micro); color: var(--text-tertiary); text-decoration: underline;
}
.acct-photo-btn:hover { color: var(--text-secondary); }
.acct-photo-btn.danger:hover { color: #ff9b9b; }
.acct-photo-btn:disabled { opacity: .5; cursor: default; text-decoration: none; }

/* ── 8. Listas (sesiones · dispositivos · calendarios) ────────────────────── */
.acct-list { display: flex; flex-direction: column; }
.acct-item {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  padding: 14px 0; border-bottom: 1px solid var(--stroke-hairline);
}
.acct-item:last-child { border-bottom: 0; padding-bottom: 0; }
.acct-item:first-child { padding-top: 0; }
.acct-item-main { min-width: 0; }
.acct-item-title {
  font-size: var(--fs-label); font-weight: var(--fw-medium); color: var(--text-primary);
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
}
.acct-item-meta { font-size: var(--fs-micro); color: var(--text-tertiary); margin-top: 3px; font-family: var(--font-mono); }
.acct-item-right { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.acct-tag {
  font-size: 11px; font-family: var(--font-mono); color: var(--text-tertiary);
  border: 1px solid var(--stroke-hairline); border-radius: var(--r-sm); padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}
.acct-tag.this { color: var(--accent-bright); border-color: var(--stroke-accent); }

/* ── 9. Botones ──────────────────────────────────────────────────────────── */
.acct-btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

.sxs-content .cta-primary, .acct-content .cta-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 40px; padding: 0 var(--sp-6); border-radius: var(--r-pill);
  font-weight: var(--fw-semibold); font-size: var(--fs-callout);
  /* Tinta oscura, no blanca: sobre el acento el blanco da 3,1:1 y suspende AA,
     mientras --ink-on-accent da 6,3:1. Y el gradiente baja hasta --accent, NO
     hasta --accent-dim: la tinta oscura sobre el paso profundo cae a 3,8:1 y este
     texto es de 15 px, no cuenta como texto grande. Así el peor punto del botón
     sigue siendo 6,3:1. */
  color: var(--ink-on-accent); cursor: pointer; border: 0;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 22px -10px var(--accent-glow);
  transition: filter var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}
.sxs-content .cta-primary:hover, .acct-content .cta-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sxs-content .cta-primary:disabled, .acct-content .cta-primary:disabled { opacity: .55; cursor: default; transform: none; }
.sxs-content .cta-primary--lg { height: 48px; padding: 0 var(--sp-8); font-size: var(--fs-body); }

.sxs-content .cta-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 40px; padding: 0 var(--sp-6); border-radius: var(--r-pill);
  font-weight: var(--fw-semibold); font-size: var(--fs-callout); color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--stroke-soft);
  transition: box-shadow var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.sxs-content .cta-secondary:hover { color: var(--accent-bright); box-shadow: inset 0 0 0 1px var(--stroke-accent); }

.acct-ghost {
  display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer;
  font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--text-primary);
  background: none; padding: 10px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--stroke-soft);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.acct-ghost:hover { border-color: var(--stroke-accent); color: var(--accent-bright); background: rgba(255, 255, 255, 0.03); }
.acct-ghost.danger { color: var(--text-secondary); }
.acct-ghost.danger:hover { border-color: rgba(255, 107, 107, 0.50); color: #ff9b9b; background: rgba(255, 107, 107, 0.06); }
.acct-ghost:disabled { opacity: .5; cursor: default; }

/* ── 10. Inputs ──────────────────────────────────────────────────────────── */
.acct-field { display: flex; gap: var(--sp-3); align-items: center; }
.acct-field input {
  flex: 1; min-width: 0;
  background: var(--bg-elev-2); border: 1px solid var(--stroke-hairline);
  border-radius: var(--r-md); color: var(--text-primary);
  padding: 10px 13px; font-size: var(--fs-label); font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.acct-field input::placeholder { color: var(--text-disabled); }
/* Foco: el anillo SÓLIDO es el que se ve. Antes eran dos capas translúcidas (borde
   tenue + halo al 12%) que juntas no llegaban a 2:1 contra la tarjeta: quitaba el
   outline nativo y no ponía nada visible en su lugar. */
.acct-field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-glow-soft); }
.acct-textarea {
  width: 100%; resize: vertical; min-height: 60px;
  background: var(--bg-elev-2); border: 1px solid var(--stroke-hairline);
  border-radius: var(--r-md); color: var(--text-primary);
  padding: 10px 13px; font-size: var(--fs-label); font-family: inherit; line-height: 1.5;
}
.acct-textarea::placeholder { color: var(--text-disabled); }
.acct-textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-glow-soft); }
.acct-row input[type="range"] { width: 160px; accent-color: var(--accent); }
.acct-row select {
  background: var(--bg-elev-2); border: 1px solid var(--stroke-hairline); border-radius: var(--r-md);
  color: var(--text-primary); padding: 6px 10px; font-size: var(--fs-label); font-family: inherit;
}

/* ── 11. Notas, hints y estados ──────────────────────────────────────────── */
.acct-note { color: var(--text-secondary); font-size: var(--fs-caption); line-height: 1.55; margin: 0 0 var(--sp-4); }
.acct-note a { color: var(--accent-bright); }
.acct-hint { color: var(--text-tertiary); font-size: var(--fs-caption); margin: 12px 0 0; min-height: 18px; }
.acct-hint.ok { color: var(--success); }
.acct-hint.err { color: #ff9b9b; }

.acct-state { padding: 28px 16px; text-align: center; color: var(--text-tertiary); font-size: var(--fs-label); }
.acct-state .acct-state-ico { width: 34px; height: 34px; margin: 0 auto 12px; opacity: .5; display: block; }
.acct-spin {
  width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin-right: 8px;
  border: 2px solid var(--stroke-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: sxs-sp .7s linear infinite;
}
@keyframes sxs-sp { to { transform: rotate(360deg); } }
.acct-skel {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%; animation: sxs-shimmer 1.3s ease infinite; border-radius: var(--r-sm);
}
@keyframes sxs-shimmer { to { background-position: -200% 0; } }
.acct-skel-row { height: 14px; margin: 10px 0; }

/* ── Indicador de carga con orbe (reemplaza .acct-skel en loadingCard(), 30-ago) ──
   NO es `.orb` de sx.css tal cual -- ese tiene 9 radial-gradient apilados + un halo
   con blur(54px) + box-shadow de 5 capas, pensado para UN orbe grande y único en
   pantalla. Aquí puede haber más de uno a la vez (p.ej. Calendarios llama
   loadingCard() dos veces en la misma vista) y tiene que costar poco en móvil --
   por eso solo 2 capas de gradient, sin `filter:blur`, y la animación anima
   SOLO `transform`/`opacity` (compositor, no repintado por fotograma). Mismos
   colores que el orbe real (--orb-violet/--orb-cyan/--orb-pink/--orb-core), no
   inventados -- "coherente con el arcoíris periwinkle de la app, no teal". */
.acct-loading-orb {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background:
    radial-gradient(55% 55% at 35% 30%, var(--orb-core) 0%, transparent 60%),
    radial-gradient(120% 120% at 50% 50%, var(--orb-violet) 0%, var(--orb-cyan) 55%, var(--orb-pink) 100%);
  animation: acct-loading-orb-pulse 1.2s ease-in-out infinite;
}
@keyframes acct-loading-orb-pulse { 0%, 100% { transform: scale(0.90); opacity: 0.80; } 50% { transform: scale(1.06); opacity: 1; } }

.acct-danger-zone { border-color: rgba(255, 107, 107, 0.28); }
.acct-danger-zone h3 { color: #ff9b9b; }
.acct-hide { display: none !important; }

/* Toast */
.acct-toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-elev-3); border: 1px solid var(--stroke-soft); color: var(--text-primary);
  border-radius: var(--r-md); padding: 12px 20px; font-size: var(--fs-caption);
  opacity: 0; pointer-events: none; z-index: var(--z-popover);
  box-shadow: var(--shadow-lg);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.acct-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 12. Dashboard (panel post-login) ────────────────────────────────────── */
.dash-head { margin: 0 0 var(--sp-8); }
.kicker {
  display: inline-block; font-size: var(--fs-micro); font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-accent);
}
.dash-title {
  font-size: clamp(26px, 3.4vw, 32px); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-head); line-height: var(--lh-tight);
  color: var(--text-primary); margin-top: var(--sp-2);
}
.dash-title em { font-style: normal; color: var(--accent-bright); }
.dash-deck { color: var(--text-secondary); font-size: var(--fs-callout); max-width: 52ch; margin-top: var(--sp-3); }
.dash-section { margin-bottom: var(--sp-12); }
.dash-section-head { margin-bottom: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.dash-h2 { font-size: var(--fs-title); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-head); color: var(--text-primary); }

/* Tarjeta hero de descarga (elev1 + tinte de acento en esquina) */
.dash-download-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--stroke-hairline); border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 34px -16px rgba(0,0,0,0.6);
  padding: var(--sp-8); display: grid; grid-template-columns: auto 1fr; gap: var(--sp-6);
  align-items: start; position: relative; overflow: hidden;
}
.dash-download-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(55% 75% at 100% 0%, var(--accent-glow-soft), transparent 65%);
}
.dash-download-icon {
  width: 60px; height: 60px; border-radius: var(--r-lg); display: grid; place-items: center;
  background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--stroke-hairline);
}
.dash-download-tag {
  display: inline-block; font-family: var(--font-mono); font-size: var(--fs-micro);
  color: var(--accent-bright); letter-spacing: 0.02em; margin-bottom: var(--sp-3);
  padding: 3px 10px; border-radius: var(--r-pill); background: var(--accent-glow-soft);
  box-shadow: inset 0 0 0 1px var(--stroke-accent);
}
.dash-download-title {
  font-size: var(--fs-h3); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-head);
  color: var(--text-primary); margin-bottom: var(--sp-2);
}
.dash-download-title em { font-style: normal; color: var(--accent-bright); }
.dash-download-deck { color: var(--text-secondary); font-size: var(--fs-callout); margin-bottom: var(--sp-6); }
.dash-download-foot { color: var(--text-tertiary); font-size: var(--fs-caption); margin-top: var(--sp-4); position: relative; }
.dash-download-foot strong { color: var(--text-secondary); font-weight: var(--fw-medium); }
.dash-download-body { position: relative; }

/* Plataformas */
.dash-platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-4); padding: 0; list-style: none; }
.platform-card {
  background: var(--bg-elev-1); border: 1px solid var(--stroke-hairline); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-6); display: flex; flex-direction: column; gap: 2px;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.platform-card:hover { border-color: var(--stroke-soft); transform: translateY(-2px); }
/* "Listo para descargar" va con el ACENTO, no con el verde de éxito: es una
   invitación a pulsar, no la confirmación de algo que ya ha ocurrido. La
   distinción real de la tarjeta es acento contra gris terciario. */
.platform-card--ready { border-color: var(--stroke-accent); box-shadow: 0 0 32px -16px var(--accent-glow); }
.platform-card-name { font-weight: var(--fw-semibold); color: var(--text-primary); font-size: var(--fs-callout); }
.platform-card-status { font-size: var(--fs-caption); color: var(--text-tertiary); }
.platform-card--ready .platform-card-status { color: var(--accent-bright); }
.platform-card-action { font-size: var(--fs-caption); color: var(--accent-bright); margin-top: var(--sp-2); }
.platform-card-action:hover { text-decoration: underline; }

/* Plan */
.dash-plan-card {
  background: var(--bg-elev-1); border: 1px solid var(--stroke-hairline); border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 28px -14px rgba(0,0,0,0.55);
  padding: var(--sp-6); display: grid; gap: var(--sp-3);
}
.price-tier {
  display: inline-flex; align-items: center; width: fit-content;
  font-size: var(--fs-micro); font-weight: var(--fw-semibold); letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: var(--r-pill);
  color: var(--accent-bright); background: var(--accent-glow-soft);
  box-shadow: inset 0 0 0 1px var(--stroke-accent);
}
.dash-plan-line { color: var(--text-secondary); font-size: var(--fs-callout); margin: 0; }
.dash-plan-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-top: var(--sp-2); }
.dash-empty {
  background: var(--bg-elev-1); border: 1px dashed var(--stroke-soft); border-radius: var(--r-lg);
  padding: var(--sp-6); color: var(--text-tertiary); font-size: var(--fs-callout);
}
.dash-empty a { color: var(--accent-bright); }

/* Pie compacto dentro del contenido */
.sxs-foot {
  display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center;
  border-top: 1px solid var(--stroke-hairline); padding-top: var(--sp-6); margin-top: var(--sp-12);
  font-size: var(--fs-micro); color: var(--text-tertiary);
}
.sxs-foot nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.sxs-foot a { color: var(--text-tertiary); transition: color var(--dur-fast) var(--ease-out); }
.sxs-foot a:hover { color: var(--text-secondary); }

/* ── 13. Móvil · sidebar como sheet (checkbox hack · CSS puro, CSP-safe) ──── */
.sxs-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.sxs-burger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm); cursor: pointer;
  color: var(--text-secondary); flex: 0 0 auto;
}
.sxs-burger:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.sxs-burger svg { width: 18px; height: 18px; }
.sxs-scrim {
  display: none; position: fixed; inset: 0; z-index: calc(var(--z-nav) + 1);
  background: var(--scrim); opacity: 0; pointer-events: none; cursor: pointer;
  transition: opacity var(--dur-base) var(--ease-out);
}

@media (max-width: 900px) {
  .sxs-burger { display: inline-flex; }
  .sxs-scrim { display: block; }
  .sxs-side {
    position: fixed; top: 0; bottom: 0; left: 0; height: auto;
    z-index: calc(var(--z-nav) + 2);
    transform: translateX(-102%);
    transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: var(--shadow-lg);
    width: min(82vw, var(--sxs-side-w));
  }
  .sxs-nav-toggle:checked ~ .sxs-app .sxs-side { transform: translateX(0); }
  .sxs-nav-toggle:checked ~ .sxs-app .sxs-scrim { opacity: 1; pointer-events: auto; }
  .sxs-topbar-mail { display: none; }
  .sxs-toplink span { display: none; }
  .sxs-toplink { width: 32px; padding: 0; justify-content: center; }
  .acct-stat-grid { grid-template-columns: 1fr; }
  .dash-download-card { grid-template-columns: 1fr; padding: var(--sp-6); }
  .dash-platforms { grid-template-columns: 1fr; }
  .acct-head-ico { width: 38px; height: 38px; flex-basis: 38px; }
  /* Efectos caros fuera en móvil */
  .sxs-main::before { display: none; }
  .acct-card, .dash-plan-card, .dash-download-card { box-shadow: none; }
}

@media (max-width: 560px) {
  .acct-field { flex-direction: column; align-items: stretch; }
  .acct-row { flex-wrap: wrap; }
  .acct-row .v { text-align: left; }
}

/* Micro-feedback de pulsación · botones y filas responden al tacto */
.sxs-nav a, .sxs-side-foot a, .sxs-user-action, .acct-ghost,
.sxs-content .cta-primary, .acct-content .cta-primary, .sxs-content .cta-secondary {
  -webkit-tap-highlight-color: transparent;
}
.sxs-nav a:active { transform: scale(0.985); }
.sxs-content .cta-primary:active, .acct-content .cta-primary:active {
  transform: translateY(0) scale(0.98); filter: brightness(0.96);
}
.acct-ghost:active, .sxs-content .cta-secondary:active { transform: scale(0.98); }
.sxs-nav a { transition: background var(--dur-fast) var(--ease-out),
  color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring); }

/* ── 15. Secciones de paridad con la app (Conocimiento · Memoria · Reuniones ·
        Invita) · prosa de ficha, cards clicables→modal, caja de invitación ─── */

/* "Quién soy" · la misma ficha que siembra el wizard, renderizada como prosa */
.acct-doc {
  font-size: var(--fs-label); line-height: 1.62; color: var(--text-secondary);
  word-break: break-word;
}
.acct-doc h1, .acct-doc h2, .acct-doc h3 {
  color: var(--text-primary); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-head); line-height: 1.3; margin: var(--sp-5) 0 var(--sp-2);
}
.acct-doc h1 { font-size: var(--fs-title); }
.acct-doc h2 { font-size: var(--fs-body); }
.acct-doc h3 { font-size: var(--fs-label); color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: var(--tracking-label); font-size: var(--fs-micro); }
.acct-doc :first-child { margin-top: 0; }
.acct-doc p { margin: 0 0 var(--sp-3); }
.acct-doc ul, .acct-doc ol { margin: 0 0 var(--sp-3); padding-left: 20px; }
.acct-doc li { margin: 2px 0; }
.acct-doc strong { color: var(--text-primary); font-weight: var(--fw-semibold); }
.acct-doc code {
  font-family: var(--font-mono); font-size: 0.88em; color: var(--accent-bright);
  background: var(--bg-elev-2); padding: 1px 6px; border-radius: var(--r-sm);
}
.acct-doc hr { border: 0; border-top: 1px solid var(--stroke-hairline); margin: var(--sp-5) 0; }

/* Meta-fila bajo la cabecera de una sección (versión · fecha · contador) */
.acct-meta-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  margin-bottom: var(--sp-4);
}
.acct-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary);
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--stroke-hairline);
}
.acct-chip.accent { color: var(--accent-bright); box-shadow: inset 0 0 0 1px var(--stroke-accent);
  background: var(--accent-glow-soft); }

/* Card clicable (réplica del patrón card→modal de la home) */
.acct-item.is-clickable { cursor: pointer; transition: background var(--dur-fast) var(--ease-out); border-radius: var(--r-md); }
.acct-item.is-clickable:hover { background: rgba(255,255,255,0.03); }
.acct-item.is-clickable:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent); }
.acct-item .acct-chevron { color: var(--text-disabled); width: 16px; height: 16px; flex: 0 0 auto; }
.acct-item.is-clickable:hover .acct-chevron { color: var(--accent); }

/* Caja de invitación · enlace de referido + botón copiar (estado honesto: muestra
   tu email como código de referido real, sin inventar métricas que no tenemos) */
.acct-invite {
  display: flex; gap: var(--sp-3); align-items: stretch; flex-wrap: wrap; margin-top: var(--sp-2);
}
.acct-invite-code {
  flex: 1 1 240px; min-width: 0; display: flex; align-items: center;
  font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-secondary);
  background: var(--bg-elev-2); border: 1px solid var(--stroke-hairline);
  border-radius: var(--r-md); padding: 0 14px; height: 40px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-share-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-4); }

/* Estado vacío elegante con icono en tile (réplica de la app · sin placebos) */
.acct-empty-rich { text-align: center; padding: 34px 18px; }
.acct-empty-rich .acct-empty-tile {
  width: 52px; height: 52px; border-radius: var(--r-lg); margin: 0 auto var(--sp-4);
  display: grid; place-items: center; color: var(--accent);
  background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--stroke-hairline);
}
.acct-empty-rich .acct-empty-tile svg { width: 24px; height: 24px; }
.acct-empty-rich strong { display: block; color: var(--text-primary); font-size: var(--fs-label);
  font-weight: var(--fw-semibold); margin-bottom: 6px; }
.acct-empty-rich p { color: var(--text-tertiary); font-size: var(--fs-caption); margin: 0 auto; max-width: 42ch; line-height: 1.55; }

/* ── 13b. Chat (sección del shell) ────────────────────────────────────────
 * Mismo par de caras que /app/chat/chat.css (documento en escritorio, burbuja
 * en móvil a los 720px), reescrito sobre los tokens de ESTE sistema (--accent,
 * --bg-elev-*, .orb canónico) en vez de duplicar variables propias — es la
 * misma pantalla, ahora vive dentro del shell en vez de aislada.
 * `.chat-panel` fija su alto a la ventana menos la topbar, para que el hilo
 * scrollee por dentro y el compositor quede siempre visible, sin pelearse con
 * el scroll de .sxs-content. */
.chat-panel {
  display: flex; flex-direction: column;
  /* Alto pensado para la ventana, MENOS lo que ya ocupan la topbar y la
     cabecera de sección (icono+título+subtítulo) que pinta header() antes de
     este bloque -- un margen negativo que intentara cancelar TODO el padding
     de .sxs-content solapaba la cabecera con la fila de estado del chat
     (medido con captura real, 29-ago). Sin negativo arriba: el hilo scrollea
     por dentro, el compositor se queda pegado al fondo de ESTE bloque, no al
     borde real de la ventana -- basta, y no rompe nada por encima. */
  height: calc(100dvh - var(--sxs-topbar-h) - 220px);
  min-height: 320px;
  margin: 0 clamp(-16px, -3vw, -32px) calc(var(--sp-16) * -1);
}
.chat-thread { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-4) 0 var(--sp-2); display: flex; flex-direction: column; gap: 4px; }
.chat-empty { margin: auto; text-align: center; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.chat-empty h3 { margin: 0; font-size: var(--fs-title); color: var(--text-primary); }
.chat-empty p { margin: 0; font-size: var(--fs-callout); color: var(--text-tertiary); line-height: 1.5; }

.chat-turn { display: flex; gap: var(--sp-3); padding: 3px 0; align-items: flex-start; }
.chat-turn .rail { width: 26px; flex: 0 0 26px; display: flex; justify-content: center; }
.chat-turn .col { flex: 1; min-width: 0; }
.chat-turn .meta { display: flex; align-items: baseline; gap: var(--sp-2); margin-bottom: 3px; }
.chat-turn .meta .name { font-size: var(--fs-caption); font-weight: var(--fw-semibold); }
.chat-turn[data-speaker="saelyx"] .meta .name { color: var(--accent); }
.chat-turn[data-speaker="user"] .meta .name { color: var(--text-secondary); }
.chat-turn .meta .time { font-size: var(--fs-micro); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.chat-voice-badge { font-size: var(--fs-micro); color: var(--text-tertiary); padding: 1px 8px; border-radius: 999px; background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--stroke-hairline); cursor: help; }
.chat-turn .text { font-size: var(--fs-callout); line-height: 1.55; color: var(--text-primary); overflow-wrap: anywhere; }
.chat-turn .text p { margin: 0 0 8px; } .chat-turn .text p:last-child { margin-bottom: 0; }
.chat-turn .text code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.chat-turn[data-speaker="user"] .text { color: var(--text-secondary); }
.chat-user-glyph { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elev-3); box-shadow: inset 0 0 0 1px var(--stroke-hairline); color: var(--text-tertiary); }
.chat-user-glyph svg { width: 13px; height: 13px; }

.chat-refs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.chat-ref-chip { display: flex; align-items: center; gap: var(--sp-2); padding: 7px 10px; border-radius: var(--r-md); background: var(--accent-glow-soft); box-shadow: inset 0 0 0 1px var(--stroke-accent); font-size: var(--fs-caption); color: var(--text-secondary); }
.chat-ref-chip .t { color: var(--text-primary); font-weight: var(--fw-semibold); }
.chat-doc-card { display: flex; align-items: center; gap: var(--sp-2); margin-top: 8px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--accent); color: #fff; text-decoration: none; font-size: var(--fs-caption); font-weight: var(--fw-semibold); width: fit-content; max-width: 100%; }
.chat-doc-card .fn { font-weight: normal; opacity: .85; }

/* "Escuchar" (SaelyxVoicePlayer) -- reusa el orbe canónico a 16px, sin CSS propio de color */
.chat-tts-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; padding: 5px 12px 5px 7px; border: 0; border-radius: 999px; background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--stroke-hairline); color: var(--text-secondary); font: inherit; font-size: var(--fs-caption); cursor: pointer; }
.chat-tts-btn:hover { background: var(--bg-elev-3); }
.chat-tts-btn[data-playing="1"] { color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--stroke-accent); }
.chat-tts-orb.orb-wrap { width: 16px; flex: 0 0 16px; }

.chat-typing { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 0; }
.chat-typing .dots { display: flex; gap: 4px; padding: 9px 12px; border-radius: 14px; background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px var(--stroke-hairline); }
.chat-typing .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-tertiary); animation: chat-bounce 1.1s ease-in-out infinite; }
.chat-typing .dot:nth-child(2) { animation-delay: .15s; } .chat-typing .dot:nth-child(3) { animation-delay: .3s; }
@keyframes chat-bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-3px); } }

.chat-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.chat-quota { font-size: var(--fs-micro); font-variant-numeric: tabular-nums; color: var(--text-tertiary); padding: 3px 10px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--stroke-hairline); white-space: nowrap; }
.chat-quota.exhausted { color: #F58C8C; box-shadow: inset 0 0 0 1px rgba(245,140,140,.4); }

.chat-composer { display: flex; align-items: flex-end; gap: var(--sp-2); padding: var(--sp-3) clamp(16px, 3vw, 32px) calc(var(--sp-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--stroke-hairline); background: rgba(0,0,0,.55); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .chat-composer { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); } }
.chat-composer textarea { flex: 1; resize: none; max-height: 140px; min-height: 40px; background: var(--bg-elev-2); color: var(--text-primary); border: none; box-shadow: inset 0 0 0 1px var(--stroke-hairline); border-radius: var(--r-lg); padding: 9px 14px; font: var(--fs-callout)/1.4 inherit; outline: none; }
.chat-composer textarea:focus { box-shadow: inset 0 0 0 1px var(--stroke-accent); }
.chat-composer button { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; background: var(--bg-elev-3); color: var(--text-tertiary); }
.chat-composer button.ready { background: var(--accent); color: #fff; }
.chat-composer button:disabled { cursor: not-allowed; opacity: .6; }

@media (max-width: 720px) {
  .chat-turn { align-items: flex-end; }
  .chat-turn[data-speaker="saelyx"] { padding-right: 12%; }
  .chat-turn[data-speaker="user"] { padding-left: 12%; flex-direction: row-reverse; }
  .chat-turn .col { padding: 9px 12px; border-radius: 15px; box-shadow: inset 0 0 0 1px var(--stroke-hairline); }
  .chat-turn[data-speaker="saelyx"] .col { background: var(--bg-elev-2); position: relative; border-top-left-radius: 5px; }
  .chat-turn[data-speaker="saelyx"] .col::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--accent); }
  .chat-turn[data-speaker="user"] .col { background: var(--bg-elev-3); border-top-right-radius: 5px; }
}
@media (prefers-reduced-motion: reduce) { .chat-typing .dot { animation: none; } }

/* ── 14. Accesibilidad · reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sxs-side, .sxs-scrim, .acct-toast, .acct-meter > i,
  .platform-card, .acct-card, .cta-primary, .acct-ghost { transition: none !important; }
  .acct-skel { animation: none !important; background: rgba(255, 255, 255, 0.05); }
  .acct-loading-orb { animation: none !important; opacity: 0.85; }
  .platform-card:hover { transform: none; }
  .sxs-nav a:active, .acct-ghost:active,
  .sxs-content .cta-primary:active, .acct-content .cta-primary:active,
  .sxs-content .cta-secondary:active { transform: none; }
  .sxs-content .cta-primary:hover, .acct-content .cta-primary:hover { transform: none; }
}
