/* NVIDIA design reference: black/white surfaces, #ccc rules and 2px controls.
   HighTac overrides: red accent and Microsoft YaHei sans-serif typography. */
:root {
  --red: #d42a1d;
  --red-bright: #ff6259;
  --red-dark: #a91d14;
  --black: #000;
  --ink: #1a1a1a;
  --white: #fff;
  --soft: #f7f7f7;
  --line: #ccc;
  --line-strong: #5e5e5e;
  --muted: #6b6b6b;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --shell: 1440px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --product-glass-blur: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--soft);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
img {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
h1, p { margin-top: 0; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px;
  background: var(--red); color: var(--white); font-weight: 700; transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  min-width: 100vw;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(247, 247, 247, 0.94) 24%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(135deg, #fff 0%, #ededed 32%, #9b0d06 66%, #2a0000 84%, #000 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms var(--ease), visibility 0s linear 180ms;
}
.splash-screen.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo-frame {
  width: min(82vw, 560px);
  aspect-ratio: 3;
  display: grid;
  place-items: center;
}
.splash-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.48));
}

.site-header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--black); }
.header-inner { min-height: 88px; display: grid; grid-template-columns: minmax(88px, 1fr) auto auto; align-items: center; gap: 32px; }
.brand-flow { width: max-content; display: flex; align-items: center; text-decoration: none; }
.logo-box { height: 68px; display: flex; align-items: center; justify-content: center; overflow: visible; background: var(--white); }
.logo-box img { display: block; width: auto; max-width: none; object-fit: contain; }
.yamamax-logo img { width: 230px; height: auto; max-height: 68px; }
.primary-tabs { height: 88px; display: flex; align-items: stretch; }
.primary-tabs button {
  position: relative; min-width: 112px; min-height: 44px; padding: 0 18px; border: 0;
  background: transparent; color: var(--black); font-weight: 700; cursor: pointer;
}
.primary-tabs button::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 4px; background: var(--red); transform: scaleX(0); transition: transform 160ms var(--ease); }
.primary-tabs button:hover::after, .primary-tabs button.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.export-control { position: relative; }
.header-actions > .export-control > button { min-width: 80px; min-height: 44px; padding: 0 14px; border: 2px solid var(--black); border-radius: 2px; font-size: 14px; font-weight: 700; cursor: pointer; }
.header-actions .export-primary { background: var(--black); color: var(--white); }
.header-actions .export-redacted { min-width: 96px; background: var(--white); color: var(--black); border-color: var(--red); }
.header-actions .access-control-button { min-width: 80px; min-height: 44px; padding: 0 12px; border: 2px solid var(--red); border-radius: 2px; background: var(--black); color: var(--white); font-size: 14px; font-weight: 700; cursor: pointer; }
.header-actions .logout-button { min-width: 64px; min-height: 44px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: 2px; background: var(--white); color: var(--black); font-size: 14px; font-weight: 700; cursor: pointer; }
.header-actions .logout-button:hover, .header-actions .logout-button:focus-visible { border-color: var(--red); color: var(--red-dark); }
.header-actions button:active { background: var(--red-dark); color: var(--white); border-color: var(--red-dark); }
.export-language-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; width: 128px; padding: 4px; border: 2px solid var(--black); border-radius: 2px; background: var(--white); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.export-language-menu[hidden] { display: none; }
.export-language-menu button { width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 0; background: var(--white); color: var(--black); text-align: left; font-size: 14px; font-weight: 700; cursor: pointer; }
.export-language-menu button:hover, .export-language-menu button:focus-visible { background: var(--black); color: var(--white); }

.read-only-notice { margin-top: 16px; padding: 12px 14px; border-left: 5px solid var(--red); background: var(--black); color: var(--white); font-size: 13px; font-weight: 700; line-height: 1.45; }

