    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg: #050508;
      --card: rgba(20, 20, 28, 0.7);
      --card-border: rgba(255, 255, 255, 0.06);
      --text: #ffffff;
      --text-dim: #8b8b96;
      --text-muted: #5e5e6a;
      --input-bg: rgba(15, 15, 22, 0.6);
      --input-border: rgba(255, 255, 255, 0.08);
      --input-border-focus: rgba(139, 92, 246, 0.4);
    }

    html, body { height: 100%; }
    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg);
      color: var(--text);
      overflow: hidden;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
      background-size: 22px 22px;
      pointer-events: none;
      z-index: 0;
    }

    .ambient {
      position: fixed;
      pointer-events: none;
      z-index: 0;
      border-radius: 50%;
      filter: blur(120px);
      opacity: 0.18;
    }
    .ambient.a1 { width: 800px; height: 800px; top: -200px; left: -200px; background: #8b3bff; }
    .ambient.a2 { width: 900px; height: 900px; bottom: -300px; right: -200px; background: #67edd1; }
    .ambient.a3 { width: 600px; height: 600px; top: 30%; left: 40%; background: #ec4899; opacity: 0.08; }

    .login-wrapper {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 440px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 32px;
    }

    .brand { display: flex; flex-direction: column; align-items: center; gap: 16px; }
    .brand img {
      width: 72px; height: 72px; border-radius: 16px; object-fit: cover;
      box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
    }
    .brand-text { text-align: center; }
    .brand-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; text-wrap: balance; }
    .brand-subtitle { font-size: 15px; color: var(--text-dim); font-weight: 400; }

    .card {
      width: 100%;
      background: var(--card);
      border: 1px solid var(--card-border);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-radius: 20px;
      padding: 32px;
      box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
    }

    .card-intro {
      text-wrap: balance;
      font-size: 14px;
      color: var(--text-dim);
      line-height: 1.5;
    }

    .form-group { margin-bottom: 24px; }

    label {
      display: block; font-size: 14px; font-weight: 600;
      color: var(--text); margin-bottom: 10px;
    }

    .input-wrapper { position: relative; }

    .input-icon {
      position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
      width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
    }

    input[type="email"] {
      width: 100%; height: 48px; padding: 0 16px 0 48px;
      font-family: inherit; font-size: 15px; color: var(--text);
      background: var(--input-bg); border: 1px solid var(--input-border);
      border-radius: 12px; outline: none;
      transition: border-color 0.15s, background 0.15s;
    }
    input::placeholder { color: var(--text-muted); }
    input:focus { border-color: var(--input-border-focus); background: rgba(15, 15, 22, 0.85); }

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
      -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
      -webkit-text-fill-color: var(--text) !important;
      transition: background-color 9999s ease-in-out 0s;
    }

    .btn-submit {
      width: 100%; height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px;
      font-family: inherit; font-size: 15px; font-weight: 600; color: white;
      background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
      border: none; border-radius: 12px; cursor: pointer;
      transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s;
      box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    }
    .btn-submit:hover { box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45); }
    .btn-submit:active { transform: translateY(1px); }
    .btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

    .back-link {
      display: block; text-align: center; margin-top: 20px;
      font-size: 14px; color: var(--text-dim);
      text-decoration: none; transition: color 0.15s;
    }
    .back-link:hover { color: var(--text); }

    .message {
      margin-bottom: 20px; padding: 12px 16px;
      border-radius: 10px; font-size: 14px; display: none; text-wrap: balance; line-height: 1.5;
    }
    .message.error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; display: block; }
    .message.success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: #6ee7b7; display: block; }

    /* g25fp2: intro e messaggio stanno nella stessa cella: la card ha da subito l'altezza del piu' alto, il messaggio non sposta niente */
    .slot { display: grid; margin-bottom: 24px; }
    .slot > * { grid-area: 1 / 1; margin: 0; }
    .slot .card-intro { align-self: start; }
    .slot .message { display: block; visibility: hidden; align-self: start; }
    .slot .message.error, .slot .message.success { visibility: visible; }
    .slot .message.sizer { visibility: hidden; pointer-events: none; }
    .slot.has-msg .card-intro { visibility: hidden; }

    .spinner {
      width: 18px; height: 18px;
      border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: white;
      border-radius: 50%; animation: spin 0.6s linear infinite; display: none;
    }
    .btn-submit.loading .spinner { display: block; }
    .btn-submit.loading .label { opacity: 0.7; }
    @keyframes spin { to { transform: rotate(360deg); } }

    @media (max-width: 480px) {
      .card { padding: 24px; }
      .brand-title { font-size: 24px; }
      .brand img { width: 64px; height: 64px; }
    }
