:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --line: #e5e9f0;
  --text: #222831;
  --muted: #6f7885;
  --primary: #1677ff;
  --primary-dark: #0d5ed7;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --nav: #eef3f9;
  --nav-2: #ffffff;
  --nav-text: #66758a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 72px 208px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
}

.shell.subnav-collapsed {
  grid-template-columns: 72px 56px minmax(0, 1fr);
}

.topbar {
  grid-column: 1 / 4;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 270px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
}

.platform-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
}

.platform-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 4px;
}

.platform-tabs button.active {
  color: var(--primary);
  background: #edf5ff;
}

.account {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  white-space: nowrap;
}

.account-info {
  display: grid;
  gap: 2px;
  text-align: right;
  line-height: 1.2;
}

.account-info strong {
  color: var(--text);
  font-size: 14px;
}

.account-info span {
  color: var(--muted);
  font-size: 12px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  cursor: pointer;
}

.modal-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.modal-refresh-btn {
  color: #53627a;
  font-size: 18px;
  line-height: 1;
}

.modal-refresh-btn:hover {
  color: #1677ff;
  border-color: #1677ff;
  background: #f0f7ff;
}

.primary-nav {
  grid-row: 2;
  background: var(--nav);
  color: var(--nav-text);
  padding: 0;
  border-right: 1px solid var(--line);
}

.primary-nav button {
  width: 100%;
  min-height: 76px;
  border: 0;
  border-right: 3px solid transparent;
  background: transparent;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.primary-nav button.active {
  color: var(--primary);
  border-right-color: #2f8fff;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(22, 119, 255, 0.08);
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: currentColor;
  opacity: 0.92;
}

.nav-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg circle,
.nav-icon svg rect,
.nav-icon svg path:first-child {
  fill: currentColor;
  stroke: currentColor;
}

.sub-nav {
  grid-row: 2;
  background: var(--nav-2);
  color: var(--nav-text);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 16px 14px;
}

.sub-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}

.sub-toggle {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a94a3;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.sub-toggle:hover {
  background: #f1f5f9;
  color: #4b5563;
}

.shell.subnav-collapsed .sub-nav {
  padding: 16px 11px;
  overflow: hidden;
}

.shell.subnav-collapsed .sub-title {
  justify-content: center;
  margin-bottom: 0;
}

.shell.subnav-collapsed .sub-title span,
.shell.subnav-collapsed .sub-nav-list {
  display: none;
}

.sub-group {
  margin-bottom: 18px;
}

.sub-group-title {
  color: #9aa6b5;
  font-size: 12px;
  padding: 0 8px 8px;
}

.sub-nav button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--nav-text);
  text-align: left;
  padding: 9px 10px;
  border-radius: 5px;
}

.sub-nav button.active,
.sub-nav button:hover {
  background: #eaf3ff;
  color: var(--primary);
}

.content {
  grid-row: 2;
  overflow: auto;
  padding: 18px 22px 28px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.page-title {
  margin: 0;
  font-size: 20px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 8px 13px;
  border-radius: 5px;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.danger {
  color: var(--danger);
  border-color: #fecaca;
}

.btn.icon-only {
  width: 38px;
  padding-left: 0;
  padding-right: 0;
}

.btn:disabled {
  cursor: not-allowed;
  color: #94a3b8;
  background: #f8fafc;
  border-color: var(--line);
}

.link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
}

.left-actions {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
}

.metric-label {
  color: var(--muted);
  margin-bottom: 12px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
}

.metric.source-like {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 10px 18px 14px 0;
}

.metric.source-like:last-child {
  border-right: 0;
}

.finance-formula {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 0;
  margin: 12px 0 16px;
}

.finance-formula .metric {
  position: relative;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  padding: 16px;
}

.finance-formula .metric:last-child {
  border-right: 1px solid var(--line);
}

.finance-formula .metric i {
  position: absolute;
  right: -10px;
  top: 50%;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-style: normal;
  transform: translateY(-50%);
}

.hint-dot,
.shop-stat i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.shop-data-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.shop-stat {
  min-height: 86px;
  padding: 16px;
  display: grid;
  gap: 8px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.shop-stat:last-child {
  border-right: 0;
}

.shop-stat span {
  color: var(--muted);
}

.shop-stat strong {
  font-size: 26px;
}

.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.date-range,
.chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.date-range input {
  width: 132px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 10px;
}

.metric-section-title {
  margin: 16px 0 8px;
  font-weight: 700;
}

.source-compact {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.inline-tabs {
  margin: 0;
}

.source-line-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 16px 30px;
  background: repeating-linear-gradient(to top, #fff 0, #fff 44px, #f1f5f9 45px);
}

.database-stats {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.database-status-empty .panel-body {
  min-height: 180px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.database-status-empty strong {
  font-size: 20px;
}

.database-table {
  min-width: 1180px;
}

.database-backup-panel {
  margin-bottom: 16px;
}

.backup-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.database-backup-table {
  min-width: 980px;
}

.database-readiness-panel {
  margin-bottom: 16px;
}

.database-package-panel {
  margin-bottom: 16px;
}

.database-package-table {
  min-width: 1120px;
}

.readiness-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.readiness-summary > div {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.readiness-summary span,
.readiness-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.readiness-summary strong {
  font-size: 22px;
  line-height: 1.1;
}

.database-readiness-table {
  min-width: 1080px;
}

.backup-name {
  display: inline-block;
  max-width: 260px;
  color: #1f2937;
  font-family: Consolas, "Microsoft YaHei", monospace;
  word-break: break-all;
}

.backup-reason {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

.db-progress {
  min-width: 150px;
  display: grid;
  gap: 6px;
}

.db-progress span {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2f7;
}

.db-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.db-progress em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.db-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.db-pill-list span {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.2;
  word-break: break-all;
}

.database-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.database-detail-grid > div {
  display: grid;
  align-content: start;
  gap: 12px;
}

.line-tick {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  position: relative;
}

.line-tick i {
  width: 8px;
  min-height: 12px;
  border-radius: 999px;
  background: #94a3b8;
}

.line-tick span {
  position: absolute;
  bottom: -22px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-panel {
  min-height: 160px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.calendar-icons {
  font-size: 24px;
  color: var(--primary);
  letter-spacing: 6px;
}

.shortcut-grid,
.plugin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 10px;
}

.shortcut {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
}

.shortcut:hover {
  border-color: #9bc7ff;
  box-shadow: 0 8px 22px rgba(22, 119, 255, 0.1);
}

.shortcut-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #eaf3ff;
  color: #1677ff;
  font-weight: 800;
}

.shortcut strong {
  font-size: 14px;
  font-weight: 700;
}

.plugin-stats > div {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: grid;
  gap: 6px;
  background: #fff;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 14px;
}

.panel-head {
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel-title {
  font-weight: 700;
}

.panel-title small {
  margin-left: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  padding: 16px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.source-filter-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #4b5563;
}

.source-filter-line input,
.source-filter-line select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 10px;
  background: #fff;
}

.source-filter-line .source-search {
  min-width: min(360px, 100%);
  flex: 1 1 260px;
}

.source-user-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.source-user-card {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ops-card {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.source-user-card span,
.ops-card span {
  color: var(--muted);
}

.source-user-card strong,
.ops-card strong {
  font-size: 22px;
  line-height: 1.15;
}

.source-user-card em,
.ops-card em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.user-tabs {
  margin-bottom: 12px;
}

.user-batch-line {
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.user-tag-summary {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 0 0 10px;
  color: #64748b;
}

.user-tag-summary span {
  color: #94a3b8;
}

.source-user-table th,
.source-user-table td {
  white-space: nowrap;
}

.category-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.category-column {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 18px 0;
}

.category-column:last-child {
  border-right: 0;
}

.category-column > label {
  display: block;
  padding: 0 16px 14px;
  color: #334155;
}

.category-node {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid #eef2f7;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  text-align: left;
}

.category-node.active {
  background: #f8fafc;
}

.category-node i {
  color: var(--primary);
  font-style: normal;
}

.muted-column {
  background: #fff;
}

.upload-file-btn {
  min-width: 150px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
}

.material-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.material-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.material-layout aside {
  border-right: 1px solid var(--line);
  background: #fafbfc;
  padding: 12px;
}

.material-layout aside button {
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: #fff;
  min-height: 38px;
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
}

.material-layout aside button.active {
  color: var(--primary);
}

.material-layout aside em {
  color: var(--muted);
  font-style: normal;
}

.material-layout section {
  padding: 12px;
  min-width: 0;
}

.material-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
}

.material-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 18px;
  padding: 20px 0 4px;
}

.material-upload-tile,
.material-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
}

.material-upload-tile {
  place-items: center;
  align-content: center;
  border-style: dashed;
  color: #64748b;
  cursor: pointer;
}

.material-upload-tile input,
.product-upload-slot input,
.gallery-upload-card input {
  display: none;
}

.material-upload-tile span {
  font-size: 30px;
}

.material-card > div {
  aspect-ratio: 1;
  border-radius: 5px;
  background: #f3f6fa;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #64748b;
  font-weight: 800;
}

.material-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-card strong,
.material-card span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.material-card span {
  color: var(--muted);
  font-size: 12px;
}

.material-card footer {
  display: flex;
  gap: 10px;
}

.empty-cell {
  height: 92px;
  text-align: center;
  color: var(--muted);
}

.order-card-head {
  display: grid;
  grid-template-columns: 36px 2fr repeat(5, 1fr);
  gap: 10px;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: #fafbfc;
  color: #4b5563;
  font-weight: 700;
}

.order-card-row {
  display: grid;
  grid-template-columns: 36px 2fr repeat(5, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  color: var(--text);
}

.order-card-row > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.order-card-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.source-order-head,
.source-order-card {
  display: grid;
  grid-template-columns: 36px minmax(420px, 1fr) 150px 230px;
  gap: 12px;
  align-items: stretch;
  min-width: 920px;
}

.source-order-head {
  min-height: 46px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: #fafbfc;
  color: #344054;
  font-weight: 700;
}

.orders-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e7eaf0);
  border-radius: 8px;
  background: #fff;
}

.orders-bulk-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary, #667085);
  cursor: pointer;
}

.source-order-list {
  overflow-x: auto;
}

.source-order-card {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
}

.source-order-select {
  padding-top: 4px;
}

.source-order-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.source-order-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.source-order-line span,
.source-order-goods p,
.source-order-address,
.source-order-money span {
  color: var(--muted);
  font-size: 12px;
}

.source-order-goods {
  padding: 9px 10px;
  border: 1px solid #eef2f7;
  background: #fbfcfe;
  border-radius: 6px;
}

.source-order-goods strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}
.order-product-row{display:flex;align-items:center;gap:12px;padding:8px 0}.order-product-row img,.order-image-placeholder{width:72px;height:72px;object-fit:contain;flex-shrink:0;border-radius:6px;background:#fff}.order-image-placeholder{display:flex;align-items:center;justify-content:center;font-size:12px;color:#999}

.source-order-goods p {
  margin: 2px 0;
}

.source-order-address {
  line-height: 1.5;
}

.source-order-money {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--text);
}

.source-order-money strong {
  font-size: 18px;
  font-weight: 800;
}

.source-order-money em {
  color: #475467;
  font-style: normal;
}

.source-order-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px;
}

.order-empty {
  min-height: 180px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  display: grid;
  place-items: center;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 36px;
  padding: 7px 10px;
  background: #fff;
}

.field textarea {
  min-height: 72px;
  resize: vertical;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 12px;
  border-radius: 5px;
}

.tabs button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #edf5ff;
}

.source-tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.source-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 12px 18px;
}

.source-tabs button.active {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-subnav {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin-bottom: 12px;
}

.mobile-subnav button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 7px 10px;
  border-radius: 5px;
}

.mobile-subnav button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #edf5ff;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 11px 10px;
  vertical-align: top;
}

th {
  background: #fafbfc;
  color: #4b5563;
  font-weight: 700;
}

.source-goods-table {
  min-width: 1320px;
  border: 1px solid #edf0f5;
  background: #fff;
}

