/* Innovando Eco Dashboard — CSS v4.3.1 */
.ied-host{ --eco-primary:#1d71b8; --eco-secondary:#ff9900; --eco-success:#627D47; --eco-alert:#b20000; --eco-text:#0f2742; color:var(--eco-text); }
.ied-header h2{ margin:0 0 6px; font-weight:800; color:var(--eco-primary); }
.ied-header .ied-ver{ font-weight:700; opacity:.75; font-size:.7em; }
.ied-infobar{ display:flex; flex-wrap:wrap; gap:10px 16px; font-size:.92rem; opacity:.85; margin:2px 0 12px; }
.ied-infobar span{ display:inline-flex; align-items:center; gap:.35rem; }
.ied-container{ background:transparent; }
.ied-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px; }

/* Card glassy + fade-up */
.ied-card{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.55));
  border:1px solid rgba(0,0,0,.08);
  border-radius:4px;
  padding:16px;
  box-shadow:0 12px 28px rgba(0,0,0,.08);
  display:flex; flex-direction:column;
  backdrop-filter:saturate(140%) blur(8px);
  -webkit-backdrop-filter:saturate(140%) blur(8px);
  opacity:0; transform:translateY(14px);
  transition:opacity .45s ease, transform .45s ease, box-shadow .3s ease;
}
/* Filetti superiore/inferiore delle cards basati sui colori primario/secondario */
.ied-card::before,
.ied-card::after{
  content:'';
  position:absolute;
  left:0;
  width:100%;
  height:5px;
  pointer-events:none;
}

.ied-card::before{
  top:0;
  background:var(--eco-primary);
  border-top-left-radius:4px;
  border-top-right-radius:4px;
}

.ied-card::after{
  bottom:0;
  background:var(--eco-secondary);
  border-bottom-left-radius:4px;
  border-bottom-right-radius:4px;
}

.ied-card.is-in{ opacity:1; transform:none; }
.ied-card:hover{ box-shadow:0 16px 34px rgba(0,0,0,.10); }
.ied-card h3{ margin:0 0 8px; font-weight:800; color:var(--eco-primary); letter-spacing:.2px; }
.ied-kpi{ font-size:38px; line-height:1; font-weight:800; color:#0f2742; margin:.25rem 0; }
.ied-unit{ border-top:1px solid rgba(0,0,0,.1); padding-top:.4rem; margin-top:.4rem; font-weight:600; opacity:.85; }
.ied-caption{ margin-top:auto; font-size:.88rem; opacity:.9; border-top:1px dashed rgba(0,0,0,.1); padding-top:.65rem; }

/* Mix */
.ied-mix-list{ list-style:none; margin:.35rem 0 0; padding:0; }
.ied-mix-list li{ position:relative; display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.38rem .1rem; border-bottom:1px dashed rgba(0,0,0,.06); }
.ied-mix-list li:last-child{ border-bottom:none; }
.ied-bar{ position:absolute; left:0; right:0; bottom:0; height:3px; background:linear-gradient(90deg, rgba(29,113,184,.12), rgba(255,153,0,.12)); border-radius:999px; overflow:hidden; }
.ied-bar::before{ content:''; display:block; height:100%; width:var(--eco-bar,0%);
  background:linear-gradient(90deg, var(--eco-primary), var(--eco-secondary));
  opacity:.95; border-radius:999px; transition:width .35s ease; }
.ied-mix-list li.fossil .ied-bar::before{ background:linear-gradient(90deg, #b24a00, #b20000); }
.ied-mix-list li.fossil.hot .ied-bar::before{ background:linear-gradient(90deg, #ff7a00, #ff2a00); box-shadow:0 0 6px rgba(178,0,0,.25); }

/* Ticker */
.ied-ticker{ overflow:hidden; border-top:1px solid rgba(0,0,0,.08); border-bottom:1px solid rgba(0,0,0,.08); }
.ied-ticker-track{ display:inline-block; white-space:nowrap; padding:.55rem 0; animation:ied-scroll var(--eco-speed,60s) linear infinite; }
.ied-pill{ padding:.18rem .7rem; margin:0 .28rem; border-radius:999px; border:1px solid rgba(0,0,0,.1); background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.7)); box-shadow:0 1px 2px rgba(0,0,0,.06); }
@keyframes ied-scroll{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }

/* Nota "Altro" */
.ied-note{ margin-top:18px; padding:14px 16px; border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.5));
  border:1px dashed rgba(0,0,0,.10);
}
.ied-note-title{ display:inline-block; margin-right:.5rem; color:var(--eco-primary); }
.ied-note-text{ display:inline; opacity:.9; }


.ied-host[data-variant="ticker"]{
  border-radius:4px;
  overflow:hidden;
}


/* Accordion legenda EcoDashboard */
.ied-legend{
  margin-top:18px;
  border-radius:4px;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 10px 22px rgba(0,0,0,.06);
  overflow:hidden;
}

.ied-legend summary{
  list-style:none;
  cursor:pointer;
  padding:10px 14px;
  margin:0;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--eco-primary);
}

.ied-legend summary::-webkit-details-marker{
  display:none;
}

.ied-legend summary::after{
  content:"\25BC";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.12);
  background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(240,244,255,.95));
  font-size:.7rem;
}

.ied-legend[open] summary::after{
  content:"\25B2";
}

.ied-legend-body{
  padding:12px 16px 14px;
  border-top:1px solid rgba(0,0,0,.06);
  font-size:.88rem;
  line-height:1.6;
}

.ied-legend-body h4{
  margin:10px 0 4px;
  font-size:.95rem;
  color:var(--eco-text);
}

.ied-legend-body p{
  margin:0 0 6px;
}

.ied-legend-body ul{
  margin:0 0 10px 18px;
  padding:0;
}

.ied-legend-body li{
  margin:0 0 2px;
}
