/* Vuexy Login Cover Style - Basado en page-auth.css oficial */

.authentication-wrapper {
  display: flex;
  flex-basis: 100%;
  min-height: 100vh;
  width: 100%;
  flex-direction: column;
  position: relative;
}

.authentication-cover {
  align-items: stretch;
  justify-content: flex-end;
}

.auth-cover-brand {
  position: absolute;
  top: 2.5rem;
  left: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.auth-cover-brand .app-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.auth-cover-brand .app-brand-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #566a7f !important;
}

@media (min-width: 1200px) {
  .auth-cover-brand {
    display: none;
  }
}

.authentication-inner {
  min-height: 100vh;
  height: 100%;
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

/* Panel izquierdo: fondo azul tipo Siigo */
.auth-cover-left {
  flex: 0 0 auto;
}

.auth-cover-bg {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #2563eb;
  overflow: hidden;
}

/* Imagen de fondo del tema: verde muy suave que se confunde con la imagen */
.auth-cover-bg.auth-cover-bg-has-image {
  background: linear-gradient(
    160deg,
    #8a9e92 0%,
    #7d9185 12%,
    #7a8e82 25%,
    #789084 40%,
    #768a7e 55%,
    #788c82 70%,
    #7c9086 85%,
    #82968a 100%
  );
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-cover-bg.auth-cover-bg-has-image::before {
  display: none;
}

/* Imagen del tema: un poco más grande, enmarcada y centrada */
.auth-cover-bg .auth-cover-image-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.18);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  z-index: 0;
}

.auth-cover-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 100%);
  pointer-events: none;
  z-index: 0;
}

.auth-cover-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 360px;
}

.auth-cover-logo-img {
  height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.auth-cover-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.auth-cover-tagline {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.auth-cover-shapes {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  z-index: 0;
  opacity: 0.12;
  background: radial-gradient(ellipse 80% 60% at 20% 100%, rgba(255,255,255,0.4) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 80% 90%, rgba(255,255,255,0.3) 0%, transparent 45%);
  pointer-events: none;
}

.auth-illustration {
  position: relative;
  z-index: 1;
  max-height: 65%;
  max-width: 65%;
  width: auto;
  height: auto;
  margin: 2.5rem 0;
  object-fit: contain;
}

.platform-bg {
  position: absolute;
  height: 35%;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 0;
  object-fit: cover;
  object-position: bottom;
}

/* Sección de login: fondo blanco */
.authentication-bg {
  background-color: #fff;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 1.5rem;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
}

.authentication-bg .w-px-400 {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 3rem;
}

@media (min-width: 1200px) {
  .authentication-bg .w-px-400 {
    padding-top: 5rem;
  }
}

/* Form Styles */
.authentication-bg h4 {
  color: #566a7f;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* ¡Bienvenido! en negro brillante */
.authentication-bg .auth-welcome-title {
  color: #000000 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
  -webkit-font-smoothing: antialiased;
}

.authentication-bg p {
  color: #a1acb8;
  font-size: 0.9375rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Formulario de login: distribución y espaciado */
.auth-login-form {
  margin-bottom: 1.5rem;
}
.auth-field {
  margin-bottom: 1.25rem;
}
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.auth-btn-submit {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}
.auth-recovery {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: #566a7f;
}
.auth-terms {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}
.auth-terms-text {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}
.auth-terms-link {
  color: #2563eb !important;
  font-weight: 500;
  text-decoration: none;
}
.auth-terms-link:hover {
  text-decoration: underline;
  color: #1d4ed8 !important;
}
.auth-footer {
  margin-top: 0.5rem;
}
.auth-link {
  font-size: 0.875rem;
  color: #2563eb !important;
  text-decoration: none;
}
.auth-link:hover {
  text-decoration: underline;
}

/* Casilleros estéticos: input-group con iconos */
.auth-input-group {
  border-radius: 0.5rem;
  border: 1px solid #d9dee3;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.auth-input-group:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}
.auth-input-icon {
  background: #f8fafc !important;
  border: none !important;
  color: #64748b;
  padding: 0 1rem;
  font-size: 1.125rem;
}
.auth-input-group .auth-form-control {
  border: none !important;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  background: #fff;
  min-height: 46px;
}
.auth-input-group .auth-form-control::placeholder {
  color: #94a3b8;
}
.auth-input-group .auth-form-control:focus {
  box-shadow: none;
  outline: 0;
}
.auth-toggle-password {
  border-left: 1px solid #e2e8f0 !important;
}
.auth-toggle-password:hover {
  color: #2563eb !important;
}

.form-control-validation {
  margin-bottom: 0;
}
.form-control-validation .invalid-feedback {
  margin-top: 0.25rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #566a7f;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  border: 1px solid #d9dee3;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #566a7f;
  transition: all 0.2s;
  width: 100%;
  display: block;
}

.form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
  color: #566a7f;
  outline: 0;
}

.form-password-toggle .input-group {
  position: relative;
}
.form-password-toggle .auth-input-group .input-group-text:last-child {
  border-left: 1px solid #e2e8f0;
}
.form-password-toggle .input-group-text {
  background-color: #fff;
  border-left: none;
  cursor: pointer;
  color: #a1acb8;
  transition: color 0.2s;
}

.form-password-toggle .input-group-text:hover {
  color: #2563eb;
}

.form-password-toggle .input-group-merge .form-control {
  border-right: none;
}

.form-password-toggle .input-group-merge .form-control:focus {
  border-right: none;
}

.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0;
  margin-right: 0.5rem;
  cursor: pointer;
}

.form-check-label {
  font-size: 0.875rem;
  color: #566a7f;
  cursor: pointer;
  margin-bottom: 0;
}

.btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.text-center a,
.authentication-bg a[href] {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.text-center a:hover,
.authentication-bg a[href]:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.alert {
  border-radius: 0.5rem;
  border: 1px solid transparent;
  padding: 1rem 1.25rem;
}

.alert-danger {
  background-color: #fff5f5;
  border-color: #fecaca;
  color: #991b1b;
}

/* Modal Términos y Condiciones / Política de Privacidad - SmartFact */
.auth-modal-terms {
  border-radius: 0.5rem;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.auth-modal-terms-header {
  background: #1A2F4B;
  color: #fff;
  border-bottom: none;
  padding: 1rem 1.25rem;
}
.auth-modal-terms-header .modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}
.auth-modal-terms-body {
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
}
.auth-modal-terms-body p {
  margin-bottom: 1rem;
  color: inherit;
}
.auth-modal-terms-body p:last-child {
  margin-bottom: 0;
}
.auth-modal-terms-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.25rem;
  justify-content: center;
}
.auth-modal-btn-close {
  min-width: 120px;
  font-weight: 500;
  border-color: #2563eb;
  color: #2563eb;
}
.auth-modal-btn-close:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .authentication-inner {
    height: 100vh;
  }
  
  .auth-cover-brand {
    top: 1.5rem;
    left: 1.5rem;
  }
  
  .auth-cover-brand .app-brand-text {
    color: #566a7f;
  }
  
  .authentication-bg .w-px-400 {
    max-width: 100%;
    padding: 0 1rem;
    margin-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 575px) {
  .auth-cover-brand .app-brand-text {
    font-size: 1.25rem;
  }
  
  .authentication-bg {
    padding: 1.5rem !important;
  }
  
  .authentication-bg h4 {
    font-size: 1.25rem;
  }
}
