/* HYDRA Tools ? Kho l?u tr? */

#hydraToolsShell .st-tool {
  width: 100%;
  max-width: 1320px;
}

#hydraToolsShell .st-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px 0;
}

#hydraToolsShell .st-kpi-row--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
}

#hydraToolsShell .st-kpi--compact {
  padding: 10px 11px;
  min-height: 0;
}

#hydraToolsShell .st-kpi__value--growth-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  min-width: 0;
}

#hydraToolsShell .st-kpi__value--growth-wrap {
  flex-wrap: wrap;
  row-gap: 2px;
}

#hydraToolsShell .st-kpi__growth-amt {
  flex: 0 1 auto;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .st-kpi__value--pair,
#hydraToolsShell .st-kpi__value--split {
  display: flex;
  align-items: baseline;
  gap: 0;
  min-width: 0;
  width: 100%;
}

#hydraToolsShell .st-kpi__value--pair {
  flex-wrap: nowrap;
}

#hydraToolsShell .st-kpi__value--split {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
}

#hydraToolsShell .st-kpi__inline-sep {
  flex: 0 0 auto;
  margin: 0 0.28em;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1;
}

#hydraToolsShell .st-kpi__pct-inline {
  flex: 0 0 auto;
  font-size: 0.88em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .st-kpi__card-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

#hydraToolsShell .st-kpi__card-trail {
  flex: 0 0 auto;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#hydraToolsShell .st-kpi__value--split .st-kpi__card-name {
  flex: 1 1 auto;
}

#hydraToolsShell .st-kpi__value--pair .st-kpi__card-trail {
  flex: 0 0 auto;
}

#hydraToolsShell .st-kpi-row--compact .st-kpi__value {
  font-size: clamp(16px, 3.8vw, 20px);
}

#hydraToolsShell .st-kpi__value--nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .st-kpi-row--secondary {
  padding-top: 8px;
}

#hydraToolsShell .st-kpi-row--secondary .st-kpi {
  background: linear-gradient(180deg, #fff 0%, #fffaf5 100%);
}

#hydraToolsShell .st-kpi--hero .st-kpi__value {
  font-size: 22px;
}

#hydraToolsShell .st-kpi__sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
}

#hydraToolsShell .st-kpi__name {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .st-kpi--mini .st-kpi__value {
  font-size: 18px;
}

#hydraToolsShell .st-list-section {
  min-width: 0;
}

#hydraToolsShell .st-growth-metrics--report {
  margin: 0;
}

#hydraToolsShell .st-growth-bars--report {
  margin: 8px 0 12px;
}

#hydraToolsShell .st-growth-chart-card--report {
  margin-top: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

#hydraToolsShell .st-growth-chart-card--report .st-portfolio-chart {
  width: 100%;
  max-height: 200px;
}

#hydraToolsShell .st-table--portfolio {
  --st-grid: 44px 56px minmax(0, 18fr) minmax(0, 9fr) minmax(0, 10fr) minmax(0, 9fr) minmax(0, 12fr) minmax(0, 12fr) minmax(0, 12fr) minmax(0, 12fr) 56px;
}

#hydraToolsShell .st-table-header--portfolio,
#hydraToolsShell .st-table-row--portfolio {
  /* uses --st-grid from .st-table */
}

#hydraToolsShell .st-col-num--strong {
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .st-growth {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .st-growth--up { color: #15803d; }
#hydraToolsShell .st-growth--down { color: #dc2626; }
#hydraToolsShell .st-growth--flat,
#hydraToolsShell .st-growth--na { color: #94a3b8; }

#hydraToolsShell .st-portfolio-view,
#hydraToolsShell .st-growth-view {
  padding: 16px;
}

#hydraToolsShell .st-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#hydraToolsShell .st-alloc-block {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

#hydraToolsShell .st-alloc-block h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .st-alloc-row + .st-alloc-row {
  margin-top: 12px;
}

#hydraToolsShell .st-alloc-row__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

#hydraToolsShell .st-alloc-bar {
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

#hydraToolsShell .st-alloc-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb923c, #f97316);
}

#hydraToolsShell .st-alloc-row__val {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .st-growth-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

#hydraToolsShell .st-growth-metric {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .st-growth-metric span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

#hydraToolsShell .st-growth-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 800;
}

#hydraToolsShell .st-growth-chart-card {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 14px;
}

#hydraToolsShell .st-growth-chart__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
}

#hydraToolsShell .st-growth-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 140px;
  padding-top: 8px;
}

#hydraToolsShell .st-growth-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 140px;
}

#hydraToolsShell .st-growth-bar__fill {
  width: 100%;
  max-width: 36px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #fdba74, #f97316);
}

#hydraToolsShell .st-growth-bar__lbl {
  margin-top: 6px;
  font-size: 10px;
  color: #64748b;
}

#hydraToolsShell .st-portfolio-chart {
  width: 100%;
  max-height: 240px;
}

#hydraToolsShell .st-card--portfolio .st-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

#hydraToolsShell .st-card__metrics div {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fffaf5;
  font-size: 12px;
}

#hydraToolsShell .st-card__metrics span {
  display: block;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
}

#hydraToolsShell .st-card__actions {
  display: flex;
  gap: 8px;
}

.pw-drawer--wide.st-hist-drawer {
  width: min(560px, 100vw);
}

.st-hist-panel__lead {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.st-hist-analytics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.st-hist-metric {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.st-hist-metric span {
  display: block;
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.st-hist-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.st-hist-section-title {
  margin: 16px 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.st-hist-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.st-hist-range,
.st-hist-tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.st-hist-range.is-active,
.st-hist-tab.is-active {
  border-color: #f97316;
  background: #fff7ed;
  color: #c2410c;
}

.st-hist-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.st-hist-chart-wrap {
  height: 220px;
  margin: 8px 0 12px;
}

.st-insights {
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.st-insights li {
  font-size: 13px;
  color: #9a3412;
  padding: 4px 0;
}

.st-insights li + li {
  border-top: 1px solid rgba(249, 115, 22, 0.12);
  margin-top: 4px;
  padding-top: 8px;
}

.storage-form-total {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #c2410c;
}

.storage-clear-cost-btn {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: #fff;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.storage-clear-cost-btn:hover {
  background: #fef2f2;
}

@media (max-width: 900px) {
  #hydraToolsShell .st-kpi-row,
  #hydraToolsShell .st-portfolio-grid,
  #hydraToolsShell .st-growth-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #hydraToolsShell .st-portfolio-grid,
  #hydraToolsShell .st-growth-metrics {
    grid-template-columns: 1fr;
  }

  .st-hist-analytics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#hydraToolsShell .st-kpi {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(249, 115, 22, 0.15);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

#hydraToolsShell .st-kpi__label {
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#hydraToolsShell .st-kpi__value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  min-width: 0;
}

#hydraToolsShell .st-kpi__value--pos {
  color: #15803d;
}

#hydraToolsShell .st-kpi__value--neg {
  color: #dc2626;
}

#hydraToolsShell .st-kpi__value--muted {
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
}

#hydraToolsShell .st-kpi__value--empty {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #94a3b8;
}

/* Action grid ? storage toolbar (desktop) */
#hydraToolsShell .st-action-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

#hydraToolsShell .st-action-grid__secondary {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hydraToolsShell .st-action-grid__primary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

#hydraToolsShell .st-action-grid__primary-row .st-action-grid__primary {
  flex: 1 1 0;
  min-width: 0;
}