.source-goods-table td,
.source-goods-table th {
  padding: 12px 7px;
  border-right: 1px solid #edf0f5;
  vertical-align: middle;
  color: #667085;
  font-size: 12px;
  font-weight: 400;
}

.source-goods-table th {
  background: #fbfcfe;
  color: #7b8493;
  font-weight: 400;
  white-space: nowrap;
}

.source-goods-table tr:hover td {
  background: #fcfdff;
}

.source-goods-table th:nth-child(3),
.source-goods-table td:nth-child(3) {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
}

.source-goods-table th:nth-child(6),
.source-goods-table td:nth-child(6),
.source-goods-table th:nth-child(7),
.source-goods-table td:nth-child(7),
.source-goods-table th:nth-child(8),
.source-goods-table td:nth-child(8) {
  width: 102px;
}

.source-goods-table th:nth-child(9),
.source-goods-table td:nth-child(9) {
  width: 96px;
}

.source-goods-table th:nth-child(10),
.source-goods-table td:nth-child(10) {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}

.goods-list-panel .panel-body {
  padding: 18px 20px;
}

.goods-list-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #dce3ed;
  margin-bottom: 14px;
}

.goods-list-tabs button {
  border: 0;
  background: transparent;
  color: #1f2937;
  padding: 0 0 12px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.goods-list-tabs button span {
  color: #98a2b3;
  font-size: 12px;
  margin-left: 4px;
}

.goods-list-tabs button.active {
  color: #2589ff;
}

.goods-list-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: #2589ff;
  border-radius: 2px;
}

.goods-list-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #667085;
  font-size: 13px;
}

.goods-list-filters label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.goods-list-filters select,
.goods-list-filters input {
  height: 34px;
  border: 1px solid #dfe5ee;
  border-radius: 4px;
  background: #fff;
  padding: 0 12px;
  min-width: 130px;
  color: #667085;
}

.goods-list-search {
  min-width: 360px;
}

.goods-list-batch {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #f7f8fa;
  border: 1px solid #eef1f5;
  border-bottom: 0;
}

.goods-list-product {
  display: grid;
  grid-template-columns: 46px minmax(320px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 390px;
  justify-items: start;
}

.goods-list-product strong {
  display: block;
  color: #4b5563;
  font-weight: 400;
  line-height: 1.35;
}

.goods-list-product p {
  margin: 3px 0 0;
  color: #98a2b3;
  font-size: 12px;
}

.goods-category-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: #edf6ff;
  color: #2589ff;
  font-weight: 400;
}

.goods-inline-value {
  display: inline-grid;
  grid-template-columns: 52px 18px 18px;
  align-items: center;
  column-gap: 4px;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  border: 0;
  background: transparent;
  color: #667085;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.goods-inline-value span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goods-inline-value.price {
  grid-template-columns: 66px 18px 18px;
  width: 114px;
  min-width: 114px;
  max-width: 114px;
}

.goods-inline-value.price span {
  color: #4b5563;
  font-weight: 400;
}

.goods-inline-value.sort {
  grid-template-columns: 28px 12px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}

.goods-inline-value.name {
  display: inline-flex;
  justify-content: flex-start;
  gap: 6px;
  width: 470px;
  max-width: 470px;
  text-align: left;
}

.goods-inline-value.name span {
  color: #4b5563;
  font-weight: 400;
  flex: 0 1 auto;
}

.goods-inline-value em {
  color: #3b9cff;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
}

.goods-inline-editor {
  display: inline-grid;
  grid-template-columns: 64px 10px 10px;
  align-items: center;
  column-gap: 6px;
  width: 96px;
}

.goods-inline-editor input {
  width: 64px;
  height: 30px;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  background: #fff;
  color: #667085;
  padding: 0 10px;
  outline: none;
  transition: none;
  padding-right: 4px;
  font-size: 12px;
  color-scheme: light;
  accent-color: #111827;
}

.goods-inline-editor input[type="number"]::-webkit-inner-spin-button,
.goods-inline-editor input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  width: 8px;
  min-width: 8px;
  max-width: 8px;
  transform: scale(0.72);
  filter: contrast(2) grayscale(1);
  cursor: pointer;
}

.goods-inline-editor input:focus {
  border-color: #dfe5ee;
  box-shadow: none;
}

.goods-inline-editor.price {
  grid-template-columns: 78px 10px 10px;
  width: 110px;
}

.goods-inline-editor.price input {
  width: 78px;
}

.goods-inline-editor.sort {
  grid-template-columns: 34px 10px 10px;
  width: 60px;
  column-gap: 3px;
}

.goods-inline-editor.sort input {
  width: 34px;
  padding-left: 5px;
  padding-right: 2px;
}

.goods-inline-editor.name {
  grid-template-columns: 460px 10px 10px;
  width: 492px;
}

.goods-inline-editor.name input {
  width: 460px;
}

.goods-inline-editor button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 400;
  font-size: 8px;
  cursor: pointer;
  line-height: 1;
  transition: none;
}

.goods-inline-editor .cancel {
  background: #ff6b6b;
}

.goods-inline-editor .confirm {
  background: #63c548;
}

.goods-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 24px;
  border-radius: 5px;
  font-weight: 400;
  font-size: 12px;
}

.goods-status-badge.selling {
  color: #43a047;
  background: #eefaeb;
}

.goods-status-badge.offline {
  color: #f59e0b;
  background: #fff4df;
}

.goods-status-badge.soldout {
  color: #ef4444;
  background: #fff0f0;
}

.goods-row-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}

.goods-row-actions button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 900;
}

.goods-row-actions .edit {
  background: #eef6ff;
  color: #2589ff;
}

.goods-row-actions .copy {
  background: #fff3eb;
  color: #ff8a4c;
}

.goods-row-actions .delete {
  background: #fff0f3;
  color: #ff5f76;
}

.goods-list-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 0 0;
  color: #667085;
}

.goods-list-footer select,
.goods-list-footer button,
.goods-list-footer strong {
  height: 32px;
  border: 1px solid #e1e7f0;
  border-radius: 5px;
  background: #fff;
  padding: 0 10px;
  color: #667085;
}

.goods-list-footer strong {
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: #2589ff;
  border-color: #2589ff;
}

.editable-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.editable-cell::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #dbe3ef;
}

.price-inline-input {
  width: 86px;
  height: 30px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0 8px;
  color: #dc2626;
  background: #fff;
  font-weight: 700;
  outline: none;
}

.price-inline-input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.inline-edit-input {
  height: 30px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.inline-edit-input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.inline-edit-input.small {
  width: 68px;
}

.inline-edit-input.category {
  width: 96px;
}

.inline-edit-input.goods-name-input {
  width: 360px;
}

.inline-edit-input.money {
  width: 86px;
}

.inline-edit-input.stock {
  width: 96px;
}

.inline-edit-input.sold {
  width: 76px;
}

.inline-edit-input.status {
  width: 88px;
}

.goods-name {
  max-width: 280px;
}

.plain-status {
  color: #4b5563;
  white-space: nowrap;
}

.mini-switch {
  display: inline-flex;
  align-items: center;
}

.mini-switch input {
  display: none;
}

.mini-switch span {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
}

.mini-switch span::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: #fff;
}

.mini-switch input:checked + span {
  background: var(--primary);
}

.mini-switch input:checked + span::after {
  left: 18px;
}

.muted {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: #eef2f7;
  color: #475569;
  white-space: nowrap;
}

.tag.green {
  color: #166534;
  background: #dcfce7;
}

.tag.orange {
  color: #9a3412;
  background: #ffedd5;
}

.tag.red {
  color: #991b1b;
  background: #fee2e2;
}

.tag.blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.goods-tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.money-positive {
  color: #b91c1c;
  font-weight: 700;
}

.money-negative {
  color: #0f766e;
  font-weight: 700;
}

.chart {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  display: flex;
  align-items: end;
  gap: 14px;
  background: linear-gradient(#fff, #f8fafc);
}

.bar {
  flex: 1;
  min-width: 24px;
  background: var(--primary);
  border-radius: 5px 5px 0 0;
  position: relative;
}

.bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.product-editor-mask {
  position: fixed;
  inset: 56px 0 0 280px;
  display: block;
  overflow: hidden;
  background: var(--panel);
  z-index: 20;
}

.product-category-picker-mask {
  z-index: 70;
}

.product-category-options {
  display: grid;
  gap: 8px;
  max-height: 55vh;
  overflow: auto;
}

.product-category-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.product-category-option:has(input:checked) {
  border-color: var(--primary);
  background: #edf5ff;
}

.modal.product-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.modal.large-modal {
  width: min(1120px, calc(100vw - 32px));
}

.modal .panel-body {
  max-height: calc(100vh - 96px);
  overflow: auto;
}

.modal.product-modal .panel-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: hidden;
}

.product-editor-mask .panel-head {
  flex: 0 0 56px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 0;
}

.product-editor-breadcrumb-back {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-weight: 400;
}

.product-editor-breadcrumb-separator {
  color: var(--muted);
  padding: 0 10px;
  font-weight: 400;
}

.modal.product-modal .product-editor {
  height: 100%;
  min-height: 0;
  align-content: start;
  overflow: auto;
  padding: 18px 22px 0;
  scrollbar-gutter: stable;
}

.modal.product-modal .product-editor > .modal-actions {
  position: sticky;
  bottom: 0;
  width: calc(100% + 44px);
  max-width: calc(var(--product-content-width) + 44px);
  z-index: 5;
  margin: 0 -22px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
}

.modal .panel-head {
  border-radius: 8px 8px 0 0;
}

.permission-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.permission-panel .panel-head {
  align-items: center;
  gap: 12px;
}

.permission-tree {
  display: grid;
  gap: 14px;
}

.permission-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 700;
}

.permission-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.permission-section-title {
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  color: var(--text);
}

.permission-group {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.permission-group:last-child {
  border-bottom: 0;
}

.permission-group-title {
  color: var(--muted);
  font-weight: 700;
  line-height: 32px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px 14px;
}

.permission-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--text);
}

.permission-tree input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2f7;
}

.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 16px;
}

.login-card .login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 400;
  cursor: pointer;
}

.login-card .login-remember input {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--primary);
}

.login-card .login-memory-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.login-card .login-memory-note[hidden] { display: none; }

.login-card h1 {
  margin: 0;
  font-size: 24px;
}

