.login-view {
  min-height: calc(100vh - 90px);
  background: linear-gradient(135deg, #eef6ff, #fff 55%, #fff3e8);
}

.login-shell {
  min-height: calc(100vh - 90px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding: 70px clamp(24px, 8vw, 130px);
}

.login-story h1 {
  margin-top: 22px;
  font-size: clamp(3rem, 5.7vw, 6.5rem);
  line-height: .94;
  letter-spacing: -.075em;
}

.login-story h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--green); }
.login-story > p:last-of-type { max-width: 620px; margin-top: 28px; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.login-benefits { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.login-benefits span { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); font-size: .82rem; font-weight: 700; }
.login-card { max-width: 480px; width: 100%; justify-self: end; padding: 38px; border: 1px solid var(--line); border-radius: 30px; background: rgba(255,255,255,.96); box-shadow: 0 32px 90px rgba(5,35,79,.16); }
.login-card > img {
  display: block;
  width: 310px;
  max-width: none;
  height: auto;
  margin: -72px 0 -4px -38px;
}
.login-card h2 { margin-top: 9px; font-size: 2.3rem; letter-spacing: -.05em; }
.login-card > p:not(.section-kicker) { margin-top: 8px; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 15px; margin-top: 26px; }
.login-form .button { width: 100%; margin-top: 3px; }
.login-error { min-height: 20px; color: #b42d20; font-size: .85rem; font-weight: 700; }
.demo-access { display: grid; gap: 4px; margin-top: 22px; padding: 15px; border-radius: 14px; background: var(--cream); color: var(--muted); font-size: .82rem; }
.demo-access strong { color: var(--ink); margin-bottom: 2px; }
.login-recovery { justify-self: center; border: 0; background: transparent; color: var(--green); font-weight: 750; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.login-security-note { margin-top: 20px; padding: 14px 16px; border-radius: 14px; background: var(--cream); color: var(--muted); font-size: .82rem; line-height: 1.5; }
.reserved-actions { display: flex; align-items: center; gap: 10px; }
.reserved-link { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.workspace-brand { display: block; width: 190px; height: auto; margin-bottom: 24px; }
.report-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.report-brand img { width: 155px; height: auto; }
.report-brand span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer-signature { text-align: center; }
.footer-signature small { display: block; margin-top: 7px; color: #dbe8ff; font-size: .75rem; letter-spacing: .025em; }
.footer-links { display: flex; gap: 18px; }

/* Area riservata: trattamento del marchio EnergiAmo */
.site-header {
  background: rgba(245, 249, 255, .96);
  border-bottom-color: #dce8f7;
  box-shadow: 0 8px 28px rgba(0, 59, 143, .055);
}
.site-header .official-logo {
  position: relative;
  width: 184px;
  height: 68px;
  overflow: hidden;
  flex: 0 0 auto;
}
.site-header .official-logo img {
  position: absolute;
  width: 238px;
  max-width: none;
  height: auto;
  left: -29px;
  top: -54px;
}
.app-view,
.simulator-view { background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%); }
.workspace-brand { width: 340px; max-width: 82vw; }
body[data-route="simulatore"] .site-header .official-logo,
body[data-route="crm"] .site-header .official-logo { visibility: hidden; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-card { justify-self: start; }
  .login-story h1 { font-size: 3.8rem; }
}

@media (max-width: 680px) {
  .login-shell { padding: 42px 18px; }
  .login-story h1 { font-size: 3rem; }
  .login-card { padding: 25px; }
  .reserved-actions { align-items: stretch; flex-direction: column-reverse; }
  .site-header { min-height: 84px; padding: 10px 18px; }
  .site-header .official-logo { width: 170px; height: 64px; }
  .site-header .official-logo img { width: 220px; height: auto; left: -27px; top: -50px; }
  .app-view, .simulator-view { padding-top: 28px; }
  .app-hero > div:first-child,
  .simulator-heading > div:first-child { width: 100%; }
  .workspace-brand { width: min(270px, 78vw); margin: 0 auto 34px; }
  .login-card > img { width: 285px; margin: -66px 0 -2px -34px; }
  .report-brand { align-items: flex-start; flex-direction: column; }
  .footer-signature { text-align: left; }
  .footer-links { flex-wrap: wrap; }
}

@media print {
  .report-brand { display: flex !important; }
}
