/* ================================================
   AUTH.CSS - Estilos de autenticación
   Login, Recuperar contraseña, Restablecer contraseña
   ================================================ */

/* ========================================
   UTILIDADES
   ======================================== */
.hidden { display: none !important; }
.visible { display: block !important; }

/* ========================================
   RESET Y CONFIGURACIÓN BASE
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100vh;
  font-family: var(--auth-font-family);
  color: var(--auth-gray-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--auth-bg-white);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-weight: var(--auth-font-weight-normal);
}

*:focus {
  outline: none !important;
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.main-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  z-index: 10;
  width: 100%;
}

/* ========================================
   TARJETA PRINCIPAL
   ======================================== */
.login-card {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  margin: 0;
}

/* ========================================
   PANEL VISUAL IZQUIERDO (fluido)
   ======================================== */
.visual-panel {
  background: var(--auth-gradient-primary);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 100vh;
  height: auto;
  transition: background 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.visual-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      135deg,
      rgba(var(--auth-company-dark), 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 30% 70%,
      rgba(var(--auth-company-dark), 0.15) 0%,
      transparent 70%
    );
  z-index: 1;
  pointer-events: none;
  transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: var(--auth-spacing-3xl) var(--auth-spacing-3xl) var(--auth-spacing-lg);
}

/* ========================================
   SWIPER CAROUSEL
   ======================================== */
.company-carousel {
  width: 100%;
  max-width: 100%;
  height: 100%;
  position: relative;
}

.company-carousel .swiper-wrapper {
  align-items: center;
}

.company-carousel .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  transition: var(--auth-transition-slow);
}

.company-logo-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--auth-spacing-2xl);
  min-height: 300px;
}

.company-logo {
  position: relative;
  z-index: 3;
  max-width: 90%;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(1.05) drop-shadow(0 15px 35px rgba(0, 0, 0, 0.25));
  transition: var(--auth-transition-slow);
  opacity: 0.92;
  transform: scale(0.96);
}

.swiper-slide-active .company-logo {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1.08) drop-shadow(0 20px 45px rgba(0, 0, 0, 0.3));
}

/* Swiper Pagination */
.company-carousel .swiper-pagination {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--auth-spacing-sm);
  z-index: 10;
}

.company-carousel .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  opacity: 1;
  transition: var(--auth-transition-normal);
  border-radius: 3px;
  margin: 0 !important;
}

.company-carousel .swiper-pagination-bullet-active {
  width: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--auth-shadow-md);
}

/* Logo estático (single tenant) */
.static-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--auth-spacing-2xl);
}