.login-card p {
  margin: -8px 0 4px;
  color: var(--muted);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.thumb {
  min-width: 92px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.small-value {
  font-size: 18px;
}

.settings-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.source-settings-panel {
  border-top: 0;
  border-radius: 0 0 7px 7px;
}

.source-settings {
  display: grid;
  gap: 0;
  max-width: 980px;
}

.source-settings input,
.source-settings select,
.source-settings textarea {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 10px;
  background: #fff;
}

.source-settings textarea {
  width: min(620px, 100%);
  min-height: 88px;
  resize: vertical;
}

.source-settings em {
  color: var(--muted);
  font-style: normal;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row > span {
  width: 140px;
  flex: 0 0 140px;
  font-weight: 600;
}

.setting-row.required > span::before {
  content: "*";
  color: var(--danger);
  margin-right: 2px;
}

.upload-slot {
  width: 82px;
  height: 82px;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
}

.upload-slot.wide {
  width: 136px;
  height: 72px;
  margin-bottom: 6px;
}

.source-double-field {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.source-double-field label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.source-double-field input {
  min-width: 240px;
}

.design-manager {
  max-width: 720px;
}

.design-manager .panel-head {
  background: #fff;
}

.design-strip {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.design-add {
  width: 330px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
}

.design-preview-line {
  height: 16px;
  width: min(340px, 80%);
  background: #eef2f7;
  margin: 14px 0 22px;
}

.color-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.color-workbench .panel-head,
.color-preview-panel .panel-head {
  background: #fff;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.color-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.color-swatch {
  width: 54px;
  height: 54px;
  border-radius: 7px;
  background: var(--swatch);
  border: 1px solid rgba(15, 23, 42, 0.12);
  overflow: hidden;
  flex: 0 0 auto;
}

.color-swatch input {
  width: 76px;
  height: 76px;
  margin: -11px;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.color-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.color-meta strong {
  font-size: 14px;
}

.color-meta em,
.color-meta small {
  color: var(--muted);
  font-style: normal;
}

.color-meta em {
  font-family: Consolas, Monaco, monospace;
  text-transform: uppercase;
}

.color-usage-table {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  margin-top: 16px;
  background: #fff;
}

.color-row {
  display: grid;
  grid-template-columns: 120px 140px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.color-row:last-child {
  border-bottom: 0;
}

.color-row.head {
  min-height: 42px;
  background: #f8fafc;
  color: var(--muted);
}

.demo-price {
  font-size: 20px;
  font-weight: 700;
}

.demo-badge {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 24px;
  border-radius: 4px;
  color: #fff;
  font-style: normal;
  font-size: 12px;
}

.store-phone {
  width: 280px;
  min-height: 560px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--phone-bg);
  padding: 16px 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.store-top {
  height: 38px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.store-banner {
  min-height: 112px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--assist));
  color: #fff;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.store-banner span {
  font-size: 18px;
  font-weight: 700;
}

.store-banner button {
  justify-self: start;
  border: 0;
  border-radius: 16px;
  padding: 6px 14px;
  color: var(--brand);
  background: #fff;
}

.store-tabs,
.store-nav {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  background: #fff;
}

.store-tabs {
  margin: 12px 0;
  border-radius: 9px;
  padding: 10px;
}

.store-tabs span.active,
.store-nav span.active {
  color: var(--brand);
  font-weight: 700;
}

.store-goods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.store-goods div {
  border-radius: 9px;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 7px;
}

.store-goods i {
  height: 86px;
  border-radius: 7px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--assist) 18%, #fff), color-mix(in srgb, var(--brand) 16%, #fff));
}

.store-goods strong {
  font-size: 12px;
  font-weight: 500;
}

.store-goods em {
  color: var(--price);
  font-style: normal;
  font-weight: 700;
}

.store-nav {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px 8px;
  color: var(--muted);
  font-size: 12px;
}

.pay-setting-panel {
  max-width: 820px;
}

.pay-setting-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--line);
  background: #fff;
}

.pay-account {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-right: 1px solid var(--line);
}

.pay-app-icon,
.pay-mini-icon {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #22c55e;
  font-weight: 700;
}

.pay-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.pay-mini-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 8px;
}

.pay-method-head,
.pay-method-row {
  display: grid;
  grid-template-columns: 1fr 140px 118px;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.pay-method-head {
  color: var(--muted);
  background: #fafbfc;
}

.pay-method-row:last-child {
  border-bottom: 0;
}

.pay-method-row select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
}

.draggable-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.draggable-chips button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  min-height: 34px;
  padding: 6px 12px;
}

.notice-tip {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 4px;
  padding: 10px 12px;
  max-width: 620px;
}

.notice-tip p {
  margin: 6px 0 10px;
  color: #475569;
  line-height: 1.6;
}

.rich-editor {
  width: min(680px, 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.rich-editor > div {
  min-height: 42px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.8;
}

.rich-editor iframe {
  width: 100%;
  min-height: 120px;
  border: 0;
  background: #fff;
}

.center-actions {
  justify-content: center;
}

.short-input {
  width: 96px;
}

.fixed-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.wallet-custom-tabs {
  margin-bottom: 0;
  background: #fff;
}

.wallet-custom-workbench {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 0.95fr);
  gap: 36px;
  min-height: calc(100vh - 220px);
  padding: 28px 44px 92px;
  background: #f3f3f3;
}

.wallet-phone-preview {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}

.wallet-phone-shell {
  width: 330px;
  min-height: 650px;
  padding: 28px 24px 34px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.wallet-phone-status,
.wallet-phone-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #111827;
}

.wallet-phone-status {
  font-size: 12px;
  font-weight: 700;
}

.wallet-phone-title {
  margin: 22px 0 26px;
}

.wallet-phone-title strong {
  font-size: 18px;
}

.wallet-phone-section-title,
.wallet-phone-recommend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  color: #667085;
}

.wallet-phone-section-title::before,
.wallet-phone-recommend::before {
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 99px;
  background: #ff4d4f;
}

.wallet-balance-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  margin-bottom: 18px;
  padding: 0 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #f3f6fa);
  background-size: cover;
  color: #5b6678;
}

.wallet-balance-card strong {
  font-size: 20px;
  color: #596579;
}

.wallet-coin {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: #f6b21a;
  font-weight: 800;
}

.wallet-phone-input {
  width: 100%;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid #e5ebf2;
  border-radius: 5px;
  padding: 0 14px;
  background: #f5f8fc;
  color: #9aa7b7;
}

.wallet-phone-recommend {
  margin-top: 8px;
}

.wallet-phone-recommend em {
  margin-left: auto;
  color: #6b7280;
  font-style: normal;
}

.wallet-phone-recommend i {
  color: #6b7280;
  font-style: normal;
  font-size: 10px;
}

.wallet-phone-submit {
  width: 100%;
  height: 44px;
  margin-top: 260px;
  border: 0;
  border-radius: var(--wallet-btn-radius, 40px);
  color: var(--wallet-btn-color, #fff);
  background: var(--wallet-btn-bg, #0491f6);
  font-weight: 800;
  font-size: 16px;
}

.wallet-config-stack {
  display: grid;
  align-content: start;
  gap: 18px;
}

.wallet-config-card {
  background: #fff;
  border-radius: 2px;
  border: 1px solid #eef1f5;
}

.wallet-config-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  margin: 0;
  padding: 0 24px;
  border-bottom: 1px solid #eef1f5;
  font-size: 16px;
  font-weight: 600;
}

.wallet-config-card .setting-row {
  margin: 0 24px;
  padding: 14px 0;
}

.wallet-config-card .setting-row > span {
  width: 112px;
  flex-basis: 112px;
  text-align: right;
  color: #697586;
}

.wallet-field-line,
.wallet-range-line,
.wallet-color-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.wallet-field-line input {
  flex: 1;
}

.wallet-range-line input[type="range"] {
  flex: 1;
  accent-color: #409eff;
}

.wallet-range-line .short-input {
  width: 64px;
}

.wallet-color-line .color-swatch-input {
  width: 34px;
  min-height: 34px;
  padding: 2px;
}

.wallet-color-line input:not(.color-swatch-input) {
  width: 96px;
}

.wallet-config-card.compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.phone-preview {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  background: #f8fafc;
}

.preview-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.stats-grid.compact {
  grid-template-columns: repeat(3, minmax(110px, 1fr));
}

.stats-grid.compact.coupon-stats-summary {
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.coupon-stats-summary .metric.source-like {
  min-height: 62px;
  padding: 8px 10px;
  border-right: 0;
  background: #fff;
}

.coupon-stats-summary .metric-label {
  margin-bottom: 6px;
  font-size: 12px;
}

.coupon-stats-summary .metric-value {
  font-size: 18px;
  line-height: 1.15;
}

.coupon-stats-summary .muted {
  margin-top: 3px;
  font-size: 11px;
  white-space: nowrap;
}

.coupon-stats-panel .panel-body {
  padding: 10px 12px;
}

.coupon-stats-panel .source-filter-line {
  margin-bottom: 8px;
}

.coupon-issue-stats-page {
  margin-bottom: 10px;
}

.coupon-stats-filter {
  margin-bottom: 0;
  gap: 16px;
}

.coupon-stats-filter select,
.coupon-stats-filter input {
  min-width: 160px;
}

.coupon-stats-filter .source-search {
  min-width: 260px;
}

.coupon-stats-filter .link-btn.active {
  color: var(--text);
  font-weight: 700;
}

.coupon-issue-summary .panel-head {
  min-height: 44px;
}

.coupon-issue-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 92px;
  align-items: center;
}

.coupon-issue-summary-item {
  text-align: center;
  border-right: 1px solid #edf0f5;
}

.coupon-issue-summary-item:last-child {
  border-right: 0;
}

.coupon-issue-summary-item strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 22px;
  line-height: 1.2;
}

.coupon-issue-summary-item span {
  color: #6b7280;
}

.coupon-stats-table table {
  min-width: 1080px;
  font-size: 12px;
}

.coupon-stats-table th,
.coupon-stats-table td {
  padding: 7px 8px;
  vertical-align: middle;
}

.coupon-record-filter select {
  min-width: 150px;
}

.coupon-record-table table {
  min-width: 1120px;
}

.coupon-record-table th,
.coupon-record-table td {
  padding: 13px 14px;
  border-right: 1px solid #edf0f5;
  vertical-align: middle;
}

.coupon-record-table th:last-child,
.coupon-record-table td:last-child {
  border-right: 0;
}

.coupon-record-user strong,
.coupon-record-user span {
  display: block;
}

.coupon-record-user span {
  margin-top: 5px;
  color: #4b5563;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
}

.menu-grid span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 22px;
}

.step {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
}

.step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.step.active {
  border-color: var(--primary);
  background: #edf5ff;
}

.app-catalog {
  display: grid;
  gap: 18px;
}

.marketing-searchbar {
  display: flex;
  justify-content: flex-end;
  gap: 0;
  margin-bottom: 16px;
}

.marketing-searchbar input {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 5px 0 0 5px;
  min-height: 42px;
  padding: 8px 14px;
  background: #fff;
}

.marketing-searchbar .btn {
  border-radius: 0 5px 5px 0;
  min-width: 82px;
}

.app-catalog h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 500;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.app-card {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.app-icon {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  flex: 0 0 auto;
}

.app-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.template-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.template-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(320px, 1fr);
  gap: 16px;
}

.template-card-preview {
  min-height: 520px;
  border: 1px solid #d8e7ff;
  border-radius: 7px;
  background: #eef4fb;
  overflow: hidden;
}

.template-card-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.template-card-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.template-card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.template-card-title strong,
.template-card-title span {
  display: block;
}

.template-card-title strong {
  font-size: 18px;
}

.template-card-title span {
  margin-top: 5px;
  color: var(--muted);
}

.template-card-desc {
  margin: 0;
  color: #526172;
  line-height: 1.65;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-tags span {
  border: 1px solid #d8e7ff;
  border-radius: 999px;
  background: #f5f9ff;
  color: #1764c9;
  padding: 5px 10px;
  font-size: 13px;
}

.template-link-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.template-link-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #d8e7ff;
  border-radius: 6px;
  background: #f5f9ff;
  color: #1764c9;
  padding: 8px 10px;
}

.template-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .template-card {
    grid-template-columns: 1fr;
  }
}

.source-app-catalog {
  width: 100%;
  gap: 34px;
}

.source-app-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 22px;
}

.source-app-card {
  width: 100%;
  min-height: 100px;
  text-align: left;
  border: 0;
  border-radius: 0;
  padding: 18px;
  align-items: center;
  background: #fff;
}