.access-control-panel { position: fixed; top: 104px; right: 24px; z-index: 80; width: min(calc(100vw - 48px), 400px); border: 2px solid var(--black); border-top: 5px solid var(--red); border-radius: 2px; background: var(--white); box-shadow: 0 20px 54px rgba(0,0,0,.28); }
.access-control-head { display: flex; justify-content: space-between; gap: 18px; padding: 18px; border-bottom: 1px solid var(--line); background: var(--soft); }
.access-control-head span { display: block; margin-bottom: 2px; color: var(--red-dark); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.access-control-head h2 { margin: 0; font-size: 20px; }
.access-control-head button { align-self: start; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); background: var(--white); font-size: 12px; font-weight: 700; cursor: pointer; }
.access-control-panel form { display: grid; gap: 14px; padding: 18px; }
.access-control-panel label { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.access-control-panel input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--red); }
.access-control-panel .blur-setting,
.access-control-panel .select-setting { justify-content: space-between; }
.access-control-panel .blur-input { width: 88px; height: 38px; padding: 0 8px; border: 1px solid var(--line-strong); background: var(--white); text-align: right; }
.access-control-panel select { min-width: 154px; height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); background: var(--white); color: var(--black); font: inherit; font-size: 13px; }
.access-control-save { min-height: 44px; margin-top: 4px; border: 2px solid var(--black); background: var(--black); color: var(--white); font-weight: 700; cursor: pointer; }
.access-control-panel p { min-height: 21px; margin: 0; color: var(--red-dark); font-size: 13px; font-weight: 700; }

