:root {
  --navy: #1a2744;
  --navy-deep: #111b33;
  --amber: #c8a84b;
  --amber-hover: #b8944a;
  --amber-soft: #fdf6e3;
  --bg: #f5f3ef;
  --paper: #ffffff;
  --border: #ddd9d0;
  --testo: #1c1a14;
  --muted: #8a8376;
  --soft: #edeae0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--testo);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

/* NAVBAR */
.navbar {
  background: var(--navy);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.navbar-brand {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.navbar-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.navbar-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: all 0.15s;
}
.navbar-links a:hover,
.navbar-links a.active { color: white; background: rgba(255,255,255,0.1); }
.btn-esci {
  background: var(--amber) !important;
  color: var(--navy-deep) !important;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-family: inherit;
}
.btn-esci:hover { background: var(--amber-hover) !important; }

/* HAMBURGER MOBILE */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--navy-deep);
  padding: 1rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.mobile-menu a:hover, .mobile-menu button:hover { background: rgba(255,255,255,0.1); color: white; }

@media (max-width: 640px) {
  .navbar-links { display: none; }
  .hamburger { display: flex; }
}

/* CONTAINER */
.container {
  max-width: 720px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

/* CARD */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
}

/* FORM */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--testo);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.15);
}
textarea.form-control {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
select.form-control { cursor: pointer; }

/* BOTTONI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--amber); color: var(--navy-deep); width: 100%; }
.btn-primary:hover { background: var(--amber-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: var(--navy); color: white; }
.btn-secondary:hover { background: var(--navy-deep); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--testo);
}
.btn-outline:hover { background: var(--soft); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.btn-full { width: 100%; }

/* ANTEPRIMA */
.anteprima-box { display: none; }
.anteprima-badge {
  display: inline-block;
  background: var(--amber-soft);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.anteprima-testo {
  width: 100%;
  min-height: 180px;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.75;
  font-family: inherit;
  resize: vertical;
  background: #fafaf8;
  color: var(--testo);
}
.anteprima-testo:focus {
  outline: none;
  border-color: var(--amber);
}
.sep { border: none; border-top: 1px solid var(--amber); opacity: 0.35; margin: 0.5rem 0; }

/* RIEPILOGO ECONOMICO */
.riepilogo {
  background: var(--soft);
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
}
.riepilogo-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.riepilogo-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--amber);
  margin-top: 0.25rem;
}
.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.btn-group .btn { flex: 1; }

/* LOADING */
.loading-box {
  display: none;
  text-align: center;
  padding: 2.5rem;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* STORICO */
.storico-header {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid var(--navy);
  margin-bottom: 0.5rem;
}
.storico-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.storico-row:last-child { border-bottom: none; }
.storico-empty {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* AUTH */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1rem;
}
.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(26,39,68,0.08);
}
.auth-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.25rem;
}
.auth-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.35rem;
}
.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-footer a { color: var(--amber); text-decoration: none; font-weight: 600; }

/* ALERT */
.alert {
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.alert-error { background: #faeae4; color: #b84422; border: 1px solid rgba(184,68,34,0.15); }
.alert-success { background: var(--amber-soft); color: var(--navy); border: 1px solid rgba(200,168,75,0.25); }

/* PROFILO */
.profilo-nota {
  background: var(--soft);
  border-left: 3px solid var(--amber);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* FORM ROW (due colonne affiancate) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

/* FORM SECTION LABEL */
.form-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* BOTTONE VOCALE */
.voce-section {
  text-align: center;
  margin-bottom: 1.5rem;
}
.btn-voce {
  display: block;
  width: 100%;
  padding: 1.1rem;
  background: var(--amber);
  color: var(--navy-deep);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: -0.2px;
}
.btn-voce:hover { background: var(--amber-hover); }
.btn-voce.recording {
  background: #c0392b;
  color: white;
  animation: pulse 1s ease-in-out infinite;
}
.btn-voce.processing {
  background: var(--muted);
  color: white;
  cursor: not-allowed;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.02); opacity: 0.9; }
}
.voce-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.6rem;
}
.voce-feedback {
  display: none;
  background: var(--amber-soft);
  border: 1px solid rgba(200,168,75,0.25);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--navy);
  margin-top: 0.75rem;
  text-align: center;
}
.campo-compilato {
  border-color: var(--amber) !important;
  background: var(--amber-soft) !important;
  transition: all 0.3s;
}

