/* Box Inventory v2
   This file owns the new page layout. Modal styles remain in styles.css because
   the existing inventory actions still use the tested modal workflows. */

#view-boxes .bix-page {
  --bix-ink: #123326;
  --bix-muted: #6d8175;
  --bix-line: #d9e8dc;
  --bix-line-strong: #b7d2bd;
  --bix-surface: #ffffff;
  --bix-surface-soft: #f5faf6;
  --bix-green: #217a47;
  --bix-green-dark: #155733;
  --bix-green-soft: #e8f5eb;
  --bix-teal: #187f7a;
  --bix-amber: #a66d17;
  --bix-amber-soft: #fff6e3;
  --bix-red: #b0443c;
  --bix-red-soft: #fff0ee;
  display: grid;
  gap: 14px;
  min-width: 0;
  color: var(--bix-ink);
  font-size: 13px;
  line-height: 1.45;
}

#view-boxes .bix-page,
#view-boxes .bix-page * { box-sizing: border-box; }

#view-boxes .bix-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
  gap: 22px;
  align-items: stretch;
  padding: 24px 26px;
  border: 1px solid var(--bix-line);
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fcf7 0%, #edf8ef 58%, #e6f4ef 100%);
  box-shadow: 0 8px 24px rgba(28, 91, 52, .06);
}

#view-boxes .bix-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--bix-green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#view-boxes .bix-hero h1,
#view-boxes .bix-section-heading h2,
#view-boxes .bix-panel-heading h2,
#view-boxes .bix-work-card h3 { margin: 0; color: var(--bix-ink); }

#view-boxes .bix-hero h1 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
#view-boxes .bix-hero p { max-width: 650px; margin: 8px 0 0; color: var(--bix-muted); font-size: 14px; }

#view-boxes .bix-health {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 104px;
  padding: 15px 17px;
  border: 1px solid var(--bix-line-strong);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
#view-boxes .bix-health > span { color: var(--bix-muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
#view-boxes .bix-health strong { font-size: 18px; letter-spacing: -.02em; }
#view-boxes .bix-health small { color: var(--bix-muted); font-size: 11px; }
#view-boxes .bix-health-ready strong { color: var(--bix-green); }
#view-boxes .bix-health-attention { border-color: #e4c98d; background: #fffaf0; }
#view-boxes .bix-health-attention strong { color: var(--bix-amber); }

#view-boxes .bix-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--bix-line);
  border-radius: 12px;
  background: var(--bix-surface);
}
#view-boxes .bix-nav button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--bix-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
#view-boxes .bix-nav button:hover,
#view-boxes .bix-nav button:focus-visible,
#view-boxes .bix-nav button.is-active { background: var(--bix-green-soft); color: var(--bix-green-dark); }

#view-boxes .bix-start,
#view-boxes .bix-panel {
  display: grid;
  gap: 15px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--bix-line);
  border-radius: 16px;
  background: var(--bix-surface);
  box-shadow: 0 5px 16px rgba(28, 91, 52, .045);
}
#view-boxes .bix-section-heading,
#view-boxes .bix-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
#view-boxes .bix-section-heading h2,
#view-boxes .bix-panel-heading h2 { font-size: 18px; letter-spacing: -.02em; }
#view-boxes .bix-section-heading p,
#view-boxes .bix-panel-heading p { margin: 4px 0 0; color: var(--bix-muted); font-size: 12px; }
#view-boxes .bix-command-actions,
#view-boxes .bix-panel-tools,
#view-boxes .bix-row-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

#view-boxes .bix-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}
#view-boxes .bix-button:hover:not(:disabled) { transform: translateY(-1px); }
#view-boxes .bix-button:focus-visible,
#view-boxes .bix-nav button:focus-visible,
#view-boxes .bix-link-button:focus-visible,
#view-boxes .bix-quick-views button:focus-visible { outline: 3px solid rgba(33,122,71,.22); outline-offset: 2px; }
#view-boxes .bix-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
#view-boxes .bix-button-primary { border-color: var(--bix-green); background: var(--bix-green); color: #fff; box-shadow: 0 5px 12px rgba(33,122,71,.17); }
#view-boxes .bix-button-primary:hover:not(:disabled) { border-color: var(--bix-green-dark); background: var(--bix-green-dark); }
#view-boxes .bix-button-secondary { border-color: var(--bix-line-strong); background: #fff; color: var(--bix-green-dark); }
#view-boxes .bix-button-secondary:hover:not(:disabled) { border-color: var(--bix-green); background: var(--bix-green-soft); }
#view-boxes .bix-button-quiet { border-color: transparent; background: transparent; color: var(--bix-muted); }
#view-boxes .bix-button-quiet:hover:not(:disabled) { background: var(--bix-surface-soft); color: var(--bix-green-dark); }
#view-boxes .bix-button-danger { border-color: #e4b6b0; background: #fff7f6; color: var(--bix-red); }
#view-boxes .bix-button-danger:hover:not(:disabled) { border-color: var(--bix-red); background: var(--bix-red-soft); }
#view-boxes .bix-row-button { min-height: 30px; padding: 0 9px; font-size: 11px; }

