body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #007bff;
  margin-right: 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #333;
  color: white;
}

.navbar-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar-menu li {
  margin-right: 15px;
}

.navbar-menu li a {
  color: white;
  text-decoration: none;
}

#navbar-welcome-msg {
  font-weight: bold;
  color: white;
}


.container {
  display: flex;
  height: calc(100vh - 50px);
}

.sidebar {
  width: 220px;
  background-color: #333;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 40px;
}


.sidebar a {
  display: block;
  color: white;
  margin-bottom: 10px;
  text-decoration: none;
}

.sidebar a.active {
  background-color: #555;
  border-radius: 5px;
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: white;
}

.route-section {
  display: none;
}

input, button {
  display: block;
  margin: 10px 0;
  padding: 8px;
  width: 100%;
  max-width: 400px;
}

button {
  background-color: #007bff;
  color: white;
  border: none;
}

button:hover {
  background-color: #0056b3;
}

#sezione_intestazione {
  background-color: #eee;
  padding: 15px;
  margin-bottom: 20px;
}
.banner-nuovo {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 16px;
  margin: 20px 0;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.banner-nuovo button {
  margin-top: 10px;
  background-color: #ffc107;
  color: #212529;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.banner-nuovo button:hover {
  background-color: #e0a800;
}

.sidebar a[style*="opacity: 0.5"] {
  cursor: not-allowed;
}
#toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #323232;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
  font-weight: bold;
}

.toast-show {
  opacity: 1;
}

.toast-hidden {
  opacity: 0;
}
.token-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.btn-indietro {
  margin-top: 15px;
  background-color: #444;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-indietro:hover {
  background-color: #666;
}
.marketplace-container {
  overflow-x: auto;
  margin-top: 15px;
}

/* 🌟 Stile base per tutte le tabelle (Marketplace, Home, Riepilogo) */
.marketplace-table {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 14px;
  background-color: #fff;
}

/* Header della tabella */
.marketplace-table thead {
  background-color: #333;
  color: #fff;
  font-size: 15px;
}

/* Celle della tabella */
.marketplace-table th, 
.marketplace-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}



/* Allineamento a destra per colonne numeriche */
.marketplace-table td:nth-child(4),
.marketplace-table td:nth-child(5),
.marketplace-table td:nth-child(6),
.marketplace-table td:nth-child(7) {
  text-align: right;
  font-weight: bold;
}

/* Hover sulle righe */
.marketplace-table tbody tr:hover {
  background-color: #f2f2f2;
}

.marketplace-table td img {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}
/* Profitto verde o rosso */
.marketplace-table td[style*='color: green'] {
  font-weight: bold;
}
.marketplace-table td[style*='color: red'] {
  font-weight: bold;
}

.marketplace-table td img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.marketplace-table button {
  margin: 2px;
  padding: 5px 8px;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.marketplace-table button:hover {
  background-color: #ddd;
}
.marketplace-table th.text-right {
  text-align: right;
  
}



.box-messaggio {
  background-color: #f5f5f5;
  border-left: 5px solid #28a745;
  padding: 10px 15px;
  margin: 10px 0;
  border-radius: 4px;
  font-family: monospace;
  line-height: 1.4;
  white-space: pre-line;
}

#grafico-token {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 🌟 Stile standard-table per tutte le tabelle a 7 colonne */



.standard-container {
  overflow-x: auto;
  margin-top: 15px;
}

#grafico-layout {
  display: flex;
}

#grafico-area {
  flex: 1;
  padding: 10px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
}

#grafico-token {
  width: 100%;
  height: 400px; /* Altezza fissa del canvas */
}

#token-sidebar {
  width: 250px;
  border-right: 1px solid #ddd;
  padding: 10px;
}