#storageItemModalHost .st-bulk-import__checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  flex-shrink: 0;
}

#storageItemModalHost .st-bulk-import__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}

#storageItemModalHost .pw-modal-backdrop--form {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.48);
  box-sizing: border-box;
}

#storageItemModalHost .pw-modal--bulk-import {
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

#storageItemModalHost .pw-modal--bulk-import .pw-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

@media (min-width: 701px) {
  #storageItemModalHost .pw-modal--bulk-import .pw-modal__body {
    max-height: min(72vh, 640px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

#storageItemModalHost .pw-bulk-import__lines {
  min-height: 140px;
  max-height: 200px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

#storageItemModalHost .pw-bulk-preview {
  margin-top: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fafbfc;
  overflow: hidden;
}

#storageItemModalHost .pw-bulk-preview__list {
  max-height: 180px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#storageItemModalHost .st-bulk-import__section-label {
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

#storageItemModalHost .st-bulk-import__advanced {
  margin-top: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

#storageItemModalHost .st-bulk-import__advanced > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  list-style: none;
}

#storageItemModalHost .st-bulk-import__advanced > summary::-webkit-details-marker {
  display: none;
}

#storageItemModalHost .st-bulk-import__advanced[open] > summary {
  margin-bottom: 8px;
}

#storageItemModalHost .pw-bulk-preview__cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}

#storageItemModalHost .pw-bulk-preview__card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#storageItemModalHost .pw-bulk-preview__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: #f1f5f9;
}

#storageItemModalHost .pw-bulk-preview__thumb--empty {
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

#storageItemModalHost .pw-bulk-preview__body {
  min-width: 0;
}

#storageItemModalHost .pw-bulk-preview__top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

#storageItemModalHost .pw-bulk-preview__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#storageItemModalHost .pw-bulk-preview__subtitle,
#storageItemModalHost .pw-bulk-preview__meta,
#storageItemModalHost .pw-bulk-preview__msg {
  margin: 2px 0 0;
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#storageItemModalHost .pw-bulk-preview__msg {
  color: #b91c1c;
  white-space: normal;
}

#storageItemModalHost .pw-bulk-preview__price {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

#storageItemModalHost .pw-bulk-preview__price-label {
  font-weight: 700;
  color: #334155;
}

#storageItemModalHost .pw-bulk-preview__price--missing {
  font-weight: 700;
  color: #b45309;
}

#storageItemModalHost .pw-bulk-preview__price-ref {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

#storageItemModalHost .pw-bulk-preview__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

#storageItemModalHost .pw-bulk-preview__chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #c2410c;
  background: rgba(249, 115, 22, 0.1);
}

#storageItemModalHost .pw-bulk-preview__link {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #2563eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#storageItemModalHost .pw-bulk-preview__card.pw-bulk-status--error {
  border-color: rgba(239, 68, 68, 0.35);
}

#storageItemModalHost .pw-bulk-preview__card.pw-bulk-status--skip {
  opacity: 0.78;
}

@media (max-width: 700px) {
  #storageItemModalHost .pw-modal-backdrop--form {
    padding: 0;
    align-items: stretch;
  }

  #storageItemModalHost .pw-modal--bulk-import {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  #storageItemModalHost .pw-modal--bulk-import .pw-modal__header {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
    padding: 10px 14px 8px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    background: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  #storageItemModalHost .pw-modal--bulk-import .pw-modal__close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  #storageItemModalHost .pw-modal--bulk-import .pw-modal__body {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 14px 0;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }

  #storageItemModalHost .pw-modal--bulk-import .pw-modal__actions--footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  }

  #storageItemModalHost .pw-modal--bulk-import .pw-modal__actions--footer .pw-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    font-size: 14px;
    border-radius: 14px;
  }

  #storageItemModalHost .pw-modal--bulk-import .pw-modal__actions--footer .pw-btn--primary {
    flex: 1.2 1 0;
  }
}

#hydraToolsShell .st-tabs-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#hydraToolsShell .st-tabs-scroll::-webkit-scrollbar {
  display: none;
}

#hydraToolsShell .st-filters__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#hydraToolsShell .st-filters__row--primary {
  flex: 1 1 auto;
}

#hydraToolsShell .st-filters__row--more {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

#hydraToolsShell .st-filters__row--more::-webkit-scrollbar {
  display: none;
}

#hydraToolsShell .st-filters__row--more .st-filter-select {
  flex: 0 0 auto;
}

#hydraToolsShell .st-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}

#hydraToolsShell .st-tabs-scroll .st-tabs {
  padding: 14px 16px 0;
}

#hydraToolsShell .st-tab {
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

#hydraToolsShell .st-tab:hover {
  background: #fff7ed;
}

#hydraToolsShell .st-tab.is-active {
  background: #fff4ea;
  border-color: #f97316;
  color: #c2410c;
}

#hydraToolsShell .st-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
}

#hydraToolsShell .st-table {
  width: 100%;
  font-size: 13px;
  --st-grid: 44px 56px minmax(0, 18fr) minmax(0, 9fr) minmax(0, 10fr) minmax(0, 9fr) minmax(0, 12fr) minmax(0, 12fr) minmax(0, 12fr) minmax(0, 12fr) 56px;
}

#hydraToolsShell #stTableBody {
  width: 100%;
}

#hydraToolsShell .st-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 0;
  align-items: stretch;
}

#hydraToolsShell .st-filters__row--more {
  flex-wrap: wrap;
}

#hydraToolsShell .st-filters__search-row {
  width: 100%;
}

#hydraToolsShell .st-filters__search-row--combo {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#hydraToolsShell .st-filters__search-row--combo .st-filter-search {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

#hydraToolsShell .st-select-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

#hydraToolsShell .st-select-inline__toggle,
#hydraToolsShell .st-select-inline__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

#hydraToolsShell .st-select-inline__toggle.is-active,
#hydraToolsShell .st-select-inline.is-active .st-select-inline__toggle {
  border-color: rgba(249, 115, 22, 0.5);
  background: #fff7ed;
  color: #c2410c;
}

#hydraToolsShell .st-select-inline__all {
  border-style: dashed;
  color: #64748b;
  padding: 0 8px;
}

#hydraToolsShell .st-select-inline__cb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(100, 116, 139, 0.55);
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  box-sizing: border-box;
}

#hydraToolsShell .st-select-inline__all.is-checked .st-select-inline__cb {
  border-color: #f97316;
  background: #f97316;
  box-shadow: inset 0 0 0 2px #fff;
}

#hydraToolsShell .st-select-inline__all.is-checked {
  border-color: rgba(249, 115, 22, 0.45);
  background: #fff7ed;
  color: #c2410c;
}

#hydraToolsShell .st-filters__toggle {
  display: none;
}

#hydraToolsShell .st-filters__advanced.is-collapsed {
  display: block;
}

#hydraToolsShell .st-filters__grid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

#hydraToolsShell .st-filters__grid-row .st-filter-select {
  flex: 1 1 140px;
  min-width: 0;
}

#hydraToolsShell .st-filters__grid-row--triple .st-filter-select {
  flex: 1 1 120px;
}

#hydraToolsShell .st-empty-compact {
  padding: 20px 14px;
  text-align: center;
}

#hydraToolsShell .st-empty-compact__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}

#hydraToolsShell .st-empty-compact__hint {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

