.alma-login-page,
.alma-login-page *,
.alma-login-page *::before,
.alma-login-page *::after {
  box-sizing: border-box;
}

.alma-login-page {
  --primary: #1a3fa8;
  --primary-light: #2d57d1;
  --accent: #f35b22;
  --accent-2: #ff7a42;
  --text: #0f1f3d;
  --muted: #5a6b8a;
  --line: #dde5f4;
  --glass: rgba(255,255,255,0.82);
  --glass-border: rgba(255,255,255,0.55);
  --shadow-panel: 0 32px 80px rgba(10,20,60,0.22), 0 2px 8px rgba(10,20,60,0.08);
  --radius: 28px;

  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.4;
}

/* En pantallas donde el contenido no cabe en 100dvh,
   el panel izquierdo hace scroll internamente */
@media (max-height: 700px) {
  .alma-login-page,
  .alma-login-app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .alma-login-left {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .alma-login-right {
    height: 100dvh;
    position: sticky;
    top: 0;
  }
}

.alma-login-page a {
  color: var(--primary);
  text-decoration: none;
}

.alma-login-page a:hover {
  text-decoration: underline;
}

.alma-login-page img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

.alma-login-page svg {
  display: block;
  flex: 0 0 auto;
}

.alma-login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, #5ec4f5 0%, #2e9de0 25%, #1565c8 55%, #0d3a9e 100%);
  z-index: 0;
}

.alma-login-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 72% 28%, rgba(150,225,255,0.30) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 30% 70%, rgba(30,120,240,0.15) 0%, transparent 55%);
  z-index: 1;
}

.alma-login-app {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(380px, 440px) 1fr;
  overflow: hidden;
}

.alma-login-left {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 36px 36px 28px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-right: 1px solid var(--glass-border);
  box-shadow: var(--shadow-panel);
  /* Scroll interno cuando el contenido no cabe en la altura disponible */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.alma-login-left-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 356px;
  margin: 0 auto;
  width: 100%;
  min-height: 0;
}

.alma-login-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.alma-login-logo-alma {
  width: 110px;
  max-width: 110px;
  object-fit: contain;
}

.alma-login-logo-finsa {
  width: 128px;
  max-width: 128px;
  object-fit: contain;
}

.alma-login-title {
  margin: 0 0 10px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.3rem, 3vw, 3.3rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: #0d2257;
}

.alma-login-sub {
  margin: 0 0 24px 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.98rem;
  max-width: 30ch;
  font-weight: 400;
}

.alma-login-intro {
  margin-bottom: 24px;
}

.alma-login-form-area {
  margin-top: 0;
}

.alma-login-footer {
  margin-top: auto;
  padding-top: 16px;
}

.alma-login-form-shell {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(200,215,240,0.8);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 32px rgba(20,50,140,0.07);
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto;
}

.alma-login-form {
  display: block;
  margin: 0;
  height: auto !important;
  min-height: 0 !important;
}

.alma-login-field {
  display: block !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: none !important;
}

.alma-login-label {
  display: block;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #1a2e5e;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
    
.alma-login-input-wrap {
  position: relative;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.alma-login-input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1.5px solid #d5dff0;
  background: rgba(255,255,255,0.9);
  color: #12233e;
  padding: 0 48px 0 16px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.alma-login-input:focus {
  border-color: #7da4ef;
  box-shadow: 0 0 0 4px rgba(45,87,209,0.10);
  background: #fff;
}

.alma-login-input::placeholder {
  color: #9aaac4;
}

.alma-login-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.38;
  pointer-events: none;
  color: #334155;
}

.alma-login-pass-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8eaa;
  transition: background 0.15s;
  box-shadow: none;
}

.alma-login-pass-toggle:hover {
  background: #eef3ff;
}

.alma-login-pass-toggle svg {
  width: 19px;
  height: 19px;
}

.alma-login-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  margin: 10px 0 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Wrapper del checkbox + label — ambos en línea */
.alma-login-remember-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}

.alma-login-remember-wrap input[type="checkbox"] {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  accent-color: var(--primary-light);
  /* Neutralizar cualquier transform o margin del tema */
  vertical-align: unset !important;
  position: static !important;
  float: none !important;
}

.alma-login-remember-label {
  font-size: 14px !important;
  line-height: 1 !important;
  color: #667691 !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  user-select: none;
  /* El label no debe tener altura propia que desplace el eje */
  display: block !important;
  font-weight: 400 !important;
}

.alma-login-forgot {
  font-size: 14px !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: center !important;
}

