/* ══════════════════════════════════════════════════════════════
   LOGIN-LIQUID — CSS specifico della pagina di login
   ──────────────────────────────────────────────────────────────
   Reference: mockups/templates/t01-login.html (liquid-layout)
   Port con griglia Bootstrap: mockups/t01-login-bootstrap.html
   Dipendenze (da caricare PRIMA di questo file):
     1. bootstrap@5.3 (solo CSS, per la griglia .row / .col-*)
     2. liquid-glass.css (tokens :root e classi componenti del DS:
        .form-field, .field-wrapper, .field-icon, .form-remember,
        .eye-toggle, .btn-login, .btn-sso, .required,
        .form-field-msg, .form-field-error)
   ══════════════════════════════════════════════════════════════ */

/* Override del body flex del design system per pagina standalone */
html, body { overflow: auto; }
body { display: block; min-height: 100vh; background: var(--field-bg); }
body::before, body::after { display: none; }

/* Wrapper applicato al .row Bootstrap */
.login-wrap { min-height: 100vh; background: var(--field-bg); }

/* ─── LEFT — branding panel ─── */
.login-left {
  background: #062b31;
  color: #fff;
  padding: 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-geo { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.login-geo svg { position: absolute; right: -60px; top: -40px; width: 600px; height: 600px; opacity: .055; }
.login-left::before {
  content: ''; position: absolute;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,149,169,.18) 0%, transparent 70%);
  bottom: -80px; left: -60px; pointer-events: none;
}
.login-left::after {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,203,5,.08) 0%, transparent 70%);
  top: 40%; right: 60px; pointer-events: none;
}

.login-logo { display: flex; align-items: center; gap: 11px; z-index: 1; }
.login-logo svg { width: 38px; height: 34px; }
.login-logo .lf-big { font-size: 20px; font-weight: 900; color: #fff; letter-spacing: -.5px; }
.login-logo .lm-big { font-size: 20px; font-weight: 400; color: var(--teal-2); letter-spacing: -.3px; }

.login-hero { z-index: 1; max-width: 420px; }
.login-hero-tag {
  font-size: 10.5px; font-weight: 900; letter-spacing: 1.2px;
  text-transform: uppercase; color: rgba(0,149,169,.8);
  margin-bottom: 16px;
}
.login-hero-h {
  font-size: 36px; font-weight: 900; color: #fff;
  letter-spacing: -.8px; line-height: 1.1;
  margin-bottom: 16px;
}
.login-hero-h span { color: var(--teal-2); }
.login-hero-p {
  font-size: 14px; color: rgba(255,255,255,.55);
  line-height: 1.65; margin-bottom: 36px;
}

.login-features { display: flex; flex-direction: column; gap: 12px; }
.login-feat {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.login-feat-ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,130,144,.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.login-feat-ico svg {
  width: 15px; height: 15px;
  stroke: var(--teal-2); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.login-feat-nm { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); }
.login-feat-sub { font-size: 11.5px; color: rgba(255,255,255,.4); margin-top: 1px; }

.login-left-foot { z-index: 1; font-size: 11.5px; color: rgba(255,255,255,.28); }
.login-left-foot a { color: rgba(0,149,169,.7); text-decoration: none; }
.login-left-foot a:hover { color: var(--teal-2); }

/* ─── RIGHT — form panel ─── */
.login-right {
  width: 480px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
  box-shadow: -8px 0 40px rgba(6,43,49,.1);
  position: relative;
  overflow-y: auto;
}

.login-form-tag {
  font-size: 10.5px; font-weight: 900; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--teal);
  margin-bottom: 10px;
}
.login-form-h {
  font-size: 26px; font-weight: 900; color: var(--ink);
  letter-spacing: -.6px; margin-bottom: 6px;
}
.login-form-sub {
  font-size: 13px; color: var(--ink-4); margin-bottom: 28px;
  line-height: 1.5;
}

/* Error alert bar (login fallito / input incompleti) — renderizzata sopra al form */
.form-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.45;
  margin-bottom: 20px;
}
.form-alert svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.form-alert-error {
  background: rgba(236,98,126,.08);
  border: 1px solid rgba(236,98,126,.25);
  color: var(--red);
  font-weight: 600;
}

.login-form-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.login-forgot {
  font-size: 12.5px; font-weight: 600; color: var(--teal);
  text-decoration: none; transition: color .12s;
}
.login-forgot:hover { color: var(--teal-2); text-decoration: underline; }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  color: rgba(0,130,144,.2);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(0,130,144,.1);
}

.login-foot {
  margin-top: 28px; text-align: center;
  font-size: 12.5px; color: var(--ink-4);
}
.login-foot a { color: var(--teal); font-weight: 600; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }

.login-version {
  position: absolute; bottom: 24px; right: 28px;
  font-size: 10px; color: rgba(0,130,144,.3); font-weight: 500;
}

/* Stack verticale dei due bottoni SSO */
.btn-sso + .btn-sso { margin-top: 10px; }

/* Loading state sul btn-login */
.btn-login.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}
.btn-login.is-loading::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─── stessi breakpoint di t01-login.html ─── */
/* Tablet (768–1199.98): right panel più stretto, left con padding ridotto */
@media (max-width: 1199.98px) {
  .login-right { width: 420px; padding: 48px 40px; }
  .login-left { padding: 40px; }
  .login-hero-h { font-size: 30px; }
}

/* Mobile (<768): stack verticale, features e foot nascosti */
@media (max-width: 767.98px) {
  .login-wrap { min-height: auto; }
  .login-left {
    padding: 32px 24px 80px;
    flex: none;
  }
  .login-left-foot { display: none; }
  .login-features { display: none; }
  .login-hero { max-width: 100%; margin-bottom: 0; }
  .login-hero-p { margin-bottom: 0; }
  .login-hero-h { font-size: 26px; letter-spacing: -.4px; }
  .login-right {
    width: auto;
    padding: 32px 24px 40px;
    border-radius: 24px 24px 0 0;
    margin-top: -24px;
    box-shadow: 0 -8px 30px rgba(6,43,49,.12);
    z-index: 2;
  }
  .login-form-h { font-size: 22px; }
  .login-version { bottom: 16px; right: 20px; }
}
