/* Yacht Workspace — Inventory module. Uses the Workspace look (sidebar, header,
   tokens); only what is specific to tables and status is defined here. */

:root {
  --inv-red: var(--danger);
  --inv-green: var(--success);
  --inv-amber: #b7791f;
  --inv-red-soft: color-mix(in srgb, var(--inv-red) 13%, transparent);
  --inv-amber-soft: color-mix(in srgb, var(--inv-amber) 15%, transparent);
  --inv-green-soft: color-mix(in srgb, var(--inv-green) 13%, transparent);
}

:root[data-theme="dark"] {
  --inv-amber: #e3b455;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --inv-amber: #e3b455;
  }
}

.module-root[hidden] {
  display: none !important;
}

.minimal-counter-warning {
  color: var(--inv-amber);
}

.minimal-counter-warning .minimal-counter-dot {
  background: var(--inv-amber);
}

.inv-scroll {
  padding: 18px 28px 80px;
  scrollbar-gutter: stable; /* a scrollbar appearing never changes the layout width */
}

/* ---------- header controls ---------- */

.inv-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inv-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--tab-hover);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.inv-pill.expired {
  background: var(--inv-red-soft);
  color: var(--inv-red);
}

.inv-pill.soon {
  background: var(--inv-amber-soft);
  color: var(--inv-amber);
}

.inv-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-spacer {
  flex: 1;
}

.inv-count {
  font-size: 12.5px;
  color: var(--text-faint);
}

.inv-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  min-width: 200px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
}

.inv-search:focus-within {
  border-color: var(--text-muted);
}

.inv-search-icon svg {
  width: 14px;
  height: 14px;
}

.inv-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.inv-search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.inv-select {
  height: 32px;
  max-width: 190px;
  padding: 0 30px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* Filter drop-downs live in one capsule, divided by thin lines */
.inv-filter-cap {
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.inv-fsel {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  transition: background 0.15s;
}

.inv-fsel + .inv-fsel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-strong);
  pointer-events: none;
}

.inv-fsel::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  background: var(--text-faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

/* the end cells follow the capsule's curve, so hover, tint and focus ring stay round */
.inv-fsel:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.inv-fsel:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.inv-fsel:hover {
  background: var(--tab-hover);
}

.inv-fsel:has(select:focus-visible) {
  background: var(--tab-hover);
  box-shadow: inset 0 0 0 1px var(--text-muted);
}

/* every filter is the same width; they only shrink together when the window is narrow */
.inv-fsel {
  flex: 0 1 150px;
  width: 150px;
}

.inv-fsel .inv-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 0 34px 0 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  text-overflow: ellipsis;
}

.inv-fsel .inv-select.inv-select-plan {
  max-width: none;
}

.inv-fsel-dot {
  display: none;
  position: absolute;
  right: 29px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--text);
  pointer-events: none;
}

/* A filter that is set: dark dot and a soft tint */
.inv-fsel:has(option:checked:not(:first-child)) {
  background: var(--accent-soft);
}

.inv-fsel:has(option:checked:not(:first-child)) .inv-fsel-dot {
  display: block;
}

.inv-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.inv-btn:hover {
  background: var(--tab-hover);
}

.inv-btn svg {
  width: 14px;
  height: 14px;
}

.inv-btn-primary {
  border-color: transparent;
  background: var(--text);
  color: var(--bg-elevated);
  font-weight: 600;
}

.inv-btn-primary:hover {
  background: var(--text);
  opacity: 0.88;
}

.inv-more svg {
  width: 17px;
  height: 17px;
}

/* ---------- table ---------- */

.inv-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 235px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.inv-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.inv-th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  padding: 0 4px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.inv-th-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.inv-th-inner .inv-th-menu {
  flex-shrink: 0;
}

.inv-th-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.inv-th-label:hover {
  background: var(--tab-hover);
  color: var(--text);
}

.inv-th-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-th-tracked {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--inv-amber);
  flex-shrink: 0;
}

.inv-sort svg {
  width: 11px;
  height: 11px;
  display: block;
}

.inv-th-menu,
.inv-add-col,
.inv-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  position: relative;
}

.inv-th-menu {
  opacity: 0;
}

.inv-th:hover .inv-th-menu,
.inv-th-menu:focus-visible {
  opacity: 1;
}

.inv-th-menu svg,
.inv-add-col svg,
.inv-row-btn svg {
  width: 14px;
  height: 14px;
}

.inv-th-menu:hover,
.inv-add-col:hover,
.inv-row-btn:hover {
  background: var(--tab-hover);
  color: var(--text);
}

.inv-row-btn.danger:hover {
  color: var(--danger);
}

.inv-th-rename {
  width: 160px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--text-muted);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

/* Overview rows: the status dot sits right against the first column */
.inv-th-dot,
.inv-td-dot {
  width: 22px;
  padding-left: 10px;
  padding-right: 0;
}

/* Category tables: row number with the status dot beside it */
.inv-th-rownum,
.inv-td-rownum {
  padding: 0 4px 0 6px;
  text-align: right;
  white-space: nowrap;
}

.inv-th-rownum {
  color: var(--text-faint);
  font-weight: 600;
}

.inv-rownum {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.inv-rownum .inv-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
}

.inv-td-plan {
  padding: 0;
}

.inv-th-actions,
.inv-td-actions {
  width: 1%;
  white-space: nowrap;
  padding-right: 8px;
}

.inv-td {
  height: 38px;
  padding: 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.inv-row:last-child .inv-td {
  border-bottom: none;
}

.inv-row:hover .inv-td {
  background: var(--row-hover);
}

.inv-row.inv-flash .inv-td {
  background: color-mix(in srgb, var(--inv-amber) 18%, transparent);
  transition: background 1.6s ease-out;
}

.inv-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  field-sizing: fixed;
  min-width: 0;
  text-overflow: ellipsis;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}

.inv-td-number .inv-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 70px;
}

.inv-input:focus {
  box-shadow: inset 0 0 0 1.5px var(--text-muted);
  background: var(--bg);
  border-radius: 4px;
}

.inv-td-date .inv-input {
  min-width: 128px;
  font-variant-numeric: tabular-nums;
}

.inv-input::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}

/* status colours */

.inv-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.inv-dot.status-expired {
  background: var(--inv-red);
}

.inv-dot.status-soon {
  background: var(--inv-amber);
}

.inv-dot.status-ok {
  background: var(--inv-green);
}

.inv-td-date.tracked .inv-input {
  font-weight: 500;
}

.inv-td-date.tracked.status-expired .inv-input {
  color: var(--inv-red);
}

.inv-td-date.tracked.status-soon .inv-input {
  color: var(--inv-amber);
}

.inv-td-date.tracked.status-ok .inv-input {
  color: var(--inv-green);
}

/* Fire Plan marker */

.inv-plan {
  display: inline-flex;
  color: var(--text-faint);
  opacity: 0.45;
}

.inv-plan svg {
  width: 15px;
  height: 15px;
}

.inv-plan.linked {
  color: var(--text);
  opacity: 1;
}

/* Plan location: muted outline when not placed, solid dark pin when placed */
.inv-plan-cell:not(.linked) .inv-plan {
  color: var(--text-faint);
  opacity: 0.8;
}