#hydraToolsShell .st-empty-compact .pw-btn {
  margin-top: 12px;
}


#hydraToolsShell .st-filter-search {
  flex: 1 1 180px;
  min-width: 140px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 10px;
  font-size: 13px;
}

#hydraToolsShell .st-filter-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
}

#hydraToolsShell .st-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

#hydraToolsShell .st-bulk-bar__count {
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
}

#hydraToolsShell .st-bulk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

#hydraToolsShell .st-bulk-btn:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.22);
}

#hydraToolsShell .st-bulk-btn--ghost {
  color: #64748b;
}

#hydraToolsShell .st-bulk-btn--danger {
  border-color: rgba(220, 38, 38, 0.3);
  background: #fef2f2;
  color: #dc2626;
}

#hydraToolsShell .st-bulk-btn--danger:hover {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.45);
  color: #b91c1c;
}

#hydraToolsShell .st-bulk-select {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

#hydraToolsShell .st-col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

#hydraToolsShell .st-name-link {
  color: #c2410c;
  font-weight: 700;
  text-decoration: none;
}

#hydraToolsShell .st-name-link:hover {
  text-decoration: underline;
}

#hydraToolsShell .st-ext {
  font-size: 11px;
  opacity: 0.7;
}

#hydraToolsShell .st-hidden {
  display: none !important;
}

#hydraToolsShell .st-badge--status-in_stock {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

#hydraToolsShell .st-badge--status-inbound {
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

#hydraToolsShell .st-badge--source-snkrdunk {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

#hydraToolsShell .st-badge--source-pricecharting {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

#hydraToolsShell .st-badge--source-cardrush_pokemon {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.28);
}

#hydraToolsShell .st-badge--source-manual {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

#hydraToolsShell .st-history-table {
  width: 100%;
  font-size: 12px;
}

#hydraToolsShell .st-table-header,
#hydraToolsShell .st-table-row {
  display: grid;
  grid-template-columns: var(--st-grid);
  align-items: center;
  column-gap: 6px;
  padding: 8px 10px;
  box-sizing: border-box;
  width: 100%;
}

#hydraToolsShell .st-table-header {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-radius: 12px 12px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9a3412;
}

#hydraToolsShell .st-table-row {
  min-height: 52px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

#hydraToolsShell .st-table-row:hover {
  background: rgba(255, 247, 237, 0.5);
}

#hydraToolsShell .st-table-header > *,
#hydraToolsShell .st-table-row > * {
  min-width: 0;
}

#hydraToolsShell .st-col-stt {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: #9a3412;
}

#hydraToolsShell .st-col-name {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 14px;
  overflow: hidden;
  min-width: 0;
}

#hydraToolsShell .st-col-card-type {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#hydraToolsShell .st-col-card-type .st-badge--card-type {
  font-size: 11px;
  padding: 2px 8px;
}

#hydraToolsShell .st-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

#hydraToolsShell .st-name-text,
#hydraToolsShell .st-name-link {
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

#hydraToolsShell .st-name-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .st-card__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#hydraToolsShell .st-card__subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}

#hydraToolsShell .st-card__type {
  margin-top: 4px;
}

#hydraToolsShell .st-card__type .st-badge--card-type {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 2px 8px;
}

#hydraToolsShell .st-col-num {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 0;
}

#hydraToolsShell .st-col-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
}

#hydraToolsShell .st-col-action {
  flex-shrink: 0;
}

#hydraToolsShell .st-table-header .st-col-num {
  font-size: 10px;
  letter-spacing: 0.03em;
}

#hydraToolsShell .st-col-vnd {
  font-weight: 700;
  color: #c2410c;
}

#hydraToolsShell .st-profit--pos {
  color: #15803d;
  font-weight: 700;
}

#hydraToolsShell .st-profit--neg {
  color: #dc2626;
  font-weight: 700;
}

#hydraToolsShell .st-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border-width: 1px;
  border-style: solid;
}

#hydraToolsShell .st-badge--game-pokemon {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

#hydraToolsShell .st-badge--game-one_piece {
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

#hydraToolsShell .st-badge--card-type {
  font-weight: 800;
  letter-spacing: 0.02em;
}

#hydraToolsShell .st-badge--ct-manga {
  background: #ede9fe;
  color: #6d28d9;
  border-color: rgba(109, 40, 217, 0.3);
}

#hydraToolsShell .st-badge--ct-sp {
  background: #ffedd5;
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.35);
}

#hydraToolsShell .st-badge--ct-leader {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.25);
}

#hydraToolsShell .st-badge--ct-don {
  background: #fef9c3;
  color: #a16207;
  border-color: rgba(161, 98, 7, 0.25);
}

#hydraToolsShell .st-badge--ct-sec {
  background: #fee2e2;
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
}

#hydraToolsShell .st-badge--ct-promo {
  background: #dcfce7;
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.25);
}

#hydraToolsShell .st-badge--ct-other {
  background: #f1f5f9;
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.25);
}

#hydraToolsShell .st-badge--ct-sr {
  background: #e0e7ff;
  color: #4338ca;
  border-color: rgba(67, 56, 202, 0.25);
}

#hydraToolsShell .st-badge--ct-r {
  background: #f8fafc;
  color: #475569;
  border-color: rgba(71, 85, 105, 0.2);
}

#hydraToolsShell .st-badge--ct-parallel {
  background: #ccfbf1;
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.25);
}

#hydraToolsShell .st-badge--ct-alt_art {
  background: #fce7f3;
  color: #be185d;
  border-color: rgba(190, 24, 93, 0.25);
}

#hydraToolsShell .st-badge--game-other {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

#hydraToolsShell .st-badge--status-available,
#hydraToolsShell .st-badge--status-in_stock {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

#hydraToolsShell .st-badge--status-grading {
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

#hydraToolsShell .st-badge--status-consigned {
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

#hydraToolsShell .st-badge--status-sold {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

#hydraToolsShell .st-table-empty {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

#hydraToolsShell .st-row-menu-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 17px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  font-weight: 700;
  cursor: pointer;
}

#hydraToolsShell .st-row-menu-btn:hover {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.4);
  color: #ea580c;
}

@media (max-width: 900px) {
  #hydraToolsShell .st-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) and (min-width: 701px) {
  #hydraToolsShell .st-table.st-table--portfolio {
    min-width: 960px;
  }
}

