/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #FAFAFA;
  --bg-secondary: #F0F1F3;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F5F6F8;
  --text-primary: #1A1D23;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --accent: #C9A200;
  --accent-hover: #F5C518;
  --accent-glow: rgba(245, 197, 24, 0.10);
  --danger: #DC2626;
  --success: #059669;
  --warning: #D97706;
  --info: #2563EB;
  --purple: #7C3AED;
  --border: #E2E4E9;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  background-image:
    /* Gialle */
    radial-gradient(ellipse 800px 600px at 8% 3%, rgba(245, 197, 24, 0.25) 0%, transparent 65%),
    radial-gradient(ellipse 700px 500px at 92% 45%, rgba(251, 191, 36, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 650px 500px at 50% 95%, rgba(245, 197, 24, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 500px 400px at 35% 50%, rgba(255, 210, 63, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 600px 500px at 50% 25%, rgba(245, 197, 24, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 550px 450px at 55% 65%, rgba(251, 191, 36, 0.18) 0%, transparent 65%),
    /* Arancioni - lati */
    radial-gradient(ellipse 750px 550px at 95% 8%, rgba(232, 122, 46, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 700px 500px at 5% 55%, rgba(217, 119, 6, 0.18) 0%, transparent 65%),
    /* Arancioni - centrali */
    radial-gradient(ellipse 550px 450px at 45% 40%, rgba(232, 122, 46, 0.16) 0%, transparent 65%),
    radial-gradient(ellipse 500px 400px at 55% 75%, rgba(217, 119, 6, 0.14) 0%, transparent 65%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

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

.text-center {
  text-align: center;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e0e0e0;
}

/* Hide header on analisi page */
.page-analisi .header {
  display: none;
}

.page-analisi .hero {
  padding-top: 60px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 56px;
  width: auto;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: #333333;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333333;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  padding: 140px 0 80px;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%);
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.7;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Upload ===== */
.upload-section {
  padding-top: 40px;
}

.upload-area {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 28px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-secondary);
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-icon-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.upload-icon-row svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.upload-area:hover .upload-icon-row svg {
  opacity: 1;
}

.upload-text-group {
  text-align: left;
}

.upload-text {
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.upload-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* File Preview */
.file-preview {
  max-width: 520px;
  margin: 20px auto 0;
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.file-info span {
  font-size: 0.9rem;
}

#fileName {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fileSize {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Photo Gallery (multi-photo upload) */
.photo-gallery {
  max-width: 520px;
  margin: 20px auto 0;
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.photo-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.photo-gallery-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.photo-thumbs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.photo-thumb {
  position: relative;
  width: 80px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.7rem;
  text-align: center;
  padding: 2px 0;
  font-weight: 500;
}

.photo-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-thumb-remove:hover {
  background: rgba(220, 50, 50, 0.85);
}

.photo-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.photo-add-btn:hover {
  border-color: var(--accent);
  background: rgba(201, 162, 0, 0.05);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* Mobile upload actions (camera/gallery) */
.upload-mobile-actions {
  display: none; /* Hidden on desktop */
  max-width: 520px;
  margin: 16px auto 0;
  gap: 12px;
}

.upload-mobile-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-mobile-btn:hover {
  border-color: var(--accent);
  background: rgba(201, 162, 0, 0.05);
}

.upload-mobile-btn svg {
  color: var(--accent);
  stroke: var(--accent);
}

.photo-add-actions {
  display: flex;
  gap: 10px;
}

.photo-add-actions .photo-add-btn {
  flex: 1;
  font-size: 0.85rem;
}

/* Show mobile buttons on touch devices */
@media (max-width: 768px) {
  .upload-mobile-actions {
    display: flex;
  }
}

@media (max-width: 480px) {
  .photo-add-actions {
    flex-direction: column;
  }
}

/* Loading */
.loading {
  text-align: center;
  padding: 48px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.loading-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Dawn Scene: Night to Day animation */
.dawn-scene {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 300px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
}

.dawn-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0a0e27 0%, #1a1a3e 40%, #2d1b4e 70%, #1a1a3e 100%);
  transition: background 3s ease-in-out;
}

.dawn-animating .dawn-sky {
  animation: skyDawn 8s ease-in-out forwards;
}

@keyframes skyDawn {
  0%   { background: linear-gradient(180deg, #0a0e27 0%, #1a1a3e 40%, #2d1b4e 70%, #1a1a3e 100%); }
  25%  { background: linear-gradient(180deg, #0f1538 0%, #2d1b4e 30%, #6b3a5e 60%, #d4785a 100%); }
  50%  { background: linear-gradient(180deg, #1a2a5e 0%, #4a6fa5 30%, #f0a868 50%, #f5c842 100%); }
  75%  { background: linear-gradient(180deg, #4a9eda 0%, #87CEEB 35%, #B0E0E6 55%, #1a8fbf 100%); }
  100% { background: linear-gradient(180deg, #56b4e9 0%, #7ec8e3 25%, #4db8d9 50%, #1a8fbf 70%, #0e6da3 100%); }
}

/* Stars */
.dawn-stars {
  position: absolute;
  inset: 0;
  transition: opacity 3s;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite alternate;
}

.star:nth-child(2) { animation-delay: 0.3s; width: 2px; height: 2px; }
.star:nth-child(3) { animation-delay: 0.7s; }
.star:nth-child(4) { animation-delay: 1.1s; width: 2px; height: 2px; }
.star:nth-child(5) { animation-delay: 0.5s; }
.star:nth-child(6) { animation-delay: 1.4s; width: 2px; height: 2px; }
.star:nth-child(7) { animation-delay: 0.9s; }
.star:nth-child(8) { animation-delay: 1.7s; width: 2px; height: 2px; }

@keyframes twinkle {
  0%   { opacity: 0.3; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.3); }
}

.dawn-animating .dawn-stars {
  animation: fadeStars 8s ease-in-out forwards;
}

@keyframes fadeStars {
  0%   { opacity: 1; }
  50%  { opacity: 0.3; }
  80%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Sun with rays */
.dawn-sun {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
  z-index: 1;
}

.sun-svg {
  width: 100%;
  height: 100%;
}

.sun-rays {
  transform-origin: 60px 60px;
  opacity: 0.9;
}

.dawn-animating .dawn-sun {
  animation: sunRise 8s ease-in-out forwards;
}

.dawn-animating .sun-rays {
  animation: raysRotate 3s linear infinite;
}

@keyframes sunRise {
  0%   { bottom: -60px; filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3)); }
  35%  { bottom: 10px; filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.5)); }
  65%  { bottom: 70px; filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 100px rgba(245, 166, 35, 0.3)); }
  100% { bottom: 110px; filter: drop-shadow(0 0 60px rgba(255, 215, 0, 0.7)) drop-shadow(0 0 120px rgba(245, 166, 35, 0.4)); }
}

@keyframes raysRotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ocean */
.dawn-ocean {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(180deg,
    rgba(30, 120, 180, 0.6) 0%,
    #1565a0 20%,
    #0d5a8e 40%,
    #0b4f7f 60%,
    #094570 80%,
    #073b5f 100%
  );
  z-index: 1;
  overflow: hidden;
}

.dawn-ocean::before,
.dawn-ocean::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  height: 6px;
  border-radius: 50%;
  opacity: 0;
}

.dawn-ocean::before {
  top: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.dawn-ocean::after {
  top: 22px;
  background: rgba(255, 255, 255, 0.1);
}

.dawn-animating .dawn-ocean {
  animation: oceanRise 8s ease-in-out forwards;
}

.dawn-animating .dawn-ocean::before {
  animation: waveShimmer1 2.5s 5s ease-in-out infinite alternate, waveAppear 8s ease-in-out forwards;
}

.dawn-animating .dawn-ocean::after {
  animation: waveShimmer2 3s 5.5s ease-in-out infinite alternate, waveAppear 8s ease-in-out forwards;
}

@keyframes oceanRise {
  0%   { height: 0; }
  40%  { height: 0; }
  70%  { height: 60px; }
  100% { height: 90px; }
}

@keyframes waveAppear {
  0%, 60% { opacity: 0; }
  100%    { opacity: 1; }
}

@keyframes waveShimmer1 {
  0%   { transform: translateX(-5px); }
  100% { transform: translateX(5px); }
}

@keyframes waveShimmer2 {
  0%   { transform: translateX(5px); }
  100% { transform: translateX(-5px); }
}

/* Sun reflection on water */
.dawn-ocean::before {
  box-shadow: 0 15px 20px -5px rgba(255, 215, 0, 0);
}

.dawn-animating.dawn-complete .dawn-ocean::before {
  box-shadow: 0 15px 20px -5px rgba(255, 215, 0, 0.15);
  transition: box-shadow 2s ease-in-out;
}

/* Horizon line */
.dawn-horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 2;
}

.dawn-animating .dawn-horizon {
  animation: horizonDawn 8s ease-in-out forwards;
}

@keyframes horizonDawn {
  0%, 40%  { background: transparent; bottom: 0; }
  70%  { background: rgba(255, 215, 0, 0.25); bottom: 60px; }
  100% { background: rgba(255, 255, 255, 0.2); bottom: 90px; }
}

/* Loading text */
.dawn-text {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 4;
}

.dawn-loading-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.dawn-animating.dawn-complete .dawn-loading-text {
  animation: none;
  opacity: 0;
  transition: opacity 0.5s;
}

/* Quote at dawn */
.dawn-quote {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  animation: quoteAppear 1.5s ease-out forwards;
}

.dawn-quote p {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
  margin: 0;
}

.dawn-quote .dawn-quote-author {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

@keyframes quoteAppear {
  0%   { opacity: 0; transform: translate(-50%, -40%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}

.dawn-quote.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 480px) {
  .dawn-scene {
    height: 240px;
  }

  .dawn-quote p {
    font-size: 1rem;
    padding: 0 16px;
  }

  .condo-flag-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Lead Form */
.lead-form {
  max-width: 520px;
  margin: 20px auto 0;
  padding: 28px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.lead-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.lead-form-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

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

.form-group input.input-error {
  border-color: var(--danger);
}

.form-group-phone {
  grid-column: 1 / -1;
}

.phone-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-prefix {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.phone-input-row input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.phone-input-row input:focus {
  border-color: var(--accent);
}

/* Analyze actions (standalone button after upload) */
.analyze-actions {
  max-width: 520px;
  margin: 20px auto 0;
  text-align: center;
}

.btn-analizza {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 1.05rem;
}

.btn-analizza:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Results blur + overlay */
.results-blurred {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.results-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(2px);
}

.overlay-form {
  max-width: 480px;
  width: 100%;
  padding: 0 16px;
  animation: fadeInUp 0.4s ease;
}

.overlay-form .lead-form {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.overlay-consent {
  margin: 16px 0 0;
  max-width: 100%;
  padding: 12px 14px;
}

.overlay-error {
  color: var(--danger);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 12px;
}

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

  .phone-input-row {
    flex-wrap: wrap;
  }

  .results-overlay {
    padding-top: 60px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Error */
.error-message {
  max-width: 520px;
  margin: 20px auto 0;
  padding: 20px 24px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  text-align: center;
}

.error-message p {
  color: var(--danger);
  margin-bottom: 12px;
}

/* ===== Results Header ===== */
.results-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.results-header .section-title {
  margin-bottom: 0;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-export:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Print-only branding (hidden on screen) */
.print-branding {
  display: none;
}

/* ===== Summary Bar ===== */
.results-summary-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 20px;
  min-width: 0;
}

.summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.summary-value {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.summary-highlight {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
}

.summary-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===== Results ===== */
.results-intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.results-section {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform var(--transition);
}

.result-card:hover {
  transform: translateY(-2px);
}

.result-card.highlight {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card), var(--accent-glow));
}

.result-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.result-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Detail Cards */
.detail-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.detail-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Source notes / postille */
.card-source-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.5;
}

.result-source {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

/* Bill Preview */
.bill-preview-card {
  overflow: hidden;
}

.bill-preview-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.bill-pages-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.bill-page-thumb {
  flex-shrink: 0;
  width: 120px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all var(--transition);
  position: relative;
  background: #fff;
}

.bill-page-thumb:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.2);
}

.bill-page-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.bill-page-number {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 0;
  background: var(--bg-secondary);
}

/* Page lightbox */
.page-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInUp 0.2s ease;
}

.lightbox-content {
  position: relative;
  max-width: 800px;
  max-height: 90vh;
  width: 100%;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.lightbox-content img {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.detail-row span:last-child {
  font-weight: 600;
}

/* PCV highlighted row */
.detail-row.pcv-row {
  background: rgba(168, 85, 247, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 4px -12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.detail-row.pcv-row span:first-child {
  color: #7C3AED;
  font-weight: 600;
}

.pcv-detail {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* PCV overview card */
.result-card.pcv-card {
  border-color: #7C3AED;
  background: linear-gradient(135deg, var(--bg-card), rgba(124, 58, 237, 0.08));
}

.result-sublabel {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.result-explain {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Tipo utenza badge */
.tipo-utenza-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tipo-utenza-domestico {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.tipo-utenza-business {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

/* POD badge */
.pod-badge {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.pod-found {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563EB;
}

/* Potenza indicators */
.potenza-sovradimensionata {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(217, 119, 6, 0.1);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
  font-weight: 600;
}

.potenza-al-limite {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-weight: 600;
}

/* ATECO / IVA card */
.ateco-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.ateco-intro strong {
  color: var(--text-primary);
}

.ateco-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.ateco-input {
  flex: 1;
  max-width: 200px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 1px;
  outline: none;
  transition: border-color var(--transition);
}

.ateco-input:focus {
  border-color: var(--accent);
}

.btn-ateco {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.ateco-result {
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ateco-result-ok {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: #059669;
}

.ateco-result-saving {
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.3);
  color: var(--accent);
}

.ateco-result-info {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #2563EB;
}

.ateco-result strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

/* Billing period badge */
.periodicita-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.periodicita-mensile {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.periodicita-bimestrale {
  background: rgba(217, 119, 6, 0.1);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

/* Scadenza offerta badge */
.scadenza-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.scadenza-attiva {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.scadenza-in-scadenza {
  background: rgba(217, 119, 6, 0.1);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.scadenza-scaduta {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* Penali recesso badge */
.penali-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 60%;
  text-align: right;
}

.penali-presenti {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.penali-assenti {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

/* Chart */
.chart-container {
  max-width: 360px;
  margin: 0 auto;
}

.chart-container-small {
  max-width: 500px;
  max-height: 250px;
}

/* PUN Comparison */
.pun-comparison {
  margin-bottom: 20px;
}

.pun-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.pun-badge.badge-success {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.pun-badge.badge-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.pun-badge.badge-warning {
  background: rgba(217, 119, 6, 0.1);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

/* Anomali */
.anomali-item {
  padding: 14px 16px;
  background: rgba(248, 113, 113, 0.08);
  border-left: 3px solid var(--danger);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 10px;
}

.anomali-item .voce {
  font-weight: 600;
  color: var(--danger);
}

.anomali-item .importo {
  font-weight: 700;
  margin: 4px 0;
}

.anomali-item .motivo {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== Cost Composition Bars ===== */
.cost-stacked-bar {
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.cost-bar-segment {
  min-width: 2px;
  transition: opacity 0.2s;
}

.cost-bar-segment:first-child {
  border-radius: 10px 0 0 10px;
}

.cost-bar-segment:last-child {
  border-radius: 0 10px 10px 0;
}

.cost-bar-segment:hover {
  opacity: 0.8;
}

.cost-comp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cost-comp-row:last-child {
  border-bottom: none;
}

.cost-comp-row.cost-comp-pcv {
  background: rgba(168, 85, 247, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 2px -10px;
}

.cost-comp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cost-comp-label {
  width: 110px;
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cost-comp-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.cost-comp-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.cost-comp-value {
  width: 70px;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.cost-comp-pct {
  width: 50px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== Suggerimenti Cards ===== */
.suggerimenti-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sugg-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border-left: 4px solid;
}

.sugg-card.sugg-critico {
  border-left-color: #DC2626;
  background: rgba(220, 38, 38, 0.06);
}

.sugg-card.sugg-migliorabile {
  border-left-color: #D97706;
  background: rgba(217, 119, 6, 0.06);
}

.sugg-card.sugg-positivo {
  border-left-color: #059669;
  background: rgba(5, 150, 105, 0.06);
}

.sugg-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  line-height: 1.5;
}

.sugg-critico .sugg-icon {
  color: #DC2626;
}

.sugg-migliorabile .sugg-icon {
  color: #D97706;
}

.sugg-positivo .sugg-icon {
  color: #059669;
}

.sugg-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Verdetto / Semaforo ===== */
.verdetto-card {
  text-align: center;
  padding: 32px 28px;
}

.verdetto-card h3 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.verdetto-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.semaforo {
  display: flex;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(0,0,0,0.06);
  border-radius: 50px;
}

.semaforo-light {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.4s ease;
}

.semaforo-red {
  background: rgba(248, 113, 113, 0.2);
  border: 2px solid rgba(248, 113, 113, 0.3);
}

.semaforo-orange {
  background: rgba(251, 146, 60, 0.2);
  border: 2px solid rgba(251, 146, 60, 0.3);
}

.semaforo-green {
  background: rgba(52, 211, 153, 0.2);
  border: 2px solid rgba(52, 211, 153, 0.3);
}

.semaforo-red.active {
  background: #F87171;
  border-color: #FCA5A5;
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.6), 0 0 40px rgba(248, 113, 113, 0.3);
}

.semaforo-orange.active {
  background: #FB923C;
  border-color: #FBBF24;
  box-shadow: 0 0 20px rgba(251, 146, 60, 0.6), 0 0 40px rgba(251, 146, 60, 0.3);
}

.semaforo-green.active {
  background: #34D399;
  border-color: #6EE7B7;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.6), 0 0 40px rgba(52, 211, 153, 0.3);
}

.verdetto-text {
  max-width: 500px;
}

.verdetto-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.verdetto-rosso .verdetto-title {
  color: #DC2626;
}

.verdetto-arancione .verdetto-title {
  color: #D97706;
}

.verdetto-verde .verdetto-title {
  color: #059669;
}

.verdetto-detail {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.verdetto-rosso {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(135deg, var(--bg-card), rgba(248, 113, 113, 0.06));
}

.verdetto-arancione {
  border-color: rgba(251, 146, 60, 0.3);
  background: linear-gradient(135deg, var(--bg-card), rgba(251, 146, 60, 0.06));
}

.verdetto-verde {
  border-color: rgba(52, 211, 153, 0.3);
  background: linear-gradient(135deg, var(--bg-card), rgba(52, 211, 153, 0.06));
}

/* Offerte */
.offerte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.offerta-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.offerta-card h4 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.offerta-card .offerta-prezzo {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.offerta-card .offerta-risparmio {
  color: var(--success);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.offerta-card .offerta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Offer Comparison ===== */
.confronta-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.offer-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.offer-slot {
  position: relative;
}

.offer-slot-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-secondary);
  text-align: center;
}

.offer-slot-upload:hover,
.offer-slot-upload.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.offer-slot-upload span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.offer-slot-hint {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
}

.offer-slot-preview,
.offer-slot-loading,
.offer-slot-error,
.offer-slot-done {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.offer-slot-file {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.offer-file-name,
.offer-done-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition);
}

.offer-remove-btn:hover {
  color: var(--danger);
}

.offer-slot-loading {
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.offer-slot-error {
  background: rgba(248, 113, 113, 0.08);
  border-color: var(--danger);
  flex-wrap: wrap;
  gap: 8px;
}

.offer-error-text {
  color: var(--danger);
  font-size: 0.85rem;
  flex: 1;
}

.offer-retry-btn {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.offer-retry-btn:hover {
  background: var(--danger);
  color: #fff;
}

.offer-slot-done {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
}

.offer-slot-done .offer-done-name {
  flex: 1;
  color: var(--success);
}

/* Elume Offer Cards */
.elume-offer-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 197, 24, 0.04) 100%);
  cursor: pointer;
  transition: all var(--transition);
  height: 100%;
}

.elume-offer-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(245, 197, 24, 0.12);
  transform: translateY(-2px);
}

.elume-offer-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.elume-offer-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.elume-type-domestico {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
}

.elume-type-business {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
}

.elume-recommended-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.elume-offer-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.elume-offer-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.elume-offer-savings {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.elume-offer-savings.savings-positive {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.elume-offer-savings.savings-negative {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.elume-offer-savings .savings-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.elume-offer-savings.savings-negative .savings-icon {
  transform: rotate(180deg);
}

/* Savings Breakdown */
.savings-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.savings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 400;
}

.savings-row .savings-label {
  white-space: nowrap;
  font-size: 0.8rem;
}

.savings-row .savings-values {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.savings-row .savings-val-old {
  text-decoration: line-through;
  opacity: 0.55;
}

.savings-row .savings-arrow {
  opacity: 0.4;
  font-size: 0.75rem;
}

.savings-row .savings-val-new {
  font-weight: 600;
}

.savings-row .savings-diff {
  font-weight: 600;
  font-size: 0.78rem;
  min-width: 60px;
  text-align: right;
}

.savings-diff.diff-positive {
  color: var(--success);
}

.savings-diff.diff-negative {
  color: var(--danger);
}

.savings-divider {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 2px 0;
}

.savings-row.total {
  font-weight: 600;
  color: var(--text-primary);
}

.savings-row.total .savings-diff {
  font-size: 0.85rem;
}

.savings-row.annual .savings-diff {
  font-size: 0.95rem;
}

.savings-calc-formula {
  font-size: 0.75rem;
  opacity: 0.7;
}

.savings-note {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-top: 2px;
}

.elume-offer-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.elume-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.elume-detail-item:last-child {
  border-bottom: none;
}

.elume-detail-item span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.elume-offer-note {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: auto;
  line-height: 1.4;
}

.elume-card-relevant {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(245, 197, 24, 0.15);
}

.elume-card-other {
  opacity: 0.6;
}

/* Comparison Table */
.comparison-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  white-space: nowrap;
}

.comparison-table thead th {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

.comparison-table .col-current {
  background: rgba(245, 197, 24, 0.05);
}

.comparison-table thead .col-current {
  color: var(--accent);
}

.comparison-table .col-offer {
  background: rgba(0,0,0,0.02);
}

.comparison-table .col-elume {
  background: rgba(245, 197, 24, 0.04);
}

.comparison-table thead .col-elume {
  color: var(--accent);
  font-weight: 700;
}

.comparison-table .row-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding-top: 16px;
}

.saving-positive {
  color: var(--success) !important;
}

.saving-negative {
  color: var(--danger) !important;
}

.billing-period-row {
  background: rgba(245, 197, 24, 0.08);
}

.billing-period-row td {
  font-weight: 600;
  color: var(--accent) !important;
}

/* Best Offer Banner */
.best-offer-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-top: 4px;
}

.best-offer-saving {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
}

.best-offer-neutral {
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.best-offer-icon {
  flex-shrink: 0;
}

/* Savings Breakdown */
.savings-breakdown {
  margin-top: 16px;
}

.savings-breakdown h4 {
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 1rem;
}

.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.breakdown-card h5 {
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.breakdown-section {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.breakdown-section:last-of-type {
  border-bottom: none;
}

.breakdown-label {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.breakdown-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.breakdown-step {
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 2px 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.breakdown-result {
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 4px 0;
  margin-top: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.breakdown-total {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px;
  border-radius: 8px;
  margin-top: 8px;
  text-align: center;
}

.breakdown-total-positive {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.breakdown-total-negative {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.best-offer-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.best-offer-content strong {
  font-size: 1.05rem;
}

.best-offer-content span {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ===== Come Funziona ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: relative;
  transition: transform var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Perché Elume ===== */
.perche-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.perche-subtitle {
  max-width: 550px;
  font-size: 1rem;
  line-height: 1.6;
}

.perche-list {
  max-width: 700px;
  margin: 0 auto;
}

.perche-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
}

.perche-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.perche-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.perche-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.perche-cta {
  text-align: center;
  margin-top: 40px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

/* ===== Legal Pages ===== */
.legal-section {
  padding-top: 120px;
}

.legal-container {
  max-width: 800px;
}

.legal-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.legal-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.legal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.legal-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--accent);
}

.legal-card p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card ul {
  list-style: none;
  margin: 10px 0;
}

.legal-card ul li {
  position: relative;
  padding: 6px 0 6px 20px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}

.legal-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-card a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.legal-card a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.legal-card strong {
  color: var(--text-primary);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 12px 0;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.5;
}

.legal-table th {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* Privacy consent checkbox */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 520px;
  margin: 16px auto 0;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.consent-row label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.consent-row label a {
  color: var(--accent);
  text-decoration: none;
}

.consent-row label a:hover {
  text-decoration: underline;
}

/* Condominio flag toggle */
.condo-flag-row {
  max-width: 520px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.condo-flag-question {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.condo-toggle-group {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.condo-toggle-btn {
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.condo-toggle-btn:first-child {
  border-radius: 8px 0 0 8px;
}

.condo-toggle-btn:last-child {
  border-radius: 0 8px 8px 0;
  border-left: none;
}

.condo-toggle-btn[data-active="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.condo-toggle-btn[data-active="true"] + .condo-toggle-btn {
  border-left-color: var(--accent);
}

/* Prezzo fisso notice */
.prezzo-fisso-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(201, 162, 0, 0.06);
  border: 1px solid rgba(201, 162, 0, 0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.prezzo-fisso-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.prezzo-fisso-notice p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.prezzo-fisso-notice a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.prezzo-fisso-notice a:hover {
  text-decoration: underline;
}

/* Badge condominio */
.elume-type-condominio {
  background: rgba(76, 175, 80, 0.12);
  color: #2E7D32;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Prezzo Energia & PCV Badges ===== */
.prezzo-energia-badge {
  font-weight: 700;
  color: var(--accent);
}

.pcv-badge {
  font-weight: 500;
}

.pcv-alto {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
}

/* ===== User Offer Done Savings ===== */
.offer-done-savings {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

.offer-done-savings.savings-positive {
  color: var(--success);
}

.offer-done-savings.savings-negative {
  color: var(--danger);
}

/* ===== Feedback Section ===== */
.feedback-section {
  margin-top: 24px;
  text-align: center;
}

.feedback-section h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.feedback-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.feedback-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.feedback-si {
  background: var(--accent);
  color: #fff;
  border: none;
}

.feedback-si:hover {
  background: var(--accent-hover);
}

.feedback-no {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--text-muted);
}

.feedback-no:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.feedback-contatto {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.feedback-contatto:hover {
  background: rgba(52, 211, 153, 0.25);
}

.feedback-success {
  margin-top: 16px;
}

.feedback-success p {
  color: var(--success);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ===== Monitoraggio Page ===== */
.nav-active {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

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

.monitor-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.monitor-feature-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform var(--transition);
}

.monitor-feature-card:hover {
  transform: translateY(-4px);
}

.monitor-feature-icon {
  margin-bottom: 16px;
}

.monitor-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.monitor-feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.device-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform var(--transition);
}

.device-card:hover {
  transform: translateY(-4px);
}

.device-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.device-info > p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.device-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.device-spec:last-child {
  border-bottom: none;
}

.device-spec-label {
  color: var(--text-muted);
  font-weight: 500;
}

.device-spec-value {
  font-weight: 600;
  color: var(--text-primary);
}

.cta-section {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.08) 0%, rgba(232, 122, 46, 0.06) 100%);
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content .section-subtitle {
  margin-bottom: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .results-summary-bar {
    gap: 8px;
    padding: 14px 16px;
  }

  .summary-item {
    padding: 4px 12px;
  }

  .summary-value {
    font-size: 0.9rem;
    max-width: 140px;
  }

  .summary-divider {
    height: 24px;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

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

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

  .device-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .device-spec {
    justify-content: space-between;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .file-preview {
    flex-direction: column;
    text-align: center;
  }

  .file-info {
    justify-content: center;
  }

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

  .offer-upload-grid {
    grid-template-columns: 1fr;
  }

  .elume-offer-card {
    padding: 16px;
  }

  .elume-offer-price {
    font-size: 1.3rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .cost-comp-label {
    width: 80px;
    font-size: 0.82rem;
  }

  .cost-comp-value {
    width: 60px;
    font-size: 0.82rem;
  }

  .cost-comp-pct {
    width: 40px;
    font-size: 0.75rem;
  }

  .verdetto-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .results-summary-bar {
    flex-direction: column;
    gap: 4px;
  }

  .summary-divider {
    width: 80%;
    height: 1px;
    margin: 4px 0;
  }

  .summary-item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 6px 4px;
  }

  .monitor-features-grid {
    grid-template-columns: 1fr;
  }

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

  .perche-item {
    gap: 12px;
  }

  .upload-area {
    padding: 16px 20px;
  }

  .detail-card {
    padding: 20px;
  }
}

/* ===== Print Styles ===== */
@media print {
  @page {
    size: A4;
    margin: 15mm 12mm;
  }

  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --accent: #B8860B;
    --border: #dddddd;
  }

  body {
    background: #fff;
    background-image: none;
    color: #1a1a1a;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide non-essential sections */
  .header,
  .hero,
  .upload-section,
  #come-funziona,
  #vantaggi,
  .footer,
  .btn-export,
  .no-print,
  .offer-slot-upload,
  .offer-slot-preview,
  .offer-slot-loading,
  .offer-slot-error,
  .offer-slot-done,
  .confronta-intro,
  .ateco-input-row,
  .ateco-intro,
  .lead-form,
  .results-overlay,
  .consent-row,
  .condo-flag-row,
  .prezzo-fisso-notice,
  .bill-preview-card,
  .page-lightbox,
  .feedback-section {
    display: none !important;
  }

  /* Remove blur for print */
  .results-blurred {
    filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
  }

  /* Show results section */
  .results-section {
    display: block !important;
    padding: 0;
    animation: none;
  }

  .results-section .container {
    padding: 0;
    max-width: 100%;
  }

  /* Results header */
  .results-header {
    justify-content: flex-start;
    margin-bottom: 16px;
  }

  .results-header .section-title {
    font-size: 1.6rem;
    text-align: left;
  }

  /* Cards */
  .result-card {
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: none;
  }

  .result-card.highlight {
    border-color: var(--accent);
    background: rgba(245, 197, 24, 0.05);
  }

  .result-card.pcv-card {
    border-color: #C4B5FD;
    background: rgba(168, 85, 247, 0.05);
  }

  .detail-card {
    border: 1px solid #ddd;
    background: #fff;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .detail-card h3 {
    border-bottom-color: #ddd;
  }

  .detail-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    flex-direction: row !important;
    align-items: center;
  }

  /* Badge colors in print */
  .tipo-utenza-domestico,
  .periodicita-mensile {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .tipo-utenza-business,
  .periodicita-bimestrale {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pun-badge.badge-success,
  .pun-badge.badge-danger {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* PCV row */
  .detail-row.pcv-row {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Charts - ensure they print */
  .chart-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .chart-container canvas {
    max-width: 100%;
  }

  /* Comparison table */
  .comparison-table-wrap {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .comparison-table th,
  .comparison-table td {
    border-bottom-color: #ddd;
  }

  .comparison-table .col-current {
    background: rgba(245, 197, 24, 0.05);
  }

  .saving-positive {
    color: #1a9e4e !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .saving-negative {
    color: #c0392b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Best offer banner */
  .best-offer-banner {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: avoid;
  }

  /* Anomalies */
  .anomali-item {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Savings breakdown */
  .breakdown-card {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid #ddd;
    background: #fff;
  }

  .breakdown-total {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Suggestions */
  .sugg-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border: 1px solid #ddd;
  }

  .sugg-card.sugg-critico {
    border-left: 4px solid #DC2626;
    background: rgba(248, 113, 113, 0.05);
  }

  .sugg-card.sugg-migliorabile {
    border-left: 4px solid #D97706;
    background: rgba(251, 146, 60, 0.05);
  }

  .sugg-card.sugg-positivo {
    border-left: 4px solid #059669;
    background: rgba(52, 211, 153, 0.05);
  }

  /* Cost composition */
  .cost-stacked-bar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cost-bar-segment,
  .cost-comp-bar,
  .cost-comp-dot {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Verdetto */
  .verdetto-card {
    page-break-inside: avoid;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .semaforo-light {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .semaforo-light.active {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    box-shadow: none;
  }

  /* Source notes */
  .card-source-note,
  .result-source {
    color: #888;
  }

  .results-intro {
    color: #555;
    margin-bottom: 20px;
  }

  /* Print branding - show at bottom */
  .print-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    color: #888;
  }

  .print-logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
  }

  .print-date {
    font-size: 0.8rem;
  }

  /* Elume cards in print */
  .elume-offer-card {
    background: #fff;
    border: 1px solid #ddd;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .elume-offer-card:hover {
    transform: none;
    box-shadow: none;
  }

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

  #offerSlot2 {
    display: none !important;
  }

  .col-elume {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ===== Homepage: Il Problema ===== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto 32px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.problem-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.problem-icon {
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.problem-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.problem-closing {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}

/* ===== Homepage: Il Metodo ===== */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition);
}

.method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.method-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1;
}

.method-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.method-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Homepage: Servizi ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.service-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.service-link:hover {
  color: var(--accent-hover);
}

/* ===== Homepage: I Numeri ===== */
.stats-section {
  background: var(--text-primary);
  padding: 64px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* ===== Homepage: Chi c'è dietro ===== */
.about-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-text {
  margin-bottom: 48px;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.value-icon {
  margin-bottom: 16px;
}

.value-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Homepage: Hero CTA buttons ===== */
.hero-home .hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary.btn-lg {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-secondary.btn-lg:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Homepage responsive ===== */
@media (max-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .method-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-home .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .method-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Hero Fullscreen con Ken Burns ===== */
.hero-fullscreen {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background:
    url('../assets/hero-bg.jpg') center center / cover no-repeat,
    linear-gradient(135deg, #1a1d23 0%, #2d3748 40%, #1a1d23 100%);
  animation: kenBurns 25s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-1.5%, -1%);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}

.hero-fullscreen-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero-fullscreen-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-fullscreen-title strong {
  color: var(--accent-hover);
}

.hero-fullscreen-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-fullscreen-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-white {
  background: #FFFFFF;
  color: var(--text-primary);
  border: none;
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-white:hover {
  background: var(--accent-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.3);
}

.btn-outline-white {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255,255,255,0.6);
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

/* ===== Header Transparent (per hero fullscreen) ===== */
.header-transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

.header-transparent .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}

.header-transparent .nav-links a:hover,
.header-transparent .nav-links a.nav-active {
  color: var(--accent-hover);
}

.header-transparent .mobile-menu-btn span {
  background: #FFFFFF;
}

/* Logo swap: always white on homepage (header bg is always dark) */
.logo-white {
  display: none;
}

.header-transparent .logo-dark {
  display: none;
}

.header-transparent .logo-white {
  display: block;
}

.header-transparent.header-scrolled {
  background: rgba(26, 29, 35, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Mission & Vision ===== */
.mission-section,
.vision-section {
  padding: 80px 0;
}

.mission-block,
.vision-block {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.mission-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  background: var(--accent-glow);
  padding: 6px 16px;
  border-radius: 20px;
}

.mission-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 24px;
}

.mission-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

.vision-section {
  background: var(--bg-secondary);
}

/* ===== Hero Fullscreen responsive ===== */
@media (max-width: 768px) {
  .hero-fullscreen {
    min-height: 500px;
  }

  .hero-fullscreen-title {
    font-size: 2.2rem;
  }

  .hero-fullscreen-subtitle {
    font-size: 1.05rem;
  }

  .mission-title {
    font-size: 1.5rem;
  }

  .mission-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-fullscreen-title {
    font-size: 1.8rem;
  }

  .hero-fullscreen {
    min-height: 450px;
  }
}

/* ===== Guide Download Modal ===== */
.guide-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

.guide-modal-overlay.hidden {
  display: none;
}

.guide-modal {
  position: relative;
  max-width: 520px;
  width: 100%;
  animation: fadeInUp 0.35s ease;
}

.guide-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--text-primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition);
}

.guide-modal-close:hover {
  background: var(--danger);
}

.guide-modal .lead-form {
  margin: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.guide-form-error {
  color: var(--danger);
  font-size: 0.88rem;
  text-align: center;
  margin-top: 12px;
}

.guide-form-error.hidden {
  display: none;
}

.guide-form-success {
  text-align: center;
  padding: 16px;
  margin-top: 12px;
  background: #ECFDF5;
  border-radius: 8px;
}

.guide-form-success.hidden {
  display: none;
}

.guide-form-success p {
  color: #059669;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Condomini Page ===== */
.condo-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Pilastri */
.condo-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.condo-pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.condo-pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.condo-pillar-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.condo-pillar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.condo-pillar p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Confronto */
.condo-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.condo-compare-col {
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}

.condo-compare-col h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.condo-compare-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.condo-compare-col li {
  font-size: 0.92rem;
  line-height: 1.5;
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}

.condo-compare-col li::before {
  display: inline-block;
  margin-top: 2px;
  font-size: 1rem;
}

.condo-compare-before {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.condo-compare-before h3 {
  color: var(--text-main);
}

.condo-compare-before li {
  color: var(--text-muted);
}

.condo-compare-before li::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center;
  flex-shrink: 0;
}

.condo-compare-after {
  background: var(--bg-card);
  border: 2px solid var(--accent);
}

.condo-compare-after h3 {
  color: var(--text-main);
}

.condo-compare-after li {
  color: var(--text-main);
}

.condo-compare-after li::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23C9A200' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
  flex-shrink: 0;
}

/* Steps 4 colonne */
.steps-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* CTA buttons row */
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Trasformazione banner */
.condo-trasformazione-section {
  padding: 0;
}

.condo-trasformazione {
  background: linear-gradient(135deg, #F5C800, #E8B400);
  border-radius: 20px;
  padding: 48px 56px;
  text-align: center;
  color: #1A1D23;
}

.condo-trasformazione-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.condo-trasformazione-icon {
  font-size: 28px;
  line-height: 1;
}

.condo-trasformazione-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1A1D23;
  margin: 0;
}

.condo-trasformazione-subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1A1D23;
  margin-bottom: 16px;
}

.condo-trasformazione-text {
  font-size: 1.05rem;
  color: rgba(26, 29, 35, 0.85);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.condo-trasformazione-text strong {
  color: #1A1D23;
  font-weight: 700;
}

@media (max-width: 768px) {
  .condo-pillars {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .condo-compare {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .condo-trasformazione {
    padding: 32px 24px;
  }

  .condo-trasformazione-header h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .steps-grid-4 {
    grid-template-columns: 1fr;
  }

  .condo-trasformazione-header {
    flex-direction: column;
    gap: 8px;
  }

  .condo-trasformazione-header h2 {
    font-size: 1.25rem;
  }
}

/* ===== Fotovoltaico: Calcolatore ===== */
.pv-calculator {
  max-width: 700px;
  margin: 0 auto;
}

.pv-calc-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.pv-calc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

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

.pv-input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pv-input-group input {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.pv-input-group input:focus {
  border-color: var(--accent);
}

.pv-input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.pv-condo-toggle {
  margin-bottom: 24px;
}

.pv-toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.pv-toggle-label input[type="checkbox"] {
  display: none;
}

.pv-toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}

.pv-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.pv-toggle-label input:checked + .pv-toggle-switch {
  background: var(--accent);
}

.pv-toggle-label input:checked + .pv-toggle-switch::after {
  transform: translateX(20px);
}

.pv-calc-btn {
  width: 100%;
}

/* PV Results */
.pv-calc-results {
  margin-top: 32px;
  animation: fadeInUp 0.5s ease;
}

.pv-totale-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 1rem;
}

.pv-totale-bar strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pv-results-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.pv-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.pv-result-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-bottom: 8px;
}

.pv-result-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

/* Savings stack */
.pv-savings-stack {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.pv-saving-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.pv-saving-row span {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pv-saving-row strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.pv-saving-row.pv-saving-gse strong {
  color: var(--success);
}

.pv-saving-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--bg-card), var(--accent-glow));
}

.pv-saving-total span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pv-saving-total strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.pv-battery-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--bg-card), var(--accent-glow));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.pv-battery-box strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.pv-battery-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pv-battery-icon {
  flex-shrink: 0;
  padding-top: 2px;
}

.pv-condo-note {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.pv-condo-note strong {
  display: block;
  font-size: 1rem;
  color: #2563EB;
  margin-bottom: 4px;
}

.pv-condo-note p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pv-condo-note-icon {
  flex-shrink: 0;
  padding-top: 2px;
}

.pv-results-cta {
  text-align: center;
  margin-top: 24px;
}

.pv-results-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.pv-disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.pv-disclaimer-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pv-disclaimer-box strong {
  color: #D97706;
}

/* Upload bolletta per preventivo */
.pv-upload-section {
  margin-top: 32px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pv-upload-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pv-upload-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.pv-upload-area {
  padding: 20px 28px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-secondary);
  margin-bottom: 16px;
}

.pv-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.pv-upload-mobile-actions {
  display: none;
  gap: 12px;
  margin-bottom: 16px;
}

.pv-file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.pv-file-preview .file-info span {
  font-size: 0.9rem;
}

.pv-file-preview #pvFileName {
  font-weight: 600;
}

.pv-file-preview #pvFileSize {
  color: var(--text-muted);
}

.pv-upload-form {
  margin-top: 20px;
}

.pv-upload-form .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pv-upload-form .consent-row label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pv-upload-form .consent-row a {
  color: var(--accent);
}

@media (max-width: 768px) {
  .pv-upload-mobile-actions {
    display: flex;
  }

  .pv-upload-section {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .pv-disclaimer-box {
    flex-direction: column;
    gap: 8px;
  }
}

/* PV Responsive */
@media (max-width: 768px) {
  .pv-calc-inputs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pv-calc-form {
    padding: 24px 20px;
  }

  .pv-results-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .pv-saving-row,
  .pv-saving-total {
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .pv-results-row {
    grid-template-columns: 1fr;
  }

  .pv-saving-row,
  .pv-saving-total {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .pv-totale-bar {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .pv-battery-box,
  .pv-condo-note {
    flex-direction: column;
    gap: 12px;
  }
}
