:root {
  --sea: #0a84b8;
  --sea-dark: #086a94;
  --green: #16856b;
  --gold: #a56f16;
  --red: #cf4057;
  --ink: #17313b;
  --muted: #667b84;
  --line: #dbe5e9;
  --soft: #f5f8fa;
  --card: #fff;
  --side: #12333f;
  --control-height: 36px;
}

body {
  color: var(--ink);
  background: #f4f7f9;
}

.layout {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 16px 12px 14px;
  background: #12333f;
  box-shadow: 6px 0 20px rgba(21, 52, 63, .1);
}

.sidebar::after { display: none; }

.side-brand {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 3px 7px 15px;
}

.side-logo {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  color: #0b526e;
  background: #dff5fc;
  box-shadow: none;
  font-size: 18px;
}

.side-brand strong { font-size: 18px; }
.side-brand span { margin-top: 4px; font-size: 10px; }

.side-menu {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: 10px;
  padding: 0 3px 18px 0;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
  scrollbar-width: thin;
}

.side-menu-group { display: grid; gap: 3px; }
.side-menu-group + .side-menu-group { margin-top: 12px; }

.side-menu-label {
  min-height: 25px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: rgba(219, 237, 243, .48);
  font-size: 10px;
  font-weight: 800;
}

.side-menu a {
  min-height: 38px;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 0 9px;
  border-radius: 6px;
  color: rgba(232, 244, 248, .78);
  font-size: 13px;
  font-weight: 700;
}

.side-menu a:hover { background: rgba(255, 255, 255, .07); }
.side-menu a.active {
  color: #fff;
  background: #0a7fae;
  box-shadow: none;
}

.side-menu i {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  color: #c9eef9;
  background: rgba(255, 255, 255, .07);
  font-size: 11px;
}

.side-menu a.active i {
  color: #0b678a;
  background: #e9f8fc;
}

.side-foot {
  margin-top: 0;
  padding: 11px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
}

.side-foot span { margin-top: 4px; line-height: 1.45; }

.topbar {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(260px, 520px) auto;
  gap: 18px;
  padding: 11px 24px;
  border-bottom-color: #dfe8ec;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 4px 16px rgba(31, 63, 75, .05);
}

.page-title { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }

.page-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #0a84b8;
  box-shadow: none;
  font-size: 13px;
}

