:root {
  --wine: #4a1822;
  --wine2: #6e2a3b;
  --gold: #aa8a51;
  --ink: #2a2728;
  --muted: #827a77;
  --cream: #faf7f2;
  --line: #e9e2d9;
  --green: #32735e;
  --red: #b34545;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font:
    14px/1.6 Arial,
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  transition: 0.18s;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  padding: 9px 15px;
  border-radius: 7px;
  color: var(--ink);
}
button:hover {
  border-color: var(--gold);
  background: #faf5ed;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--wine);
  color: white;
  border-color: var(--wine);
}
button.danger {
  color: var(--red);
}
a {
  color: var(--wine);
  text-decoration: none;
}
input,
select,
textarea {
  padding: 10px 12px;
  border: 1px solid #ded6cb;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  max-width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #cdb79288;
  border-color: var(--gold);
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  color: var(--ink);
}
label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
label.check input {
  width: auto;
  margin: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font:
    38px/1.3 Georgia,
    "Microsoft YaHei",
    serif;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 16px;
}
.eyebrow {
  color: var(--gold);
  letter-spacing: 3px;
  font-size: 11px;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.pill {
  display: inline-block;
  border-radius: 20px;
  background: #edf4ee;
  color: var(--green);
  padding: 3px 9px;
  font-size: 11px;
  white-space: nowrap;
}
.pill.warn {
  background: #fff0dd;
  color: #9a6728;
}
.pill.red {
  background: #fbe8e5;
  color: var(--red);
}
.demo {
  padding: 6px 20px;
  background: #eee2cc;
  color: #755728;
  text-align: center;
  font-size: 12px;
}
.topbar {
  background: #fffdf9;
  border-bottom: 1px solid var(--line);
  padding: 20px 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font:
    27px Georgia,
    serif;
  letter-spacing: 4px;
  color: var(--wine);
}
.logo small {
  display: block;
  font: 9px Arial;
  letter-spacing: 2px;
  color: var(--gold);
  margin-top: 3px;
}
.toplinks {
  display: flex;
  gap: 25px;
  align-items: center;
  font-size: 12px;
}
.public-wrap {
  max-width: 1450px;
  margin: auto;
  padding: 44px 5vw;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: center;
  margin-bottom: 36px;
}
.hero h1 {
  margin: 10px 0 16px;
}
.hero p {
  color: var(--muted);
  max-width: 650px;
}
.hero-card {
  background: var(--wine);
  color: white;
  padding: 26px 28px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.hero-card:after {
  content: "B";
  position: absolute;
  font: 170px Georgia;
  color: #ffffff09;
  right: -5px;
  bottom: -70px;
}
.hero-card strong {
  font: 36px Georgia;
  display: block;
}
.hero-card .muted {
  color: #d1b8b6;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 0;
}
.toolbar input.search {
  flex: 1;
  min-width: 220px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  background: #f3eee6;
  color: #827565;
  font-size: 11px;
  letter-spacing: 0.3px;
  font-weight: 600;
  padding: 13px 15px;
  white-space: nowrap;
}
td {
  padding: 16px 15px;
  border-bottom: 1px solid #f0ebe4;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fffcf7;
}
.product-name {
  min-width: 215px;
  max-width: 350px;
  font-weight: 600;
}
.ean {
  font: 11px/1.8 monospace;
  color: var(--muted);
  margin-top: 4px;
}
.price {
  font-weight: 700;
  color: var(--wine);
  white-space: nowrap;
  font-size: 16px;
}
.right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.table-action {
  font-size: 12px;
  padding: 6px 9px;
}
.footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
}

.public-footer {
  align-items: flex-start;
  gap: 34px;
  font-size: 14px;
  line-height: 1.65;
  color: #6f6560;
}
.public-footer > div {
  min-width: 0;
}
.footer-company {
  flex: 1.15;
}
.footer-company b,
.footer-company strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.footer-company p,
.footer-site-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.footer-contact {
  flex: 0.75;
}
.footer-contact span,
.footer-site-card span {
  display: block;
  margin-bottom: 4px;
  color: #8c817b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
}
.footer-contact b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.footer-wechat {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-wechat img {
  display: block;
  width: 168px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-sizing: border-box;
}
.footer-wechat-copy {
  min-width: 125px;
}
.footer-wechat-copy strong {
  display: block;
  color: var(--wine);
  font-size: 15px;
  line-height: 1.45;
}
.footer-wechat-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.footer-sites {
  flex: 1.45;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.footer-site-card {
  padding-left: 16px;
  border-left: 2px solid #d8c7b5;
}
.footer-site-card a {
  display: inline-block;
  color: var(--wine);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}
.footer-site-card a:hover {
  text-decoration: underline;
}

.footnote {
  font-size: 11px;
  margin-top: 20px;
  color: var(--muted);
}
.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--wine);
  color: #dfc9c7;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar .logo {
  color: #fff;
  padding: 0 13px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav {
  border: 0;
  text-align: left;
  background: transparent;
  color: #d3bdbc;
  padding: 12px 15px;
}
.nav:hover,
.nav.active {
  background: #ffffff14;
  border-color: transparent;
  color: white;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 14px;
  font-size: 12px;
}
.sidebar-bottom a {
  color: #e3c99f;
}
.admin-main {
  padding: 30px 36px;
  min-width: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.page-head h1 {
  font:
    27px Georgia,
    "Microsoft YaHei",
    serif;
  margin: 4px 0 6px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
}
.metric b {
  display: block;
  font: 29px Georgia;
  margin-top: 8px;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 25px;
  margin-bottom: 20px;
}
.notice {
  background: #f5ecde;
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  font-size: 12px;
  margin: 15px 0;
  color: #775f3f;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.empty {
  text-align: center;
  padding: 60px;
  color: var(--muted);
}
.login-wrap {
  max-width: 430px;
  margin: 70px auto;
  padding: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login-wrap label {
  margin-top: 18px;
}
.login-wrap button {
  width: 100%;
  margin-top: 24px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: 740px;
  max-width: 96vw;
  max-height: 92vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #24131844;
}
dialog::backdrop {
  background: #22101466;
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 22px 28px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h2 {
  margin: 0;
  font-size: 21px;
}
.modal-body {
  padding: 26px 28px;
}
.modal-body label {
  margin-bottom: 15px;
}
.modal-wide {
  width: 1100px;
}
.line-input {
  width: 90px;
}
.line-name {
  min-width: 200px;
  width: 100%;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  color: white;
  background: var(--wine);
  border-radius: 8px;
  z-index: 100;
  max-width: 90vw;
  box-shadow: 0 5px 20px #0002;
}
.error {
  color: var(--red);
  font-size: 13px;
}
.stock-gap {
  color: var(--red);
  font-weight: bold;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.total {
  font-size: 24px;
  font-family: Georgia;
  color: var(--wine);
  text-align: right;
  margin: 20px 0;
}
.audit-detail {
  max-width: 700px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  font: 11px monospace;
}
.mobile-only {
  display: none;
}
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-card {
    display: none;
  }
  .admin-shell {
    grid-template-columns: 170px 1fr;
  }
  .admin-main {
    padding: 24px 16px;
  }
  .sidebar {
    padding: 24px 8px;
  }
  .sidebar .logo {
    font-size: 20px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .toplinks {
    gap: 12px;
  }
  .public-wrap {
    padding: 30px 18px;
  }
}
@media (max-width: 650px) {
  .admin-shell {
    display: block;
  }
  .sidebar {
    padding: 14px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .nav {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px;
  }
  .sidebar-bottom {
    display: none;
  }
  .sidebar .logo {
    display: none;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .modal-body {
    padding: 18px;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 12px;
  }
  .footer {
    display: block;
  }
  .public-footer > div {
    margin-bottom: 18px;
  }
  .footer-wechat {
    align-items: flex-start;
  }
  .footer-wechat img {
    width: min(190px, 48vw);
  }
  .footer-sites {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  h1 {
    font-size: 30px;
  }
  .toplinks .hide-mobile {
    display: none;
  }
}

.pricing-panel {
  padding: 20px 24px;
}
.pricing-panel h3 {
  margin-bottom: 6px;
}
.pricing-controls {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.pricing-controls > label {
  min-width: 140px;
}
.pricing-controls button {
  margin-bottom: 0;
}
.rate-inputs {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex: 1;
}
.rate-inputs label {
  flex: 1;
  min-width: 170px;
}
.base-price {
  background: #faf1e2;
}
.quote-input {
  width: 110px;
  padding: 7px;
  text-align: right;
  font-weight: 600;
  color: var(--wine);
}
.save-quote {
  display: block;
  margin: 6px 0 0 auto;
  font-size: 11px;
}
.currency-cell {
  min-width: 95px;
}
.mobile-currency {
  display: none;
}
.staff-products .price {
  font-size: 14px;
}
.staff-products th,
.staff-products td {
  padding-left: 10px;
  padding-right: 10px;
}
.staff-products .product-name {
  min-width: 200px;
}
.staff-products .brand-cell {
  min-width: 105px;
}
@media (max-width: 650px) {
  .pricing-controls,
  .rate-inputs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}
.price-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.price-actions button {
  font-size: 10px;
  padding: 4px 6px;
  margin: 0;
}
.manual-tag {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #9a6728;
}
.restore-quote {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 10px;
}
.staff-products .currency-cell {
  min-width: 124px;
}

#arrivalPricing {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-top: 14px;
}
.arrival-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
#arrivalPricing:disabled {
  opacity: 0.65;
}
.arrival-price-grid .check {
  margin-top: 8px;
}
@media (max-width: 650px) {
  .arrival-price-grid {
    grid-template-columns: 1fr;
  }
}

/* The public site and the editor share the same quotation sheet columns. */
.public-wrap {
  max-width: 1720px;
  padding-left: 3vw;
  padding-right: 3vw;
}
.table-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.quote-table-wrap {
  border-radius: 6px;
}
.quote-table {
  font-size: 13px;
}
.quote-table caption {
  padding: 23px 18px;
  background: #fcfaf7;
  color: var(--wine);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 2px;
  border-bottom: 2px solid #b5965a;
  text-align: center;
}
.quote-table th {
  background: var(--wine);
  color: #fff;
  font-size: 12px;
}
.quote-table th,
.quote-table td {
  border-right: 1px solid var(--line);
  padding: 13px 12px;
  text-align: center;
}
.quote-table td {
  border-bottom: 1px solid var(--line);
}
.quote-table th:last-child,
.quote-table td:last-child {
  border-right: 0;
}
.quote-table tr:last-child td {
  border-bottom: 0;
}
.quote-table .brand-cell {
  min-width: 140px;
  max-width: 180px;
  text-align: center;
  color: var(--wine);
  font-weight: 600;
}
.quote-table .barcode-cell {
  min-width: 133px;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  white-space: nowrap;
  color: #171416;
}
.quote-table .product-name {
  min-width: 290px;
  max-width: 410px;
  text-align: left;
}
.quote-table .quantity-cell {
  min-width: 85px;
  font-variant-numeric: tabular-nums;
}
.quote-table .currency-cell {
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}
.quote-table .price {
  font-size: 14px;
}
.quote-table .year-cell {
  min-width: 85px;
  text-align: center;
  white-space: nowrap;
}
.quote-table .trace-cell {
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}
.quote-table .remark-cell {
  min-width: 130px;
  max-width: 240px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.quote-table .base-price {
  background: #f3e6cc;
  color: var(--wine);
}
.base-label {
  display: block;
  color: #806031;
  font-size: 10px;
}
.public-products {
  min-width: 1260px;
}
.public-products .brand-cell {
  background: #fcfaf7;
}
.product-details {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.product-details summary {
  cursor: pointer;
  color: #8d724b;
}
.product-details .dates-cell {
  padding-top: 7px;
}
.product-details .images-cell {
  margin-top: 5px;
}
.quote-table .arrival-row,
.quote-table .arrival-row .brand-cell {
  background: #f4e9d6;
}
.quote-table .arrival-label {
  font-size: 18px;
}
.quote-table .arrival-label span,
.quote-table caption span,
.th-en {
  display: block;
}
.quote-table caption span {
  margin-top: 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
}
.th-en {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.35px;
  opacity: 0.78;
}
.english-name {
  margin-top: 3px;
  color: #5f5856;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
}
.chinese-name {
  line-height: 1.45;
}
.quote-table .arrival-label span {
  margin-top: 3px;
  color: #806031;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.staff-products {
  table-layout: fixed;
}
.staff-products th,
.staff-products td,
.staff-products .brand-cell,
.staff-products .product-name,
.staff-products .currency-cell,
.staff-products .quantity-cell,
.staff-products .remark-cell,
.staff-products .year-cell,
.staff-products .trace-cell,
.staff-products .row-actions {
  min-width: 0;
  max-width: none;
}
.staff-products .source-stock {
  background: #faf8f4;
  color: #4f4945;
  font-variant-numeric: tabular-nums;
}
.staff-products .editing-row {
  background: #fffbf3;
}
.editing-row input:not([type="checkbox"]),
.editing-row textarea,
.editing-row select {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  text-align: center;
}
.editing-row .product-name textarea,
.editing-row .product-name label {
  text-align: left;
}
.editing-row .quantity-cell input[type="number"] {
  min-width: 95px;
  text-align: right;
}
.editing-row textarea {
  resize: vertical;
  min-height: 82px;
}
.editing-row .check {
  white-space: nowrap;
  margin-top: 6px;
  font-size: 11px;
}
.editing-row .table-action {
  margin-top: 5px;
}
.quote-input {
  font-variant-numeric: tabular-nums;
}
.arrival-admin {
  min-width: 1450px;
}
@media (max-width: 650px) {
  .public-wrap {
    padding: 24px 14px;
  }
  .quote-table caption {
    font-size: 21px;
    padding: 18px;
  }
  .public-products .product-name {
    min-width: 230px;
  }
}

.catalog-intro {
  margin-bottom: 4px;
}
.catalog-intro p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.catalog-intro p span,
.footer span {
  color: #978d87;
  font-size: 11px;
}
.toplinks small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.25px;
}
.staff-products .row-actions {
  position: static;
  background: #fffdf9;
  box-shadow: none;
}
.staff-products th:last-child {
  position: relative;
}


/* Excel-like stock editor */
.bridge-auto {
  margin: 0 0 18px;
}
.bridge-auto.bridge-ok {
  background: #edf5ef;
  border-left-color: var(--green);
  color: #315f50;
}
.bridge-auto.bridge-error {
  background: #fbeceb;
  border-left-color: var(--red);
  color: #8f3c3c;
}
.bridge-card {
  max-width: 980px;
}
.stock-loading-card {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 8px;
}
.stock-loading-card h3,
.stock-loading-card p {
  margin: 0;
}
.stock-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #ded3c5;
  border-top-color: var(--wine);
  border-radius: 50%;
  animation: stock-spin .85s linear infinite;
}
@keyframes stock-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .stock-loading-spinner { animation: none; }
}
.stock-load-error {
  border-color: #efd2d0;
}
.staff-products th {
  position: relative;
  user-select: none;
}
.staff-products .th-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 4;
  touch-action: none;
}
.col-resizer::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 4px;
  width: 1px;
  background: #ffffff66;
}
.col-resizer:hover::after {
  width: 2px;
  background: #fff;
}
.staff-products .sheet-cell {
  padding: 5px 6px;
}
.sheet-editor {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding: 6px 7px;
  color: inherit;
  font: inherit;
}
.sheet-editor:hover {
  border-color: #d9d0c4;
  background: #fffdf9;
}
.sheet-editor:focus {
  border-color: var(--gold);
  background: white;
  outline: 2px solid #cdb79255;
}
.sheet-brand,
.sheet-year,
.sheet-trace {
  text-align: center;
}
.sheet-name-cn {
  font-weight: 600;
  text-align: left;
}
.sheet-name-en {
  margin-top: 3px;
  color: #5f5856;
  font-size: 12px;
  text-align: left;
}
.sheet-name-cn,
.sheet-name-en,
.sheet-brand {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  resize: none;
  overflow: hidden;
  line-height: 1.45;
}
.brand-group-cell {
  vertical-align: middle;
  background: #fcfaf7;
}
.brand-group-cell .sheet-brand {
  min-height: 42px;
  text-align: center;
  font-weight: 700;
  color: var(--wine);
  display: block;
}
.sheet-remark {
  resize: vertical;
  min-height: 34px;
  line-height: 1.45;
  text-align: left;
}
.sheet-publish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
  white-space: nowrap;
}
.sheet-publish input {
  margin: 0;
}
.sheet-save-state {
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}
.sheet-save-state.saving {
  color: #8f6d31;
}
.sheet-save-state.saved {
  color: var(--green);
}
.sheet-save-state.error {
  color: var(--red);
}
.staff-products .brand-cell[title] {
  cursor: text;
}
.sheet-publish input.sheet-editor {
  width: auto;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
}

/* V1.6 stock table refinements */
.staff-products .unpublished-row .barcode-cell {
  background: #ecebea;
  color: #77716e;
}
.staff-products .currency-cell {
  text-align: center;
}
.price-editor,
.currency-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}
.price-editor {
  width: 100%;
}
.currency-symbol {
  flex: 0 0 auto;
  color: var(--wine);
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}
.currency-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.staff-products .quote-input {
  width: 82px;
  max-width: calc(100% - 30px);
  text-align: center;
}
.staff-products .price-actions {
  justify-content: center;
}
.staff-products .save-quote {
  margin: 6px auto 0;
}
.staff-products .restore-quote {
  display: block;
  margin: 3px auto 0;
}


/* V1.7 unpublished grouping and pricing reminder */
.unpublished-section-row td {
  padding: 0 !important;
  background: #f2f0ed;
  border-top: 2px solid #d4cbc2;
  border-bottom: 1px solid #d4cbc2;
}
.unpublished-toggle {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: #f2f0ed;
  color: #625b56;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.unpublished-toggle:hover {
  background: #eae7e3;
}
.unpublished-toggle b {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dfdbd6;
  text-align: center;
}
.unpublished-toggle small {
  margin-left: auto;
  color: #8a827d;
  font-weight: 500;
}
.staff-products .barcode-cell.needs-pricing {
  color: #c62828;
  font-weight: 800;
  background: #fff2f1;
}
.staff-products .unpublished-row .barcode-cell.needs-pricing {
  background: #ecebea;
  color: #c62828;
}

/* V1.8 quote Excel round-trip import */
.file-drop{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;padding:14px 16px;border:1px dashed #cdbfb1;border-radius:10px;background:#fbfaf8}.file-drop input{max-width:70%}.import-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}.import-summary>div{padding:12px;border:1px solid #e4dbd2;border-radius:8px;background:#fbfaf8}.import-summary span{display:block;color:#746a63;font-size:12px}.import-summary b{display:block;margin-top:4px;font-size:20px;color:#4a1822}.import-preview-table{max-height:440px;overflow:auto;margin-top:12px}.import-preview-table th{position:sticky;top:0;z-index:1}.import-change-row td{background:#fffdf8}.import-error-row td{background:#fff3f2}@media(max-width:720px){.import-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.file-drop{align-items:flex-start;flex-direction:column}.file-drop input{max-width:100%}}

/* V1.9 HK-local offer quantity + recent-arrival quotation section */
.staff-products .offer-qty-cell {
  background: #fffdf9;
  text-align: center;
}
.staff-products .sheet-offer-qty {
  width: 92px;
  max-width: calc(100% - 12px);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.staff-products .offer-qty-cell.qty-excess {
  background: #fff1ef;
}
.qty-warning {
  display: block;
  margin-top: 4px;
  color: #b42318;
  font-size: 10px;
  font-weight: 700;
}
.recent-arrivals-panel {
  margin-top: 22px;
  border: 1px solid #dfcda8;
  border-radius: 10px;
  background: #fbf4e4;
  overflow: hidden;
}
.recent-arrivals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: #f4e7c8;
  border-bottom: 1px solid #dfcda8;
}
.recent-arrivals-head h3 {
  margin: 0 0 4px;
  color: var(--wine);
}
.recent-arrivals-head p {
  margin: 0;
  color: #786744;
  font-size: 12px;
}
.recent-arrivals-empty {
  padding: 20px 18px;
  color: #7a6b4c;
}
.recent-arrivals-table,
.recent-arrivals-table td,
.recent-arrivals-table .brand-cell {
  background: #fff8e8;
}
.recent-arrivals-table th {
  background: #5a1d27;
}
.recent-arrivals-table caption {
  background: #fbf4e4;
}
.recent-arrivals-public {
  margin-top: 24px;
}
.public-stock-date {
  margin: 7px 0 0;
  color: var(--wine);
  font-size: 24px;
  line-height: 1.25;
}
@media (max-width: 720px) {
  .recent-arrivals-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V2.0 customer Excel currency visibility settings */
.export-preferences {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.export-currency-checks {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.export-currency-checks .check {
  margin: 0;
  white-space: nowrap;
}
.export-preferences button {
  margin: 0;
}
@media (max-width: 650px) {
  .export-preferences {
    align-items: stretch;
  }
  .export-currency-checks {
    width: 100%;
  }
}

/* V2.4 import price comparison */
.import-price-diffs{min-width:220px}
.import-price-diff{display:grid;grid-template-columns:42px minmax(64px,1fr) 18px minmax(64px,1fr);gap:6px;align-items:center;white-space:nowrap;margin:2px 0}
.import-price-diff b{font-size:12px}
.import-price-diff .diff-old{color:#777;text-decoration:line-through;text-decoration-thickness:1px}
.import-price-diff .diff-arrow{text-align:center;color:#9b7d5c}
.import-price-diff .diff-new{font-weight:700;color:#5a1520}

/* V2.8 recent-arrival bridge query/import status and source batches */
.arrival-query-status {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #ead9b7;
  border-radius: 8px;
  background: #fff9e9;
  color: #5b2a20;
  font-size: 13px;
}
.arrival-query-status.loading { opacity: .82; }
.arrival-query-status .warn-text {
  margin-top: 5px;
  color: #986a18;
  font-size: 12px;
}
.arrival-batch-header td {
  padding: 10px 12px !important;
  background: #f6e8bd !important;
  border-top: 2px solid #d9b567;
  border-bottom: 1px solid #dfc98f;
}
.arrival-batch-header.manual td { background: #f2eee7 !important; }
.arrival-batch-header td > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.arrival-batch-header td > button { float: right; }
.arrival-row-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.danger-text { color: #a2212b !important; }
.source-arrival-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #9b7a3d;
}

/* V2.9 recent-arrival table mirrors the main stock editing experience. */
.arrival-inline-table {
  table-layout: fixed;
}
.arrival-inline-table th,
.arrival-inline-table td,
.arrival-inline-table .brand-cell,
.arrival-inline-table .product-name,
.arrival-inline-table .currency-cell,
.arrival-inline-table .offer-qty-cell,
.arrival-inline-table .remark-cell,
.arrival-inline-table .year-cell,
.arrival-inline-table .trace-cell,
.arrival-inline-table .row-actions {
  min-width: 0;
  max-width: none;
}
.arrival-inline-table .source-stock {
  background: #f8efd9;
  color: #4f4945;
  font-variant-numeric: tabular-nums;
}
.arrival-inline-table .offer-qty-cell {
  background: #fff7e7;
  text-align: center;
}
.arrival-inline-table .sheet-offer-qty {
  width: 92px;
  max-width: calc(100% - 12px);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.arrival-inline-table .offer-qty-cell.qty-excess {
  background: #fff0ea;
}
.arrival-inline-table .currency-cell { text-align: center; }
.arrival-inline-table .arrival-quote-input {
  width: 82px;
  max-width: calc(100% - 30px);
  text-align: center;
}
.arrival-inline-table .price-actions { justify-content: center; }
.arrival-inline-table .arrival-save-quote { margin: 6px auto 0; }
.arrival-inline-table .arrival-restore-quote { display: block; margin: 3px auto 0; }
.arrival-inline-table .unpublished-row .barcode-cell {
  background: #e9e5dc;
  color: #77716e;
}
.arrival-inline-table .barcode-cell.needs-pricing {
  color: #c62828;
  font-weight: 800;
  background: #fff0e8;
}
.arrival-inline-table .unpublished-row .barcode-cell.needs-pricing {
  background: #e9e5dc;
  color: #c62828;
}
.arrival-inline-table .arrival-eta-cell,
.recent-arrivals-table .arrival-eta-cell {
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  color: #6d532a;
  background: #f4e6c3 !important;
  white-space: normal;
}

/* V3.0 compact recent-arrival separator + shared column sizing */
.compact-arrivals {
  margin-top: 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.recent-arrivals-divider {
  margin: 0;
  padding: 14px 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--wine);
  background: #f7ebca;
  border-top: 1px solid #dfcda8;
  border-bottom: 1px solid #dfcda8;
}
.recent-arrivals-divider span { display: inline-block; }
.recent-arrivals-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 0 4px;
}
.recent-arrivals-toolbar .actions { margin: 0; }
.compact-arrivals .arrival-query-status { margin: 6px 0 10px; }
.compact-arrivals .recent-arrivals-empty {
  border: 1px solid #ead9b7;
  background: #fff9e9;
}

/* V3.2 - public stock masthead aligned with BOSUNVA.com visual language */
.stock-hero {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  margin: 0 0 26px;
  padding: 34px 36px;
  background: #fffdf9;
  border: 1px solid #eadfd4;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.stock-hero::after {
  content: "";
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(181, 139, 72, .12));
}
.stock-hero-logo {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 34px;
  border-right: 1px solid #eadfd4;
}
.stock-hero-logo img {
  display: block;
  width: min(100%, 250px);
  height: auto;
  object-fit: contain;
}
.stock-hero-copy {
  min-width: 0;
}
.stock-hero-copy .eyebrow {
  margin-bottom: 10px;
  color: #9b7136;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.2px;
}
.public-stock-title {
  margin: 0;
  color: var(--wine);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(28px, 2.4vw, 42px);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.8px;
}
.stock-date-line {
  display: flex;
  align-items: baseline;
  gap: 13px;
  flex-wrap: wrap;
  margin: 14px 0 13px;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}
.stock-date-line span {
  color: #8f8279;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.stock-date-line strong {
  color: #2c2421;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .7px;
}
.stock-date-line em {
  color: #b0915f;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 1px;
}
.stock-hero-copy > p {
  max-width: 850px;
  margin: 0;
  color: #655a55;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px;
  line-height: 1.75;
}
.stock-hero-copy > p span {
  color: #9a8d85;
  font-size: 11px;
}
.stock-hero-tags {
  display: flex;
  gap: 10px 22px;
  flex-wrap: wrap;
  margin-top: 15px;
  color: #6d5d52;
  font: 700 10px/1.4 Arial, sans-serif;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.stock-hero-tags span {
  position: relative;
  padding-left: 12px;
}
.stock-hero-tags span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--gold);
}
@media (max-width: 820px) {
  .stock-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 24px 28px;
  }
  .stock-hero-logo {
    min-height: 0;
    justify-content: flex-start;
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid #eadfd4;
  }
  .stock-hero-logo img {
    width: min(72vw, 250px);
  }
  .public-stock-title {
    font-size: clamp(26px, 8vw, 34px);
  }
}

/* V3.3 - compact public masthead: keep the stock title only in the table caption */
.public-brand-logo {
  display: inline-flex;
  align-items: center;
  width: 230px;
  max-width: 34vw;
  min-height: 52px;
}
.public-brand-logo img {
  display: block;
  width: 100%;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}
.public-wrap > .toolbar:first-child {
  padding-top: 8px;
}
@media (max-width: 700px) {
  .public-brand-logo {
    width: 175px;
    max-width: 54vw;
  }
  .public-brand-logo img {
    max-height: 48px;
  }
}

/* V3.4 - official public landing hierarchy: one masthead, no duplicate table title */
.public-topbar {
  padding-top: 17px;
  padding-bottom: 17px;
  background: rgba(255, 253, 249, .97);
}
.public-wordmark {
  line-height: 1;
  text-decoration: none;
}
.public-contact-link {
  color: var(--wine);
  font-weight: 650;
  letter-spacing: .25px;
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 24, 34, .25);
  padding-bottom: 2px;
}
.public-contact-link:hover { border-bottom-color: var(--wine); }

.stock-hero {
  grid-template-columns: minmax(220px, 292px) minmax(0, 1fr);
  gap: 44px;
  margin: 0 0 30px;
  padding: 38px 42px 40px;
  background: linear-gradient(135deg, #fffdf9 0%, #fffaf3 100%);
  border-color: #e7dbcf;
  box-shadow: 0 12px 34px rgba(79, 50, 31, .035);
}
.stock-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--wine);
}
.stock-hero::after {
  left: 42px;
  right: 42px;
  height: 1px;
  background: linear-gradient(90deg, #b58b48 0%, rgba(181,139,72,.3) 48%, transparent 100%);
}
.stock-hero-logo {
  min-height: 138px;
  padding-right: 40px;
  border-right-color: #e7dbcf;
}
.stock-hero-logo img { width: min(100%, 270px); }
.stock-hero-copy .eyebrow {
  margin-bottom: 11px;
  color: #a3793f;
  font-size: 10px;
  letter-spacing: 3.8px;
}
.public-stock-title {
  font-size: clamp(31px, 2.55vw, 44px);
  font-weight: 700;
  letter-spacing: -1.1px;
}
.stock-date-line {
  width: fit-content;
  margin: 15px 0 14px;
  padding: 8px 13px 7px;
  border-top: 1px solid #e7dbcf;
  border-bottom: 1px solid #e7dbcf;
  background: rgba(255,255,255,.46);
}
.stock-date-line strong {
  font-size: 20px;
  letter-spacing: 1px;
}
.stock-date-line em { letter-spacing: 1.4px; }
.stock-hero-copy > p { font-size: 13px; line-height: 1.72; }
.stock-hero-copy > p span { font-size: 11.5px; }
.stock-hero-tags { margin-top: 17px; }

.public-controls {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid #eadfd4;
}
.public-controls .toolbar {
  padding: 0;
  gap: 10px;
}
.public-controls .toolbar input.search,
.public-controls .toolbar select {
  min-height: 46px;
  background: #fffefa;
  border-color: #ded3c8;
}
.public-controls .toolbar input.search:focus,
.public-controls .toolbar select:focus {
  border-color: #b99662;
  box-shadow: 0 0 0 2px rgba(185,150,98,.09);
}
.public-list-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  margin-top: 12px;
}
.public-list-meta #count {
  margin: 0;
  color: var(--wine);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}
.public-list-meta #count::before {
  content: "LIVE STOCK";
  display: inline-block;
  margin-right: 10px;
  padding: 3px 7px 2px;
  border: 1px solid #d7bd8e;
  color: #9c743b;
  font: 700 9px/1.2 Arial, sans-serif;
  letter-spacing: 1px;
  vertical-align: 1px;
}
.public-list-meta .table-hint {
  max-width: 760px;
  margin: 0;
  text-align: right;
  line-height: 1.65;
}
.public-products > thead > tr > th:first-child { border-top-left-radius: 4px; }
.public-products > thead > tr > th:last-child { border-top-right-radius: 4px; }

@media (max-width: 820px) {
  .stock-hero {
    gap: 18px;
    padding: 26px 24px 29px;
  }
  .stock-hero::after { left: 24px; right: 24px; }
  .stock-hero-logo { padding-bottom: 18px; }
  .public-list-meta { display: block; }
  .public-list-meta #count { margin-bottom: 8px; white-space: normal; }
  .public-list-meta .table-hint { text-align: left; }
}
