/* ======================================================================
   Configurazione Modelli Pesi — stile (prefisso .cfg- isolato)
   Palette coerente con la SPA esistente (slate + accent).
   ====================================================================== */

.cfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.cfg-loading, .cfg-error {
  padding: 24px; color: #64748b; font-size: 14px;
}
.cfg-error { color: #b91c1c; }

/* --- nota / banner configurazione --- */
.cfg-note {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 18px; font-size: 13px; color: #92400e;
}
.cfg-note strong { display: block; margin-bottom: 4px; }
.cfg-note ul { margin: 0; padding-left: 18px; }

/* --- card modello --- */
.cfg-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
  display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.cfg-card:hover { box-shadow: 0 6px 20px rgba(15,23,42,.08); transform: translateY(-1px); }

.cfg-card-head { display: flex; align-items: center; gap: 12px; }
.cfg-numobj {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: #eff6ff; color: #1d4ed8; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.cfg-card-title { font-weight: 600; font-size: 15px; color: #0f172a; }
.cfg-card-sub { font-size: 12px; color: #94a3b8; }

/* --- barra ripartizione a 3 segmenti --- */
.cfg-bar {
  display: flex; height: 30px; border-radius: 8px; overflow: hidden;
  border: 1px solid #e2e8f0;
}
.cfg-seg {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; min-width: 0;
}
.cfg-seg-fin { background: #3b82f6; }
.cfg-seg-ruo { background: #10b981; }
.cfg-seg-com { background: #f59e0b; }

.cfg-legend { display: flex; gap: 16px; font-size: 12px; color: #475569; }
.cfg-legend span { display: flex; align-items: center; gap: 6px; }
.cfg-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* --- split-riga finanziario --- */
.cfg-righe { border-top: 1px solid #f1f5f9; padding-top: 10px; }
.cfg-righe-title { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.cfg-righe-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cfg-righe-table th {
  text-align: left; font-weight: 500; color: #94a3b8; font-size: 11px;
  text-transform: uppercase; letter-spacing: .03em; padding: 4px 6px;
}
.cfg-righe-table td { padding: 5px 6px; border-top: 1px solid #f8fafc; color: #334155; }

.cfg-approv {
  font-size: 11px; color: #94a3b8; font-style: italic;
  border-top: 1px solid #f1f5f9; padding-top: 8px;
}

/* --- badge specifici --- */
.cfg-badge-ok { background: #dcfce7; color: #166534; }
.cfg-badge-pending { background: #fef3c7; color: #92400e; }
.cfg-badge-missing { background: #fee2e2; color: #b91c1c; }
.cfg-badge-model { background: #eff6ff; color: #1d4ed8; }
