:root {
  --ink: #223830;
  --muted: #829087;
  --green: #235e4c;
  --line: #e5e9e4;
  --bg: #f6f7f3;
  --white: #fff;
  --pale: #edf3ec;
  --sand: #d5b98c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    13px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
summary,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #98b99e;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 23px;
  color: #78887d;
  line-height: 1;
  padding: 7px;
  border-radius: 6px;
}
.icon-button:hover {
  background: var(--pale);
  color: var(--green);
}
.workspace {
  display: grid;
  grid-template-columns: 246px 1fr;
  min-height: 100vh;
}
aside {
  background: white;
  border-right: 1px solid var(--line);
  padding: 24px 19px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
  scrollbar-width: thin;
}
.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 24px;
}
.sidebar-head small {
  font-weight: 400;
  font-size: 10px;
  border-radius: 5px;
  background: var(--pale);
  padding: 2px 5px;
}
.sidebar-head small:empty {
  display: none;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
}
.text-button:hover {
  color: var(--green);
}
label {
  display: block;
  margin: 0 0 15px;
  font-size: 11px;
  color: #617066;
}
input,
select,
textarea {
  width: 100%;
  background: white;
  border: 1px solid #dfe5df;
  border-radius: 6px;
  padding: 9px;
  color: var(--ink);
  outline: none;
  margin-top: 6px;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #6d9a7d;
  box-shadow: 0 0 0 2px #387d5610;
}
input::placeholder,
textarea::placeholder {
  color: #a4ada6;
}
textarea {
  resize: vertical;
}
.search-box {
  position: relative;
}
.search-box span {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 23px;
  color: #97a59a;
}
.search-box input {
  padding-left: 30px;
  font-size: 11px;
}
.batch summary,
.advanced summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #62776a;
  padding: 5px 0;
}
.batch summary:before,
.advanced summary:before {
  content: "+";
  margin-right: 7px;
}
.batch[open] summary:before,
.advanced[open] summary:before {
  content: "−";
}
.batch summary span,
.advanced summary span {
  font-size: 9px;
  color: #a0aaa2;
  margin-left: auto;
}
.filter-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.facet {
  margin-bottom: 12px;
}
.facet summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  border: 1px solid #dfe5df;
  padding: 9px;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  font-size: 12px;
}
.facet summary:after {
  content: "⌄";
  color: #9ca89f;
}
.facet[open] summary {
  border-color: #6d9a7d;
}
.facet-name {
  font-size: 11px;
  color: #617066;
  margin-bottom: 5px;
  display: block;
}
.facet-values {
  max-height: 210px;
  overflow: auto;
  padding: 5px 7px;
  border: 1px solid var(--line);
  margin-top: 4px;
  border-radius: 6px;
}
.facet-values label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 0;
  font-size: 11px;
}
.facet-values input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--green);
  box-shadow: none;
}
.facet-values label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 145px;
}
.facet-values label small {
  margin-left: auto;
  color: #a4ada6;
  font-size: 9px;
}
.facet-search {
  font-size: 10px;
  position: sticky;
  top: 0;
}
.range {
  display: flex;
  align-items: center;
  gap: 5px;
}
.range input {
  width: calc(50% - 8px);
}
.range span {
  padding-top: 4px;
  color: #aeb5ae;
}
.advanced {
  margin: 20px 0;
}
.advanced[open] summary {
  margin-bottom: 12px;
}
.apply-area {
  position: sticky;
  bottom: -24px;
  background: linear-gradient(transparent, #fff 18%);
  padding: 16px 0 10px;
}
.primary {
  border: 0;
  border-radius: 7px;
  padding: 11px 15px;
  background: var(--green);
  color: white;
  width: 100%;
  font-weight: 550;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.primary:hover {
  background: #174836;
}
.primary span {
  opacity: 0.5;
}
.sidebar-note {
  font-size: 9px;
  letter-spacing: 0.6px;
  color: #a5afa6;
  margin-top: 15px;
  line-height: 1.9;
}
main {
  padding: 22px 24px;
  min-width: 0;
  max-width: 2100px;
}
.secondary {
  border: 1px solid #d7dfd5;
  background: #fff;
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 11px;
  color: #47604f;
  white-space: nowrap;
}
.secondary:hover {
  background: var(--pale);
}
.secondary span {
  font-size: 17px;
  margin-right: 6px;
}
#mobile-filters {
  display: none;
}
h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.legend {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  margin-right: 5px;
}
.legend.green {
  background: #7d9b72;
}
.legend.sand {
  background: var(--sand);
}
.catalog {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.catalog-toolbar {
  padding: 20px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.catalog-toolbar h2 {
  font-size: 14px;
}
.catalog-toolbar h2 small {
  font-weight: 400;
  color: #8d9b89;
  font-size: 10px;
  margin-left: 8px;
}
.catalog-toolbar p {
  font-size: 9px;
  color: #a2aca0;
  margin: 5px 0 0;
}
.table-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.table-controls select {
  margin: 0;
  width: auto;
  font-size: 10px;
  padding: 7px 10px;
  color: #7c8b78;
  border-color: #e8ece4;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 11px;
}
th {
  font-size: 9px;
  color: #8c9a87;
  font-weight: 500;
  text-align: left;
  background: #f8faf5;
  padding: 11px 13px;
  border-top: 1px solid #eef1e9;
  border-bottom: 1px solid #eef1e9;
}
.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.product-column {
  min-width: 245px;
  padding-left: 20px;
}
td {
  padding: 14px 13px;
  border-bottom: 1px solid #eef1ea;
  color: #65745f;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fcfdf9;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-left: 20px;
}
.product-image,
.image-placeholder {
  height: 46px;
  width: 46px;
  border-radius: 7px;
  background: #f2f4ee;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid #e9eee3;
}
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #b7c2ae;
}
.product-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #7f8e76;
  margin-top: 3px;
}
.product-code {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #345d42;
}
.product-code:hover {
  text-decoration: underline;
}
.product-brand {
  font-size: 8px;
  color: #a8b19f;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subtext {
  display: block;
  font-size: 9px;
  color: #a1ac99;
  margin-top: 3px;
}
.supply {
  font-weight: 550;
  color: #435e3f;
}
.discount-tag {
  color: #879b6d;
  font-size: 9px;
  background: #f0f4e9;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 3px;
}
.stock-total {
  font-weight: 650;
  color: #42613d;
}
.stock-zero {
  color: #a8b29f;
}
.channel-tag {
  font-size: 9px;
  border: 1px solid #e8e1d2;
  color: #a18b64;
  background: #fbf8f2;
  border-radius: 4px;
  padding: 3px 6px;
}
.channel-free {
  color: #a5b09c;
  font-size: 9px;
}
.detail-button {
  border: 0;
  background: none;
  color: #9bad91;
  font-size: 17px;
}
.pagination {
  border-top: 1px solid #edf0e7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 10px;
  color: #9aa592;
}
.pagination > div {
  display: flex;
  gap: 12px;
  align-items: center;
}
.pagination select {
  width: auto;
  margin: 0;
  font-size: 10px;
  padding: 5px;
  color: #87967c;
  border-color: #e8ece1;
}
.page-button {
  width: 25px;
  height: 25px;
  background: white;
  border: 1px solid #e1e7d9;
  border-radius: 5px;
  color: #758a69;
  font-size: 18px;
  line-height: 1;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.active-filters:empty {
  display: none;
}
.filter-chip {
  border: 1px solid #dce5d6;
  border-radius: 5px;
  background: #edf3e8;
  padding: 4px 8px;
  color: #6d865e;
  font-size: 10px;
}
.filter-chip span {
  margin-left: 7px;
}
.empty {
  text-align: center;
  padding: 60px !important;
  color: #96a38d;
  white-space: normal;
}
.spinner {
  margin: 0 auto 15px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 2px solid #e0e7d7;
  border-top-color: #6e9060;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.skeleton {
  height: 150px;
  background: linear-gradient(110deg, #f4f6ee 30%, #fafbf7 50%, #f4f6ee 70%);
  border-radius: 6px;
}
.loading tbody {
  opacity: 0.45;
}
.loading {
  pointer-events: none;
}
#notice {
  background: #fbf6e8;
  border: 1px solid #eaddba;
  color: #8c7948;
  border-radius: 7px;
  padding: 11px 14px;
  margin-bottom: 15px;
  font-size: 11px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #274e38;
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 100;
  box-shadow: 0 5px 30px #16362225;
  max-width: 90vw;
}
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(700px, 95vw);
  height: 100dvh;
  max-height: 100dvh;
  max-width: 95vw;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: -10px 0 80px #18352425;
  background: #fafbf7;
  color: var(--ink);
}
dialog::backdrop {
  background: #162e2344;
  backdrop-filter: blur(2px);
}
.drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 28px;
  border-bottom: 1px solid var(--line);
  background: white;
  position: sticky;
  top: 0;
  z-index: 1;
}
.drawer-top small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #9aaa90;
}
.drawer-top h2 {
  font-size: 24px;
  margin-top: 5px;
  letter-spacing: 1px;
}
#detail-content {
  padding: 25px 28px;
}
.detail-title {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 25px;
}
.detail-title img {
  width: 85px;
  height: 85px;
  object-fit: contain;
  border-radius: 9px;
  background: white;
}
.detail-title h3 {
  font-size: 18px;
  margin: 0 0 4px;
}
.detail-title p {
  font-size: 11px;
  color: #94a18b;
  margin: 3px 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.detail-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
}
.detail-stat small {
  font-size: 10px;
  color: #91a087;
  display: block;
}
.detail-stat strong {
  font-size: 19px;
  font-weight: 550;
  display: block;
  margin-top: 4px;
}
.detail-section {
  margin: 25px 0;
}
.detail-section h3 {
  font-size: 13px;
  margin: 0 0 12px;
}
.detail-section p {
  font-size: 11px;
  color: #8c9b82;
}
.warehouse-card {
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 10px;
}
.warehouse-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
}
.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.size-pill {
  border: 1px solid #e5ebdd;
  background: #f9fbf5;
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 10px;
  min-width: 50px;
  text-align: center;
}
.size-pill small {
  display: block;
  color: #a5b299;
  font-size: 8px;
}
.detail-note {
  font-size: 10px;
  color: #a1ae96;
  padding: 12px;
  background: #eff3e9;
  border-radius: 7px;
}
.detail-properties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  font-size: 11px;
  color: #84937a;
  margin: 20px 0;
}
.detail-properties b {
  color: #4e6643;
  font-weight: 500;
  margin-left: 7px;
}
.no-data {
  color: #a1ad96;
  font-size: 11px;
  padding: 15px 0;
}
.busy-refresh {
  animation: spin 1.5s linear infinite;
}
@media (min-width: 1650px) {
  main {
    padding: 28px 36px;
  }
  .product-name,
  .product-brand {
    max-width: 270px;
  }
  table {
    font-size: 12px;
  }
  td {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 222px 1fr;
  }
  main {
    padding: 20px 16px;
  }
  .product-column {
    min-width: 220px;
  }
  .product-name,
  .product-brand {
    max-width: 150px;
  }
}
@media (max-width: 800px) {
  .workspace {
    display: block;
  }
  aside {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 270px;
    height: 100dvh;
    z-index: 25;
    box-shadow: 20px 0 50px #23372125;
  }
  aside.visible {
    display: block;
  }
  main {
    padding: 15px 12px;
  }
  #mobile-filters {
    display: block;
  }
  .catalog-toolbar {
    padding: 16px 13px;
    align-items: flex-start;
  }
  .catalog-toolbar p {
    font-size: 8px;
  }
  .table-controls select {
    font-size: 9px;
    max-width: 120px;
  }
  .pagination {
    padding: 12px;
  }
  .pagination > div {
    gap: 7px;
  }
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
[hidden] {
  display: none !important;
}
.product-media {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
}
.detail-media {
  width: 85px;
  height: 85px;
}
.detail-media .image-placeholder,
.detail-media .detail-image {
  width: 85px;
  height: 85px;
  object-fit: contain;
  border-radius: 9px;
  background: white;
}
.detail-title .detail-media img {
  margin: 0;
}
.asset-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.asset-header h3 {
  margin-bottom: 4px;
}
.asset-description {
  margin: 0 !important;
  font-size: 10px !important;
}
.asset-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.asset-toolbar select {
  width: auto;
  max-width: 46%;
  margin: 0;
  font-size: 10px;
}
.asset-result-count {
  font-size: 10px;
  margin-left: auto;
  color: #8b9a81;
  white-space: nowrap;
}
.asset-file-symbol {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #839a70;
}
.asset-empty {
  padding: 28px 12px;
  color: #8b9c7e;
  font-size: 11px;
  text-align: center;
  border: 1px dashed #dce5d3;
  border-radius: 7px;
  line-height: 1.9;
}
.asset-preview {
  inset: 0;
  margin: auto;
  width: min(1000px, 96vw);
  height: min(850px, 94dvh);
  max-height: 94dvh;
  border-radius: 12px;
  overflow: hidden;
}
.asset-preview .drawer-top {
  position: relative;
  padding: 14px 20px;
  height: 88px;
}
.asset-preview-title {
  font-size: 16px !important;
  letter-spacing: 0 !important;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-preview-path {
  font-size: 10px;
  color: #8b9b7e;
  margin: 4px 0 0;
}
.asset-preview-body {
  height: calc(100% - 154px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 15px;
  background: #f0f3ea;
  overflow: auto;
}
.asset-preview-body img,
.asset-preview-body video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.asset-preview-body audio {
  width: min(600px, 90%);
}
.asset-preview-actions {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #fff;
  border-top: 1px solid #e3e9db;
}
.asset-preview-index {
  font-size: 11px;
  color: #8b9a7c;
}
.asset-preview .asset-download {
  margin-left: 20px;
}
.asset-preview .asset-file-symbol {
  font-size: 45px;
}
.asset-preview-body p {
  font-size: 12px;
  color: #7f906f;
}
@media (max-width: 500px) {
  .asset-toolbar {
    flex-wrap: wrap;
  }
  .asset-result-count {
    margin-left: 0;
  }
  .asset-preview-actions {
    gap: 6px;
  }
  .asset-preview .asset-download {
    margin-left: 5px;
  }
  .asset-preview .secondary {
    font-size: 10px;
    padding: 7px 9px;
  }
}

.header-total {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #3d6044;
  font-variant-numeric: tabular-nums;
}
.catalog th {
  vertical-align: top;
  padding-top: 13px;
  padding-bottom: 13px;
}
.field-status {
  color: #829278;
  font-size: 10px;
}
.catalog #active-filters {
  margin: 0;
  padding: 0 20px 12px;
}
.catalog #active-filters:empty {
  display: none;
}
.catalog #notice {
  margin: 0 20px 12px;
}
.table-controls .secondary {
  padding: 7px 10px;
  font-size: 10px;
}
@media (max-width: 800px) {
  .catalog-toolbar {
    flex-wrap: wrap;
  }
  .table-controls {
    flex-wrap: wrap;
  }
  .catalog #active-filters {
    padding-left: 13px;
    padding-right: 13px;
  }
}

