/* Login — BSM GROUP (referencia visual corporativa) */

html {
  height: 100%;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background-color: #e8eef5;
  background-image: url("https://cdn.bsmgroup.pro/file/data-system/logos/fondologo.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12), 0 4px 14px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.login-card-main {
  padding: 2rem 2rem 1.5rem;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.login-brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.login-brand-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #101828;
}

.login-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #101828;
  text-align: center;
}

.login-subtitle {
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #667085;
  text-align: center;
}

.login-field {
  margin-bottom: 1rem;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 2;
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 0 44px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #101828;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input-wrap.password-wrap .login-input {
  padding-right: 88px;
}

/* Ocultar revelar contraseña nativo solo en entrada fina (ratón/trackpad): en iOS Safari
   ocultar ::-webkit-textfield-decoration-container con display:none suele impedir escribir
   en type=password hasta que el campo pasa a type=text (p. ej. “ver contraseña”). */
.login-input[type="password"]::-ms-reveal,
.login-input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

@media not (pointer: coarse) {
  .login-input::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
  }

  .login-input[type="password"]::-webkit-textfield-decoration-container {
    display: none !important;
  }
}

@media (pointer: coarse) {
  .login-input {
    font-size: max(16px, 1rem);
  }
}

.login-input::placeholder {
  color: #98a2b3;
  font-weight: 500;
}

.login-input:focus {
  border-color: #174a8b;
  box-shadow: 0 0 0 3px rgba(23, 74, 139, 0.15);
}

.login-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #667085;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  z-index: 2;
}

.login-toggle-password:hover {
  color: #174a8b;
  background: rgba(23, 74, 139, 0.08);
}

.btn-login-primary {
  position: relative;
  width: 100%;
  height: 48px;
  margin-top: 0.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(180deg, #174a8b 0%, #102b4f 100%);
  box-shadow: 0 4px 14px rgba(16, 43, 79, 0.35);
  display: block;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.btn-login-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 43, 79, 0.4);
}

.btn-login-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-login-label {
  display: block;
  text-align: center;
  line-height: 48px;
}

.btn-login-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  line-height: 1;
}

.login-divider-wrap {
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: #e4e7ec;
}

.login-divider-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #667085;
  white-space: nowrap;
}

.btn-whatsapp-outline {
  width: 100%;
  height: 46px;
  border: 1px solid #25d366;
  border-radius: 8px;
  background: #ffffff;
  color: #128c7e;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-whatsapp-outline:hover {
  background: rgba(37, 211, 102, 0.08);
  color: #075e54;
  text-decoration: none;
}

.login-card-footer {
  padding: 1rem 2rem 1.25rem;
  background: #f9fafb;
  border-top: 1px solid #eaecf0;
}

.login-footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.login-footer-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eef2f6;
  color: #174a8b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.login-footer-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475467;
}

.login-footer-sub {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #98a2b3;
}

@media (max-width: 576px) {
  .login-card-main {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .login-card-footer {
    padding: 1rem 1.25rem 1.15rem;
  }

  body.login-page {
    background-attachment: scroll;
  }
}
