.bom-workbench {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
}

.bom-header-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #f8fafc;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.bom-header-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.bom-header-sub {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.bom-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border, #cbd5e1);
  padding-bottom: 0.5rem;
}

.bom-tab-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #cbd5e1);
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bom-tab-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.bom-split {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 980px) {
  .bom-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bom-project-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 620px;
  overflow-y: auto;
}

.bom-project-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--color-border, #cbd5e1);
  background: #ffffff;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bom-project-card:hover {
  border-color: #2563eb;
}

.bom-project-card.selected {
  border-color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.bom-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.65rem;
}

.bom-kpi-box {
  background: #ffffff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.bom-kpi-box-label {
  font-size: 0.74rem;
  color: #475569;
  font-weight: 600;
}

.bom-kpi-box-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0.15rem;
}

.bom-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.bom-pill-draft { background: #e2e8f0; color: #1e293b; }
.bom-pill-review { background: #fef3c7; color: #92400e; }
.bom-pill-returned { background: #fee2e2; color: #991b1b; }
.bom-pill-approved, .bom-pill-active { background: #dcfce7; color: #166534; }
.bom-pill-superseded { background: #f1f5f9; color: #475569; }
.bom-pill-available { background: #dcfce7; color: #166534; }
.bom-pill-insufficient { background: #fef3c7; color: #92400e; }
.bom-pill-out { background: #fee2e2; color: #991b1b; }
.bom-pill-unverifiable { background: #f3e8ff; color: #6b21a8; }
.bom-pill-external { background: #e0f2fe; color: #075985; }

.bom-dual-validation {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bom-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}

.bom-readonly-banner {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #14532d;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.bom-diff-added { background: #f0fdf4; }
.bom-diff-removed { background: #fef2f2; }
.bom-diff-modified { background: #fffbeb; }

.bom-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (max-width: 780px) {
  .bom-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
