/*
 * Login AppForze — ispirato a card moderna su campo blu soft → bianco,
 * con curve fluide e trama a punti (senza animazioni).
 */

html,
body.login-body {
  margin: 0;
  min-height: 100%;
  color: var(--af-premium-ink, var(--text, #082f58));
  background-color: #f7fbfe;
  background-image:
    radial-gradient(95% 78% at 50% 42%, rgba(125, 188, 232, .34) 0%, rgba(186, 220, 244, .28) 34%, rgba(244, 249, 253, .7) 64%, #ffffff 92%),
    radial-gradient(55% 48% at 8% 18%, rgba(7, 95, 174, .14), transparent 70%),
    radial-gradient(50% 44% at 94% 82%, rgba(48, 163, 216, .16), transparent 68%),
    linear-gradient(180deg, #eaf4fb 0%, #f7fbfe 48%, #ffffff 100%);
  background-repeat: no-repeat;
  font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.login-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4.5vw, 48px) 18px;
  overflow: hidden;
}

.login-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(62% 52% at 50% 46%, rgba(255, 255, 255, 0) 24%, rgba(255, 255, 255, .42) 62%, rgba(255, 255, 255, .88) 86%, #ffffff 100%);
}

.login-atmosphere {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-geometry {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-card {
  --login-radius: 24px;
  --login-control-radius: 14px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, 420px);
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 32px 30px 26px;
  overflow: hidden;
  border: 1px solid rgba(174, 202, 222, .85);
  border-radius: var(--login-radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow:
    0 28px 64px rgba(8, 47, 88, .12),
    0 8px 20px rgba(7, 95, 174, .06),
    0 0 0 1px rgba(255, 255, 255, .9) inset;
}

.login-card-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
}

.login-card-brand img {
  display: block;
  width: min(188px, 56vw);
  height: auto;
  margin: 0 auto;
}

.login-card-head {
  text-align: center;
  margin-bottom: 2px;
}

.login-card-head h1 {
  margin: 0;
  color: #0b2f52;
  font-size: clamp(1.55rem, 3.4vw, 1.85rem);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-alert {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #bdccda;
  border-left-width: 4px;
  border-radius: var(--login-control-radius, 14px);
  background: #fff;
  color: var(--af-premium-ink, #082f58);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.4;
}

.login-alert.is-error {
  border-left-color: #a8333a;
  background: #fff0f1;
  color: #7b2228;
}

.login-alert.is-warning {
  border-left-color: #9a5b00;
  background: #fff7e7;
  color: #704000;
}

.login-field {
  display: grid;
  gap: 7px;
  color: #173b5d;
  font-size: .86rem;
  font-weight: 800;
}

.login-control {
  position: relative;
  display: block;
}

.login-control-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #8aa0b5;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.login-field input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0 14px 0 44px;
  border: 1px solid #c5d5e3;
  border-radius: var(--login-control-radius, 14px);
  color: var(--af-premium-ink, #082f58);
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.login-password input {
  padding-right: 48px;
}

.login-field input::placeholder {
  color: #8aa0b5;
  font-weight: 500;
}

.login-field input:hover:not(:disabled) {
  border-color: #9bb8cf;
}

.login-field input:focus {
  border-color: var(--af-premium-accent, #075fae);
  box-shadow: 0 0 0 4px rgba(7, 95, 174, .12);
  background: #fff;
}

.login-field:focus-within .login-control-icon {
  stroke: var(--af-premium-accent, #075fae);
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: calc(var(--login-control-radius, 14px) - 2px);
  color: #7a90a8;
  background: transparent;
  cursor: pointer;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: var(--af-premium-ink, #082f58);
  background: rgba(7, 95, 174, .06);
}

.login-password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-password-toggle .eye-off {
  display: none;
}

.login-password-toggle.is-visible .eye-open {
  display: none;
}

.login-password-toggle.is-visible .eye-off {
  display: block;
}

.login-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.login-forgot {
  color: var(--af-premium-accent, #075fae);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.login-forgot:hover,
.login-forgot:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border: 1px solid #1265d8;
  border-radius: var(--login-control-radius, 14px);
  color: #fff;
  background: linear-gradient(180deg, #1a73e8 0%, #1265d8 100%);
  font: inherit;
  font-size: .98rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(18, 101, 216, .22);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.login-submit:hover:not(:disabled),
.login-submit:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #1766d4 0%, #0f58bf 100%);
  border-color: #0f58bf;
  box-shadow: 0 12px 26px rgba(18, 101, 216, .28);
}

.login-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

.login-links {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  text-align: center;
}

.login-links a {
  color: var(--af-premium-accent, #075fae);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.login-links a:hover,
.login-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-meta {
  margin: 2px 0 0;
  padding-top: 14px;
  border-top: 1px solid #e3ebf4;
  color: var(--af-premium-muted, #5d7188);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.login-discover {
  margin: -10px 0 0;
  text-align: center;
}

.login-legal {
  margin: -6px 0 0;
  color: var(--af-premium-muted, #5d7188);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.login-legal a {
  color: var(--af-premium-accent, #075fae);
  font-weight: 800;
  text-decoration: none;
}

.login-legal a:hover,
.login-legal a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-discover a {
  color: var(--af-premium-accent, #075fae);
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
}

.login-discover a:hover,
.login-discover a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 480px) {
  .login-page {
    align-items: start;
    padding: 16px 14px;
  }

  .login-geometry {
    opacity: .85;
  }

  .login-card {
    padding: 24px 18px 20px;
  }

  .login-field input,
  .login-submit {
    min-height: 48px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit,
  .login-field input {
    transition: none;
  }
}