#view-boxes .bix-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#view-boxes .bix-work-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--bix-line);
  border-radius: 13px;
  background: var(--bix-surface-soft);
}
#view-boxes .bix-work-card-attention { border-color: #e5cb92; background: #fffaf0; }
#view-boxes .bix-work-card-danger { border-color: #e6c0bb; background: #fff8f7; }
#view-boxes .bix-work-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: var(--bix-green-soft); color: var(--bix-green); font-size: 10px; font-weight: 900; }
#view-boxes .bix-work-card-attention .bix-work-icon { background: var(--bix-amber-soft); color: var(--bix-amber); }
#view-boxes .bix-work-card-danger .bix-work-icon { background: var(--bix-red-soft); color: var(--bix-red); }
#view-boxes .bix-work-label { color: var(--bix-muted); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
#view-boxes .bix-work-card h3 { margin-top: 3px; font-size: 14px; }
#view-boxes .bix-work-card p { min-height: 36px; margin: 5px 0 0; color: var(--bix-muted); font-size: 11px; line-height: 1.45; }
#view-boxes .bix-link-button { grid-column: 2; justify-self: start; padding: 0; border: 0; background: transparent; color: var(--bix-green); font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
#view-boxes .bix-link-button:hover { color: var(--bix-green-dark); text-decoration: underline; }

#view-boxes .bix-metrics { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 8px; }
#view-boxes .bix-metrics > div { display: grid; gap: 3px; min-width: 0; padding: 12px 13px; border: 1px solid var(--bix-line); border-radius: 11px; background: #fbfefb; }
#view-boxes .bix-metrics span { color: var(--bix-muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
#view-boxes .bix-metrics strong { color: var(--bix-ink); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
#view-boxes .bix-metrics small { color: var(--bix-muted); font-size: 10px; line-height: 1.3; }
#view-boxes .bix-metric-danger strong { color: var(--bix-red); }
#view-boxes .bix-metric-attention { border-color: #e5cb92 !important; background: #fffaf0 !important; }
#view-boxes .bix-metric-attention strong { color: var(--bix-amber); }

#view-boxes .bix-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 15px; border: 1px solid #9fc8aa; border-radius: 13px; background: var(--bix-green-soft); }
#view-boxes .bix-selection > div { display: grid; gap: 2px; margin-right: auto; }
#view-boxes .bix-selection span { color: var(--bix-muted); font-size: 11px; }

#view-boxes .bix-quick-views { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid var(--bix-line); border-radius: 10px; background: var(--bix-surface-soft); }
#view-boxes .bix-quick-views > span { padding: 0 8px; color: var(--bix-muted); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
#view-boxes .bix-quick-views button { min-height: 29px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--bix-muted); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
#view-boxes .bix-quick-views button:hover,
#view-boxes .bix-quick-views button.is-active { background: #fff; color: var(--bix-green-dark); box-shadow: 0 1px 4px rgba(28,91,52,.08); }

#view-boxes .bix-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr)); gap: 9px; }
#view-boxes .bix-filters label { display: grid; gap: 5px; min-width: 0; color: var(--bix-muted); font-size: 10px; font-weight: 900; }
#view-boxes .bix-filters input,
#view-boxes .bix-filters select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--bix-line-strong); border-radius: 9px; background: #fff; color: var(--bix-ink); font: inherit; font-size: 12px; }
#view-boxes .bix-filters input:focus,
#view-boxes .bix-filters select:focus { border-color: var(--bix-green); outline: 3px solid rgba(33,122,71,.12); outline-offset: 1px; }
#view-boxes .bix-register-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--bix-muted); font-size: 11px; }

