/* ===== IMPORTA FONT INTER (per le cards) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== BASE STYLES ===== */
html {
  height: 100%;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f5f8fa;
  color: #222;
  line-height: 1.6;
  margin: 0;
  padding: 0;  /* ← CAMBIATO da 20px a 0 */
  min-height: 100vh;  /* ← AGGIUNTO */
  display: flex;  /* ← AGGIUNTO */
  flex-direction: column;  /* ← AGGIUNTO */
}

/* Wrapper per contenuto */
body > *:not(footer) {
  padding: 0 30px;  /* ← Sposta padding qui */
}

header {
  padding: 15px 20px !important;  /* ← Mantieni padding header */
}


h2 {
  margin-top: 30px;
  color: #002855;
  font-size: 1.4rem;
  border-left: 4px solid #0077cc;
  padding-left: 10px;
}

form {
  max-width: 750px;
  background: #fff;
  margin: 20px auto;
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 5px;
}

input, select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

input:focus, select:focus {
  border-color: #0077cc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,119,204,0.15);
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

hr {
  margin: 35px 0 25px 0;
  border: none;
  border-bottom: 2px solid #eee;
}

button.compare-btn {
  width: 100%;
  background: #28a745;
  color: white;
  font-size: 1.1rem;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

button.compare-btn:hover {
  background: #218838;
}

button.secondary-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
}

button.secondary-btn:hover {
  background: #5a6268;
}

#resultsTable {
  margin-top: 25px;
  background: transparent;
  padding: 20px;
  border-radius: 8px;
  box-shadow: none;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
}

/* ===== HEADER CON PULSANTE NUOVA COMPARAZIONE ===== */
header {
  background-color: #002855;
  color: white;
  padding: 15px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  position: relative;
}

header .logo {
  height: 50px;
  flex-shrink: 0;
}

/* header .license-area {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  max-width: 500px;
}

header input#licenseKey {
  flex-grow: 1;
  padding: 10px 15px;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  outline-offset: 2px;
}

header button#verifyLicense {
  padding: 10px 20px;
  border-radius: 6px;
  background-color: #ffb400;
  border: none;
  cursor: pointer;
  font-weight: 700;
  color: #222;
  transition: background-color 0.3s;
}

header button#verifyLicense:hover {
  background-color: #ffa500;
} */

/* Pulsante Nuova Comparazione nell'header - CENTRATO DESKTOP */
header .header-new-comparison {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s;
  white-space: nowrap;
  font-size: 0.95rem;
}

header .header-new-comparison:hover {
  background: #218838;
}

header .header-new-comparison.hidden {
  display: none;
}

/* #licenseStatus {
  min-width: 80px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

#licenseStatus.valid {
  background-color: #28a745;
  color: white;
}

#licenseStatus.invalid {
  background-color: #dc3545;
  color: white;
} */


/* ===== FOOTER FISSO IN BASSO ===== */
footer {
  background-color: #002855;
  color: white;
  padding: 25px 30px;
  text-align: center;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  margin-top: auto;  /* ← CAMBIATO da 50px a auto */
  flex-shrink: 0;  /* ← AGGIUNTO */
  user-select: none;
}


footer .footer-links {
  margin: 10px 0 15px 0;
}

footer .footer-links a {
  color: #eeeeee;
  margin: 0 15px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

footer .footer-links a:hover,
footer .footer-links a:focus {
  color: #ffb400;
  outline: none;
  text-decoration: underline;
}

/* ===== FILE UPLOAD SECTION ===== */
.file-upload-section {
  background: #f9f9f9;
  padding: 20px 25px;
  border-radius: 8px;
  max-width: 750px;
  margin: 30px auto;
  border: 2px dashed #ccc;
  box-sizing: border-box;
}

.file-upload-section h2 {
  margin-bottom: 15px;
  color: #002855;
}

.file-upload-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #002855;
}