@media (min-width: 801px) {
  .table-controls:has(> #mobile-filters:only-child) {
    display: none;
  }
}

.column-settings {
  inset: 0;
  margin: auto;
  width: min(440px, calc(100vw - 32px));
  height: auto;
  max-height: 90dvh;
  padding: 22px;
  border-radius: 12px;
  overflow: auto;
  background: white;
}
.column-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.column-settings-heading h2 {
  font-size: 16px;
}
#column-settings-status {
  font-size: 11px;
  color: #8a997d;
  margin: 8px 0 20px;
}
.column-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.column-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid #e5ebdf;
  border-radius: 6px;
  color: #516747;
  font-size: 12px;
  cursor: pointer;
}
.column-options input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #235e4c;
  flex-shrink: 0;
}
.column-settings-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid #e5ebdf;
}
.column-settings-actions > span {
  flex: 1;
}
.column-settings-save {
  background: #235e4c;
  color: white;
  border-color: #235e4c;
}
.column-settings-save:hover {
  background: #174836;
  color: white;
}
.column-settings-error {
  font-size: 11px;
  color: #a34336;
  margin: 12px 0 0;
}

#table-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #7c8d72;
}
#table-settings:hover {
  background: #edf3e8;
  color: #235e4c;
}
.column-settings {
  width: min(650px, calc(100vw - 28px));
  max-height: 90dvh;
}
.column-options {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 55dvh;
  overflow: auto;
  padding: 2px 5px 2px 0;
}
.column-options fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.column-options legend {
  font-size: 11px;
  color: #8a9d7b;
  margin-bottom: 9px;
  font-weight: 600;
}
.column-group-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
}
.column-required {
  margin-left: auto;
  white-space: nowrap;
  font-size: 9px;
  color: #8a9b7b;
}
.column-options label:has(input:disabled) {
  background: #f1f5ec;
  cursor: default;
}
.column-options input:disabled {
  opacity: 0.65;
}
.catalog td:not(.product-cell) {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 440px) {
  .column-group-options {
    grid-template-columns: 1fr;
  }
  .column-options {
    max-height: 53dvh;
  }
}