.inv-plan-cell.linked .inv-plan svg {
  width: 15px;
  height: 15px;
}

.inv-row-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
}

.inv-row:hover .inv-row-actions,
.inv-row:focus-within .inv-row-actions,
.inv-row-btn.has-files {
  opacity: 1;
}

.inv-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  box-sizing: border-box;
  border-radius: 7px;
  background: var(--text);
  color: var(--bg-elevated);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.inv-empty {
  padding: 36px 12px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
}

.inv-empty-title {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- overview ---------- */

/* Group dashboard: big numbers on the page; the number carries the colour */
.inv-dash-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 0;
}

.inv-dash-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 0 28px;
  border: none;
  border-left: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.inv-dash-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.inv-dash-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.inv-dash-label {
  font-size: 12.5px;
  color: var(--text-muted);
  text-underline-offset: 3px;
}

.inv-dash-stat:hover .inv-dash-label {
  color: var(--text);
  text-decoration: underline;
}

.inv-dash-stat:focus-visible {
  outline: 2px solid var(--text-muted);
  outline-offset: 4px;
  border-radius: 6px;
}

.inv-dash-stat.expired .inv-dash-value {
  color: var(--inv-red);
}

.inv-dash-stat.soon .inv-dash-value {
  color: var(--inv-amber);
}

.inv-overview-table .inv-td-text {
  padding: 0 10px;
  white-space: nowrap;
}

.inv-overview-table .inv-td-main {
  white-space: normal;
  min-width: 220px;
}

.inv-row-link {
  cursor: pointer;
}

.inv-row-link:focus-visible {
  outline: 2px solid var(--text-muted);
  outline-offset: -2px;
}

.inv-due {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.inv-due.status-expired {
  background: var(--inv-red-soft);
  color: var(--inv-red);
}

.inv-due.status-soon {
  background: var(--inv-amber-soft);
  color: var(--inv-amber);
}

.inv-due.status-ok {
  background: var(--inv-green-soft);
  color: var(--inv-green);
}

.inv-due-col {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

.inv-more-btn {
  margin: 12px auto 0;
  display: flex;
}

/* ---------- menu ---------- */

.inv-menu {
  position: fixed;
  z-index: 300;
  min-width: 220px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-popover);
}

.inv-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 30px;
  padding: 0 10px 0 4px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.inv-menu-item:hover:not(:disabled),
.inv-menu-item:focus-visible {
  background: var(--tab-hover);
  outline: none;
}

.inv-menu-item:disabled {
  color: var(--text-faint);
  cursor: default;
}

.inv-menu-item.danger {
  color: var(--danger);
}

.inv-menu-check {
  display: inline-flex;
  width: 18px;
  justify-content: center;
}

.inv-menu-check svg {
  width: 13px;
  height: 13px;
}

.inv-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--border);
}

/* ---------- item details ---------- */

.inv-detail {
  width: min(760px, calc(100vw - 32px));
  max-height: 88vh;
}

.inv-detail-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.inv-detail-title {
  margin: 2px 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.inv-detail-section {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.inv-detail-section .export-label {
  margin-bottom: 8px;
}

.inv-detail-sechead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.inv-detail-sechead .export-label {
  margin-bottom: 0;
}

.inv-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 13.5px;
}

.inv-detail-key {
  color: var(--text-muted);
}

.inv-detail-inline {
  display: flex;
  gap: 8px;
}

.inv-detail-input {
  flex: 1;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg);
}

.inv-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-faint);
}

.inv-plan-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.inv-plan-state.linked {
  color: var(--text);
}

.inv-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.inv-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-underline-offset: 3px;
  cursor: pointer;
}

.inv-file-size {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- groups ---------- */

.inv-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 2px 12px 2px 12px;
  margin: 0 0 2px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.inv-group-head:hover {
  background: var(--tab-hover);
  color: var(--text);
}

.inv-group-head.active {
  color: var(--text);
  background: var(--tab-hover);
}

.inv-group-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-group-empty {
  padding: 4px 12px 8px 40px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.inv-add-group {
  margin-top: 0;
}

.inv-group-sub {
  padding: 0 0 2px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.inv-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-faint);
}

.inv-crumb-link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--text-muted);
  cursor: pointer;
}

.inv-crumb-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.inv-crumb-here {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  align-content: start;
}

.inv-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 112px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.inv-cat-card:hover {
  border-color: var(--border-strong);
}

.inv-cat-card-name {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.inv-cat-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-cat-card .inv-plan-chip {
  margin-top: auto;
}

.inv-cat-card-add {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-size: 13.5px;
}

.inv-cat-card-add:hover {
  background: var(--tab-hover);
  color: var(--text);
}

.inv-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.inv-plan-chip.off {
  border-style: dashed;
  color: var(--text-faint);
  font-weight: 500;
}

.inv-plan-chip .inv-plan svg {
  width: 11px;
  height: 11px;
}

.inv-scroll ~ * .tab-title-display,
.module-root .main-header .tab-title-display {
  max-width: min(420px, 60%);
}

.inv-select.inv-select-plan {
  max-width: none;
}

/* ---------- collapsible groups ---------- */

.inv-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: -4px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.inv-group-toggle:hover {
  background: var(--control-active-bg);
}

.inv-group-toggle svg {
  width: 13px;
  height: 13px;
  transition: transform 0.12s ease;
}

.inv-group-head.collapsed .inv-group-toggle svg {
  transform: rotate(-90deg);
}

@media (prefers-reduced-motion: reduce) {
  .inv-group-toggle svg {
    transition: none;
  }
}

/* ---------- group header, plan card, plan view ---------- */

.inv-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.inv-btn.danger {
  color: var(--danger);
}

.inv-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.inv-plan-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.inv-plan-card-icon {
  display: inline-flex;
  color: var(--text-muted);
  flex-shrink: 0;
}

.inv-plan-card-icon svg {
  width: 20px;
  height: 20px;
}

.inv-plan-card-text {
  min-width: 0;
}

.inv-plan-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

.inv-plan-card-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(520px, 60vw);
}