/* CONDIZIONI COMMERCIALI */
.condizioni-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  cursor: pointer;
  user-select: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.condizioni-toggle:hover { color: var(--testo); }
.condizioni-icon {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--amber);
}
.condizioni-box {
  background: var(--soft);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 0.5rem;
}
.condizioni-nota {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  font-style: italic;
}

/* ANTEPRIMA META */
.anteprima-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* RIEPILOGO TOTALE */
.riepilogo-totale {
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

/* LOGO UPLOAD */
.logo-upload-group { margin-bottom: 0.5rem; }
.logo-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.logo-upload-label:hover { border-color: var(--amber); background: var(--amber-soft); }
.logo-upload-label span { font-size: 0.9rem; font-weight: 600; color: var(--amber); }
.logo-upload-label small { font-size: 0.75rem; color: var(--muted); }
.logo-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
}
.logo-preview img {
  max-height: 56px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 4px;
}
.logo-remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  white-space: nowrap;
}
.logo-remove:hover { border-color: #b84422; color: #b84422; }

/* TEMPLATE GRID */
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .template-grid { grid-template-columns: repeat(3, 1fr); }
}
.template-card {
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}
.template-card:hover { border-color: var(--amber); }
.template-card.selected {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.2);
}
.template-preview {
  height: 60px;
  padding: 4px;
}
.template-info {
  padding: 0.5rem 0.6rem;
  background: white;
}
.template-nome {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--testo);
}
.template-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* TEMPLATE PREVIEW LIVE */
.template-preview-live {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.preview-live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.85rem;
  background: var(--soft);
  border-bottom: 1px solid var(--border);
}
.preview-live-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.preview-live-nome {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--testo);
}
.preview-live-documento {
  padding: 0.75rem;
  background: var(--bg);
  transition: all 0.2s;
}

/* FIRMA CANVAS */
.firma-container {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: white;
}
#firmaCanvas {
  display: block;
  width: 100%;
  height: 120px;
  cursor: crosshair;
  touch-action: none;
}
.firma-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--soft);
  border-top: 1px solid var(--border);
}
.firma-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

/* PIANO ATTIVO */
.piano-attivo {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--soft);
  border-radius: 6px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.piano-info { display: flex; align-items: center; gap: 0.6rem; }
.piano-badge {
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.piano-desc {
  font-size: 0.85rem;
  color: var(--testo);
  flex: 1;
}
.piano-contatore {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

/* PIANI ABBONAMENTO */
.piani-section { margin-bottom: 1.5rem; }
.piani-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
@media (max-width: 640px) {
  .piani-grid { grid-template-columns: 1fr; }
}
.piano-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  position: relative;
  background: var(--paper);
}
.piano-card-featured {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.15);
}
.piano-card-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--navy-deep);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.piano-card-nome {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.piano-card-prezzo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 1rem;
}
.piano-card-prezzo span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}
.piano-card-features {
  list-style: none;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--testo);
}
.piano-card-features li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}
.piano-card-features li:last-child { border-bottom: none; }
.piano-card-attivo {
  opacity: 0.5;
  pointer-events: none;
}
.piano-card-attivo::after {
  content: 'Piano attivo';
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* MOBILE CTA STICKY */
.mobile-cta {
  display: none;
}
@media (max-width: 640px) {
  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: white;
    border-top: 1px solid var(--border);
    z-index: 50;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  }
  .mobile-cta .btn { width: 100%; }
}

/* RESPONSIVE */
@media (max-width: 640px) {
  body:has(.mobile-cta) .container { padding-bottom: 5rem; }
  .container { padding: 0 0.75rem; margin: 1rem auto; }
  .card { padding: 1.1rem; }
  .storico-header, .storico-row { grid-template-columns: 1fr auto; }
  .storico-header span:nth-child(2),
  .storico-row span:nth-child(2) { display: none; }
  .btn-group { flex-direction: column; }
}

