:root {
  --pink:       #e6095b;
  --pink-dark:  #c0074d;
  --green:      #6fb741;
  --green-mid:  #6a7f49;
  --green-dark: #4d5b2e;
  --sage:       #90a384;
  --bg:         #f0f3ec;
  --panel:      #ffffff;
  --text:       #1f1f1f;
  --text-muted: #596156;
  --border:     #dae0d4;
  --shadow:     0 2px 10px rgba(0,0,0,0.07);
  --radius:     12px;

  /* Tinte chiare derivate */
  --pink-light:  #fce0ec;
  --green-light: #e2f0d6;
}

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

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Auth ===== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg) 0%, var(--green-light) 100%);
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 4px solid var(--pink);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 40px 38px;
}
.auth-card-wide { max-width: 440px; }

.auth-logo {
  height: 48px;
  object-fit: contain;
  margin-bottom: 22px;
}

.auth-card h1 {
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 26px;
}
.auth-error {
  background: var(--pink-light);
  border: 1px solid #f4b8cf;
  color: var(--pink-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 20px;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.auth-forgot {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }
.field-group input {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.field-group input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(230,9,91,.08); }

/* Scelta tipo account (registrazione) */
.role-choice { display: flex; gap: 10px; }
.role-card {
  flex: 1; display: flex; flex-direction: column; gap: 3px;
  padding: 12px 12px 13px; border: 1.5px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: border-color .15s, background .15s; position: relative;
}
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card:hover { border-color: var(--pink); }
.role-card.selected { border-color: var(--pink); background: rgba(230,9,91,.05); }
.role-ico { font-size: 22px; }
.role-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.role-desc { font-size: 11px; color: var(--text-muted); line-height: 1.35; }
@media (max-width: 480px) { .role-choice { flex-direction: column; } }

.auth-btn {
  margin-top: 4px;
  padding: 13px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.auth-btn:hover { background: var(--pink-dark); }
.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 22px;
}
.auth-switch a { color: var(--pink); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { padding: 32px 24px; }
}

/* ===== Bottoni globali ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary       { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-outline       { background: transparent; color: var(--pink); border: 1.5px solid var(--pink); }
.btn-outline:hover { background: var(--pink); color: #fff; }
.btn-ghost         { background: transparent; color: var(--text-muted); }
.btn-ghost:hover   { color: var(--text); }
.btn-lg            { padding: 14px 32px; font-size: 17px; border-radius: 10px; }

/* ===== Home ===== */
.home { display: flex; flex-direction: column; min-height: 100vh; }

.home::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--pink) 0%, var(--green) 100%);
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 108px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-logo { height: 92px; object-fit: contain; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: .02em;
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero h1 .accent { color: var(--pink); }
.hero-sub {
  font-size: 16.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Visual mockup cards */
.hero-visual { position: relative; height: 380px; }
.visual-card {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  padding: 18px 20px;
}
.vc-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.vc1 { top: 0; left: 0; width: 220px; }
.vc-bars { display: flex; gap: 8px; align-items: flex-end; height: 80px; margin-bottom: 10px; }
.vc-bar { flex: 1; border-radius: 4px 4px 0 0; }
.vc-date { font-size: 11px; color: var(--text-muted); }

.vc2 { top: 40px; right: 0; width: 240px; }
.vc-list { display: flex; flex-direction: column; gap: 10px; }
.vc-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.vc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.vc-dot.green { background: var(--green); }
.vc-dot.pink  { background: var(--pink); }

.vc3 { bottom: 20px; left: 40px; width: 170px; }
.vc-value { font-size: 32px; font-weight: 800; color: var(--text); margin: 8px 0 4px; }
.vc-delta { font-size: 12.5px; font-weight: 600; }
.vc-delta.up { color: var(--green-mid); }

/* Features */
.features {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 80px 48px;
}
.features h2 {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.features-intro {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  border-top: 3px solid transparent;
  transition: box-shadow .15s, border-top-color .15s;
}
.feature-card:hover               { box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.feature-card:nth-child(odd):hover  { border-top-color: var(--pink); }
.feature-card:nth-child(even):hover { border-top-color: var(--green); }

.feature-ico-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.feature-card:nth-child(odd)  .feature-ico-wrap { background: var(--pink-light); }
.feature-card:nth-child(even) .feature-ico-wrap { background: var(--green-light); }

.feature-card h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* CTA finale */
.cta-section {
  padding: 80px 48px;
  text-align: center;
  background: var(--green-dark);
}
.cta-section h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.cta-section p  { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 32px; }
.cta-section .btn-primary             { background: var(--pink); font-size: 16px; padding: 14px 36px; }
.cta-section .btn-primary:hover       { background: var(--pink-dark); }

/* Footer */
.home-footer {
  padding: 20px 48px;
  background: #141a0f;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

@media (max-width: 900px) {
  .hero              { grid-template-columns: 1fr; padding: 48px 24px; }
  .hero-visual       { display: none; }
  .hero h1           { font-size: 34px; }
  .features-grid     { grid-template-columns: 1fr 1fr; }
  .home-nav          { padding: 0 24px; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .features      { padding: 48px 24px; }
  .cta-section   { padding: 48px 24px; }
}
