/* Tabella listino crediti — stile mutuato da "Costo Stimato" (agentInfoVoiceInternal) */

.credit-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.credit-table thead th {
  background: #f2f2f6;
  color: #76768a;
  font-weight: 600;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 11px 16px;
  border-bottom: 1px solid #e8e8ef;
}

.credit-table thead th:first-child {
  border-top-left-radius: 8px;
}

.credit-table thead th:last-child {
  border-top-right-radius: 8px;
}

.credit-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f2f2f6;
  transition: background .15s;
}

.credit-table tbody tr:hover td {
  background: rgba(142, 9, 249, .03);
}

.credit-prov-row td {
  background: #faf9ff;
  font-weight: 700;
  color: #5a5a72;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 9px 16px;
}

.credit-prov-row:hover td {
  background: #faf9ff !important;
}

.credit-model {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.prov-ico {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prov-ico svg {
  width: 20px;
  height: 20px;
}

.credit-model .mname {
  font-weight: 600;
  line-height: 1.15;
}

.credit-model .mid {
  font-family: ui-monospace, monospace;
  font-size: .7rem;
  color: #9a9ab0;
}

.credit-credits {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.credit-table td.text-end {
  font-variant-numeric: tabular-nums;
}

/* dark mode (admin usa data-bs-theme) */

[data-bs-theme="dark"] .credit-table thead th {
  background: rgba(255, 255, 255, .06);
  color: #9a9ab0;
  border-bottom-color: #2c2c3a;
}

[data-bs-theme="dark"] .credit-table tbody td {
  border-bottom-color: rgba(255, 255, 255, .06);
}

[data-bs-theme="dark"] .credit-table tbody tr:hover td {
  background: rgba(142, 9, 249, .08);
}

[data-bs-theme="dark"] .credit-prov-row td, [data-bs-theme="dark"] .credit-prov-row:hover td {
  background: rgba(142, 9, 249, .10) !important;
  color: #c9c9da;
}

[data-bs-theme="dark"] .credit-model .mid {
  color: #76768a;
}

/* provider collassabili */

.credit-prov-row .prov-chev {
  font-size: .7rem;
  color: #9a9ab0;
  margin-right: 8px;
  transition: transform .15s;
  display: inline-block;
}

.credit-prov-row .prov-chev.collapsed {
  transform: rotate(-90deg);
}

.credit-prov-row:hover td {
  filter: brightness(.98);
}

/* Calibrazione live — KPI cards */

.cal-kpi {
  border: 1px solid #e8e8ef;
  border-radius: 12px;
  padding: 14px;
  height: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
}

.cal-kpi .cal-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: #f2f2f6;
  color: #5a5a72;
}

.cal-kpi .cal-ico.ico-purple {
  background: rgba(142, 9, 249, .12);
  color: #8e09f9;
}

.cal-kpi .cal-ico.ico-amber {
  background: rgba(255, 193, 7, .16);
  color: #b88500;
}

.cal-kpi .cal-ico.ico-blue {
  background: rgba(13, 110, 253, .12);
  color: #0d6efd;
}

.cal-kpi .cal-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #76768a;
  font-weight: 700;
}

.cal-kpi .cal-value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.cal-kpi .cal-sub {
  font-size: .72rem;
  color: #9a9ab0;
  margin-top: 1px;
}

.cal-kpi.primary {
  background: linear-gradient(135deg, #8e09f9, #6a1cbb);
  border: 0;
  color: #fff;
  box-shadow: 0 6px 18px rgba(142, 9, 249, .25);
}

.cal-kpi.primary .cal-label, .cal-kpi.primary .cal-sub {
  color: rgba(255, 255, 255, .82);
}

.cal-kpi.primary .cal-value {
  color: #fff;
}

.cal-kpi.primary .cal-ico {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.min-w-0 {
  min-width: 0;
}

[data-bs-theme="dark"] .cal-kpi {
  background: #1e1e2a;
  border-color: #2c2c3a;
}

[data-bs-theme="dark"] .cal-kpi .cal-ico {
  background: rgba(255, 255, 255, .07);
  color: #c9c9da;
}

[data-bs-theme="dark"] .cal-kpi .cal-label {
  color: #9a9ab0;
}

/* bottone "Applica al config" compatto in alto a destra della card suggerita */

.cal-apply {
  padding: 2px 9px;
  font-size: .7rem;
  font-weight: 700;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  color: #6a1cbb;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.5;
}

.cal-apply:hover {
  background: #fff;
  color: #6a1cbb;
}

/* dettaglio costo reale per modello */

.ins-mini {
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 10px 12px;
  height: 100%;
}

.ins-mini .l {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #76768a;
  font-weight: 700;
}

.ins-mini .v {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.ins-mini .s {
  font-size: .7rem;
  color: #9a9ab0;
}

[data-bs-theme="dark"] .ins-mini {
  border-color: #2c2c3a;
}

/* modali credits */

.cmodal-sec {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #9a9ab0;
  font-weight: 700;
  margin: 16px 0 7px;
  border-top: 1px solid #f2f2f6;
  padding-top: 12px;
}

.w-balance-box {
  border: 1px solid #e8e8ef;
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(142, 9, 249, .06), rgba(106, 28, 187, .04));
}

.w-balance {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

[data-bs-theme="dark"] .cmodal-sec {
  border-top-color: #2c2c3a;
}

[data-bs-theme="dark"] .w-balance-box {
  border-color: #2c2c3a;
  background: linear-gradient(135deg, rgba(142, 9, 249, .14), rgba(106, 28, 187, .07));
}