.file-upload-section input[type="file"] {
  padding: 10px;
  width: 100%;
  cursor: pointer;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.file-upload-section button {
  background: #dc3545;
  border: none;
  padding: 10px 15px;
  color: white;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.file-upload-section button:hover {
  background: #c82333;
}

#localStorageInfo {
  margin-top: 15px;
  font-size: 0.95rem;
  color: #004085;
  display: flex;
  gap: 10px;
  align-items: center;
}

#fileStatus {
  font-weight: 600;
  margin-top: 10px;
  color: #28a745;
}

/* ===== TESTI CENTRATI ===== */
#agencyHeader {
  text-align: center;
  margin: 20px 0;
  font-size: 1rem;
  color: #1F2937;
}

#agencyHeader p {
  margin: 0;
}

.section-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1F2937;
  margin: 24px 0 16px 0;
}

/* ========================================
   🎨 CARDS OFFERTE - LAYOUT 3 COLONNE
   ======================================== */

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.offer-card {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 18px;
  background: #FFFFFF;
  transition: all 0.2s ease;
}

.offer-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border-color: #3B82F6;
  transform: translateY(-2px);
}

/* ===== LAYOUT 3 COLONNE ===== */
.offer-card-content {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: 20px;
  align-items: start;
}

/* ===== COLONNA SINISTRA: Logo + Sconto ===== */
.card-col-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.stamp-sconto {
  display: inline-block;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
  text-align: center;
  width: 100%;
}

.brand-logo {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  display: block;
}

/* ===== COLONNA CENTRO: Brand, Offerta, Dettagli ===== */
.card-col-center {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.card-col-center h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

.card-col-center .offer-name {
  font-size: 0.9rem;
  color: #6B7280;
  font-weight: 500;
  margin: 0 0 12px 0;
  text-align: center;
}

/* Riquadro dettagli con bordo, divisore centrale e margine */
.card-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: calc(100% - 20px);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
}

.card-detail-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

/* COLONNA SINISTRA: testo allineato a destra (verso centro) */
.card-detail-col:first-child {
  border-right: 1px solid #E5E7EB;
  text-align: right;
}

/* COLONNA DESTRA: testo allineato a sinistra */
.card-detail-col:last-child {
  text-align: left;
}

.card-detail-col p {
  font-size: 0.85rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

.card-detail-col strong {
  color: #1F2937;
  font-weight: 600;
}

/* ===== COLONNA DESTRA: Scadenza + Risparmio ===== */
.card-col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  text-align: right;
}

.card-col-right .scadenza {
  font-size: 0.8rem;
  color: #6B7280;
  margin: 0;
}

.risparmio-box {
  border-radius: 8px;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risparmio-annuo {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.25);
}

.risparmio-annuo strong {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

.risparmio-giornaliero {
  color: #6B7280;
  padding: 8px 14px;
  font-size: 0.8rem;
  text-align: center;
}

.risparmio-giornaliero strong {
  color: #10B981;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== NOTE (sotto le 3 colonne) ===== */
.card-bottom {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #E5E7EB;
  font-size: 0.8rem;
  color: #6B7280;
  line-height: 1.5;
}

.card-bottom p {
  margin: 0;
}

.card-bottom strong {
  color: #1F2937;
  font-weight: 600;
}

/* ========================================
   📋 CARD "TUA OFFERTA" - IDENTICA ALLE ALTRE
   ======================================== */

/* ========================================
   📋 CARD "TUA OFFERTA" - PIÙ PICCOLA E CENTRALE
   ======================================== */

.current-offer-card {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 16px; /* PIÙ PICCOLO: 16px invece di 18px */
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  width: 85%; /* PIÙ PICCOLA: 85% invece di 100% */
  max-width: 850px; /* MAX-WIDTH PIÙ PICCOLO: 850px invece di 1000px */
  margin-left: auto; /* CENTRALE */
  margin-right: auto; /* CENTRALE */
  transition: all 0.2s ease;
}

.current-offer-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border-color: #3B82F6;
  transform: translateY(-2px);
}

/* Header SENZA logo */
.current-offer-card .card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px; /* GAP PIÙ PICCOLO */
  margin-bottom: 14px; /* MARGINE PIÙ PICCOLO */
}

