*{box-sizing:border-box}
:root{color-scheme:light;font-family:"Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,sans-serif}
body{margin:0;min-width:320px;background:#f6f8f7;color:#17211d}
button,input{font:inherit}
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(390px,46%) 1fr}

/* ---------- pannello verde ---------- */
.login-story{
  position:relative;overflow:hidden;display:flex;flex-direction:column;padding:48px clamp(38px,6vw,88px);
  color:#fff;background:
    radial-gradient(circle at 82% 14%,rgba(38,213,142,.30),transparent 32%),
    radial-gradient(circle at -5% 100%,rgba(28,155,105,.26),transparent 36%),
    linear-gradient(145deg,#123a2b,#08170f 78%);
}

/* illustrazione: bolle di chat + rete di puntini */
.story-art{
  position:absolute;top:-38px;right:-58px;width:min(560px,72%);height:auto;
  z-index:0;opacity:.9;pointer-events:none;
}
.story-art .art-links{stroke:rgba(255,255,255,.12);stroke-width:1.5;fill:none}
.story-art .art-nodes circle{fill:#28d58e;opacity:.55}
.story-art .art-nodes circle:nth-child(4){opacity:.8;filter:drop-shadow(0 0 10px rgba(40,213,142,.7))}
.story-art .art-bubble path{fill:rgba(255,255,255,.055);stroke:rgba(255,255,255,.16);stroke-width:1.5}
.story-art .art-bubble line{stroke:rgba(255,255,255,.2);stroke-width:3;stroke-linecap:round}
.story-art .art-bubble-a{filter:drop-shadow(0 18px 40px rgba(0,0,0,.28))}
.story-art .art-bubble-b path{fill:rgba(40,213,142,.14);stroke:rgba(40,213,142,.34)}

.story-brand{position:relative;z-index:1;width:132px;height:31px;overflow:hidden}
.story-brand img,.mobile-brand img{display:block;width:132px;height:auto;filter:brightness(0) invert(1)}
.story-copy{position:relative;z-index:1;margin:auto 0 42px}
.eyebrow{display:block;margin-bottom:18px;color:#66d7a8;font-size:11px;font-weight:800;letter-spacing:.16em}
.story-copy h1{margin:0;font-size:clamp(38px,4vw,62px);line-height:1.02;letter-spacing:-.045em}
.story-copy p{max-width:510px;margin:25px 0 0;color:#c3d5cc;font-size:16px;line-height:1.65}
.story-points{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:11px}
.story-points>div{
  display:flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid rgba(255,255,255,.12);
  border-radius:999px;background:rgba(255,255,255,.06);color:#dbeae2;font-size:12px;font-weight:500;
  backdrop-filter:blur(6px)
}
.story-points i{width:6px;height:6px;border-radius:50%;background:#28d58e;box-shadow:0 0 0 4px rgba(40,213,142,.14)}
.story-foot{position:relative;z-index:1;margin:28px 0 0;color:#6f9182;font-size:10px;letter-spacing:.06em}

/* ---------- area login ---------- */
.login-area{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:42px 24px}
.mobile-brand{display:none}
.login-card{width:min(100%,430px);padding:42px 42px 34px;border:1px solid #e0e7e3;border-radius:22px;background:#fff;box-shadow:0 22px 70px rgba(25,52,41,.1)}
.welcome-mark{
  display:grid;place-items:center;width:42px;height:42px;margin-bottom:22px;border-radius:12px;
  background:#def8ed;color:#087849;font-size:19px;font-weight:800
}
.login-card h2{margin:0;font-size:28px;letter-spacing:-.035em}
.subtitle{margin:8px 0 28px;color:#7a8882;font-size:13px}
form label{display:block;margin:17px 0 7px;color:#37463f;font-size:11px;font-weight:700}
.control{position:relative}
.control>svg{
  position:absolute;left:13px;top:50%;width:18px;height:18px;transform:translateY(-50%);
  fill:none;stroke:#84938c;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none
}
.control input{
  width:100%;height:48px;padding:0 13px 0 42px;border:1px solid #d9e1dd;border-radius:11px;
  outline:none;background:#fbfcfb;color:#17211d;font-size:13px;transition:.18s
}
.control input:focus{border-color:#18b977;background:#fff;box-shadow:0 0 0 3px rgba(24,185,119,.12)}
.control input::placeholder{color:#a6b0ab}
.control input[type=password],.control input[type=text]{padding-right:68px}
.show-password{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;
  padding:7px;color:#4e655b;font-size:10px;font-weight:700;cursor:pointer
}
.login-error{display:none;margin-top:13px;padding:9px 11px;border-radius:9px;background:#fff0f0;color:#b52c2c;font-size:11px;line-height:1.4}
.login-error.show{display:block}
.submit{
  width:100%;height:49px;margin-top:20px;border:0;border-radius:11px;background:#111c17;color:#fff;
  display:flex;align-items:center;justify-content:center;gap:9px;font-size:13px;font-weight:700;cursor:pointer;
  transition:transform .15s,background .15s,opacity .15s
}
.submit:hover{background:#0b8c57;transform:translateY(-1px)}
.submit:disabled{opacity:.65;cursor:wait;transform:none}
.submit svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.submit.loading svg{animation:loginPulse .8s ease-in-out infinite alternate}
@keyframes loginPulse{to{transform:translateX(4px);opacity:.55}}
.security-note{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:23px;color:#87938e;font-size:10px}
.security-note svg{width:15px;height:15px;fill:none;stroke:#6c8278;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.login-help{margin:20px 0 0;color:#8b9892;font-size:10px}

/* ---------- MOBILE: il verde resta anche sul telefono ---------- */
@media(max-width:760px){
  .login-shell{display:block;min-height:100svh}

  /* niente più display:none: il pannello verde diventa la testata */
  .login-story{
    min-height:auto;padding:34px 26px 30px;
  }
  .login-story .story-copy{margin:20px 0 22px}
  .story-copy h1{font-size:clamp(30px,8vw,40px)}
  .story-copy p{font-size:14px;margin-top:14px}
  .story-art{width:min(320px,88%);top:-30px;right:-46px;opacity:.8}
  .story-foot{display:none}
  .story-points{gap:8px}
  .story-points>div{font-size:11px;padding:7px 11px}

  /* l'area login sale a coprire il fondo, sfondo chiaro, card in evidenza */
  .login-area{min-height:auto;padding:26px 18px 34px;background:#f6f8f7}
  .mobile-brand{display:none}
  .login-card{
    width:min(100%,430px);margin:-42px auto 0;padding:30px 24px 26px;border-radius:20px;
    box-shadow:0 20px 50px rgba(8,23,15,.18)
  }
  .login-card h2{font-size:24px}
}

@media(max-width:400px){
  .login-story{padding:28px 20px 26px}
  .story-points>div:nth-child(3){display:none}
}