.source-app-card:hover {
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.source-app-icon {
  width: var(--source-app-icon-size, 72px);
  height: var(--source-app-icon-size, 72px);
  border-radius: 9px;
  background: var(--source-app-icon-color, #37a5ff);
  color: #fff;
  font-size: 26px;
}

.source-app-section:nth-child(2) {
  --source-app-icon-color: #ff9f18;
}

.source-app-section:nth-child(3) {
  --source-app-icon-color: #16bdd2;
}

.source-app-section:nth-child(4) {
  --source-app-icon-color: #ef4655;
}

.source-app-section:nth-child(5) {
  --source-app-icon-color: #7280df;
}

.source-app-section:nth-child(6) {
  --source-app-icon-color: #18b48f;
}

.source-app-card strong {
  font-size: 15px;
}

.source-menu-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.source-menu-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  text-align: left;
  border: 1px solid #d9e2ef;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
}

.source-menu-card:hover {
  border-color: #8ab4f8;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.source-menu-card span,
.source-menu-card small {
  color: #6b7280;
}

.build-progress-stats .metric-value {
  font-size: 24px;
}

.build-progress-overview .notice-list {
  margin-bottom: 14px;
}

.build-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.build-progress-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  text-align: left;
  border: 1px solid #d9e2ef;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
}

.build-progress-card:hover {
  border-color: #8ab4f8;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.build-progress-card span,
.build-progress-card small {
  color: #6b7280;
}

.build-progress-card strong {
  font-size: 26px;
}

.build-progress-table td {
  vertical-align: top;
}

.progress-mini-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
  color: #374151;
}

.block {
  display: block;
  margin: 3px 0 8px;
}

.mini-path {
  margin-top: 6px;
  max-width: 160px;
  overflow-wrap: anywhere;
}

.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mini-actions .btn {
  min-height: 30px;
  padding: 5px 10px;
}

.preview-screen {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(#fff, #f1f5f9);
  position: relative;
}

.float-demo {
  position: absolute;
  right: 18px;
  bottom: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(30, 102, 212, 0.22);
}

.float-demo.secondary {
  bottom: 102px;
  background: #0f172a;
}

.modal-form {
  display: grid;
  gap: 16px;
}

.coupon-editor-form {
  gap: 18px;
}

.coupon-editor-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.coupon-editor-card-title {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
}

.coupon-editor-rows {
  display: grid;
  gap: 0;
  padding: 14px 22px 20px;
}

.coupon-field-row {
  display: grid;
  grid-template-columns: 190px minmax(360px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 0;
}

.coupon-field-row-wide {
  align-items: start;
}

.coupon-field-label {
  color: #6b7280;
  font-size: 14px;
}

.coupon-field-row input:not([type="radio"]):not([type="checkbox"]),
.coupon-field-row select,
.coupon-field-row textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
  background: #fff;
}

.coupon-field-row textarea {
  min-height: 78px;
  resize: vertical;
}

.coupon-field-row input[readonly] {
  background: #f3f6fb;
  color: #94a3b8;
}

.coupon-radio-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.coupon-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-weight: 600;
  cursor: pointer;
}

.coupon-radio-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.coupon-radio-option input:checked + span {
  color: var(--primary);
}

.coupon-receive-limit,
.coupon-check-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 26px;
}

.coupon-receive-limit input[type="number"] {
  width: 260px !important;
  min-height: 38px;
}

.coupon-limit-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.coupon-limit-input-wrap.is-disabled input[type="number"],
.coupon-limit-input-wrap.is-disabled .coupon-unit-suffix {
  background: #f3f6fb;
  color: #94a3b8;
}

.coupon-limit-input-wrap.is-disabled input[type="number"] {
  border-color: var(--line);
}

.coupon-stock-control {
  display: grid;
  gap: 10px;
}

.coupon-stock-unlimited {
  width: max-content;
}

.coupon-unit-suffix {
  min-width: 44px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -26px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  background: #f8fafc;
  color: #6b7280;
}

.coupon-check-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-weight: 600;
  cursor: pointer;
}

.coupon-check-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.coupon-check-option input:checked + span,
.coupon-check-option input[type="checkbox"]:checked + span {
  color: var(--primary);
}

.coupon-issue-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 20px;
  background: #fff;
  border-radius: 6px;
}

.coupon-issue-tabs button {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 16px;
  cursor: pointer;
}

.coupon-issue-tabs button.active,
.coupon-issue-tabs button:hover {
  color: var(--primary);
}

.coupon-issue-card {
  max-width: 980px;
  min-height: 560px;
  padding: 34px 52px;
  background: #fff;
  border-radius: 6px;
}

.coupon-issue-row {
  display: grid;
  grid-template-columns: 210px minmax(300px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 62px;
  color: #334155;
}

.coupon-issue-row > span,
.coupon-issue-row > label {
  text-align: right;
  color: #475569;
}

.coupon-issue-row strong {
  color: #0f172a;
}

.coupon-issue-row input[type="number"] {
  width: 360px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
}

.hint-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.coupon-issue-user-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.coupon-issue-user-line em {
  color: #64748b;
  font-style: normal;
}

.coupon-user-picker {
  display: flex;
  flex-direction: column;
  min-height: min(720px, calc(100vh - 180px));
}

.coupon-user-picker-search {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 90px;
  gap: 0;
  margin-bottom: 18px;
}

.coupon-user-picker-search input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px 0 0 5px;
  padding: 8px 12px;
}

.coupon-user-picker-search .btn {
  border-radius: 0 5px 5px 0;
}

.coupon-user-picker-table {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.coupon-user-picker-row {
  cursor: pointer;
}

.coupon-user-picker-row:hover {
  background: #f8fbff;
}

.coupon-user-name {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
}

.coupon-user-name small {
  grid-column: 2;
  color: #94a3b8;
}

.coupon-user-picker-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  bottom: 0;
  margin-top: 14px;
  padding: 14px 0 0;
  background: #fff;
}

.user-coupon-count {
  min-width: 28px;
  justify-content: center;
  font-weight: 700;
}

.user-coupon-detail-title {
  padding: 4px 0 22px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
}

.user-coupon-date-filter {
  margin-bottom: 14px;
}

.user-coupon-date-filter input {
  width: 180px;
}

.user-coupon-status-tabs {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.user-coupon-table-panel {
  border: 0;
  box-shadow: none;
}

.user-coupon-table-panel .panel-body {
  padding: 0;
}

.coupon-unit-field,
.coupon-date-range-display {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.coupon-unit-field input,
.coupon-date-range-display input {
  border: 0 !important;
  border-radius: 0 !important;
  min-height: 38px;
}

.coupon-unit-field span,
.coupon-date-range-display span {
  min-width: 52px;
  padding: 0 14px;
  color: #6b7280;
  text-align: center;
}

.coupon-date-range-display {
  grid-template-columns: auto minmax(240px, 1fr);
  cursor: pointer;
}

.coupon-date-range-display input {
  cursor: pointer;
}

.coupon-date-icon {
  min-width: 42px !important;
  color: #94a3b8 !important;
}

.coupon-date-popover {
  position: fixed;
  z-index: 100;
  min-width: min(720px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

.coupon-date-popover::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 54px;
  width: 14px;
  height: 14px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #fff;
  transform: rotate(45deg);
}

.coupon-date-popover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  gap: 10px;
}

.coupon-date-popover-grid input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
}

.coupon-date-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.coupon-discount-only,
.coupon-money-only,
.coupon-after-validity,
.coupon-range-validity {
  display: grid;
  gap: 0;
}

.coupon-editor-form[data-coupon-type="满减券"] .coupon-discount-only,
.coupon-editor-form[data-coupon-type="打折券"] .coupon-money-only {
  display: none;
}

.coupon-editor-form[data-coupon-valid-mode="领取后有效"] .coupon-range-validity,
.coupon-editor-form[data-coupon-valid-mode="时间段"] .coupon-after-validity {
  display: none;
}

.coupon-editor-form[data-coupon-appoint-type="全场通用"] .coupon-scope-row,
.coupon-editor-form[data-coupon-appoint-type="当面付"] .coupon-scope-row {
  display: none;
}

.coupon-scope-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.coupon-scope-summary {
  min-width: 260px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: #4b5563;
}

.coupon-scope-picker-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.55);
}

.coupon-scope-picker {
  width: min(1180px, calc(100vw - 56px));
  max-height: min(780px, calc(100vh - 56px));
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.coupon-scope-picker-head,
.coupon-scope-picker-tools,
.coupon-scope-picker-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.coupon-scope-picker-head {
  justify-content: space-between;
}

.coupon-scope-picker-head h3 {
  margin: 0;
  font-size: 18px;
}

.coupon-scope-picker-head button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
}

.coupon-scope-picker-tools input {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 12px;
}

.coupon-scope-picker-table {
  overflow: auto;
}

.coupon-scope-picker-table table {
  width: 100%;
  border-collapse: collapse;
}

.coupon-scope-picker-table th,
.coupon-scope-picker-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.coupon-scope-picker-table th {
  color: #6b7280;
  background: #f8fafc;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.coupon-scope-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.coupon-scope-picker-foot {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.coupon-category-tree {
  padding: 14px 28px 28px;
}

.coupon-category-tree-row {
  display: grid;
  grid-template-columns: 20px minmax(220px, auto) 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 10px 4px calc(10px + var(--depth, 0) * 34px);
  border-radius: 4px;
  color: #4b5563;
}

.coupon-category-tree-row:hover,
.coupon-category-tree-row.selected {
  background: #f3f6fb;
}

.coupon-category-tree-toggle {
  color: #a8b2c1;
  font-size: 14px;
  text-align: center;
}

.coupon-category-tree-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  cursor: pointer;
}

.coupon-category-tree-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.coupon-category-tree-row small {
  color: #94a3b8;
}

.banner-image-cell {
  display: grid;
  grid-template-columns: 58px minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.banner-thumb {
  width: 58px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 800;
}

.banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-image-cell span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-link-cell {
  display: grid;
  gap: 5px;
  min-width: 240px;
}

.banner-link-cell strong {
  color: var(--text);
}

.banner-link-cell em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.banner-item-form .micro-config-note,
.banner-link-picker .micro-config-note {
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  color: #3b5b7c;
  background: #eff6ff;
}

.business-preset-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.link-picker-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding: 0 4px 12px;
}

.link-picker-tabs button {
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-weight: 700;
  cursor: default;
  padding: 10px 0;
}

.link-picker-tabs button.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}

.link-picker-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
}

.link-picker-side {
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px 12px 0;
}

.link-picker-side button {
  height: 40px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
  text-align: left;
  padding: 0 12px;
  font: inherit;
}

.link-picker-side button.active {
  color: var(--primary);
  background: #eaf3ff;
}

.link-picker-form {
  display: grid;
  gap: 16px;
}

.banner-link-summary {
  margin: 0;
}

.banner-link-summary span {
  color: var(--muted);
}

.product-editor {
  gap: 14px;
  --product-content-width: max(780px, calc(54vw - 324px));
}

/* Keep the full workspace while aligning editor content to one left-side edge. */
.product-editor > .editor-section,
.product-editor > .goods-editor-tabs,
.product-editor > .editor-summary {
  width: 100%;
  max-width: var(--product-content-width);
  min-width: 0;
  justify-self: start;
  overflow-wrap: anywhere;
}

.product-editor .product-spec-full-row {
  grid-template-columns: 210px minmax(0, 1fr);
}

.product-editor .product-spec-full-row .product-setting-control {
  width: 100%;
}

.product-editor .product-media-manager > div,
.product-editor .product-spec-card-values > div,
.product-editor .product-sku-area {
  min-width: 0;
}

.product-editor .product-spec-card-head,
.product-editor .product-sku-batch,
.product-editor .goods-type-cards {
  flex-wrap: wrap;
}

.product-editor .product-spec-actions > .muted {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 700px) {
  .modal.product-modal .product-editor .product-setting-row,
  .modal.product-modal .product-editor .product-media-manager,
  .modal.product-modal .product-editor .form-grid > .field,
  .modal.product-modal .product-editor .product-detail-content-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .modal.product-modal .product-editor .product-detail-content-field > :not(label) {
    grid-column: 1;
  }
  .modal.product-modal .product-editor .goods-category-label {
    flex-basis: 100%;
  }
}

.editor-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.editor-summary > div {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px;
  display: grid;
  gap: 5px;
}

.editor-summary strong {
  font-size: 16px;
}

.editor-section {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}

.product-detail-editor .product-detail-content-field {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 8px;
  column-gap: 22px;
  margin-bottom: 18px;
}

.product-detail-content-field > :not(label) {
  grid-column: 2;
  min-width: 0;
}

.product-detail-editor .product-detail-label,
.product-detail-editor .product-media-manager > label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  padding: 0;
  text-align: left;
}

.product-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  padding: 4px 7px;
  background: #f8f9fb;
}

.product-detail-tool,
.product-detail-color-tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 29px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 6px;
  color: var(--text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.product-detail-tool:hover,
.product-detail-color-tool:hover {
  border-color: var(--line);
  background: #fff;
}

.product-detail-toolbar select {
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 6px;
  background: #fff;
  color: var(--text);
}

.product-detail-toolbar-divider {
  width: 1px;
  height: 23px;
  margin: 0 3px;
  background: var(--line);
}

.product-detail-color-tool input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.product-detail-content {
  min-height: 180px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  padding: 12px;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  outline: none;
  overflow-wrap: anywhere;
}

.product-detail-content:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 14%, transparent);
}