.alma-login-error {
  display: none;
  margin: 10px 0 0 0 !important;
  background: #fff0ed;
  border: 1px solid #f9c9bc;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  color: #b83a1a;
  line-height: 1.5;
}

.alma-login-submit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 52px !important;
  margin: 12px 0 0 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 16px;
  background: linear-gradient(95deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(243,91,34,0.28), 0 2px 8px rgba(243,91,34,0.12);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-align: center !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

.alma-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(243,91,34,0.34), 0 2px 8px rgba(243,91,34,0.14);
}

.alma-login-submit:active {
  transform: translateY(0);
}

.alma-login-submit:disabled {
  cursor: not-allowed;
}




.alma-login-form input,
.alma-login-form button,
.alma-login-form label,
.alma-login-form a {
  flex: 0 0 auto;
}

.alma-login-form > * {
  width: 100%;
}

.alma-login-form .alma-login-row {
  width: 100%;
}

.alma-login-form-shell .alma-login-error:empty {
  display: none !important;
}

.alma-login-left-inner > * {
  flex-shrink: 0;
}



.alma-login-footer {
  margin-top: 16px;
  color: #8896af;
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.alma-login-footer a {
  color: #6d82b0;
}

.alma-login-footer-links {
  margin-top: 2px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.alma-login-right {
  position: relative;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 100dvh;
}

.alma-login-ground-ring {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(200px, 42%, 380px);
  height: clamp(40px, 8%, 80px);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 40px 18px rgba(0,200,255,0.28),
    0 0 90px 30px rgba(0,160,255,0.14);
  filter: blur(6px);
  z-index: 2;
  animation: almaRingPulse 3s ease-in-out infinite;
}

.alma-login-ground-ring-2 {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 60%, 540px);
  height: clamp(30px, 6%, 60px);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 60px 20px rgba(0,160,255,0.10);
  filter: blur(10px);
  z-index: 2;
  animation: almaRingPulse 3s ease-in-out infinite 0.4s;
}

@keyframes almaRingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.alma-login-float-icons {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.alma-login-ficon {
  position: absolute;
  width: clamp(52px, 7%, 72px);
  height: clamp(52px, 7%, 72px);
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,100,255,0.18), 0 0 0 1px rgba(255,255,255,0.08);
}

.alma-login-ficon svg {
  width: 30px;
  height: 30px;
}

.alma-login-ficon-shield { top: 18%; left: 8%; animation: almaIconFloat 4.8s ease-in-out infinite; }
.alma-login-ficon-house  { top: 16%; right: 7%; animation: almaIconFloat 5.2s ease-in-out infinite 0.5s; }
.alma-login-ficon-car    { top: 42%; right: 5%; animation: almaIconFloat 4.5s ease-in-out infinite 1s; }
.alma-login-ficon-health { bottom: 26%; right: 9%; animation: almaIconFloat 5s ease-in-out infinite 0.3s; }
.alma-login-ficon-doc    { top: 38%; left: 6%; animation: almaIconFloat 4.7s ease-in-out infinite 0.8s; }

@keyframes almaIconFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-9px); }
}

.alma-login-sparkle {
  position: absolute;
  border-radius: 50%;
  background: rgba(150,230,255,0.7);
  animation: almaSparkleAnim 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}

.alma-login-sp1 { width: 4px; height: 4px; top: 22%; left: 22%; animation-delay: 0s; }
.alma-login-sp2 { width: 3px; height: 3px; top: 14%; left: 55%; animation-delay: 0.6s; }
.alma-login-sp3 { width: 5px; height: 5px; top: 30%; right: 22%; animation-delay: 1.2s; }
.alma-login-sp4 { width: 3px; height: 3px; top: 55%; left: 18%; animation-delay: 0.4s; }
.alma-login-sp5 { width: 4px; height: 4px; bottom: 30%; right: 20%; animation-delay: 1s; }

@keyframes almaSparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.4); }
}

.alma-login-right-headline {
  position: absolute;
  top: clamp(28px, 5vh, 52px);
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 40px;
  pointer-events: none;
  z-index: 4;
}

.alma-login-tagline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 100px;
  padding: 7px 18px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.alma-login-tagline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67d6ff;
  box-shadow: 0 0 8px rgba(103,214,255,0.7);
  animation: almaPulse 2s ease-in-out infinite;
}

@keyframes almaPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.85); }
}

.alma-login-right-title {
  margin: 0 0 12px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(8,18,60,0.5);
}

.alma-login-right-sub {
  margin: 0 auto;
  font-size: clamp(0.95rem, 1vw, 1.06rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.68);
  max-width: 44ch;
}