.token-list button {
  display: block;
  width: 100%;
  margin-bottom: 5px;
  padding: 10px;
  text-align: left;
  background-color: #007bff; /* Blu brillante */
  color: white;               /* Testo bianco */
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.token-list button:hover {
  background-color: #0056b3; /* Blu più scuro al passaggio mouse */
}

#grafico-area {
  position: relative;
  min-height: auto;        /* ❌ via il limite forzato */
  max-height: none;        /* ❌ via blocco scroll */
  overflow: visible;       /* ✅ lascia scorrere i contenuti */
  background-color: white;
  border-radius: 8px;
  padding-top: 20px;
}


#grafico-area {
   position: relative; /* 🔥 Importante per posizionare il bottone */
   min-height: 400px;
   max-height: 500px;
   overflow: hidden;
   background-color: white; /* opzionale, per pulizia visiva */
   border-radius: 8px; /* arrotondiamo un po' */
   padding-top: 40px; /* spazio sopra per il bottone */
}

#grafico-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#nome-token-attivo {
  font-size: 18px;
  margin: 0;
  color: #333;
}

#reset-zoom {
  padding: 6px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#reset-zoom:hover {
  background-color: #0056b3;
}

.standard-table thead {
  background-color: #333;  /* Sfondo scuro */
  color: #fff;              /* Testo bianco */
  font-size: 15px;
}

/* Logo in cella */
.standard-table td:first-child img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}


/* Colonne specifiche per allineamento coerente */
.standard-table td:nth-child(1),
.standard-table th:nth-child(1),
.standard-table td:nth-child(2),
.standard-table th:nth-child(2) {
  text-align: left;
}

.standard-table th:nth-child(3),
.standard-table td:nth-child(3),
.standard-table th:nth-child(4),
.standard-table td:nth-child(4),
.standard-table th:nth-child(5),
.standard-table td:nth-child(5) {

  text-align: right;
  font-weight: bold;
}

/* Colonna 6: Aggiungi Token → centrata */
.standard-table td:nth-child(6),
.standard-table th:nth-child(6) {
  text-align: center;
}

/* Input che occupa fino al 90% della cella */
.standard-table td:nth-child(6) input[type="number"] {
  width: 90%;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box; /* 🔥 fondamentale per non sforare */
}


.standard-table td:nth-child(7),
.standard-table th:nth-child(7) {
  margin: 2px;
  min-width: 100px;
  text-align: center;
}




.standard-table button {
  margin: 2px;
  padding: 4px 8px;
  font-size: 13px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.standard-table button:hover {
  background-color: #0056b3;
}

/* Riga con spaziatura uniforme */
.standard-table tr {
  vertical-align: middle;
}

/* Tabella ordinata */
.standard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  /*border: 2px solid #444; ✅ bordo esterno ben visibile */
}

.standard-table th, .standard-table td {
  padding: 3px;
  border-bottom: 1px solid #ddd;
  /*border: 1px solid #999;  ✅ bordo interno tra le celle */
}

/* === 📊 POSIZIONI IN LEVA === */

.tabella-leva {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 14px;
  background-color: #fff;
  border: 2px solid #444;
  table-layout: auto;
}

.tabella-leva thead {
  background-color: #333;
  color: #fff;
  font-size: 15px;
}

.tabella-leva th,
.tabella-leva td {
  padding: 8px 6px;
  border: 1px solid #999;
  vertical-align: middle;
}

/* Nome: sinistra */
.tabella-leva th:nth-child(1),
.tabella-leva td:nth-child(1) {
  text-align: left;
}

/* Prezzo, Importo, Prestito, Leva, Cassa, Incremento: allineati a destra */
.tabella-leva th:nth-child(2),
.tabella-leva td:nth-child(2),
.tabella-leva th:nth-child(3),
.tabella-leva td:nth-child(3),
.tabella-leva th:nth-child(4),
.tabella-leva td:nth-child(4),
.tabella-leva th:nth-child(5),
.tabella-leva td:nth-child(5),
.tabella-leva th:nth-child(6),
.tabella-leva td:nth-child(6),
.tabella-leva th:nth-child(7),
.tabella-leva td:nth-child(7) {
  text-align: right;
  font-weight: bold;
}