.sample-record-button {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: #3d6549;
  font: inherit;
  cursor: pointer;
}
.sample-record-button:hover {
  text-decoration: underline;
}
.sample-lifecycle-content {
  padding: 24px 28px;
}
.sample-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sample-section-heading h3 {
  font-size: 14px;
  margin: 0;
}
.sample-section-heading small {
  font-size: 10px;
  color: #94a086;
}
.sample-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.sample-stat {
  padding: 13px;
  border: 1px solid #e1e9d9;
  background: white;
  border-radius: 7px;
}
.sample-stat small {
  display: block;
  font-size: 10px;
  color: #899c7b;
}
.sample-stat strong {
  display: block;
  font-size: 21px;
  color: #47643b;
  font-weight: 550;
  margin-top: 5px;
}
.sample-order {
  border: 1px solid #dfe7d6;
  border-radius: 9px;
  margin: 20px 0;
  background: #fff;
  overflow: hidden;
}
.sample-order-heading {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 13px 15px;
  background: #eef3e7;
  font-size: 11px;
  flex-wrap: wrap;
}
.sample-order-heading span {
  font-size: 10px;
  color: #8a9c78;
}
.sample-order-ids {
  font-size: 9px;
  color: #9aa88c;
  margin: 9px 14px;
  overflow-wrap: anywhere;
}
.sample-sku {
  margin: 12px 14px;
  padding: 14px;
  border: 1px solid #e7ecdf;
  border-radius: 7px;
}
.sample-sku-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.sample-status {
  font-size: 10px;
  border: 1px solid #dce7d2;
  border-radius: 4px;
  background: #f1f6eb;
  color: #7e9568;
  padding: 2px 6px;
}
.sample-sku-quantities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 10px;
  color: #8b9c7b;
  margin: 12px 0;
}
.sample-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
  background: #f6f8f1;
  padding: 9px;
  border-radius: 6px;
}
.sample-stages small {
  display: block;
  font-size: 9px;
  color: #859a73;
  margin-bottom: 5px;
}
.sample-stages span {
  font-size: 9px;
  color: #a1ad92;
  overflow-wrap: anywhere;
}
.sample-timeline {
  list-style: none;
  margin: 20px 0 8px;
  padding: 0 0 0 14px;
  border-left: 1px solid #dce7d1;
}
.sample-timeline li {
  position: relative;
  margin: 0 0 16px;
  padding: 0 0 0 4px;
}
.sample-timeline li:before {
  position: absolute;
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #89a773;
  left: -18px;
  top: 6px;
}
.sample-event-title {
  font-size: 11px;
  color: #597447;
}
.sample-timeline small {
  font-size: 9px;
  color: #a0ad92;
  display: block;
  margin-top: 4px;
}
.sample-returns summary {
  font-size: 10px;
  color: #8b9d78;
  cursor: pointer;
  padding: 6px 0;
}
.sample-return {
  padding: 10px;
  margin: 8px 0;
  background: #f6f8f2;
  border-radius: 6px;
  font-size: 10px;
}
.sample-return strong {
  font-weight: 500;
}
.sample-return p {
  margin: 6px 0;
  color: #8d9f7b;
}
.sample-return small {
  font-size: 9px;
  color: #a0af90;
}
.sample-warning {
  font-size: 10px !important;
  color: #a88951 !important;
  background: #faf6e9;
  border-radius: 5px;
  padding: 8px;
  line-height: 1.7;
  white-space: normal;
}
@media (max-width: 600px) {
  .sample-lifecycle-content {
    padding: 18px 14px;
  }
  .sample-sku {
    padding: 10px;
    margin: 10px;
  }
  .sample-stages {
    grid-template-columns: repeat(3, 1fr);
  }
  .sample-totals {
    grid-template-columns: repeat(2, 1fr);
  }
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.detail-header-actions .secondary {
  font-size: 10px;
  padding: 7px 10px;
}
.standalone-detail-main {
  width: min(1100px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 28px;
}
.standalone-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.standalone-detail-heading small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #96a58b;
}
.standalone-detail-heading h1 {
  font-size: 27px;
  margin: 5px 0 0;
  letter-spacing: 0.5px;
}
.standalone-detail-content {
  background: #fafbf7;
  border: 1px solid #e0e7d9;
  border-radius: 12px;
  min-height: 220px;
}
.standalone-detail .detail-section {
  margin: 32px 0;
}
.standalone-detail .detail-title h3 {
  font-size: 23px;
}
.standalone-detail .detail-stat {
  padding: 18px;
}
.standalone-detail .detail-stat strong {
  font-size: 25px;
}
@media (max-width: 700px) {
  .standalone-detail-main {
    padding: 16px 12px;
  }
  .standalone-detail #detail-content {
    padding: 18px 14px;
  }
  .detail-header-actions {
    gap: 5px;
  }
  .drawer-top {
    gap: 10px;
  }
  .detail-header-actions .secondary {
    font-size: 9px;
    padding: 6px 7px;
  }
}