.current-offer-card h3 {
  font-size: 1rem; /* FONT PIÙ PICCOLO: 1rem invece di 1.1rem */
  font-weight: 600;
  color: #1F2937;
  margin: 0;
  text-align: center;
}

.current-offer-card .cliente-info p {
  font-size: 0.85rem; /* FONT PIÙ PICCOLO: 0.85rem invece di 0.9rem */
  color: #6B7280;
  margin: 0;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Linea divisoria */
.current-offer-card .divider {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 14px 0; /* MARGINE PIÙ PICCOLO */
}

/* Grid 3 colonne */
.current-offer-card .offerta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px; /* GAP PIÙ PICCOLO: 14px invece di 16px */
  margin-top: 14px;
}

.current-offer-card .offerta-col {
  background: #F9FAFB;
  padding: 12px; /* PADDING PIÙ PICCOLO: 12px invece di 14px */
  border-radius: 8px;
  text-align: center;
  border: 1px solid #E5E7EB;
}

.current-offer-card .offerta-col-label {
  font-size: 0.75rem; /* FONT PIÙ PICCOLO */
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px; /* MARGINE PIÙ PICCOLO */
  display: block;
}

.current-offer-card .offerta-col-value {
  font-size: 1rem; /* FONT PIÙ PICCOLO: 1rem invece di 1.1rem */
  font-weight: 700;
  color: #1F2937;
  display: block;
}


/* Animazioni smooth */
@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.offer-card, .current-offer-card {
  animation: fadeInCard 0.3s ease-out;
}

.offer-card:nth-child(1) { animation-delay: 0.05s; }
.offer-card:nth-child(2) { animation-delay: 0.1s; }
.offer-card:nth-child(3) { animation-delay: 0.15s; }
.offer-card:nth-child(4) { animation-delay: 0.2s; }
.offer-card:nth-child(5) { animation-delay: 0.25s; }

/* ========================================
   📱 RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: stretch;
  }
  
  /* MOBILE: Pulsante sotto tutti gli elementi */
  header .header-new-comparison {
    position: static;
    transform: none;
    order: 3;
    margin-top: 15px;
    width: 100%;
  }
  
  /* header .license-area {
    max-width: 100%;
    order: 2;
  } */
  
  header .logo {
    order: 1;
    align-self: center;
  }
  
  .cards-container {
    max-width: 100%;
    gap: 14px;
    padding: 0 16px;
  }
  
  .offer-card, .current-offer-card {
    padding: 16px;
  }
  
  .offer-card-content {
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  
  .card-col-right {
    grid-column: 1 / -1;
    align-items: stretch;
    text-align: left;
  }
  
  .card-details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }
  
  .card-detail-col:first-child {
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
  }
  
  .current-offer-card .offerta-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ========================================
   📱 RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .cards-container {
    padding: 0 12px;
  }
  
  .offer-card, .current-offer-card {
    padding: 14px;
    margin-left: 0;
    margin-right: 0;
  }
  
  .offer-card-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .card-col-left {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .brand-logo {
    max-width: 80px;
    max-height: 40px;
  }
  
  .stamp-sconto {
    font-size: 0.7rem;
    padding: 4px 8px;
    width: auto;
  }
  
  .card-col-center h4 {
    font-size: 1rem;
  }
  
  .card-col-center .offer-name {
    font-size: 0.85rem;
  }
  
  .card-details-grid {
    width: 100%;
  }
  
  .card-detail-col {
    text-align: left !important;
  }
  
  .card-detail-col:first-child {
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
  }
  
  .card-detail-col p {
    font-size: 0.8rem;
  }
  
  .risparmio-annuo {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
  
  .risparmio-annuo strong {
    font-size: 1rem;
  }
  
  .risparmio-giornaliero {
    font-size: 0.75rem;
  }
  
  .current-offer-card .offerta-col {
    padding: 12px;
  }
  
  .current-offer-card .offerta-col-label {
    font-size: 0.75rem;
  }
  
  .current-offer-card .offerta-col-value {
    font-size: 1rem;
  }
}

/* ===== PULSANTE SCARICA PDF ===== */
.pdf-download-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  padding: 20px 0;
}