#view-boxes .bix-table-wrap { overflow: auto; border: 1px solid var(--bix-line); border-radius: 12px; background: #fff; }
#view-boxes .bix-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
#view-boxes .bix-table th { position: sticky; top: 0; z-index: 1; padding: 10px 11px; border-bottom: 1px solid var(--bix-line); background: #eff8f1; color: var(--bix-muted); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
#view-boxes .bix-table td { padding: 11px; border-bottom: 1px solid #edf3ed; vertical-align: middle; }
#view-boxes .bix-table tbody tr:hover td { background: #f8fcf8; }
#view-boxes .bix-table tbody tr:last-child td { border-bottom: 0; }
#view-boxes .bix-table th:first-child,
#view-boxes .bix-table td:first-child { width: 35px; text-align: center; }
#view-boxes .bix-table th:last-child,
#view-boxes .bix-table td:last-child { white-space: nowrap; }
#view-boxes .bix-table-register { min-width: 1120px; }
#view-boxes .bix-sort-th { all: unset; display: inline-flex; align-items: center; gap: 3px; color: inherit; font: inherit; cursor: pointer; }
#view-boxes .bix-sort-th:hover,
#view-boxes .bix-sort-th:focus-visible { color: var(--bix-green); }
#view-boxes .bix-cell-primary { display: block; color: var(--bix-ink); font-weight: 850; line-height: 1.3; }
#view-boxes .bix-cell-secondary { display: block; margin-top: 3px; color: var(--bix-muted); font-size: 10px; line-height: 1.3; }
#view-boxes .bix-truncate { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-boxes .bix-type-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 9px; border: 1px solid #c7e0cc; border-radius: 999px; background: #f1faf2; color: var(--bix-green-dark); font-size: 11px; font-weight: 850; white-space: nowrap; }
#view-boxes .bix-tag { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 850; white-space: nowrap; }
#view-boxes .bix-tag-good { background: #e6f5e9; color: #20753d; }
#view-boxes .bix-tag-warn { background: var(--bix-amber-soft); color: var(--bix-amber); }
#view-boxes .bix-tag-crit { background: var(--bix-red-soft); color: var(--bix-red); }
#view-boxes .bix-tag-accent { background: #e8f4f4; color: var(--bix-teal); }
#view-boxes .bix-tag-neutral { background: #eef3ef; color: var(--bix-muted); }
#view-boxes .bix-empty { padding: 32px !important; color: var(--bix-muted); text-align: center; }
#view-boxes .bix-row-voided { opacity: .55; }

#view-boxes .bix-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 12px; color: var(--bix-muted); font-size: 11px; }
#view-boxes .bix-pagination > div { display: flex; align-items: center; gap: 8px; }
#view-boxes .bix-pagination strong { color: var(--bix-ink); }
#view-boxes .bix-count-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--bix-line); border-radius: 999px; color: var(--bix-muted); font-size: 11px; white-space: nowrap; }
#view-boxes .bix-history-scroll { max-height: 430px; }

#view-boxes .bix-state { place-items: center; min-height: 260px; text-align: center; }
#view-boxes .bix-state p { max-width: 520px; margin: 0; color: var(--bix-muted); }

@media (max-width: 1120px) {
  #view-boxes .bix-metrics { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  #view-boxes .bix-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  #view-boxes .bix-hero { grid-template-columns: 1fr; }
  #view-boxes .bix-work-grid { grid-template-columns: 1fr; }
  #view-boxes .bix-section-heading,
  #view-boxes .bix-panel-heading { flex-direction: column; align-items: stretch; }
  #view-boxes .bix-command-actions,
  #view-boxes .bix-panel-tools { justify-content: flex-start; }
}

@media (max-width: 560px) {
  #view-boxes .bix-page { gap: 10px; }
  #view-boxes .bix-hero,
  #view-boxes .bix-start,
  #view-boxes .bix-panel { padding: 15px; border-radius: 13px; }
  #view-boxes .bix-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-boxes .bix-filters { grid-template-columns: 1fr; }
  #view-boxes .bix-register-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  #view-boxes .bix-selection { align-items: stretch; flex-direction: column; }
  #view-boxes .bix-selection > div { margin-right: 0; }
  #view-boxes .bix-selection .bix-button { width: 100%; }
  #view-boxes .bix-command-actions .bix-button { flex: 1 1 130px; }
  #view-boxes .bix-quick-views { align-items: stretch; }
  #view-boxes .bix-quick-views > span { width: 100%; padding: 4px 8px 0; }
  #view-boxes .bix-quick-views button { flex: 1 1 100px; }
}