.product-detail-content:empty::before {
  color: #aab2c0;
  content: attr(data-placeholder);
  pointer-events: none;
}

.product-detail-source {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  padding: 12px;
  color: var(--text);
  background: #fff;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
}

.product-detail-content img {
  display: block;
  max-width: min(100%, 760px);
  height: auto;
  margin: 8px 0;
}

.product-detail-insert-image {
  color: var(--primary);
}

.goods-editor-tabs {
  display: flex;
  gap: 34px;
  border-bottom: 1px solid var(--line);
  padding: 0 6px;
}

.goods-editor-tabs button {
  position: relative;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.goods-editor-tabs button.active {
  color: var(--primary);
}

.goods-editor-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.section-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.goods-type-section,
.goods-category-section {
  padding: 0;
}

.goods-type-section .section-title,
.goods-category-section .section-title {
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.product-editor > .editor-section > .section-title {
  margin: -14px -14px 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  background: #fbfcfe;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.product-editor > .goods-type-section > .section-title,
.product-editor > .goods-category-section > .section-title {
  margin: 0;
}

.goods-type-cards {
  display: flex;
  gap: 18px;
  padding: 22px 28px;
}

.goods-type-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 230px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: linear-gradient(135deg, #fff 0%, #fff 58%, #eef6ff 58%, #dcecff 100%);
  padding: 0 22px;
  overflow: hidden;
  cursor: pointer;
}

.goods-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.goods-type-card strong {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 18px;
}

.goods-type-card em {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-style: normal;
}

.goods-type-card.active,
.goods-type-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}

.goods-type-card.active::after,
.goods-type-card:has(input:checked)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-bottom: 30px solid var(--primary);
  border-left: 30px solid transparent;
  content: "";
}

.goods-type-card.active::before,
.goods-type-card:has(input:checked)::before {
  position: absolute;
  right: 4px;
  bottom: 1px;
  z-index: 2;
  color: #fff;
  content: "✓";
  font-size: 13px;
  font-weight: 900;
}

.goods-category-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 92px;
  padding: 22px 28px;
}

.required-star {
  color: #ff4d4f;
}

.goods-category-label {
  color: var(--text);
  font-weight: 700;
}

.goods-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  border-radius: 5px;
  background: #fff7e6;
  color: #d48806;
  padding: 0 14px;
}

.goods-category-tag em {
  color: #fa8c16;
  font-style: normal;
}

.product-setting-lines {
  display: grid;
  gap: 20px;
}

.product-setting-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.product-setting-row > label {
  color: var(--muted);
  padding-top: 10px;
  text-align: right;
  padding-left: 0;
  font-size: 14px;
}

.product-setting-control {
  min-width: 0;
}

.product-input-wrap {
  position: relative;
}

.product-input-wrap.compact-20 {
  width: min(100%, 587px);
}

.product-input-wrap input,
.product-input-wrap textarea,
.product-video-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 11px 54px 11px 14px;
}

.product-input-wrap input,
.product-video-row input {
  height: 42px;
}

.product-input-wrap textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.7;
}

.product-input-wrap input:focus,
.product-input-wrap textarea:focus,
.product-video-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.product-text-counter {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.product-video-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
}

.product-tag-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.product-tag-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.product-tag-choice input {
  width: 14px;
  height: 14px;
  accent-color: #1677ff;
}

.product-tags-empty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-inventory-lines {
  max-width: 980px;
}

.product-inventory-lines:has(.product-spec-full-row) {
  max-width: none;
}

.product-inventory-lines .product-setting-control > input,
.product-inventory-lines .product-input-wrap {
  width: min(100%, 224px);
}

.product-editor .goods-category-tag:empty {
  display: none;
}

.product-editor .product-code-row .product-input-wrap,
.product-editor .product-code-row .product-setting-control > input {
  width: min(100%, 336px);
}

.product-editor .product-weight-unit {
  min-height: 42px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  background: #f5f7fa;
  color: var(--muted);
  font: inherit;
  font-weight: 400;
  box-shadow: none;
  cursor: pointer;
}

.product-editor .product-weight-unit:focus-visible {
  outline: 1px solid var(--primary);
  outline-offset: -2px;
}

.product-editor input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]),
.product-editor textarea,
.product-editor select {
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  padding: 9px 12px;
  box-shadow: none;
}

.product-editor .product-input-wrap input,
.product-editor .product-input-wrap textarea {
  padding-right: 54px;
}

.product-editor input:focus,
.product-editor textarea:focus,
.product-editor select:focus,
.product-editor .product-detail-content:focus {
  border-color: var(--primary);
  box-shadow: none;
  outline: none;
}

.product-editor input::placeholder,
.product-editor textarea::placeholder {
  color: transparent;
}

.product-editor .product-detail-content:empty::before {
  content: none;
}

.product-editor .product-unit-input {
  width: 224px;
  grid-template-columns: minmax(0, 1fr) 64px;
}

.product-editor .product-unit-input input {
  width: 100%;
  border-radius: 5px 0 0 5px;
}

.product-inventory-lines .product-setting-control > input,
.product-inventory-lines .product-input-wrap input,
.product-inventory-lines .product-unit-input input {
  border-color: #d9e1ec;
}

.product-inventory-lines .product-setting-control > select {
  width: 112px;
}

.product-unit-input {
  display: grid;
  grid-template-columns: 112px 56px;
  width: 168px;
  max-width: 100%;
}

.product-unit-input input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.product-unit-input span {
  min-height: 42px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  background: #f5f7fa;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.product-form-note {
  margin-top: 8px;
  font-size: 12px;
}

.product-spec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fafbfc;
}

.product-spec-full-row {
  grid-template-columns: 210px minmax(0, calc(100vw - 360px));
}

.product-spec-full-row .product-setting-control {
  width: min(100%, calc(100vw - 380px));
}

.product-spec-full-row .product-spec-actions {
  width: 100%;
}

.product-selected-specs {
  flex-basis: 100%;
  min-height: 34px;
  padding-top: 4px;
}

.product-spec-card {
  border: 1px solid var(--line);
  background: #fff;
}

.product-spec-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  background: #fafafa;
}

.product-spec-card-head > label,
.product-spec-card-values > label {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.product-spec-card-head > input {
  width: 128px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.product-spec-image-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.product-spec-delete {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: #8b95a5;
  cursor: pointer;
}

.product-spec-delete:hover {
  color: #ff4d4f;
}

.product-spec-card-values {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 48px;
  padding: 10px 12px;
}

.product-spec-card-values > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-spec-style-row {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px 0;
}

.product-spec-style-row label,
.product-spec-image-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.product-spec-style-row input,
.product-spec-image-check input {
  width: 16px;
  height: 16px;
  accent-color: #409eff;
}

.product-spec-value-item {
  position: relative;
  display: inline-grid;
  gap: 8px;
  justify-items: center;
}

.product-spec-value-image {
  width: 128px;
  height: 128px;
  border: 1px solid var(--line);
  background: #fff;
  color: #1677ff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.product-spec-inline-value > input { width: 154px; min-width: 0; min-height: 38px; padding: 8px 24px 8px 10px; border: 1px solid var(--line); border-radius: 4px; font: inherit; background: #fff; }
.product-spec-value-remove { position: absolute; top: -7px; right: -5px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #4b5563; color: #fff; cursor: pointer; line-height: 20px; }
.product-spec-value-remove:hover { background: #ff4d4f; }
.product-spec-card-values > div > .link-btn { align-self: flex-start; min-height: 38px; }

.product-spec-value-image:hover {
  border-color: #1677ff;
  background: #f8fbff;
}

.product-spec-value-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-spec-value-image em {
  font-style: normal;
}

.hidden {
  display: none !important;
}

.product-spec-hint {
  margin: 0;
  padding: 0 12px 12px 82px;
}

.product-spec-actions > [data-product-sku-table] {
  flex-basis: 100%;
  min-width: 0;
  margin-left: -232px;
  width: calc(100% + 232px);
}

.product-sku-area {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.product-sku-batch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.product-sku-batch select,
.product-sku-batch input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.product-sku-batch input {
  width: 120px;
}

.product-sku-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.product-sku-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.product-sku-table th,
.product-sku-table td {
  min-width: 96px;
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}

.product-sku-table th:first-child,
.product-sku-table td:first-child {
  min-width: 74px;
}

.product-sku-table th {
  color: var(--muted);
  background: #fbfcfe;
  font-weight: 700;
}

.product-sku-table td strong {
  color: var(--text);
  font-weight: 600;
}

.product-purchase-area {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.purchase-area-field {
  grid-column: 1 / 2;
}

.product-purchase-area-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 120px;
  max-width: 520px;
  color: var(--muted);
}

.purchase-area-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 4px;
  background: #f3f4f6;
  color: var(--muted);
}

.product-purchase-area small {
  flex-basis: 100%;
  color: var(--muted);
}

.purchase-area-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 24px;
}

.purchase-area-picker {
  width: min(960px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.purchase-area-head {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.purchase-area-head strong {
  font-size: 20px;
}

.purchase-area-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}

.purchase-area-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 18px 24px 24px;
  min-height: 360px;
  overflow: hidden;
}

.purchase-area-tree-panel,
.purchase-area-selected-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  background: #fff;
}

.purchase-area-toolbar,
.purchase-area-selected-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.purchase-area-toolbar {
  justify-content: flex-start;
  gap: 10px;
}

.purchase-area-toolbar button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}

.purchase-area-toolbar button:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #eef5ff;
}

.purchase-area-tree-list,
.purchase-area-selected-list {
  padding: 10px 14px 18px;
}

.purchase-area-selected-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.purchase-area-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  padding: 0 10px;
}

.purchase-area-row.active {
  color: var(--primary);
  background: #eef5ff;
  font-weight: 700;
}

.purchase-area-name {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.purchase-area-text {
  flex: 1;
}

.purchase-area-tree-children {
  margin-left: 24px;
  padding-left: 12px;
  border-left: 1px dashed #d8e2f0;
}

.purchase-area-district-list {
  margin-bottom: 6px;
}

.purchase-area-body input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.product-sku-table input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  font: inherit;
}

.spec-picker-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 24px;
}

.spec-picker {
  width: min(760px, 92vw);
  max-height: 82vh;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.spec-picker-head {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.spec-picker-head h3 {
  margin: 0;
  font-size: 18px;
}

.spec-picker-head button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}

.spec-picker-list {
  display: grid;
  gap: 12px;
  padding: 18px 24px 24px;
  max-height: calc(82vh - 64px);
  overflow: auto;
}

.spec-picker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 16px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

.spec-picker-card:hover {
  border-color: #1677ff;
  background: #f8fbff;
}

.spec-picker-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 16px;
}

.spec-picker-card em {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-style: normal;
}

.spec-picker-card i {
  border-radius: 6px;
  background: #f3f4f6;
  color: #53627a;
  padding: 7px 12px;
  font-style: normal;
}

.spec-picker-card b {
  color: #1677ff;
  font-weight: 700;
  text-align: right;
}

.spec-picker-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.product-status-switch {
  padding-top: 4px;
}

.product-media-manager {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 0;
}

.product-media-manager > label {
  color: var(--muted);
  padding-top: 8px;
  text-align: right;
  padding-left: 0;
  font-size: 14px;
}

.product-editor .form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.product-editor .form-grid > .field {
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.product-editor .form-grid > .field > :not(label) {
  min-width: 0;
}

.product-editor .product-setting-row > label,
.product-editor .product-media-manager > label,
.product-editor .form-grid > .field > label,
.product-editor .product-detail-label,
.product-editor .goods-category-label {
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
  padding: 8px 0 0;
}

.product-editor .goods-category-picker {
  padding: 22px 14px;
  column-gap: 22px;
}

.product-editor .goods-category-label {
  flex: 0 0 210px;
  padding-top: 0;
}

.product-media-manager > label em,
.product-setting-row.required > label em {
  margin-right: 5px;
  color: #ff4d4f;
  font-style: normal;
}

.product-media-manager > label span {
  color: #53627a;
  font-size: 12px;
}

.product-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  min-height: 0;
}