/* Data Sblocco: centro */
.tabella-leva th:nth-child(8),
.tabella-leva td:nth-child(8) {
  text-align: center;
}

/* Stato: centro */
.tabella-leva th:nth-child(9),
.tabella-leva td:nth-child(9) {
  text-align: center;
}

/* Input: colonna 10 */
.tabella-leva td:nth-child(10) input[type="number"] {
  width: 90%;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

/* Bottoni colonna 11: affiancati e centrati */
.tabella-leva th:nth-child(11),
.tabella-leva td:nth-child(11) {
  text-align: center;
}

.tabella-leva td:nth-child(11) button {
  margin: 2px;
  padding: 5px 10px;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

.tabella-leva td:nth-child(11) button:hover {
  background-color: #0056b3;
}



.token-detail-box input {
  margin-bottom: 10px;
  padding: 6px 10px;
  font-size: 14px;
}



.token-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.token-info-list {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
}

.token-info-list li {
  margin: 6px 0;
  font-size: 15px;
}

.token-actions {
  margin-top: 20px;
  display: flex;
  text-align: center;
  flex-direction: column;
  gap: 10px;
}

.token-actions input {
  padding: 8px;
  font-size: 14px;
  width: 100%;
}

.token-actions button {
  padding: 8px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

.token-actions button:hover {
  background-color: #0056b3;
}

.token-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin: 10px 0 20px 0;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
}

.btn-reset {
  padding: 4px 10px;
  font-size: 13px;
  background-color: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-reset:hover {
  background-color: #666;
}


.token-btn-group button {
  flex: 1;
  padding: 4px 10px;
  font-size: 14px;
}



.token-btn-group {
  gap: 8px;
  margin-bottom: 8px;
}

/* Wrapper per il bottone finale, sempre centrato */
.btn-market-wrapper {
  text-align: center;
  margin-top: 15px;
  width: 100%;
}




.token-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.token-info-grid div {
  background: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.token-btn-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.token-btn-group button {
  flex: 1;
  padding: 6px;
  font-size: 14px;
}

.btn-indietro {
  display: block;
  margin: 0 auto;
  width: 95%;
  padding: 6px;
  font-size: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#grafico-area-dettaglio {
  max-width: 90%;
  width: 100%;      /* ❌ via il limite forzato */
  max-height: none;        /* ❌ via blocco scroll */
  overflow: visible;       /* ✅ lascia scorrere i contenuti */
  position: relative;
  background-color: white;
  border-radius: 8px;
  padding: 10px 20px;
  margin-bottom: 20px;
  margin: 0 auto;
  
}

#grafico-dettaglio {
  
  height: 420px !important;
  display: block;
}

#grafico-dettaglio {
 
  z-index: 1;
}

#reset-zoom-dettaglio {
  z-index: 10;
}


.token-detail-box {
  max-width: 900px;
  margin: 0 auto;
  font-size: 14px;
}

.token-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.token-info-grid div {
  background-color: #f9f9f9;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: 0 0 2px rgba(0,0,0,0.05);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.input-wrapper input[type="password"] {
  width: 100%;
  padding: 10px 40px 10px 10px;
  box-sizing: border-box;
  height: 40px;
}

.input-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #666;
}


.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination button {
  max-width: 80px;
  min-width: 10px;
  display: inline-block;
  margin: 0 4px;
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  background-color: white;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.pagination button:hover {
  background-color: #eee;
}

.pagination button:disabled {
  background-color: #007bff;
  color: white;
  font-weight: bold;
  cursor: default;
  border-color: #007bff;
}

/* BOX generale */
#info-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 1000px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.6;
}

/* Titoli */
#info-content h2 {
  color: #222;
  border-left: 6px solid #3498db;
  padding-left: 12px;
  margin-top: 30px;
}

/* Bullet list con icone */
#info-content ul {
  list-style: none;
  padding-left: 0;
}
#info-content ul li {
  margin-bottom: 8px;
  padding-left: 25px;
  position: relative;
}
#info-content ul li::before {
  content: "✅";
  position: absolute;
  left: 0;
  top: 0;
  color: #27ae60;
}