/* -------------------------------------------------------------------------
   Warehouse Ledger direction (selected concept 2)
   The application shell remains the existing shell. Only the Box Inventory
   page surface changes; the existing topbar, sidebar and account rail stay
   under their original styles.
   ------------------------------------------------------------------------- */

body.box-inventory-design .app-shell { grid-template-columns: var(--sb-w) minmax(0, 1fr) !important; }
body.box-inventory-design .detail-rail { display: none !important; }

#view-boxes.view.active { display: block; padding: 0; overflow-y: auto; background: #ffffff; }
#view-boxes .bix-ledger-page,
#view-boxes .bix-ledger-page * { box-sizing: border-box; }
#view-boxes .bix-ledger-page {
  min-height: 100%;
  color: #132033;
  background: #ffffff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}
#view-boxes .bix-ledger-kicker { color: #06714f; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
#view-boxes .bix-ledger-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 19px 24px 0; border-bottom: 1px solid #e7eaee; }
#view-boxes .bix-ledger-header h1 { margin: 0; color: #101928; font-size: 34px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
#view-boxes .bix-ledger-tabs { display: flex; flex-direction: row; align-items: flex-end; gap: 28px; height: 55px; margin-top: 15px; }
#view-boxes .bix-ledger-tabs button { position: relative; height: 100%; padding: 0 7px 13px; border: 0; background: transparent; color: #536176; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
#view-boxes .bix-ledger-tabs button::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: #08744f; content: ""; opacity: 0; }
#view-boxes .bix-ledger-tabs button:hover,
#view-boxes .bix-ledger-tabs button.is-active { color: #08744f; }
#view-boxes .bix-ledger-tabs button.is-active::after { opacity: 1; }
#view-boxes .bix-ledger-header-actions { display: flex; align-items: center; gap: 20px; padding-top: 2px; }
#view-boxes .bix-ledger-header-actions > div { display: grid; gap: 3px; padding-right: 20px; border-right: 1px solid #e3e7ec; text-align: right; }
#view-boxes .bix-ledger-header-actions span { color: #68778b; font-size: 11px; }
#view-boxes .bix-ledger-header-actions strong { color: #102033; font-size: 26px; line-height: 1; }

#view-boxes .bix-ledger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 750; white-space: nowrap; cursor: pointer; transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease; }
#view-boxes .bix-ledger-button:hover:not(:disabled) { transform: translateY(-1px); }
#view-boxes .bix-ledger-button:disabled { cursor: not-allowed; opacity: .45; }
#view-boxes .bix-ledger-button .material-symbols-rounded { font-size: 19px; }
#view-boxes .bix-ledger-button-primary { border-color: #06724e; background: #08744f; color: #ffffff; }
#view-boxes .bix-ledger-button-primary:hover:not(:disabled) { background: #055a3e; }
#view-boxes .bix-ledger-button-secondary { border-color: #cbd4de; background: #ffffff; color: #172536; }
#view-boxes .bix-ledger-button-secondary:hover:not(:disabled) { border-color: #08744f; color: #08744f; }
#view-boxes .bix-ledger-button-danger { border-color: #e6b7b1; background: #fff7f6; color: #b5322b; }
#view-boxes .bix-ledger-icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; background: transparent; color: #778497; cursor: pointer; }
#view-boxes .bix-ledger-icon-button:hover { color: #132033; }
#view-boxes .bix-ledger-more-icon { display: grid; width: 30px; height: 30px; place-items: center; color: #526176; font-size: 20px; }