.alma-login-robot-stage {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(220px, 24vw, 340px);
  max-width: 340px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: almaFloatRobot 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}

@keyframes almaFloatRobot {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

.alma-login-robot-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 48dvh;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 24px 60px rgba(10,20,80,0.4)) drop-shadow(0 4px 18px rgba(10,20,80,0.22));
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 100%;
  animation: almaWaveBody 6s ease-in-out infinite;
}

@keyframes almaWaveBody {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(1deg); }
  35% { transform: rotate(-1deg); }
  55% { transform: rotate(1deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.alma-login-robot-shadow {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(120px, 18%, 200px);
  height: 24px;
  border-radius: 50%;
  background: rgba(4, 8, 36, 0.35);
  filter: blur(12px);
  z-index: 2;
}

.alma-login-right-bottom {
  position: absolute;
  bottom: 30px;
  right: 32px;
  z-index: 5;
}
.alma-login-stat-pill {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 100px;
  padding: 9px 24px;
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  width: max-content !important;
  min-width: 190px !important;
  max-width: none !important;
  height: 42px;

  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  box-sizing: border-box;
}

.alma-login-stat-pill svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto !important;
  display: block;
}

.alma-login-stat-text {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;

  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;

  color: rgba(255,255,255,0.86);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1 !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.alma-login-stat-text strong {
  display: inline !important;
  color: #fff;
  font-weight: 800;
  line-height: 1 !important;
  white-space: nowrap !important;
}

@media (max-width: 1000px) {
  .alma-login-app {
    grid-template-columns: minmax(360px, 44%) 1fr;
  }
}

@media (max-width: 820px) {
  .alma-login-page {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    height: auto;
    min-height: 100dvh;
    /* Scroll del body en tablet/móvil cuando el layout es vertical */
    overflow: visible;
  }

  .alma-login-app {
    grid-template-columns: 1fr;
    grid-template-rows: 300px auto;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .alma-login-right {
    order: -1;
    min-height: 300px;
    height: 300px;
  }

  .alma-login-robot-stage {
    width: min(180px, 30%);
    max-width: 180px;
  }

  .alma-login-robot-img {
    max-height: 260px;
  }

  .alma-login-robot-shadow {
    width: min(100px, 16%);
  }

  .alma-login-right-headline {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 40px;
  pointer-events: none;
  z-index: 4;
}

.alma-login-right-title {
  margin: 0 0 12px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(8,18,60,0.5);
}

  .alma-login-right-sub {
    display: none;
  }

  .alma-login-right-bottom {
  position: absolute;
  bottom: 26px;
  right: 28px;
  z-index: 5;
}

  .alma-login-left {
    min-height: auto;
    height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

  .alma-login-stat-pill {
    min-width: 165px !important;
    height: 38px;
    padding: 8px 18px;
    gap: 7px !important;
  }

  .alma-login-stat-label,
  .alma-login-stat-time,
  .alma-login-stat-pill strong {
    font-size: 12px;
  }
}


@media (max-width: 520px) {
  .alma-login-left {
    padding: 20px;
  }

  .alma-login-logos {
    margin-bottom: 26px;
    padding-bottom: 20px;
  }

  .alma-login-form-shell {
    padding: 18px;
  }

  .alma-login-right {
    min-height: 260px;
    height: 260px;
  }

  .alma-login-robot-stage {
    width: min(150px, 28%);
    max-width: 150px;
  }

  .alma-login-tagline-pill {
    font-size: 11px;
    padding: 5px 14px;
  }

  .alma-login-right-title {
    font-size: 1.35rem;
  }
}
/* ---- Scrollbar invisible pero funcional ---- */
.alma-login-left::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.alma-login-left {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.alma-login-stat-pill {
    min-width: 132px;
    height: 36px;
    padding: 7px 12px;
  }@media (max-width: 768px) {
    .alma-login-page {
        display: block;
        min-height: 100vh;
        padding: 0;
    }

    /*
     * Ocultar lado derecho: formulario, usuario, contraseña y botones.
     */
    .alma-login-right,
    .alma-login-form-side,
    .alma-login-panel {
        display: none !important;
    }

    /*
     * Mostrar lado izquierdo ocupando toda la pantalla.
     */
    .alma-login-left,
    .alma-login-info,
    .alma-login-brand,
    .alma-login-hero,
    .alma-login-copy {
        display: flex !important;
    }

    .alma-login-left {
        width: 100% !important;
        max-width: none !important;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 24px 18px;
        box-sizing: border-box;
    }
  }
}