.product-media-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
}

.product-media-counter span {
  min-width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1677ff;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
}

.product-media-counter em {
  color: #b4bbc8;
  font-style: normal;
  font-size: 13px;
  line-height: 1.9;
}

.product-media-thumb {
  width: 118px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 7px;
  display: grid;
  gap: 5px;
  position: relative;
  cursor: grab;
}

.product-media-thumb:active {
  cursor: grabbing;
}

.product-media-thumb > div {
  aspect-ratio: 1;
  border-radius: 5px;
  background: #f3f6fa;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #64748b;
  font-weight: 800;
}

.product-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-thumb-cell {
  display: grid;
  grid-template-columns: 48px minmax(56px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 122px;
}

.goods-thumb {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f6fa;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #64748b;
  font-weight: 800;
}

.goods-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-thumb-cell span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-media-thumb strong {
  font-size: 12px;
  text-align: center;
}

.product-media-thumb > button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #ff5b66;
  color: #fff;
  cursor: pointer;
}

.product-upload-slot,
.product-gallery-slot {
  width: 118px;
  min-height: 118px;
  border: 1px dashed #9fc8ff;
  border-radius: 5px;
  background: #f8fbff;
  color: #1677ff;
  display: inline-grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.product-gallery-slot {
  border-style: solid;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.product-upload-slot span {
  font-size: 22px;
  line-height: 1;
}

.goods-tag-form .form-grid {
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
}

.color-picker-line {
  display: grid;
  grid-template-columns: 44px 180px;
  gap: 10px;
  align-items: center;
}

.color-swatch-input {
  width: 44px;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.switch-field {
  display: contents;
}

.switch-field > span {
  color: var(--muted);
  font-size: 14px;
}

.goods-tag-preview-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 140px;
  color: var(--muted);
}

.spec-template-form {
  min-width: min(980px, 94vw);
}

.spec-template-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px 18px;
  align-items: start;
  padding: 4px 0 24px;
}

.spec-template-grid > label {
  color: var(--muted);
  text-align: right;
  padding-top: 11px;
}

.spec-template-grid > label em {
  color: #ff4d4f;
  font-style: normal;
  margin-right: 6px;
}

.spec-template-grid > input,
.spec-template-grid > select {
  width: min(520px, 100%);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 14px;
  font: inherit;
}

.spec-name-row,
.spec-style-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  min-height: 42px;
}

.spec-name-row > input {
  width: 160px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 14px;
  font: inherit;
}

.spec-check,
.spec-style-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.spec-check input,
.spec-style-row input {
  width: 16px;
  height: 16px;
  accent-color: #409eff;
}

.spec-values-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-start;
}

.spec-value-input {
  position: relative;
  width: 220px;
}

.spec-value-line {
  position: relative;
}

.spec-value-line input {
  width: 210px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 34px 0 14px;
  font: inherit;
}

.spec-value-line button {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #5f6670;
  color: #fff;
  cursor: pointer;
}

.spec-value-image {
  width: 128px;
  height: 128px;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: #1677ff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.spec-value-image:hover {
  border-color: #1677ff;
  background: #f8fbff;
}

.spec-value-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spec-template-note {
  margin-top: -4px;
  line-height: 1.8;
}

.spec-add-value {
  height: 42px;
}

.gallery-picker-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 24px;
}

