:root {
  --bg: #060d18;
  --bg2: #0b1628;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f2f6ff;
  --muted: #9fb0c9;
  --accent: #4be39b;
  --accent2: #3ab3ff;
  --radius: 28px;
  --max: 1180px;
  --header-h: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(58, 179, 255, 0.25), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(75, 227, 155, 0.2), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #071224 50%, #050c16 100%);
  overflow-x: clip;
}

/* ─── Anchor fix: l'header sticky non copre i titoli ─── */
[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: auto;
}

/* ─── HEADER ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(6, 13, 24, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 20;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--header-h);
  gap: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

.logo-accent {
  color: var(--accent);
}

.radar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(58, 179, 255, 0.7);
  position: relative;
  flex: 0 0 auto;
}

.radar::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 2px solid rgba(75, 227, 155, 0.7);
}

.radar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 45%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform-origin: left center;
  animation: spin 4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(-30deg); }
  to   { transform: rotate(330deg); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--text);
}

/* Il btn dentro la nav non deve ereditare colore e display dei link normali */
.nav-links a.btn {
  color: #052015;
  display: inline-flex;
  text-align: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── BOTTONI ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #8affc8);
  color: #052015;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.88;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Focus visibile per accessibilità tastiera */
.btn:focus-visible,
.nav-links a:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.btn:focus-visible {
  border-radius: 999px;
}

/* ─── HAMBURGER ───────────────────────────────────────── */

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-menu {
  padding-bottom: 14px;
}

.mobile-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
}

/* ─── HERO ────────────────────────────────────────────── */

.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden; /* Fix: blob decorativi non causano scroll orizzontale */
}

.hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 227, 155, 0.15), transparent 70%);
  left: -200px;
  top: -200px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 179, 255, 0.15), transparent 70%);
  right: -200px;
  bottom: -200px;
  pointer-events: none;
}

.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 2;
}

/* Radar decorativo di sfondo */
.hero-radar {
  position: absolute;
  left: 48%;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(58, 179, 255, 0.1);
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

.hero-radar::before {
  content: "";
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px solid rgba(75, 227, 155, 0.1);
  box-shadow: inset 0 0 60px rgba(58, 179, 255, 0.04);
}

.hero-radar::after {
  content: "";
  position: absolute;
  inset: 120px;
  border-radius: 50%;
  border: 1px solid rgba(58, 179, 255, 0.08);
}

.hero-radar-needle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}

.hero-radar-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(75, 227, 155, 0.6));
  transform-origin: left center;
  animation: spin 6s linear infinite;
}

/* Blip — auto rilevate sul radar */
.radar-blip {
  position: absolute;
  left: var(--bx);
  top:  var(--by);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(75, 227, 155, 0.4);
  transform: translate(-50%, -50%);
  animation: blip-pulse 3s ease-in-out var(--bd) infinite;
}

@keyframes blip-pulse {
  0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.7); }
  40%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(75, 227, 155, 0.5); }
  60%       { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(75, 227, 155, 0.1);
  border: 1px solid rgba(75, 227, 155, 0.25);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 5.8rem);
  margin: 0 0 22px;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.hero p {
  color: var(--muted);
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.text-green { color: var(--accent); }
.text-blue  { color: var(--accent2); }

/* ─── SEZIONI ─────────────────────────────────────────── */

.section {
  padding: 80px 0;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max), calc(100% - 32px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

#venditore::before {
  background: linear-gradient(90deg, transparent, rgba(58, 179, 255, 0.25), transparent);
}

#acquirente::before {
  background: linear-gradient(90deg, transparent, rgba(75, 227, 155, 0.25), transparent);
}

#match::before {
  background: linear-gradient(90deg, transparent, rgba(58, 179, 255, 0.15), rgba(75, 227, 155, 0.15), transparent);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
}

#venditore h2::after {
  background: var(--accent2);
}

#acquirente h2::after {
  background: var(--accent);
}

.section-intro {
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 40px;
}