.inv-plan-card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.inv-plan-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-scroll.inv-scroll-fill {
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

.inv-plan-bar {
  align-items: center;
}

.inv-plan-bar-name {
  font-size: 13.5px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-plan-frame {
  flex: 1;
  min-height: 420px;
  display: flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.inv-plan-pdf {
  flex: 1;
  width: 100%;
  border: none;
}

.inv-plan-msg {
  margin: auto;
  padding: 24px;
  color: var(--text-faint);
  font-size: 13.5px;
  text-align: center;
}

.inv-plan-empty {
  margin: auto;
  max-width: 420px;
}

.inv-plan-empty-action {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* ---------- expiring-by range ---------- */

.inv-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inv-range-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.inv-range-switch button {
  padding: 0 11px;
  white-space: nowrap;
}

.inv-range-date {
  display: inline-flex;
}

.inv-range-text {
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- plan layer eye ---------- */

.inv-loc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 20px;
  margin-right: -2px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.85;
}

.inv-loc-toggle.off {
  color: var(--text-faint);
  opacity: 0.75;
}

.inv-loc-toggle svg {
  width: 14px;
  height: 14px;
}

.tab-item:hover .inv-loc-toggle,
.inv-loc-toggle:hover,
.inv-loc-toggle:focus-visible {
  opacity: 1;
}

.inv-loc-toggle:hover {
  background: var(--control-active-bg);
}

button.inv-plan-chip {
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

button.inv-plan-chip:hover {
  background: var(--tab-hover);
}

.inv-plan-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--text-faint);
  font-size: 13px;
  white-space: nowrap;
}

.inv-plan-cell.linked {
  color: var(--text);
}

.inv-plan-cell .inv-plan svg {
  width: 14px;
  height: 14px;
}

/* ---------- add column dialog ---------- */

.inv-addcol {
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 18px;
}

.inv-addcol-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.inv-addcol-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-addcol-input {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.inv-addcol-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--text-muted);
}

.inv-addcol-types {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-addcol-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.inv-addcol-type:hover:not(:disabled) {
  background: var(--tab-hover);
}

.inv-addcol-type.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

.inv-addcol-type:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inv-addcol-type-name {
  font-size: 13.5px;
  font-weight: 600;
}

.inv-addcol-type-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.inv-addcol-track {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.inv-addcol-track[hidden] {
  display: none;
}

/* ---------- column widths ---------- */

.inv-table-fixed {
  table-layout: fixed;
  min-width: 0;
}

.inv-table-fixed .inv-th,
.inv-table-fixed .inv-td {
  overflow: hidden;
}

.inv-table-fixed .inv-th {
  overflow: visible;
}

.inv-table-fixed .inv-th-actions,
.inv-table-fixed .inv-td-actions {
  width: auto;
}

.inv-th-fill,
.inv-td-fill {
  padding: 0;
}

.inv-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 3;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.inv-resizer::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 4px;
  width: 1px;
  background: var(--border-strong);
  transition: background 0.1s, width 0.1s, left 0.1s;
}

.inv-resizer:hover::after,
.inv-resizer:focus-visible::after,
.inv-resizer.dragging::after {
  left: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--text-muted);
}

body.inv-col-resizing,
body.inv-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* ---------- plan viewer and markers ---------- */

button.inv-plan-cell {
  height: 36px;
  margin: 0 4px;
  padding: 0 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

button.inv-plan-cell:hover {
  background: var(--tab-hover);
  color: var(--text);
}

button.inv-plan-cell.linked {
  color: var(--text);
}

.inv-plan-frame {
  flex-direction: column;
}

.inv-pv {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.inv-pv-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.inv-pv-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.inv-pv-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
}

.inv-pv-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.inv-pv-page-input {
  width: 48px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: center;
}

.inv-pv-count,
.inv-pv-zoom {
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.inv-pv-zoom {
  min-width: 40px;
  text-align: center;
}

.inv-pv-hint {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.inv-pv-banner {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--inv-amber-soft);
  color: var(--text);
}

.inv-pv-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: color-mix(in srgb, var(--text) 8%, var(--bg));
  cursor: grab;
  user-select: none;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

.inv-pv-scroll.panning {
  cursor: grabbing;
}

.inv-pv-page {
  position: relative;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 6px 20px rgba(0, 0, 0, 0.12);
}

.inv-pv-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.inv-pv-canvas.inv-pv-detail {
  position: absolute;
  pointer-events: none;
}

.inv-pv-canvas.inv-pv-detail[hidden] {
  display: none;
}

.inv-pv.placing .inv-pv-page {
  cursor: crosshair;
}

.inv-pv-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  container-type: inline-size; /* markers size themselves from the page width */
  --mk-size: 0.033;
}

.inv-marker {
  position: absolute;
  z-index: 1;
  width: calc(var(--mk-size) * 100%);
  aspect-ratio: 1;
  margin: calc(var(--mk-size) * -50%) 0 0 calc(var(--mk-size) * -50%);
  padding: 0;
  border: max(1px, calc(var(--mk-size) * 7cqw)) solid rgba(255, 138, 0, 0.45);
  border-radius: 50%;
  background: rgba(255, 138, 0, 0.14);
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.inv-marker:hover,
.inv-marker:focus-visible {
  z-index: 3;
  border-color: rgba(255, 120, 0, 0.95);
  background: rgba(255, 138, 0, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.28);
  transform: scale(1.15);
  outline: none;
}

.inv-marker.unlocked {
  border-style: dashed;
  border-color: rgba(255, 120, 0, 0.8);
  cursor: grab;
}

/* resize handle: only on an unlocked marker, at its lower right edge */
.inv-marker-grip {
  position: absolute;
  left: 85.4%;
  top: 85.4%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  box-sizing: border-box;
  border: 2px solid rgb(255, 120, 0);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: nwse-resize;
  pointer-events: auto;
  z-index: 5;
}

.inv-marker.resizing {
  z-index: 4;
  background: rgba(255, 138, 0, 0.3);
}

.inv-marker.dragging {
  cursor: grabbing;
  z-index: 4;
  background: rgba(255, 138, 0, 0.5);
}

.inv-marker.pending {
  border-style: dashed;
  border-color: rgba(255, 120, 0, 0.95);
  background: rgba(255, 138, 0, 0.3);
  pointer-events: none;
}

.inv-pv.placing .inv-marker {
  pointer-events: none;
  opacity: 0.6;
}

.inv-marker.pulse {
  z-index: 3;
  animation: inv-marker-pulse 0.9s ease-out 3;
}

@keyframes inv-marker-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 138, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 0 22px rgba(255, 138, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .inv-marker,
  .inv-marker.pulse {
    transition: none;
    animation: none;
  }
  .inv-marker.pulse {
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.6);
  }
}

/* ---------- marker popup ---------- */

.inv-pop {
  position: fixed;
  z-index: 10000;
  width: min(364px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.2);
}

.inv-pop-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 10px 10px 14px;
  border-bottom: 1px solid var(--border);
}

.inv-pop-titlewrap {
  flex: 1;
  min-width: 0;
}

.inv-pop-cat {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
}

.inv-pop-title {
  font-size: 14.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.inv-pop-close {
  flex-shrink: 0;
}

.inv-pop-rows {
  padding: 8px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.inv-pop-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 8px;
  font-size: 13px;
}

.inv-pop-label {
  color: var(--text-muted);
}

.inv-pop-value {
  overflow-wrap: anywhere;
}

.inv-pop-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 6px;
  border-top: 1px solid var(--border);
}

.inv-pop-note {
  padding: 0 14px 12px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- add marker picker ---------- */

.inv-pick {
  width: min(460px, calc(100vw - 32px));
}

.inv-pick-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.inv-pick-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.inv-pick-item:hover {
  background: var(--tab-hover);
}

.inv-pick-item.selected {
  border-color: var(--text);
  background: var(--bg-elevated);
}

.inv-pick-main {
  font-size: 13.5px;
  font-weight: 600;
}

.inv-pick-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.inv-pick-sub.placed {
  color: var(--inv-amber);
}

.inv-pick .export-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inv-pop-row .inv-due {
  justify-self: start;
}

/* ---------- editable marker popup, remove choice ---------- */

.inv-pop-row {
  align-items: center;
}

.inv-pop-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.inv-pop-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
}

.inv-pop-input:hover {
  border-color: var(--border-strong);
}

.inv-pop-input:focus {
  outline: none;
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

.inv-pop-field .inv-due {
  flex-shrink: 0;
}

.inv-pop-field .inv-due[hidden] {
  display: none;
}

.inv-remove {
  width: min(420px, calc(100vw - 32px));
}

.inv-remove-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.inv-remove-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.inv-remove-opt:hover {
  background: var(--tab-hover);
}

.inv-remove-opt.danger .inv-addcol-type-name {
  color: var(--danger);
}

.inv-remove-opt.danger:hover {
  border-color: var(--danger);
}

.inv-plan-bar .inv-count {
  margin-left: -4px;
}

/* ---------- notes ---------- */

.inv-note-flag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--text-muted);
  vertical-align: middle;
  flex-shrink: 0;
}

.inv-note-flag svg {
  width: 14px;
  height: 14px;
}

.inv-row-btn.note {
  color: var(--text-muted);
}

.inv-note-text {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}

.inv-note-text:focus {
  outline: none;
  border-color: var(--text-muted);
}

.inv-marker.has-note::after {
  content: "i";
  position: absolute;
  top: -26%;
  right: -26%;
  width: 58%;
  height: 58%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #5f6f86;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: calc(var(--mk-size) * 30cqw);
  line-height: 1;
  box-shadow: 0 0 0 max(1px, calc(var(--mk-size) * 5cqw)) #fff;
  pointer-events: none;
}

/* ---------- Check Mode ---------- */

.inv-pv-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.inv-pv-body .inv-pv-scroll {
  flex: 1;
  min-width: 0;
}

.inv-pv-panel {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-elevated);
}