.asset-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  min-width: 0;
}
.asset-navigation .asset-up {
  font-size: 10px;
  padding: 6px 9px;
}
.asset-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: auto;
  white-space: nowrap;
  min-width: 0;
}
.asset-crumb {
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: #7a926a;
  font-size: 11px;
  padding: 4px 6px;
  white-space: nowrap;
}
.asset-crumb:hover {
  background: #edf3e6;
}
.asset-crumb[aria-current="page"] {
  color: #3c623f;
  font-weight: 600;
}
.asset-path-separator {
  color: #b1bda4;
  font-size: 12px;
}
.asset-content {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #e2e9da;
  border-radius: 7px;
  background: white;
}
.asset-content:has(> .asset-empty) {
  border: 0;
  background: transparent;
}
/* Current-folder tiles: images are thumbnails, folders remain navigable icons. */
.asset-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 12px;
}
.asset-tile {
  border: 1px solid #e4eade;
  background: white;
  border-radius: 7px;
  padding: 7px;
  min-width: 0;
  text-align: left;
  color: #4f6543;
  cursor: pointer;
}
.asset-tile:hover {
  border-color: #93ab80;
  box-shadow: 0 2px 10px #244b3610;
  background: #fbfdf7;
}
.asset-tile-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  background: #f4f7ef;
  border-radius: 5px;
  overflow: hidden;
}
.asset-tile-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.asset-tile-folder svg {
  width: 60%;
  max-width: 82px;
  height: auto;
}
.asset-tile-folder {
  background: #faf8ee;
}
.asset-tile-name {
  display: block;
  font-size: 10px;
  margin-top: 7px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.asset-tile-meta {
  display: block;
  font-size: 8px;
  color: #a0ad93;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.asset-tile-unavailable {
  font-size: 10px;
  color: #a5ae9c;
}
@media (max-width: 520px) {
  .asset-browser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }
  .asset-navigation {
    gap: 5px;
  }
}