.workspace-panel { padding-block: 24px 40px; }
.catalogue-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.catalogue-content { min-width: 0; }
.category-rail { position: sticky; top: 112px; max-height: calc(100vh - 136px); overflow: auto; border: 1px solid var(--line); border-radius: 2px; background: var(--white); }
.rail-head { position: sticky; top: 0; z-index: 2; min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; background: var(--black); color: var(--white); }
.rail-head span { min-width: 26px; height: 26px; display: grid; place-items: center; background: var(--red); color: var(--white); font-size: 12px; font-weight: 700; }
.category-list .category-item { position: relative; border-bottom: 1px solid var(--line); }
.category-list .category-select { width: 100%; min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: var(--white); text-align: left; cursor: pointer; }
.category-list .category-item .category-select { padding-right: 52px; }
.category-list .category-select:hover { background: var(--soft); }
.category-list .category-select.active { padding-left: 8px; border-left: 4px solid var(--red); background: var(--black); color: var(--white); }
.category-list .category-add { position: absolute; top: 50%; right: 4px; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: transparent; font-size: 0; transform: translateY(-50%); cursor: pointer; }
.category-list .category-add::before { content: "+"; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: var(--white); font-size: 20px; font-weight: 700; line-height: 1; }
.category-list .category-add:active::before { background: var(--red-dark); }
.category-list .category-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.category-list .all-category { grid-template-columns: 1fr; min-height: 48px; border-bottom: 1px solid var(--line); }
.category-score { display: grid; gap: 4px; font-size: 12px; line-height: 1.5; }
.score-line { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.score-label { color: var(--muted); font-weight: 700; }
.score-fraction { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; color: var(--black); }
.score-line:first-child .score-fraction { color: var(--red-dark); }
.score-current { font-weight: 700; white-space: nowrap; }
.score-separator { padding-inline: 3px; }
.score-limit { font-weight: 400; white-space: nowrap; }
.category-list .category-select.active .score-label { color: rgba(255,255,255,.7); }
.category-list .category-select.active .score-fraction { color: var(--white); }
.category-list .category-select.active .score-line:first-child .score-fraction { color: var(--red-bright); }

body.modal-open { overflow: hidden; }
.product-create-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.72); }
.product-create-dialog { position: relative; width: min(1240px, 100%); height: min(880px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--white); }
.product-create-head { position: relative; min-height: 112px; padding: 24px 32px; background: var(--black); color: var(--white); }
.product-create-corner { position: absolute; top: 0; left: 0; width: 12px; height: 12px; background: var(--red); }
.product-create-head p { margin: 0 0 4px; color: var(--red-bright); font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .08em; }
.product-create-head h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.25; }
.product-create-head > div > span { display: block; margin-top: 8px; color: rgba(255,255,255,.7); font-size: 14px; }
.product-create-dialog form { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; padding: 16px 24px 24px; }
.product-create-toolbar { min-height: 52px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-bottom: 0; padding: 4px 8px; background: var(--soft); }
.product-create-toolbar button { min-height: 44px; padding: 11px 13px; border: 2px solid var(--red); border-radius: 2px; background: transparent; color: var(--black); font-size: 14px; font-weight: 700; cursor: pointer; }
.product-create-toolbar span { color: var(--muted); font-size: 13px; }
.product-create-toolbar strong { min-width: 58px; color: var(--red-dark); text-align: right; font-size: 13px; }
.product-create-table-wrap { min-height: 0; overflow-x: scroll; overflow-y: auto; scrollbar-gutter: stable both-edges; border: 1px solid var(--line); }
.product-create-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.product-create-table th,
.product-create-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.product-create-table th { position: sticky; top: 0; z-index: 2; height: 44px; padding: 10px 12px; background: var(--black); color: var(--white); text-align: left; font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.product-create-table td { padding: 6px; background: var(--white); }
.product-create-table tbody tr:nth-child(even) td { background: var(--soft); }
.product-create-table th:first-child,
.product-create-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 54px; text-align: center; }
.product-create-table th:first-child { z-index: 3; }
.product-create-table td:first-child { background: var(--soft); font-weight: 700; }
.product-create-table th:nth-child(2), .product-create-table td:nth-child(2) { min-width: 180px; }
.product-create-table th:nth-child(3), .product-create-table td:nth-child(3),
.product-create-table th:nth-child(4), .product-create-table td:nth-child(4) { min-width: 190px; }
.product-create-table th:nth-child(5), .product-create-table td:nth-child(5),
.product-create-table th:nth-child(6), .product-create-table td:nth-child(6),
.product-create-table th:nth-child(12), .product-create-table td:nth-child(12) { min-width: 220px; }
.product-create-table th:nth-child(7), .product-create-table td:nth-child(7),
.product-create-table th:nth-child(8), .product-create-table td:nth-child(8) { min-width: 104px; }
.product-create-table th:nth-child(9), .product-create-table td:nth-child(9),
.product-create-table th:nth-child(10), .product-create-table td:nth-child(10),
.product-create-table th:nth-child(11), .product-create-table td:nth-child(11) { min-width: 112px; }
.product-create-table th:nth-child(13), .product-create-table td:nth-child(13) { min-width: 170px; }
.product-create-table th:last-child, .product-create-table td:last-child { min-width: 74px; border-right: 0; }
.product-create-table input:not([type="file"]),
.product-create-table textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--black); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.product-create-table input:not([type="file"]):focus,
.product-create-table textarea:focus { border: 2px solid var(--red); outline: 0; padding: 9px 11px; }
.product-image-upload { min-height: 44px; display: inline-flex; align-items: center; padding: 11px 13px; border: 2px solid var(--red); border-radius: 2px; background: transparent; color: var(--black); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.product-image-file { display: block; max-width: 150px; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-create-preview { width: 72px; height: 72px; display: block; margin-top: 6px; border: 1px solid var(--line); object-fit: contain; background: var(--soft); }
.product-create-remove { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--white); color: var(--red-dark); font-size: 20px; font-weight: 700; cursor: pointer; }
.product-create-status { min-height: 22px; margin: 10px 0 0; color: var(--red-dark); font-size: 14px; font-weight: 700; }
.product-create-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.product-create-actions button { min-width: 112px; min-height: 44px; padding: 11px 24px; border-radius: 2px; font-size: 16px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.product-create-close { border: 2px solid var(--red); background: transparent; color: var(--black); }
.product-create-save { border: 2px solid var(--red); background: var(--red); color: var(--white); }
.product-create-save:active { border-color: var(--red-dark); background: var(--red-dark); }
.product-create-actions button:disabled { border-color: var(--line); background: var(--soft); color: var(--muted); cursor: wait; }

.fx-notice { min-height: 44px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 9px 14px; background: var(--black); color: var(--white); }
.fx-notice > span { width: 12px; height: 12px; flex: 0 0 12px; background: var(--red); }
.fx-notice p { margin: 0; color: rgba(255,255,255,.78); font-size: 13px; }
.filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; margin-bottom: 20px; padding: 12px; border: 1px solid var(--line); background: var(--white); }
.search-field, .select-field { position: relative; display: block; }
.search-field svg { position: absolute; top: 12px; left: 14px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }
.search-field input, .select-field select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--black); }
.search-field input { padding: 0 16px 0 44px; }
.select-field select { padding: 0 40px 0 14px; }
.search-field input::placeholder { color: var(--muted); }
.search-field input:focus, .select-field select:focus { border-color: var(--red); outline: 3px solid var(--red); outline-offset: 2px; }
.results-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--black); }
.results-head h1 { margin: 0; color: var(--black); font-size: 24px; line-height: 1.25; }
.results-head p { margin: 0; color: var(--muted); font-size: 13px; }