#view-boxes .bix-ledger-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 405px); align-items: start; }
#view-boxes .bix-ledger-register { min-width: 0; border-right: 1px solid #e4e8ed; }
#view-boxes .bix-ledger-controls { display: grid; gap: 13px; padding: 18px 24px 20px; border-bottom: 1px solid #e7eaee; }
#view-boxes .bix-ledger-search { position: relative; }
#view-boxes .bix-ledger-search .material-symbols-rounded { position: absolute; top: 9px; left: 12px; color: #718096; font-size: 21px; }
#view-boxes .bix-ledger-search input { width: 100%; min-height: 40px; padding: 0 12px 0 40px; border: 1px solid #cbd4de; border-radius: 7px; background: #ffffff; color: #132033; font: inherit; font-size: 13px; }
#view-boxes .bix-ledger-search input:focus,
#view-boxes .bix-ledger-filter-row select:focus { border-color: #08744f; outline: 3px solid rgba(8,116,79,.12); outline-offset: 1px; }
.bi-modal-form .bix-site-address-hint { color: #64748b; font-size: 10px; font-weight: 500; line-height: 1.35; }
.bi-batch-row-secondary select { width: 100%; min-height: 34px; box-sizing: border-box; padding: 0 8px; border: 1px solid #d7dee8; border-radius: 7px; background: #fff; color: #101828; font-size: 11px; }
.bi-batch-row-secondary input[readonly] { background: #f4f7f8; color: #526176; }
.bi-stocktake-row > span { min-width: 0; overflow-wrap: anywhere; }
#view-boxes .bix-ledger-filter-row { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; }
#view-boxes .bix-ledger-filter-row label { display: grid; gap: 5px; min-width: 0; color: #5c6b80; font-size: 10px; font-weight: 750; }
#view-boxes .bix-ledger-filter-row select { width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid #cbd4de; border-radius: 6px; background: #ffffff; color: #1a2a3d; font: inherit; font-size: 12px; }
#view-boxes .bix-ledger-clear { align-self: end; min-height: 34px; padding: 0 3px; border: 0; background: transparent; color: #08744f; font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
#view-boxes .bix-ledger-clear:hover { text-decoration: underline; }

#view-boxes .bix-ledger-table-wrap { overflow: auto; background: #ffffff; }
#view-boxes .bix-ledger-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
#view-boxes .bix-ledger-table th { height: 42px; padding: 0 10px; border-bottom: 1px solid #dfe5eb; background: #f6f8fa; color: #526176; font-size: 10px; font-weight: 800; letter-spacing: .015em; text-align: left; text-transform: uppercase; white-space: nowrap; }
#view-boxes .bix-ledger-table .bix-sort-th { all: unset; display: inline-flex; align-items: center; gap: 3px; color: inherit; font: inherit; cursor: pointer; }
#view-boxes .bix-ledger-table .bix-sort-th:hover { color: #08744f; }
#view-boxes .bix-ledger-table td { height: 42px; padding: 7px 10px; border-bottom: 1px solid #edf0f3; color: #526176; vertical-align: middle; }
#view-boxes .bix-ledger-register-table th:nth-child(1), #view-boxes .bix-ledger-register-table td:nth-child(1) { width: 38px; text-align: center; }
#view-boxes .bix-ledger-register-table th:nth-child(2), #view-boxes .bix-ledger-register-table td:nth-child(2) { width: 78px; }
#view-boxes .bix-ledger-register-table th:nth-child(3), #view-boxes .bix-ledger-register-table td:nth-child(3) { width: 175px; }
#view-boxes .bix-ledger-register-table th:nth-child(4), #view-boxes .bix-ledger-register-table td:nth-child(4) { width: 128px; }
#view-boxes .bix-ledger-register-table th:nth-child(5), #view-boxes .bix-ledger-register-table td:nth-child(5) { width: 116px; }
#view-boxes .bix-ledger-register-table th:nth-child(6), #view-boxes .bix-ledger-register-table td:nth-child(6) { width: 100px; }
#view-boxes .bix-ledger-register-table th:nth-child(7), #view-boxes .bix-ledger-register-table td:nth-child(7) { width: 116px; }
#view-boxes .bix-ledger-register-table th:nth-child(8), #view-boxes .bix-ledger-register-table td:nth-child(8) { width: 130px; }
#view-boxes .bix-ledger-table tbody tr[data-box-record] { cursor: pointer; outline: none; }
#view-boxes .bix-ledger-table tbody tr[data-box-record]:hover td { background: #f8fbfa; }
#view-boxes .bix-ledger-table tbody tr[data-box-record].is-selected td { background: #e6f5ed; }
#view-boxes .bix-ledger-table tbody tr[data-box-record].is-selected td:first-child { box-shadow: inset 3px 0 0 #08744f; }
#view-boxes .bix-ledger-table tbody tr[data-box-record]:focus-visible td { background: #f0f8f4; outline: 2px solid #08744f; outline-offset: -2px; }
#view-boxes .bix-ledger-table th input, #view-boxes .bix-ledger-table td input { width: 15px; height: 15px; accent-color: #08744f; }
#view-boxes .bix-ledger-sort-th { all: unset; display: inline-flex; align-items: center; gap: 3px; color: inherit; font: inherit; cursor: pointer; }
#view-boxes .bix-ledger-sort-th:hover { color: #08744f; }
#view-boxes .bix-ledger-primary { display: block; overflow: hidden; color: #172536; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
#view-boxes .bix-ledger-secondary { display: block; margin-top: 2px; color: #7b8999; font-size: 10px; line-height: 1.2; }
#view-boxes .bix-ledger-truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-boxes .bix-ledger-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
#view-boxes .bix-ledger-tag-info { background: #e5f0ff; color: #1468c6; }
#view-boxes .bix-ledger-tag-good { background: #dff5e7; color: #087044; }
#view-boxes .bix-ledger-tag-neutral { background: #eef1f4; color: #5b6878; }
#view-boxes .bix-ledger-tag-warn { background: #fff0ce; color: #946311; }
#view-boxes .bix-ledger-tag-crit { background: #ffe0df; color: #b5322b; }
#view-boxes .bix-ledger-tag-teal { background: #e3f4f3; color: #147a76; }
#view-boxes .bix-ledger-empty-row { height: 180px !important; color: #718096 !important; text-align: center; }
#view-boxes .bix-ledger-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 24px; color: #5f6f82; font-size: 12px; }
#view-boxes .bix-ledger-pagination > div { display: flex; align-items: center; gap: 5px; }
#view-boxes .bix-ledger-pagination label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
#view-boxes .bix-ledger-pagination select { min-height: 30px; border: 1px solid #cbd4de; border-radius: 6px; background: #ffffff; color: #26364a; font: inherit; }
#view-boxes .bix-ledger-page-button { display: grid; min-width: 31px; height: 31px; place-items: center; padding: 0 7px; border: 1px solid #cbd4de; border-radius: 6px; background: #ffffff; color: #314259; font: inherit; cursor: pointer; }
#view-boxes .bix-ledger-page-button:hover:not(:disabled), #view-boxes .bix-ledger-page-button.is-active { border-color: #08744f; background: #08744f; color: #ffffff; }
#view-boxes .bix-ledger-page-button:disabled { cursor: not-allowed; opacity: .4; }
#view-boxes .bix-ledger-page-button .material-symbols-rounded { font-size: 18px; }
#view-boxes .bix-ledger-ellipsis { padding: 0 4px; color: #7b8999; }

#view-boxes .bix-ledger-inspector { position: sticky; top: 0; min-height: 720px; padding: 20px 20px 24px; background: #ffffff; }
#view-boxes .bix-ledger-inspector-head { display: flex; justify-content: space-between; gap: 12px; }
#view-boxes .bix-ledger-box-title { display: flex; align-items: center; gap: 8px; }
#view-boxes .bix-ledger-box-title h2 { margin: 0; color: #101928; font-size: 28px; letter-spacing: -.045em; }
#view-boxes .bix-ledger-inspector-head h3 { margin: 8px 0 2px; color: #1b2b3f; font-size: 16px; }
#view-boxes .bix-ledger-inspector-head p { margin: 0; color: #607086; font-size: 13px; }
#view-boxes .bix-ledger-inspector-tabs { display: flex; gap: 25px; margin-top: 23px; border-bottom: 1px solid #e1e6eb; }
#view-boxes .bix-ledger-inspector-tabs button { position: relative; min-height: 36px; padding: 0 1px; border: 0; background: transparent; color: #64748a; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
#view-boxes .bix-ledger-inspector-tabs button.is-active { color: #08744f; }
#view-boxes .bix-ledger-inspector-tabs button.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: #08744f; content: ""; }
#view-boxes .bix-ledger-details { display: grid; margin: 8px 0 0; }
#view-boxes .bix-ledger-details > div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 40px; border-bottom: 1px solid #edf0f3; }
#view-boxes .bix-ledger-details dt { color: #536176; font-size: 12px; }
#view-boxes .bix-ledger-details dd { min-width: 0; margin: 0; color: #1a2a3d; font-size: 12px; font-weight: 650; }
#view-boxes .bix-ledger-details dd > span:not(.bix-ledger-tag) { display: block; margin-top: 3px; color: #778497; font-size: 10px; font-weight: 500; }
#view-boxes .bix-ledger-inspector-actions { display: grid; gap: 9px; margin-top: 18px; }
#view-boxes .bix-ledger-inspector-actions > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#view-boxes .bix-ledger-inspector-actions .bix-ledger-button { width: 100%; }
#view-boxes .bix-ledger-address-conflict { color: #a25b05; font-weight: 750; }
#view-boxes .bix-ledger-integrity-banner { display: grid; gap: 3px; margin: 10px 0; padding: 10px 13px; border: 1px solid #f0d39a; border-radius: 8px; background: #fff8e9; color: #735114; font-size: 11px; line-height: 1.45; }
#view-boxes .bix-ledger-integrity-banner strong { font-size: 12px; }
#view-boxes .bix-ledger-address-conflict-note { margin-top: 6px !important; padding: 7px 8px; border-left: 3px solid #d29524; border-radius: 0 5px 5px 0; background: #fff8e9; color: #805c19 !important; line-height: 1.45; }
.bi-modal-form .bix-ledger-address-warning { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #f0d39a; border-radius: 8px; background: #fff8e9; color: #735114; font-size: 11px; line-height: 1.45; }
.bi-modal-form .bix-ledger-address-warning strong { font-size: 12px; }
#view-boxes .bix-ledger-notes { margin-top: 23px; padding-top: 16px; border-top: 1px solid #e4e8ed; }
#view-boxes .bix-ledger-notes > div { display: flex; justify-content: space-between; align-items: center; }
#view-boxes .bix-ledger-notes strong { color: #27374b; font-size: 12px; }
#view-boxes .bix-ledger-notes button { border: 0; background: transparent; color: #08744f; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
#view-boxes .bix-ledger-notes p { min-height: 28px; margin: 11px 0; color: #718096; font-size: 12px; }
#view-boxes .bix-ledger-notes aside { display: flex; gap: 9px; padding: 11px; border-radius: 7px; background: #f2f5f7; color: #6a788b; font-size: 11px; line-height: 1.45; }
#view-boxes .bix-ledger-notes aside .material-symbols-rounded { flex: 0 0 auto; color: #607086; font-size: 18px; }
#view-boxes .bix-ledger-empty-inspector { display: grid; align-content: center; justify-items: center; min-height: 430px; color: #718096; text-align: center; }
#view-boxes .bix-ledger-empty-inspector .material-symbols-rounded { font-size: 42px; }
#view-boxes .bix-ledger-empty-inspector h2 { margin: 12px 0 5px; color: #233349; }
#view-boxes .bix-ledger-empty-inspector p { max-width: 240px; margin: 0; }

#view-boxes .bix-ledger-history { margin: 22px 24px 26px; padding: 20px; border: 1px solid #e2e7ec; border-radius: 8px; background: #ffffff; }
#view-boxes .bix-ledger-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
#view-boxes .bix-ledger-section-heading h2 { margin: 2px 0 3px; color: #172536; font-size: 18px; }
#view-boxes .bix-ledger-section-heading p { margin: 0; color: #718096; font-size: 12px; }
#view-boxes .bix-ledger-count { padding: 5px 9px; border-radius: 999px; background: #eef1f4; color: #5b6878; font-size: 11px; font-weight: 750; white-space: nowrap; }
#view-boxes .bix-ledger-history .bix-ledger-table { table-layout: auto; }
#view-boxes .bix-ledger-history .bix-ledger-table th, #view-boxes .bix-ledger-history .bix-ledger-table td { height: auto; padding: 10px 12px; }
#view-boxes .bix-ledger-approval { margin-top: 0; }

@media (max-width: 1320px) and (min-width: 901px) {
  #view-boxes .bix-ledger-workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  #view-boxes .bix-ledger-filter-row { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  #view-boxes .bix-ledger-clear { justify-self: start; }
  #view-boxes .bix-ledger-table { font-size: 11px; }
  #view-boxes .bix-ledger-register-table th:nth-child(2), #view-boxes .bix-ledger-register-table td:nth-child(2) { width: 68px; }
  #view-boxes .bix-ledger-register-table th:nth-child(3), #view-boxes .bix-ledger-register-table td:nth-child(3) { width: 135px; }
  #view-boxes .bix-ledger-register-table th:nth-child(4), #view-boxes .bix-ledger-register-table td:nth-child(4) { width: 104px; }
  #view-boxes .bix-ledger-register-table th:nth-child(5), #view-boxes .bix-ledger-register-table td:nth-child(5) { width: 98px; }
  #view-boxes .bix-ledger-register-table th:nth-child(6), #view-boxes .bix-ledger-register-table td:nth-child(6) { width: 86px; }
  #view-boxes .bix-ledger-register-table th:nth-child(7), #view-boxes .bix-ledger-register-table td:nth-child(7) { width: 98px; }
  #view-boxes .bix-ledger-register-table th:nth-child(8), #view-boxes .bix-ledger-register-table td:nth-child(8) { width: 105px; }
}

@media (max-width: 1180px) {
  #view-boxes .bix-ledger-workspace { grid-template-columns: minmax(0, 1fr) 360px; }
  #view-boxes .bix-ledger-filter-row { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  #view-boxes .bix-ledger-clear { justify-self: start; }
}
@media (max-width: 900px) {
  #view-boxes .bix-ledger-workspace { grid-template-columns: 1fr; }
  #view-boxes .bix-ledger-register { border-right: 0; }
  #view-boxes .bix-ledger-inspector { position: static; min-height: 0; border-top: 1px solid #e4e8ed; }
}
@media (max-width: 640px) {
  #view-boxes .bix-ledger-header { display: grid; gap: 4px; padding: 17px 16px 0; }
  #view-boxes .bix-ledger-header h1 { font-size: 29px; }
  #view-boxes .bix-ledger-header-actions { justify-content: space-between; padding: 4px 0 0; }
  #view-boxes .bix-ledger-header-actions > div { margin-right: auto; border-right: 0; text-align: left; }
  #view-boxes .bix-ledger-tabs { gap: 15px; height: 48px; margin-top: 7px; }
  #view-boxes .bix-ledger-controls { padding: 14px 16px; }
  #view-boxes .bix-ledger-filter-row { grid-template-columns: 1fr 1fr; }
  #view-boxes .bix-ledger-clear { grid-column: 1 / -1; justify-self: start; }
  #view-boxes .bix-ledger-table { min-width: 780px; }
  #view-boxes .bix-ledger-pagination { align-items: flex-start; flex-wrap: wrap; padding: 10px 16px; }
  #view-boxes .bix-ledger-pagination label { margin-left: 0; }
  #view-boxes .bix-ledger-history { margin: 16px; padding: 14px; }
  #view-boxes .bix-ledger-inspector { padding: 17px 16px 20px; }
}

/* Searchable CRM site picker in Box Inventory movement records. */
.bix-site-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.bix-site-field > label { color: #7a8698; font-size: 11px; font-weight: 700; }
.bix-site-picker { position: relative; min-width: 0; }
.bix-site-picker-input { position: relative; }
.bix-site-picker-input > input[type="search"] { padding-right: 38px; }
.bix-site-picker-clear { position: absolute; top: 50%; right: 7px; display: grid; width: 26px; height: 26px; padding: 0; transform: translateY(-50%); place-items: center; border: 0; border-radius: 6px; background: transparent; color: #65748a; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.bix-site-picker-clear:hover { background: #edf3f1; color: #08744f; }
.bix-site-picker-clear[hidden], .bix-site-picker-results[hidden] { display: none !important; }
.bix-site-picker-results { position: absolute; z-index: 1002; top: calc(100% + 6px); left: 0; width: 100%; max-height: min(330px, 46vh); overflow-y: auto; padding: 5px; border: 1px solid #cbd8d2; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(18, 42, 34, .2); }
.bix-site-picker-option { display: grid; width: 100%; gap: 3px; padding: 10px; border: 0; border-radius: 7px; background: #fff; color: #19352b; text-align: left; cursor: pointer; }
.bix-site-picker-option + .bix-site-picker-option { border-top: 1px solid #edf1ef; }
.bix-site-picker-option:hover, .bix-site-picker-option.is-active, .bix-site-picker-option[aria-selected="true"] { background: #eef7f1; }
.bix-site-picker-option strong { overflow: hidden; color: #17382b; font-size: 12px; font-weight: 750; text-overflow: ellipsis; }
.bix-site-picker-option span { color: #718096; font-size: 10.5px; line-height: 1.4; overflow-wrap: anywhere; }
.bix-site-picker-empty, .bix-site-picker-count { padding: 10px; color: #718096; font-size: 11px; line-height: 1.45; }
.bix-site-picker-count { border-bottom: 1px solid #edf1ef; }
@media (max-width: 760px) {
  .bix-site-picker-results { max-height: min(280px, 38vh); }
}