.pdf-download-btn {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.pdf-download-btn:hover {
  background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.pdf-download-btn:active {
  transform: translateY(0);
}

.pdf-download-btn:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== PULSANTE SCARICA PDF ===== */
.pdf-download-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  padding: 20px 0;
}

.pdf-download-btn {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.pdf-download-btn:hover {
  background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.pdf-download-btn:active {
  transform: translateY(0);
}

.pdf-download-btn:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Card "Tua Offerta" più piccola e centrata */
.current-offer-card {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  width: 85%;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.2s ease;
}
/* ===================================
   LOGIN PAGE STYLES
   =================================== */

/* =========================================
   LOGIN PAGE - SOLO SEZIONE MODIFICATA
   ========================================= */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg, 
    var(--color-primary) 0%, 
    var(--color-primary-active) 100%
  );
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Sfondo decorativo animato */
.login-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -250px;
  right: -250px;
  animation: floatBg 20s ease-in-out infinite;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  bottom: -200px;
  left: -200px;
  animation: floatBg 15s ease-in-out infinite reverse;
}

@keyframes floatBg {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, -30px) rotate(180deg); }
}

/* Card SCURA con gradiente */
.login-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(
    135deg,
    rgba(30, 33, 36, 0.98) 0%,
    rgba(38, 42, 48, 0.98) 100%
  );
  padding: 48px 40px;
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease-standard);
}

.login-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Logo section */
.logo {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.logo::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(
    90deg, 
    transparent, 
    var(--color-primary), 
    transparent
  );
  margin: 16px auto 0;
  border-radius: 3px;
}

.logo h2 {
  color: var(--color-primary);
  margin: 0;
  font-size: 32px;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(var(--color-teal-500-rgb), 0.5);
}

/* Titolo BIANCO per contrasto su fondo scuro */
.login-page h1 {
  font-size: 24px;
  font-weight: var(--font-weight-semibold);
  text-align: center;
  margin-bottom: 8px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* Subtitle CHIARO */
.subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  font-weight: var(--font-weight-normal);
}

/* Footer con testo chiaro */
.login-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--font-size-sm);
}

.login-footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-fast) var(--ease-standard);
  position: relative;
}

.login-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--duration-normal) var(--ease-standard);
}

.login-footer a:hover {
  color: var(--color-primary-hover);
  text-shadow: 0 0 10px rgba(var(--color-teal-500-rgb), 0.5);
}

.login-footer a:hover::after {
  width: 100%;
}

.login-footer p {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-xs);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
    border-radius: 16px;
  }
  
  .logo h2 {
    font-size: 28px;
  }
  
  .login-page h1 {
    font-size: 20px;
  }
}

/* =========================================
   BUTTON LOGIN + LINK STYLING
   ========================================= */

/* Pulsante Accedi - MODERNO e CENTRATO */
.btn--primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  background: linear-gradient(
    135deg, 
    var(--color-primary) 0%, 
    var(--color-primary-hover) 100%
  );
  color: var(--color-btn-primary-text);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  box-shadow: 
    0 4px 12px rgba(var(--color-teal-500-rgb), 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

/* Effetto shimmer al hover */
.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn--primary:hover::before {
  left: 100%;
}

.btn--primary:hover {
  background: linear-gradient(
    135deg, 
    var(--color-primary-hover) 0%, 
    var(--color-primary-active) 100%
  );
  box-shadow: 
    0 6px 20px rgba(var(--color-teal-500-rgb), 0.5),
    0 4px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(var(--color-teal-500-rgb), 0.3),
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Icona dentro il pulsante (opzionale) */
.btn--primary::after {
  content: '→';
  margin-left: 4px;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.btn--primary:hover::after {
  transform: translateX(4px);
}

/* =========================================
   LINK "Password dimenticata?" 
   ========================================= */

/* Container per link "Password dimenticata?" */
.forgot-password-wrapper {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 24px;
}

.forgot-password-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-fast) var(--ease-standard);
  position: relative;
  display: inline-block;
}

.forgot-password-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  transition: width var(--duration-normal) var(--ease-standard);
}

