/**
 * Login landing — sfondo animato soft + card glass (ispirazione modern fintech).
 * Solo /login; nessuna logica auth.
 */

:root {
  --login-landing-bg:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 55% at 85% 20%, rgba(37, 99, 235, 0.22), transparent 50%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(15, 118, 110, 0.16), transparent 60%),
    linear-gradient(165deg, #0b1220 0%, #0f2744 42%, #123a5f 72%, #0b1220 100%);
}

html:has(body.page-login) {
  background-color: #0b1220;
  background: var(--login-landing-bg);
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  height: -webkit-fill-available;
}

html.cap-native:has(body.page-login),
html.cap-native body.page-login {
  background-color: #0b1220 !important;
  background: var(--login-landing-bg) !important;
  padding-top: 0 !important;
  --cap-topbar-offset: 0px;
}

body.page-login {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #0b1220;
  background: var(--login-landing-bg);
  padding-bottom: 0 !important;
}

body.page-login .topbar,
body.page-login #amm-webapp-banner,
body.page-login .footer,
body.page-login #toast,
body.page-login #app-page-modals {
  display: none !important;
}

body.page-login main.container {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: transparent;
}

@media (max-width: 1024px), html.cap-native {
  body.page-login {
    padding-bottom: 0 !important;
  }
}

.login-landing {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.login-landing__bg {
  position: fixed;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  z-index: 0;
  pointer-events: none;
  background-color: #0b1220;
  background: var(--login-landing-bg);
}

.login-landing__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  will-change: transform;
}

.login-landing__orb--a {
  width: 280px;
  height: 280px;
  top: 8%;
  left: -8%;
  background: rgba(56, 189, 248, 0.35);
  animation: login-orb-a 22s ease-in-out infinite;
}

.login-landing__orb--b {
  width: 320px;
  height: 320px;
  top: 38%;
  right: -12%;
  background: rgba(37, 99, 235, 0.32);
  animation: login-orb-b 26s ease-in-out infinite;
}

.login-landing__orb--c {
  width: 360px;
  height: 360px;
  bottom: -10%;
  left: 25%;
  background: rgba(20, 184, 166, 0.22);
  animation: login-orb-c 30s ease-in-out infinite;
}

.login-landing__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  opacity: 0.14;
  background: radial-gradient(120% 80% at 50% 100%, rgba(147, 197, 253, 0.1), transparent 72%);
  animation: login-wave 14s ease-in-out infinite alternate;
}

@keyframes login-orb-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, 18px) scale(1.06); }
}

@keyframes login-orb-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 22px) scale(1.04); }
}

@keyframes login-orb-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(16px, -20px) scale(1.05); }
}

@keyframes login-wave {
  0% { transform: translateY(0); opacity: 0.1; }
  100% { transform: translateY(-10px); opacity: 0.18; }
}

@media (prefers-reduced-motion: reduce) {
  .login-landing__orb,
  .login-landing__wave {
    animation: none !important;
  }
}

.login-landing__content {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(10px + env(safe-area-inset-bottom, 0px));
}

.login-landing__logo {
  display: block;
  width: min(68vw, 220px);
  height: auto;
  margin: 0 0 -18px;
  filter: drop-shadow(0 8px 24px rgba(2, 6, 23, 0.35));
}

.login-landing__card {
  width: 100%;
  padding: 24px 22px 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.35);
}

body.page-login .login-landing__card h1.login-landing__title {
  margin: 0 0 2px !important;
  font-size: clamp(1.65rem, 5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  text-align: center;
}

body.page-login .login-landing__card p.login-landing__subtitle {
  margin: 0 0 20px !important;
  font-size: var(--text-sm, 0.875rem);
  color: rgba(226, 232, 240, 0.82);
  text-align: center;
  line-height: 1.2;
}

.login-field {
  margin-bottom: 14px;
}

.login-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.85);
}

.login-field__control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--mobile-touch-min, 48px);
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.42);
}

.login-field__control:focus-within {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.login-field__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: rgba(148, 163, 184, 0.95);
}

.login-field__icon svg {
  display: block;
}

.login-field__control input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 0;
  margin: 0;
  font-size: 16px;
  color: #f8fafc;
  box-shadow: none;
}

.login-field__control input:focus {
  outline: none;
  box-shadow: none;
}

.login-field__control input:-webkit-autofill,
.login-field__control input:-webkit-autofill:hover,
.login-field__control input:-webkit-autofill:focus,
.login-field__control input:-webkit-autofill:active {
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc;
  box-shadow: 0 0 0 1000px rgba(2, 6, 23, 0.42) inset !important;
  transition: background-color 99999s ease-out 0s;
}

.login-field__toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(148, 163, 184, 0.95);
  cursor: pointer;
}

.login-field__toggle:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.1);
}

.login-landing__submit {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 650;
  border-radius: 14px;
}

.login-landing__submit-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.login-landing__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  text-align: center;
}

.login-landing__links a {
  font-size: var(--text-sm, 0.875rem);
  color: rgba(191, 219, 254, 0.92);
  text-decoration: none;
}

.login-landing__links a:hover {
  color: #fff;
  text-decoration: underline;
}

.login-landing__fineprint {
  margin: 14px 0 0;
  padding: 0;
  text-align: center;
  font-size: var(--text-2xs, 0.75rem);
  color: rgba(226, 232, 240, 0.72);
}

.login-landing__fineprint a {
  color: rgba(191, 219, 254, 0.9);
  text-decoration: none;
}

.login-landing__fineprint a:hover {
  color: #fff;
  text-decoration: underline;
}

.login-landing .biometric-login-mount {
  margin-top: 16px;
}

.login-landing .biometric-login-hint {
  font-size: var(--text-2xs, 0.75rem);
}

.login-landing .ui-banner {
  margin-bottom: 14px;
}