/* ─── GRID (3 card) ───────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  counter-reset: card-num;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  counter-increment: card-num;
  overflow: hidden;
  position: relative;
}

.card::before {
  content: counter(card-num);
  position: absolute;
  top: -10px;
  right: 14px;
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  user-select: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

#venditore .card {
  border-top: 2px solid rgba(58, 179, 255, 0.4);
}
#venditore .card:hover {
  border-color: rgba(58, 179, 255, 0.7);
  box-shadow: 0 12px 40px rgba(58, 179, 255, 0.12);
}

#acquirente .card {
  border-top: 2px solid rgba(75, 227, 155, 0.4);
}
#acquirente .card:hover {
  border-color: rgba(75, 227, 155, 0.7);
  box-shadow: 0 12px 40px rgba(75, 227, 155, 0.12);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  margin: 0;
}

/* ─── STEPS (4 step) ──────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:not(:last-child)::after {
  content: "›";
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--muted);
  z-index: 10;
  line-height: 1;
}

.step:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(58, 179, 255, 0.1);
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 12px;
  color: #052015;
  position: relative;
  z-index: 2;
}

.step p {
  color: var(--muted);
  margin: 0;
}

.section-cta {
  margin-top: 32px;
}

/* ─── CTA BOX ─────────────────────────────────────────── */

.cta-box {
  background: linear-gradient(135deg, rgba(75, 227, 155, 0.15), rgba(58, 179, 255, 0.12));
  border: 1px solid rgba(75, 227, 155, 0.2);
  padding: 50px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: 0 0 60px rgba(75, 227, 155, 0.06), 0 0 60px rgba(58, 179, 255, 0.06);
}

.cta-box h2 {
  margin-bottom: 8px;
}

.cta-box p {
  color: var(--muted);
  margin: 0;
}

/* ─── FOOTER ──────────────────────────────────────────── */

.site-footer {
  padding: 60px 0 32px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid;
  border-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent) 1;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.footer-brand .logo {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 10px 0 0;
  max-width: 260px;
  line-height: 1.5;
}

.footer-nav,
.footer-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.footer-nav a:hover { color: var(--text); }

.footer-auth-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.15s;
  opacity: 0.8;
}

.footer-auth-link:hover { opacity: 1; }
.footer-auth-link--acquirente { color: var(--accent); }
.footer-auth-link--venditore  { color: var(--accent2); }

.btn-sm {
  padding: 9px 18px;
  font-size: 0.85rem;
  margin-top: 4px;
  align-self: flex-start;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: rgba(159, 176, 201, 0.6);
}

/* ─── BREAKPOINT 980px (tablet) ───────────────────────── */

@media (max-width: 980px) {
  .nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .desktop-nav,
  .desktop-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .hero-content {
    max-width: 100%;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px;
  }
}

/* ─── USERNAME IN NAV ─────────────────────────────────── */

.nav-username {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ─── AMPA PAGE WRAP (dashboard + conversation) ───────── */

.ampa-page-wrap {
  min-height: calc(100vh - var(--header-h) - 80px);
  padding: 32px 0 80px;
}

/* ─── AUTH PAGE ───────────────────────────────────────── */

.auth-page {
  display: flex;
  align-items: flex-start;
  padding-top: 60px;
}

.auth-box {
  width: min(460px, 100%);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  color: var(--text);
  text-decoration: none;
}

.auth-title {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  margin: 0 0 6px;
}

.auth-sub {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 0.92rem;
}

.auth-sub a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-sub a:hover {
  text-decoration: underline;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.form-group label small {
  font-weight: 400;
  opacity: 0.75;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent2);
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.role-option:hover,
.role-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(75, 227, 155, 0.08);
}

.form-check {
  font-size: 0.9rem;
  color: var(--muted);
}

.form-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.auth-link {
  text-align: center;
  margin: 0;
}

.auth-link a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.auth-link a:hover {
  color: var(--text);
}

.auth-notice {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.auth-notice p {
  margin: 0;
}

.auth-notice p + p {
  margin-top: 6px;
}

.auth-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: #ff9090;
}

/* ─── AUTH SPLIT ──────────────────────────────────────── */

.auth-body {
  background: var(--bg);
}

.auth-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 24px 40px;
}

.auth-split-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  min-height: 100vh;
}

/* ── Lato sinistro ── */

.auth-left {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 60px 60px;
}

.auth-left-inner {
  width: 100%;
  max-width: 420px;
}

.auth-left-inner h1 {
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.4;
  margin: 0 0 10px;
  white-space: nowrap;
}

