:root {
    --auth-color-primary: #3b82f6;
    --auth-color-primary-hover: #2563eb;
    --auth-color-secondary: #10b981;
    --auth-color-accent: #6366f1;
    --auth-color-dark: #1a2332;
    --auth-color-gray-dark: #1e293b;
    --auth-color-gray: #64748b;
    --auth-color-gray-light: #e2e8f0;
    --auth-color-gray-lighter: #f8fafc;
    --auth-color-danger: #ef4444;
    
    --auth-warning-bg: #fff3cd;
    --auth-warning-border: #ffecb5;
    --auth-warning-text: #664d03;
    
    --auth-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --auth-shadow-lg: 0 10px 25px rgba(59, 130, 246, 0.15);
    --auth-transition: all 0.3s ease;
}

.auth-wrapper *,
.auth-body * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.auth-body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #fff;
  color: var(--auth-color-dark);
}

@media (max-width: 992px) {
  .auth-body {
    background: linear-gradient(135deg, var(--auth-color-primary) 0%, var(--auth-color-secondary) 100%) !important;
  }
}

.auth-wrapper {
  display: flex;
  height: 100vh;
  width: 100%;
  flex-direction: row;
}

.auth-image-container {
  width: 40% !important;
  flex: 0 0 40%;
  background-image: url("../images/auth/planos.2be23326cdce.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  z-index: 1;
}

.auth-form-container {
  width: 60% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: #fff;
  min-height: 100vh;
}

.auth-form-inner {
  width: 100%;
  max-width: 450px;
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Header removido - ya no es necesario */

/* Branding del login */
.auth-branding {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease-out;
}

/* Branding horizontal con logo al lado del texto */
.auth-branding-horizontal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-logo-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.auth-branding-horizontal .auth-logo {
  width: 60px;
  height: 60px;
  margin: 0;
}

.auth-branding-horizontal .auth-app-name {
  margin: 0;
  line-height: 1;
}

.auth-branding-horizontal .auth-tagline {
  margin: 0;
  text-align: center;
  width: 100%;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  display: block;
  object-fit: contain; /* Para mantener proporciones del logo */
  background: transparent; /* Sin fondo para PNG con transparencia */
  user-select: none; /* No seleccionable */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none; /* No interactivo */
  /* Sin border-radius ni box-shadow para logos PNG con transparencia */
}

.auth-app-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--auth-color-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

.auth-tagline {
  font-size: 14px;
  color: var(--auth-color-gray);
  margin: 0.25rem 0 0 0;
  font-weight: 400;
}

/* Login form styles */
.login-form-wrapper {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--auth-color-gray-dark);
  margin-bottom: 2rem;
  animation: slideIn 0.5s ease-out;
  text-align: center;
}

.login-form {
  width: 100%;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form .form-group:nth-child(1) {
  animation: fadeIn 0.4s ease-out 0.1s;
  animation-fill-mode: both;
}

.login-form .form-group:nth-child(2) {
  animation: fadeIn 0.4s ease-out 0.2s;
  animation-fill-mode: both;
}

.login-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 14px;
  color: var(--auth-color-gray-dark);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-color-gray);
  transition: var(--auth-transition);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-color-gray);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--auth-transition);
}

.password-toggle:hover {
  color: var(--auth-color-dark);
}

/* Inputs */
.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid var(--auth-color-gray-light);
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
  transition: var(--auth-transition);
}

.login-form input[type="password"] {
  padding-right: 2.5rem;
}

