
.bom-tab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bom-tab-bar .tab-button {
  min-width: 110px;
  min-height: 32px;
  padding: 6px 14px;
  text-align: center;
}
.bom-tab-bar .bom-import-btn {
  margin-left: auto;
}


.bom-search-input {
  padding: 6px 10px;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  font: inherit;
  min-width: 220px;
}

.bom-list-table td, .bom-list-table th { padding: 6px 10px; }

.bom-detail-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bom-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #c8d4e1;
  margin-bottom: 0;
}

.bom-tab-content {
  background: #fff;
  border: 1px solid #c8d4e1;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 0;
}

.bom-section-actions {
  padding: 10px 14px;
  border-bottom: 1px solid #e8f0f5;
  background: #f7fbfc;
  display: flex;
  justify-content: flex-end;
}

.bom-header-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid #c8d4e1;
  border-radius: 8px;
}

.bom-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bom-field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.bom-field input {
  padding: 5px 8px;
  border: 1px solid #c6dce5;
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.bom-field input[readonly] {
  background: #f0f4f7;
  color: #555;
}

.bom-field-wide { grid-column: span 2; }

.bom-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.bom-section {
  background: #fff;
  border: 1px solid #c8d4e1;
  border-radius: 8px;
  overflow: hidden;
}

.bom-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e8f0f5;
  background: #f7fbfc;
}

.bom-section-header h2 {
  margin: 0;
  font-size: 14px;
  color: var(--brand);
  font-weight: 700;
}

.bom-finished-table td,
.bom-finished-table th,
.bom-raw-table td,
.bom-raw-table th {
  padding: 6px 10px;
}

.bom-qty-input { width: 70px; padding: 3px 6px; border: 1px solid #c6dce5; border-radius: 4px; font: inherit; }
.bom-uom-input { width: 70px; padding: 3px 6px; border: 1px solid #c6dce5; border-radius: 4px; font: inherit; }
.bom-remarks-input { width: 140px; padding: 3px 6px; border: 1px solid #c6dce5; border-radius: 4px; font: inherit; }


#bom-host { display: contents; }
#bill-of-materials.bom-active-fallback,
#bom-detail.bom-active-fallback { display: block; }
body:has(#bill-of-materials.bom-active-fallback) .dashboard,
body:has(#bom-detail.bom-active-fallback) .dashboard { display: none; }