.static-logo-container .company-logo {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   FIGURAS GEOMÉTRICAS DECORATIVAS
   ======================================== */
.geometric-shape {
  position: absolute;
  background: rgba(var(--auth-company-dark), 0.15);
  z-index: 1;
  transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-circle-top-left {
  width: 120px;
  height: 120px;
  border-radius: 0 0 120px 0;
  top: 0;
  left: 0;
}

.shape-circle-bottom-right {
  width: 140px;
  height: 140px;
  border-radius: 140px 0 0 0;
  bottom: 0;
  right: 0;
}

.shape-square-top-right {
  width: 80px;
  height: 80px;
  border-radius: 0 0 0 30px;
  top: 0;
  right: 0;
}

.shape-circle-left {
  width: 20px;
  height: 50px;
  border-radius: 0 40px 40px 0;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.shape-circle-right {
  width: 25px;
  height: 50px;
  border-radius: 45px 0 0 45px;
  top: 30%;
  right: 0;
}

.shape-rectangle-bottom-left {
  width: 100px;
  height: 70px;
  border-radius: 0 40px 0 0;
  bottom: 0;
  left: 0;
}

/* ========================================
   ESTRELLAS DECORATIVAS
   ======================================== */
.star-decoration {
  position: absolute;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  z-index: 2;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.star-decoration::before {
  content: "★";
}

.star-1 { top: 8%; left: 15%; animation: twinkle1 4s infinite; }
.star-2 { top: 18%; right: 20%; animation: twinkle2 5s infinite; }
.star-3 { top: 32%; left: 25%; animation: twinkle3 6s infinite; }
.star-4 { top: 28%; right: 12%; animation: twinkle4 4.5s infinite; }
.star-5 { top: 48%; left: 10%; animation: twinkle1 5.5s infinite; }
.star-6 { top: 55%; right: 28%; animation: twinkle2 6.5s infinite; }
.star-7 { top: 68%; left: 22%; animation: twinkle3 5s infinite; }
.star-8 { top: 75%; right: 15%; animation: twinkle4 4s infinite; }
.star-9 { top: 42%; right: 8%; animation: twinkle2 5.8s infinite; }
.star-10 { bottom: 15%; left: 12%; animation: twinkle3 4.8s infinite; }

@keyframes twinkle1 {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.4; transform: scale(1); }
}

@keyframes twinkle2 {
  0%, 100% { opacity: 0; transform: scale(0.7); }
  40%, 60% { opacity: 0.35; transform: scale(1.1); }
}

@keyframes twinkle3 {
  0%, 100% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 0.3; transform: scale(1); }
}

@keyframes twinkle4 {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  30%, 70% { opacity: 0.38; transform: scale(1); }
}

/* ========================================
   TÉRMINOS Y FOOTER
   ======================================== */
.terms-section {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: var(--auth-spacing-xl) var(--auth-spacing-2xl) 36px;
  background: transparent;
}

.terms-text {
  font-size: var(--auth-font-size-xs);
  color: rgba(54, 52, 52, 0.65);
  text-align: center;
  font-weight: var(--auth-font-weight-normal);
  letter-spacing: 0.01em;
  margin-bottom: -5px !important;
}

.terms-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.terms-link {
  color: rgba(9, 9, 9, 0.95);
  text-decoration: none;
  font-size: var(--auth-font-size-sm);
  font-weight: var(--auth-font-weight-medium);
  transition: var(--auth-transition-normal);
  padding: var(--auth-spacing-xs) 0;
  border-radius: var(--auth-radius-sm);
  position: relative;
  letter-spacing: 0.01em;
  margin-bottom: -5px !important;
}

.terms-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.terms-link:hover {
  color: rgba(39, 37, 37, 0.95);
}

.terms-link:hover::after {
  transform: scaleX(1);
}

.footer-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.footer-link {
  color: rgba(16, 16, 16, 0.6);
  text-decoration: none;
  font-size: var(--auth-font-size-xs);
  font-weight: var(--auth-font-weight-normal);
  transition: var(--auth-transition-normal);
  padding: 2px 0;
  letter-spacing: 0.01em;
}

.footer-link:hover {
  color: rgba(39, 37, 37, 0.95);
  text-decoration: none;
}

/* ========================================
   PANEL DE FORMULARIO
   ======================================== */
.form-panel {
  background: var(--auth-bg-white);
  padding: var(--auth-spacing-3xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 100vh;
  height: auto;
  overflow-y: auto;
}

.form-panel > form {
  width: 100%;
  max-width: 420px;
}

.form-header {
  text-align: center;
  margin-bottom: var(--auth-spacing-2xl);
  width: 100%;
  max-width: 420px;
}

.user-avatar {
  width: auto;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
}

.form-title {
  font-family: var(--auth-font-family);
  font-size: var(--auth-font-size-3xl);
  font-weight: var(--auth-font-weight-semibold);
  color: var(--auth-gray-900);
  margin-bottom: var(--auth-spacing-sm);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.form-subtitle {
  font-family: var(--auth-font-family);
  color: var(--auth-gray-500);
  font-size: var(--auth-font-size-base);
  font-weight: var(--auth-font-weight-normal);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}

/* ========================================
   ANIMACIÓN DE ENTRADA DEL FORMULARIO
   ======================================== */
.form-panel .form-header,
.form-panel .form-group,
.form-panel .form-alert,
.form-panel .btn-group,
.form-panel .forgot-password {
  animation: fadeInUp 0.6s ease both;
}

.form-panel .form-header { animation-delay: 0ms; }
.form-panel .form-alert { animation-delay: 50ms; }
.form-panel .form-group:nth-of-type(1) { animation-delay: 100ms; }
.form-panel .form-group:nth-of-type(2) { animation-delay: 200ms; }
.form-panel .form-group:nth-of-type(3) { animation-delay: 300ms; }
.form-panel .btn-group { animation-delay: 300ms; }
.form-panel .forgot-password { animation-delay: 400ms; }

/* ========================================
   FORMULARIOS
   ======================================== */
.form-group {
  margin-bottom: 20px;
  width: 100%;
}

.form-label {
  font-family: var(--auth-font-family);
  display: block;
  font-size: var(--auth-font-size-sm);
  font-weight: var(--auth-font-weight-medium);
  color: var(--auth-gray-700);
  margin-bottom: var(--auth-spacing-sm);
  letter-spacing: 0.01em;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.form-input {
  font-family: var(--auth-font-family);
  width: 100%;
  height: var(--auth-input-height);
  padding: var(--auth-input-padding);
  border: var(--auth-input-border);
  border-radius: var(--auth-radius-md);
  font-size: var(--auth-font-size-base);
  font-weight: var(--auth-font-weight-normal);
  color: var(--auth-gray-900);
  background: var(--auth-input-bg);
  transition: var(--auth-transition-normal);
  letter-spacing: 0.01em;
}

.form-input::placeholder {
  color: var(--auth-gray-400);
  font-weight: var(--auth-font-weight-normal);
}

.form-input:hover {
  border-color: var(--auth-gray-400);
  background: var(--auth-input-bg-hover);
}

.form-input:focus {
  border-color: var(--auth-company-primary);
  background: var(--auth-bg-white);
  box-shadow: 0 0 0 3px rgba(var(--auth-company-dark), 0.08);
}

.form-input.error {
  border-color: var(--auth-error);
  background-color: var(--auth-error-light);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.form-input.success {
  border-color: var(--auth-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-gray-400);
  font-size: 0.875rem;
  pointer-events: none;
  transition: var(--auth-transition-smooth);
}

.input-wrapper:focus-within .input-icon {
  color: var(--auth-company-primary);
}

.form-input.error + .input-icon {
  color: var(--auth-error);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-gray-400);
  cursor: pointer;
  padding: 6px;
  transition: var(--auth-transition-smooth);
  border-radius: var(--auth-radius-sm);
  font-size: 0.875rem;
}

.password-toggle:hover {
  color: var(--auth-company-primary);
  background: rgba(var(--auth-company-dark), 0.08);
}

/* ========================================
   MENSAJES DE VALIDACIÓN Y ERROR
   ======================================== */
.error-message {
  margin-top: var(--auth-spacing-xs);
  font-size: var(--auth-font-size-xs);
  color: var(--auth-error);
  font-weight: var(--auth-font-weight-normal);
  display: none;
  align-items: center;
  gap: var(--auth-spacing-xs);
  opacity: 0;
  transform: translateY(-3px);
  transition: var(--auth-transition-normal);
  background: rgba(239, 68, 68, 0.03);
  padding: var(--auth-spacing-xs) var(--auth-spacing-sm);
  border-radius: var(--auth-radius-sm);
  border-left: 2px solid rgba(239, 68, 68, 0.3);
}

.error-message.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.error-icon {
  font-size: var(--auth-font-size-xs);
  flex-shrink: 0;
}

/* ==========================================================================
   ALERTAS DE FORMULARIO
   ========================================================================== */
.form-alert {
  display: none;
  min-height: var(--auth-input-height);
  padding: 12px 16px;
  border-radius: var(--auth-radius-default);
  font-size: var(--auth-font-size-sm);
  font-weight: var(--auth-font-weight-medium);
  gap: 10px;
  margin-bottom: var(--auth-spacing-default);
  width: 100%;
  flex-direction: row;
  align-items: flex-start;
}

.form-alert.visible {
  display: flex;
  animation: formAlertIn 0.3s ease-out forwards;
}

.form-alert i {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  margin-top: 3px;
}

.form-alert span {
  flex: 1;
  line-height: 1.5;
}

.form-alert.shake {
  animation: formAlertShake 0.4s ease-out;
}

.form-alert-error {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.form-alert-success {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
}

@keyframes formAlertIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes formAlertShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.validation-message {
  margin-top: var(--auth-spacing-xs);
  font-size: var(--auth-font-size-xs);
  display: none;
  align-items: center;
  gap: var(--auth-spacing-xs);
  opacity: 0;
  transform: translateY(-5px);
  transition: var(--auth-transition-normal);
}

.validation-message.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.validation-message.error {
  color: var(--auth-error);
}

.validation-message.success {
  color: var(--auth-success);
}

/* ========================================
   MEDIDOR DE FORTALEZA
   ======================================== */
.strength-meter {
  margin-top: var(--auth-spacing-sm);
  height: 4px;
  background: var(--auth-gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  transition: var(--auth-transition-smooth);
  width: 0%;
}

.strength-weak { background: var(--auth-error) !important; width: 25% !important; }
.strength-fair { background: var(--auth-warning) !important; width: 50% !important; }
.strength-good { background: var(--auth-success) !important; width: 75% !important; }
.strength-strong { background: var(--auth-success); width: 100% !important; }

.strength-text {
  font-size: var(--auth-font-size-xs);
  margin-top: var(--auth-spacing-xs);
  color: var(--auth-gray-500);
}

/* ========================================
   BOTONES
   ======================================== */
.btn-group {
  margin-top: var(--auth-spacing-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn {
  font-family: var(--auth-font-family);
  height: var(--auth-btn-height);
  padding: 0 var(--auth-spacing-lg);
  border-radius: var(--auth-radius-default);
  font-size: var(--auth-font-size-base);
  font-weight: var(--auth-font-weight-medium);
  border: none;
  cursor: pointer;
  transition: var(--auth-transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--auth-spacing-sm);
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--auth-company-primary);
  color: var(--auth-bg-black);
  box-shadow: var(--auth-shadow-btn-primary);
  border: 1px solid transparent;
  transition: var(--auth-transition-smooth);
}

.btn-primary:hover:not(:disabled) {
  background: var(--auth-company-hover);
  box-shadow: var(--auth-shadow-btn-primary-hover);
  transform: translateY(-1px);
  border: 1px solid transparent;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--auth-shadow-sm);
}

.btn-primary:focus {
  outline: none;
  box-shadow: var(--auth-shadow-focus);
}

.btn-secondary {
  background: var(--auth-bg-white);
  color: var(--auth-gray-700);
  border: 1px solid var(--auth-gray-300);
  box-shadow: var(--auth-shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--auth-gray-50);
  border-color: var(--auth-gray-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--auth-shadow-sm);
}

.btn-loading {
  pointer-events: none;
}

.offline-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%);
}

/* ========================================
   ENLACES DE NAVEGACIÓN
   ======================================== */
.forgot-password {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  width: 100%;
}

.forgot-link {
  color: #000;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: var(--auth-font-weight-medium);
  transition: var(--auth-transition-smooth);
  padding: 6px 12px;
  border-radius: var(--auth-radius-sm);
  display: inline-block;
  font-family: var(--auth-font-family);
}

.forgot-link:hover {
  color: rgba(var(--auth-company-dark), 1);
  background: rgba(var(--auth-company-dark), 0.08);
  text-decoration: none;
}

.back-to-login {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  width: 100%;
}

.back-link {
  font-family: var(--auth-font-family);
  color: var(--auth-company-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: var(--auth-font-weight-medium);
  transition: var(--auth-transition-smooth);
  padding: 6px 12px;
  border-radius: var(--auth-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-link:hover {
  color: rgba(var(--auth-company-dark), 1);
  background: rgba(var(--auth-company-dark), 0.08);
  text-decoration: none;
}

/* ========================================
   SECCIÓN INFO DEL PANEL VISUAL
   ======================================== */
.info-section {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--auth-spacing-sm);
  padding: var(--auth-spacing-xl) var(--auth-spacing-2xl) 36px;
  background: transparent;
}

.info-icon-container {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.info-icon-container i {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
}

.info-text {
  font-size: var(--auth-font-size-xs);
  font-weight: var(--auth-font-weight-normal);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  max-width: 260px;
  line-height: 1.5;
  margin: 0;
}

/* ========================================
   MODALES SUTILES
   ======================================== */
.subtle-modal {
  border: none;
  border-radius: var(--auth-radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  background: var(--auth-bg-white);
  border: 1px solid var(--auth-gray-200);
}

.modal-sm {
  max-width: 280px;
}

/* Modal en móvil - mismo tamaño que desktop, centrado horizontal */
@media (max-width: 576px) {
  .modal-dialog.modal-sm {
    max-width: 280px;
    margin: var(--auth-spacing-default) auto !important;
  }
}

/* Solo en pantallas muy pequeñas se adapta */
@media (max-width: 320px) {
  .modal-dialog.modal-sm {
    max-width: calc(100% - var(--auth-spacing-2xl));
  }
}

.subtle-body {
  padding: 20px;
  text-align: center;
}

.company-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--auth-gray-50);
  border: 1px solid var(--auth-gray-200);
  border-radius: var(--auth-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.install-text h5 {
  font-size: var(--auth-font-size-lg);
  font-weight: var(--auth-font-weight-medium);
  color: var(--auth-gray-900);
  margin: 0 0 var(--auth-spacing-xs) 0;
}

.install-text p {
  font-size: var(--auth-font-size-sm);
  color: var(--auth-gray-500);
  margin: 0 0 var(--auth-spacing-md) 0;
}

.action-buttons {
  display: flex;
  gap: var(--auth-spacing-sm);
}

.btn-dismiss,
.btn-accept {
  flex: 1;
  padding: 6px 12px;
  border-radius: var(--auth-radius-sm);
  font-size: var(--auth-font-size-sm);
  font-weight: var(--auth-font-weight-medium);
  border: none;
  cursor: pointer;
  transition: var(--auth-transition-fast);
}

.btn-dismiss {
  background: var(--auth-gray-100);
  color: var(--auth-gray-600);
}

.btn-dismiss:hover {
  background: var(--auth-gray-200);
}

.btn-accept {
  background: var(--auth-company-primary);
  color: var(--auth-bg-white);
}

.btn-accept:hover {
  background: var(--auth-primary-dark);
}

.btn-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   TARJETAS DE ESTADO (éxito, error, info)
   Diseño moderno sin colores saturados
   ======================================== */
.state-card {
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.state-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--auth-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--auth-spacing-xl);
  position: relative;
}

.state-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.5;
}

.state-icon i {
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

.state-icon-success {
  background: var(--auth-gradient-success-light);
}

.state-icon-success::before {
  background: radial-gradient(circle, var(--auth-success-bg) 0%, transparent 70%);
}

.state-icon-success i {
  color: var(--auth-success);
}

.state-icon-error {
  background: var(--auth-gradient-error-light);
}

.state-icon-error::before {
  background: radial-gradient(circle, var(--auth-error-bg) 0%, transparent 70%);
}

.state-icon-error i {
  color: var(--auth-error);
}

.state-icon-info {
  background: var(--auth-gradient-info-light);
}

.state-icon-info::before {
  background: radial-gradient(circle, var(--auth-info-bg) 0%, transparent 70%);
}

.state-icon-info i {
  color: var(--auth-info);
}

.state-title {
  font-size: var(--auth-font-size-2xl);
  font-weight: var(--auth-font-weight-semibold);
  color: var(--auth-gray-900);
  margin: 0 0 var(--auth-spacing-sm);
}

.state-description {
  font-size: var(--auth-font-size-base);
  color: var(--auth-gray-500);
  line-height: 1.6;
  margin: 0 0 var(--auth-spacing-xl);
}

.state-message {
  padding: var(--auth-spacing-default);
  border-radius: var(--auth-radius-default);
  font-size: var(--auth-font-size-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--auth-spacing-sm);
  text-align: left;
  margin-bottom: var(--auth-spacing-default);
}

.state-message i {
  flex-shrink: 0;
  margin-top: 2px;
}

.state-message-success {
  background: var(--auth-gradient-success-light);
  color: var(--auth-success-text);
}

.state-message-error {
  background: var(--auth-gradient-error-light);
  color: var(--auth-error-text);
}

.state-message-info {
  background: var(--auth-gradient-info-light);
  color: var(--auth-info-text);
}

.state-message-warning {
  background: var(--auth-gradient-warning-light);
  color: var(--auth-warning-text);
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   RESPONSIVE - TABLET (768px)
   ======================================== */
@media (max-width: 768px) {
  .main-container {
    align-items: center;
    min-height: 100vh;
  }

  .login-card {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 440px;
    min-height: auto;
    background: var(--auth-bg-white);
    overflow: visible;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    height: auto;
  }

  .visual-panel {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: -9999 !important;
  }

  .form-panel {
    padding: var(--auth-spacing-xl) var(--auth-spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    height: auto;
    min-height: auto;
  }

  .form-panel > form {
    max-width: 100%;
    width: 100%;
  }

  .form-header {
    max-width: 100%;
    margin-bottom: 28px;
  }

  .form-input {
    max-width: 100%;
    height: var(--auth-input-height-mobile);
    font-size: 16px;
  }

  .form-input::placeholder {
    font-size: var(--auth-font-size-base);
    color: var(--auth-gray-400);
  }

  .form-label {
    font-weight: var(--auth-font-weight-semibold);
    color: var(--auth-gray-800);
  }

  .btn {
    width: 100%;
    max-width: none;
    height: var(--auth-btn-height-mobile);
  }

  .form-title {
    font-size: var(--auth-font-size-2xl);
  }

  .user-avatar {
    height: 60px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .btn-group {
    margin-top: 20px;
    gap: 10px;
  }

  .forgot-password,
  .back-to-login {
    margin-top: var(--auth-spacing-md);
    padding-top: var(--auth-spacing-md);
  }

  body {
    overflow-y: auto;
  }
}

/* ========================================
   RESPONSIVE - MÓVIL (480px)
   ======================================== */
@media (max-width: 480px) {
  .main-container {
    padding: 20px var(--auth-spacing-md);
  }

  .login-card {
    max-width: 100%;
  }

  .form-panel {
    padding: 28px 20px;
  }

  .form-title {
    font-size: 1.375rem;
  }

  .user-avatar {
    height: 50px;
  }

  .form-header {
    margin-bottom: var(--auth-spacing-lg);
  }

  .form-input {
    height: 46px;
    padding: 0 12px 0 38px;
  }

  .input-icon {
    left: 12px;
  }

  .password-toggle {
    right: 10px;
  }

  .btn {
    height: 46px;
    font-size: 0.9rem;
  }

  .form-group {
    margin-bottom: var(--auth-spacing-md);
  }

  .btn-group {
    margin-top: 18px;
  }
}

/* ========================================
   2FA - INPUTS DE CÓDIGO
   ======================================== */
.code-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: var(--auth-spacing-sm);
}

.code-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: var(--auth-font-weight-semibold);
  font-family: monospace, 'Courier New', Courier;
  border: var(--auth-input-border);
  border-radius: var(--auth-radius-md);
  background: var(--auth-input-bg);
  color: var(--auth-gray-900);
  transition: var(--auth-transition-normal);
  caret-color: var(--auth-company-primary);
}

.code-input:hover {
  border-color: var(--auth-gray-400);
  background: var(--auth-input-bg-hover);
}

.code-input:focus {
  border-color: var(--auth-company-primary);
  background: var(--auth-bg-white);
  box-shadow: 0 0 0 3px rgba(var(--auth-company-dark), 0.08);
}

.code-input.error {
  border-color: var(--auth-error);
  background-color: var(--auth-error-light);
}

/* ========================================
   2FA - CONFIAR EN DISPOSITIVO
   ======================================== */
.trust-device-option {
  display: flex;
  justify-content: center;
  margin-top: var(--auth-spacing-md);
}

.trust-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.trust-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--auth-company-primary);
  cursor: pointer;
  margin: 0;
}

.trust-checkbox .checkmark {
  display: none;
}

.trust-label {
  font-size: var(--auth-font-size-xs);
  color: var(--auth-gray-500);
  font-weight: var(--auth-font-weight-normal);
}

.trust-checkbox:hover .trust-label {
  color: var(--auth-gray-700);
}

/* ========================================
   2FA - META INFO (TIMER + REENVÍO)
   ======================================== */
.code-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--auth-spacing-lg);
  padding-top: var(--auth-spacing-md);
}

.code-timer {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: var(--auth-font-size-sm);
  font-weight: var(--auth-font-weight-medium);
  color: var(--auth-gray-500);
  letter-spacing: 0.5px;
}

.code-timer.expired {
  color: var(--auth-error);
}

.meta-separator {
  color: var(--auth-gray-300);
  font-size: 10px;
}

.resend-link {
  font-family: var(--auth-font-family);
  font-size: var(--auth-font-size-sm);
  font-weight: var(--auth-font-weight-medium);
  color: var(--auth-company-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: var(--auth-transition-normal);
}

.resend-link:hover:not(:disabled) {
  text-decoration: underline;
}

.resend-link:disabled {
  color: var(--auth-gray-400);
  cursor: not-allowed;
  text-decoration: none;
}

/* ========================================
   2FA - RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
  .code-inputs {
    gap: 6px;
  }

  .code-input {
    width: 42px;
    height: 50px;
    font-size: 1.25rem;
  }
}

@media (max-width: 360px) {
  .code-inputs {
    gap: 4px;
  }

  .code-input {
    width: 38px;
    height: 46px;
    font-size: 1.125rem;
  }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