.product-table-wrap {
  --new-price-width: 112px;
  --cny-price-width: 100px;
  --usd-price-width: 112px;
  --dzd-price-width: 120px;
  --qty-width: 96px;
  --remark-width: 200px;
  overflow: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  background: var(--white);
}
.product-table { width: 100%; min-width: 1200px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.product-table th { position: sticky; top: 0; z-index: 3; height: 48px; padding: 9px 12px; background: var(--black); color: var(--white); border-right: 1px solid var(--line-strong); text-align: left; font-size: 13px; }
.product-table tbody tr { --row-bg: var(--white); }
.product-table tbody tr:nth-child(even) { --row-bg: var(--soft); }
.product-table td { height: 82px; padding: 8px 12px; background: var(--row-bg); border-top: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.product-table .image-column { width: 80px; }
.product-table .code-column { width: 160px; }
html[lang="fr"] .product-table .code-column,
html[lang="fr"] .product-table .product-code { display: none; }
html[lang="fr"] .product-table .new-price-column { display: none; }
html[lang="zh-CN"] .product-table .usd-price-column,
html[lang="zh-CN"] .product-table .dzd-price-column { display: none; }
html[lang="fr"] .product-table { min-width: 1160px; }
html[lang="fr"] .product-table .name-column { width: 302px; }
html[lang="fr"] .product-table .spec-column { width: 150px; }
.product-table .name-column { width: 220px; }
.product-table .spec-column { width: 232px; }
.product-table .price-column { width: 100px; text-align: right; }
.product-table .usd-price-column { width: var(--usd-price-width); text-align: right; }
.product-table .dzd-price-column { width: var(--dzd-price-width); text-align: right; }
.product-table .new-price-column { width: var(--new-price-width); text-align: right; }
.product-table .quantity-column { width: var(--qty-width); }
.product-table .remark-column { width: var(--remark-width); }
.product-table th:nth-last-child(3), .product-table td:nth-last-child(3) { position: sticky; right: calc(var(--remark-width) + var(--qty-width)); width: var(--new-price-width); min-width: var(--new-price-width); z-index: 5; }
.product-table th:nth-last-child(2), .product-table td:nth-last-child(2) { position: sticky; right: var(--remark-width); width: var(--qty-width); min-width: var(--qty-width); z-index: 5; }
.product-table th:last-child, .product-table td:last-child { position: sticky; right: 0; width: var(--remark-width); min-width: var(--remark-width); z-index: 5; }
.product-table thead th:nth-last-child(-n + 3) { z-index: 9; background: var(--black); }
.product-table td:nth-last-child(3) { box-shadow: -8px 0 10px -10px rgba(0,0,0,.55); }
html[lang="fr"] .product-table .dzd-price-column {
  position: sticky;
  right: calc(var(--remark-width) + var(--qty-width));
  width: var(--dzd-price-width);
  min-width: var(--dzd-price-width);
  z-index: 5;
}
html[lang="fr"] .product-table .usd-price-column {
  position: sticky;
  right: calc(var(--remark-width) + var(--qty-width) + var(--dzd-price-width));
  width: var(--usd-price-width);
  min-width: var(--usd-price-width);
  z-index: 5;
}
html[lang="fr"] .product-table .price-column {
  position: sticky;
  right: calc(var(--remark-width) + var(--qty-width) + var(--dzd-price-width) + var(--usd-price-width));
  width: var(--cny-price-width);
  min-width: var(--cny-price-width);
  z-index: 5;
}
html[lang="fr"] .product-table th.dzd-price-column,
html[lang="fr"] .product-table th.usd-price-column,
html[lang="fr"] .product-table th.price-column {
  z-index: 9;
}
html[lang="fr"] .product-table td:nth-last-child(3) { box-shadow: none; }
html[lang="fr"] .product-table td.price-column { box-shadow: -8px 0 10px -10px rgba(0,0,0,.55); }
.product-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: auto;
  background: var(--white);
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
html[data-product-glass="2"] .product-thumb::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 2;
  pointer-events: none;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(var(--product-glass-blur));
  backdrop-filter: blur(var(--product-glass-blur));
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.no-image { color: var(--muted); text-align: center; }
.product-code { color: var(--red-dark); font-weight: 700; overflow-wrap: anywhere; }
.product-name { color: var(--black); font-weight: 700; }
.product-spec { color: var(--muted); white-space: pre-line; }
.product-price { text-align: right; white-space: nowrap; font-weight: 700; }
.product-price small { display: block; color: var(--muted); font-weight: 400; }
.order-new-price, .order-quantity, .order-remark { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--black); }
.order-new-price, .order-quantity { padding: 0 8px; text-align: right; }
.order-remark { padding: 0 10px; }
.order-readonly-value { width: 100%; min-height: 44px; display: flex; align-items: center; padding: 8px 10px; border: 1px solid var(--line); background: var(--soft); color: var(--black); white-space: pre-line; }
.order-readonly-value.numeric-value { justify-content: flex-end; text-align: right; font-weight: 700; }
.order-new-price:focus, .order-quantity:focus, .order-remark:focus { border-color: var(--red); outline: 3px solid var(--red); outline-offset: 1px; }

.pagination { min-height: 68px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); background: var(--white); }
.pagination p { margin: 0; color: var(--muted); font-size: 13px; }
.pagination-controls { display: flex; align-items: center; gap: 4px; }
.pagination button { min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--black); font-weight: 700; cursor: pointer; }
.pagination button:hover, .pagination button.active { border-color: var(--black); background: var(--black); color: var(--white); }
.pagination button:disabled { color: var(--muted); background: var(--soft); cursor: default; }
.page-buttons { display: flex; gap: 4px; }
.page-ellipsis { width: 34px; display: grid; place-items: center; color: var(--muted); }
.mobile-page { display: none; min-width: 72px; text-align: center; font-weight: 700; }
.page-jump { display: flex; align-items: center; gap: 6px; }
.page-jump label { color: var(--muted); font-size: 13px; }
.page-jump input { width: 64px; height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; text-align: center; }

