/* ═══════════════════════════════════════════════════════════════════════
 *  cuenta.css · The look of the two account pages: sign in and reset password
 *  ─────────────────────────────────────────────────────────────────────
 *  login.html and restablecer.html each carried this same <style>, word
 *  for word, and both crossed the 400-line cap with it (#290). It lives
 *  here once now, linked by both in the place of the old block, so the
 *  cascade order is the one they always had. (index.html is the other
 *  front door and has its own, entrada.css.)
 * ═══════════════════════════════════════════════════════════════════════ */
/* =========================================================
   Sistema de diseño — plataforma SaaS de chatbots con IA
   Paleta: tinta profunda + índigo (marca/tecnología) + coral
   (energía, uso puntual). Motivo de firma: la burbuja de
   conversación, presente en tarjetas, insignias y el hero.
   ========================================================= */

:root {
  --tinta: #131322;
  --marca: #7a3b5d;
  --marca-oscuro: #5f2c48;
  --marca-claro: #f7f0f4;
  --marca-grad: linear-gradient(135deg, #7a3b5d 0%, #137a4a 100%);
  --energia: #fb7455;
  --energia-claro: #ffe9e2;
  --exito: #16a34a;
  --exito-claro: #e8f8ee;
  --fondo: #faf9f7;
  --superficie: #ffffff;
  --borde: #e9e7e2;
  --muted: #696975;
  --ring: 0 0 0 4px rgba(122,59,93,.14);
  --sombra: 0 1px 2px rgba(19,19,34,.04), 0 10px 30px rgba(19,19,34,.06);
  --sombra-fuerte: 0 24px 60px rgba(19,19,34,.16), 0 4px 14px rgba(19,19,34,.08);
  --radio: 18px;
  --radio-chico: 12px;
  --fuente-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --fuente-cuerpo: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente-cuerpo);
  color: var(--tinta);
  background: var(--fondo);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

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

.contenedor {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Botones --- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.boton:hover { transform: translateY(-1px); }
.boton:active { transform: translateY(0); }
.boton:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.boton-primario { background: var(--marca); color: #fff; box-shadow: 0 8px 20px rgba(95,44,72,.28); }
.boton-primario:hover { background: var(--marca-oscuro); box-shadow: 0 10px 24px rgba(95,44,72,.34); }

.boton-energia { background: var(--energia); color: #fff; box-shadow: 0 8px 20px rgba(251,116,85,.28); }
.boton-energia:hover { filter: brightness(1.05); }

.boton-fantasma { background: transparent; color: var(--tinta); border: 1.5px solid var(--borde); }
.boton-fantasma:hover { background: var(--superficie); border-color: var(--marca); }

.boton-texto { background: transparent; color: var(--marca); padding: 8px 4px; }
.boton-texto:hover { color: var(--marca-oscuro); }

.boton-peligro { background: #fff; color: #dc2626; border: 1.5px solid #fecaca; }
.boton-peligro:hover { background: #fef2f2; }

.boton-bloque { width: 100%; }
.boton-chico { padding: 8px 16px; font-size: 13px; }

/* --- Tarjetas / superficies --- */
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

/* --- Insignia estilo "burbuja de chat" (motivo de firma) --- */
.burbuja-insignia {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 12px;
  background: var(--marca-claro);
  color: var(--marca-oscuro);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}

/* --- Formularios --- */
.campo { margin-bottom: 18px; }
.campo label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--tinta);
  margin-bottom: 6px;
}
.campo .ayuda { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.entrada, textarea.entrada, select.entrada {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-chico);
  background: var(--superficie);
  color: var(--tinta);
  transition: border-color .15s ease;
}
.entrada:focus, textarea.entrada:focus, select.entrada:focus { border-color: var(--marca); outline: none; }
textarea.entrada { resize: vertical; min-height: 90px; }

.grupo-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grupo-2 { grid-template-columns: 1fr; } }

.selector-color { display: flex; align-items: center; gap: 10px; }
.selector-color input[type="color"] {
  width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--borde);
  padding: 0; cursor: pointer; background: none;
}

.radio-tarjetas { display: flex; gap: 10px; }
.radio-tarjeta {
  flex: 1;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-chico);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
.radio-tarjeta input { display: none; }
.radio-tarjeta.activa { border-color: var(--marca); background: var(--marca-claro); color: var(--marca-oscuro); }

/* --- Mensajes de estado --- */
.aviso { padding: 12px 16px; border-radius: var(--radio-chico); font-size: 14px; margin-bottom: 18px; display: none; }
.aviso.visible { display: block; }
.aviso-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.aviso-exito { background: var(--exito-claro); color: #15803d; border: 1px solid #bbf7d0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-verde { background: var(--exito-claro); color: #15803d; }
.badge-gris { background: #f1f1ef; color: var(--muted); }
.badge-ambar { background: #fef3c7; color: #92400e; }

/* --- NAV pública (landing / auth) --- */
.nav-publica {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,250,248,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--borde);
}
.nav-publica .contenedor { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.marca-nav { display: flex; align-items: center; gap: 9px; font-family: var(--fuente-display); font-weight: 700; font-size: 18px; }
.marca-nav .icono-marca {
  width: 30px; height: 30px; border-radius: 9px; background: var(--marca-grad);
  box-shadow: 0 4px 12px rgba(122,59,93,.35);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  font-family: var(--fuente-display, inherit); font-weight: 700; font-size: 15px; line-height: 1;
}
.nav-acciones { display: flex; align-items: center; gap: 10px; }
.nav-enlaces { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.nav-enlaces a:hover { color: var(--tinta); }
@media (max-width: 768px) { .nav-enlaces { display: none; } }

/* --- Páginas de autenticación --- */
.pagina-auth {
  min-height: calc(100vh - 72px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.tarjeta-auth { width: 100%; max-width: 420px; padding: 36px 32px; }
.tarjeta-auth h1 { font-size: 24px; margin-bottom: 6px; }
.tarjeta-auth .subtitulo { color: var(--muted); font-size: 14.5px; margin-bottom: 28px; }
.tarjeta-auth .pie { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }

/* --- Footer --- */
footer.pie-publico { border-top: 1px solid var(--borde); padding: 40px 0; margin-top: 60px; }
footer.pie-publico .contenedor { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px; }

/* --- Utilidades de texto --- */
.texto-muted { color: var(--muted); }
.texto-centro { text-align: center; }

/* =========================================================
   Capa de modernización — pulido visual 2026
   (sobrescribe por cascada; no cambia la estructura HTML)
   ========================================================= */

::selection { background: var(--marca-claro); color: var(--marca-oscuro); }

h1, h2 { letter-spacing: -0.022em; }

/* Botón primario con degradado de marca y brillo interior */
.boton-primario {
  background: var(--marca-grad);
  box-shadow: 0 8px 22px rgba(122,59,93,.30), inset 0 1px 0 rgba(255,255,255,.22);
}
.boton-primario:hover {
  background: var(--marca-grad);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(122,59,93,.36), inset 0 1px 0 rgba(255,255,255,.22);
}

.boton-energia { box-shadow: 0 8px 22px rgba(251,116,85,.30), inset 0 1px 0 rgba(255,255,255,.25); }

.boton-fantasma { border-color: var(--borde); backdrop-filter: blur(6px); }
.boton-fantasma:hover { background: var(--marca-claro); border-color: rgba(122,59,93,.45); color: var(--marca-oscuro); }

/* Nav pública en cristal */
.nav-publica {
  background: rgba(250,249,247,.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(19,19,34,.06);
}

/* Icono de marca con degradado */
.marca-nav .icono-marca { background: var(--marca-grad); box-shadow: 0 4px 12px rgba(122,59,93,.35); }

/* Campos: fondo suave y ring al enfocar */
.entrada, textarea.entrada, select.entrada {
  background: #fdfdfc;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.entrada:focus, textarea.entrada:focus, select.entrada:focus {
  background: #fff;
  border-color: var(--marca);
  box-shadow: var(--ring);
}

/* Tarjetas: borde más fino y elevación sutil al pasar */
.tarjeta { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.tarjeta-auth { padding: 40px 34px; }

/* Insignia burbuja con borde degradado sutil */
.burbuja-insignia {
  border: 1px solid rgba(122,59,93,.18);
  background: linear-gradient(135deg, #faf5f8, #f7f0f4);
}

/* Avisos con radio coherente */
.aviso { border-radius: var(--radio-chico); }

/* Scrollbar discreta */
* { scrollbar-width: thin; scrollbar-color: #d8d6d0 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d8d6d0; border-radius: 100px; }
*::-webkit-scrollbar-track { background: transparent; }

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

/* =========================================================
   Adaptación móvil general
   ========================================================= */
@media (max-width: 640px) {
  .contenedor { padding: 0 18px; }
  .nav-publica .contenedor { height: 62px; }
  .marca-nav { font-size: 16px; }

  /* 16px mínimo en todos los campos: sin zoom automático en iOS */
  .entrada, textarea.entrada, select.entrada { font-size: 16px; padding: 12px 14px; }

  .tarjeta-auth { padding: 28px 20px; }
  .pagina-auth { padding: 24px 14px calc(24px + env(safe-area-inset-bottom)); align-items: flex-start; padding-top: 36px; }

  /* Objetivos táctiles cómodos (~44px) */
  .boton { padding: 13px 22px; }
  .boton-chico { padding: 10px 16px; }

  .grupo-2 { grid-template-columns: 1fr; }
  footer.pie-publico .contenedor { flex-direction: column; text-align: center; }
}