@media (max-width: 700px) {
  #hydraToolsShell .st-desktop-only {
    display: none;
  }

  #hydraToolsShell .st-mobile-only {
    display: block;
  }

  /* ?? Storage mobile compact ?? */
  #hydraToolsShell .st-tool .st-tool__bar {
    padding: 0 10px;
    margin-bottom: 4px;
  }

  #hydraToolsShell .st-tool .pw-action-bar--storage,
  #hydraToolsShell .st-tool .pw-action-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  #hydraToolsShell .st-tool .pw-action-bar--storage .pw-action-bar__primary,
  #hydraToolsShell .st-tool .pw-action-bar__primary {
    flex: 1 1 auto;
    flex-shrink: 1;
    width: auto;
    min-width: 0 !important;
    height: 40px;
    min-height: 40px;
    font-size: 12px;
    font-weight: 800;
    padding: 0 10px;
  }

  #hydraToolsShell .st-tool .pw-action-bar--storage .pw-action-bar__categories {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: fit-content !important;
    min-width: fit-content !important;
    max-width: none !important;
    height: 40px;
    min-height: 40px;
    padding: 0 8px !important;
    font-size: 12px;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #hydraToolsShell .st-tool .pw-action-bar--storage .pw-action-bar__import,
  #hydraToolsShell .st-tool .pw-action-bar__import {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px;
    min-height: 40px;
    padding: 0 7px !important;
    font-size: 11px;
  }

  #hydraToolsShell .st-tool .pw-action-bar--storage .pw-action-bar__icon-btn {
    flex: 0 0 40px;
    flex-shrink: 0;
    width: 40px;
    min-width: 40px !important;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  #hydraToolsShell .st-tool .pw-action-bar--storage .pw-action-bar__more {
    flex: 0 0 40px;
    flex-shrink: 0;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  #hydraToolsShell .st-tool .pw-data-card {
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    border-color: rgba(249, 115, 22, 0.1);
  }

  #hydraToolsShell .st-tool .st-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px 4px;
    min-width: 0;
  }

  #hydraToolsShell .st-tool .st-kpi-row--compact {
    gap: 7px;
    padding: 8px 12px 4px;
  }

  #hydraToolsShell .st-tool .st-kpi-row--secondary {
    padding-top: 6px;
    padding-bottom: 4px;
  }

  #hydraToolsShell .st-tool .st-kpi {
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
    border-radius: 12px;
    border-color: rgba(249, 115, 22, 0.1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    container-type: inline-size;
  }

  #hydraToolsShell .st-tool .st-kpi--compact {
    padding: 8px 10px;
    min-height: 46px;
  }

  #hydraToolsShell .st-tool .st-kpi__label {
    font-size: clamp(9px, 2.4vw, 11px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-height: none;
    min-width: 0;
  }

  #hydraToolsShell .st-tool .st-kpi__value {
    margin-top: 2px;
    font-size: clamp(16px, 3.8vw, 20px);
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
  }

  #hydraToolsShell .st-tool .st-kpi__value--growth-wrap,
  #hydraToolsShell .st-tool .st-kpi__value--pair,
  #hydraToolsShell .st-tool .st-kpi__value--split {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  #hydraToolsShell .st-tool .st-kpi__value--pair .st-kpi__card-name,
  #hydraToolsShell .st-tool .st-kpi__value--split .st-kpi__card-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #hydraToolsShell .st-tool .st-kpi--hero .st-kpi__value {
    font-size: clamp(18px, 4vw, 22px);
    line-height: 1.1;
    margin-top: 3px;
  }

  #hydraToolsShell .st-tool .st-kpi--mini .st-kpi__name {
    display: none;
  }

  #hydraToolsShell .st-tool .st-kpi--compact .st-kpi__name {
    display: none;
  }

  #hydraToolsShell .st-tool .st-kpi--mini .st-kpi__value {
    font-size: clamp(16px, 3.6vw, 20px);
    line-height: 1.1;
    margin-top: 2px;
  }

  #hydraToolsShell .st-tool .st-kpi__value--empty {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #94a3b8 !important;
  }

  #hydraToolsShell .st-tool .st-kpi__sub {
    display: inline;
    margin-top: 0;
    margin-left: 4px;
    font-size: 0.82em;
    font-weight: 700;
    white-space: nowrap;
  }

  @container (max-width: 175px) {
    #hydraToolsShell .st-tool .st-kpi--hero .st-kpi__value {
      font-size: clamp(16px, 3.6vw, 20px);
    }
  }

  @container (max-width: 150px) {
    #hydraToolsShell .st-tool .st-kpi--hero .st-kpi__value {
      font-size: clamp(14px, 3.2vw, 18px);
    }

    #hydraToolsShell .st-tool .st-kpi--mini .st-kpi__value {
      font-size: clamp(14px, 3.2vw, 17px);
    }
  }

  @media (max-width: 430px) {
    #hydraToolsShell .st-tool .st-kpi {
      padding: 8px 9px;
    }

    #hydraToolsShell .st-tool .st-kpi__label {
      font-size: 10px;
      letter-spacing: 0.03em;
    }

    #hydraToolsShell .st-tool .st-kpi__value,
    #hydraToolsShell .st-tool .st-kpi--hero .st-kpi__value {
      font-size: clamp(15px, 4vw, 18px);
    }

    #hydraToolsShell .st-tool .st-kpi--mini .st-kpi__value {
      font-size: clamp(14px, 3.6vw, 17px);
    }

    #hydraToolsShell .st-tool .st-kpi__value--empty {
      font-size: 13px !important;
    }
  }

  #hydraToolsShell .st-tool .st-kpi-row--compact {
    margin-bottom: 0;
  }

  #hydraToolsShell .st-tool .st-list-section {
    padding-top: 0;
  }

  #hydraToolsShell .st-tool .st-tabs-scroll {
    padding: 6px 0 0;
    scroll-padding-inline: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #hydraToolsShell .st-tool .st-tabs-scroll::-webkit-scrollbar {
    display: none;
  }

  #hydraToolsShell .st-tool .st-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 0 14px;
    padding-right: 20px;
    width: max-content;
    min-width: 100%;
    box-sizing: border-box;
  }

  #hydraToolsShell .st-tool .st-tab {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
  }

  #hydraToolsShell .st-tool .st-tab__count {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 4px;
    font-size: 10px;
    line-height: 1;
  }

  #hydraToolsShell .st-tool .st-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 14px 0;
  }

  #hydraToolsShell .st-tool .st-filters__search-row {
    width: 100%;
  }

  #hydraToolsShell .st-tool .st-filters__search-row--combo {
    gap: 6px;
  }

  #hydraToolsShell .st-tool .st-filters__search-row--combo .st-filter-search {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  #hydraToolsShell .st-tool .st-select-inline__toggle,
  #hydraToolsShell .st-tool .st-select-inline__all {
    height: 42px;
    padding: 0 10px;
    font-size: 13px;
  }

  #hydraToolsShell .st-tool .st-select-inline__all {
    padding: 0 8px;
  }

  #hydraToolsShell .st-tool .st-filter-search {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 14px;
    box-sizing: border-box;
  }

  #hydraToolsShell .st-tool .st-filters__grid-row--tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  #hydraToolsShell .st-tool .st-filters__grid-row--tools .st-filter-select {
    width: 100%;
    height: 42px;
    min-width: 0;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 13px;
    box-sizing: border-box;
  }

  #hydraToolsShell .st-tool .st-filters__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 12px;
    background: #fff;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    align-self: stretch;
  }

  #hydraToolsShell .st-tool .st-filters__toggle.has-active {
    border-color: #f97316;
    background: #fff7ed;
  }

  #hydraToolsShell .st-tool .st-filters__toggle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    flex-shrink: 0;
  }

  #hydraToolsShell .st-tool .st-filters__toggle-chev {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 140ms ease;
    flex-shrink: 0;
    margin-top: -2px;
  }

  #hydraToolsShell .st-tool .st-filters__toggle.is-expanded .st-filters__toggle-chev {
    transform: rotate(-135deg);
    margin-top: 2px;
  }

  #hydraToolsShell .st-tool .st-filters__advanced.is-collapsed {
    display: none;
  }

  #hydraToolsShell .st-tool .st-filters__advanced {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #hydraToolsShell .st-tool .st-filters__grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #hydraToolsShell .st-tool .st-filters__grid-row--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #hydraToolsShell .st-tool .st-filter-search {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 14px;
    box-sizing: border-box;
  }

  #hydraToolsShell .st-tool .st-filters__grid-row .st-filter-select {
    width: 100%;
    height: 42px;
    min-width: 0;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 13px;
    box-sizing: border-box;
  }

  #hydraToolsShell .st-tool .st-cards-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 14px 12px;
    min-width: 0;
    overflow-x: hidden;
  }

  #hydraToolsShell .st-tool .st-cards-list .st-card.st-card--dense {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    background: #fff;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.034);
    min-height: 72px;
    max-height: 82px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    overflow-x: hidden;
  }

  #hydraToolsShell .st-tool .st-cards-list .st-card.st-card--dense.hydra-tool-card--has-thumb {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 76px;
    max-height: none;
    padding: 10px 12px;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__row--head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 28px;
    column-gap: 6px;
    align-items: center;
    min-width: 0;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stt {
    grid-column: 1;
    min-width: 26px;
    height: 22px;
    padding: 0 6px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffedd5;
    color: #c2410c;
    flex-shrink: 0;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__title {
    grid-column: 2;
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__meta {
    grid-column: 3;
    flex-shrink: 0;
    min-width: auto;
    overflow: visible;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__meta-badges {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    overflow: visible;
    white-space: nowrap;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__meta-badges .st-badge {
    flex-shrink: 0;
    min-width: unset;
    height: 20px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__meta-badges .st-badge--compact::before {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__menu {
    grid-column: 4;
    justify-self: end;
    align-self: center;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-row-menu-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    color: #64748b;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-row-menu-btn[aria-expanded="true"] {
    background: #fff3e8;
    border-color: rgba(249, 115, 22, 0.35);
    color: #ea580c;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__row--stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 8px;
    align-items: baseline;
    min-width: 0;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__row--stats-sold {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 6px;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat {
    min-width: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    font-variant-numeric: tabular-nums;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat--cost {
    text-align: center;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat--pl {
    text-align: right;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat-k {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-right: 2px;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat-v {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    overflow: visible;
    text-overflow: unset;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat-v--ht {
    color: #c2410c;
  }

  #hydraToolsShell .st-tool .st-card--dense .st-card__stat--pl .st-card__stat-v {
    font-size: 13px;
    font-weight: 700;
  }

  #hydraToolsShell .st-tool .st-empty-compact {
    margin: 4px 0 8px;
    padding: 16px 14px;
  }

  #hydraToolsShell .st-tool .st-portfolio-view,
  #hydraToolsShell .st-tool .st-growth-view {
    padding: 12px 14px 16px;
  }

  #hydraToolsShell .st-tool .st-growth-metric strong {
    font-size: 18px;
    line-height: 1.2;
  }

  #hydraToolsShell .st-card {
    margin: 0 14px 10px;
    padding: 12px;
    border-radius: 14px;
    border-color: rgba(249, 115, 22, 0.1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  #hydraToolsShell .st-card__metrics--price-focus {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #hydraToolsShell .st-card__metrics--price-focus > div strong {
    font-size: 14px;
    font-weight: 800;
  }

  #hydraToolsShell .st-card__metric--cost {
    grid-column: 1 / -1;
  }

  #hydraToolsShell .st-card__metric--cost strong {
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  #hydraToolsShell .st-tool .st-growth-metric strong.st-kpi__value--muted {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
  }

  @media (max-width: 380px) {
    #hydraToolsShell .st-tool .st-filters__grid-row {
      grid-template-columns: 1fr 1fr;
    }

    #hydraToolsShell .st-tool .st-select-inline__toggle,
    #hydraToolsShell .st-tool .st-select-inline__all {
      height: 38px;
      padding: 0 7px;
      font-size: 12px;
    }

    #hydraToolsShell .st-tool .st-select-inline__cb {
      width: 12px;
      height: 12px;
    }

    #hydraToolsShell .st-tool .pw-action-bar__primary {
      font-size: 13px;
      padding: 0 8px;
      gap: 4px;
    }

    #hydraToolsShell .st-tool .st-card--dense .st-card__title {
      font-size: 13px;
    }

    #hydraToolsShell .st-tool .st-card--dense .st-card__stat-v {
      font-size: 13px;
    }

    #hydraToolsShell .st-tool .st-card--dense .st-card__row--head {
      grid-template-columns: auto minmax(0, 1fr) auto 28px;
      column-gap: 5px;
    }
  }
}