.inv-pv-panel[hidden] {
  display: none;
}

.inv-pv-panel-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
}

.inv-pv-progress-text {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inv-pv-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--tab-hover);
  overflow: hidden;
}

.inv-pv-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--inv-green);
  transition: width 0.2s ease;
}

.inv-pv-panel-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.inv-pv-filter {
  align-self: flex-start;
}

.inv-pv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.inv-pv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.inv-pv-row:hover {
  background: var(--tab-hover);
}

.inv-pv-row-mark {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 138, 0, 0.8);
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  font-weight: 700;
}

.inv-pv-row.ok .inv-pv-row-mark {
  border-color: var(--inv-green);
  background: var(--inv-green);
}

.inv-pv-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.inv-pv-row-main {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-pv-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-pv-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.inv-pv-check-banner {
  background: color-mix(in srgb, var(--inv-green) 18%, transparent);
}

/* markers while checking: orange = still to check, green = checked */
.inv-marker.chk-unchecked {
  border-color: rgba(255, 120, 0, 0.95);
  background: rgba(255, 138, 0, 0.32);
}

.inv-marker.chk-ok,
.inv-marker.chk-followup {
  border-color: rgba(26, 140, 76, 0.95);
  background: rgba(40, 175, 95, 0.5);
}

.inv-marker.chk-ok:hover,
.inv-marker.chk-followup:hover {
  background: rgba(40, 175, 95, 0.75);
}

/* inspection popup */
.inv-inspect {
  width: min(340px, calc(100vw - 16px));
}

.inv-pop-open-note {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--tab-hover);
  color: var(--text);
  font-size: 12.5px;
  white-space: pre-wrap;
}

.inv-pop-open-note .inv-note-flag {
  margin-left: 0;
  margin-top: 1px;
}

.inv-inspect-state {
  padding: 0 14px 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.inv-inspect-state.done {
  color: var(--inv-green);
  font-weight: 600;
}

.inv-inspect-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 14px 12px;
}

.inv-inspect-actions[hidden],
.inv-inspect-form[hidden] {
  display: none;
}

.inv-inspect-actions .inv-btn {
  justify-content: center;
  height: 36px;
  font-weight: 600;
}

.inv-inspect-ok {
  border-color: transparent;
  background: var(--inv-green);
  color: #fff;
}

.inv-inspect-ok:hover {
  background: var(--inv-green);
  opacity: 0.88;
}

.inv-inspect-followup {
  color: var(--text);
}

.inv-inspect-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 14px;
}

.inv-inspect-formrow {
  display: flex;
  gap: 8px;
}

.inv-inspect-formrow .inv-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* summary and history */
.inv-sum-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.inv-sum-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.inv-sum-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inv-sum-label {
  font-size: 12px;
  color: var(--text-muted);
}

.inv-sum-cell.ok .inv-sum-value {
  color: var(--inv-green);
}

.inv-sum-cell.warn .inv-sum-value {
  color: var(--inv-amber);
}

.inv-sum-cell.note .inv-sum-value {
  color: var(--text);
}

.inv-sum-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.inv-sum-note {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--tab-hover);
}

.inv-sum-note span {
  color: var(--text-muted);
}

.inv-summary-dialog,
.inv-history {
  width: min(480px, calc(100vw - 32px));
}

.inv-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.inv-history-item {
  border: 1px solid var(--border);
  border-radius: 10px;
}

.inv-history-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.inv-history-date {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.inv-history-nums {
  flex: 1;
  color: var(--text-muted);
}

.inv-history-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 10px;
}

.inv-sum-note {
  background: var(--tab-hover);
}

.inv-pop-notes {
  height: auto;
  min-height: 48px;
  padding: 5px 8px;
  resize: vertical;
}

.inv-pop-row:has(.inv-pop-notes) {
  align-items: start;
}

/* ---------- group markers ---------- */

