/* Bank loan pipeline — analytics & submission badges theme */

body[data-loan-pipeline] {
  --pc-navy: var(--tenant-primary, #1a1a2e);
  --pc-gold: var(--tenant-secondary, #f59e0b);
}

.pc-analytics-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #0f172a;
}

.pc-analytics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pc-navy) 0%, #16213e 100%);
  color: #fff;
}

.pc-analytics-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.pc-analytics-head p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

.pc-analytics-head img {
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
}

.pc-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.pc-analytics-grid--2 {
  margin-top: 0;
}

.pc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.06);
}

html[data-theme='dark'] .pc-card {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.pc-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pc-navy);
}

html[data-theme='dark'] .pc-card h3 {
  color: var(--pc-gold);
}

.pc-chart {
  width: 100%;
  height: auto;
}

.pc-donut-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.pc-donut {
  width: 120px;
  height: 120px;
}

.pc-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  margin-right: 0.75rem;
}

.pc-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.pc-table th,
.pc-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.pc-fraud-item {
  list-style: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid #fecaca;
  font-size: 0.82rem;
}

.pc-fraud-item strong {
  color: #b91c1c;
  display: block;
}

.pc-loss-input {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.pc-loss-input input {
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  max-width: 120px;
}

.pc-muted {
  color: #64748b;
  font-size: 0.85rem;
}

.pc-fraud-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  margin-left: 0.35rem;
}

.pc-score-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.pc-score-badge--green {
  background: #ecfdf5;
  color: #047857;
}

.pc-score-badge--amber {
  background: #fffbeb;
  color: #b45309;
}

.pc-score-badge--red {
  background: #fef2f2;
  color: #b91c1c;
}

html[data-tenant-branded='1'] .cf-res-btn--primary,
html[data-tenant-branded='1'] .cf-inst-btn--primary {
  background: var(--pc-navy, var(--tenant-primary, #1a1a2e)) !important;
  border-color: var(--pc-gold, var(--tenant-secondary, #f59e0b)) !important;
}

.pc-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.pc-kpi {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.pc-kpi__val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pc-navy, #0f2744);
}

.pc-kpi__label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.pc-demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  font-size: 0.85rem;
  color: #92400e;
}

.pc-demo-clear {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  background: #b45309;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
}

.pc-demo-clear:hover {
  background: #92400e;
}
