/* Pantalla de acceso. Colores, foco y botones: estandares.md y sistema.css.
   El enlace de texto es la acción terciaria de esta pantalla (olvidé la contraseña,
   crear cuenta, volver). El hover de 150 ms sigue en CSS; la entrada la hace GSAP. */

html body .auth-card {
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  padding: 28px 28px 22px;
}

html body .auth-card .auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  min-width: 0;
}

html body .auth-card .auth-brand .brand-mark.logo-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  margin: 0;
  border-radius: 12px;
}

html body .auth-card .auth-brand-name {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

html body .auth-card .auth-brand-role {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

html body .auth-card .auth-heading {
  display: grid;
  gap: 6px;
}

html body .auth-card h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 620;
  letter-spacing: -0.45px;
  line-height: 1.15;
}

html body .auth-card #auth-subtitle {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

html body .auth-card #auth-form {
  margin-top: 22px;
}

html body .auth-card #auth-error {
  margin: 2px 0 0;
  min-height: 0;
  font-size: 13px;
  line-height: 1.4;
}

html body .auth-card #auth-error:empty {
  margin: 0;
}

html body .auth-card #auth-submit {
  min-height: 44px;
  margin-top: 12px;
  font-weight: 600;
}

html body .auth-card .campo-cabecera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-width: 0;
}

html body .auth-card .campo-cabecera .campo-etiqueta {
  margin: 0;
}

html body .auth-card .campo-control:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--anillo) 55%, var(--trio-edge, var(--line)));
}

html body .auth-card .campo-grupo:hover:not(:focus-within) {
  border-color: color-mix(in srgb, var(--anillo) 55%, var(--trio-edge, var(--line)));
}

html body .auth-card button.auth-text-link,
html body .auth-card #verification-actions button.auth-text-link,
html body .auth-card #auth-community button.auth-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 4px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--accion);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accion) 40%, transparent);
  text-underline-offset: 3px;
}

html body .auth-card button.auth-text-link:hover:not(:disabled),
html body .auth-card #verification-actions button.auth-text-link:hover:not(:disabled),
html body .auth-card #auth-community button.auth-text-link:hover:not(:disabled) {
  background: transparent;
  border-color: transparent;
  color: var(--accion-hover);
  text-decoration-color: currentColor;
  transform: none;
}

html body .auth-card button.auth-text-link:active:not(:disabled) {
  transform: none;
}

html body .auth-card :is(#auth-toggle, #back-login).auth-text-link {
  margin: 0;
  font-size: 14px;
}

html body .auth-card .campo-cabecera #forgot-password.auth-text-link {
  min-height: 32px;
  margin: 0 0 0 auto;
  padding: 2px 0 2px 8px;
  font-size: 13px;
  font-weight: 500;
}

html body .auth-card #auth-community.campo-conjunto:not([hidden]) {
  display: flex;
}

html body .auth-card #auth-community .campo-horizontal {
  align-items: center;
  min-height: 36px;
  margin: 0;
}

html body .auth-card #auth-community label.campo-etiqueta {
  display: block;
  min-height: 0;
}

html body .auth-card #auth-community-accept.campo-casilla {
  margin: 0;
}

html body .auth-card #auth-community button.auth-text-link {
  align-self: flex-start;
  justify-content: flex-start;
  min-height: 32px;
  padding: 0;
}

html body .auth-card .auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 16px;
}

html body .auth-card .auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
}

html body .auth-card .auth-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

html body .auth-card .admin-first-notice {
  width: 100%;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--trio-edge, var(--line));
  border-radius: 8px;
  background: var(--trio-tint, var(--field));
  color: var(--text) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  text-align: start;
}

html body .auth-card .verification-mail-icon {
  width: 48px;
  height: 48px;
  margin: 2px auto 0;
  border: 1px solid var(--trio-edge, var(--line));
  background: var(--trio-tint, var(--field));
  color: var(--accion);
  font-size: 22px;
}

html body .auth-card .auth-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--trio-edge, var(--line));
}

html body .auth-card .auth-facts {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

html body .auth-card .auth-download {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--trio-edge, var(--line));
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
}

html body .auth-card .auth-download:hover {
  border-color: var(--anillo);
  background: var(--trio-tint, var(--field));
}

html body .auth-card .auth-download-icon {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--accion);
}

html body .auth-card .auth-download:hover .auth-download-icon,
html body .auth-card .auth-download:focus-visible .auth-download-icon {
  color: var(--accion-hover);
}

html body .auth-card .auth-download strong {
  display: block;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.25;
}

html body .auth-card .auth-download small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.3;
}

/* Instalar en Safari: el mismo control de icono que el cerrar de los modales.
   44 px porque es un botón táctil. Sin placa: el trazo va suelto sobre la tarjeta. */
html body #auth-screen .auth-card:has(.club-web-install-icon) {
  position: relative;
}

html body #auth-screen .auth-card .club-web-install-icon {
  position: absolute;
  z-index: 1;
  inset-block-start: 10px;
  inset-inline-end: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

html body #auth-screen .auth-card .club-web-install-icon::before {
  content: none;
}

html body #auth-screen .auth-card .club-web-install-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

html body #auth-screen .auth-card .club-web-install-icon:hover:not(:disabled),
html body #auth-screen .auth-card .club-web-install-icon:active:not(:disabled) {
  border-color: transparent;
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: var(--text);
  transform: none;
}

html body #auth-screen .auth-card:has(.club-web-install-icon) :is(.auth-brand, .auth-heading) {
  padding-inline-end: 36px;
}

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

  html body .auth-card h1 {
    font-size: 23px;
  }

  html body .auth-card .auth-brand {
    margin-bottom: 20px;
  }
}

/* Reglas de la comunidad: una sola fila con la casilla; «reglas de la comunidad» es un enlace en línea. */
html body .auth-card #auth-community:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
}

html body .auth-card #auth-community .auth-reglas-texto {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}

html body .auth-card #auth-community label.campo-etiqueta {
  display: inline;
  min-height: 0;
  margin: 0;
}

html body .auth-card #auth-community button.auth-reglas-enlace {
  display: inline;
  min-height: 0;
  padding: 0;
  font-size: inherit;
  font-weight: 560;
  line-height: inherit;
  vertical-align: baseline;
}

/* Texto del modal de reglas: una frase por punto de lista, con las mismas palabras que se aceptan. */
.auth-reglas-lista {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.auth-reglas-lista li::marker { color: var(--accion); }

/* Registro más corto: los textos de ayuda repetían lo que ya dicen los placeholders («de 3 a 24 caracteres»,
   «8 caracteres como mínimo»). Se quedan en el DOM, ocultos a la vista, para el lector de pantalla. */
html body .auth-card :is(#username-help, #password-help) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Enlace que abre el campo del código de grupo. */
html body .auth-card button.auth-invitar {
  justify-self: start;
  align-self: flex-start;
  min-height: 28px;
  margin: -6px 0 0;
  padding: 0;
  font-size: 13px;
}