#hydraToolsShell .st-mobile-only {
  display: none;
}

/* ?? Storage item modal (Th?m / S?a v?t ph?m) ? scoped #storageItemModalHost ?? */

#storageItemModalHost.storage-item-modal-host {
  position: fixed;
  inset: 0;
  z-index: 9020;
  pointer-events: none;
  --tools-modal-safe-top: env(safe-area-inset-top, 0px);
  --tools-modal-close-inset: 12px;
  --tools-modal-header-pad-top: calc(var(--tools-modal-close-inset) + var(--tools-modal-safe-top));
}

#storageItemModalHost:not(:empty) {
  pointer-events: auto;
}

#storageItemModalHost .storage-item-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.48);
  box-sizing: border-box;
}

#storageItemModalHost .storage-item-modal {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 820px;
  max-width: min(820px, calc(100vw - 32px));
  max-height: 86vh;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(249, 115, 22, 0.14);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  box-sizing: border-box;
}

#storageItemModalHost .storage-item-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
  background: linear-gradient(180deg, #fffaf7 0%, #fff 100%);
  flex-shrink: 0;
}

#storageItemModalHost .storage-item-modal__header-text {
  min-width: 0;
  flex: 1 1 auto;
}

#storageItemModalHost .storage-item-modal__title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

#storageItemModalHost .storage-item-modal__subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.45;
}

#storageItemModalHost .storage-item-modal__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

#storageItemModalHost .storage-item-modal__close:hover {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.35);
  color: #ea580c;
}

#storageItemModalHost .storage-item-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 28px 20px;
  -webkit-overflow-scrolling: touch;
}

#storageItemModalHost .storage-item-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}

#storageItemModalHost .storage-item-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#storageItemModalHost .storage-form-section {
  padding-top: 18px;
}

#storageItemModalHost .storage-form-section:first-child {
  padding-top: 12px;
}

#storageItemModalHost .storage-form-section__title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c2410c;
}

#storageItemModalHost .storage-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

#storageItemModalHost .storage-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

#storageItemModalHost .storage-form-field--full {
  grid-column: 1 / -1;
}

#storageItemModalHost .storage-form-field--inner {
  width: 100%;
}

#storageItemModalHost .storage-form-field__label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  line-height: 1.3;
}

#storageItemModalHost .storage-form-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#storageItemModalHost .storage-form-field__hint {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: -4px;
}

#storageItemModalHost .storage-source-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

#storageItemModalHost .storage-source-pill--snkrdunk {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

#storageItemModalHost .storage-source-pill--pricecharting {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

#storageItemModalHost .storage-source-pill--manual {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

#storageItemModalHost .storage-source-pill--cardrush_pokemon {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.28);
}

#storageItemModalHost .storage-source-pill--collectr {
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid rgba(139, 92, 246, 0.28);
}

#storageItemModalHost .storage-source-pill--neutral {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

#storageItemModalHost .pw-bulk-preview__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 10px;
  font-size: 11px;
  color: #64748b;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#storageItemModalHost .pw-bulk-preview__health {
  padding: 6px 10px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}