.page-title h1 { font-size: 18px; }
.page-title p {
  max-width: 360px;
  overflow: hidden;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-global-search {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
}

.admin-global-search input {
  height: 38px;
  padding: 0 13px 0 36px;
  border-color: #d8e4e9;
  border-radius: 7px;
  background: #f5f8fa;
}

.admin-global-search::before {
  content: "⌕";
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 8px;
  color: #71868e;
  font-size: 18px;
  line-height: 20px;
}

.admin-global-search-results {
  position: absolute;
  z-index: 80;
  top: 44px;
  right: 0;
  left: 0;
  display: none;
  max-height: min(560px, calc(100vh - 92px));
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #d4e1e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(26, 59, 70, .16);
}

.admin-global-search-results.show { display: block; }
.admin-global-search-results section + section { margin-top: 7px; padding-top: 7px; border-top: 1px solid #edf2f4; }
.admin-global-search-results section > span { display: block; padding: 5px 8px; color: #82939a; font-size: 10px; font-weight: 800; }

.global-search-result {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 9px;
  align-items: center;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  color: #29434d;
  background: transparent;
  text-align: left;
  text-decoration: none;
}

.global-search-result:hover { background: #f0f7fa; }
.global-search-result i {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #0877a4;
  background: #e9f7fc;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.global-search-result strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result small { overflow: hidden; color: #748891; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-empty { padding: 22px 12px; color: #7c8f96; font-size: 12px; text-align: center; }

.top-actions { gap: 7px; flex-wrap: nowrap; }
.status-pill {
  min-height: 34px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.status-pill::before { width: 6px; height: 6px; box-shadow: none; }

.top-alert-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #d8e5e9;
  border-radius: 6px;
  color: #506871;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.top-alert-link b { min-width: 18px; color: #0a749e; text-align: center; }
.top-alert-link.has-alerts { border-color: #ecd49f; color: #855a12; background: #fffaf0; }
.top-alert-link.has-alerts b { color: #a4680b; }

.content {
  max-width: none;
  padding: 22px 24px 48px;
}

.page-head { margin-bottom: 16px; }
.page-head h2 { font-size: 21px; }
.page-head p { max-width: 820px; margin-top: 5px; color: #687e87; font-size: 13px; line-height: 1.55; }

.btn {
  min-height: var(--control-height);
  border-radius: 6px;
  padding: 0 13px;
  background: #0a84b8;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}
.btn:hover { background: #0875a4; }
.btn.light { color: #176b8c; border-color: #cfe0e7; background: #f6fafb; }
.btn.light:hover { border-color: #a9cad7; background: #edf6f9; }
.btn.secondary { background: #fff; }
.btn.warn { background: #ae7417; }
.btn.danger { background: #cf4057; }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 12px; }

input,
textarea,
select {
  border-color: #d6e2e7;
  border-radius: 6px;
  background: #fff;
}
input:focus,
textarea:focus,
select:focus { border-color: #61aeca; box-shadow: 0 0 0 3px rgba(10, 132, 184, .09); }

.stats { gap: 10px; margin-bottom: 16px; }
.stat {
  min-height: 92px;
  padding: 14px 15px;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}
.stat::after { display: none; }
.stat span { font-size: 11px; }
.stat strong { margin-top: 9px; font-size: 24px; }
.stat em { margin-top: 8px; font-size: 11px; }

.panel,
.module-card,
.insight-card {
  border-color: #dbe5e9;
  box-shadow: none;
}
.panel { margin-bottom: 16px; border-radius: 8px; }
.panel-head { padding: 15px 18px; background: #fff; }
.panel-head h2 { font-size: 16px; }
.panel-head p { margin-top: 3px; font-size: 12px; }
.panel-body { padding: 18px; }

.section-toolbar { padding: 14px 16px 0; }
.list-workbench {
  display: grid;
  grid-template-columns: minmax(180px, .42fr) minmax(0, 1.58fr);
  align-items: center;
  gap: 12px 16px;
  padding: 13px 16px;
  border-bottom: 1px solid #e4ecef;
  background: #fbfcfd;
}
.list-workbench-meta { display: grid; gap: 3px; }
.list-workbench-meta > span { color: #7a8c93; font-size: 10px; }
.toolbar-summary { font-size: 12px; }

.core-list-filter {
  width: 100%;
  display: grid;
  align-items: center;
  gap: 8px;
}
.core-list-filter input,
.core-list-filter select,
.core-list-filter .btn { width: 100%; min-width: 0; height: var(--control-height); }
.product-primary-filter { grid-template-columns: minmax(220px, 1.5fr) minmax(170px, 1fr) minmax(120px, .65fr) auto; }
.member-primary-filter { grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(120px, .72fr)) auto; }

.advanced-list-filter {
  grid-column: 2;
  display: none;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce7eb;
  border-radius: 7px;
  background: #f4f8fa;
}
.advanced-list-filter.show { display: grid; }
.advanced-list-filter select,
.advanced-list-filter input { width: 100%; min-width: 0; height: var(--control-height); }

.order-list-workbench {
  display: grid;
  grid-template-columns: auto auto minmax(300px, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 13px 16px;
  border-bottom: 1px solid #e4ecef;
  background: #fbfcfd;
}
.order-list-workbench .order-filter-presets { margin-left: 0; justify-content: flex-end; }
.order-list-workbench .order-primary-filter,
.order-list-workbench .order-advanced-filter { grid-column: 1 / -1; }

.entity-bulk-toolbar {
  display: grid;
  grid-template-columns: auto minmax(250px, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  margin: 10px 16px 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f7fafb;
}
.entity-bulk-selection,
.entity-bulk-primary,
.entity-bulk-secondary { display: flex; align-items: center; gap: 8px; min-width: 0; }
.entity-bulk-selection { padding-right: 14px; border-right: 1px solid #dce7eb; }
.entity-bulk-selection > span { color: #6d828a; font-size: 11px; white-space: nowrap; }
.entity-bulk-primary select {
  width: min(260px, 100%);
  min-width: 190px;
  height: 32px;
  min-height: 32px;
  padding: 0 34px 0 11px;
  line-height: normal;
}
.entity-bulk-secondary { justify-content: flex-end; }

.product-bulk-toolbar { grid-template-columns: auto minmax(430px, 1fr) auto; }
.product-bulk-toolbar .entity-bulk-primary { flex-wrap: wrap; }
.product-bulk-toolbar .product-bulk-direct-actions { display: flex; align-items: center; gap: 6px; }
.product-bulk-toolbar .product-bulk-more-actions { display: flex; align-items: center; gap: 6px; padding-left: 8px; border-left: 1px solid #dce7eb; }
.product-bulk-toolbar .product-bulk-more-actions select { min-width: 170px; }
.product-bulk-tool-card { display: flex; width: min(1180px, calc(100vw - 40px)); max-height: min(92vh, 900px); flex-direction: column; overflow: hidden; border-radius: 8px; }
.product-bulk-tool-card .modal-head { align-items: flex-start; }
.product-bulk-tool-card .modal-head,
.product-bulk-tool-card .modal-foot { flex: none; background: #fff; }
.product-bulk-tool-card .modal-head > div { display: grid; gap: 3px; }
.product-bulk-tool-card .modal-head p { margin: 0; color: #70858e; font-size: 12px; }
.product-bulk-tool-card .modal-foot { box-shadow: 0 -6px 18px rgba(28, 67, 82, .05); }
.product-bulk-tool-body { display: grid; min-height: 0; gap: 14px; overflow: auto; padding: 16px 18px; }
.product-bulk-selection-summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #d8e6ea; border-radius: 6px; color: #516b75; background: #f7fafb; font-size: 12px; }
.product-bulk-selection-summary strong { flex: none; color: #173d4b; font-size: 14px; }
.product-bulk-selection-summary span { display: -webkit-box; min-width: 0; overflow: hidden; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-bulk-preflight { display: none; padding: 12px; border: 1px solid #efc9bf; border-left: 4px solid #c75036; border-radius: 6px; background: #fff8f5; }
.product-bulk-preflight.show { display: grid; gap: 10px; }
.product-bulk-preflight-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.product-bulk-preflight-head > div { display: grid; gap: 2px; }
.product-bulk-preflight-head strong { color: #87341f; font-size: 14px; }
.product-bulk-preflight-head span,
.product-bulk-preflight > small { color: #8e655a; font-size: 11px; }
.product-bulk-preflight-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.product-bulk-preflight-list > div { display: grid; gap: 2px; min-width: 0; padding: 8px 10px; border: 1px solid #f0d8d1; border-radius: 4px; background: #fff; }
.product-bulk-preflight-list b { color: #563d36; font-size: 12px; overflow-wrap: anywhere; }
.product-bulk-preflight-list span { color: #8b5d51; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.product-bulk-panel { display: none; gap: 13px; }
.product-bulk-panel.show { display: grid; }
.product-bulk-pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(180px, .52fr); gap: 10px; padding: 13px; border: 1px solid #d7e5ea; border-radius: 6px; background: #f7fafb; }
.product-bulk-pricing-grid .field { min-width: 0; gap: 5px; }
.product-bulk-price-controls { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(128px, .72fr); gap: 8px; }
.product-bulk-value-control { position: relative; min-width: 0; }
.product-bulk-value-control input { height: 36px; min-height: 36px; padding-right: 36px; background: #fff; }
.product-bulk-value-control span { position: absolute; top: 50%; right: 11px; color: #607983; font-size: 11px; font-weight: 800; pointer-events: none; transform: translateY(-50%); }
.product-bulk-value-control.is-disabled input { color: #899ca4; background: #eef3f5; cursor: not-allowed; }
.product-bulk-value-control.is-disabled span { color: #a5b2b7; }
.product-bulk-pricing-grid select { height: 36px; min-height: 36px; }
.product-bulk-rule-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 13px; border: 1px solid #dce7eb; border-radius: 6px; background: #fbfcfd; }
.product-bulk-rule-grid .field.full { grid-column: 1 / -1; }
.product-bulk-rule-grid .field { gap: 5px; }
.product-bulk-rule-grid input,
.product-bulk-rule-grid select,
.product-bulk-inventory-head input,
.product-bulk-inventory-head select { height: 36px; min-height: 36px; }
.product-bulk-table-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-bulk-table-head > div { display: grid; gap: 2px; }
.product-bulk-table-head strong { color: #173d4b; font-size: 14px; }
.product-bulk-table-head span { color: #72868e; font-size: 11px; }
.product-bulk-table-head label { display: inline-flex; align-items: center; gap: 6px; color: #3d5964; font-size: 12px; font-weight: 800; white-space: nowrap; }
.product-bulk-table-wrap { max-height: clamp(220px, 36vh, 360px); overflow: auto; padding: 0; border: 1px solid #dce7eb; border-radius: 6px; }
.product-bulk-table-wrap table { min-width: 880px; }
.product-bulk-table-wrap th { top: 0; }
.product-bulk-table-wrap td { vertical-align: middle; }
.product-bulk-table-wrap th:first-child,
.product-bulk-table-wrap td:first-child { width: 64px; text-align: center; }
.product-bulk-table-wrap td strong { display: block; max-width: 240px; color: #244754; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.product-bulk-table-wrap td small { display: block; margin-top: 2px; color: #82949b; font-size: 10px; }
.product-bulk-check-cell { text-align: center; }
.product-bulk-number-cell { color: #163d4d; font-weight: 800; white-space: nowrap; }
.product-bulk-table-wrap select,
.product-bulk-table-wrap input[type="number"] { width: 150px; min-width: 110px; height: 34px; min-height: 34px; }
.product-bulk-table-wrap input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #168fbb; }
.product-bulk-table-wrap tr.is-disabled td { opacity: .54; background: #f6f7f8; }
.product-bulk-inventory-head { display: grid; grid-template-columns: minmax(180px, .35fr) minmax(360px, 1fr); gap: 12px; padding: 13px; border: 1px solid #dce7eb; border-radius: 6px; background: #fbfcfd; }
.product-bulk-inventory-head .field { gap: 5px; }
.product-bulk-inventory-note { padding: 10px 12px; border-left: 3px solid #38a27d; color: #45646e; background: #f0faf6; font-size: 11px; line-height: 1.65; }
.product-bulk-stock-value { color: #1e5366; font-weight: 900; white-space: nowrap; }
.product-bulk-stock-value span { color: #82949b; font-size: 10px; font-weight: 700; }

.bulk-toolbar input[type="checkbox"],
.product-card-check input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; margin: 0; }

.table-wrap { padding: 0 16px 14px; border-radius: 0; }
table { border-spacing: 0; border-collapse: separate; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px;
  border-bottom: 1px solid #dbe5e9;
  color: #6b8088;
  background: #f4f7f9;
  font-size: 11px;
}
td {
  padding: 11px 10px;
  border-top: 0;
  border-bottom: 1px solid #e4ecef;
  background: #fff;
  font-size: 13px;
}
td:first-child { border-left: 0; border-radius: 0; }
td:last-child { border-right: 0; border-radius: 0; }
tbody tr:hover td { background: #f7fbfc; border-color: #d7e6eb; }

.order-table-wrap { padding-top: 10px; }
.order-table th { background: #f2f7f9; }
.order-table td { border-bottom-color: #e1eaee; }
.order-row-actions { min-width: 88px; }

.product-admin-grid,
.member-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
  padding: 12px 16px 16px;
}
.product-admin-card,
.member-admin-card {
  border-color: #dbe5e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.product-card-cover { height: 148px; background: #eef3f5; }
.product-card-check { width: 30px; height: 30px; border-radius: 6px; box-shadow: none; }
.product-card-body,
.member-card-body { gap: 10px; padding: 13px; }
.product-card-title strong,
.member-card-title strong { font-size: 15px; }
.product-card-meta span,
.member-card-meta span { min-height: 48px; border-radius: 6px; background: #f4f8fa; }
.product-card-actions,
.member-card-actions { padding-top: 8px; border-top: 1px solid #edf2f4; }

.member-admin-card { grid-template-columns: 72px minmax(0, 1fr); min-height: 188px; }
.member-avatar-panel { padding: 14px 0 14px 13px; align-content: start; }
.member-avatar { width: 52px; height: 52px; border-radius: 8px; box-shadow: none; }

.admin-pagination,
.order-pagination { padding: 11px 16px 14px; border-top: 1px solid #edf2f4; font-size: 12px; }

.form-block { border-radius: 8px; background: #fff; box-shadow: none; }
.form-block-title strong::before { width: 3px; height: 16px; border-radius: 2px; background: #0a84b8; }

.page-section-nav {
  position: sticky;
  z-index: 8;
  top: 68px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  margin: 0 0 16px;
  padding: 7px;
  border: 1px solid #d9e5e9;
  border-radius: 7px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 22px rgba(30, 65, 76, .07);
  scrollbar-width: thin;
}

.page-section-nav :is(a, button) {
  min-height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 5px;
  color: #49636d;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.page-section-nav :is(a, button):hover { color: #0879a5; background: #edf7fa; }
.page-section-nav :is(a, button).active { color: #fff; background: #087fae; }
.page-section-nav :is(a, button).active b { color: #08709a; background: #fff; }
.page-section-nav b {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 5px;
  color: #0a739c;
  background: #e7f5f9;
  font-size: 10px;
}

#shipping-alerts,
#shipping-orphans,
#shipping-quote,
#shipping-cost,
#shipping-rules,
#shipping-waybill,
#finance-daily,
#finance-anomalies,
#finance-wechat-bills,
#finance-payments,
#finance-refunds,
.miniapp-config-panel .form-block { scroll-margin-top: 126px; }

.shipping-kpis,
.finance-kpis { grid-template-columns: repeat(8, minmax(105px, 1fr)); }
.qiniu-kpis { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.shipping-kpis .stat,
.finance-kpis .stat,
.qiniu-kpis .stat { min-width: 0; padding-right: 12px; padding-left: 12px; }
.shipping-kpis .stat strong,
.finance-kpis .stat strong,
.qiniu-kpis .stat strong { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }

.config-section-heading,
.after-sale-editor-heading {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  margin-top: 5px;
  padding: 10px 12px;
  border-left: 3px solid #0a84b8;
  background: #f2f8fa;
}

.config-section-heading:first-child,
.after-sale-editor-heading:first-child { margin-top: 0; }
.config-section-heading strong,
.after-sale-editor-heading strong { color: #234754; font-size: 13px; }
.config-section-heading span,
.after-sale-editor-heading span { color: #748991; font-size: 11px; line-height: 1.5; }

.after-sale-primary-filter { grid-template-columns: minmax(300px, 1.6fr) minmax(150px, .7fr) auto; }
.after-sale-table { min-width: 1280px; table-layout: fixed; }
.after-sale-table th:nth-child(1) { width: 170px; }
.after-sale-table th:nth-child(2) { width: 145px; }
.after-sale-table th:nth-child(3) { width: 220px; }
.after-sale-table th:nth-child(4) { width: 115px; }
.after-sale-table th:nth-child(5) { width: 145px; }
.after-sale-table th:nth-child(6) { width: 150px; }
.after-sale-table th:nth-child(8) { width: 112px; }
.after-sale-main-row.is-open td { background: #f5fafc; }
.after-sale-main-row.is-open td:first-child { box-shadow: inset 3px 0 0 #0a84b8; }
.after-sale-row-actions { display: grid; gap: 6px; }
.after-sale-row-actions .btn { width: 100%; }
.after-sale-detail-row td { padding: 0 14px 16px; background: #f5fafc; }
.after-sale-detail-panel { border-radius: 7px; box-shadow: 0 10px 26px rgba(25, 62, 73, .08); }
.after-sale-detail-panel .form-grid { gap: 12px; }
.after-sale-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #dfe9ed;
}
.after-sale-editor-actions span { min-width: 0; margin-right: auto; color: #70858d; font-size: 11px; }

.finance-primary-filter { grid-template-columns: minmax(320px, 1fr) auto; }
.storage-primary-filter { grid-template-columns: minmax(320px, 1.5fr) minmax(150px, .6fr) auto; }
.qiniu-config-panel .form-grid { align-items: start; }
.qiniu-config-panel .field.two input[readonly] { color: #4f6972; background: #f5f8f9; }
.storage-table { min-width: 1160px; table-layout: fixed; }
.storage-table th:nth-child(1) { width: 82px; }
.storage-table th:nth-child(2) { width: 250px; }
.storage-table th:nth-child(3) { width: 130px; }
.storage-table th:nth-child(4) { width: 180px; }
.storage-table th:nth-child(5) { width: 96px; }
.storage-table th:nth-child(6) { width: 104px; }
.storage-table th:nth-child(7) { width: 164px; }
.storage-table th:nth-child(8) { width: 166px; }
.storage-table td:nth-child(2) strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storage-table td:first-child img {
  width: 52px;
  height: 52px;
  display: block;
  border: 1px solid #d9e5e9;
  border-radius: 6px;
  background: #f4f8f9;
  object-fit: cover;
}
.storage-table td:last-child { white-space: nowrap; }
.storage-table td:last-child .btn + .btn { margin-left: 5px; }
.shipping-rule-grid { align-items: start; }
.miniapp-section-nav { margin-top: 2px; }
.miniapp-config-panel > .panel-body > .form-grid { align-items: start; }

.is-product-field-hidden { display: none !important; }
.product-editor-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #d8e5e9;
  border-radius: 6px;
  background: #f4f8f9;
}
.product-editor-mode-control > span { padding: 0 7px; color: #687f88; font-size: 11px; font-weight: 800; }
.product-editor-mode-control button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #526b75;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.product-editor-mode-control button.active { color: #fff; background: #087faa; box-shadow: 0 3px 9px rgba(8, 127, 170, .18); }
.model-value-grid { grid-template-columns: 1fr; }
.model-value-grid textarea { min-height: 84px; }
.model-media-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.model-media-control .btn { min-height: 36px; white-space: nowrap; }
.model-media-preview { width: min(240px, 100%); margin-top: 9px; }
.model-media-preview img { width: 100%; max-height: 150px; object-fit: contain; background: #f3f8fa; }
.model-editor-card { overflow: clip; }
.model-editor-card > summary { list-style: none; }
.model-editor-card > summary::-webkit-details-marker { display: none; }
.model-editor-summary {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  cursor: pointer;
}
.model-editor-summary:hover { background: #f7fafb; }
.model-editor-summary > div:first-child { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 9px; }
.model-editor-summary h2 { min-width: 0; margin: 0; overflow: hidden; color: #203f4b; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.model-editor-summary p { grid-column: 1 / -1; margin: 0; color: #73878f; font-size: 12px; }
.model-editor-card[open] .model-editor-summary { border-bottom: 1px solid #e0e9ec; background: #f9fbfc; }
.model-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e1e9ec;
}
.model-editor-toolbar > div:first-child { display: grid; gap: 2px; }
.model-editor-toolbar strong { color: #294954; font-size: 14px; }
.model-editor-toolbar span { color: #758990; font-size: 11px; }
.model-identity-grid { margin-bottom: 16px; }
.model-config-section { margin-top: 14px; padding-top: 15px; border-top: 1px solid #e1e9ec; }
.model-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.model-capability-grid > label {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dce7ea;
  border-radius: 6px;
  background: #fbfcfd;
  cursor: pointer;
}
.model-capability-grid input { margin-top: 3px; }
.model-capability-grid span { min-width: 0; display: grid; gap: 2px; }
.model-capability-grid strong { color: #31505b; font-size: 12px; }
.model-capability-grid small { color: #7a8d94; font-size: 10px; line-height: 1.45; }
.model-group-list { display: grid; gap: 6px; }
.model-group-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) 90px auto; gap: 7px; }
.model-field-list { display: grid; gap: 10px; }
.model-field-row { padding: 12px; border: 1px solid #dbe6e9; border-radius: 7px; background: #fafcfd; }
.model-field-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.model-field-row-head strong { color: #284955; font-size: 13px; }
.model-field-row-head span { color: #7a8e96; font-family: Consolas, monospace; font-size: 10px; }
.model-field-row-head .btn { margin-left: auto; }
.model-field-row-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.model-field-row-grid .field.two { grid-column: span 2; }
.model-field-row-grid textarea { min-height: 72px; }
.model-field-flags { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e3eaed; }
.model-field-flags label { display: inline-flex; align-items: center; gap: 5px; color: #516b75; font-size: 11px; font-weight: 700; }
.model-advanced-rules { margin-top: 15px; border-top: 1px solid #e1e9ec; }
.model-advanced-rules > summary { padding: 12px 0; color: #4e6a74; font-size: 12px; font-weight: 800; cursor: pointer; }

@media (max-width: 1500px) {
  .layout { grid-template-columns: 232px minmax(0, 1fr); }
  .topbar { grid-template-columns: minmax(200px, auto) minmax(240px, 420px) auto; }
  #clockText { display: none; }
  .content { padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: minmax(200px, 1fr) minmax(260px, 1fr); }
  .admin-global-search { max-width: none; justify-self: stretch; }
  .top-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .page-section-nav { position: static; }
  .shipping-kpis,
  .finance-kpis,
  .qiniu-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list-workbench { grid-template-columns: 1fr; }
  .order-list-workbench { grid-template-columns: 1fr 1fr; }
  .order-list-workbench .order-filter-presets { grid-column: 1 / -1; justify-content: flex-start; }
  .advanced-list-filter { grid-column: 1; }
  .product-primary-filter { grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) minmax(120px, .7fr) auto; }
  .member-primary-filter { grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(120px, .8fr)); }
  .member-primary-filter select:nth-of-type(3),
  .member-primary-filter .btn { grid-row: 2; }
  .after-sale-primary-filter,
  .finance-primary-filter,
  .storage-primary-filter { grid-template-columns: minmax(240px, 1fr) minmax(140px, .6fr) auto; }
  .finance-primary-filter { grid-template-columns: minmax(260px, 1fr) auto; }
  .entity-bulk-toolbar { grid-template-columns: 1fr; }
  .product-bulk-toolbar { grid-template-columns: 1fr; }
  .product-bulk-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-bulk-status-field { grid-column: 1 / -1; }
  .product-bulk-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-field-row-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-bulk-selection { padding: 0 0 8px; border-right: 0; border-bottom: 1px solid #dce7eb; }
  .entity-bulk-secondary { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .layout { display: block; }
  .sidebar { position: relative; height: auto; max-height: none; padding: 12px; }
  .side-foot { display: none; }
  .side-menu { max-height: none; overflow: visible; }
  .side-menu-group { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .side-menu-group + .side-menu-group { margin-top: 10px; }
  .side-menu-label { grid-column: 1 / -1; }
  .topbar { display: flex; padding: 12px 14px; }
  .admin-global-search { order: 2; width: 100%; }
  .top-actions { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .content { padding: 18px 12px 36px; }
  .product-bulk-tool-card { width: calc(100vw - 16px); max-height: 96vh; }
  .product-bulk-pricing-grid,
  .product-bulk-rule-grid,
  .product-bulk-inventory-head { grid-template-columns: 1fr; }
  .product-bulk-status-field { grid-column: auto; }
  .product-bulk-price-controls { grid-template-columns: 1fr; }
  .product-bulk-tool-card .modal-foot { align-items: stretch; flex-wrap: wrap; }
  .product-bulk-tool-card .modal-foot .modal-foot-note { width: 100%; margin-right: 0; }
  .product-bulk-tool-card .modal-foot .btn { flex: 1; }
  .product-bulk-preflight-head { align-items: stretch; flex-direction: column; }
  .product-bulk-preflight-list { grid-template-columns: 1fr; }
  .product-bulk-toolbar .entity-bulk-primary,
  .product-bulk-toolbar .product-bulk-direct-actions,
  .product-bulk-toolbar .product-bulk-more-actions { width: 100%; align-items: stretch; }
  .product-bulk-toolbar .product-bulk-direct-actions { overflow-x: auto; }
  .product-bulk-toolbar .product-bulk-more-actions { padding: 8px 0 0; border-top: 1px solid #dce7eb; border-left: 0; }
  .page-head { align-items: stretch; }
  .page-head .actions { justify-content: flex-start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shipping-kpis,
  .finance-kpis,
  .qiniu-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-section-nav { margin-right: -2px; margin-left: -2px; }
  .list-workbench { padding: 12px; }
  .order-list-workbench { grid-template-columns: 1fr; padding: 12px; }
  .order-list-workbench .order-density-control,
  .order-list-workbench .order-filter-presets { grid-column: 1; }
  .product-primary-filter,
  .member-primary-filter,
  .after-sale-primary-filter,
  .finance-primary-filter,
  .storage-primary-filter,
  .advanced-list-filter { grid-template-columns: 1fr; }
  .member-primary-filter select:nth-of-type(3),
  .member-primary-filter .btn { grid-row: auto; }
  .entity-bulk-primary,
  .entity-bulk-secondary { align-items: stretch; flex-direction: column; }
  .entity-bulk-primary select { width: 100%; }
  .product-admin-grid,
  .member-card-grid { grid-template-columns: 1fr; padding: 10px 12px 14px; }
  .after-sale-editor-actions { align-items: stretch; flex-wrap: wrap; }
  .after-sale-editor-actions span { width: 100%; margin: 0 0 4px; }
  .after-sale-editor-actions .btn { flex: 1; }
  .product-editor-mode-control { width: 100%; }
  .product-editor-mode-control button { flex: 1; }
  .model-editor-summary,
  .model-editor-toolbar { align-items: flex-start; flex-direction: column; }
  .model-editor-summary .button-group,
  .model-editor-toolbar .button-group { width: 100%; justify-content: flex-start; }
  .model-capability-grid,
  .model-field-row-grid { grid-template-columns: 1fr; }
  .model-field-row-grid .field.two { grid-column: 1; }
  .model-group-row { grid-template-columns: 1fr 1fr; }
  .model-group-row .btn { width: 100%; }
  .model-media-control { grid-template-columns: 1fr; }
  .model-media-control .btn { width: 100%; }
}

/* Product editor workspace */
body.product-editor-route { overflow: hidden; }
.product-editor-workspace {
  z-index: 80;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #eef3f5;
}
.product-editor-workspace .modal-card.product-editor-card {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr) 58px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.product-editor-topbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #dfe8eb;
  background: #fff;
}
.product-editor-topbar-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.product-editor-topbar-main > div { min-width: 0; display: grid; gap: 2px; }
.product-editor-topbar-main span { color: #73878f; font-size: 11px; font-weight: 800; }
.product-editor-topbar-main h2 { overflow: hidden; margin: 0; color: #173945; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.product-editor-back {
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid #d3e1e5;
  border-radius: 6px;
  color: #31515c;
  background: #fff;
  font-size: 21px;
  cursor: pointer;
}
.product-editor-back:hover { border-color: #7bbbd1; color: #087faa; background: #f3fafc; }
.product-editor-topbar .product-draft-status { margin: 0; white-space: nowrap; }
.product-editor-topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.product-editor-workspace .product-editor-workbench {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) 292px;
  grid-template-areas: "steps form status";
  padding: 0;
  overflow: hidden;
  background: #f4f7f8;
}
.product-editor-workspace .product-editor-nav {
  grid-area: steps;
  position: static;
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  padding: 22px 14px;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid #dfe8eb;
  border-radius: 0;
  background: #f9fbfc;
  box-shadow: none;
  backdrop-filter: none;
}
.product-editor-nav-title { padding: 0 9px 9px; color: #7d9098; font-size: 11px; font-weight: 900; }
.product-editor-workspace .product-editor-tab {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #47626c;
  background: transparent;
  text-align: left;
}
.product-editor-workspace .product-editor-tab > span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e2e6;
  border-radius: 50%;
  color: #76909a;
  background: #fff;
  font-size: 10px;
}
.product-editor-workspace .product-editor-tab strong { min-width: 0; color: inherit; font-size: 13px; }
.product-editor-workspace .product-editor-tab small { overflow: hidden; color: #8a9da4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-editor-workspace .product-editor-tab:hover { border-color: #d3e4e9; background: #f0f7f9; }
.product-editor-workspace .product-editor-tab.active { border-color: #a9d7e5; color: #087ba5; background: #eaf7fb; }
.product-editor-workspace .product-editor-tab.active > span { border-color: #168fbb; color: #fff; background: #168fbb; }
.product-editor-workspace .product-editor-tab.complete:not(.active) > span { border-color: #3ba67f; color: #24775d; background: #e9f8f2; }
.product-editor-workspace .product-editor-tab.complete small { color: #287b61; }
.product-editor-workspace > .product-editor-hero,
.product-editor-workspace .product-editor-hero {
  grid-area: status;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 20px 16px;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid #dfe8eb;
  border-radius: 0;
  background: #f9fbfc;
  box-shadow: none;
}
.product-editor-workspace .product-editor-title { gap: 5px; }
.product-editor-workspace .product-editor-title > span { min-height: 24px; padding: 0 8px; border-radius: 4px; }
.product-editor-workspace .product-editor-title h3 { font-size: 17px; }
.product-editor-workspace .product-editor-title p { color: #65808a; font-size: 12px; }
.product-editor-workspace .product-editor-scorebox { gap: 9px; padding: 13px; border: 1px solid #dce7ea; border-radius: 6px; box-shadow: none; }
.product-editor-workspace .product-editor-scorebox strong { font-size: 24px; }
.product-editor-workspace .product-editor-mode-control { width: 100%; }
.product-editor-workspace .product-editor-mode-control button { flex: 1; }
.product-editor-tools { border: 1px solid #dce7ea; border-radius: 6px; background: #fff; }
.product-editor-tools summary { padding: 10px 12px; color: #46636e; font-size: 12px; font-weight: 900; cursor: pointer; }
.product-editor-tools .product-editor-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 10px 10px; }
.product-editor-tools .btn { min-width: 0; justify-content: center; }
.product-editor-workspace .product-editor-insights { display: grid; grid-template-columns: 1fr; gap: 7px; }
.product-editor-workspace .editor-insight-card { min-height: 0; padding: 10px 11px; border-radius: 6px; box-shadow: none; }
.product-editor-workspace .product-edit-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.product-editor-workspace .check-chip { min-width: 0; min-height: 26px; padding: 0 7px; overflow: hidden; border-radius: 4px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-editor-workspace .form-grid {
  grid-area: form;
  min-width: 0;
  min-height: 0;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
  padding: 24px max(24px, 3vw) 72px;
  overflow-y: auto;
  background: #fff;
}
.product-editor-workspace .product-section-title { display: none; }
.product-editor-workspace .is-product-step-hidden { display: none !important; }
.product-step-intro {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4ecef;
}
.product-step-intro > span { min-width: 56px; padding: 6px 8px; border-radius: 4px; color: #087ca8; background: #e9f7fb; font-size: 11px; font-weight: 900; text-align: center; }
.product-step-intro > div { display: grid; gap: 2px; }
.product-step-intro strong { color: #183b48; font-size: 20px; }
.product-step-intro p { margin: 0; color: #738992; font-size: 12px; }
.product-editor-workspace .field > label,
.product-editor-workspace .field-title label { color: #34525d; font-size: 12px; }
.product-editor-workspace .field input,
.product-editor-workspace .field select,
.product-editor-workspace .field textarea { border-radius: 6px; }
.product-editor-workspace .field textarea { min-height: 92px; }
.product-main-image-field { grid-column: 1 / -1; }
.product-main-image-preview {
  width: min(320px, 100%);
  aspect-ratio: 1 / .72;
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e5e9;
  border-radius: 6px;
  background: #f3f7f8;
}
.product-main-image-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.product-main-image-preview > button {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(27, 45, 52, .72);
  font-size: 19px;
  cursor: pointer;
}
.product-editor-workspace .product-image-preview-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-top: 12px; }
.product-editor-workspace .image-mini-card { overflow: hidden; border-radius: 6px; background: #fff; transition: border-color .16s ease, opacity .16s ease, transform .16s ease; }
.product-editor-workspace .image-mini-card[draggable="true"] { cursor: grab; }
.product-editor-workspace .image-mini-card.dragging { opacity: .45; }
.product-editor-workspace .image-mini-card.drag-over { border-color: #168fbb; transform: translateY(-2px); }
.image-mini-visual { aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: #eef4f6; }
.product-editor-workspace .image-mini-card img { width: 100%; height: 100%; object-fit: cover; }
.image-mini-visual b { position: absolute; top: 7px; left: 7px; padding: 4px 7px; border-radius: 4px; color: #fff; background: rgba(15, 48, 61, .78); font-size: 10px; }
.image-mini-meta { display: grid; gap: 2px; padding: 9px 10px 5px; }
.image-mini-meta strong { color: #284a57; font-size: 12px; }
.product-editor-workspace .image-mini-meta span { padding: 0; color: #84969d; font-size: 10px; }
.product-editor-workspace .image-mini-actions { display: flex; grid-template-columns: none; gap: 5px; padding: 5px 9px 9px; }
.product-editor-workspace .image-mini-actions button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d7e3e7;
  border-radius: 5px;
  color: #47636e;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.product-editor-workspace .image-mini-actions button:hover:not(:disabled) { border-color: #84c2d7; color: #087ba5; background: #edf8fb; }
.product-editor-workspace .image-mini-actions button.danger { margin-left: auto; color: #b5384b; }
.product-editor-workspace .image-mini-actions button:disabled { opacity: .35; cursor: not-allowed; }
.media-url-source { margin-top: 12px; }
.media-url-source textarea { min-height: 86px !important; }
.product-detail-display-field {
  grid-column: 1 / -1;
  display: grid !important;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d7e5e9;
  border-radius: 6px;
  background: #f9fcfd;
}
.product-detail-display-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.product-detail-display-head > div { min-width: 0; display: grid; gap: 4px; }
.product-detail-display-head strong { color: #193f4d; font-size: 16px; }
.product-detail-display-head span { color: #708891; font-size: 11px; line-height: 1.55; }
.product-detail-display-head select { width: 176px; min-width: 176px; background: #fff; }
.product-detail-display-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-detail-display-presets button {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid #d6e4e8;
  border-radius: 6px;
  color: #355762;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.product-detail-display-presets button:hover { border-color: #79bfd7; background: #f1fafc; }
.product-detail-display-presets button.active { border-color: #1693bd; color: #086d91; background: #eaf8fc; box-shadow: inset 3px 0 #1693bd; }
.product-detail-display-presets strong { font-size: 13px; }
.product-detail-display-presets span { color: #7a9098; font-size: 10px; }
.product-detail-display-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-detail-display-grid label {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border: 1px solid #dce8eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.product-detail-display-grid label:has(input:checked) { border-color: #8ac9dc; background: #f0fafc; }
.product-detail-display-grid label.required { border-style: dashed; background: #f4f8f9; cursor: default; }
.product-detail-display-grid input { width: 17px !important; height: 17px; min-height: 17px !important; margin: 1px 0 0; accent-color: #138eb7; }
.product-detail-display-grid label > span { min-width: 0; display: grid; gap: 3px; }
.product-detail-display-grid strong { color: #294d59; font-size: 12px; }
.product-detail-display-grid small { color: #7a9098; font-size: 10px; line-height: 1.45; }
.product-detail-layout-head {
  display: grid;
  grid-template-columns: 64px 68px minmax(150px, .9fr) minmax(190px, 1.2fr) 72px;
  gap: 10px;
  padding: 0 11px;
  color: #81959c;
  font-size: 10px;
  font-weight: 800;
}
.product-detail-layout-list { display: grid; gap: 7px; }
.product-detail-layout-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px 28px 68px minmax(150px, .9fr) minmax(190px, 1.2fr) auto 68px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #dce8eb;
  border-radius: 6px;
  background: #fff;
  transition: border-color .16s ease, background .16s ease, opacity .16s ease;
}
.product-detail-layout-row.enabled { border-color: #b9dce6; background: #f9fdfe; }
.product-detail-layout-row.required { border-style: dashed; }
.product-detail-layout-row.dragging { opacity: .48; }
.product-detail-layout-row.drag-over { border-color: #168fb7; background: #ecf8fb; box-shadow: inset 3px 0 #168fb7; }
.product-detail-drag-handle,
.product-detail-order-actions button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d7e4e8;
  border-radius: 5px;
  color: #52717c;
  background: #fff;
  cursor: pointer;
}
.product-detail-drag-handle { color: #789098; font-size: 13px; letter-spacing: -3px; cursor: grab; }
.product-detail-drag-handle:active { cursor: grabbing; }
.product-detail-order { color: #84979e; font-size: 10px; font-weight: 900; text-align: center; }
.product-detail-visible { display: flex; align-items: center; gap: 6px; color: #43616b; font-size: 11px; cursor: pointer; }
.product-detail-visible input { width: 17px !important; height: 17px; min-height: 17px !important; margin: 0; accent-color: #138eb7; }
.product-detail-module-meta { min-width: 0; display: grid; gap: 3px; }
.product-detail-module-meta strong { overflow: hidden; color: #264c58; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-detail-module-meta small { overflow: hidden; color: #7c9199; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-detail-title-field { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; }
.product-detail-title-field > span { color: #80949b; font-size: 10px; }
.product-detail-title-field input { min-width: 0; min-height: 34px !important; height: 34px; padding: 6px 9px; background: #fff; }
.product-detail-required-badge { padding: 4px 7px; border: 1px solid #ead8a8; border-radius: 4px; color: #87651a; background: #fff8df; font-size: 9px; font-weight: 900; white-space: nowrap; }
.product-detail-order-actions { grid-column: 7; display: flex; justify-content: flex-end; gap: 5px; }
.product-detail-order-actions button:hover:not(:disabled),
.product-detail-drag-handle:hover { border-color: #80bfd3; color: #087ba4; background: #edf8fb; }
.product-detail-order-actions button:disabled { opacity: .32; cursor: not-allowed; }
.product-detail-display-summary,
.product-detail-required-note { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 5px; }
.product-detail-display-summary { border: 1px solid #cce6ee; color: #235b6e; background: #eef9fc; }
.product-detail-display-summary strong { flex: 0 0 auto; font-size: 11px; }
.product-detail-display-summary span { min-width: 0; font-size: 11px; line-height: 1.55; }
.product-detail-required-note { border: 1px solid #eadfbf; color: #665324; background: #fffbef; }
.product-detail-required-note strong { flex: 0 0 auto; font-size: 11px; }
.product-detail-required-note span { font-size: 11px; line-height: 1.55; }
.product-publish-review-field { grid-column: 1 / -1; }
.product-publish-review { display: grid; gap: 14px; }
.product-publish-summary { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)) auto; gap: 1px; overflow: hidden; border: 1px solid #dce7ea; border-radius: 6px; background: #dce7ea; }
.product-publish-summary > div { display: grid; gap: 5px; padding: 14px; background: #fff; }
.product-publish-summary span { color: #778d95; font-size: 11px; }
.product-publish-summary strong { color: #214550; font-size: 17px; }
.product-publish-summary > .btn { align-self: stretch; border-radius: 0; }
.product-publish-issues { display: grid; gap: 8px; }
.product-publish-issue,
.product-publish-ready { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px 14px; border: 1px solid #dce7ea; border-left-width: 3px; border-radius: 6px; background: #fff; }
.product-publish-issue > i,
.product-publish-ready > i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-weight: 900; }
.product-publish-issue > div,
.product-publish-ready > div { display: grid; gap: 3px; }
.product-publish-issue strong,
.product-publish-ready strong { color: #294b57; font-size: 13px; }
.product-publish-issue span,
.product-publish-ready span { color: #738991; font-size: 11px; line-height: 1.5; }
.product-publish-issue.error { border-left-color: #cf4258; }
.product-publish-issue.error > i { color: #b82e44; background: #fdecef; }
.product-publish-issue.warn { border-left-color: #d49a34; }
.product-publish-issue.warn > i { color: #9c6914; background: #fff4dd; }
.product-publish-ready { border-left-color: #269875; }
.product-publish-ready > i { color: #17785d; background: #e7f8f2; }
.product-editor-workspace .product-editor-step-footer {
  min-width: 0;
  justify-content: center;
  gap: 12px;
  padding: 9px 20px;
  border-top: 1px solid #dfe8eb;
  background: #fff;
}
.product-editor-step-footer > span { min-width: 54px; color: #6c838c; font-size: 12px; font-weight: 900; text-align: center; }

@media (max-width: 1280px) {
  .product-editor-workspace .product-editor-workbench { grid-template-columns: 196px minmax(0, 1fr) 250px; }
  .product-editor-workspace .form-grid { padding-right: 24px; padding-left: 24px; }
  .product-editor-tools .product-editor-actions,
  .product-editor-workspace .product-edit-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) {
  .product-editor-workspace .product-editor-workbench { grid-template-columns: 188px minmax(0, 1fr); grid-template-areas: "steps form"; }
  .product-editor-workspace .product-editor-hero { display: none; }
  .product-editor-topbar { grid-template-columns: minmax(220px, 1fr) auto; }
  .product-editor-topbar .product-draft-status { display: none; }
  .product-detail-display-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail-layout-head { display: none; }
  .product-detail-layout-row { grid-template-columns: 28px 28px 68px minmax(130px, 1fr) minmax(170px, 1fr) auto 68px; }
}
@media (max-width: 760px) {
  .product-editor-workspace .modal-card.product-editor-card { grid-template-rows: auto minmax(0, 1fr) 56px; }
  .product-editor-topbar { grid-template-columns: 1fr; gap: 8px; padding: 9px 12px; }
  .product-editor-topbar-actions { justify-content: stretch; }
  .product-editor-topbar-actions .btn { flex: 1; }
  .product-editor-workspace .product-editor-workbench { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "steps" "form"; }
  .product-editor-workspace .product-editor-nav { flex-direction: row; gap: 6px; padding: 9px 10px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #dfe8eb; }
  .product-editor-nav-title { display: none; }
  .product-editor-workspace .product-editor-tab { min-width: 122px; min-height: 46px; grid-template-columns: 24px minmax(0, 1fr); padding: 7px 8px; }
  .product-editor-workspace .product-editor-tab > span { width: 23px; height: 23px; }
  .product-editor-workspace .product-editor-tab small { display: none; }
  .product-editor-workspace .form-grid { grid-template-columns: 1fr; gap: 13px; padding: 18px 12px 54px; }
  .product-step-intro strong { font-size: 17px; }
  .product-detail-display-field { padding: 13px; }
  .product-detail-display-head { align-items: stretch; flex-direction: column; }
  .product-detail-display-head select { width: 100%; min-width: 0; }
  .product-detail-display-presets,
  .product-detail-display-grid { grid-template-columns: 1fr; }
  .product-detail-layout-row {
    grid-template-columns: 28px 28px 64px minmax(0, 1fr) 68px;
    gap: 7px;
    padding: 9px;
  }
  .product-detail-module-meta { grid-column: 4; }
  .product-detail-order-actions { grid-column: 5; }
  .product-detail-title-field { grid-column: 3 / 6; }
  .product-detail-required-badge { grid-column: 4 / 6; justify-self: start; }
  .product-detail-display-summary,
  .product-detail-required-note { flex-direction: column; gap: 4px; }
  .product-editor-workspace .product-image-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-publish-summary { grid-template-columns: repeat(3, 1fr); }
  .product-publish-summary > .btn { grid-column: 1 / -1; min-height: 42px; }
  .product-publish-issue,
  .product-publish-ready { grid-template-columns: 26px minmax(0, 1fr); }
  .product-publish-issue > .btn { grid-column: 1 / -1; }
}

.test-data-cleanup-panel .panel-head { align-items: flex-start; }
.test-data-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 14px; border: 1px solid #dbe9ec; border-radius: 6px; background: #f7fbfc; color: #66808a; font-size: 12px; line-height: 1.5; }
.test-data-summary strong { color: #234b58; }
.test-data-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: #159b78; }
.test-data-blocked { display: grid; gap: 7px; margin-top: 14px; padding: 13px 14px; border: 1px solid #f0d8dc; border-left: 3px solid #cf4258; border-radius: 6px; background: #fff8f8; color: #7e3c48; font-size: 12px; }
.test-data-blocked > strong { color: #b32d42; }
.test-data-blocked > div { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 10px; align-items: baseline; }
.test-data-blocked > div span { color: #8a6870; }
@media (max-width: 760px) {
  .test-data-cleanup-panel .panel-head { align-items: stretch; }
  .test-data-cleanup-panel .panel-head .button-group { width: 100%; }
  .test-data-cleanup-panel .panel-head .button-group .btn { flex: 1; }
  .test-data-blocked > div { grid-template-columns: 1fr; gap: 2px; }
}
