/* Pantallas fuera del lienzo (entrada, errores, bloqueo, actualización): una tarjeta sobre el fondo gris.
   Los avisos no cargan Argon, por eso aquí no se usa ninguna de sus utilidades. */

.en-cuerpo, .en-cuerpo *, .en-cuerpo *::before, .en-cuerpo *::after { box-sizing: border-box; }
body.en-cuerpo {
  min-height: 100dvh; height: auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 72px 16px 32px;
}
.en-tarjeta {
  width: min(400px, 100%); padding: 40px; background: var(--st-surface); color: var(--st-fg);
  border-radius: var(--st-r-lienzo); box-shadow: var(--st-sombra);
}
.en-marca { margin: 0 0 32px; font-size: 15px; font-weight: 700; letter-spacing: -.012em; color: var(--st-fg); }
.en-titulo { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; color: var(--st-fg); }
.en-meta { margin: 8px 0 0; color: var(--st-muted); font-size: 15px; overflow-wrap: anywhere; }
.en-pie { margin: 0; color: var(--st-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.en-cuerpo a.btn { text-decoration: none; }
.en-esquina { position: absolute; top: 20px; left: 24px; font-size: 15px; font-weight: 700; letter-spacing: -.012em; }
.en-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.en-acciones .btn { flex: 1 1 auto; }

/* Entrada */
.en-logo { display: block; width: auto; height: 48px; max-width: 160px; margin: 0 0 20px; object-fit: contain; border-radius: var(--st-r-corto); }
.en-logo[hidden] { display: none; }
.en-formulario { margin-top: 28px; display: grid; gap: 16px; }
.en-campo { display: grid; gap: 6px; }
.en-campo label { margin: 0; }
.en-campo .form-control { height: 44px; }
.en-campo input:-webkit-autofill, .en-campo input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--st-fg); box-shadow: 0 0 0 40px var(--st-surface) inset; caret-color: var(--st-fg);
}
.en-recordar { display: inline-flex; align-items: center; gap: 10px; min-height: 24px; margin: 0; cursor: pointer; font-weight: 400; justify-self: start; }
.en-recordar input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--st-primary); }
.en-botones { display: grid; gap: 8px; margin-top: 4px; }
.en-botones .btn { width: 100%; margin: 0; }

.en-cuentas { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--st-line); }
.en-cuentas-titulo { margin: 0 0 8px; color: var(--st-muted); font-size: 13px; font-weight: 500; }
.en-cuentas-lista { display: grid; gap: 2px; max-height: 176px; overflow-y: auto; margin: 0 -8px; scrollbar-width: thin; scrollbar-color: var(--st-line) transparent; }
.en-cuenta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: var(--st-r-control); transition: background-color 120ms; }
.en-cuenta:hover { background: var(--st-hover); }
.en-cuenta.elegida { background: var(--st-nav-activo); }
.en-cuenta button { border: 0; background: none; color: inherit; cursor: pointer; }
.en-cuenta-elegir { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 48px; padding: 6px 8px; border-radius: var(--st-r-control); text-align: left; }
.en-cuenta-nombre { min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-cuenta-marca { display: none; flex: none; font-size: 13px; color: var(--st-primary); }
.en-cuenta.elegida .en-cuenta-marca { display: inline; }
.en-cuenta-quitar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--st-r-control); color: var(--st-muted) !important; }
.en-cuenta-quitar:hover { color: var(--st-fg) !important; }
.en-avatar {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; object-fit: cover;
  background: var(--st-nav-activo); color: var(--st-fg); font-size: 13px; font-weight: 600;
}
.en-cuenta.elegida .en-avatar:not(img) { background: var(--st-surface); }

.navbar.en-tema {
  position: absolute; top: 12px; right: 12px; display: block; width: auto; padding: 0; background: none; box-shadow: none;
}
.en-tema label { width: auto; margin: 0; min-height: 44px; font-weight: 400; color: var(--st-muted); }
.en-tema label:hover { color: var(--st-fg); }
.en-tema input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.en-tema input:focus-visible + i { outline: 2px solid var(--st-primary); outline-offset: 4px; border-radius: 2px; }
.en-tema .en-si-oscuro, .dark-version .en-tema .en-si-claro { display: none; }
.dark-version .en-tema .en-si-oscuro { display: inline; }

/* Diálogos de la entrada */
.en-dialogo .modal-dialog { max-width: 400px; }
.en-dialogo .modal-body { padding: 32px; }
.en-dialogo-titulo { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.012em; }
.en-dialogo-texto { margin: 6px 0 20px; color: var(--st-muted); font-size: 14px; }
.en-dialogo .btn { width: 100%; margin-top: 16px; }
.en-digitos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.en-digitos .form-control {
  height: 52px; padding: 0; text-align: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.en-error { margin: 12px 0 0; color: var(--st-bad); font-size: 14px; }
.en-error::before { content: "\f06a"; margin-right: 6px; font: 900 13px "Font Awesome 6 Free"; }

/* Capa de espera */
.LoadCapaBlack { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; padding: 16px; }
.LoadCapaContenido, .LoadCapaContenidoDinamico {
  display: flex; flex-direction: column; align-items: center; gap: 12px; width: auto; min-width: 180px; max-width: 360px; margin: 0; padding: 24px;
  position: static; transform: none; background: var(--st-surface); color: var(--st-fg); border-radius: var(--st-r-mosaico); font-size: 14px; text-align: center;
}
.en-giro { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--st-line); border-top-color: var(--st-primary); animation: en-gira 800ms linear infinite; }
@keyframes en-gira { to { transform: rotate(360deg); } }
.LoadCapaContenidoDinamico .progress { width: 100%; height: 6px; margin: 0; background: var(--st-line); border-radius: 3px; overflow: hidden; }
.LoadCapaContenidoDinamico .progress-bar { height: 100%; background: var(--st-primary); background-image: none; }
@media (prefers-reduced-motion: reduce) {
  .en-giro { animation-duration: 2400ms; }
  .en-cuenta { transition: none; }
}

@media (max-width: 767px) {
  .en-campo .form-control { height: 44px; }
  .en-cuenta-quitar { width: 44px; height: 44px; }
  .en-recordar { min-height: 44px; }
}
@media (max-width: 479px) {
  body.en-cuerpo { justify-content: flex-start; padding-top: 68px; }
  .en-tarjeta { padding: 28px 24px; }
  .en-marca { margin-bottom: 24px; }
  .en-titulo { font-size: 26px; }
  .en-dialogo .modal-body { padding: 24px; }
  .en-digitos { gap: 6px; }
  .en-acciones .btn { width: 100%; }
}
/* darkModeLogin le pone fondo a .navbar: aquí la barra de tema nunca lleva fondo. */
.navbar.en-tema, .dark-version .navbar.en-tema { background: transparent !important; box-shadow: none !important; }
.dark-version { color-scheme: dark; }
.en-recordar input { accent-color: var(--st-primary); }