.forgot-password-link:hover {
  color: rgba(255, 255, 255, 0.95);
}

.forgot-password-link:hover::after {
  width: 100%;
}

/* =========================================
   FOOTER - Link uniformi
   ========================================= */

.login-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--font-size-sm);
}

/* Testo "Non hai un account?" */
.login-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* Link "Crea account di test" - STESSO COLORE */
.login-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-fast) var(--ease-standard);
  position: relative;
  display: inline-block;
  margin-left: 4px;
}

.login-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  transition: width var(--duration-normal) var(--ease-standard);
}

.login-footer a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.login-footer a:hover::after {
  width: 100%;
}

/* Responsive */
@media (max-width: 480px) {
  .btn--primary {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .forgot-password-link,
  .login-footer a {
    font-size: 13px;
  }
}




/* ===================================
   DASHBOARD PAGE STYLES
   =================================== */

.dashboard-page {
  min-height: 100vh;
  background: var(--color-background);
}

.dashboard-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content .logo {
  color: var(--color-primary);
  margin: 0;
  font-size: var(--font-size-2xl);
}

.dashboard-main {
  padding: 40px 20px;
  max-width: 1200px;
}

.welcome-section {
  margin-bottom: 40px;
}

.welcome-section h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: 8px;
  color: var(--color-text);
}

.subscription-card {
  margin-bottom: 40px;
}

.subscription-status {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.status-badge {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.subscription-details {
  flex: 1;
}

.subscription-details p {
  margin-bottom: 12px;
  color: var(--color-text);
}

.loading {
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Actions Grid */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.action-card {
  background: var(--color-surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
}

.action-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.action-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-card--disabled:hover {
  transform: none;
  border-color: var(--color-border);
  box-shadow: none;
}

.action-card__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.action-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: 8px;
  color: var(--color-text);
}

.action-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  background: var(--color-secondary);
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

/* Responsive */
@media (max-width: 768px) {
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-main {
    padding: 24px 16px;
  }
}


/* ===================================
   APP HEADER STYLES
   =================================== */

.app-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.app-header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header .logo {
  color: var(--color-primary);
  margin: 0;
  font-size: var(--font-size-xl);
}

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

/* Responsive */
@media (max-width: 768px) {
  .app-nav {
    gap: 8px;
  }
  
  .app-nav .btn {
    font-size: var(--font-size-sm);
    padding: 8px 12px;
  }
}

/* Alert styles */
.alert {
  padding: 16px;
  border-radius: var(--radius-base);
  margin-bottom: 20px;
  font-size: var(--font-size-base);
}

.alert--error {
  background: rgba(var(--color-error-rgb), 0.1);
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb), 0.3);
}

.alert strong {
  display: block;
  margin-bottom: 8px;
  font-weight: var(--font-weight-semibold);
}


/* credits-widget.css */
.credits-widget {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.credits-count {
  text-align: center;
  margin-bottom: 15px;
}

.credits-count .number {
  display: block;
  font-size: 48px;
  font-weight: bold;
}

.credits-count .label {
  display: block;
  font-size: 14px;
  opacity: 0.9;
}

.credits-count.low .number {
  color: #ffeb3b;
}

.credits-details {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 15px;
  margin-top: 15px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.btn-buy-credits {
  width: 100%;
  margin-top: 15px;
  background: #fff;
  color: #667eea;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-buy-credits:hover {
  transform: scale(1.02);
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.modal-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 20px;
}

.credit-offer {
  background: #f5f7fa;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  text-align: center;
}

.offer-credits {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.offer-price {
  display: block;
  font-size: 32px;
  font-weight: bold;
  color: #667eea;
  margin-top: 10px;
}


