/* ============================================================
   portal-v2-sidebar.css — Painel lateral, chips, painel eletrônico
   Template 4 — Área pública WBC7
   ============================================================ */

/* --- Side card --------------------------------------------- */
.wbc-v2 .side-card {
  background: #fff;
  border: 0.5px solid var(--gray-mid);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}

.wbc-v2 .side-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-txt);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* --- Btn Fornecedor ---------------------------------------- */
.wbc-v2 .btn-fornecedor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #dce8ff;
  color: #1a3fa8;
  border: none;
  border-radius: var(--radius);
  padding: 0 14px;
  height: 42px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.15s;
}

.wbc-v2 .btn-fornecedor:hover { background: #c5d8ff; text-decoration: none; }

/* --- Section label ----------------------------------------- */
.wbc-v2 .side-sec-lbl { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* --- Chips de filtro --------------------------------------- */
.wbc-v2 .chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.12s;
  margin-bottom: 3px;
}

.wbc-v2 .chip:hover { background: #f0f2f8; }
.wbc-v2 .chip.active-chip { background: #e8eeff; color: var(--blue); font-weight: 600; }

.wbc-v2 .chip-n { font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.wbc-v2 .chip-n-ag  { background: #e8f4ff; color: #185FA5; }
.wbc-v2 .chip-n-and { background: #fff3e6; color: #7a3a00; }

/* --- Mural dropdown de filtro ------------------------------ */
.wbc-v2 .mural-filter-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wbc-v2 .mural-filter-label { font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.65); letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; }

.wbc-v2 .mural-dd { position: relative; }

.wbc-v2 .mural-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5deec;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
}

.wbc-v2 .mural-dd-btn:hover { border-color: #bcc9df; background: #fbfcff; }

.wbc-v2 .mural-dd-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
}

.wbc-v2 .mural-dd-pop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 280px;
  max-width: 340px;
  background: #fff;
  border: 1px solid #dce3ef;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(24,53,98,.16);
  padding: 10px;
}

.wbc-v2 .mural-dd-pop.open { display: block; }

.wbc-v2 .mural-dd-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px 8px;
}

.wbc-v2 .mural-dd-pop-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }
.wbc-v2 .mural-dd-pop-clear { font-size: 12px; font-weight: 600; color: var(--brand); background: none; border: none; cursor: pointer; padding: 0; }

.wbc-v2 .mural-dd-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 270px;
  overflow: auto;
  padding-right: 2px;
}

