/* Empire inventory experience — grouped operational catalog and item drawer */
.inventory-command-center { gap: 8px; }

.inventory-command-center .materials-workspace-toolbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  overflow: visible;
}

.inventory-toolbar-line { min-width: 0; display: flex; align-items: center; gap: 9px; }
.inventory-toolbar-divider { width: 1px; height: 32px; flex: 0 0 1px; background: #bfd0de; }
.inventory-command-center .materials-department-tabs { width: auto; flex-wrap: nowrap; }
.inventory-command-center .materials-department-tabs button { min-height: 35px; padding-inline: 13px; white-space: nowrap; }
.inventory-command-center .inventory-mode-tabs { flex: 0 0 auto; }
.inventory-command-center .workspace-toolbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }

.inventory-action-menu { position: relative; }
.inventory-action-menu > summary {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #afc3d2;
  border-radius: 5px;
  background: #fff;
  color: #29475e;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.inventory-action-menu > summary::-webkit-details-marker { display: none; }
.inventory-action-menu > summary::after { content: '⌄'; color: #0878e8; font-size: 13px; }
.inventory-action-menu > summary.active { border-color: #0878e8; color: #066bc8; }
.inventory-action-menu[open] > summary { border-color: #0878e8; box-shadow: 0 0 0 2px rgba(8,120,232,.12); }
.inventory-action-menu > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 200px;
  display: grid;
  gap: 3px;
  border: 1px solid #adc3d4;
  border-radius: 7px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 12px 28px rgba(15,45,67,.18);
}
.inventory-action-menu > div button { border: 0; border-radius: 4px; background: transparent; color: #24465f; padding: 9px 10px; text-align: left; font-size: 10px; font-weight: 800; }
.inventory-action-menu > div button:hover { background: #eaf5ff; color: #0069ca; }

/* Accessible inventory filters */
.inventory-filter-strip {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid #b8cad7;
  border-left: 4px solid #0878e8;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #f4f8fb);
  padding: 8px 10px;
  box-shadow: 0 2px 7px rgba(16,48,72,.05);
}
.inventory-filter-strip-title { align-self: center; display: grid; gap: 2px; padding: 0 4px; white-space: nowrap; }
.inventory-filter-strip-title strong { color: #123750; font-size: 12px; font-weight: 900; }
.inventory-filter-strip-title span { color: #657d8e; font-size: 9px; font-weight: 750; }
.inventory-filter-strip .materials-controls { display: grid; grid-template-columns: repeat(4, minmax(135px, 1fr)); gap: 8px; }
.inventory-filter-strip .materials-controls label { display: grid; gap: 3px; }
.inventory-filter-strip .materials-controls label > span { color: #526d82; font-size: 9px; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.inventory-filter-strip .materials-controls select { width: 100%; min-height: 36px; border: 1px solid #adc3d4; border-radius: 5px; background: #fff; color: #1d3d55; padding: 6px 28px 6px 9px; font-size: 11px; font-weight: 750; }
.inventory-filter-strip .materials-controls select:focus { outline: 0; border-color: #0878e8; box-shadow: 0 0 0 2px rgba(8,120,232,.12); }
.inventory-clear-filters { min-height: 36px; border: 1px solid #a9bfd0; border-radius: 5px; background: #fff; color: #1767aa; padding: 6px 12px; font-size: 10px; font-weight: 900; cursor: pointer; }
.inventory-clear-filters:hover:not(:disabled) { border-color: #0878e8; background: #eaf5ff; }
.inventory-clear-filters:disabled { opacity: .42; cursor: default; }

/* Material record workspace */
.material-record-tabs { margin-bottom: 10px; }
.material-record-overview .surface { border-top: 3px solid #0878e8; }
.material-record-overview .surface h3 { color: #123750; font-size: 15px; }
.material-record-overview .detail-list dt,
.material-record-overview .mini-stats span { color: #5b7385; font-size: 10px; }
.material-record-overview .detail-list dd,
.material-record-overview .mini-stats strong { color: #102e45; font-size: 13px; }
.material-record-alerts { display: grid; gap: 8px; }
.material-record-alerts > div { display: grid; gap: 2px; border-left: 4px solid #d19a21; border-radius: 4px; background: #fff7df; padding: 9px 11px; }
.material-record-alerts > div.tone-danger { border-left-color: #c73b32; background: #fff0ee; }
.material-record-alerts > div.tone-info { border-left-color: #0878e8; background: #eaf5ff; }
.material-record-alerts strong { color: #17384f; font-size: 11px; }
.material-record-alerts span { color: #5f7485; font-size: 10px; }
.material-record-current { border-left: 4px solid #2a9a68; border-radius: 4px; background: #eaf8f1; color: #236746; padding: 11px 12px; font-size: 11px; font-weight: 750; }
.material-record-table td { font-size: 11px; }
.material-record-table td small { display: block; margin-top: 3px; color: #647c8e; font-size: 9px; }
.material-record-activity { margin-top: 10px; }

.inventory-command-center .materials-surface { border-top: 3px solid #0878e8; }
.inventory-section-head {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #cbd9e3;
  background: #fff;
  padding: 10px 14px;
}
.inventory-section-head small { color: #0870d2; font-size: 9px; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.inventory-section-head h2 { margin: 1px 0 0; color: #102e45; font-size: 19px; letter-spacing: -.015em; }
.inventory-section-head p { max-width: 680px; margin: 2px 0 0; color: #678093; font-size: 10px; }
.inventory-title-metrics { display: flex; align-items: center; gap: 0; white-space: nowrap; }
.inventory-title-metrics span { color: #60798b; padding: 3px 10px; font-size: 10px; font-weight: 700; }
.inventory-title-metrics span + span { border-left: 1px solid #cbd9e3; }
.inventory-title-metrics strong { color: #123750; font-size: 12px; }
.inventory-title-metrics .danger,
.inventory-title-metrics .danger strong { color: #ad342b; }

/* Grouped inventory catalog */
.inventory-grouped-list { display: grid; gap: 10px; background: #edf3f7; padding: 10px; }
.inventory-material-group { overflow: hidden; border: 1px solid #b8cad7; border-radius: 7px; background: #fff; box-shadow: 0 3px 9px rgba(16,48,72,.06); }
.inventory-material-group > header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #0869c3;
  background: linear-gradient(180deg, #1687ef, #0874da);
  color: #fff;
  padding: 7px 12px;
}
.inventory-material-group > header > div { display: flex; align-items: baseline; gap: 8px; }
.inventory-material-group > header strong { font-size: 14px; letter-spacing: .01em; }
.inventory-material-group > header span,
.inventory-material-group > header small { color: rgba(255,255,255,.86); font-size: 10px; font-weight: 750; }
.inventory-group-column-head,
.inventory-group-row {
  display: grid;
  grid-template-columns: minmax(300px, 2.25fr) minmax(92px, .55fr) minmax(125px, .8fr) minmax(145px, .9fr) minmax(105px, .62fr) minmax(150px, auto);
  align-items: center;
}
.inventory-group-column-head { min-height: 31px; border-bottom: 1px solid #c7d5df; background: #dcebf7; }
.inventory-group-column-head span { padding: 7px 10px; color: #38586f; font-size: 9px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.inventory-group-row {
  --item-accent: #6e8799;
  min-height: 72px;
  border-left: 4px solid var(--item-accent);
  border-bottom: 1px solid #d9e3ea;
  background: #fff;
  cursor: pointer;
  transition: background .1s ease, box-shadow .1s ease;
}
.inventory-group-row:last-child { border-bottom: 0; }
.inventory-group-row:nth-child(even) { background: #f8fbfd; }
.inventory-group-row:hover,
.inventory-group-row:focus-visible { outline: 0; background: #eaf5ff; box-shadow: inset 3px 0 #0878e8; }
.inventory-group-row.type-metal-sheet { --item-accent: #0878e8; }
.inventory-group-row.type-metal-coil { --item-accent: #2962a6; }
.inventory-group-row.type-structural-metal { --item-accent: #556f82; }
.inventory-group-row.type-liner-insulation { --item-accent: #7357a8; }
.inventory-group-row.type-adhesive-chemical { --item-accent: #c4682e; }
.inventory-group-row.type-hardware-fastener { --item-accent: #477a5a; }
.inventory-group-row.type-purchased-component { --item-accent: #947324; }
.inventory-group-row.type-consumable { --item-accent: #3b8791; }
.inventory-group-row.type-packaging { --item-accent: #956b4e; }
.inventory-group-row.is-low { border-left-color: #c43e32; background: #fff6f4; }
.inventory-group-row > div { min-width: 0; padding: 8px 10px; }
.inventory-group-row > div + div { border-left: 1px solid #e0e7ec; }
.inventory-group-row strong,
.inventory-group-row small,
.inventory-group-row span { display: block; overflow: hidden; text-overflow: ellipsis; }
.inventory-group-row > div > strong { color: #183b54; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.inventory-group-row > div > small { margin-top: 3px; color: #657d8e; font-size: 9px; font-weight: 700; white-space: nowrap; }
.inventory-group-item small { color: #0870d2 !important; font-size: 9px !important; font-weight: 900 !important; letter-spacing: .02em; }
.inventory-group-item strong { margin-top: 2px; color: #102e45 !important; font-size: 13px !important; white-space: normal !important; }
.inventory-group-item span { margin-top: 3px; color: #536e81; font-size: 10px; font-weight: 650; white-space: nowrap; }
.inventory-group-available strong { color: #0870d2 !important; font-size: 16px !important; }
.inventory-group-row.is-low .inventory-group-available strong { color: #b53227 !important; }
.inventory-group-cost strong { color: #123f60 !important; font-size: 13px !important; }
.inventory-group-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.inventory-group-actions button { min-height: 30px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #086bc7; padding: 5px 7px; font-size: 10px; font-weight: 900; cursor: pointer; }
.inventory-group-actions button:hover { border-color: #b1d4f2; background: #dceeff; }

/* Progressive item editor */
.form-dialog .universal-item-form { gap: 7px; }
.inventory-form-intro { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 10px; border: 1px solid #bad0e0; border-left: 4px solid #0878e8; border-radius: 7px; background: #f1f8fe; padding: 9px 11px; }
.inventory-item-form-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: #dceefa; }
.inventory-item-form-icon img { width: 22px; height: 22px; opacity: .72; }
.inventory-form-intro strong { color: #15364f; font-size: 12px; }
.inventory-form-intro p { margin: 2px 0 0; color: #617d91; font-size: 10px; line-height: 1.3; }
.inventory-form-section { overflow: hidden; border: 1px solid #b8ccdb; border-radius: 7px; background: #fff; }
.inventory-form-section > summary { min-height: 51px; display: grid; grid-template-columns: 1fr 26px; align-items: center; gap: 10px; background: #f4f8fb; padding: 7px 11px 7px 13px; cursor: pointer; list-style: none; }
.inventory-form-section > summary::-webkit-details-marker { display: none; }
.inventory-form-section[open] > summary { border-bottom: 1px solid #c2d3df; background: linear-gradient(180deg, #1685ee, #0872d8); }
.inventory-form-section > summary span { display: grid; gap: 2px; }
.inventory-form-section > summary strong { color: #1e415b; font-size: 11px; }
.inventory-form-section > summary small { color: #718898; font-size: 9px; font-weight: 650; }
.inventory-form-section[open] > summary strong,
.inventory-form-section[open] > summary small { color: #fff; }
.inventory-form-section > summary i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #aac0d0; border-radius: 50%; background: #fff; }
.inventory-form-section > summary i::before { content: '+'; color: #0872d8; font-size: 15px; font-style: normal; line-height: 1; }
.inventory-form-section[open] > summary i::before { content: '−'; }
.inventory-form-section-body { padding: 12px; }

/* Customer directory — same grouped section language as inventory */
.customer-directory-surface { border-top: 3px solid #0878e8; }
.customer-grouped-directory { display: grid; gap: 10px; background: #edf3f7; padding: 10px; }
.customer-directory-group { overflow: hidden; border: 1px solid #b8cad7; border-radius: 7px; background: #fff; box-shadow: 0 3px 9px rgba(16,48,72,.06); }
.customer-directory-group > header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #0869c3;
  background: linear-gradient(180deg, #1687ef, #0874da);
  color: #fff;
  padding: 7px 12px;
}
.customer-directory-group > header > div { display: flex; align-items: baseline; gap: 8px; }
.customer-directory-group > header strong { font-size: 14px; }
.customer-directory-group > header span,
.customer-directory-group > header small { color: rgba(255,255,255,.86); font-size: 10px; font-weight: 750; }
.customer-directory-column-head,
.customer-directory-row {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) minmax(120px, .85fr) minmax(180px, 1.25fr) minmax(105px, .72fr) minmax(80px, .55fr) repeat(3, minmax(78px, .5fr)) 62px;
  align-items: center;
}
.customer-directory-column-head { min-height: 33px; border-bottom: 1px solid #c7d5df; background: #dcebf7; }
.customer-directory-column-head span { padding: 7px 10px; color: #38586f; font-size: 9px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.customer-directory-row { min-height: 61px; border-left: 5px solid #0878e8; border-bottom: 1px solid #d9e3ea; background: #fff; color: #132334; cursor: pointer; font-family: Arial, "Segoe UI", sans-serif; font-size: 11px; font-weight: 650; text-transform: uppercase; transition: background .1s ease, box-shadow .1s ease; }
.customer-directory-row:last-child { border-bottom: 0; }
.customer-directory-row:nth-child(even) { background: #f8fbfd; }
.customer-directory-row:hover,
.customer-directory-row:focus-visible { outline: 0; background: #eaf5ff; box-shadow: inset 3px 0 #0878e8; }
.customer-directory-row > div { min-width: 0; overflow: hidden; padding: 8px 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-directory-row > div + div { border-left: 1px solid #e0e7ec; }
.customer-directory-identity strong { display: block; overflow: hidden; color: #061525; font-size: 13.5px; font-weight: 850; text-overflow: ellipsis; }
.customer-directory-identity small { display: block; margin-top: 3px; color: #486074; font-size: 9px; font-weight: 800; }
.customer-directory-number { text-align: center; }
.customer-directory-number strong { color: #123f60; font-size: 13px; }
.customer-directory-action { text-align: right; }
.customer-directory-action button { min-height: 30px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #086bc7; padding: 5px 7px; font-size: 10px; font-weight: 900; cursor: pointer; }
.customer-directory-action button:hover { border-color: #b1d4f2; background: #dceeff; }

@media (max-width: 1280px) {
  .inventory-command-center .materials-workspace-toolbar { align-items: flex-start; }
  .inventory-toolbar-line { flex-wrap: wrap; }
  .inventory-toolbar-divider { display: none; }
  .inventory-group-column-head,
  .inventory-group-row { grid-template-columns: minmax(270px, 2fr) 90px 120px 140px 100px 145px; }
  .inventory-grouped-list { overflow-x: auto; }
  .inventory-material-group { min-width: 900px; }
  .customer-grouped-directory { overflow-x: auto; }
  .customer-directory-group { min-width: 1120px; }
  .inventory-filter-strip { grid-template-columns: minmax(0, 1fr) auto; }
  .inventory-filter-strip-title { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
  .inventory-filter-strip .materials-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .inventory-command-center .materials-workspace-toolbar { display: grid; }
  .inventory-toolbar-line { display: grid; }
  .inventory-section-head { grid-template-columns: 1fr; }
  .inventory-title-metrics { justify-content: flex-start; }
  .inventory-filter-strip { grid-template-columns: 1fr; align-items: stretch; }
  .inventory-filter-strip .materials-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-clear-filters { width: 100%; }
}