/* ── SCELTA MODALITÀ ── */
.modalita-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 500px) {
  .modalita-grid { grid-template-columns: 1fr; }
}
.modalita-card {
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.modalita-card:hover {
  border-color: var(--amber);
  box-shadow: 0 4px 16px rgba(200,168,75,0.12);
  transform: translateY(-2px);
}
.modalita-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.modalita-nome { font-size: 0.97rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.modalita-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.55; margin-bottom: 0.6rem; }
.modalita-tempo { font-size: 0.72rem; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: 0.06em; }
.btn-back { background: none; border: none; color: var(--muted); font-size: 0.82rem; cursor: pointer; padding: 0; margin-bottom: 1rem; font-family: var(--font-body); }
.btn-back:hover { color: var(--navy); }

/* ── TABELLA VOCI AVANZATA ── */
.voci-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.voci-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.voci-zona { font-size: 0.72rem; color: var(--muted); font-style: italic; }
.voci-nota { font-size: 0.75rem; color: var(--muted); background: var(--soft); padding: 0.5rem 0.75rem; border-radius: 4px; margin-bottom: 0.75rem; }
.voce-riga { border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.5rem; background: var(--paper); }
.voce-descrizione { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.voce-input { flex: 1; border: none; border-bottom: 1px solid var(--border); padding: 0.25rem 0; font-size: 0.88rem; font-family: var(--font-body); color: var(--testo); background: transparent; }
.voce-input:focus { outline: none; border-bottom-color: var(--amber); }
.voce-stima-badge { font-size: 0.62rem; background: var(--amber-soft); color: var(--amber); padding: 0.15rem 0.4rem; border-radius: 3px; white-space: nowrap; font-weight: 600; }
.voce-numeri { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.voce-campo { display: flex; flex-direction: column; gap: 0.15rem; }
.voce-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.voce-input-num { width: 70px; border: 1px solid var(--border); border-radius: 4px; padding: 0.3rem 0.4rem; font-size: 0.85rem; font-family: var(--font-body); text-align: right; }
.voce-input-num:focus { outline: none; border-color: var(--amber); }
.voce-subtotale { font-size: 0.85rem; font-weight: 600; color: var(--navy); min-width: 70px; text-align: right; }
.voce-elimina { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; padding: 0.25rem; margin-left: auto; }
.voce-elimina:hover { color: #c0392b; }
.btn-aggiungi-voce { width: 100%; padding: 0.6rem; background: transparent; border: 1.5px dashed var(--border); border-radius: 6px; color: var(--muted); font-size: 0.85rem; cursor: pointer; margin: 0.5rem 0 1rem; font-family: var(--font-body); transition: all 0.15s; }
.btn-aggiungi-voce:hover { border-color: var(--amber); color: var(--amber); }
.riepilogo-avanzato { background: var(--soft); border-radius: 6px; padding: 0.85rem; border: 1px solid var(--border); }
.riepilogo-row { display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.riepilogo-row:last-child { border-bottom: none; }
.riepilogo-row.totale { font-weight: 700; font-size: 1.05rem; color: var(--amber); margin-top: 0.25rem; }
@keyframes pulsaTotale { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.totale-aggiornato { animation: pulsaTotale 0.4s ease; }

/* ── BADGE STATI ── */
.badge-stato { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 20px; cursor: pointer; white-space: nowrap; transition: opacity 0.15s; user-select: none; }
.badge-stato:hover { opacity: 0.8; }
.badge-da-inviare { background: #fef3cd; color: #856404; }
.badge-inviato    { background: #cce5ff; color: #004085; }
.badge-accettato  { background: #d4edda; color: #155724; }
.badge-rifiutato  { background: #f8d7da; color: #721c24; }

/* ── MENU STATO ── */
.menu-stato { position: fixed; bottom: 0; left: 0; right: 0; background: var(--paper); border-radius: 16px 16px 0 0; padding: 1.25rem; z-index: 200; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); }
.menu-stato-titolo { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; text-align: center; }
.menu-stato button { display: block; width: 100%; padding: 0.8rem 1rem; background: var(--soft); border: none; border-radius: 6px; font-size: 0.9rem; font-family: var(--font-body); text-align: left; cursor: pointer; margin-bottom: 0.5rem; transition: background 0.15s; }
.menu-stato button:hover { background: var(--border); }
.btn-chiudi-menu { background: transparent !important; color: var(--muted) !important; text-align: center !important; font-size: 0.85rem !important; }
#overlayMenuStato { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199; }

/* ── STORICO — nuovi bottoni ── */
.btn-pdf-storico { background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; transition: background 0.15s; }
.btn-pdf-storico:hover { background: var(--soft); }
.btn-pdf-storico:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-duplica { background: none; border: 1px solid var(--border); font-size: 0.85rem; cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 4px; color: var(--muted); transition: all 0.15s; }
.btn-duplica:hover { border-color: var(--amber); color: var(--amber); }
.storico-azioni { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

/* ── DASHBOARD ── */
.dashboard-header { margin-bottom: 1.25rem; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.dashboard-card { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; border-left: 3px solid var(--amber); }
.dashboard-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 0.35rem; }
.dashboard-num.amber { color: var(--amber); }
.dashboard-num.green { color: #155724; }
.dashboard-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.dashboard-sublabel { font-size: 0.68rem; color: var(--amber); margin-top: 0.2rem; font-weight: 600; }

/* ── TRASCRIZIONE LIVE ── */
.trascrizione-live {
  margin-top: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
  font-style: italic;
}
.trascrizione-live.recording {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.trascrizione-live.processing {
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--border);
}
.trascrizione-live.completata {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ── TOAST ── */
#toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1rem; border-radius: 8px;
  font-size: 0.85rem; font-weight: 500; font-family: var(--font-body);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 280px; pointer-events: auto;
}
.toast-visible { opacity: 1; transform: translateX(0); }
.toast-hiding  { opacity: 0; transform: translateX(20px); }
.toast-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.toast-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.toast-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.toast-icon    { font-size: 0.9rem; flex-shrink: 0; }
@media (max-width: 640px) {
  #toast-container { top: auto; bottom: 5rem; right: 0.75rem; left: 0.75rem; }
  .toast { max-width: 100%; }
}

/* ── ANIMAZIONI BOTTONE GENERA ── */
.btn-generando { background: var(--navy) !important; cursor: wait !important; position: relative; }
.btn-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  vertical-align: middle; margin-right: 0.3rem;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-in { animation: slideIn 0.4s ease forwards; }
.badge-stato { transition: background 0.3s ease, color 0.3s ease; }

/* ── EMPTY STATES ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 3rem 1.5rem; gap: 0.75rem;
}
.empty-icon { margin-bottom: 0.5rem; opacity: 0.85; }
.empty-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); font-weight: 600; }
.empty-desc { font-size: 0.85rem; color: var(--muted); max-width: 280px; line-height: 1.6; }

/* ── WIZARD ONBOARDING ── */
.wizard-progress { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 2rem; overflow: hidden; }
.wizard-progress-bar { height: 100%; background: var(--amber); border-radius: 2px; transition: width 0.4s ease; }
.wizard-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.wizard-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); margin-bottom: 0.5rem; }
.wizard-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 1.5rem; }
.btn-skip {
  display: block; width: 100%; text-align: center; margin-top: 0.75rem;
  font-size: 0.82rem; color: var(--muted); background: none; border: none;
  cursor: pointer; font-family: var(--font-body); padding: 0.4rem;
}
.btn-skip:hover { color: var(--navy); }

/* ── NUMERO PREVENTIVO ANTEPRIMA ── */
.anteprima-numero {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem;
  padding: 0.5rem 0.85rem; background: var(--soft); border-radius: 5px; border-left: 3px solid var(--amber);
}
.anteprima-numero-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.anteprima-numero-val { font-family: var(--font-display); font-size: 1rem; color: var(--navy); font-weight: 600; }

/* ── BADGE PIANO NAVBAR ── */
.piano-navbar {
  font-size: 0.68rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 10px; white-space: nowrap; letter-spacing: 0.04em;
}
.piano-trial   { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
.piano-starter { background: rgba(200,168,75,0.15); color: var(--amber); }
.piano-base    { background: rgba(200,168,75,0.2); color: var(--amber); }
.piano-pro     { background: var(--amber); color: var(--navy); }
@media (max-width: 640px) { .piano-navbar { display: none; } }

/* ── SCHERMATA SUCCESSO PDF ── */
.success-card { text-align: center; padding: 2.5rem 1.5rem; border-left: none; border-top: 3px solid var(--amber); }
.success-icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.success-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--navy); margin-bottom: 0.5rem; }
.success-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.75rem; line-height: 1.6; }
.success-actions { display: flex; flex-direction: column; gap: 0.6rem; }

/* ── SKELETON LOADING ── */
.skeleton-block {
  background: linear-gradient(90deg, var(--border) 25%, var(--soft) 50%, var(--border) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-container { padding: 0.5rem 0; }
.skeleton-row { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--border); }

/* ── COPIA TESTO ── */
.btn-copia {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  font-size: 0.75rem; padding: 0.25rem 0.6rem; cursor: pointer;
  font-family: var(--font-body); color: var(--muted); transition: all 0.15s;
}
.btn-copia:hover { border-color: var(--amber); color: var(--amber); }

/* ── MODAL ANTEPRIMA PDF ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-content {
  background: white; border-radius: 10px; width: 100%; max-width: 700px;
  max-height: 90vh; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-title { font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 0.25rem; }
.modal-close:hover { color: var(--navy); }
.pdf-preview-frame { flex: 1; border: none; min-height: 400px; }
.modal-footer { padding: 0.85rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.modal-footer .btn { width: auto; }
@media (max-width: 640px) {
  .modal-content { max-height: 95vh; }
  .pdf-preview-frame { min-height: 300px; }
}

/* ── ASSISTENZA PREZZI ── */
.assistenza-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.assistenza-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.domande-rapide { margin-bottom: 1.25rem; }
.domande-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.5rem;
}
.domande-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.domanda-chip {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--testo);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
  white-space: nowrap;
}
.domanda-chip:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: white;
}
.chat-container {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  scroll-behavior: smooth;
}
.chat-messaggio {
  display: flex;
  max-width: 85%;
}
.chat-messaggio.utente {
  align-self: flex-end;
  justify-content: flex-end;
}
.chat-messaggio.assistente {
  align-self: flex-start;
}
.chat-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.87rem;
  line-height: 1.6;
}
.chat-messaggio.utente .chat-bubble {
  background: var(--navy);
  color: white;
  border-bottom-right-radius: 3px;
}
.chat-messaggio.assistente .chat-bubble {
  background: white;
  color: var(--testo);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}
.chat-messaggio.assistente.errore .chat-bubble {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.75rem 1rem;
}
.chat-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.chat-input-area {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  transition: border-color 0.15s;
}
.chat-input:focus {
  outline: none;
  border-color: var(--amber);
}
.chat-send-btn {
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.chat-send-btn:hover { background: var(--navy-deep); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-disclaimer {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── NAVBAR CTA BUTTON ── */
.btn-navbar-cta {
  background: var(--amber) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.85rem !important;
  border-radius: 5px !important;
  text-decoration: none !important;
  font-size: 0.84rem !important;
  transition: background 0.15s !important;
  white-space: nowrap;
}
.btn-navbar-cta:hover {
  background: var(--amber-hover) !important;
  color: var(--navy) !important;
}
.btn-navbar-cta-mobile {
  color: var(--amber) !important;
  font-weight: 700 !important;
  border-top: 1px solid rgba(200,168,75,0.2);
  margin-top: 0.25rem;
  padding-top: 0.75rem !important;
}

/* ── MODAL BENVENUTO ── */
.benvenuto-card {
  background: white;
  border-radius: 14px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  border-top: 3px solid var(--amber);
  animation: slideIn 0.4s ease;
}
.benvenuto-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}
.benvenuto-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.35rem;
}
.benvenuto-desc {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.benvenuto-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.benvenuto-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.benvenuto-step-num {
  width: 28px;
  height: 28px;
  background: var(--amber);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.benvenuto-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.benvenuto-step-text strong {
  font-size: 0.88rem;
  color: var(--navy);
}
.benvenuto-step-text span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.benvenuto-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── CONDIZIONI AVANZATO ── */
.condizioni-avanzato {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.condizioni-summary {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: var(--soft);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.condizioni-summary::-webkit-details-marker { display: none; }
.condizioni-summary::after { content: '▾'; }
details[open] .condizioni-summary::after { content: '▴'; }
.condizioni-body { padding: 1rem; }

/* ── MODAL PDF MOBILE ── */
@media (max-width: 640px) {
  #_pdfModal > div {
    max-width: 100% !important;
    height: 95vh !important;
    border-radius: 10px 10px 0 0 !important;
    align-self: flex-end !important;
  }
}

/* ── BANNER ACCETTAZIONE ── */
.banner-accettazione {
  position: sticky;
  top: 0;
  z-index: 150;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  animation: bannerEntrata 0.35s ease;
}
.banner-uscita {
  animation: bannerUscita 0.3s ease forwards;
}
@keyframes bannerEntrata {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes bannerUscita {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}
.banner-icon { font-size: 1.1rem; }
.banner-testo {
  font-size: 0.85rem;
  color: #166534;
  flex: 1;
}
.banner-testo strong { font-weight: 700; }
.banner-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.banner-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #166534;
  text-decoration: none;
  white-space: nowrap;
}
.banner-link:hover { text-decoration: underline; }
.banner-chiudi {
  background: none;
  border: none;
  color: #166534;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  opacity: 0.6;
}
.banner-chiudi:hover { opacity: 1; }

@media (max-width: 640px) {
  .banner-accettazione {
    padding: 0.6rem 0.85rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .banner-actions { width: 100%; justify-content: space-between; }
}

/* ── MODAL DETTAGLIO ACCETTAZIONE ── */
.accettazione-card {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border-top: 3px solid #16a34a;
}
.accettazione-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  position: relative;
}
.accettazione-icon {
  width: 32px;
  height: 32px;
  background: #16a34a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.accettazione-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #166534;
}
.accettazione-numero {
  font-size: 0.78rem;
  color: #4b7c5c;
}
.accettazione-chiudi {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #4b7c5c;
  font-size: 1rem;
  padding: 0.25rem;
}
.accettazione-body { padding: 1.25rem; }
.accettazione-riga {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.accettazione-riga:last-of-type { border-bottom: none; }
.accettazione-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.accettazione-valore { font-weight: 600; color: var(--testo); }
.accettazione-firma-box {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.accettazione-firma-img {
  display: block;
  width: 100%;
  max-height: 100px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 0.5rem;
  padding: 0.5rem;
}
.accettazione-firma-mancante {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.4rem;
}

/* ── TOGGLE PASSWORD VISIBILITY ── */
.password-field-wrapper {
  position: relative;
}
.password-field-wrapper .form-control {
  padding-right: 2.75rem;
}
.toggle-password {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem;
  opacity: 0.6;
  transition: opacity 0.15s;
  line-height: 1;
}
.toggle-password:hover { opacity: 1; }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy);
  z-index: 9500;
  padding: 1rem 1.25rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.cookie-banner-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-testo {
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  line-height: 1.5;
  flex: 1;
  min-width: 240px;
  margin: 0;
}
.cookie-banner-testo a { color: var(--amber); text-decoration: underline; }
.cookie-banner-azioni { display: flex; gap: 0.6rem; flex-shrink: 0; }
.btn-cookie-rifiuta {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-cookie-accetta {
  background: var(--amber);
  border: none;
  color: var(--navy);
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}
@media (max-width: 640px) {
  .cookie-banner-azioni { width: 100%; }
  .btn-cookie-rifiuta, .btn-cookie-accetta { flex: 1; }
}
