/* main_residual_diagnostics.css — Regression Residual Diagnostics Studio */

:root {
  --rd-primary: var(--primary, #2563eb);
  --rd-accent: #06b6d4;
  --rd-pass: #10b981;
  --rd-warn: #f59e0b;
  --rd-fail: #ef4444;
}

/* Fault Injector Shelf ("Break the Model") */
.fault-injector-shelf {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.fault-injector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.fault-injector-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #9a3412;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fault-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.fault-toggle-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.fault-toggle-card:hover {
  border-color: #f59e0b;
  background: #fffbeb;
}

.fault-toggle-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #d97706;
}

.fault-toggle-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

.fault-toggle-sub {
  font-size: 0.725rem;
  color: #64748b;
}

/* LINE Assumptions Scorecard */
.line-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.line-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.line-letter-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 800;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.line-status {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0.4rem 0 0.2rem 0;
}

.line-status.pass { color: var(--rd-pass); }
.line-status.warn { color: var(--rd-warn); }
.line-status.fail { color: var(--rd-fail); }

.line-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

/* 2x2 Plots Grid */
.diagnostic-plots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.diag-plot-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.diag-plot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.diag-plot-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.diag-svg-wrapper {
  width: 100%;
  height: 240px;
  position: relative;
}

.diag-svg {
  width: 100%;
  height: 100%;
}