#storageItemModalHost .pw-bulk-preview__health-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  font-size: 11px;
  color: #475569;
  overflow: hidden;
}

#storageItemModalHost .pw-bulk-preview__health--ok strong { color: #15803d; }
#storageItemModalHost .pw-bulk-preview__health--warn strong { color: #b45309; }
#storageItemModalHost .pw-bulk-preview__health--err strong { color: #b91c1c; }

#storageItemModalHost .pw-bulk-preview__health-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
}

#storageItemModalHost .pw-bulk-preview__health-src b {
  font-weight: 700;
  color: #334155;
}

#storageItemModalHost .pw-bulk-preview__badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin: 2px 0 4px;
  min-width: 0;
  overflow: hidden;
}

#storageItemModalHost .pw-bulk-preview__src.storage-source-pill {
  height: 18px;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#storageItemModalHost .pw-bulk-preview__conf {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid transparent;
}

#storageItemModalHost .pw-bulk-preview__conf--high {
  color: #166534;
  background: #ecfdf5;
  border-color: rgba(22, 101, 52, 0.2);
}

#storageItemModalHost .pw-bulk-preview__conf--medium {
  color: #92400e;
  background: #fffbeb;
  border-color: rgba(180, 83, 9, 0.22);
}

#storageItemModalHost .pw-bulk-preview__conf--low {
  color: #9f1239;
  background: #fff1f2;
  border-color: rgba(190, 18, 60, 0.2);
}

#storageItemModalHost .pw-bulk-preview__warn {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 2px 0 0;
  line-height: 1.2;
}

#storageItemModalHost .pw-bulk-preview__warn-chip {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
  border-radius: 4px;
  padding: 1px 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#storageItemModalHost .storage-date-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

#storageItemModalHost .storage-date-input {
  flex: 1 1 160px;
  min-width: 0;
}

#storageItemModalHost .storage-date-today-btn {
  flex: 0 0 auto;
  width: 96px;
  height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: #fff;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

#storageItemModalHost .storage-date-today-btn:hover {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.55);
  color: #ea580c;
}

#storageItemModalHost .storage-form-input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  font-family: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

#storageItemModalHost .storage-form-textarea {
  height: auto;
  min-height: 96px;
  padding: 12px 15px;
  resize: vertical;
  line-height: 1.45;
}

#storageItemModalHost .storage-form-select {
  cursor: pointer;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ea580c' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

#storageItemModalHost .storage-form-input::placeholder {
  color: #94a3b8;
}

#storageItemModalHost .storage-form-input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

#storageItemModalHost .storage-item-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

#storageItemModalHost .storage-item-modal__btn--ghost {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.14);
  color: #475569;
}

#storageItemModalHost .storage-item-modal__btn--ghost:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.22);
}

#storageItemModalHost .storage-item-modal__btn--primary {
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  border-color: #ea580c;
  color: #fff;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.28);
}

#storageItemModalHost .storage-item-modal__btn--primary:hover {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
}

#storageItemModalHost .storage-item-modal__btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  #storageItemModalHost .storage-item-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  #storageItemModalHost .storage-item-modal {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }

  #storageItemModalHost .storage-item-modal__header {
    padding: 18px 18px 14px;
  }

  #storageItemModalHost .storage-item-modal__title {
    font-size: 20px;
  }

  #storageItemModalHost .storage-item-modal__body {
    padding: 4px 18px 16px;
  }

  #storageItemModalHost .storage-item-modal__footer {
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  #storageItemModalHost .storage-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #storageItemModalHost .storage-form-field--full {
    grid-column: auto;
  }

  #storageItemModalHost .storage-form-input {
    height: 50px;
    font-size: 16px;
  }

  #storageItemModalHost .storage-date-today-btn {
    width: 100%;
    height: 50px;
  }

  @media (min-width: 400px) {
    #storageItemModalHost .storage-date-today-btn {
      width: 96px;
    }
  }

  #storageItemModalHost .storage-item-modal__btn {
    flex: 1 1 0;
    min-width: 0;
    height: 50px;
  }
}

/* Storage row menu ? portaled to body (avoids overflow clipping) */
body > #stRowMenu.st-row-menu,
#stRowMenu.st-row-menu {
  position: fixed;
  z-index: 9025;
  display: flex;
  flex-direction: column;
  width: min(240px, calc(100vw - 32px));
  min-width: 220px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  background: #fffdf9;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
}

body > #stRowMenu.st-row-menu:not([hidden]),
#stRowMenu.st-row-menu:not([hidden]) {
  animation: st-context-actions-in 140ms ease-out both;
}

@keyframes st-context-actions-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#stRowMenu.st-row-menu[hidden] {
  display: none !important;
}

#stRowMenu.st-row-menu .pw-row-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#stRowMenu.st-row-menu .pw-row-menu__item:hover,
#stRowMenu.st-row-menu .pw-row-menu__item:active {
  background: #fff3e8;
  color: #ea580c;
}

#stRowMenu.st-row-menu .pw-row-menu__divider {
  height: 1px;
  margin: 4px 8px;
  background: rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

#stRowMenu.st-row-menu .pw-row-menu__item--danger {
  color: #dc2626;
}

#stRowMenu.st-row-menu .pw-row-menu__item--danger:hover,
#stRowMenu.st-row-menu .pw-row-menu__item--danger:active {
  background: #fef2f2;
  color: #dc2626;
}

/* Storage toolbar overflow menu ? portaled to body */
body > #stToolbarMenu.st-toolbar-menu,
#stToolbarMenu.st-toolbar-menu {
  position: fixed;
  z-index: 9025;
  display: flex;
  flex-direction: column;
  width: min(240px, calc(100vw - 32px));
  min-width: 220px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  background: #fffdf9;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

#stToolbarMenu.st-toolbar-menu[hidden] {
  display: none !important;
}

#stToolbarMenu.st-toolbar-menu .pw-row-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#stToolbarMenu.st-toolbar-menu .pw-row-menu__item:hover,
#stToolbarMenu.st-toolbar-menu .pw-row-menu__item:active {
  background: #fff3e8;
  color: #ea580c;
}

#stToolbarMenu.st-toolbar-menu .pw-row-menu__item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

#stToolbarMenu.st-toolbar-menu .pw-row-menu__divider {
  height: 1px;
  margin: 4px 8px;
  background: rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

#stToolbarMenu.st-toolbar-menu .pw-row-menu__item--danger {
  color: #dc2626;
}

#stToolbarMenu.st-toolbar-menu .pw-row-menu__item--danger:hover,
#stToolbarMenu.st-toolbar-menu .pw-row-menu__item--danger:active {
  background: #fef2f2;
  color: #dc2626;
}

#hydraToolsShell .st-card--sold,
#hydraToolsShell .st-table-row--sold {
  opacity: 0.92;
}

#hydraToolsShell .st-card--sold {
  border-color: rgba(100, 116, 139, 0.28);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 42%);
}

#hydraToolsShell .st-card__row--stats-sold {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#hydraToolsShell .st-card__stat-v--sale {
  color: #475569;
  font-weight: 700;
}

#hydraToolsShell .st-card__row--sold-ht {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(100, 116, 139, 0.2);
  font-size: 11px;
  color: #64748b;
}

#hydraToolsShell .st-card__sold-ht-value {
  font-weight: 600;
  color: #334155;
}

.storage-sell-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.storage-sell-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #64748b;
}

