/* =============================================================
   PANTALLAS DE ACCESO (login, recuperar clave, restablecer clave)

   Antes cada una de las tres vistas repetia su propio bloque <style>
   inline -- 276 lineas en total, con los mismos tokens copiados y con
   los @media / @keyframes escapados como @@ por estar dentro de Razor.
   Aca viven una sola vez.

   Los colores salen de las variables de site.css para que el acceso y
   la aplicacion sean el mismo sistema. Antes el login usaba #1e3a5f y
   la app #1e2a3b: al entrar, el header cambiaba de tono.
   ============================================================= */

.auth-body {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--content-bg);
  color: var(--color-ink, #1f2937);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* Marca sobre la tarjeta. Al no haber panel lateral, se ve igual en
   cualquier tamano de pantalla: no hay nada que ocultar en el telefono. */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--sidebar-bg);
  letter-spacing: -0.01em;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 1px 2px rgba(30, 42, 59, .05), 0 10px 30px rgba(30, 42, 59, .07);
}

.auth-card h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-ink, #1f2937);
  margin: 0 0 4px;
}

.auth-lead {
  font-size: 13.5px;
  color: var(--color-secondary);
  margin: 0 0 20px;
  line-height: 1.55;
}

.auth-card h1 + .auth-lead {
  margin-bottom: 22px;
}

/* Insignia de las pantallas de recuperacion */
.auth-badge {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
}

.auth-badge i {
  font-size: 28px;
  color: #fff;
}

.auth-badge.err {
  background: var(--color-danger);
}

.auth-centered {
  text-align: center;
}

/* ---------- Campos ---------- */
.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.auth-input {
  position: relative;
}

.auth-input > i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa4b2;
  font-size: 16px;
  pointer-events: none;
}

.auth-input .form-control {
  width: 100%;
  padding: 11px 13px 11px 40px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--color-ink, #1f2937);
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Deja lugar al boton del ojo */
.auth-input .form-control.con-ojo {
  padding-right: 42px;
}

.auth-input .form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}

.auth-input .form-control::placeholder {
  /* #9ca3af daba 2.6:1 sobre blanco: no llegaba a WCAG AA */
  color: #6b7280;
  opacity: .75;
}

/* Boton mostrar/ocultar contrasena */
.auth-ojo {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.auth-ojo:hover {
  color: var(--color-primary);
  background: #f3f5f8;
}

.auth-ojo:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.auth-ojo i {
  font-size: 16px;
}

.auth-hint {
  font-size: 12px;
  color: var(--color-secondary);
  margin: -10px 0 16px;
}

/* ---------- Fila recordar / olvidaste ---------- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 13px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #4b5563;
  margin: 0;
}

.auth-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--color-primary);
}

.auth-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* ---------- Boton principal ---------- */
.auth-btn {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s ease;
}

.auth-btn:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* El boton no es un .btn de Bootstrap, asi que no hereda el anillo de
   foco: sin esto, navegando con teclado no se ve donde esta el foco. */
.auth-btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .45);
  outline-offset: 2px;
}

.auth-btn[disabled] {
  background: var(--color-primary-dark);
  cursor: default;
}

.auth-spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation: none; }
  .auth-btn { transition: none; }
}

/* ---------- Avisos ---------- */
.auth-alert {
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.auth-alert i {
  flex: none;
  margin-top: 1px;
}

.auth-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-alert-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* CLAVE: sin esta regla el resumen de validacion se renderiza igual
   cuando NO hay errores y deja una barra roja vacia sobre el formulario
   en cada carga de la pantalla. La traia la plantilla por defecto de
   ASP.NET, que en este proyecto fue reemplazada. */
.validation-summary-valid {
  display: none;
}

.auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.auth-alert ul:only-child {
  padding-left: 0;
  list-style: none;
}

.auth-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: var(--color-secondary);
  font-size: 13px;
  text-decoration: none;
}

.auth-back:hover {
  color: var(--color-primary);
}

.auth-foot {
  font-size: 12px;
  color: var(--color-secondary);
  text-align: center;
  margin: 0;
}

.auth-foot i {
  margin-right: 4px;
}

@media (max-width: 480px) {
  .auth-body { padding: 18px 14px; }
  .auth-card { padding: 22px 18px; }
}
