/* Pantalla de inicio de sesion de Haven ("/") con el aspecto del resto de la app:
   el logo y el nombre del servidor (vincular.js los pone en la pagina), los
   colores, campos y botones de CV Chat. */
html body.auth-page {
  min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, #1f1e24 0%, #121214 60%) fixed !important;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #dbdee1;
}
html body.auth-page { overflow-x: hidden; }
html body.auth-page .auth-container { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 2rem 1rem 5rem !important; box-sizing: border-box; display: flex; justify-content: center; background: none !important; }
html body.auth-page .auth-card {
  width: 100% !important; max-width: 30rem !important; min-width: 0 !important; margin: 0 !important; box-sizing: border-box; padding: 2rem 2rem 1.25rem;
  background: #1a191e !important; border: 1px solid #29292d !important; border-radius: 0.75rem !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important; backdrop-filter: none !important;
}
html body.auth-page .auth-header { text-align: center; margin-bottom: 1.25rem; }
.puente-login-logo { display: block; width: 6.5rem; height: 6.5rem; margin: 0 auto 0.75rem; object-fit: contain; }
html body.auth-page .auth-header h1 {
  margin: 0; font-size: 1.625rem; font-weight: 800; letter-spacing: 0 !important; text-transform: none !important;
  color: #fbfbfb; background: none !important; -webkit-text-fill-color: #fbfbfb !important;
}
html body.auth-page .auth-header .tagline, html body.auth-page .auth-header .server-title { display: none !important; }
.puente-login-sub { margin: 0.375rem 0 0; color: #96969e; font-size: 0.9375rem; }

/* Pestanas: texto con una raya debajo de la elegida (sin "Link Server") */
html body.auth-page .auth-tabs { display: flex; gap: 1.5rem; justify-content: center; margin: 0 0 1.25rem; padding: 0; background: none !important; border: 0; border-bottom: 1px solid #29292d; border-radius: 0; }
html body.auth-page .auth-tab {
  flex: 0 0 auto; padding: 0.5rem 0.125rem 0.625rem; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none !important; color: #96969e; font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; box-shadow: none !important;
}
html body.auth-page .auth-tab:hover { color: #dbdee1; }
html body.auth-page .auth-tab.active { color: #fbfbfb; border-bottom-color: #5865f2; }
html body.auth-page .auth-tab[data-tab="sso"] { display: none !important; }

/* Campos y botones como en la app */
html body.auth-page .auth-form label { display: block; margin: 0 0 0.5rem; color: #b5bac1; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
html body.auth-page .auth-form input[type="text"], html body.auth-page .auth-form input[type="password"], html body.auth-page .auth-form input[type="email"], html body.auth-page .auth-form input:not([type]) {
  width: 100%; box-sizing: border-box; height: 2.75rem; padding: 0 0.875rem; margin-bottom: 1rem;
  border: 1px solid #2e2d32 !important; border-radius: 0.5rem !important; background: #121214 !important; color: #dbdee1 !important;
  font: inherit; font-size: 1rem; outline: none; box-shadow: none !important;
}
html body.auth-page .auth-form input:focus { border-color: #5865f2 !important; }
html body.auth-page .btn-primary {
  border: 0 !important; border-radius: 0.5rem !important; background: #5865f2 !important; color: #fff !important;
  font: inherit; font-weight: 600; box-shadow: none !important; cursor: pointer; transition: background 0.15s;
}
html body.auth-page .auth-form > .btn-primary, html body.auth-page .auth-form button[type="submit"] { width: 100%; height: 2.75rem; font-size: 1rem; }
html body.auth-page .btn-primary:hover { background: #4752c4 !important; }
html body.auth-page a { color: #00a8fc; }
html body.auth-page .auth-consent-note { color: #80848e !important; font-size: 0.75rem !important; }
html body.auth-page .auth-recovery-links { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; margin-top: 0.875rem; font-size: 0.875rem; }
html body.auth-page .auth-recovery-links a { color: #00a8fc; text-decoration: none; }
html body.auth-page .auth-recovery-links a:hover { text-decoration: underline; }
.puente-login-discord { font-weight: 600; text-align: center; }
html body.auth-page .auth-error { border-radius: 0.5rem; }

/* Abajo: el idioma (la version de Haven no se muestra: la app es CV Chat) */
html body.auth-page .auth-lang-bar { display: flex; justify-content: center; margin-top: 1.25rem; }
html body.auth-page .auth-lang-bar select { background: #121214 !important; border: 1px solid #2e2d32 !important; border-radius: 0.375rem !important; color: #b5bac1 !important; font-size: 0.8125rem; padding: 0.25rem 0.5rem; }
html body.auth-page .auth-version { display: none !important; }

/* Email de recuperacion: campo del registro y paginas del puente (olvide.html, confirmar) */
html body.auth-page [hidden] { display: none !important; }
html body.auth-page .auth-form small { display: block; margin: -0.625rem 0 1rem; color: #80848e; font-size: 0.75rem; line-height: 1.4; }
html body.auth-page .puente-boton { display: block; box-sizing: border-box; width: 100%; height: 2.75rem; line-height: 2.75rem; margin-top: 0.5rem; text-align: center; text-decoration: none !important; font-size: 1rem; }
html body.auth-page .puente-nota { margin: 0 0 1rem; padding: 0.75rem 0.875rem; border-radius: 0.5rem; background: #232428; color: #dbdee1; font-size: 0.875rem; line-height: 1.45; }
html body.auth-page .puente-nota.mal { background: rgba(218, 55, 60, 0.15); color: #fa777c; }

@media (max-width: 480px) {
  html body.auth-page .auth-container { padding: 1rem 0.75rem 4rem; }
  html body.auth-page .auth-card { padding: 1.5rem 1.25rem 1rem; }
}

/* "Entrar con Discord" (login.js) y la pagina /puente/entrar */
html body.auth-page .puente-btn-discord {
  display: flex; align-items: center; justify-content: center; gap: 0.625rem; width: 100%;
  background: #5865f2 !important; color: #fff !important; border: 0; font-weight: 600;
}
html body.auth-page .puente-btn-discord:hover { background: #4752c4 !important; }
html body.auth-page .puente-btn-discord:disabled { opacity: 0.6; cursor: wait; }
html body.auth-page .puente-btn-foro {
  display: flex; align-items: center; justify-content: center; gap: 0.625rem; width: 100%; margin-top: 0.5rem;
  background: #2b2d31 !important; color: #f2f3f5 !important; border: 1px solid #4e5058 !important; font-weight: 600;
}
html body.auth-page .puente-btn-foro:hover { background: #35373c !important; }
html body.auth-page .puente-btn-foro:disabled { opacity: 0.6; cursor: wait; }
html body.auth-page .puente-o { display: flex; align-items: center; gap: 0.75rem; margin: 0.875rem 0 0.5rem; color: #80848e; font-size: 0.8125rem; }
html body.auth-page .puente-o::before, html body.auth-page .puente-o::after { content: ''; flex: 1; height: 1px; background: #3f3f46; }
html body.auth-page .puente-discord-perfil { display: flex; align-items: center; gap: 0.75rem; margin: 0.25rem 0 1rem; padding: 0.75rem; border-radius: 0.5rem; background: #1e1e22; }
html body.auth-page .puente-discord-perfil img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; }
html body.auth-page .puente-discord-perfil .nombre { font-weight: 700; color: #f2f3f5; }
html body.auth-page .puente-discord-perfil .usuario { font-size: 0.875rem; color: #96969e; }
html body.auth-page .puente-acepto { text-transform: none; letter-spacing: normal; font-weight: 400; display: flex; align-items: flex-start; gap: 0.5rem; margin: 0.25rem 0 0.875rem; font-size: 0.875rem; color: #dbdee1; line-height: 1.35; cursor: pointer; }
html body.auth-page .puente-acepto input { margin-top: 0.15rem; flex: 0 0 auto; }
html body.auth-page .puente-acepto a { color: #00a8fc; }
html body.auth-page .puente-nota-chica { margin: 0.75rem 0 0; font-size: 0.8125rem; color: #80848e; text-align: center; }

/* "<nombre> te invitó" arriba del inicio (login.js) */
.puente-invito { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: rgba(88, 101, 242, .15); border: 1px solid rgba(88, 101, 242, .45); font-size: 15px; color: #dbdee1; }
.puente-invito img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.puente-invito b { color: #fff; }

/* Terminos: con los de CV Chat cargados (custom_tos), sin los de Haven que Haven agrega debajo */
#eula-modal:has(#custom-tos-section[style*="block"]) .eula-content[data-i18n-html="auth.eula.terms_body"],
#eula-modal #custom-tos-section [data-i18n="auth.eula.default_terms"] { display: none !important; }
#eula-modal #custom-tos-content { border-bottom: 0 !important; padding-bottom: 0 !important; }
