/* ==========================================================================
   Pantallas de acceso: login y recupero de contraseña (layout "acceso")
   ========================================================================== */

:root {
  --acc-verde: #025951;
  --acc-verde-medio: #04736a;
  --acc-turquesa: #03A696;
  --acc-menta: #04D99D;
  --acc-texto: #1F2D33;
  --acc-gris: #607D8B;
  --acc-borde: #D5E2E1;
  --acc-fondo: #F4F8F8;
  --acc-error: #C62828;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.acc-body {
  height: 100%;
  margin: 0;
}

body.acc-body {
  background: var(--acc-fondo);
  color: var(--acc-texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.acc-pantalla {
  display: flex;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Panel de marca (izquierda)
   -------------------------------------------------------------------------- */
.acc-marca {
  position: relative;
  display: flex;
  flex: 0 0 44%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px 56px;
  background: linear-gradient(150deg, var(--acc-verde) 0%, var(--acc-verde-medio) 55%, var(--acc-turquesa) 100%);
  color: #FFFFFF;
}

.acc-marca::before,
.acc-marca::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}

.acc-marca::before {
  top: -120px;
  right: -140px;
  width: 420px;
  height: 420px;
}

.acc-marca::after {
  bottom: -160px;
  left: -100px;
  width: 360px;
  height: 360px;
}

.acc-marca__contenido {
  position: relative;
  z-index: 1;
  margin: auto 0;
}

.acc-marca__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.acc-marca__logo img {
  max-width: 60px;
  max-height: 60px;
}

.acc-marca__titulo {
  margin: 0 0 10px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.acc-marca__lema {
  max-width: 400px;
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.5;
  opacity: .92;
}

.acc-marca__lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.acc-marca__lista li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
}

.acc-marca__lista span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: var(--acc-menta);
  font-size: 13px;
  font-weight: 700;
}

.acc-marca__pie {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: .85;
}

/* --------------------------------------------------------------------------
   Panel del formulario (derecha)
   -------------------------------------------------------------------------- */
.acc-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 20px;
}

.acc-panel__contenido {
  display: flex;
  flex: 1;
  align-items: center;
  width: 100%;
  max-width: 420px;
}

.acc-panel__pie {
  margin-top: 24px;
  color: var(--acc-gris);
  font-size: 12px;
}

.acc-tarjeta {
  width: 100%;
}

.acc-titulo {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.acc-subtitulo {
  margin: 0 0 26px;
  color: var(--acc-gris);
  line-height: 1.5;
}

.acc-volver {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--acc-verde-medio);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.acc-volver:hover {
  text-decoration: underline;
}

/* Avisos */
.acc-aviso {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.acc-aviso--error {
  border: 1px solid #F5C6C2;
  background: #FDECEA;
  color: #8E1B1B;
}

.acc-aviso--exito {
  border: 1px solid #BFE5CD;
  background: #E8F6EE;
  color: #1E6B3E;
}

.acc-aviso--info {
  border: 1px solid #C8E4E2;
  background: #EAF6F5;
  color: var(--acc-verde);
}

/* Campos */
.acc-campo {
  margin-bottom: 18px;
}

.acc-campo label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.acc-campo__fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.acc-link {
  color: var(--acc-verde-medio);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

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

.acc-input {
  position: relative;
}

.acc-input__icono {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}

.acc-input__icono svg,
.acc-ver-clave svg {
  width: 100%;
  height: 100%;
  fill: #90A4AE;
}

.acc-input input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 44px;
  border: 1.5px solid var(--acc-borde);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--acc-texto);
  font-size: 16px; /* 16px: evita el zoom automático en iPhone */
  transition: border-color .15s ease, box-shadow .15s ease;
}

.acc-input input::placeholder {
  color: #A9B8BE;
}

.acc-input input:focus {
  border-color: var(--acc-turquesa);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(3, 166, 150, .15);
}

.acc-input input:focus ~ .acc-input__icono svg,
.acc-input:focus-within .acc-input__icono svg {
  fill: var(--acc-turquesa);
}

.acc-campo.is-error .acc-input input {
  border-color: var(--acc-error);
}

.acc-campo.is-error .acc-input input:focus {
  box-shadow: 0 0 0 4px rgba(198, 40, 40, .12);
}

.acc-campo__error {
  margin-top: 6px;
  color: var(--acc-error);
  font-size: 13px;
}

.acc-ver-clave {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.acc-ver-clave:hover,
.acc-ver-clave:focus-visible {
  background: #EEF4F4;
  outline: 0;
}

.acc-ver-clave .acc-ojo-tachado,
.acc-ver-clave.is-visible .acc-ojo {
  display: none;
}

.acc-ver-clave.is-visible .acc-ojo-tachado {
  display: block;
}

.acc-mayusculas {
  display: none;
  margin-top: 6px;
  color: #B26A00;
  font-size: 13px;
  font-weight: 600;
}

.acc-mayusculas.is-visible {
  display: block;
}

/* Botón */
.acc-boton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--acc-verde-medio), var(--acc-turquesa));
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(3, 166, 150, .28);
  transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
}

.acc-boton:hover {
  box-shadow: 0 10px 24px rgba(3, 166, 150, .36);
}

.acc-boton:active {
  transform: translateY(1px);
}

.acc-boton:focus-visible {
  outline: 3px solid rgba(3, 166, 150, .4);
  outline-offset: 2px;
}

.acc-boton__cargando {
  display: none;
}

.is-enviando .acc-boton {
  opacity: .8;
  cursor: progress;
}

.is-enviando .acc-boton__texto {
  display: none;
}

.is-enviando .acc-boton__cargando {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.is-enviando .acc-boton__cargando::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: acc-girar .7s linear infinite;
}

@keyframes acc-girar {
  to {
    transform: rotate(360deg);
  }
}

.acc-ayuda {
  margin: 22px 0 0;
  color: var(--acc-gris);
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Tablet y celular: el panel de marca pasa a ser una franja arriba
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .acc-pantalla {
    flex-direction: column;
  }

  .acc-marca {
    flex: 0 0 auto;
    padding: 24px;
  }

  .acc-marca__contenido {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
  }

  .acc-marca__logo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin: 0;
    border-radius: 14px;
  }

  .acc-marca__logo img {
    max-width: 38px;
    max-height: 38px;
  }

  .acc-marca__titulo {
    margin: 0;
    font-size: 24px;
  }

  .acc-marca__lema,
  .acc-marca__lista,
  .acc-marca__pie {
    display: none;
  }

  .acc-panel {
    justify-content: flex-start;
    padding: 28px 16px 16px;
  }

  .acc-panel__contenido {
    align-items: flex-start;
  }

  .acc-titulo {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
