/* 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: #ead4ad;
}
.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,
.arrival-inline-table th {
  position: relative;
  user-select: none;
}
.staff-products .th-title,
.arrival-inline-table .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;
}
/* Chinese product names are sourced directly from COM and cannot be edited in HK. */
.sheet-editor.com-name-readonly,
.sheet-editor.com-name-readonly:hover,
.sheet-editor.com-name-readonly:focus {
  cursor: default;
  background: transparent;
  border-color: transparent;
  outline: none;
}
.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: #f3e3bd;
  overflow: hidden;
}
.recent-arrivals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: #e8cf99;
  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: #f8e7c4;
}
.recent-arrivals-table th {
  background: #5a1d27;
}
.recent-arrivals-table caption {
  background: #f3e3bd;
}
.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;
  }
}

/* V4.4 pricing utility row: compact restore + export settings */
.pricing-tools-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: stretch;
}
.pricing-restore-row,
.export-preferences {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pricing-restore-row { justify-content: space-between; }
.export-preferences { justify-content: flex-end; }
.pricing-tool-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.pricing-tool-copy b { white-space: nowrap; }
.pricing-tool-copy .small {
  line-height: 1.25;
  white-space: nowrap;
}
.pricing-restore-row button,
.export-preferences button {
  margin: 0;
  white-space: nowrap;
}
.export-currency-checks {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}
.export-currency-checks .check {
  margin: 0;
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .pricing-tools-row { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .pricing-restore-row,
  .export-preferences {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .pricing-tool-copy {
    width: 100%;
    flex-wrap: wrap;
  }
  .pricing-tool-copy .small { white-space: normal; }
  .export-currency-checks {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* 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: #f7e7c2;
  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;
}
/* Staff stock and incoming-stock headers must have identical sizing and color. */
.arrival-inline-table th {
  background: var(--wine);
}
.arrival-inline-table th,
.arrival-inline-table td {
  padding-left: 10px;
  padding-right: 10px;
}
.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: #efddb5;
  color: #4f4945;
  font-variant-numeric: tabular-nums;
}
.arrival-inline-table .arrival-com-placeholder {
  background: #efddb5;
  color: #8a7a64;
  font-variant-numeric: tabular-nums;
}
.arrival-inline-table .offer-qty-cell {
  background: #f7e3bd;
  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: #e9cd96 !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: #e9d09b;
  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: #f7e7c2;
}