.auth-left-inner > p {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

.auth-forgot {
  text-align: right;
  margin: -6px 0 0;
  font-size: 0.85rem;
}

.auth-forgot a {
  color: var(--accent);
  text-decoration: none;
}

.auth-forgot a:hover {
  text-decoration: underline;
}

.auth-switch {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 16px 0 0;
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-switch--venditore a {
  color: var(--accent2);
}

/* ── Lato destro ── */

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
}

.auth-right-inner {
  position: relative;
  z-index: 2;
  max-width: 360px;
  width: 100%;
}

.auth-right-inner h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.4;
  margin: 0 0 12px;
  white-space: nowrap;
}

.auth-right-inner > p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 24px;
}

.auth-right--venditore {
  background:
    radial-gradient(circle at 30% 20%, rgba(58, 179, 255, 0.35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(58, 179, 255, 0.2), transparent 50%),
    linear-gradient(160deg, #0b1e3d 0%, #071428 60%, #050e1e 100%);
}

.auth-right--acquirente {
  background:
    radial-gradient(circle at 30% 20%, rgba(75, 227, 155, 0.3), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(75, 227, 155, 0.18), transparent 50%),
    linear-gradient(160deg, #071f14 0%, #051910 60%, #040d09 100%);
}

.auth-right--benefits {
  background:
    radial-gradient(circle at 20% 30%, rgba(58, 179, 255, 0.12), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(75, 227, 155, 0.1), transparent 50%),
    linear-gradient(160deg, var(--bg2) 0%, var(--bg) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Badge ruolo ── */

.auth-highlight {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.auth-highlight--venditore {
  background: rgba(58, 179, 255, 0.18);
  color: var(--accent2);
  border: 1px solid rgba(58, 179, 255, 0.3);
}

.auth-highlight--acquirente {
  background: rgba(75, 227, 155, 0.18);
  color: var(--accent);
  border: 1px solid rgba(75, 227, 155, 0.3);
}

/* ── Bottone submit venditore (blu) ── */

.btn--venditore {
  background: linear-gradient(135deg, var(--accent2), #74d1ff);
  color: #031729;
}

/* ── Bottoni cross-link ── */

.auth-cross-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 12px;
}

.auth-cross-btn--venditore {
  border: 1.5px solid rgba(58, 179, 255, 0.5);
  color: var(--accent2);
  background: rgba(58, 179, 255, 0.08);
}

.auth-cross-btn--venditore:hover {
  background: rgba(58, 179, 255, 0.16);
  border-color: rgba(58, 179, 255, 0.7);
}

.auth-cross-btn--acquirente {
  border: 1.5px solid rgba(75, 227, 155, 0.5);
  color: var(--accent);
  background: rgba(75, 227, 155, 0.08);
}

.auth-cross-btn--acquirente:hover {
  background: rgba(75, 227, 155, 0.16);
  border-color: rgba(75, 227, 155, 0.7);
}

.auth-cross-section {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-cross-section > p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  margin: 0 0 12px;
}

.auth-right-tagline {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 16px 0 0;
  text-align: center;
}

/* ── Lista benefici ── */

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-benefits li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-benefit-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.auth-benefit-icon--blue {
  background: rgba(58, 179, 255, 0.15);
  border: 1px solid rgba(58, 179, 255, 0.25);
}

.auth-benefit-icon--green {
  background: rgba(75, 227, 155, 0.15);
  border: 1px solid rgba(75, 227, 155, 0.25);
}

.auth-benefit-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.auth-benefit-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(159, 176, 201, 0.3);
  border-radius: 999px;
  vertical-align: middle;
}

/* ── Schermata conferma password inviata ── */

.auth-pw-sent {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-pw-sent-icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.auth-pw-sent h1 {
  white-space: normal;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0;
}

.auth-pw-sent p {
  color: var(--muted);
  margin: 0;
  max-width: 340px;
}

.auth-pw-sent-note {
  font-size: 0.85rem !important;
  opacity: 0.7;
}

.auth-pw-sent .btn {
  margin-top: 8px;
  width: 100%;
}

/* ── Badge ruolo sopra h1 ── */

.auth-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.auth-role-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-role-badge--acquirente {
  background: rgba(75, 227, 155, 0.1);
  border: 1px solid rgba(75, 227, 155, 0.25);
  color: var(--accent);
}
.auth-role-badge--acquirente .auth-role-badge-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.auth-role-badge--venditore {
  background: rgba(58, 179, 255, 0.1);
  border: 1px solid rgba(58, 179, 255, 0.25);
  color: var(--accent2);
}
.auth-role-badge--venditore .auth-role-badge-dot {
  background: var(--accent2);
  box-shadow: 0 0 6px var(--accent2);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Input auth ── */

.auth-form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.auth-form-input::placeholder {
  color: var(--muted);
}

.auth-form-input:focus {
  border-color: rgba(75, 227, 155, 0.5);
}

.auth-form-input--blue:focus {
  border-color: rgba(58, 179, 255, 0.5);
}

/* Fix autofill browser */
.auth-form-input:-webkit-autofill,
.auth-form-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0b1628 inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

/* ── Input con icona ── */

.auth-input-group {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.auth-input-group .auth-form-input {
  padding-left: 44px;
}

/* ── Radar sfondo pannello sinistro ── */

.auth-left-radar {
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.auth-left-radar::before {
  content: "";
  position: absolute;
  inset: 90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-left-radar::after {
  content: "";
  position: absolute;
  inset: 180px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.auth-left-radar-needle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}

.auth-left--acquirente .auth-left-radar-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(75, 227, 155, 0.3));
  transform-origin: left center;
  animation: spin 8s linear infinite;
}

.auth-left--venditore .auth-left-radar-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(58, 179, 255, 0.3));
  transform-origin: left center;
  animation: spin 8s linear infinite;
}

.auth-left-inner {
  position: relative;
  z-index: 2;
  animation: auth-enter 0.5s ease both;
}

@keyframes auth-enter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Blip radar pannello sinistro */
.auth-right-blip {
  position: absolute;
  left: var(--bx);
  top: var(--by);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: blip-pulse 3s ease-in-out var(--bd) infinite;
  z-index: 1;
}

.auth-left--venditore .auth-right-blip {
  background: var(--accent2);
  box-shadow: 0 0 8px var(--accent2);
}

.auth-left--acquirente .auth-right-blip {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ── Decorazione radar ── */

.auth-deco-radar {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  bottom: -90px;
  right: -90px;
  pointer-events: none;
}

.auth-deco-radar::before {
  content: "";
  position: absolute;
  inset: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-deco-radar::after {
  content: "";
  position: absolute;
  inset: 110px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Responsive auth split 768px ── */

@media (max-width: 768px) {
  .auth-split-grid {
    grid-template-columns: 1fr;
  }

  .auth-left {
    padding: 90px 28px 40px;
  }

  .auth-right {
    padding: 40px 28px;
    min-height: 300px;
  }

  .auth-header {
    padding: 20px 28px;
  }

  .auth-left-inner h1,
  .auth-right-inner h2 {
    white-space: normal;
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
}

/* ─── BREAKPOINT 640px (mobile) ───────────────────────── */

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 20px));
  }

  .hero {
    padding: 64px 0 48px;
  }

  .hero p {
    font-size: 1.02rem;
  }

  .hero-actions,
  .section-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .btn,
  .btn-secondary {
    width: 100%;
  }

  .section {
    padding: 56px 0;
  }

  .cta-box {
    padding: 24px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .hero-radar {
    left: 10%;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-brand .logo {
    justify-content: center;
  }

  .footer-tagline {
    max-width: 100%;
  }

  .footer-nav,
  .footer-auth {
    align-items: center;
  }

  .btn-sm {
    align-self: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

/* ─── Social Links ───────────────────────────────────────────── */
.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(75, 227, 155, 0.2);
  background: rgba(75, 227, 155, 0.06);
  color: var(--accent);
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.social-link:hover {
  background: rgba(75, 227, 155, 0.14);
  border-color: rgba(75, 227, 155, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 227, 155, 0.18);
}

/* Footer social: margine top sotto tagline */
.footer-social {
  margin-top: 16px;
}

/* Mobile social: separatore sopra, centrato */
.mobile-social {
  justify-content: center;
  padding: 14px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

/* Powered by link nel footer */
.footer-powered {
  color: inherit;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-powered:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Footer policy link ── */

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-policy-link {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-policy-link:hover {
  color: var(--text);
}

.footer-policy-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ── Privacy Policy page ── */

.privacy-page {
  min-height: 80vh;
  padding: 60px 0 80px;
}

.privacy-content {
  max-width: 760px;
  margin: 0 auto;
}

.privacy-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 32px;
}

.privacy-body {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

.privacy-body h2 {
  color: var(--text);
  font-size: 1.1rem;
  margin: 32px 0 8px;
}

.privacy-body h3 {
  color: var(--text);
  font-size: 0.95rem;
  margin: 24px 0 6px;
}

.privacy-body a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-body a:hover {
  text-decoration: underline;
}

.privacy-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 16px 0;
}

.privacy-body th,
.privacy-body td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.privacy-body th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.privacy-cookie-reset {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.privacy-reset-btn {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 12px;
  color: var(--accent);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Cookie banner ── */

@keyframes cookie-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(6, 13, 24, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(75, 227, 155, 0.25);
  padding: 14px 20px;
  animation: cookie-slide-up 0.35s ease both;
}

.cookie-banner__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
  min-width: 200px;
  line-height: 1.5;
}

.cookie-banner__link {
  color: var(--accent);
  text-decoration: none;
  margin-left: 4px;
}

.cookie-banner__link:hover {
  text-decoration: underline;
}

.cookie-banner__btn {
  flex-shrink: 0;
  padding: 9px 24px;
  background: var(--accent);
  color: #060d18;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.cookie-banner__btn:hover {
  opacity: 0.85;
}

@media (max-width: 480px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cookie-banner__btn {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
}

/* ─── MY ACCOUNT ─────────────────────────────────────────────────────── */

.account-page-wrap {
  min-height: calc(100vh - var(--header-h));
  padding: 48px 0 80px;
}

.account-header {
  margin-bottom: 40px;
}

.account-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.account-subtitle {
  color: var(--muted);
  font-size: 1rem;
}

.account-notice {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.account-notice--success {
  background: rgba(75, 227, 155, 0.12);
  border: 1px solid rgba(75, 227, 155, 0.3);
  color: #4be39b;
}

.account-notice--error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #f87171;
}

.account-notice p {
  margin: 0;
}

.account-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.account-section-header {
  margin-bottom: 24px;
}

.account-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.account-section-desc {
  font-size: 0.875rem;
  color: var(--muted);
}

.account-form {}

.account-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.account-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-field-group--full {
  grid-column: 1 / -1;
}

.account-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.account-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text);
  width: 100%;
  transition: border-color 0.2s;
  font-family: inherit;
  outline: none;
}

.account-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(75, 227, 155, 0.1);
}

.account-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.account-field-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.account-back-link {
  margin-top: 32px;
  text-align: center;
}

.account-back-link a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.account-back-link a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .account-section {
    padding: 20px 16px;
  }

  .account-fields {
    grid-template-columns: 1fr;
  }

  .account-field-group--full {
    grid-column: 1;
  }
}

/* Zona pericolosa */
.account-section--danger {
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.04);
}
.account-section--danger .account-section-title {
  color: #f87171;
}
.btn--danger {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn--danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}
.btn--danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* ── AUTH: CHECKBOX CONSENSI ─────────────────────────────── */
.auth-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted, #9fb0c9);
  line-height: 1.4;
}
.auth-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent, #4be39b);
  cursor: pointer;
}
.auth-checkbox-label a {
  color: var(--accent, #4be39b);
  text-decoration: underline;
}
.auth-checkbox-label--optional {
  opacity: 0.75;
}

/* ── COOKIE BANNER: varianti pulsanti ────────────────────── */
.cookie-banner__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  flex-wrap: wrap;
}
.cookie-banner__btn--secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #f2f6ff;
}
.cookie-banner__btn--secondary:hover {
  background: rgba(255,255,255,0.1);
}
.cookie-banner__btn--link {
  background: transparent;
  border: none;
  color: var(--accent, #4be39b);
  text-decoration: underline;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-banner__btn--link:hover {
  color: var(--accent2, #3ab3ff);
}

/* ── AUTH FOOTER: link legali ────────────────────────────── */
.auth-footer-links {
  text-align: center;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.auth-footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted, #9fb0c9);
  text-decoration: none;
  opacity: 0.7;
}
.auth-footer-links a:hover {
  opacity: 1;
  color: var(--accent, #4be39b);
}