/* Tabelle parametri */
#info-content table {
  width: 100%;
  border: 1px solid #ddd;
  border-collapse: collapse;
  margin-top: 20px;
}
#info-content th, #info-content td {
  padding: 10px;
  text-align: left;
}
#info-content thead {
  background-color: #f7f7f7;
}

/* Link whitepaper */
#info-content a {
  color: #2e86de;
  font-weight: bold;
  text-decoration: none;
}
#info-content a:hover {
  text-decoration: underline;
}

#box-airdrop-stable {
  display: block !important;
  color: black;
}

#box-airdrop-stable {
  margin-top: 30px;
  background: #e0ffe0;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #b2d8b2;
  box-shadow: 0 0 5px rgba(0, 128, 0, 0.2);
}

#airdrop-list li {
  color: green;
  font-weight: bold;
  padding: 6px 0;
  margin-bottom: 4px;
  border-bottom: 1px dashed #aaa;
}


.info-tab {
  background-color: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-top: 20px;
  line-height: 1.7;
}

.info-tab ul li::marker {
  font-size: 1.3em;
}

.info-tab h2 {
  margin-bottom: 15px;
  font-size: 1.6em;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.info-tab ol {
  padding-left: 20px;
  margin-top: 15px;
}

.info-tab ol li {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.info-tab table {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.info-tab th, .info-tab td {
  text-align: left;
  vertical-align: top;
}

.form-checkbox-group {
  max-width: 400px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-weight: 200;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #007bff;
}

.checkbox-info {
  font-size: 14px;
  color: #555;
  margin-top: 6px;
  margin-left: 28px;
}

/* Aggiungi questo nel tuo CSS globale */
#confirm-box.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

#confirm-box.visibile {
  display: flex;
}

#confirm-box .box {
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  max-width: 400px;
  text-align: center;
}

#confirm-box .bottoni {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

#confirm-box .btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#confirm-box .btn-conferma {
  background-color: #4CAF50;
  color: white;
}

#confirm-box .btn-annulla {
  background-color: #f44336;
  color: white;
}

@media screen and (min-width: 768px) {
  /* Wrapper principale: più spazio */
  #grafico-area-dettaglio {
    max-width: 1100px;
    margin: 0 auto;
  }

  canvas#grafico-dettaglio {
    max-height: 400px;
  }

  /* Box dettaglio token: full width, con margine */
  #token-detail-box {
    flex: 1 1 100%;
    max-width: 100%;
    background-color: #fefefe;
    margin-bottom: 20px;
  }

  /* Wrapper per i box secondari (airdrop + progetto) */
  #token-detail-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #airdrop-box, #progetto-box {
    flex: 1 1 300px;
    max-width: 48%;
  }

  #airdrop-box h3,
  #progetto-box h3 {
    margin-bottom: 10px;
    color: #007bff;
  }

  /* Optional: allinea i box sotto a sinistra */
  #progetto-box, #airdrop-box {
    align-self: flex-start;
  }
}

.sidebar-button {
  display: block;
  width: 90%;
  margin: 10px 0;
  padding: 8px 10px;
  background-color: #007bff;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.sidebar-button:hover {
  background-color: #0056b3;
}

.sidebar-divider {
  height: 1px;
  margin: 15px 0;
  background-color: #ccc;
}

/* Tooltip universale per icone ℹ️ accanto alle label */
label span[title],
.checkbox-label span[title] {
  cursor: help;
  margin-left: 0.35rem;
  font-weight: 600;
  color: #555;
  font-size: 0.9em;
}

label span[title]:hover,
.checkbox-label span[title]:hover {
  color: #000;
}

.label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.info-icon {
  cursor: help;
  font-weight: 600;
  color: #555;
  font-size: 0.95em;
}

.info-icon:hover { color: #000; }
.muted { color: #aaa; display: block; margin: 8px 0 14px; }