/* ============================================================
   Login — student: split (hero | form), admin: centered only
   ============================================================ */

/* ---------- Student shell (split) ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--bg);
}
/* Admin shell: solo centered, niente split */
.login-page.admin-login-page {
  grid-template-columns: 1fr;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 100px;
}

/* ---------- Student hero (left) ---------- */
.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top left, rgba(200, 16, 46, .14), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(0, 140, 69, .12), transparent 60%),
    var(--bg-soft);
}
[data-theme="dark"] .login-hero {
  background:
    radial-gradient(ellipse at top left, rgba(230, 58, 82, .22), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(46, 194, 126, .18), transparent 60%),
    linear-gradient(135deg, #14161b 0%, #0c0d10 100%);
}
/* Round logo come background decoration */
.login-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  background-image: url('/assets/img/logo-round.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.login-hero-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
}
.login-hero h1 {
  font-size: clamp(1.85rem, 3.6vw, 2.7rem);
  margin-bottom: 18px;
  line-height: 1.1;
}
.login-hero h1 em { font-style: italic; color: var(--accent); }
.login-hero .lede {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 480px;
  margin-bottom: 28px;
}
.login-hero ul.features {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
}
.login-hero ul.features li {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text-soft);
  font-size: .95rem;
}
.login-hero ul.features svg {
  flex-shrink: 0; color: var(--accent); margin-top: 2px;
}

/* ---------- Form side (right, student) ---------- */
.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background: var(--bg);
}

/* ---------- Form (shared) ---------- */
.login-form {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg), var(--card-glow);
  position: relative;
}
.login-form.admin-form { max-width: 380px; }
.login-form::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px; height: 3px;
  background: linear-gradient(90deg, var(--it-red), var(--it-green));
  border-radius: 0 0 4px 4px;
}
.login-form .logo {
  width: 84px; height: 84px;
  margin: 4px auto 18px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .25);
}
.login-form h2 {
  text-align: center; margin-bottom: 6px;
  font-family: var(--font-serif);
}
.login-form .sub {
  text-align: center; color: var(--text-muted);
  margin-bottom: 24px; font-size: .92rem;
}
.login-form .field { margin-bottom: 16px; }
.login-form .demo-creds {
  margin-top: 18px; padding: 12px 14px;
  background: var(--info-soft);
  border: 1px solid rgba(29, 109, 179, .2);
  border-radius: var(--radius);
  font-size: .8rem; color: var(--text-soft); line-height: 1.5;
}
.login-form .demo-creds b { color: var(--text); }
.login-form .footer-note {
  text-align: center; color: var(--text-muted);
  font-size: .8rem; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.login-form .back-link {
  text-align: center; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.login-form .back-link a {
  color: var(--text-soft); text-decoration: underline; font-size: .85rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  .login-hero { padding: 32px 24px 24px; }
  .login-hero h1 { font-size: 1.5rem; }
  .login-hero .lede { display: none; }
  .login-hero ul.features { display: none; }
  .login-form-side {
    padding: 0 14px 40px;
    align-items: flex-start;
  }
  .login-form {
    padding: 28px 22px;
    margin-top: -32px;
  }
  .login-form .logo { width: 72px; height: 72px; margin-bottom: 14px; }
  /* Admin: sempre full-width centered */
  .login-page.admin-login-page { padding: 24px 14px 60px; }
}