.catalog-overview { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 12px; }
.review-badge { display: inline-flex; width: max-content; align-items: center; margin-top: 6px; padding: 3px 7px; border-radius: 2px; font-size: 11px; font-weight: 700; line-height: 1.35; }
.product-name .review-badge { display: flex; }
.review-pending { border: 1px solid #e6b95b; background: #fff7e7; color: #815609; }
.review-complete { border: 1px solid #b8d6c2; background: #edf7f0; color: #2c6240; }
.quota-note { font-size: 10px; font-weight: 400; }
.score-fraction .quota-note { flex-basis: 100%; white-space: normal; }
.product-reference { display: block; margin-top: 3px; color: var(--red-dark); font-size: 11px; font-weight: 500; }
.licence-content { min-width: 0; }
.licence-context { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 18px; margin-bottom: 16px; padding: 16px; border-left: 4px solid var(--red); background: var(--white); }
.licence-overview { margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.licence-notice { margin: 0; color: var(--muted); font-size: 13px; }
.licence-designation { min-width: 260px; }
.licence-designation small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.licence-notes { min-width: 240px; white-space: pre-line; color: var(--muted); }
.licence-toolbar { display: grid; grid-template-columns: 1fr minmax(300px, 520px) auto; align-items: center; gap: 18px; margin-bottom: 16px; }
.licence-toolbar h1 { margin: 0; font-size: 24px; }
.licence-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.declaration-table-wrap { overflow: auto; border: 1px solid var(--line); background: var(--white); }
.declaration-table { width: 100%; min-width: 1360px; border-collapse: separate; border-spacing: 0; }
.declaration-table th { position: sticky; top: 0; z-index: 2; height: 48px; padding: 10px 12px; background: var(--black); color: var(--white); border-right: 1px solid var(--line-strong); text-align: left; font-size: 13px; }
.declaration-table td { padding: 11px 12px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 14px; }
.declaration-table tbody tr:nth-child(even) { background: var(--soft); }
.numeric { text-align: right; white-space: nowrap; }
.category-link { min-height: 38px; padding: 0 11px; border: 1px solid var(--red); border-radius: 2px; background: transparent; color: var(--red-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.category-link:hover { background: var(--red); color: var(--white); }
.release-footer { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; padding: 0 0 12px; text-align: right; }
.release-version { color: var(--muted); font-size: 10px; line-height: 1; }

@media (min-width: 981px) {
  .catalogue-layout {
    grid-template-columns: clamp(220px, 18vw, 260px) minmax(0, 1fr);
    gap: clamp(12px, 1.4vw, 20px);
  }
  .product-table-wrap {
    --new-price-width: 11%;
    --usd-price-width: 10%;
    --dzd-price-width: 10%;
    --qty-width: 9%;
    --remark-width: 17%;
    overflow-x: hidden;
  }
  html[lang="fr"] .product-table-wrap {
    --cny-price-width: 12%;
    --usd-price-width: 10%;
    --dzd-price-width: 10%;
    --qty-width: 10%;
    --remark-width: 17%;
  }
  .product-table,
  html[lang="fr"] .product-table {
    width: 100%;
    min-width: 0;
  }
  .product-table .image-column { width: 8%; }
  .product-table .code-column { width: 12%; }
  .product-table .name-column { width: 16%; }
  html[lang="fr"] .product-table .name-column { width: 21%; }
  .product-table .spec-column { width: 17%; }
  html[lang="fr"] .product-table .spec-column { width: 12%; }
  .product-table .price-column { width: 10%; }
  .product-table th,
  .product-table td {
    padding-inline: clamp(4px, .6vw, 9px);
    font-size: clamp(12px, .85vw, 13px);
    overflow-wrap: anywhere;
  }
  .product-thumb {
    width: clamp(40px, 4.4vw, 60px);
    height: clamp(40px, 4.4vw, 60px);
  }
  .product-price { white-space: normal; }
  .order-new-price,
  .order-quantity,
  .order-remark { padding-inline: clamp(4px, .45vw, 8px); }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: minmax(182px, 1fr) auto auto; gap: 16px; }
  .primary-tabs button { min-width: 96px; padding-inline: 12px; }
  .catalogue-layout { grid-template-columns: 1fr; gap: 16px; }
  .category-rail { position: static; width: calc(100% + 48px); max-height: none; margin-inline: -24px; overflow: hidden; border-inline: 0; }
  .rail-head { display: none; }
  .category-list { display: flex; overflow-x: auto; }
  .category-list > .all-category,
  .category-list > .category-item { width: 280px; min-width: 280px; border-right: 1px solid var(--line); border-bottom: 0; }
  .category-list .category-select { width: 100%; min-width: 0; border-bottom: 0; }
  .category-list > .all-category { flex: 0 0 220px; width: 220px; min-width: 220px; }
  .category-list > .category-item { flex: 0 0 280px; }
  .category-list .category-select.active { padding-left: 12px; border-left: 0; border-bottom: 4px solid var(--red); }
}

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .header-inner { min-height: 116px; grid-template-columns: 1fr auto; grid-template-rows: 68px 48px; gap: 0 12px; }
  .logo-box { height: 48px; }
  .yamamax-logo img { width: 182px; max-height: 48px; }
  .primary-tabs { grid-column: 1 / -1; grid-row: 2; height: 48px; margin-inline: -16px; border-top: 1px solid var(--line); }
  .primary-tabs button { flex: 1; min-width: 0; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .header-actions > .export-control > button { min-width: 64px; padding-inline: 8px; }
  .header-actions .export-redacted { min-width: 88px; }
  .header-actions .access-control-button { min-width: 68px; padding-inline: 6px; }
  .header-actions .logout-button { min-width: 52px; padding-inline: 6px; }
  .access-control-panel { top: 128px; right: 16px; width: min(calc(100vw - 32px), 400px); }
  .workspace-panel { padding-block: 16px 28px; }
  .category-rail { width: calc(100% + 32px); margin-inline: -16px; }
  .fx-notice { margin-inline: -16px; margin-bottom: 10px; padding-inline: 16px; }
  .filter-bar { grid-template-columns: 1fr; margin-inline: -16px; padding-inline: 16px; border-inline: 0; }
  .results-head h1 { font-size: 21px; }
  .product-table-wrap { --new-price-width: 80px; --cny-price-width: 120px; --usd-price-width: 88px; --dzd-price-width: 96px; --qty-width: 72px; --remark-width: 96px; margin-inline: -16px; border-inline: 0; }
  html[lang="fr"] .product-table-wrap { --cny-price-width: 76px; --usd-price-width: 72px; --dzd-price-width: 86px; --qty-width: 64px; --remark-width: 88px; }
  .product-table { min-width: 1100px; }
  html[lang="fr"] .product-table { min-width: 1040px; }
  .product-table .image-column { width: 72px; }
  .product-table .code-column { width: 150px; }
  .product-table .name-column { width: 210px; }
  html[lang="fr"] .product-table .name-column { width: 338px; }
  .product-table .spec-column { width: 300px; }
  html[lang="fr"] .product-table .spec-column { width: 240px; }
  .product-table .price-column { width: 120px; }
  .product-table td { height: 72px; padding: 7px 9px; font-size: 13px; }
  .product-thumb { width: 56px; height: 56px; }
  .order-new-price, .order-quantity, .order-remark { font-size: 16px; }
  .pagination { grid-template-columns: 1fr; gap: 8px; margin-inline: -16px; border-inline: 0; }
  .pagination p { text-align: center; }
  .pagination-controls { justify-content: center; }
  .page-buttons { display: none; }
  .mobile-page { display: inline; }
  .page-jump { justify-content: center; }
  .licence-toolbar { grid-template-columns: 1fr; }
  .licence-context { grid-template-columns: 1fr; }
  .licence-toolbar .search-field { width: 100%; }
  .declaration-table-wrap { margin-inline: -16px; border-inline: 0; }
  .product-create-backdrop { padding: 0; }
  .product-create-dialog { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .product-create-head { min-height: 96px; padding: 18px 16px; }
  .product-create-head h2 { font-size: 22px; }
  .product-create-dialog form { padding: 0; }
  .product-create-toolbar { grid-template-columns: auto 1fr; gap: 8px 12px; padding: 8px 12px; border-inline: 0; }
  .product-create-toolbar span { grid-column: 1 / -1; font-size: 12px; }
  .product-create-toolbar strong { align-self: center; }
  .product-create-table-wrap { overflow-y: auto; overflow-x: hidden; padding: 12px; border: 0; background: var(--soft); }
  .product-create-table { width: 100%; min-width: 0; display: block; }
  .product-create-table thead { display: none; }
  .product-create-table tbody { display: grid; gap: 12px; }
  .product-create-table tbody tr { position: relative; display: grid; grid-template-columns: 1fr; padding: 12px; border: 1px solid var(--line); border-top: 3px solid var(--black); border-radius: 2px; background: var(--white); }
  .product-create-table tbody tr::before { content: ""; position: absolute; top: -3px; left: -1px; width: 12px; height: 12px; background: var(--red); }
  .product-create-table td,
  .product-create-table td:first-child { position: static; min-width: 0 !important; display: block; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: var(--white) !important; text-align: left; }
  .product-create-table td:first-child { margin-bottom: 2px; padding-top: 0; color: var(--red-dark); font-size: 13px; }
  .product-create-table td:last-child { border-bottom: 0; text-align: right; }
  .product-create-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--black); font-size: 12px; font-weight: 700; line-height: 1.25; }
  .product-create-table input:not([type="file"]),
  .product-create-table textarea { min-height: 46px; font-size: 16px; }
  .product-image-upload { width: 100%; justify-content: center; }
  .product-image-file { max-width: 100%; }
  .product-create-preview { width: 96px; height: 96px; }
  .product-create-status { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--white); }
  .product-create-actions { margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--white); }
  .product-create-actions button { flex: 1; }
}

html[data-catalog-layout="cards"] .product-table-wrap {
  overflow: visible;
  margin-inline: 0;
  border: 0;
  background: transparent;
}
html[data-catalog-layout="cards"] .product-table {
  display: block;
  width: 100%;
  min-width: 0;
}
html[data-catalog-layout="cards"] .product-table thead { display: none; }
html[data-catalog-layout="cards"] .product-table tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
html[data-catalog-layout="cards"] .product-table tbody tr {
  display: grid;
  grid-template-columns: 96px repeat(5, minmax(0, 1fr));
  grid-template-areas:
    "image name name name name name"
    "image specification specification specification specification specification"
    "cny cny usd usd dzd dzd"
    "quantity quantity quantity quantity quantity quantity"
    "remark remark remark remark remark remark";
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--black);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}
html[data-catalog-layout="cards"] .product-table tbody tr:nth-child(even) { --row-bg: var(--white); }
html[data-catalog-layout="cards"] .product-table td {
  position: static !important;
  right: auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  overflow-wrap: anywhere;
}
html[data-catalog-layout="cards"] .product-table td[data-card-label]::before {
  content: attr(data-card-label);
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
}
html[data-catalog-layout="cards"] .product-table .product-image-cell {
  grid-area: image;
  align-self: start;
}
html[data-catalog-layout="cards"] .product-table .product-code { grid-area: code; }
html[data-catalog-layout="cards"] .product-table .product-thumb {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
}
html[data-catalog-layout="cards"] .product-table .product-name {
  grid-area: name;
  color: var(--black);
  font-size: 16px;
  line-height: 1.35;
}
html[data-catalog-layout="cards"] .product-table .product-spec {
  grid-area: specification;
  align-self: start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
}
html[data-catalog-layout="cards"] .product-table .price-column,
html[data-catalog-layout="cards"] .product-table .usd-price-column,
html[data-catalog-layout="cards"] .product-table .dzd-price-column,
html[data-catalog-layout="cards"] .product-table .new-price-column {
  min-height: 62px !important;
  padding: 10px !important;
  border: 1px solid var(--line);
  background: var(--soft);
  text-align: left;
  white-space: normal;
}
html[data-catalog-layout="cards"] .product-table .price-column { grid-area: cny; }
html[data-catalog-layout="cards"] .product-table .usd-price-column { grid-area: usd; }
html[data-catalog-layout="cards"] .product-table .dzd-price-column { grid-area: dzd; }
html[data-catalog-layout="cards"] .product-table .new-price-column { grid-area: new-price; }
html[data-catalog-layout="cards"] .product-table .product-price small { display: inline; margin-left: 3px; }
html[data-catalog-layout="cards"] .product-table .quantity-column { grid-area: quantity; }
html[data-catalog-layout="cards"] .product-table .remark-column { grid-area: remark; }
html[data-catalog-layout="cards"] .product-table .order-quantity,
html[data-catalog-layout="cards"] .product-table .order-remark {
  min-height: 46px;
  border-color: var(--line-strong);
}
html[data-catalog-layout="cards"] .product-table .order-readonly-value { min-height: 46px; border-color: var(--line-strong); }
html[data-catalog-layout="cards"] .product-table .product-card-empty {
  display: block;
  grid-column: 1 / -1;
  padding: 28px;
  border-top-color: var(--red);
  text-align: center;
}