.login-form input:focus {
  border-color: var(--auth-color-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
  outline: none;
}

.login-form input.error {
  border-color: var(--auth-color-danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Estilos para checkbox "Recordarme" */
.remember-me-wrapper {
  margin-bottom: 1.5rem;
  animation: fadeIn 0.4s ease-out 0.25s;
  animation-fill-mode: both;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0;
}

.login-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  border: 2px solid var(--auth-color-gray-light);
  border-radius: 4px;
  transition: var(--auth-transition);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  position: relative;
  flex-shrink: 0;
}

.login-form input[type="checkbox"]:hover {
  border-color: var(--auth-color-primary);
}

.login-form input[type="checkbox"]:checked {
  background-color: var(--auth-color-primary);
  border-color: var(--auth-color-primary);
}

.login-form input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.login-form input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-check-label {
  font-size: 14px;
  color: var(--auth-color-gray);
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  margin: 0;
  line-height: 1.4;
  transition: var(--auth-transition);
}

.form-check-label:hover {
  color: var(--auth-color-dark);
}

.login-options {
  display: flex;
  flex-direction: column; /* Cambiamos a columna para apilar elementos */
  align-items: center; /* Centramos el contenido */
  margin-top: 1.8rem;
  animation: fadeIn 0.4s ease-out 0.3s;
  animation-fill-mode: both;
  width: 100%; /* Asegurar que ocupe todo el ancho */
}

.forgot-link {
  color: var(--auth-color-gray);
  text-decoration: none;
  font-size: 14px;
  transition: var(--auth-transition);
  text-align: center;
  display: block;
  margin-top: 1rem;
}

.forgot-link:hover {
  color: var(--auth-color-dark);
  text-decoration: underline;
}

/* Estilo único para botones de sign-in - Coherente con ArcManager */
.sign-in-btn {
  background: linear-gradient(135deg, var(--auth-color-primary) 0%, var(--auth-color-accent) 100%);
  color: white !important;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--auth-transition);
  box-shadow: var(--auth-shadow-lg);
  width: 100%;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sign-in-btn.flex-grow-1 {
  flex: 1;
  width: auto;
  margin-bottom: 0;
}

.sign-in-btn:hover {
  background: linear-gradient(135deg, var(--auth-color-primary-hover) 0%, var(--auth-color-primary) 100%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.sign-in-btn:disabled {
  background-color: var(--auth-color-gray) !important;
  cursor: not-allowed;
}

/* Efecto ripple para botones */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  animation: ripple-effect 0.6s linear;
  transform: scale(0);
  opacity: 1;
}

@keyframes ripple-effect {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.sign-in-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.sign-in-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.signup-section {
  margin-top: 2rem;
  text-align: left;
  font-size: 14px;
  color: var(--auth-color-gray);
  animation: fadeIn 0.4s ease-out 0.4s;
  animation-fill-mode: both;
}

.signup-section a {
  color: var(--auth-color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: var(--auth-transition);
}

.signup-section a:hover {
  text-decoration: underline;
}

/* Sistema de alertas unificado */
.alert {
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 400;
  display: block;
}

.alert-info {
  background: #e8f4fd;
  color: #2176bd;
  border: 1px solid #b6e0fe;
}

.alert-danger {
  background: #fdeaea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #e6f9ed;
  color: #218838;
  border: 1px solid #b7f7d8;
}

/* Wrapper para iconos y texto en alertas */
.icon-text-wrapper {
  text-align: center;
}

.icon-text-wrapper .mdi {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

.icon-text-wrapper p {
  margin-bottom: 0.25rem;
}

/* Cuadro de notificación */
.notification-box {
  background-color: var(--auth-warning-bg);
  border: 1px solid var(--auth-warning-border);
  color: var(--auth-warning-text);
  padding: 0.9rem 1.2rem;
  margin-top: 2rem;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: var(--auth-box-shadow);
  animation: fadeIn 0.5s ease-out;
}

.notification-box p {
  margin: 0;
  position: relative;
}

/* Mensajes de error */
.error-message {
  color: var(--auth-color-danger);
  font-size: 12px;
  margin-top: 5px;
  animation: fadeIn 0.3s ease-out;
}

/* Estilos para textos */
.text-gray-600 {
  color: #4B5563;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: left;
}

.reset-message {
  color: #4B5563;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: left;
  font-weight: 400;
}

/* Cuadro de información para password reset */
.reset-info-box {
  background-color: #e0f7fa;
  border: 1px solid #26c6da;
  color: #006064;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.reset-info-box.info-style-2 {
  background-color: #0dcaf0;
  border: 1px solid #0dcaf0;
  color: white;
}

/* Utilidades de margen */
.mb-4 {
  margin-bottom: 1.5rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Media Queries */
@media (max-width: 992px) {
  /* Fondo principal con gradiente del proyecto ArcManager */
  .auth-wrapper {
    flex-direction: column;
    background: linear-gradient(135deg, var(--auth-color-primary) 0%, var(--auth-color-secondary) 100%) !important;
    min-height: 100vh;
    position: relative;
  }
  
  /* Patrón arquitectónico sutil con colores coherentes */
  .auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
      linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 35px 35px;
    z-index: 1;
  }
  
  .auth-image-container {
    display: none !important;
  }
  
  .auth-form-container {
    width: 100% !important;
    flex: 1;
    background: transparent !important;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
  }
  
  .auth-form-inner {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 
      0 25px 50px rgba(59, 130, 246, 0.15),
      0 10px 25px rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 420px;
    width: 100%;
    margin: 0 auto; /* Centrado horizontal */
    position: relative;
    backdrop-filter: blur(20px);
  }
  
  /* Efecto glassmorphism elegante con colores del proyecto */
  .auth-form-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
      rgba(59, 130, 246, 0.02) 0%, 
      rgba(16, 185, 129, 0.02) 100%);
    border-radius: 16px;
    z-index: -1;
  }
}

@media (max-width: 768px) {
  .auth-form-container {
    padding: 1.5rem 1rem;
  }
  
  .auth-form-inner {
    padding: 2rem 1.5rem;
    margin: 0 auto; /* Centrado horizontal */
    max-width: 380px;
    width: calc(100% - 2rem);
  }
  
  .login-title {
    font-size: 26px;
    margin-bottom: 1.5rem;
  }
  
  /* Ajustes para branding horizontal en tablets */
  .auth-logo-name-row {
    gap: 0.875rem;
  }
  
  .auth-branding-horizontal .auth-logo {
    width: 55px;
    height: 55px;
  }
  
  .auth-branding-horizontal .auth-app-name {
    font-size: 26px;
  }
  
  .auth-branding-horizontal .auth-tagline {
    font-size: 13px;
  }
  
  .auth-logo {
    width: 70px;
    height: 70px;
  }
  
  .auth-app-name {
    font-size: 26px;
  }
  
  .auth-tagline {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .auth-form-container {
    padding: 1rem 0.75rem;
  }
  
  .login-options {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sign-in-btn {
    margin-top: 1rem;
    width: 100%;
  }
  
  .auth-form-inner {
    padding: 2rem 1.25rem;
    margin: 0 auto; /* Centrado horizontal */
    max-width: 100%;
    width: calc(100% - 1rem);
    border-radius: 12px;
  }
  
  .login-title {
    font-size: 24px;
    margin-bottom: 1.25rem;
  }
  
  /* Branding horizontal en móvil - más compacto */
  .auth-logo-name-row {
    gap: 0.75rem;
  }
  
  .auth-branding-horizontal {
    margin-bottom: 1.5rem;
  }
  
  .auth-branding-horizontal .auth-logo {
    width: 48px;
    height: 48px;
  }
  
  .auth-branding-horizontal .auth-app-name {
    font-size: 24px;
  }
  
  .auth-branding-horizontal .auth-tagline {
    font-size: 12px;
  }
  
  .auth-logo {
    width: 65px;
    height: 65px;
  }
  
  .auth-app-name {
    font-size: 24px;
  }
  
  .auth-tagline {
    font-size: 12px;
  }
  
  .login-form input[type="text"],
  .login-form input[type="password"],
  .login-form input[type="email"] {
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  /* Checkbox más grande en móvil para mejor usabilidad */
  .login-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
  
  .form-check-label {
    font-size: 15px;
  }
  
  .remember-me-wrapper {
    margin-bottom: 1.25rem;
  }
}

/* Mejoras adicionales para el diseño responsive */
@media (max-width: 992px) {
  /* Centrado perfecto del login */
  .login-form-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  /* Mejorar legibilidad del título dentro de la tarjeta blanca */
  .login-title {
    text-shadow: none; /* Sin sombra, está sobre fondo blanco */
    color: var(--auth-color-gray-dark);
    font-size: 22px;
    text-align: center;
  }
  
  /* Mantener colores de escritorio para el nombre de la app */
  .auth-app-name {
    color: var(--auth-color-primary) !important; /* Azul como en desktop */
    text-shadow: none;
    font-weight: 700;
  }
  
  .auth-tagline {
    color: var(--auth-color-gray) !important; /* Gris como en desktop */
    text-shadow: none;
    font-weight: 400;
  }
  
  .auth-branding {
    text-align: center;
    width: 100%;
  }
  
  /* Mejorar la visibilidad de los botones con colores del proyecto */
  .sign-in-btn {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    width: 100%;
    text-align: center;
  }
  
  .sign-in-btn:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  }
  
  /* Inputs con mejor contraste */
  .login-form input:focus {
    border-color: var(--auth-color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  }
  
  /* Asegurar que todos los elementos estén centrados */
  .login-form {
    width: 100%;
  }
  
  .login-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .forgot-link {
    text-align: center;
    width: 100%;
  }
  
  /* Alinear labels a la izquierda en el formulario */
  .login-form .form-group label {
    text-align: left;
    width: 100%;
  }
  
  /* Asegurar que el checkbox y recordarme estén alineados */
  .remember-me-wrapper {
    width: 100%;
  }
  
  .form-check {
    justify-content: flex-start;
  }
  
  /* Alertas centradas */
  .alert {
    text-align: center;
    width: 100%;
  }
}