.storage-sell-summary__row strong {
  color: #0f172a;
  font-weight: 700;
}

#storageItemModalHost .storage-item-modal--sell .storage-item-modal__subtitle {
  color: #475569;
  font-weight: 600;
}

#storageItemModalHost .storage-item-modal--bulk-sold .storage-item-modal__subtitle {
  color: #475569;
  font-weight: 600;
}

#storageItemModalHost .st-bulk-sold-form .storage-form-grid {
  gap: 10px;
}

#storageItemModalHost .st-bulk-sold-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(220px, 38vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}

#storageItemModalHost .st-bulk-sold-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

#storageItemModalHost .st-bulk-sold-item.has-error {
  border-color: rgba(220, 38, 38, 0.45);
  background: #fef2f2;
}

#storageItemModalHost .st-bulk-sold-item__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#storageItemModalHost .st-bulk-sold-item__price {
  flex: 0 0 108px;
  width: 108px;
  min-width: 0;
  height: 40px;
  padding: 0 8px;
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#storageItemModalHost .st-bulk-sold-form .st-vnd-input {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#storageItemModalHost .st-bulk-sold-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

#storageItemModalHost .st-bulk-sold-error.hidden {
  display: none;
}

@media (max-width: 700px) {
  #storageItemModalHost .storage-item-modal--bulk-sold {
    max-height: min(92dvh, 640px);
  }

  #storageItemModalHost .st-bulk-sold-item__price {
    flex-basis: 96px;
    width: 96px;
    height: 44px;
    font-size: 16px;
  }
}

.st-sold-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.st-sold-report-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  color: #64748b;
}

.st-sold-report-metric strong {
  font-size: 15px;
  color: #0f172a;
}

#hydraToolsShell .st-kpi__hint {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.2;
}

#hydraToolsShell .st-kpi__value .st-kpi__hint {
  display: inline;
  margin-top: 0;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

#hydraToolsShell .st-kpi-row--display .st-kpi__label {
  letter-spacing: 0.01em;
}

#hydraToolsShell .st-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  background: rgba(15, 23, 42, 0.08);
  color: #64748b;
}

#hydraToolsShell .st-tab.is-active .st-tab__count {
  background: rgba(249, 115, 22, 0.15);
  color: #c2410c;
}

#storageItemModalHost .storage-item-modal--status .storage-item-modal__body {
  padding-top: 12px;
  padding-bottom: 8px;
}

#storageItemModalHost .st-status-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#storageItemModalHost .st-status-current__label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

#storageItemModalHost .st-status-pick {
  margin-bottom: 12px;
}

#storageItemModalHost .st-status-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

#storageItemModalHost .st-status-segment {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

#storageItemModalHost .st-status-segment:hover {
  border-color: rgba(249, 115, 22, 0.35);
  color: #c2410c;
}

#storageItemModalHost .st-status-segment.is-active {
  border-color: rgba(249, 115, 22, 0.55);
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.2);
}

#storageItemModalHost .st-status-extra {
  margin-top: 4px;
}

#storageItemModalHost .st-status-extra:empty {
  display: none;
}

#hydraToolsShell .st-card__row--consign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px 8px;
  font-size: 11px;
  color: #64748b;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .st-card__consign-place {
  font-weight: 600;
  color: #c2410c;
}

#hydraToolsShell .st-card__consign-date {
  flex-shrink: 0;
  color: #94a3b8;
}

@media (max-width: 700px) {
  #storageItemModalHost .storage-item-modal--status {
    max-height: min(92dvh, 640px);
  }

  #storageItemModalHost .st-status-segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ?? Status badge as button + picker ?? */
#hydraToolsShell .st-badge--status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

#hydraToolsShell .st-badge--status-btn:hover {
  filter: brightness(0.97);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .st-badge--status-btn:active,
#hydraToolsShell .st-badge--status-btn.is-open {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

#hydraToolsShell .st-badge__chev {
  font-size: 10px;
  opacity: 0.7;
  line-height: 1;
}

body > #stStatusPicker.st-status-picker,
#stStatusPicker.st-status-picker {
  position: fixed;
  z-index: 9025;
  display: flex;
  flex-direction: column;
  min-width: 148px;
  max-width: min(240px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  gap: 2px;
  -webkit-overflow-scrolling: touch;
}

#stStatusPicker.st-status-picker[hidden] {
  display: none !important;
}

#stStatusPicker .st-status-picker__title {
  padding: 6px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.3;
}

#stStatusPicker .st-status-picker__item,
#stStatusPicker.st-status-picker .pw-row-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

#stStatusPicker .st-status-picker__item:hover,
#stStatusPicker .st-status-picker__item:active,
#stStatusPicker.st-status-picker .pw-row-menu__item:hover,
#stStatusPicker.st-status-picker .pw-row-menu__item:active {
  background: #f8fafc;
  color: #0f172a;
}

#stStatusPicker .st-status-picker__item.is-active,
#stStatusPicker.st-status-picker .pw-row-menu__item.is-active {
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
}

/* ?? Select mode inline (merged with search row) ?? */
#hydraToolsShell .st-select-toolbar {
  display: none;
}

/* legacy alias ? kept for safety if old markup cached */
#hydraToolsShell .st-select-toolbar__toggle,
#hydraToolsShell .st-select-toolbar__all {
  display: none;
}

/* ?? Bulk sticky bar ?? */
#hydraToolsShell .st-bulk-bar--sticky {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--hydra-bottom-nav-total-h, 56px) + 8px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#hydraToolsShell .st-bulk-bar--sticky .st-bulk-bar__count {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
}

#hydraToolsShell .st-bulk-bar--sticky .st-bulk-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

#hydraToolsShell .st-bulk-bar--sticky .st-bulk-bar__extras {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .st-bulk-btn--primary,
#hydraToolsShell .st-bulk-btn--primary:hover,
#hydraToolsShell .st-bulk-btn--primary:active,
#hydraToolsShell .st-bulk-btn--primary:focus,
#hydraToolsShell .st-bulk-btn--primary:focus-visible {
  border-color: transparent;
  background-color: #f97316;
  background-image: linear-gradient(155deg, #fb923c 0%, #f97316 42%, #ea580c 100%);
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.24);
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}

#hydraToolsShell .st-bulk-btn--primary .st-bulk-btn__label {
  color: #fff;
  -webkit-text-fill-color: #fff;
  white-space: nowrap;
}

#hydraToolsShell .st-bulk-btn--primary:hover {
  filter: brightness(1.03);
}

#hydraToolsShell .st-bulk-btn--primary:active {
  filter: brightness(0.98);
  transform: scale(0.98);
}

#hydraToolsShell .st-bulk-btn--primary:focus {
  outline: none;
}

#hydraToolsShell .st-bulk-btn--primary:focus-visible {
  outline: 2px solid rgba(234, 88, 12, 0.72);
  outline-offset: 2px;
  box-shadow:
    0 3px 10px rgba(249, 115, 22, 0.24),
    0 0 0 3px rgba(249, 115, 22, 0.22);
}

#hydraToolsShell .st-bulk-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

#hydraToolsShell .st-list-section.is-select-mode {
  padding-bottom: calc(var(--hydra-bottom-nav-total-h, 56px) + 72px + env(safe-area-inset-bottom, 0px));
}

#hydraToolsShell .st-col-check--hidden {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