@media (max-width: 1180px) {
  html[data-catalog-layout="cards"] .product-table tbody { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  html[lang="zh-CN"] .header-inner { grid-template-columns: 1fr; grid-template-rows: 64px 48px 48px; min-height: 160px; }
  html[lang="zh-CN"] .header-actions { grid-column: 1; grid-row: 2; justify-content: flex-end; gap: 6px; }
  html[lang="zh-CN"] .primary-tabs { grid-row: 3; }
  html[lang="zh-CN"] .access-control-panel { top: 174px; }
}

@media (max-width: 720px) {
  html[data-catalog-layout="cards"] .product-table tbody { gap: 12px; }
  html[data-catalog-layout="cards"] .product-table tbody tr {
    grid-template-columns: 88px repeat(5, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
  }
  html[data-catalog-layout="cards"] .product-table .product-thumb {
    width: 88px;
    height: 88px;
  }
  html[data-catalog-layout="cards"] .product-table .product-name { font-size: 15px; }
  html[lang="zh-CN"][data-catalog-layout="cards"] .product-table tbody tr {
    grid-template-areas:
      "image code code code code code"
      "image name name name name name"
      "specification specification specification specification specification specification"
      "cny cny cny new-price new-price new-price"
      "quantity quantity quantity quantity quantity quantity"
      "remark remark remark remark remark remark";
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