.gallery-picker {
  width: 88vw;
  height: 80dvh;
  max-height: 94dvh;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.gallery-picker-head {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-picker-head button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.gallery-picker-tools {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr 160px;
  align-items: center;
  gap: 14px;
  padding: 16px 96px 16px 18px;
}
.gallery-picker-tools [data-gallery-total] { justify-self:end; color:#64748b; white-space:nowrap; font-size:20px; }
.gallery-picker-tools .gallery-upload-card { font-size:20px; }

.gallery-upload-card {
  min-height: 42px;
  border: 1px dashed #9fc8ff;
  border-radius: 6px;
  color: #1677ff;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.gallery-picker-tools input:not([type="file"]) {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
}

.gallery-picker-grid {
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: calc((100% - 36px) / 3);
  align-content: start;
  align-items: stretch;
  container-type: size;
  gap: 18px;
  padding: 0 96px 18px 18px;
}

.gallery-picker-body { display:grid; grid-template-columns:220px minmax(0,1fr); min-height:0; overflow:hidden; }
.gallery-picker-main { display:grid; grid-template-rows:auto minmax(0,1fr) auto; min-width:0; min-height:0; }
.gallery-picker-mask { padding:0; }
.gallery-group-row { display:flex; align-items:center; min-width:0; }
.gallery-group-row > .gallery-group-button { flex:1; min-width:0; }
.gallery-group-edit { flex-shrink:0; border:0; background:none; color:#1677ff; cursor:pointer; padding:6px; font-size:inherit; }
.gallery-group-edit:hover { text-decoration:underline; }
.gallery-group-modal-mask { position:absolute; inset:0; display:grid; place-items:center; padding:16px; background:rgba(15,23,42,.35); z-index:100; }
.gallery-group-modal { width:min(900px,100%); background:white; border-radius:8px; padding:28px; box-shadow:var(--shadow); }
.gallery-group-modal header { display:flex; justify-content:space-between; align-items:center; margin-bottom:32px; }
.gallery-group-modal header button { border:0; background:none; font-size:24px; cursor:pointer; }
.gallery-group-modal label { display:flex; gap:20px; align-items:center; }
.gallery-group-modal input { flex:1; min-width:0; padding:12px; border:1px solid var(--line); border-radius:6px; }
.gallery-group-modal .actions { margin-top:28px; justify-content:flex-end; }
.gallery-picker-categories { display:flex; flex-direction:column; gap:12px; padding:18px 16px; overflow:auto; border-right:1px solid var(--line); background:#f8fafc; font-size:21px; }
.gallery-picker-categories button, .gallery-picker-categories input, .gallery-picker-categories small { font-size:inherit; }
.gallery-category-heading { font-size:inherit; font-weight:600; }
.gallery-category-add { margin-top:auto; color:#1677ff; border-color:#9fc8ff; background:transparent; }
.gallery-picker-categories input { width:100%; min-width:0; padding:10px; border:1px solid var(--line); border-radius:6px; }
.gallery-picker-categories nav { display:grid; gap:4px; overflow:auto; }
.gallery-group-button { border:0; background:transparent; padding:12px; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.gallery-group-button.active { background:#eaf3ff; color:#1677ff; }
.gallery-picker-pagination { display:flex; align-items:center; justify-content:flex-end; gap:6px; min-height:62px; padding:0 96px 8px 18px; border-top:1px solid var(--line); font-size:20px; flex-wrap:wrap; }
.gallery-picker-pagination button { min-width:40px; min-height:40px; padding:4px 8px; border:1px solid var(--line); border-radius:4px; background:#fff; cursor:pointer; font-size:inherit; }
.gallery-picker-pagination button.active { color:#fff; border-color:#4096ff; background:#4096ff; }
.gallery-picker-pagination button:disabled { opacity:.4; cursor:default; }
.gallery-picker-pagination form { display:flex; align-items:center; gap:6px; margin-left:14px; }
.gallery-picker-pagination input { width:60px; height:40px; text-align:center; border:1px solid var(--line); border-radius:4px; font-size:inherit; }
.gallery-picker-footer { justify-content:space-between; padding:10px 18px; }
.gallery-picker-footer > .btn { font-size:20px; min-height:44px; padding:8px 20px; }
.gallery-picker-footer span { color:#64748b; }
.gallery-picker [hidden] { display:none!important; }
@media(max-width:640px) { .gallery-picker { width:96vw; max-height:96dvh; } .gallery-picker-body { grid-template-columns:150px minmax(0,1fr); } .gallery-picker-categories { padding:8px; } .gallery-picker-tools,.gallery-picker-grid,.gallery-picker-pagination { padding-right:18px; } .gallery-picker-tools { grid-template-columns:minmax(0,1fr) auto; } .gallery-picker-tools [data-gallery-total] { display:none; } .gallery-picker-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }

.gallery-picker-card {
  position: relative;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 22px;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.gallery-picker-card:hover {
  background: #f1f5f9;
}

.gallery-picker-card.selected {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #3b82f6;
}

.gallery-picker-image {
  position: relative;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f3f6fa;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  padding: 0;
}

.gallery-picker-card.selected .gallery-picker-image {
  border-color: #2563eb;
  background: #c7d2fe;
}

.gallery-picker-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-picker-card span {
  min-width: 0;
  color: #4b5563;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gallery-picker-card.selected span {
  color: #1d4ed8;
  font-weight: 400;
}

.spec-table {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
}

.spec-row span {
  padding: 10px;
  border-right: 1px solid var(--line);
}

.spec-row span:last-child {
  border-right: 0;
}

.spec-head {
  background: #fafbfc;
  color: #4b5563;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  margin-top: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.detail-grid strong {
  font-weight: 600;
}

.detail-grid .wide {
  grid-column: 1 / -1;
  border: 0;
  padding: 0;
  display: flex;
}

.workflow-grid {
  margin-top: 14px;
}

.module-panel-stack {
  display: grid;
  gap: 14px;
}

.module-panel .panel-head {
  align-items: center;
}

.module-panel .table-wrap {
  max-height: 360px;
}

.category-table th,
.category-table td {
  white-space: nowrap;
}

.category-table th:nth-child(3),
.category-table td:nth-child(3) {
  min-width: 220px;
}

.category-table th:last-child,
.category-table td:last-child {
  position: sticky;
  right: 0;
  min-width: 220px;
  background: #fff;
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.04);
}

.category-table th:last-child {
  background: #fafbfc;
  z-index: 2;
}

.category-table td:last-child {
  z-index: 1;
}

.category-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.category-level {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #eaf3ff;
  color: #1677ff;
}

.category-level.level-2 {
  background: #edf7f1;
  color: #16834a;
}

.category-level.level-3 {
  background: #fff5e6;
  color: #b76b00;
}

.category-tree-name {
  display: inline-flex;
  align-items: center;
  padding-left: calc(var(--depth, 0) * 24px);
  font-weight: 600;
}

.category-modal-form .form-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.category-level-field,
.category-parent-field {
  grid-column: 1 / -1;
}

.category-level-options {
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.category-level-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #243447;
}

.category-level-options input {
  width: 18px;
  height: 18px;
  accent-color: #1677ff;
}

.category-parent-field small {
  color: var(--muted);
  margin-top: 6px;
}

.micro-page-table td:nth-child(2) strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.micro-home-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #16c784;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 8px;
}

.micro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.micro-actions button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #edf5ff;
  color: #2491ff;
  font-weight: 800;
  cursor: pointer;
}

.micro-actions button.active {
  background: #2491ff;
  color: #fff;
}

.micro-actions button.danger {
  background: #ffecef;
  color: #f04455;
}

.micro-editor {
  display: grid;
  grid-template-columns: 330px minmax(390px, 1fr) 390px;
  gap: 16px;
  align-items: start;
}

.micro-side,
.micro-props {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.micro-side {
  max-height: calc(100vh - 146px);
  overflow-y: auto;
}

.micro-component-section {
  padding: 18px;
  border-bottom: 12px solid #f3f5f8;
}

.micro-bg-section {
  padding-bottom: 22px;
}

.micro-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.micro-section-head strong {
  font-size: 22px;
  color: #263547;
}

.micro-section-note {
  color: #8a98aa;
  font-size: 13px;
}

.mini-caret {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 22px;
}

.micro-setting-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.micro-setting-buttons button,
.micro-component {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #243447;
  cursor: pointer;
}

.micro-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.micro-component-section.is-attention {
  animation: micro-library-attention 1.2s ease;
}

@keyframes micro-library-attention {
  0%, 100% { background: #fff; }
  35% { background: #eaf4ff; box-shadow: inset 3px 0 #2491ff; }
}

.micro-component {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  text-align: left;
}

.micro-component span {
  color: #667384;
  font-weight: 800;
}

.micro-component strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.micro-component.active {
  border-color: #93c5fd;
  color: #2491ff;
  box-shadow: 0 8px 20px rgba(37, 145, 255, 0.15);
}

.micro-module-manage {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #2491ff;
  font-weight: 700;
  cursor: pointer;
}

.micro-used-list {
  display: grid;
  gap: 8px;
}

.micro-used-list > div {
  display: block;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px;
  background: #fff;
}

.micro-used-list > div.active {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.micro-used-list button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.micro-used-list button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.micro-used-name {
  width: 100%;
  border-color: transparent !important;
  text-align: left;
  color: #243447;
  font-weight: 700;
}

.micro-used-list button.danger {
  color: #ef4444;
}

.micro-preview-workbench {
  min-height: calc(100vh - 146px);
  display: grid;
  place-items: start center;
  padding: 0 0 26px;
}

.micro-phone-frame {
  width: 390px;
  min-height: 760px;
  background: var(--micro-bg);
  border: 1px solid #d8dee8;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.micro-phone-frame.has-floating-toolbar {
  overflow: visible;
}

.micro-status,
.micro-mini-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
}

.micro-status span:last-child,
.micro-mini-top button {
  justify-self: end;
}

.micro-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e0f7e7;
  color: #15803d;
  font-weight: 800;
}

.micro-search {
  height: 30px;
  min-width: 0;
  border: 1px solid #dfe5ec;
  border-radius: 999px;
  display: grid;
  align-items: center;
  padding: 0 12px;
  color: #1f2937;
}

.micro-mini-top button {
  border: 1px solid #dfe5ec;
  background: #fff;
  border-radius: 999px;
}

.micro-preview-component {
  position: relative;
  margin-bottom: 11px;
  cursor: pointer;
}

.micro-preview-component.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #2491ff;
  border-radius: 10px;
  pointer-events: none;
}

.micro-preview-component.active {
  z-index: 2;
}

.micro-floating-tools {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 5;
  display: grid;
  gap: 4px;
  width: 42px;
  padding: 6px;
  border: 1px solid #dce4ee;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(31, 45, 61, 0.18);
  transform: translateY(-50%);
}

.micro-floating-tools button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.micro-floating-tools button:hover:not(:disabled) {
  background: #eaf4ff;
  color: #1677ff;
}

.micro-floating-tools button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.micro-floating-tools button.danger:hover:not(:disabled) {
  background: #fff0f1;
  color: #ef4444;
}

.micro-preview-modal {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 22px;
  align-items: start;
}

.micro-preview-meta,
.micro-share-grid {
  display: grid;
  gap: 12px;
}

.micro-preview-meta > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}

.micro-preview-meta strong {
  display: block;
  margin-top: 5px;
  color: #1f2937;
  word-break: break-all;
}

.micro-preview-dialog-phone .micro-phone-frame {
  width: 330px;
  min-height: 620px;
  transform-origin: top center;
}

.micro-share-modal {
  display: grid;
  gap: 18px;
}

.micro-share-grid label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: #536274;
}

.micro-share-grid input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 12px;
  color: #1f2937;
  background: #f8fafc;
}

.micro-share-card {
  min-height: 150px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #f0f7ff;
  display: grid;
  place-items: center;
  gap: 5px;
  color: #1f5f9f;
}

.micro-share-card em {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #94a3b8;
  font-style: normal;
  font-size: 12px;
}

@media (max-width: 820px) {
  .micro-preview-modal {
    grid-template-columns: 1fr;
  }

  .micro-preview-dialog-phone {
    display: grid;
    place-items: center;
  }
}

.micro-search-block {
  height: 38px;
  margin: 8px;
  border-radius: 999px;
  display: grid;
  align-items: center;
  padding: 0 14px;
  background: var(--search-bg);
  color: var(--search-color);
  border: 1px solid #dfe5ec;
  font-size: 13px;
}

.micro-search-block.square {
  border-radius: 6px;
}

.micro-banner {
  margin: 8px;
  height: 94px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d8eeff, #ffffff 45%, #b7e7cc);
  color: #1769aa;
  font-size: 22px;
  font-weight: 900;
  position: relative;
}

.micro-banner i {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
}

.micro-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
}

.micro-nav-grid.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.micro-nav-grid button {
  border: 0;
  background: var(--nav-bg, rgba(255, 255, 255, 0.78));
  border-radius: 10px;
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 60px;
  color: #334155;
}

.micro-nav-grid span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eaf3ff;
  color: #2491ff;
  font-weight: 800;
}

.micro-nav-grid.icon-circle span {
  border-radius: 50%;
}

.micro-nav-grid.icon-plain span {
  background: transparent;
}

.micro-nav-grid em {
  font-style: normal;
  font-size: 12px;
  color: var(--nav-color, #334155);
}

.micro-notice,
.micro-coupon-row {
  margin: 8px;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.micro-coupon-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  color: #ff4040;
}

.micro-coupon-row button {
  border: 0;
  border-radius: 999px;
  background: #ff4040;
  color: #fff;
  padding: 5px 10px;
}

.micro-countdown,
.micro-title-block,
.micro-image-ad,
.micro-video-block,
.micro-user-block,
.micro-order-entry,
.micro-placeholder-block {
  margin: 8px;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.micro-countdown {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--countdown);
}

.micro-title-block {
  font-weight: 900;
  font-size: 18px;
}

.micro-title-block.center {
  text-align: center;
}

.micro-title-block.right {
  text-align: right;
}

.micro-image-ad {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0f2fe, #fef9c3);
  color: #1769aa;
  font-weight: 900;
}

.micro-video-block {
  display: grid;
  place-items: center;
  gap: 8px;
  background: #111827;
  color: #fff;
}

.micro-video-block span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
}

.micro-user-block {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
}

.micro-user-block span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf3ff;
  color: #2491ff;
  font-weight: 800;
}

.micro-user-block button,
.micro-order-entry span {
  border: 0;
  border-radius: 999px;
  background: #eaf3ff;
  color: #2491ff;
  padding: 6px 10px;
}

.micro-order-entry div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
  text-align: center;
}

.micro-display-block {
  margin: 8px;
  border-radius: 12px;
  background: var(--display-bg);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  color: #1f2937;
}

.micro-display-block span {
  grid-column: 1 / -1;
  color: var(--display-theme);
  font-size: 12px;
  font-weight: 800;
}

.micro-display-block strong {
  font-size: 17px;
}

.micro-display-block em {
  font-style: normal;
  color: #64748b;
  font-size: 13px;
}

.micro-display-block button {
  grid-row: 2 / span 2;
  grid-column: 2;
  border: 0;
  border-radius: 999px;
  background: var(--display-theme);
  color: #fff;
  padding: 7px 12px;
  font-weight: 800;
}

.micro-display-block.bar {
  grid-template-columns: auto 1fr auto;
}

.micro-display-block.bar span {
  grid-column: auto;
}

.micro-display-block.grid {
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}

.micro-display-block.grid span,
.micro-display-block.grid button {
  grid-column: auto;
  grid-row: auto;
}

.micro-display-block.countdown strong::after {
  content: " 08:29:58";
  color: var(--display-theme);
}

.micro-display-block.vip {
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
}

.micro-display-block.vip em {
  color: #d1d5db;
}

.micro-display-block.ad {
  border-style: dashed;
  background: #f8fafc;
}

.micro-placeholder-block {
  border: 1px dashed #cbd5e1;
  color: #64748b;
}

.micro-goods-area {
  margin: var(--micro-margin-top) var(--micro-margin-right) var(--micro-margin-bottom) var(--micro-margin-left);
}

.micro-goods-area.left-category {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.micro-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.micro-category-tabs.left {
  display: grid;
  margin-bottom: 0;
}

.micro-category-tabs button {
  min-width: 58px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--micro-unselected-color);
  font-weight: 700;
}

.micro-category-tabs button.active {
  color: var(--micro-selected-color);
  background: color-mix(in srgb, var(--micro-selected-color) 12%, #fff);
}

.micro-category-tabs.style2 button {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.micro-category-tabs.style3 button {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
}

.micro-category-tabs.style3 button.active {
  border-bottom-color: var(--micro-selected-color);
}

.micro-category-tabs.style4 button.active {
  background: var(--micro-selected-color);
  color: #fff;
}

.micro-goods-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--micro-gap);
  padding: 0;
}

.micro-goods-grid.layout-one {
  grid-template-columns: 1fr;
}

.micro-goods-grid.layout-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.micro-goods-grid.layout-waterfall article:nth-child(2n) .micro-goods-img {
  aspect-ratio: 1 / 1.18;
}

.micro-goods-grid article {
  position: relative;
  min-width: 0;
  border-radius: var(--micro-card-radius);
  background: var(--micro-card-bg);
  overflow: hidden;
  padding-bottom: 10px;
}

.micro-goods-grid.card-plain article {
  border-radius: 5px;
}

.micro-goods-grid.card-compact article {
  padding-bottom: 6px;
}

.micro-goods-img {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #f1f7ff, #ffffff);
  color: #3b82f6;
  font-size: 46px;
  font-weight: 900;
  overflow: hidden;
  border-radius: var(--micro-image-radius);
}

.micro-goods-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.micro-goods-grid.fill-contain .micro-goods-img img {
  object-fit: contain;
  padding: 8px;
}

.micro-goods-grid.image-wide .micro-goods-img {
  aspect-ratio: 4 / 3;
}

.micro-goods-grid.image-tall .micro-goods-img {
  aspect-ratio: 3 / 4;
}

.micro-goods-img small {
  position: absolute;
  left: 0;
  bottom: 0;
  background: #ff4040;
  color: #fff;
  font-size: 12px;
  padding: 5px 7px;
}

.micro-goods-grid article strong,
.micro-goods-grid article span,
.micro-goods-grid article em {
  display: block;
  padding: 0 10px;
}

.micro-goods-grid article strong {
  height: 42px;
  margin-top: 9px;
  line-height: 1.4;
  overflow: hidden;
}

.micro-custom-module-preview {
  display: grid;
  gap: 8px;
}

.micro-custom-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.micro-custom-title strong {
  font-size: 15px;
  color: #1f2937;
}

.micro-custom-title span {
  color: var(--muted);
  font-size: 12px;
}

.micro-goods-grid article span {
  width: fit-content;
  margin: 4px 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffecec;
  color: var(--micro-label-color);
  font-size: 12px;
}

.micro-goods-grid article em {
  color: var(--micro-selected-color);
  font-style: normal;
  font-size: var(--micro-price-size);
  font-weight: 800;
}

.micro-goods-grid article strong {
  display: -webkit-box;
  -webkit-line-clamp: var(--micro-title-lines);
  -webkit-box-orient: vertical;
  height: auto;
  min-height: calc(var(--micro-title-lines) * 20px);
}

.micro-goods-grid.text-center article strong,
.micro-goods-grid.text-center article span,
.micro-goods-grid.text-center article em,
.micro-goods-grid.text-center article small {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.micro-goods-sold {
  display: block;
  padding: 2px 10px 0;
  color: #94a3b8;
  font-size: 11px;
}

.micro-cart-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #c9f7c5;
  color: #258b37;
  font-weight: 800;
}

.micro-goods-grid.cart-text .micro-cart-btn {
  width: auto;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--micro-selected-color);
  color: #fff;
}

.micro-props-head {
  padding: 20px 20px 12px;
  border-left: 5px solid #2491ff;
  font-size: 22px;
}

.micro-prop-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.micro-prop-tabs button {
  min-height: 48px;
  border: 0;
  background: #fff;
  color: #263547;
  cursor: pointer;
}

.micro-prop-tabs button.active {
  color: #2491ff;
  border-bottom: 2px solid #2491ff;
}

.micro-prop-body {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.micro-config-note {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  line-height: 1.6;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.micro-config-note button {
  border: 1px solid #93c5fd;
  border-radius: 5px;
  background: #fff;
  color: #1677ff;
  padding: 5px 10px;
  white-space: nowrap;
  cursor: pointer;
}

.micro-switch-row,
.micro-color-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.micro-switch-row .mini-switch {
  width: auto;
  height: auto;
  background: transparent;
  padding: 0;
}

.micro-switch-row .mini-switch span {
  width: 46px;
  height: 24px;
}

.micro-switch-row .mini-switch span::after {
  width: 20px;
  height: 20px;
}

.micro-switch-row .mini-switch input:checked + span::after {
  left: 24px;
}

.micro-radio-block {
  display: grid;
  grid-template-columns: 92px repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.micro-radio-block span {
  color: var(--muted);
}

.micro-radio-block label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.micro-radio-block small {
  grid-column: 2 / -1;
  color: var(--muted);
}

.micro-color-row input[type="color"] {
  width: 36px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
}

.micro-color-row {
  grid-template-columns: 92px 36px 118px;
}

.micro-color-row input:not([type="color"]) {
  width: 118px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
}

.micro-product-config {
  display: grid;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.micro-auto-rules {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fbff;
}

.micro-product-select-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.micro-product-select-row > span {
  color: var(--muted);
  padding-top: 34px;
}

.micro-product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.micro-product-add,
.micro-product-thumb {
  width: 86px;
  min-height: 94px;
  border: 1px dashed #d5dde8;
  border-radius: 5px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  text-align: center;
  color: #8b97a8;
  position: relative;
  overflow: hidden;
}

.micro-product-add {
  cursor: pointer;
}

.micro-product-add strong {
  font-size: 32px;
  line-height: 1;
  font-weight: 400;
}

.micro-product-add em,
.micro-product-thumb small {
  font-style: normal;
  font-size: 12px;
}

.micro-product-thumb {
  border-style: solid;
  background: #fff;
  color: #1f2937;
  padding: 5px;
  gap: 4px;
}

.micro-product-thumb div,
.picker-media,
.micro-display-products article div {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #eef2f7;
  display: grid;
  place-items: center;
  color: #64748b;
  overflow: hidden;
  font-weight: 700;
}

.micro-product-thumb img,
.picker-media img,
.micro-display-products img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.micro-product-thumb strong {
  width: 100%;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.micro-product-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #ffedf0;
  color: #ef4444;
  cursor: pointer;
}

.micro-product-order {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2491ff;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
}

.micro-product-move {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: flex;
  gap: 2px;
}

.micro-product-move button {
  position: static;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(36, 145, 255, 0.12);
  color: #2491ff;
}

.micro-product-move button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.micro-product-picker {
  width: min(720px, 80vw);
  display: grid;
  gap: 14px;
}

.micro-product-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.micro-product-picker-head input {
  flex: 1;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 12px;
}

.micro-product-picker-head span {
  color: var(--muted);
  white-space: nowrap;
}

.micro-product-picker-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.micro-product-picker-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.micro-product-picker-toolbar select {
  height: 32px;
  min-width: 110px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 0 8px;
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #d8e2ef;
  border-radius: 6px;
  background: #fff;
}

.segmented button {
  height: 32px;
  border: 0;
  border-right: 1px solid #d8e2ef;
  background: #fff;
  color: #526172;
  padding: 0 12px;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: #2491ff;
  color: #fff;
}

.micro-product-picker-list {
  max-height: 480px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.micro-product-picker-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.micro-product-picker-row:last-child {
  border-bottom: 0;
}

.micro-product-picker-row.selected {
  background: #f0f7ff;
}

.micro-product-picker-row strong,
.micro-product-picker-row span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.micro-product-picker-row span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.micro-product-picker-row button {
  height: 32px;
  border: 1px solid #2491ff;
  border-radius: 5px;
  background: #fff;
  color: #2491ff;
  cursor: pointer;
}

.micro-product-picker-row button.selected {
  background: #2491ff;
  color: #fff;
}

.custom-module-apply {
  width: min(920px, 82vw);
  display: grid;
  gap: 14px;
}

.custom-module-delete {
  width: min(620px, 78vw);
  display: grid;
  gap: 14px;
}

.module-page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 160px;
}

.module-page-chip {
  border: 1px solid #d8e7ff;
  border-radius: 999px;
  background: #f4f8ff;
  color: #1677ff;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.module-page-chip em,
.module-page-chips > span {
  color: #8b97a8;
  font-style: normal;
  font-size: 12px;
}

.module-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.module-mini-stats div {
  border: 1px solid #e8eef6;
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
}

.module-mini-stats span,
.module-used-pages p {
  color: var(--muted);
}

.module-mini-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.module-used-pages {
  display: grid;
  gap: 8px;
}

.module-used-pages button {
  border: 1px solid #e8eef6;
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.module-used-pages button span {
  color: var(--muted);
}

.module-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-note {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.picker-actions {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.picker-actions em {
  color: #2491ff;
  font-style: normal;
  font-size: 12px;
}

.micro-display-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.micro-display-products article {
  min-width: 0;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  display: grid;
  gap: 4px;
}

.micro-display-products article strong {
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.micro-display-products article em {
  color: var(--display-theme);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.micro-number-grid,
.micro-spacing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.micro-text-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.micro-text-row span {
  color: var(--muted);
}

.micro-text-row input,
.micro-text-row select {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
}

.micro-number-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.micro-number-row span {
  color: var(--muted);
}

.micro-number-row input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
}

.micro-number-row em {
  color: var(--muted);
  font-style: normal;
}

.micro-preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.micro-preset-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 980px) {
  .product-editor-mask {
    left: 64px;
  }

  .shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sub-nav {
    display: none;
  }

  .content {
    grid-column: 2;
  }

  .topbar {
    grid-column: 1 / 3;
  }

  .mobile-subnav {
    display: flex;
  }

  .platform-tabs {
    display: none;
  }

  .stats-grid,
  .source-user-summary,
  .ops-summary,
  .filters,
  .split,
  .color-module,
  .color-grid,
  .form-grid,
  .detail-grid,
  .editor-summary,
  .steps,
  .app-grid,
  .stats-grid.compact {
    grid-template-columns: 1fr;
  }

  .permission-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .permission-group-title {
    line-height: 1.4;
  }

  .permission-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .shortcut-grid,
  .micro-editor {
    grid-template-columns: 1fr;
  }

  .micro-side {
    max-height: none;
  }

  .micro-phone-frame {
    width: min(100%, 390px);
  }

  .setting-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .setting-row > span {
    width: auto;
    flex: 0 0 auto;
  }

  .spec-row {
    grid-template-columns: 1fr;
  }

  .spec-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
.spec-template-simple{min-width:0}.modal:has(.spec-template-simple){width:min(1120px,94vw);max-width:1120px}.spec-template-simple .spec-template-grid{grid-template-columns:110px minmax(0,1fr);gap:26px 16px;padding:28px 0 40px;min-height:160px}.spec-template-simple .spec-name-row>input{width:min(360px,100%)}.spec-template-simple .spec-values-editor{max-height:45vh;overflow-y:auto;overflow-x:hidden;padding:12px 14px 12px 0;margin-top:-12px;scrollbar-gutter:stable}.spec-template-simple .spec-value-input{width:180px}.spec-template-simple .spec-value-line input{width:100%}.spec-template-simple .spec-value-line button{right:-8px;top:-8px;width:18px;height:18px;font-size:13px}.spec-template-simple .spec-add-value{min-height:42px;white-space:nowrap}.spec-template-simple .modal-actions{justify-content:flex-end}.spec-template-list th:first-child{width:24%}.spec-template-list th:last-child{width:160px}.spec-template-list .goods-category-tag{margin:4px 8px 4px 0}@media(max-width:600px){.spec-template-simple .spec-template-grid{grid-template-columns:70px minmax(0,1fr);gap:20px 10px;padding-top:12px}.spec-template-simple .spec-value-input{width:min(180px,100%)}.spec-template-list th:last-child{width:125px}}
.spec-template-form.spec-template-simple{min-width:0}
.spec-picker.spec-picker-columns{width:min(1060px,94vw);max-height:90vh;display:flex;flex-direction:column}.spec-picker-help{padding:16px 24px;color:#8291a7}.spec-picker-two-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:0 24px;min-height:0}.spec-picker-two-columns section{min-width:0}.spec-picker-two-columns h4{margin:0;background:#f5f7fa;padding:14px 18px;font-weight:400;color:#8291a7}.spec-picker-scroll{height:clamp(200px,42vh,420px);overflow:auto;padding:14px 0}.spec-picker-name{display:flex;align-items:center;gap:12px;padding:10px 18px}.spec-picker-name.active{background:#edf5ff}.spec-picker-name button{flex:1;text-align:left;border:0;background:transparent;padding:6px;color:inherit;cursor:pointer}.spec-picker-name input,.spec-picker-value input{width:auto;flex:none}.spec-picker-value{display:flex;align-items:center;gap:12px;padding:14px 18px;cursor:pointer}.spec-picker-footer{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 24px;border-top:1px solid #edf0f5}.spec-picker-footer>span{margin-right:auto;color:#8291a7}.product-spec-actions>[data-product-selected-specs]{width:100%}.product-selected-specs>.product-spec-card+.product-spec-card{margin-top:14px}@media(max-width:600px){.spec-picker-two-columns{gap:12px;padding:0 12px;grid-template-columns:1fr 1fr}.spec-picker-name,.spec-picker-value{padding:12px 8px}.spec-picker-footer{padding:14px 12px}}
.product-spec-full-row .product-spec-actions>[data-product-sku-table]{flex:0 0 calc(100% + 232px);width:calc(100% + 232px)}@media(max-width:700px){.product-spec-full-row .product-spec-actions>[data-product-sku-table]{flex-basis:100%;width:100%;margin-left:0}}
.template-market-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px;padding:20px}.template-market-card{border:1px solid #e6ebf2;border-radius:14px;padding:16px;background:#fff}.template-market-card h3{margin:12px 0 6px}.template-market-card p{min-height:42px;color:#64748b}.template-market-card .btn{margin-top:14px;width:100%}.template-cover{height:130px;border-radius:10px;background:linear-gradient(135deg,#e9f3ff,#f6f9fd);display:grid;place-items:center;color:#2178ff;font-size:42px;overflow:hidden}.template-cover img{width:100%;height:100%;object-fit:cover}.studio-editor{display:grid;gap:16px;margin-bottom:18px}.studio-editor>label,.studio-auth-settings>label{display:grid;gap:8px;color:#475569}.studio-editor input,.studio-editor textarea,.studio-auth-settings input{min-height:42px;border:1px solid #d8e0eb;border-radius:8px;padding:8px 12px}.studio-fields{display:grid;gap:10px}.studio-field-row{display:grid;grid-template-columns:140px minmax(160px,1fr) minmax(180px,1fr) 90px 74px;gap:10px;align-items:center}.studio-field-row select,.studio-field-row input{height:40px;border:1px solid #d8e0eb;border-radius:8px;padding:0 10px}.studio-auth-layout{display:grid;grid-template-columns:minmax(420px,1fr) 330px;gap:32px}.studio-auth-settings{display:grid;gap:16px}.switch-line{display:flex!important;grid-template-columns:none!important;align-items:center;gap:10px}.switch-line input{min-height:0;width:18px;height:18px}.hotspot-box{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;border:1px solid #e1e7ef;border-radius:10px;padding:12px}.hotspot-box legend{padding:0 6px}.hotspot-box label{display:grid;gap:5px}.auth-phone-preview{position:relative;aspect-ratio:9/16;border:10px solid #20252b;border-radius:30px;background:#f4f7fb center/cover no-repeat;overflow:hidden}.auth-placeholder{height:100%;display:grid;place-items:center;color:#94a3b8}.auth-hotspot{position:absolute;border:2px dashed #2178ff;background:rgba(33,120,255,.14);display:grid;place-items:center;font-size:12px;color:#155dcc}.auth-hotspot.cancel{border-color:#f59e0b;background:rgba(245,158,11,.14);color:#b45309}@media(max-width:900px){.studio-auth-layout{grid-template-columns:1fr}.auth-phone-preview{max-width:320px}.studio-field-row{grid-template-columns:1fr 1fr}.studio-field-row>*{min-width:0}}
