/* Universal company inventory system */
.inventory-command-center { gap: 10px; }

.inventory-command-center .materials-workspace-toolbar {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
}

.inventory-toolbar-primary { min-width: 0; display: grid; gap: 8px; }
.inventory-command-center .materials-department-tabs { width: fit-content; }

.inventory-mode-tabs {
  width: fit-content;
  display: inline-flex;
  gap: 3px;
  border: 1px solid #b7cada;
  border-radius: 6px;
  background: #edf4f9;
  padding: 3px;
}

.inventory-mode-tabs button {
  min-height: 31px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #3c5b72;
  padding: 5px 13px;
  font-size: 10px;
  font-weight: 850;
}

.inventory-mode-tabs button:hover:not(.active) { background: #fff; color: #075eb5; }
.inventory-mode-tabs button.active { background: #0878e8; color: #fff; box-shadow: 0 2px 5px rgba(8, 120, 232, .24); }
.inventory-mode-tabs button span { min-width: 19px; display: inline-grid; place-items: center; margin-left: 5px; border-radius: 10px; background: rgba(255,255,255,.22); padding: 1px 5px; }

.inventory-command-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.inventory-command-summary article {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 1px;
  border: 1px solid #bfd1df;
  border-top: 3px solid #0878e8;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #f6fafd);
  padding: 10px 12px;
  box-shadow: 0 3px 8px rgba(16, 48, 72, .05);
}

.inventory-command-summary article.is-danger { border-top-color: #c2392b; background: linear-gradient(180deg, #fff, #fff5f3); }
.inventory-command-summary article.is-warning { border-top-color: #d7830b; background: linear-gradient(180deg, #fff, #fff9ed); }
.inventory-command-summary small { color: #617b8e; font-size: 8px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.inventory-command-summary strong { color: #102f48; font-size: 20px; line-height: 1.1; }
.inventory-command-summary span { color: #667f91; font-size: 9px; font-weight: 650; }

.inventory-command-center .materials-surface { overflow: hidden; }
.inventory-section-head {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto 54px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #b9cddd;
  background: linear-gradient(180deg, #fff, #f6fafd);
  padding: 10px 13px;
}
.inventory-section-head > div:first-child { min-width: 0; }
.inventory-section-head > div:first-child small { color: #0870d2; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.inventory-section-head h2 { margin: 2px 0 0; color: #102f48; font-size: 18px; }
.inventory-section-head p { margin: 2px 0 0; color: #607a8d; font-size: 9px; font-weight: 650; }
.inventory-section-head > strong { display: grid; place-items: center; color: #0870d2; font-size: 18px; }
.inventory-section-head > strong span { color: #6a8293; font-size: 7px; font-weight: 850; text-transform: uppercase; }

.inventory-section-head .materials-controls { display: flex; align-items: end; gap: 7px; }
.inventory-section-head .materials-controls label { display: grid; gap: 3px; }
.inventory-section-head .materials-controls label > span { color: #526e82; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.inventory-section-head .materials-controls select { min-width: 145px; min-height: 33px; border: 1px solid #afc5d6; border-radius: 5px; background: #fff; padding: 5px 9px; font-size: 10px; font-weight: 750; }

.inventory-table-scroll { max-height: calc(100vh - 370px); overflow: auto; }
.inventory-table { min-width: 1180px; }
.inventory-table thead { position: sticky; top: 0; z-index: 3; }
.inventory-table th { height: 37px; background: #e3eef7; color: #294a63; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.inventory-table tbody tr { min-height: 62px; cursor: pointer; transition: background .12s ease, box-shadow .12s ease; }
.inventory-table tbody tr:hover { background: #eef7ff; box-shadow: inset 4px 0 #0878e8; }
.inventory-table td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.inventory-table td > strong { display: block; color: #19374f; font-size: 10px; }
.inventory-table td > small { display: block; margin-top: 2px; color: #6a8293; font-size: 8px; font-weight: 650; }
.inventory-item-identity { min-width: 245px; }
.inventory-item-identity > small:first-child { color: #0870d2; font-weight: 900; }
.inventory-item-identity > strong { margin-top: 2px; color: #102b42 !important; font-size: 11px !important; }
.inventory-item-identity > span { display: block; margin-top: 2px; color: #748b9b; font-size: 8px; }
.inventory-specification { min-width: 190px; }
.inventory-cost-cell strong { color: #0063bd !important; font-size: 12px !important; }
.inventory-available-cell strong { color: #16845a !important; font-size: 12px !important; }
.inventory-row-danger { background: #fff6f4; box-shadow: inset 4px 0 #c2392b; }
.inventory-row-danger .inventory-available-cell strong { color: #b42318 !important; }

.inventory-attention-board { display: grid; gap: 7px; padding: 9px; }
.inventory-attention-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(320px, 2fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #bfd0dd;
  border-left: 5px solid #0878e8;
  border-radius: 7px;
  background: #fff;
  padding: 11px 12px;
  box-shadow: 0 2px 6px rgba(16,48,72,.05);
}
.inventory-attention-card.tone-danger { border-left-color: #c2392b; }
.inventory-attention-card.tone-warning { border-left-color: #d7830b; }
.inventory-attention-main small { color: #0870d2; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.inventory-attention-main h3 { margin: 2px 0; color: #102f48; font-size: 13px; }
.inventory-attention-main span { color: #60798b; font-size: 9px; font-weight: 650; }
.inventory-issue-list { display: flex; flex-wrap: wrap; gap: 5px; }
.inventory-issue-list > span { min-width: 120px; display: grid; gap: 1px; border: 1px solid #c8d7e2; border-radius: 5px; background: #f5f9fc; padding: 6px 8px; }
.inventory-issue-list > span.tone-danger { border-color: #efb5ad; background: #fff1ef; }
.inventory-issue-list > span.tone-warning { border-color: #ecd19c; background: #fff8e8; }
.inventory-issue-list strong { color: #26465e; font-size: 9px; }
.inventory-issue-list small { color: #6a8192; font-size: 7px; }
.inventory-attention-actions { display: flex; gap: 5px; }

.form-dialog .universal-item-form { display: grid; gap: 11px; }
.form-dialog .universal-item-form .source-card { overflow: hidden; border-color: #a9c6db; border-radius: 7px; box-shadow: 0 3px 9px rgba(16,48,72,.05); }
.form-dialog .universal-item-form .source-card-body { padding: 12px; }
.form-dialog .universal-item-form .source-entry-grid {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 112px minmax(0, 1fr);
  align-items: center;
  gap: 9px 10px;
}
.form-dialog .universal-item-form .source-label { color: #294a62; font-size: 9px; font-weight: 850; line-height: 1.2; }
.form-dialog .universal-item-form .source-control { width: 100%; min-width: 0; }
.form-dialog .universal-item-form .source-wide-label { grid-column: 1; }
.form-dialog .universal-item-form .source-wide-control { grid-column: 2 / -1; }
.inventory-form-help { margin: 0 0 9px; color: #607b8f; font-size: 10px; font-weight: 650; }
.inventory-unit-explainer { display: flex; gap: 6px; margin-top: 9px; border-left: 3px solid #0878e8; background: #eef7ff; padding: 7px 9px; color: #4b687d; font-size: 9px; }
.inventory-unit-explainer strong { color: #075eaf; }

@media (max-width: 1200px) {
  .inventory-command-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inventory-command-center .materials-workspace-toolbar { grid-template-columns: 1fr; }
  .inventory-command-center .workspace-toolbar-actions { justify-content: flex-start; }
  .inventory-section-head { grid-template-columns: 1fr; }
  .inventory-section-head > strong { display: none; }
}

@media (max-width: 760px) {
  .inventory-command-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-attention-card { grid-template-columns: 1fr; }
  .form-dialog .universal-item-form .source-entry-grid { grid-template-columns: 100px minmax(0, 1fr); }
  .form-dialog .universal-item-form .source-wide-label { grid-column: 1; }
  .form-dialog .universal-item-form .source-wide-control { grid-column: 2; }
}
