:root {
  --primary: #1C9D95;
  --primary-dark: #15837c;
  --bg: #F5F7FA;
  --card: #fff;
  --text: #333;
  --text-muted: #666;
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #FF4D4F;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--primary); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.logo { padding: 24px 20px; font-size: 20px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; gap: 10px; }
.logo .icon { width: 1.25em; height: 1.25em; }
.nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 20px; color: rgba(255,255,255,.85); font-size: 14px; transition: background .2s; }
.nav-item.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.nav-group { margin: 2px 0; }
.nav-group-title { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 20px; border: none; background: transparent; color: rgba(255,255,255,.9); font-size: 14px; cursor: pointer; text-align: left; transition: background .2s; }
.nav-group-title:hover { background: rgba(255,255,255,.1); }
.nav-group-label { display: flex; align-items: center; gap: 11px; }
.nav-group-arrow { width: .85em; height: .85em; opacity: .75; transition: transform .2s; }
.nav-group.open .nav-group-arrow { transform: rotate(180deg); }
.nav-sub { display: none; padding: 4px 0 6px; }
.nav-group.open .nav-sub { display: block; }
.nav-sub-item { display: block; padding: 9px 20px 9px 48px; color: rgba(255,255,255,.78); font-size: 13px; transition: background .2s, color .2s; }
.nav-sub-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-sub-item.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.nav-item span { line-height: 1.4; }
.nav-item .icon { opacity: .9; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 8px; }
.sidebar-footer span { display: flex; align-items: center; gap: 6px; }
.sidebar-footer a { display: inline-flex; align-items: center; gap: 4px; }
.sidebar-footer a { color: #fff; opacity: .9; }
.main-content { flex: 1; padding: 24px 32px; overflow: auto; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.page-header h1 .icon { color: var(--primary); }
.page-header--toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin-bottom: 12px;
}
.page-header--toolbar h1 { margin: 0; flex: 0 1 auto; }
.page-header--toolbar .btn { flex-shrink: 0; margin-left: auto; }
.page-header--toolbar .page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}
.page-header--stock-records {
  margin-bottom: 28px;
  gap: 20px 32px;
  row-gap: 20px;
}
.page-header--stock-records h1 {
  margin-right: 24px;
}
.page-header--stock-records .page-header-actions {
  margin-left: auto;
  padding-left: 16px;
}
.card h2, .card h3 { display: flex; align-items: center; gap: 8px; }
.card h2 .icon, .card h3 .icon { color: var(--primary); }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.quick-links .btn { display: inline-flex; align-items: center; gap: 6px; }
.form-hint { font-size: 13px; color: var(--text-muted); margin: 8px 0 12px; }
.form-actions { margin-top: 16px; display: flex; gap: 8px; }
.perm-item { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; cursor: pointer; }
.perm-item .perm-code { font-size: 11px; color: var(--text-muted); font-weight: normal; }
.perm-group { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #e8ecef; }
.perm-group:last-of-type { border-bottom: none; }
.perm-group-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: nowrap; }
.perm-group-header .perm-group-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  color: var(--text);
  display: block;
  flex-shrink: 0;
}
.perm-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  flex-shrink: 0;
}
.perm-group-actions-sep { margin: 0 4px; }
.btn-link { background: none; border: none; padding: 0; color: var(--primary, #2563eb); cursor: pointer; font-size: 13px; line-height: 1.5; vertical-align: baseline; }
.btn-link:hover { text-decoration: underline; }
.perm-group-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; }
.role-inherit-box { margin-bottom: 20px; padding: 12px 16px; background: #f0f7fa; border: 1px solid #d0e8f0; border-radius: 8px; }
.role-inherit-list { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.perm-inherit-codes { font-size: 12px; color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.empty-cell, .empty-tip { text-align: center; color: var(--text-muted); padding: 24px; }
.text-danger { color: var(--danger); }
.product-no-img { width: 100%; height: 140px; background: #f0f0f0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #bbb; gap: 8px; cursor: pointer; }
.product-no-img .icon { width: 2em; height: 2em; }
.product-card .meta { font-size: 13px; color: var(--text-muted); margin: 6px 0; }
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.bento-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-3 { grid-column: span 3; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card .label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.bento-card .value { font-size: 28px; font-weight: 700; color: var(--primary); }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2 { font-size: 16px; margin-bottom: 16px; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-secondary { background: #f0f2f5; color: var(--text); }
.btn-secondary:hover { background: #e4e7eb; }
.action-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.is-open { display: flex; }
.modal-box { background: var(--card); border-radius: 16px; width: 100%; max-width: 520px; box-shadow: 0 12px 40px rgba(0,0,0,.18); overflow: hidden; animation: modalIn .2s ease; }
.modal-box.modal-sm { max-width: 400px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 18px 20px; border-bottom: 1px solid #eee; font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
.confirm-body { text-align: center; padding: 8px 0 4px; }
.confirm-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: #fff7e6; color: var(--warning); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.confirm-text { font-size: 15px; color: var(--text); line-height: 1.6; }
.image-preview-overlay { background: rgba(0, 0, 0, 0.82); padding: 24px; }
.image-preview-body { position: relative; max-width: min(92vw, 960px); max-height: 92vh; display: flex; align-items: center; justify-content: center; }
.image-preview-body img {
  max-width: min(92vw, 960px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
  background: #fff;
}
.image-preview-close {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 22px;
  line-height: 34px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.image-preview-close:hover { background: #fff; color: var(--danger, #dc2626); }
.confirm-sub { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #fafafa; font-weight: 600; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.input-control,
.catalog-product-form input[type="text"],
.catalog-product-form input[type="number"],
.catalog-product-form input[type="file"],
.catalog-product-form select,
.catalog-product-form textarea,
.data-table input[type="text"],
.data-table input[type="number"],
.data-table input[type="file"],
.data-table select,
.data-table textarea,
.items-table input[type="text"],
.items-table input[type="number"],
.items-table select,
.items-table textarea,
.card table input[type="text"],
.card table input[type="number"],
.card table select,
.card table textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}
.data-table input[type="text"],
.data-table input[type="number"],
.data-table select,
.items-table input[type="text"],
.items-table input[type="number"],
.items-table select { min-width: 80px; }
.items-table .input-control--qty { width: 88px; min-width: 88px; }
.items-table .input-control--price { width: 110px; min-width: 110px; }
.spec-manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 12px 0; }
@media (max-width: 768px) { .spec-manage-grid { grid-template-columns: 1fr; } }
.spec-manage-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.spec-add-row { display: flex; gap: 10px; align-items: center; }
.spec-add-row .input-control { flex: 1; }
.spec-tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; min-height: 36px; }
.spec-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #e8f6f5; color: var(--primary-dark); border-radius: 8px; font-size: 13px; }
.spec-tag--hint { background: #f5f5f5; color: var(--text-muted); }
.spec-tag-remove { border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.spec-tag-remove:hover { color: var(--danger); }
.sku-readonly { color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.product-remark-row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: 20px 24px;
  align-items: start;
  margin: 8px 0 20px;
}
.product-images-col { min-width: 0; }
.product-remark-col { min-width: 0; }
.product-remark-col .form-group { margin-bottom: 0; }
.product-remark-textarea { min-height: 140px; resize: vertical; }
@media (max-width: 900px) {
  .product-remark-row { grid-template-columns: 1fr; }
}
.product-images-panel { margin: 0; }
.sku-table .sku-col-size { width: 100px; max-width: 150px; }
.sku-table .sku-col-size { width: 100px; max-width: 150px; }
.sku-table .sku-col-status { width: 78px; max-width: 98px; }
.sku-table .sku-col-sku-no { width: 200px; min-width: 180px; max-width: 240px; }
.sku-table .sku-col-stock { width: 130px; min-width: 120px; max-width: 150px; }
.sku-table .sku-col-images { min-width: 260px; width: auto; }
.sku-table .sku-col-sku-no .input-control,
.sku-table .sku-col-stock .input-control { width: 100%; max-width: 100%; box-sizing: border-box; }
.sku-table .sku-col-status .input-control { width: 100%; max-width: 100%; box-sizing: border-box; padding-left: 6px; padding-right: 6px; }
.field-with-hint { min-width: 0; }
.field-duplicate-hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--danger, #dc2626);
}
.input-control--duplicate { border-color: var(--danger, #dc2626) !important; }
.sku-col-sku-no .field-duplicate-hint { white-space: normal; word-break: break-word; }
.sku-images-cell { min-width: 0; }
.sku-images-cell .image-thumb-grid { margin-bottom: 4px; }
.sku-images-cell .product-img-thumb { width: 88px; }
.sku-images-cell .product-img-thumb img { width: 88px; height: 88px; }
.sku-images-cell .product-images-toolbar { margin-top: 0; }
.form-submit-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(255, 255, 255, 0.75); align-items: center; justify-content: center;
}
.form-submit-overlay.is-open { display: flex; }
.form-submit-overlay-box {
  text-align: center; padding: 28px 36px; background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); border: 1px solid #e8ecef;
}
.form-submit-overlay-box p { margin: 12px 0 0; font-size: 15px; color: var(--text); }
.form-submit-spinner {
  width: 40px; height: 40px; margin: 0 auto; border: 3px solid #e8ecef;
  border-top-color: var(--primary, #2563eb); border-radius: 50%;
  animation: form-spin 0.8s linear infinite;
}
@keyframes form-spin { to { transform: rotate(360deg); } }
.image-thumb-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; min-height: 40px; }
.image-thumb-empty { margin: 0; font-size: 13px; color: var(--text-muted); }
.product-images-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.product-img-thumb { position: relative; width: 88px; flex-shrink: 0; }
.product-img-thumb img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid #e8ecef; display: block; background: #f5f5f5; }
.product-img-thumb img.js-img-zoom { cursor: zoom-in; }
.product-img-thumb--new img { border-color: #b8d4e8; }
.product-img-thumb .img-thumb-badge { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; font-size: 10px; line-height: 1.4; color: #fff; background: rgba(37, 99, 235, 0.85); border-radius: 4px; }
.product-img-thumb .img-thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 16px; line-height: 20px; cursor: pointer;
}
.product-img-thumb .img-thumb-remove:hover { background: rgba(220, 38, 38, 0.9); }
.sku-images-td { min-width: 200px; }
.sku-images-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.sku-img-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); cursor: pointer; }
.sku-img-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; }
.sku-file-input { font-size: 12px; max-width: 160px; padding: 6px 8px !important; }
.unit-level-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #e8f6f5; color: var(--primary-dark); }
.unit-level-badge--sub { background: #f0f2f5; color: var(--text-muted); font-weight: 500; }
.spec-unit-table .spec-convert-cell { min-width: 200px; white-space: nowrap; vertical-align: middle; }
.spec-step-convert {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
  line-height: 1.4;
}
.spec-step-convert .spec-unit-cur,
.spec-step-convert .spec-unit-parent { font-weight: 600; color: var(--primary); flex-shrink: 0; }
.spec-step-convert .spec-per-parent { width: 72px; min-width: 56px; flex: 0 0 auto; margin: 0; }
.spec-step-convert > span { flex-shrink: 0; }
.spec-step-convert .js-remove-spec {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 6px 16px;
  min-width: 64px;
  white-space: nowrap;
}
.spec-base-hint { font-size: 13px; color: var(--text-muted); }
.spec-units-layout {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: 20px 24px;
  align-items: start;
  margin: 8px 0 16px;
}
.spec-units-main { min-width: 0; }
.spec-units-preview-col { min-width: 0; }
.spec-units-preview-col h3 { margin-top: 0; }
.spec-units-preview-col .unit-chain-preview {
  margin-top: 0;
  min-height: 160px;
}
@media (max-width: 1100px) {
  .spec-units-layout { grid-template-columns: 1fr; }
  .spec-units-preview-col .unit-chain-preview { min-height: 100px; }
}
.unit-chain-preview { padding: 14px 16px; background: #f8fafb; border: 1px solid #e8ecef; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.unit-chain-empty { color: var(--text-muted); margin: 0; font-size: 13px; }
.unit-chain-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.unit-chain-step { padding: 4px 10px; background: #fff; border-radius: 6px; border: 1px solid #e0e0e0; }
.unit-chain-arrow { color: var(--text-muted); font-size: 12px; }
.unit-chain-total { color: var(--text); margin-bottom: 6px; }
.unit-chain-example { color: var(--text-muted); }
.card h3 { font-size: 16px; font-weight: 600; margin: 20px 0 4px; color: var(--text); }
.card-subtitle { font-size: 14px; font-weight: 600; margin: 12px 0 8px; color: var(--text); }
/* 表格行内编辑：form 不参与布局，列与表头对齐 */
form.table-row-form { display: contents; }
.data-table td .input-control { min-width: 0; }
.data-table td .action-btns { flex-wrap: nowrap; }
.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-pending { background: #fff7e6; color: #d48806; }
.tag-approving { background: #e6f7ff; color: #096dd9; }
.tag-approved { background: #f6ffed; color: #389e0d; }
.tag-rejected { background: #fff1f0; color: #cf1322; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1C9D95 0%, #0d6b65 100%); }
.login-card { background: #fff; padding: 40px; border-radius: 16px; width: 380px; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.login-card h1 { text-align: center; color: var(--primary); margin-bottom: 24px; }
.login-copyright { margin-top: 20px; margin-bottom: 0; font-size: 12px; color: #999; text-align: center; line-height: 1.5; }
.error-msg { color: var(--danger); font-size: 13px; margin-bottom: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-items: stretch; }
.product-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; height: 100%; }
.product-card img { width: 100%; height: 140px; object-fit: cover; background: #f0f0f0; cursor: pointer; flex-shrink: 0; }
.product-card .product-title { cursor: pointer; display: block; margin-bottom: 4px; }
.product-card .product-title:hover { color: var(--primary); }
.product-card .product-info { display: flex; flex-direction: column; flex: 1; padding: 12px; min-height: 0; }
.product-card .product-body { flex: 1; }
.product-card .product-actions { margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f2f5; }
.product-card .product-actions .action-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.product-card .product-actions .product-action-row { display: flex; gap: 8px; width: 100%; }
.product-card .product-actions .product-action-row .btn { flex: 1; justify-content: center; text-align: center; }
.product-card .product-actions .btn-invisible { visibility: hidden; pointer-events: none; }
.modal-box.modal-lg { max-width: 920px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-box.modal-lg .modal-body { overflow: auto; flex: 1; }
.product-detail-head { display: flex; gap: 20px; margin-bottom: 20px; }
.product-detail-head img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid #eee; flex-shrink: 0; }
.product-detail-head .no-img { width: 120px; height: 120px; background: #f0f0f0; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #bbb; flex-shrink: 0; }
.product-detail-meta { flex: 1; font-size: 14px; line-height: 1.8; }
.product-detail-meta strong { font-size: 18px; display: block; margin-bottom: 8px; }
.product-detail-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid #eee; }
.product-detail-tab { padding: 10px 16px; cursor: pointer; font-size: 14px; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.product-detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.product-detail-panel { display: none; }
.product-detail-panel.active { display: block; }
.product-detail-table-wrap { max-height: 280px; overflow: auto; border: 1px solid #eee; border-radius: 8px; }
.product-detail-table-wrap table { margin: 0; }
.product-detail-table-wrap th { position: sticky; top: 0; z-index: 1; }
.product-detail-loading { text-align: center; padding: 40px; color: var(--text-muted); }
.product-edit-preview { max-width: 100%; max-height: 160px; border-radius: 8px; border: 1px solid #eee; display: block; }
.notice-content-preview { max-height: 120px; overflow: auto; white-space: pre-wrap; font-size: 13px; color: var(--text-muted); background: #fafafa; padding: 10px; border-radius: 8px; }
.tag-draft { background: #f5f5f5; color: #999; }
.tag-published { background: #f6ffed; color: #389e0d; }
.flash-error { background: #fff1f0; color: var(--danger); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash-success { background: #f6ffed; color: #389e0d; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash-message { transition: opacity .35s ease, transform .35s ease; }
.flash-message.is-hiding { opacity: 0; transform: translateY(-6px); pointer-events: none; }

.sku-stock-readonly { font-size: 13px; color: #999; white-space: nowrap; }
.sku-in-meta-cell { line-height: 1.5; }
.sku-in-attrs { color: #333; }
.sku-in-stock {
  display: inline-block;
  color: #15837c;
  font-size: 12px;
  line-height: 1.3;
  background: #e8f7f5;
  border: 1px solid #b8e8e3;
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 8px;
  white-space: nowrap;
  vertical-align: middle;
}
.sku-in-qty-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  width: 1%;
}
.sku-in-plus { font-size: 18px; font-weight: 600; color: #15837c; line-height: 1; flex-shrink: 0; }
.data-table .sku-in-qty-cell .sku-in-qty-input[type="number"] {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  flex: 0 0 72px;
  margin: 0;
  padding: 6px 8px;
  box-sizing: border-box;
}
.data-table .sku-in-qty-cell .sku-in-unit-select {
  width: auto;
  min-width: 96px;
  max-width: 120px;
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
  color: #15837c;
  background: #e8f7f5;
  border-color: #b8e8e3;
  box-sizing: border-box;
}
.sku-in-unit-tag { font-size: 13px; color: #15837c; flex-shrink: 0; white-space: nowrap; }
.link-teal { color: #15837c; text-decoration: none; font-weight: 500; }
.link-teal:hover { text-decoration: underline; }
.catalog-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.catalog-filter-grid .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }
.stock-records-table .col-time { white-space: nowrap; width: 150px; }
.stock-records-table .col-items { min-width: 280px; }
.stock-rec-item { font-size: 13px; line-height: 1.6; padding: 4px 0; border-bottom: 1px dashed #eee; }
.stock-rec-item:last-child { border-bottom: none; }
.stock-rec-sku { color: #15837c; font-weight: 600; margin-right: 6px; }
.stock-rec-attr { color: #666; margin-right: 8px; }
.stock-rec-qty em { color: #15837c; font-style: normal; font-weight: 500; }
.pagination-bar { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.stock-in-confirm-modal { max-width: 480px; }
.stock-in-confirm-lead { margin: 0 0 14px; font-size: 14px; color: #333; line-height: 1.6; }
.stock-in-confirm-product { background: #f8fafb; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.stock-in-confirm-label { display: block; font-size: 12px; color: #999; margin-bottom: 4px; }
.stock-in-confirm-val { font-size: 15px; font-weight: 600; color: #15837c; }
.stock-in-confirm-block { margin-bottom: 12px; }
.stock-in-confirm-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.stock-in-confirm-list li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 10px 12px; background: #e8f7f5; border: 1px solid #b8e8e3; border-radius: 8px; margin-bottom: 8px;
  font-size: 14px;
}
.stock-in-confirm-sku { font-weight: 600; color: #15837c; }
.stock-in-confirm-attr { color: #666; flex: 1; min-width: 0; }
.stock-in-confirm-qty { font-weight: 700; color: #1c9d95; white-space: nowrap; }
.stock-in-confirm-foot { margin: 0; font-size: 13px; color: #999; line-height: 1.5; }
/* 产品库列表 */
.catalog-products-card .table-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.catalog-products-table { width: 100%; min-width: 1080px; }
.catalog-products-table th,
.catalog-products-table td { vertical-align: middle; padding: 12px 10px; }
.catalog-products-table .col-id { width: 52px; }
.catalog-products-table .col-cover { width: 64px; }
.catalog-products-table .col-spu { white-space: nowrap; min-width: 100px; }
.catalog-products-table .col-name { min-width: 120px; max-width: 180px; }
.catalog-products-table .col-brand { white-space: nowrap; max-width: 100px; }
.catalog-products-table .col-skus { min-width: 480px; max-width: 640px; }
.catalog-products-table .col-stock { white-space: nowrap; min-width: 100px; }
.catalog-products-table .col-status { white-space: nowrap; width: 56px; }
.catalog-products-table .col-actions { white-space: nowrap; width: 1%; }
.catalog-list-cover {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e8ecef;
  cursor: zoom-in;
}
.catalog-sku-block { min-width: 0; }
.catalog-sku-block-head {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.catalog-sku-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
  max-height: 220px;
  overflow-y: auto;
}
.catalog-sku-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 8px;
  background: #f8fafb;
  border: 1px solid #e8ecef;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
}
.catalog-sku-item--off {
  background: #f5f5f5;
  border-color: #e0e0e0;
  opacity: 0.72;
}
.catalog-sku-item--zero {
  background: #fafafa;
  border-color: #ececec;
  color: #aaa;
}
.catalog-sku-item--zero .catalog-sku-no {
  color: #999;
  font-weight: 500;
}
.catalog-sku-item--zero .catalog-sku-attrs,
.catalog-sku-item--zero .catalog-sku-sep {
  color: #bbb;
}
.catalog-sku-item--zero .catalog-sku-stock {
  color: #c5c5c5;
}
.catalog-sku-item--off.catalog-sku-item--zero {
  background: #f3f3f3;
  opacity: 0.65;
}
.catalog-sku-no {
  font-weight: 600;
  color: var(--primary-dark);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-sku-sep {
  color: #c5cdd4;
  flex-shrink: 0;
}
.catalog-sku-attrs {
  color: var(--text);
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-sku-stock {
  margin-left: auto;
  padding-left: 4px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.catalog-sku-badge-off {
  flex-shrink: 0;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.3;
  color: #999;
  background: #eee;
  border-radius: 4px;
}
@media (max-width: 900px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } .sidebar { width: 180px; } }