#hydraToolsShell .st-table-row.is-selected,
#hydraToolsShell .st-card--selected {
  background: rgba(255, 247, 237, 0.72);
  border-color: rgba(249, 115, 22, 0.28);
}

#hydraToolsShell .st-card__check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  cursor: pointer;
}

#hydraToolsShell .st-card__check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #f97316;
}

#hydraToolsShell .st-card--select-mode .st-card__row--head {
  grid-template-columns: auto minmax(0, 1fr) auto 28px;
}

@media (max-width: 700px) {
  #hydraToolsShell .st-tool .st-card--dense .st-card__meta-badges .st-badge--status-btn {
    min-height: 36px;
    padding: 0 8px;
    font-size: 10px;
  }

  #hydraToolsShell .st-bulk-bar--sticky .st-bulk-bar__extras {
    display: none;
  }
}

/* ?? Storage categories / lots ?? */
#hydraToolsShell .st-cat-badge,
#hydraToolsShell .tools-list-meta .st-cat-badge {
  display: inline-flex;
  align-items: center;
  max-width: 7.5rem;
  height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

#hydraToolsShell .st-gallery-cat-badge {
  position: absolute;
  /* Desktop: bottom-left ? never between grade (top-left) and qty (top-right). */
  top: auto;
  right: auto;
  bottom: 4px;
  left: 4px;
  z-index: 1;
  max-width: calc(100% - 8px);
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.88);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile / tablet gallery (3-col): category name is redundant with active filter and collides with Grade/Qty. */
@media (max-width: 900px) {
  #hydraToolsShell .st-gallery-cat-badge {
    display: none !important;
  }
}

#hydraToolsShell .st-cat-manager,
#hydraToolsShell .hydra-category-manager,
#pwModalHost .hydra-category-manager,
#pwModalHost .st-cat-manager {
  max-width: min(440px, 100%);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
}

#hydraToolsShell .hydra-category-manager__titles,
#pwModalHost .hydra-category-manager__titles {
  min-width: 0;
  flex: 1 1 auto;
}

#hydraToolsShell .hydra-category-manager__subtitle,
#pwModalHost .hydra-category-manager__subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.2;
}

#hydraToolsShell .st-cat-manager__header .pw-modal__title,
#hydraToolsShell .hydra-category-manager__header .pw-modal__title,
#pwModalHost .hydra-category-manager__header .pw-modal__title {
  font-size: 1.05rem;
  font-weight: 800;
}

#hydraToolsShell .st-cat-manager__body,
#hydraToolsShell .hydra-category-manager__body,
#pwModalHost .hydra-category-manager__body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

#hydraToolsShell .st-cat-manager__toolbar,
#hydraToolsShell .hydra-category-manager__toolbar,
#pwModalHost .hydra-category-manager__toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

#hydraToolsShell .st-cat-manager__create,
#hydraToolsShell .hydra-category-manager__create,
#pwModalHost .hydra-category-manager__create {
  width: 100%;
  min-height: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

#hydraToolsShell .st-cat-manager__list,
#hydraToolsShell .hydra-category-manager__list,
#pwModalHost .hydra-category-manager__list {
  margin: 0;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#hydraToolsShell .st-cat-manager .pw-category-list,
#hydraToolsShell .hydra-category-manager .pw-category-list,
#pwModalHost .hydra-category-manager .pw-category-list {
  gap: 6px;
}

#hydraToolsShell .hydra-category-manager__empty-lead,
#pwModalHost .hydra-category-manager__empty-lead {
  margin: 0 0 4px;
  font-weight: 700;
  color: #334155;
}

#hydraToolsShell .hydra-category-manager__empty-hint,
#pwModalHost .hydra-category-manager__empty-hint {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

/* Match PW single-menu card grid; drop inline S?a/Chuy?n/X?a columns. */
#hydraToolsShell .st-category-row,
#hydraToolsShell .hydra-category-manager__item,
#pwModalHost .hydra-category-manager__item {
  grid-template-columns: 1fr auto 36px;
  grid-template-rows: auto auto;
}

#hydraToolsShell .st-category-row .pw-category-row__open,
#hydraToolsShell .hydra-category-manager__item .pw-category-row__open,
#pwModalHost .hydra-category-manager__item .pw-category-row__open {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

#hydraToolsShell .st-category-row .pw-category-row__menu,
#hydraToolsShell .hydra-category-manager__item .pw-category-row__menu,
#pwModalHost .hydra-category-manager__item .pw-category-row__menu {
  grid-column: 3;
  grid-row: 1 / 3;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}

#hydraToolsShell .st-category-row--system,
#hydraToolsShell .hydra-category-manager__item--system,
#pwModalHost .hydra-category-manager__item--system {
  grid-template-columns: 1fr;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .st-category-row--system .pw-category-row__open,
#hydraToolsShell .hydra-category-manager__item--system .pw-category-row__open,
#pwModalHost .hydra-category-manager__item--system .pw-category-row__open {
  grid-column: 1;
  grid-row: 1 / 3;
  padding-right: 12px;
}

#hydraToolsShell .st-category-row--system .pw-category-row__name,
#hydraToolsShell .hydra-category-manager__item--system .pw-category-row__name,
#pwModalHost .hydra-category-manager__item--system .pw-category-row__name {
  font-weight: 700;
  color: #334155;
}

#hydraToolsShell .st-category-row--system .pw-category-row__meta-text,
#hydraToolsShell .hydra-category-manager__item--system .pw-category-row__meta-text,
#pwModalHost .hydra-category-manager__item--system .pw-category-row__meta-text {
  font-weight: 500;
  color: #94a3b8;
}

#hydraToolsShell .st-category-row.is-active,
#hydraToolsShell .st-category-row--system.is-active,
#hydraToolsShell .hydra-category-manager__item.is-active,
#pwModalHost .hydra-category-manager__item.is-active {
  border-color: #fdba74;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.2);
  background: #fffaf5;
}

#hydraToolsShell .st-category-row.is-active .pw-category-row__name,
#hydraToolsShell .st-category-row--system.is-active .pw-category-row__name,
#hydraToolsShell .hydra-category-manager__item.is-active .pw-category-row__name,
#pwModalHost .hydra-category-manager__item.is-active .pw-category-row__name {
  color: #c2410c;
}

#hydraToolsShell .st-assign-cat__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#hydraToolsShell .st-assign-cat__item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fff;
  min-height: 40px;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  #hydraToolsShell .st-cat-manager-backdrop .pw-modal,
  #hydraToolsShell .hydra-category-manager-backdrop .pw-modal,
  #pwModalHost .st-cat-manager-backdrop .pw-modal,
  #pwModalHost .hydra-category-manager-backdrop .pw-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-width: none;
    max-height: min(88vh, 720px);
    border-radius: 16px 16px 0 0;
    margin: 0;
  }
}

/* Quantity badge (?N) ? compact; list meta + gallery corner */
.st-qty-badge,
.tools-list-meta .st-qty-badge,
.st-name-cell .st-qty-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: #ccfbf1;
  vertical-align: middle;
  white-space: nowrap;
  flex: 0 0 auto;
}
.st-status-qty-block {
  margin: 10px 0 4px;
}
.st-status-qty-summary {
  font-size: 13px;
  color: #475569;
  margin-bottom: 8px;
}
.st-status-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-status-qty-row .storage-form-input {
  flex: 1 1 auto;
  min-width: 0;
}
.st-status-current__qty {
  margin-left: 8px;
  font-weight: 800;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}