.inv-marker.group {
  border-color: color-mix(in srgb, var(--mk, #ff8a00) 55%, transparent);
  background: color-mix(in srgb, var(--mk, #ff8a00) 20%, transparent);
  color: color-mix(in srgb, var(--mk, #ff8a00) 55%, #000);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: calc(var(--mk-size) * 46cqw);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inv-marker.group.wide {
  font-size: calc(var(--mk-size) * 36cqw);
}

.inv-marker.group:hover,
.inv-marker.group:focus-visible {
  border-color: var(--mk, #ff8a00);
  background: color-mix(in srgb, var(--mk, #ff8a00) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk, #ff8a00) 30%, transparent);
}

.inv-marker.group.unlocked {
  border-color: var(--mk, #ff8a00);
}

.inv-marker.group.chk-unchecked {
  border-color: rgba(255, 120, 0, 0.95);
  background: rgba(255, 138, 0, 0.32);
  color: #8a4300;
}

.inv-marker.group.chk-ok {
  border-color: rgba(26, 140, 76, 0.95);
  background: rgba(40, 175, 95, 0.5);
  color: #0d5a31;
}

/* plan location cell */
.inv-plan-cell-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.inv-plan-cell {
  max-width: calc(100% - 8px);
}


/* item pickers */
.inv-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-picker-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.inv-link-btn {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
}

.inv-pick-item {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.inv-pick-textcol {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.inv-pick-main,
.inv-pick-sub {
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-pick-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  color: var(--bg-elevated);
  font-size: 12px;
  line-height: 15px;
  text-align: center;
  font-weight: 700;
}

.inv-pick-item.selected .inv-pick-check {
  background: var(--text);
  border-color: var(--text);
}

.inv-viewitems {
  width: min(480px, calc(100vw - 32px));
}

.inv-swatches {
  display: flex;
  gap: 8px;
}

.inv-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--sw);
  cursor: pointer;
  padding: 0;
}

.inv-swatch.on {
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--text);
}

/* group popup */
.inv-group-pop {
  width: min(420px, calc(100vw - 16px));
}

.inv-group-pop .inv-group-search {
  margin: 8px 14px 6px;
  width: auto;
}

.inv-group-pop .inv-pick-list {
  margin: 0 14px 6px;
  max-height: min(320px, 45vh);
}

.inv-pop-itemlist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 14px 8px;
  max-height: 150px;
  overflow-y: auto;
}

.inv-pop-listrow {
  font-size: 12.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--tab-hover);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-pop-listrow.more {
  background: transparent;
  color: var(--text-muted);
}

/* group inspection */
.inv-group-inspect {
  width: min(400px, calc(100vw - 16px));
}

.inv-gi-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 8px;
  max-height: min(340px, 50vh);
  overflow-y: auto;
}

.inv-gi-row {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 8px;
}

.inv-gi-row.done {
  background: color-mix(in srgb, var(--inv-green) 8%, transparent);
}

.inv-gi-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-gi-text {
  flex: 1;
  min-width: 0;
}

.inv-gi-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.inv-gi-actions .inv-btn {
  height: 28px;
  padding: 0 9px;
  font-size: 12.5px;
}

.inv-gi-ok {
  border-color: transparent;
  background: var(--inv-green);
  color: #fff;
}

.inv-gi-form {
  padding: 8px 0 2px;
}

.inv-plan-chip:not(.off) .inv-plan {
  color: var(--text);
  opacity: 1;
}

.inv-plan-chip.off .inv-plan {
  color: var(--text-faint);
  opacity: 1;
}

/* dates: only the text changes colour, centred like every other cell */
.inv-input[type="date"] {
  display: flex;
  align-items: center;
  line-height: normal;
  font-family: inherit;
  font-size: 13.5px;
  padding-top: 0;
  padding-bottom: 0;
}

.inv-input[type="date"]::-webkit-datetime-edit,
.inv-input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.inv-td-date.tracked .inv-input {
  font-weight: 400;
}

/* notes column */
button.inv-notes-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 2px 6px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  opacity: 0.85;
}

button.inv-notes-cell svg {
  width: 16px;
  height: 16px;
}

button.inv-notes-cell:hover {
  background: var(--tab-hover);
  color: var(--text);
  opacity: 1;
}

button.inv-notes-cell.has {
  color: var(--text);
  opacity: 1;
}

.inv-notes-pop {
  width: min(380px, calc(100vw - 16px));
}

.inv-notes-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 4px;
}

.inv-notes-body .inv-note-text {
  min-height: 110px;
}

.inv-notes-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 14px;
}

.inv-rownum {
  transform: translateY(-1px);
}

/* ---------- date badges ---------- */

.inv-td-date.tracked .inv-input {
  display: inline-flex;
  width: auto;
  max-width: calc(100% - 12px);
  height: 26px;
  margin: 5px 6px;
  padding: 0 8px 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.inv-td-date.tracked.status-expired .inv-input {
  background: var(--inv-red-soft);
  color: var(--inv-red);
}

.inv-td-date.tracked.status-soon .inv-input {
  background: var(--inv-amber-soft);
  color: var(--inv-amber);
}

.inv-td-date.tracked.status-ok .inv-input {
  background: var(--inv-green-soft);
  color: var(--inv-green);
}

.inv-td-date.tracked .inv-input:focus {
  box-shadow: 0 0 0 1.5px currentColor;
  border-radius: 999px;
}

.inv-td-date.tracked .inv-input::-webkit-calendar-picker-indicator {
  margin-left: 4px;
  opacity: 0.7;
}

/* ---------- sidebar attention dot ---------- */

.inv-attn-dot {
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

.inv-attn-dot.expired {
  background: var(--inv-red);
}

.inv-attn-dot.soon {
  background: var(--inv-amber);
}

/* ---------- group dashboard ---------- */

.inv-section-head {
  margin: 18px 0 8px;
}

.inv-section-head .export-label {
  margin: 0;
}

.inv-group-toolbar {
  margin-bottom: 0;
}

/* Group summary: sits on the page, no frame */
.inv-zone {
  margin-bottom: 20px;
}

.inv-zone-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.inv-zone-head .export-label {
  margin: 0;
}

.inv-zone-scope {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.inv-zone-scope svg {
  width: 13px;
  height: 13px;
}

/* Results panel: the filtered list */
.inv-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.inv-results-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.inv-results-title {
  font-size: 15px;
  font-weight: 700;
}

.inv-results-head .inv-link-btn {
  color: var(--text-muted);
  text-underline-offset: 3px;
}

.inv-results .inv-list-host .inv-table-wrap {
  margin-top: 0;
}

.inv-scroll > .inv-range {
  margin-bottom: 14px;
}

/* ---------- column drag and drop ---------- */

.inv-table-wrap {
  position: relative;
}

.inv-rownum {
  transform: none;
}

/* ---------- date badge: symmetric and centred ---------- */

.inv-td-date.tracked .inv-input {
  position: relative;
  justify-content: center;
  align-items: center;
  /* Fixed width with no side padding: the date sits dead centre. */
  width: 104px;
  min-width: 0;
  max-width: calc(100% - 12px);
  height: 26px;
  margin: 5px 8px;
  padding: 0;
  line-height: 1;
  text-align: center;
}

.inv-td-date.tracked .inv-input::-webkit-datetime-edit,
.inv-td-date.tracked .inv-input::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
  text-align: center;
}

/* The whole badge opens the calendar; no icon to unbalance the text. */
.inv-td-date.tracked .inv-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

/* ---------- sidebar: fixed dot slot ---------- */

.inv-attn-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 20px;
  flex-shrink: 0;
}

.inv-attn-dot {
  margin-left: 0;
}

/* ---------- sidebar hierarchy: groups above their categories ---------- */

.inv-group-head {
  min-height: 32px;
  padding: 3px 10px 3px 8px;
  margin: 2px 0 3px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.inv-group-head:hover,
.inv-group-head.active {
  background: var(--tab-hover);
}

.inv-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px 17px;
  padding-left: 4px;
  border-left: 1.5px solid var(--border-strong);
}

.inv-cat-list .tab-item {
  font-weight: 400;
}

.inv-group-empty {
  padding-left: 30px;
}

/* ---------- column drag: columns slide apart ---------- */

.inv-th-inner {
  cursor: grab;
}

body.inv-col-dragging,
body.inv-col-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.col-shifting {
  will-change: transform;
}

/* The grabbed column leaves its slot; only a light ghost follows the pointer. */
.col-lifted {
  opacity: 0;
  transition: none !important;
}

.inv-col-gap {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  border-left: 2px solid var(--text-muted);
  border-right: 2px solid var(--text-muted);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1), opacity 0.15s;
}

.inv-col-gap.done {
  opacity: 0;
}

.inv-col-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  opacity: 0.96;
  transition: opacity 0.15s;
}

.inv-col-ghost.done {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .col-shifting,
  .inv-col-gap {
    transition: none !important;
  }
}

/* ---------- row selection ---------- */

button.inv-rownum {
  display: inline-block;
  min-width: 22px;
  padding: 3px 4px;
  border: none;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  text-align: right;
  cursor: pointer;
}

button.inv-rownum:hover {
  background: var(--control-active-bg);
  color: var(--text);
}

.inv-row.selected .inv-td,
.inv-row.selected:hover .inv-td {
  background: color-mix(in srgb, var(--text) 9%, transparent);
}

.inv-row.selected .inv-td-rownum {
  box-shadow: inset 3px 0 0 var(--text);
}

.inv-row.selected button.inv-rownum {
  color: var(--text);
  font-weight: 700;
}

.inv-row.selected .inv-row-actions {
  opacity: 1;
}

/* ---------- decks ---------- */

.inv-deck-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
  background-image: none;
}

.inv-deck-select:hover {
  background: var(--tab-hover);
}

.inv-deck-select option {
  color: var(--text);
  background: var(--bg-elevated);
}

.deck-editor {
  width: min(460px, calc(100vw - 32px));
}

.deck-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}

.deck-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.deck-row .inv-addcol-input {
  flex: 1;
  min-width: 0;
}

.deck-use {
  min-width: 52px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: right;
  white-space: nowrap;
}

.deck-row .inv-row-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.deck-add {
  display: flex;
  gap: 8px;
}

.deck-add .inv-addcol-input {
  flex: 1;
}

.deck-error {
  font-size: 12.5px;
  color: var(--danger);
}

.deck-error[hidden] {
  display: none;
}

/* ---------- check scope ---------- */

.inv-scope {
  width: min(440px, calc(100vw - 32px));
}

.inv-scope-tabs {
  align-self: flex-start;
}

.inv-scope-list {
  max-height: 280px;
}

.inv-pv-panel-scope {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.deck-also {
  max-width: 120px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tab-hover);
  color: var(--text-muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-existing {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-existing:empty {
  display: none;
}

.deck-existing select {
  flex: 1;
}

/* ---------- typed dates with a calendar button ---------- */

.inv-date {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.inv-date .inv-date-text {
  flex: 1;
  min-width: 0;
}

.inv-date-text::placeholder {
  color: var(--text-faint);
  opacity: 0.85;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.inv-td-date.tracked .inv-date-text {
  flex: 0 0 auto;
}

.inv-date-text.invalid {
  box-shadow: inset 0 0 0 1.5px var(--inv-red);
  border-radius: 6px;
}

.inv-td-date.tracked .inv-date-text.invalid {
  border-radius: 999px;
}

.inv-date-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  opacity: 0.75;
}

.inv-date-btn svg {
  width: 14px;
  height: 14px;
}

.inv-date-btn:hover,
.inv-date-btn:focus-visible {
  background: var(--tab-hover);
  color: var(--text);
  opacity: 1;
}

.inv-date-native {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.inv-date-compact .inv-input {
  height: 28px;
  border-radius: 7px;
  background: var(--bg);
  font-size: 13px;
}

/* ---------- table scrollbars take their own space ---------- */

.inv-table-wrap::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.inv-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.inv-table-wrap::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--text) 28%, transparent);
  border: 4px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.inv-table-wrap::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--text) 42%, transparent);
}

.inv-table-wrap::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---------- date field in the table: only the value or the placeholder ---------- */

button.inv-date-text {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

button.inv-date-text:hover {
  background: var(--tab-hover);
}

button.inv-date-text.is-empty {
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.inv-td-date.tracked button.inv-date-text {
  display: block;
  width: 104px;
  text-align: center;
  line-height: 26px;
  height: 26px;
}

.inv-td-date.tracked button.inv-date-text:hover {
  filter: brightness(0.96);
}

/* ---------- date window ---------- */

.inv-datepop {
  width: 268px;
  padding: 12px;
  z-index: 10001;
}

.inv-datepop-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.inv-datepop-input.invalid {
  border-color: var(--inv-red);
  box-shadow: 0 0 0 1px var(--inv-red);
}

.inv-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.inv-cal-title {
  font-size: 13px;
  font-weight: 600;
}

.inv-cal-arrow {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.inv-cal-arrow:hover {
  background: var(--tab-hover);
  color: var(--text);
}

.inv-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.inv-cal-dow {
  padding: 4px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
}

.inv-cal-day {
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.inv-cal-day:hover {
  background: var(--tab-hover);
}

.inv-cal-day.today {
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.inv-cal-day.selected {
  background: var(--text);
  color: var(--bg-elevated);
  font-weight: 600;
}

.inv-cal-foot {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: 6px;
}

.inv-cal-foot:empty {
  display: none;
}

/* ---------- sidebar utilities ---------- */


.inv-export {
  width: min(460px, calc(100vw - 32px));
}

.inv-export .inv-addcol-type {
  cursor: pointer;
}

.inv-export .inv-addcol-type select {
  margin-top: 8px;
  width: 100%;
}

/* ---------- item id and QR ---------- */

.inv-itemid {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--tab-hover);
  color: var(--text);
  font: 12.5px ui-monospace, Menlo, monospace;
  overflow-wrap: anywhere;
  user-select: all;
}

.inv-qr {
  width: min(560px, calc(100vw - 32px));
}

.inv-qr-body {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.inv-qr-preview {
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.inv-qr-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}

.inv-qr-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-qr-idrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.inv-qr-label {
  width: 52px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.inv-qr-link {
  font-size: 11.5px;
}

.inv-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- scanner ---------- */

.inv-scan {
  width: min(480px, calc(100vw - 32px));
}

.inv-scan-view {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #111;
  overflow: hidden;
}

.inv-scan-view[hidden] {
  display: none;
}

.inv-scan-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-scan-frame {
  position: absolute;
  inset: 18%;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.inv-scan-status {
  min-height: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.inv-scan-problem {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: var(--inv-red-soft);
  color: var(--text);
  font-size: 13.5px;
}

.inv-scan-problem[hidden] {
  display: none;
}

.inv-scan-manual {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inv-scan-manual .inv-addcol-input {
  flex: 1;
  min-width: 180px;
}


/* ---------- item profile ---------- */

.inv-profile-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inv-profile-titles {
  flex: 1;
  min-width: 0;
}

.inv-profile-head .inv-detail-title {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.inv-profile-status {
  display: inline-flex;
  margin-top: 2px;
}

.inv-profile-close {
  flex-shrink: 0;
}

.inv-profile-sec {
  padding: 10px 0;
}

.inv-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.inv-pf {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.inv-pf.wide {
  grid-column: 1 / -1;
}

.inv-pf-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.inv-pf-input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.inv-pf-input:hover {
  border-color: var(--border-strong);
}

.inv-pf-input:focus {
  outline: none;
  border-color: var(--text-muted);
  background: var(--bg-elevated);
}

select.inv-pf-input {
  cursor: pointer;
}

.inv-pf-date {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.inv-pf-date .inv-td-date {
  display: inline-flex;
  flex-shrink: 0;
}

.inv-pf-date .inv-date {
  min-width: 0;
}

.inv-pf-date button.inv-date-text,
.inv-range-date button.inv-date-text {
  height: 26px;
  line-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  width: 112px;
  text-align: center;
}

.inv-pf-date .inv-td-date.tracked button.inv-date-text {
  border-color: transparent;
}

.inv-pf-datetext {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}

.inv-profile-sec .inv-detail-inline {
  align-items: center;
}

.inv-profile-sec .inv-detail-inline .inv-itemid {
  flex: 1;
  min-width: 0;
}

.inv-profile-sec .inv-note-text {
  min-height: 56px;
}

/* ---------- item profile: header and Done stay in view ---------- */

.export-modal.inv-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 14px;
}

.inv-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -8px;
  padding: 0 8px;
}

.inv-profile-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-elevated);
  padding-bottom: 2px;
}

.export-modal.inv-detail > .export-modal-actions {
  flex-shrink: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ---------- item profile: summary, dates, fixed row ---------- */

.inv-pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
}

.inv-pf-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-muted, var(--bg));
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-pf-chip.on {
  color: var(--text);
}

.inv-profile-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.inv-pf-datecard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}

.inv-pf-datecard .inv-pf-label {
  grid-column: 1 / -1;
}

.inv-pf-datecard .inv-pf-datetext[hidden] {
  display: none;
}

.inv-profile-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.inv-profile-trio.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inv-pf-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.inv-pf-panel .export-label {
  margin-bottom: 0;
}

.inv-pf-panel .inv-note-text {
  width: 100%;
  box-sizing: border-box;
  min-height: 92px;
  resize: vertical;
}

.inv-pf-panel .inv-detail-inline {
  width: 100%;
  align-items: center;
}

.inv-pf-panel .inv-plan-state {
  align-items: flex-start;
  font-size: 13px;
}

.inv-pf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-pf-idline {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.inv-pf-idline .inv-itemid {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .inv-profile-grid,
  .inv-profile-trio,
  .inv-profile-trio.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inv-profile-trio > .inv-pf-panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 440px) {
  .inv-profile-grid,
  .inv-profile-dates,
  .inv-profile-trio,
  .inv-profile-trio.two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.inv-pv-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inv-pv-edit[hidden] {
  display: none;
}

/* ---------- status pill with a Notes mark ---------- */

.inv-pill-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.inv-pill-note {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #5f6f86;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 0 0 1.5px var(--bg-elevated);
  cursor: help;
}

/* ---------- the blue Notes "i", same as on the plan markers ---------- */

.inv-note-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 6px;
  border-radius: 50%;
  background: #5f6f86;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
  cursor: help;
}

.inv-note-i[hidden] {
  display: none;
}

/* ---------- item profile: photo and attachments row ---------- */

.inv-profile-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.inv-pf-att .inv-detail-sechead {
  width: 100%;
  margin-bottom: 0;
}

.inv-pf-att .inv-file,
.inv-pf-att .inv-hint {
  width: 100%;
  box-sizing: border-box;
}

.inv-photo-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

/* The frame never changes size: the picture is fitted inside it, never stretched. */
.inv-photo-frame {
  flex: none;
  width: 120px;
  height: 90px;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-faint);
  font: inherit;
  cursor: pointer;
}

.inv-photo-frame:hover {
  border-color: var(--text-muted);
}

.inv-photo-frame:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.inv-photo-frame.has-photo {
  background: color-mix(in srgb, var(--text) 6%, var(--bg));
  cursor: zoom-in;
}

.inv-photo-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.inv-photo-img[hidden] {
  display: none;
}

.inv-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.inv-photo-empty-icon svg {
  width: 22px;
  height: 22px;
}

.inv-photo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.inv-photo-actions .inv-btn svg {
  width: 14px;
  height: 14px;
}

.inv-photocap .inv-scan-video {
  object-fit: contain;
}

/* full-size photo */
.inv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.84);
  cursor: zoom-out;
}

.inv-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.inv-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.inv-lightbox-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

@media (max-width: 640px) {
  .inv-profile-duo {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- press and hold to edit a marker ---------- */

.inv-marker {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.inv-marker.holding {
  animation: inv-marker-hold 450ms linear forwards;
}

@keyframes inv-marker-hold {
  from {
    box-shadow: 0 0 0 0 rgba(255, 138, 0, 0);
  }
  to {
    box-shadow: 0 0 0 7px rgba(255, 138, 0, 0.5);
  }
}

@media (pointer: coarse) {
  .inv-marker-grip {
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inv-marker.holding {
    animation: none;
    box-shadow: 0 0 0 5px rgba(255, 138, 0, 0.5);
  }
}

/* ---------- moving rows ---------- */

.inv-rownum-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.inv-rowgrip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-faint);
  cursor: grab;
  opacity: 0;
  touch-action: none;
  transition: opacity 0.12s ease;
}

.inv-rowgrip svg {
  width: 13px;
  height: 13px;
}

.inv-row:hover .inv-rowgrip,
.inv-rowgrip:focus-visible,
.inv-row.selected .inv-rowgrip {
  opacity: 1;
}

.inv-rowgrip:hover {
  color: var(--text);
  background: var(--control-active-bg);
}

.inv-rowgrip.off {
  cursor: not-allowed;
}

.inv-row:hover .inv-rowgrip.off {
  opacity: 0.4;
}

.inv-rowgrip:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

@media (pointer: coarse) {
  .inv-rowgrip {
    opacity: 0.7;
    width: 22px;
  }
}

/* The grabbed row leaves its place; a ghost follows the pointer and a line
   shows where the row will land. */
.inv-row.row-lifted .inv-td {
  opacity: 0.35;
}

body.inv-row-dragging,
body.inv-row-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.inv-row-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  max-width: 380px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.inv-row-line {
  position: fixed;
  z-index: 9999;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  pointer-events: none;
}

/* ---------- check mode: scrolling inspect window ---------- */

.inv-pop-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.inv-inspect-formbar {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.inv-inspect-formbar[hidden] {
  display: none;
}

/* ---------- check in progress: banner at the top of Inventory ---------- */

.inv-checkbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 40px 0;
  background: var(--panel-bg);
  flex-shrink: 0;
}

.inv-checkbar[hidden] {
  display: none;
}

.inv-checkcard {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--inv-amber) 45%, var(--border));
  border-radius: 12px;
  background: var(--inv-amber-soft);
}

.inv-checkcard-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--inv-amber);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--inv-amber) 55%, transparent);
  animation: inv-check-pulse 2s ease-out infinite;
}

@keyframes inv-check-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--inv-amber) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.inv-checkcard-text {
  flex: 1 1 220px;
  min-width: 0;
}

