/* ============================================================
   VALEX - Login Page Styles
   assets/css/login.css
   ============================================================ */

/* ── Fuente ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ── Reset de body para auth ────────────────────────────────── */
body.auth-page {
  font-family:      'Roboto', sans-serif;
  background:       var(--valex-body-bg, #f0f0ff);
  min-height:       100vh;
  margin:           0;
  overflow-x:       hidden;
}

/* ── Wrapper principal (flex 2 columnas) ────────────────────── */
.auth-wrapper {
  display:    flex;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════════════════
   PANEL IZQUIERDO — gradiente + ilustración
   ════════════════════════════════════════════════════════════ */
.auth-side--left {
  flex:             0 0 45%;
  max-width:        45%;
  background:       linear-gradient(135deg, #2c2c54 0%, #6259ca 60%, #eb6f33 100%);
  position:         relative;
  overflow:         hidden;
  display:          flex;
  align-items:      center;
  justify-content:  center;
  padding:          3rem 2.5rem;
}

/* Decoración de fondo */
.auth-side--left::before {
  content:          '';
  position:         absolute;
  width:            500px;
  height:           500px;
  border-radius:    50%;
  background:       rgba(255,255,255,.04);
  top:              -150px;
  right:            -150px;
  pointer-events:   none;
}

.auth-side--left::after {
  content:          '';
  position:         absolute;
  width:            300px;
  height:           300px;
  border-radius:    50%;
  background:       rgba(235,111,51,.12);
  bottom:           -80px;
  left:             -80px;
  pointer-events:   none;
}

.auth-side__inner {
  position:         relative;
  z-index:          1;
  width:            100%;
  max-width:        400px;
  display:          flex;
  flex-direction:   column;
  align-items:      flex-start;
}

/* Marca/Logo en panel izquierdo */
.auth-brand {
  display:          flex;
  align-items:      center;
  gap:              .6rem;
  text-decoration:  none;
}

.auth-brand__icon {
  width:            40px;
  height:           40px;
  background:       rgba(255,255,255,.15);
  border-radius:    10px;
  display:          flex;
  align-items:      center;
  justify-content:  center;
  font-size:        1.25rem;
  color:            #fff;
  backdrop-filter:  blur(4px);
}

.auth-brand__name {
  font-size:        1.5rem;
  font-weight:      700;
  color:            #fff;
  letter-spacing:   .03em;
}

.auth-brand__name span {
  color:    #eb6f33;
}

/* Ilustración SVG */
.auth-illustration {
  width:            100%;
  margin:           1.5rem 0;
  filter:           drop-shadow(0 20px 40px rgba(0,0,0,.2));
}

.auth-illustration svg {
  width:    100%;
  height:   auto;
}

/* Texto del panel izquierdo */
.auth-side__text h2 {
  font-size:      1.6rem;
  font-weight:    700;
  color:          #fff;
  margin-bottom:  .6rem;
  line-height:    1.3;
}

.auth-side__text p {
  font-size:    .9rem;
  color:        rgba(255,255,255,.7);
  line-height:  1.6;
  margin:       0;
}

/* Dots decorativos */
.auth-dots {
  display:   flex;
  gap:       .4rem;
  margin-top: 1.5rem;
}

.auth-dots span {
  width:          8px;
  height:         8px;
  border-radius:  50%;
  background:     rgba(255,255,255,.3);
  transition:     background .3s, width .3s;
}

.auth-dots span.active {
  background: #fff;
  width:      24px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════
   PANEL DERECHO — formulario
   ════════════════════════════════════════════════════════════ */
.auth-side--right {
  flex:             1;
  background:       #fff;
  display:          flex;
  align-items:      center;
  justify-content:  center;
  padding:          2rem 1.5rem;
}

.auth-form-wrapper {
  width:      100%;
  max-width:  400px;
}

/* Logo móvil */
.auth-brand--mobile .auth-brand__icon {
  background:   var(--valex-primary, #6259ca);
  color:        #fff;
}

.auth-brand--mobile .auth-brand__name {
  color: var(--valex-sidebar-bg, #2c2c54);
}

/* Encabezado del formulario */
.auth-header { margin-bottom: 1.75rem; }

.auth-title {
  font-size:    1.6rem;
  font-weight:  700;
  color:        #1a1a3e;
  margin-bottom: .35rem;
  letter-spacing: -.01em;
}

.auth-subtitle {
  font-size:  .875rem;
  color:      #74829c;
  margin:     0;
}

/* Alerta de error */
.auth-alert {
  font-size:    .85rem;
  border-radius: .45rem;
  border:       none;
  padding:      .75rem 1rem;
}

/* Labels */
.auth-form .form-label {
  font-size:    .82rem;
  font-weight:  500;
  color:        #495057;
  margin-bottom: .35rem;
}

/* Input groups */
.auth-input-group .input-group-text {
  background:   #f8f8ff;
  border:       1px solid #e6e6f1;
  border-right: none;
  color:        #74829c;
  font-size:    1rem;
  min-width:    42px;
  justify-content: center;
}

.auth-input-group .form-control {
  border:       1px solid #e6e6f1;
  border-left:  none;
  font-size:    .875rem;
  padding:      .55rem .875rem;
  color:        #495057;
  background:   #fff;
  transition:   border-color .2s, box-shadow .2s;
}

.auth-input-group .form-control:focus {
  border-color:  var(--valex-primary, #6259ca);
  box-shadow:    none;
  z-index:       1;
}

.auth-input-group .form-control:focus + .auth-pwd-toggle,
.auth-input-group:focus-within .input-group-text:first-child {
  border-color: var(--valex-primary, #6259ca);
}

/* Botón toggle contraseña */
.auth-pwd-toggle {
  background:    #f8f8ff;
  border:        1px solid #e6e6f1;
  border-left:   none;
  color:         #74829c;
  cursor:        pointer;
  transition:    color .2s, background .2s;
  min-width:     42px;
  justify-content: center;
}

.auth-pwd-toggle:hover {
  background: #ededff;
  color:      var(--valex-primary, #6259ca);
}

/* Validación */
.auth-input-group .form-control.is-invalid {
  border-color: var(--valex-danger, #ee335e);
  background-image: none;
}

.auth-input-group.has-validation .form-control.is-invalid ~ .auth-pwd-toggle {
  border-color: var(--valex-danger, #ee335e);
}

.invalid-feedback { font-size: .79rem; }

/* Link olvidó contraseña */
.auth-forgot-link {
  font-size:    .8rem;
  color:        var(--valex-primary, #6259ca);
  text-decoration: none;
  font-weight:  500;
  transition:   color .2s;
}

.auth-forgot-link:hover {
  color: var(--valex-primary-dark, #4e46b4);
  text-decoration: underline;
}

/* Checkbox */
.auth-check .form-check-input {
  width:         1rem;
  height:        1rem;
  margin-top:    .15rem;
  border-color:  #ced4da;
  cursor:        pointer;
}

.auth-check .form-check-input:checked {
  background-color: var(--valex-primary, #6259ca);
  border-color:     var(--valex-primary, #6259ca);
}

.auth-check .form-check-label {
  font-size:  .85rem;
  color:      #495057;
  cursor:     pointer;
}

/* Botón principal */
.auth-btn {
  background:    linear-gradient(135deg, #6259ca 0%, #4e46b4 100%);
  border:        none;
  border-radius: .45rem;
  padding:       .65rem 1rem;
  font-size:     .95rem;
  font-weight:   600;
  letter-spacing: .02em;
  color:         #fff;
  transition:    opacity .2s, transform .15s, box-shadow .2s;
  box-shadow:    0 4px 15px rgba(98,89,202,.35);
}

.auth-btn:hover:not(:disabled) {
  opacity:    .92;
  transform:  translateY(-1px);
  box-shadow: 0 6px 20px rgba(98,89,202,.45);
  color:      #fff;
}

.auth-btn:active:not(:disabled) {
  transform:  translateY(0);
  box-shadow: 0 2px 8px rgba(98,89,202,.3);
}

.auth-btn:disabled {
  opacity:    .75;
  cursor:     not-allowed;
  box-shadow: none;
}

/* Footer del formulario */
.auth-footer-text {
  font-size: .8rem;
  color:     #b0bac9;
  margin:    0;
}

/* ── Animación de entrada ────────────────────────────────────── */
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-form-wrapper {
  animation: authFadeUp .45s ease both;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .auth-side--right {
    padding: 2.5rem 1.25rem;
  }

  .auth-form-wrapper {
    max-width: 440px;
  }
}

@media (max-width: 575.98px) {
  .auth-side--right {
    padding: 2rem 1rem;
    align-items: flex-start;
    padding-top: 2.5rem;
  }

  .auth-title { font-size: 1.4rem; }

  .auth-form-wrapper {
    max-width: 100%;
  }
}

/* ── Accesibilidad: reducir movimiento ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .auth-form-wrapper { animation: none; }
  .auth-btn { transition: none; }
}