.wbc-v2 .mural-dd-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: none;
  padding: 8px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.wbc-v2 .mural-dd-opt:hover { background: #f5f8fd; }
.wbc-v2 .mural-dd-opt-txt { flex: 1; font-size: 14px; color: var(--ink); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbc-v2 .mural-dd-opt-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 9px; background: #edf1f7; color: #6d7a94; font-size: 12px; font-weight: 700; padding: 0 8px; }
.wbc-v2 .mural-dd-opt-status { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.wbc-v2 .mural-dd-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.wbc-v2 .mural-clear-all-link { font-size: 13px; font-weight: 600; color: #fff; background: none; border: none; cursor: pointer; padding: 0 4px; text-decoration: underline; text-underline-offset: 2px; }

.wbc-v2 .mural-active-chips { display: none; margin-top: 10px; align-items: center; gap: 8px; flex-wrap: wrap; }
.wbc-v2 .mural-chip { display: inline-flex; align-items: center; gap: 6px; background: #e9eff9; color: #305f9d; border-radius: 999px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; }
.wbc-v2 .mural-chip-x { background: none; border: none; color: #305f9d; cursor: pointer; padding: 0; font-size: 15px; line-height: 1; }

/* --- Homologados items ------------------------------------- */
.wbc-v2 .hom-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 0.5px solid #f0f2f8; font-size: 13px; color: var(--text); }
.wbc-v2 .hom-item:last-child { border-bottom: none; }
.wbc-v2 .hom-val { font-weight: 700; color: var(--green); }

/* --- Painel eletrônico ------------------------------------- */
.wbc-v2 #home-painel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 18px;
  box-shadow: 0 1px 2px rgba(28,63,102,0.04);
}

.wbc-v2 .eco-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.wbc-v2 .eco-panel-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--teal-tint); color: var(--teal-dk); flex-shrink: 0; }
.wbc-v2 .eco-panel-title { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; }
.wbc-v2 .eco-panel-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.wbc-v2 .eco-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.wbc-v2 .eco-tile { background: #fff; padding: 9px 14px; }
.wbc-v2 .eco-tile-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.wbc-v2 .eco-tile-val { font-size: 15px; font-weight: 800; margin-top: 5px; letter-spacing: -0.018em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.wbc-v2 .eco-tile-val.teal { color: var(--green); }
.wbc-v2 .eco-tile-val.teal-big { color: var(--green); font-size: 18px; }

.wbc-v2 .eco-bar-wrap { margin-top: 10px; }
.wbc-v2 .eco-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--line); }
.wbc-v2 .eco-bar-neg { background: var(--brand); transition: width .5s ease; }
.wbc-v2 .eco-bar-eco { background: var(--green); transition: width .5s ease; }
.wbc-v2 .eco-legend { display: flex; gap: 18px; margin-top: 7px; flex-wrap: wrap; }
.wbc-v2 .eco-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.wbc-v2 .eco-legend i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }

/* Eco trigger/pop */
.wbc-v2 .eco-trigger { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: inherit; transition: border-color .15s,background .15s; white-space: nowrap; }
.wbc-v2 .eco-trigger:hover { background: #f7f9fc; }
.wbc-v2 .eco-trigger.act { border-color: var(--brand); background: var(--tint); color: var(--brand); }
.wbc-v2 .eco-trigger .cnt { background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.wbc-v2 .eco-trigger .cv { font-size: 10px; margin-left: 2px; opacity: .45; transition: transform .2s; }
.wbc-v2 .eco-trigger.open .cv { transform: rotate(180deg); }
.wbc-v2 .eco-trigger-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; opacity: .9; }

.wbc-v2 .eco-pop {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(28,63,102,0.18);
  padding: 8px;
  min-width: 244px;
  max-height: 300px;
  overflow: auto;
  z-index: 100;
}

.wbc-v2 .eco-check { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border-radius: 8px; border: none; background: none; cursor: pointer; font-family: inherit; text-align: left; transition: background .12s; margin-bottom: 1px; }
.wbc-v2 .eco-check:hover { background: #f0f4fa; }
.wbc-v2 .eco-box { width: 16px; height: 16px; border-radius: 5px; border: 1.8px solid #c4cedd; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; transition: border-color .12s,background .12s; }
.wbc-v2 .eco-check.on .eco-box { background: var(--brand); border-color: var(--brand); }
.wbc-v2 .eco-lbl { flex: 1; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbc-v2 .eco-check.on .eco-lbl { font-weight: 600; color: var(--brand); }
.wbc-v2 .eco-pop-foot { display: flex; justify-content: space-between; align-items: center; padding: 7px 7px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.wbc-v2 .eco-link { background: none; border: none; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 4px 7px; border-radius: 6px; }
.wbc-v2 .eco-link:hover { color: var(--brand); background: var(--tint); }

/* --- Painel h-metrics (responsivo) ------------------------- */
.wbc-v2 .painel-h-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

/* --- Painel row (painel eletrônico detalhe) ----------------- */
.wbc-v2 .painel-sub { font-size: 12px; color: #9aa2be; margin-bottom: 10px; line-height: 1.4; }
.wbc-v2 .painel-sel { width: 100%; border: 0.5px solid var(--gray-mid); border-radius: 5px; padding: 5px 8px; font-size: 13px; font-family: inherit; color: var(--text); background: #fff; outline: none; margin-bottom: 10px; }
.wbc-v2 .painel-sel:focus { border-color: var(--blue); }
.wbc-v2 .painel-sec-lbl { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.wbc-v2 .painel-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 0.5px solid #f0f2f8; gap: 6px; }
.wbc-v2 .painel-row:last-child { border-bottom: none; }
.wbc-v2 .painel-lbl { font-size: 13px; color: var(--gray-txt); }
.wbc-v2 .painel-val { font-size: 13px; color: var(--text); font-weight: 500; text-align: right; white-space: nowrap; }
.wbc-v2 .painel-val.destaque { font-weight: 700; color: var(--green); }
.wbc-v2 .painel-val.economia-pct { font-weight: 700; color: var(--green); font-size: 15px; }