.inv-checkcard-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 13.5px;
  color: var(--text);
}

.inv-checkcard-scope {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.inv-checkcard-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.inv-checkcard-prog {
  flex: 0 1 190px;
  min-width: 130px;
}

.inv-checkcard-count {
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.inv-checkcard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-checkcard-more {
  font-size: 12px;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .inv-checkcard-dot {
    animation: none;
  }
}

/* ---------- Soft ink inventory chrome (light theme). Fonts unchanged. ---------- */

:root[data-theme="light"] {
  --inv-red-soft: #f8ece8;
  --inv-green-soft: #e7f3ed;
  --inv-amber-soft: #f6f0e6;
}

:root[data-theme="light"] .inv-pill {
  height: 28px;
  background: #f3f0eb;
  border: none;
}

:root[data-theme="light"] .inv-pill.expired {
  background: #f8ece8;
  color: #b5523e;
}

:root[data-theme="light"] .inv-table-wrap {
  border-radius: 14px;
  border-color: rgba(28, 27, 25, 0.08);
  background: transparent;
}

:root[data-theme="light"] .sidebar .inv-attn-dot.expired {
  background: #e07a68;
}

:root[data-theme="light"] .sidebar .inv-loc-toggle {
  color: #c9c6c0;
}

:root[data-theme="light"] .sidebar .inv-loc-toggle.off {
  color: #7d838b;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --inv-red-soft: #f8ece8;
    --inv-green-soft: #e7f3ed;
    --inv-amber-soft: #f6f0e6;
  }
  :root:not([data-theme="dark"]) .inv-pill {
    height: 28px;
    background: #f3f0eb;
    border: none;
  }
  :root:not([data-theme="dark"]) .inv-pill.expired {
    background: #f8ece8;
    color: #b5523e;
  }
  :root:not([data-theme="dark"]) .inv-table-wrap {
    border-radius: 14px;
    border-color: rgba(28, 27, 25, 0.08);
    background: transparent;
  }
  :root:not([data-theme="dark"]) .sidebar .inv-attn-dot.expired {
    background: #e07a68;
  }
  :root:not([data-theme="dark"]) .sidebar .inv-loc-toggle {
    color: #c9c6c0;
  }
  :root:not([data-theme="dark"]) .sidebar .inv-loc-toggle.off {
    color: #7d838b;
  }
}

/* Plan header: the Show/Hide markers switch wraps under the title when the window is narrow */
.main-header-controls-row:has(.inv-marker-switch) {
  flex-wrap: wrap;
  row-gap: 8px;
}

.inv-marker-switch {
  margin-left: 2px;
}

/* ---------- category page: dashboard + toolbar now sit in the scrolling area ---------- */

/* Category controls: the Items line with the actions on the right, search and filters below */
.inv-cat-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head actions"
    "bar bar";
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.inv-cat-items-head {
  grid-area: head;
  margin: 0;
}

.inv-cat-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-cat-toolbar {
  grid-area: bar;
  margin: 0;
}

.inv-cat-toolbar .inv-search {
  flex: 0 1 200px;
  width: 200px;
  min-width: 0;
}

/* Category dashboard when it sits in the page header, right of the title */
.main-header-controls-row:has(.inv-zone-compact) {
  flex-wrap: wrap;
  row-gap: 8px;
}

.main-header-controls-row:has(.inv-hdr-spacer) .inv-more {
  margin-left: 0 !important;
}

/* name, then its dashboard, then flexible space, then the controls on the right */
.inv-hdr-spacer {
  flex: 1 1 0;
  min-width: 0;
}

.inv-zone-compact {
  margin: 0 0 0 28px;
  min-width: 0;
}

.inv-zone-compact .inv-zone-head {
  margin-bottom: 4px;
}

.inv-zone-compact .inv-zone-scope {
  display: none;
}

.inv-zone-compact .inv-dash-value {
  font-size: 26px;
}

.inv-zone-compact .inv-dash-stat {
  padding: 0 18px;
}

.inv-zone-compact .inv-dash-stat:first-child {
  padding-left: 0;
}

.inv-zone-compact .inv-dash-stat:last-child {
  padding-right: 0;
}

.inv-table-host .inv-table-wrap {
  max-height: calc(100vh - 322px);
}

/* ---------- group items table: fixed columns, filtering only changes the rows ---------- */

@media (min-width: 761px) {
  .inv-overview-table {
    table-layout: fixed;
    width: 100%;
    min-width: 960px;
  }

  .inv-overview-table th:nth-child(1) { width: 52px; }
  .inv-overview-table th:nth-child(2) { width: 150px; }
  .inv-overview-table th:nth-child(3) { width: 96px; }
  .inv-overview-table th:nth-child(4) { width: 210px; }
  .inv-overview-table th:nth-child(6) { width: 200px; }
  .inv-overview-table th:nth-child(7) { width: 12px; }

  .inv-overview-table .inv-td-text:not(.inv-td-main) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .inv-overview-table .inv-td-main {
    min-width: 0;
  }
}

.inv-cat-items-head {
  min-height: 22px;
}

/* Header: [ name: flexible, up to two lines ] [ dashboard: fixed ] [ controls: fixed ].
   The name only ever uses what is left, so it can't move or squeeze the other two. */
@media (min-width: 761px) {
  .main-header-controls-row:has(.inv-hdr-spacer) {
    flex-wrap: nowrap;
  }

  .main-header .main-header-controls-row:has(.inv-hdr-spacer) .tab-title-display {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-height: 1.2;
    white-space: normal;
  }

  .main-header .main-header-controls-row:has(.inv-hdr-spacer) .tab-title-display.editing {
    display: block;
  }

  .inv-hdr-spacer {
    display: none;
  }

  /* room for a two-line name, so a long name never changes the header's height either */
  .main-header-controls-row:has(.inv-zone-compact) {
    min-height: 66px;
  }

  .main-header-controls-row:has(.inv-hdr-spacer) .inv-zone-compact {
    flex: 0 0 auto;
    margin: 0 24px;
  }

  .inv-zone-compact .inv-dash-stat {
    padding: 0 13px;
  }
}

/* not enough room beside the name: the dashboard takes its own line under it */
@media (min-width: 761px) and (max-width: 1180px) {
  .main-header-controls-row:has(.inv-hdr-spacer) {
    flex-wrap: wrap;
  }

  .main-header-controls-row:has(.inv-hdr-spacer) .inv-zone-compact {
    order: 5;
    flex: 1 0 100%;
    margin: 6px 0 0;
  }

  .inv-zone-compact .inv-dash-stat:first-child {
    padding-left: 0;
  }
}

/* ---------- Add column | Add row: one pill, two sections ---------- */

.inv-split-btn {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.inv-split-part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}

.inv-split-part + .inv-split-part {
  border-left: 1px solid var(--border-strong);
}

.inv-split-part:hover {
  background: var(--tab-hover);
}

.inv-split-part:focus-visible {
  outline: none;
  background: var(--tab-hover);
  box-shadow: inset 0 0 0 1px var(--text-muted);
}

/* ---------- tighter category and group pages ---------- */

.inv-scroll:has(.inv-cat-controls),
.inv-scroll:has(.inv-results) {
  padding-top: 12px;
}

.inv-cat-controls {
  gap: 8px 12px;
  margin-bottom: 10px;
}

/* Plan location: the pin alone is the whole control (solid = linked, faint = not linked) */
button.inv-plan-cell {
  min-width: 36px;
  justify-content: center;
}

.inv-plan-cell .inv-plan svg {
  width: 16px;
  height: 16px;
}

/* Group marker popup: the number of items, stated on its own line */
.inv-pop-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 14px 0; /* same left edge as the title and the search box */
  font-size: 14px;
  color: var(--text-muted);
}

.inv-pop-total-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
