/* BOM view (modules/bom-view.js), shown inside Inspect Data's BOM / BOM Location grids. */
.bv-wrap { padding: 16px 20px 20px; }
.bv-loading, .bv-empty-box { padding: 40px; text-align: center; color: rgba(0,0,0,0.55); font-size: 14px; }
.bv-dim { color: rgba(0,0,0,0.55); }
.bv-selectbar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }

/* picker */
.bv-picker { position: relative; width: 640px; max-width: 100%; }
.bv-picker-label { position: absolute; top: -8px; left: 10px; background: #fff; padding: 0 4px; font-size: 0.72rem; color: rgba(0,0,0,0.6); z-index: 1; }
.bv-picker-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid rgba(0,0,0,0.23); border-radius: 4px; background: #fff; cursor: pointer; font-size: 0.875rem; }
.bv-picker-btn:hover { border-color: rgba(0,0,0,0.87); }
.bv-picker-sel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bv-caret { color: rgba(0,0,0,0.5); flex-shrink: 0; }
.bv-picker-pop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60; background: #fff; border-radius: 4px; box-shadow: 0 5px 18px rgba(0,0,0,.28); padding: 8px 0 4px; }
.bv-picker-search { width: calc(100% - 20px); margin: 0 10px 8px; height: 36px; padding: 0 10px; border: 1px solid rgba(0,0,0,0.23); border-radius: 4px; font: inherit; font-size: 0.85rem; box-sizing: border-box; }
.bv-picker-list { max-height: 360px; overflow: auto; }
.bv-picker-group { padding: 6px 14px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #3897B6; background: #f3f8fa; position: sticky; top: 0; }
.bv-picker-item { display: grid; grid-template-columns: 130px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 14px; font-size: 0.82rem; cursor: pointer; }
.bv-picker-item:hover { background: #f3f6f8; }
.bv-picker-item.sel { background: #e3f1f7; }
.bv-picker-item .id { font-weight: 600; }
.bv-picker-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(0,0,0,0.75); }
.bv-picker-item .meta { color: rgba(0,0,0,0.5); font-size: 0.75rem; white-space: nowrap; }
.bv-picker-empty { padding: 14px; text-align: center; color: rgba(0,0,0,0.5); font-size: 0.85rem; }

/* cards */
.bv-card { background: #fff; border: 1px solid #e3e8eb; border-radius: 6px; padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.bv-card-title { font-size: 1.1rem; font-weight: 500; margin-bottom: 12px; }
.bv-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bv-card-head .bv-card-title { margin-bottom: 0; }
/* BOM details (identity + item + quantity basis combined) | Effectivity | Summary; label above value so nothing wraps */
.bv-groups { display: grid; grid-template-columns: minmax(0, 2fr) minmax(350px, 1fr); gap: 14px; margin-bottom: 8px; }
@media (max-width: 1000px) { .bv-groups { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .bv-inner { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.bv-group { border: 1px solid #e8eef1; border-radius: 6px; padding: 10px 16px 12px; background: #fbfdfe; min-width: 0; }
.bv-group .gt { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #3897B6; margin-bottom: 8px; }
.bv-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; row-gap: 10px; }
.bv-inner.one { grid-template-columns: minmax(0, 1fr); }
.bv-kv { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; min-width: 0; }
.bv-kv.span { grid-column: span 2; }
.bv-kv .k { color: rgba(0,0,0,0.55); font-size: 0.72rem; }
.bv-kv .v { color: rgba(0,0,0,0.87); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.bv-sub { font-size: 0.85rem; font-weight: 600; margin: 16px 0 6px; color: rgba(0,0,0,0.75); }
.bv-versions { display: flex; flex-wrap: wrap; gap: 8px; }
.bv-version { display: inline-flex; gap: 8px; align-items: center; padding: 5px 10px; border: 1px solid #dbe5ea; border-radius: 16px; font-size: 0.8rem; text-decoration: none; color: inherit; }
.bv-version:hover { background: #eef6f9; border-color: #3897B6; }

/* tables */
.bv-tablewrap { border: 1px solid #e0e0e0; border-radius: 4px; overflow: auto; background: #fff; }
.bv-tablewrap.tall { max-height: 560px; }
.bv-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.bv-table th { background: #3897B6; color: #fff; font-weight: 600; text-align: left; padding: 10px 12px; white-space: nowrap; position: sticky; top: 0; z-index: 2; border-left: 1px solid rgba(255,255,255,0.3); }
.bv-table th:first-child { border-left: none; }
.bv-table td { padding: 8px 12px; border-bottom: 1px solid #eef1f3; white-space: nowrap; }
.bv-table th.r, .bv-table td.r { text-align: right; }
.bv-table tbody tr:hover td { background: #f6fafc; }
.bv-table tr.parent td { background: #f8fbfc; font-weight: 500; }
.bv-table tr.alt td { background: #fffaf0; color: rgba(0,0,0,0.7); font-style: italic; }
.bv-table th.sticky, .bv-table td.sticky { position: sticky; left: 0; z-index: 1; min-width: 230px; background: #fff; box-shadow: 2px 0 3px -1px rgba(0,0,0,.18); }
.bv-table th.sticky { background: #3897B6; z-index: 3; }
.bv-table tr.parent td.sticky { background: #f8fbfc; }
.bv-table tr.alt td.sticky { background: #fffaf0; }
.bv-empty { text-align: center; color: rgba(0,0,0,0.5); padding: 22px !important; }
.bv-twisty { width: 22px; height: 22px; border: none; background: none; cursor: pointer; font-size: 0.9rem; color: #3897B6; padding: 0; margin-right: 2px; }
.bv-twisty-gap { display: inline-block; width: 24px; color: #9ab; }
.bv-link { color: #1f6f8b; text-decoration: none; }
.bv-link:hover { text-decoration: underline; }
.bv-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; background: #eef0f2; color: #555; margin-left: 6px; white-space: nowrap; font-style: normal; }
.bv-chip.ok { background: #e6f4ea; color: #2e7d32; } .bv-chip.info { background: #e8f1fb; color: #2a62a8; } .bv-chip.warn { background: #fff4e0; color: #b26a00; }
.bv-foot { margin-top: 8px; font-size: 0.75rem; color: rgba(0,0,0,0.55); }

/* component toolbar */
.bv-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bv-search { height: 34px; padding: 0 10px; border: 1px solid rgba(0,0,0,0.23); border-radius: 4px; font: inherit; font-size: 0.85rem; min-width: 220px; }
.bv-btn { height: 34px; padding: 0 14px; border: 1px solid rgba(56,151,182,.5); background: #fff; color: #1f6f8b; border-radius: 4px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.bv-btn:hover { background: rgba(56,151,182,.08); }
.bv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; cursor: pointer; }
.bv-check input { accent-color: #3897B6; }