.listings-table-scroll { overflow: auto; max-height: 480px; border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; }
.listings-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.listings-table th { position: sticky; top: 0; z-index: 1; background: var(--pale); text-align: left; white-space: nowrap; }
.listings-table td, .listings-table th { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.listings-table td:first-child { width: 56px; white-space: nowrap; }
.listings-table td:last-child { width: 100px; }
.listings-table td:nth-child(2) { overflow-wrap: anywhere; }
.listings-muted { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.listing-status { display: inline-block; color: var(--muted); white-space: nowrap; }
.listing-status-onsale, .listing-status-listed { color: var(--green); font-weight: 600; }
.listing-products { margin-top: 6px; }
.listing-products summary { cursor: pointer; color: var(--green); }
.listing-product { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.65; }
.listing-product p { margin: 4px 0; color: var(--muted); }
.listing-product small { color: var(--muted); }

#detail-platform-listings .sample-section-heading { gap: 12px; }
#detail-platform-listings h3 { white-space: nowrap; }
#detail-platform-listings select { width: auto; min-width: 120px; max-width: 180px; }

.download-center { width: min(720px, calc(100vw - 28px)); max-height: 85vh; border: 1px solid var(--line); border-radius: 14px; padding: 24px; color: var(--ink); background: var(--bg); overflow: auto; }
.download-center::backdrop { background: #16282055; }
.download-center-heading, .download-task-heading, .download-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.download-center-heading h2 { margin: 0; font-size: 19px; }
.download-description { color: var(--muted); font-size: 12px; }
.download-task { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.download-task-heading { align-items: flex-start; }
.download-task-heading strong { font-size: 13px; overflow-wrap: anywhere; }
.download-task p { margin: 10px 0; overflow-wrap: anywhere; }
.download-status { white-space: nowrap; color: var(--muted); font-size: 12px; }
.download-status-completed { color: var(--green); }
.download-status-failed, .download-error, #download-error { color: #a34734; }
.download-meta { flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.download-task progress { width: 100%; height: 7px; margin-top: 10px; accent-color: var(--green); }
.download-file { display: inline-block; margin-top: 12px; text-decoration: none; }
.download-columns { color: var(--muted); font-size: 11px; margin-top: 10px; }
.download-columns summary { cursor: pointer; }
@media(max-width: 600px) {
  .catalog-toolbar { flex-wrap: wrap; gap: 12px; }
  .table-controls { flex-wrap: wrap; }
  .download-center { padding: 16px; }
}

.product-media[role="button"] { cursor: pointer; }
.product-media[role="button"]:focus-visible { outline: 3px solid #98b99e; outline-offset: 3px; }
.product-gallery { inset: 0; margin: auto; width: min(1100px, calc(100vw - 28px)); height: min(820px, 90vh); max-width: calc(100vw - 28px); max-height: 90vh; border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); background: var(--bg); overflow: hidden; }
.product-gallery[open] { display: flex; flex-direction: column; }
.product-gallery::backdrop { background: #16282066; }
.gallery-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); flex: none; }
.gallery-heading h2 { margin: 0; font-size: 18px; }
.gallery-summary { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.gallery-content { padding: 20px 24px; overflow: auto; flex: 1; min-height: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 14px; }
.gallery-tile { padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); text-align: left; color: var(--ink); }
.gallery-tile:hover { border-color: #9eb7a6; }
.gallery-tile img { display: block; width: 100%; height: 170px; object-fit: contain; background: #fafbf8; border-radius: 5px; }
.gallery-path { display: block; margin-top: 8px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
@media(max-width: 600px) {
  .gallery-heading { padding: 15px; }
  .gallery-content { padding: 15px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .gallery-tile img { height: 140px; }
}

/* Always available list navigation and filter submission, outside both scroll areas. */
.catalog-page { --bottom-dock-height: 76px; padding-bottom: calc(var(--bottom-dock-height) + env(safe-area-inset-bottom, 0px)); }
.catalog-page .workspace { min-height: calc(100dvh - var(--bottom-dock-height)); }
.catalog-page aside { height: calc(100dvh - var(--bottom-dock-height) - env(safe-area-inset-bottom, 0px)); }
.bottom-dock { position: fixed; inset: auto 0 0; z-index: 35; display: grid; grid-template-columns: 246px minmax(0,1fr); min-height: var(--bottom-dock-height); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgb(250 251 247 / 96%); backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px #2238300a; }
.bottom-dock .apply-area { position: static; bottom: auto; display: flex; align-items: center; padding: 14px 19px; background: none; border-right: 1px solid var(--line); }
.bottom-dock .primary { white-space: nowrap; }
.bottom-dock .pagination { border-top: 0; gap: 16px; padding: 12px 24px; min-width: 0; color: var(--muted); }
.bottom-dock #page-info { white-space: nowrap; }
.bottom-dock .pagination-controls { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.bottom-dock .pagination select { min-height: 36px; padding: 6px 8px; font-size: 12px; color: var(--ink); }
.bottom-dock .page-button { width: 34px; height: 36px; flex: none; }
.page-jump { display: flex; align-items: center; gap: 7px; margin: 0; }
.page-jump input { width: 66px; min-height: 36px; margin: 0; padding: 6px; text-align: center; font-size: 12px; }
.page-jump input::-webkit-inner-spin-button, .page-jump input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.page-jump input[type="number"] { -moz-appearance: textfield; }
.page-jump #page-number { white-space: nowrap; font-size: 12px; }
.page-jump .secondary { min-height: 36px; padding: 6px 10px; margin: 0; font-size: 12px; }
@media(max-width: 1200px) {
  .bottom-dock { grid-template-columns: 222px minmax(0,1fr); }
  .bottom-dock .pagination { padding-inline: 16px; }
}
@media(max-width: 1100px) {
  .bottom-dock #page-info { display: none; }
}
@media(max-width: 800px) {
  .catalog-page { --bottom-dock-height: 112px; }
  .bottom-dock { grid-template-columns: 108px minmax(0,1fr); }
  .bottom-dock .apply-area { padding: 10px 8px; }
  .bottom-dock .primary { padding: 11px 8px; font-size: 12px; }
  .bottom-dock .primary span { display: none; }
  .bottom-dock .pagination { padding: 10px 12px; }
  .bottom-dock .pagination-controls { flex-wrap: wrap; justify-content: flex-end; width: 100%; gap: 7px; }
  .page-jump { order: 1; flex-basis: 100%; justify-content: flex-end; }
  .page-jump input { width: 52px; }
}
@media(max-width: 400px) {
  .bottom-dock { grid-template-columns: 92px minmax(0,1fr); }
  .bottom-dock .pagination { padding-inline: 8px; }
}

/* A native horizontal scrollbar stays with the bottom controls, not the last row. */
.catalog-page.has-horizontal-scroll { --bottom-dock-height: 100px; }
.bottom-dock .apply-area { grid-column: 1; grid-row: 1 / span 2; }
.bottom-dock .pagination { grid-column: 2; grid-row: 2; }
.bottom-table-scroll { grid-column: 2; grid-row: 1; padding: 7px 24px 0; min-width: 0; }
.bottom-table-scroll[hidden] { display: none; }
.fixed-horizontal-scroll { appearance: none; -webkit-appearance: none; display: block; height: 18px; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: grab; }
.fixed-horizontal-scroll:active { cursor: grabbing; }
.fixed-horizontal-scroll::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: #e6ece2; }
.fixed-horizontal-scroll::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; height: 12px; width: max(32px, var(--scroll-thumb-width, 50%)); border: 2px solid #e6ece2; border-radius: 6px; background: #8a9c81; }
.fixed-horizontal-scroll::-moz-range-track { height: 12px; border-radius: 6px; background: #e6ece2; }
.fixed-horizontal-scroll::-moz-range-thumb { box-sizing: border-box; height: 12px; width: max(32px, var(--scroll-thumb-width, 50%)); border: 2px solid #e6ece2; border-radius: 6px; background: #8a9c81; }
.fixed-horizontal-scroll:focus-visible { outline: 2px solid #98b99e; outline-offset: 2px; }
.catalog-page .table-scroll { scrollbar-width: none; }
.catalog-page .table-scroll::-webkit-scrollbar { height: 0; }
@media(max-width: 1200px) {
  .bottom-table-scroll { padding-inline: 16px; }
}
@media(max-width: 800px) {
  .catalog-page.has-horizontal-scroll { --bottom-dock-height: 136px; }
  .bottom-table-scroll { grid-column: 1 / -1; padding: 7px 12px 0; }
  .bottom-dock .apply-area { grid-row: 2; }
}
