:root {
  --aside-bg: #050a31;
  --aside-text: rgba(255, 255, 255, 0.85);
  --aside-text-muted: rgba(255, 255, 255, 0.65);
  --aside-active: #006eff;
  --sub-bg: #fafafa;
  --sub-text: #19191b;
  --sub-active: #006eff;
  --workspace-bg: #f3f5f7;
  --header-h: 58px;
  --aside-w: 145px;
  --sub-w: 145px;
  --page-bg: #f3f5f7;
  --panel-bg: #fff;
  --text: #323232;
  --muted: #8c8c8c;
  --border: #e8e8e8;
  --accent: #006eff;
  --accent-hover: #0057cc;
  --danger: #ff4d4f;
  --success: #52c41a;
  --warning: #faad14;
  --radius: 2px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --density-pad: 16px;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* 布局：左侧通高一级栏 + 右侧工作区 */
.app-shell {
  display: flex;
  height: 100%;
  min-width: 1100px;
  background: var(--workspace-bg);
}
.app-shell.collapsed { --aside-w: 64px; }

/* —— 一级深色侧栏（通高） —— */
.aside {
  flex: 0 0 var(--aside-w);
  width: var(--aside-w);
  background: var(--aside-bg);
  color: var(--aside-text);
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow: hidden;
}
.aside-brand {
  flex: 0 0 var(--header-h);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 15px;
}
.brand-logo {
  height: 20px;
  width: auto;
  display: block;
  max-width: 98px;
}
.collapse-btn {
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
  border: 0;
  padding: 0;
  margin-left: 8px;
  background: transparent;
  color: #bbbbbb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.collapse-btn:hover { color: #fff; }
.app-shell.collapsed .aside-brand { justify-content: center; padding: 0; }
.app-shell.collapsed .collapse-btn { margin-left: 0; }

.aside-menu {
  flex: 1;
  overflow: auto;
  padding: 4px 0 16px;
}
.aside-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  margin: 4px 0;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  border-radius: 0;
  transition: background .15s ease;
}
.aside-item:hover { background: rgba(255, 255, 255, 0.06); }
.aside-item.active {
  background: var(--aside-active);
  color: #fff;
}
.aside-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}
.aside-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 40px;
  color: inherit;
}
.app-shell.collapsed .aside-item {
  justify-content: center;
  padding: 0;
}
.app-shell.collapsed .aside-label { display: none; }

/* —— 右侧工作区 —— */
.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--workspace-bg);
}
.topbar {
  flex: 0 0 var(--header-h);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  background: #fff;
  z-index: 20;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #323232;
  font-size: 14px;
}
.topbar-link {
  color: #323232;
  height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}
.topbar-link:hover { color: var(--accent); }
.topbar-divider {
  width: 1px;
  height: 20px;
  background: #e8e8e8;
}
.topbar-org {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #69b1ff, #006eff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.workspace-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* —— 二级菜单 —— */
.submenu {
  flex: 0 0 var(--sub-w);
  width: var(--sub-w);
  background: var(--sub-bg);
  overflow: auto;
  padding: 15px 0 16px;
}
.submenu-group { margin: 0; }
.submenu-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--sub-text);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}
.submenu-group-title:hover { color: var(--sub-active); }
.submenu-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--sub-text);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  border-radius: 0;
}
.submenu-item.child {
  height: 32px;
  margin: 2px 0;
  padding: 0 16px 0 32px;
  font-size: 13px;
}
.submenu-item:hover { color: var(--sub-active); }
.submenu-item.active {
  color: var(--sub-active);
  background: transparent;
  font-weight: 400;
}
.submenu-children { padding: 0; }
.chev-down {
  width: 12px;
  height: 12px;
  display: inline-flex;
  color: rgba(0, 0, 0, 0.45);
  transition: transform .18s ease;
}
.chev-down.open { transform: rotate(180deg); }

/* —— Main —— */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--workspace-bg);
}

.breadcrumb .crumb-link {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.breadcrumb .crumb-link:hover { color: var(--accent); }

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.table-toolbar:has(> :nth-child(2)) {
  justify-content: space-between;
}

.board-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 180px);
}
.board-meta-panel {
  margin-bottom: 0;
  padding: 18px 24px 16px;
}
.board-meta-hd {
  margin-bottom: 12px;
}
.board-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.board-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  line-height: 1.4;
}
.board-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.88);
  line-height: 1.5;
}
.board-meta-inline em {
  font-style: normal;
  color: rgba(0, 0, 0, 0.45);
  margin-right: 8px;
}
.board-metrics-panel {
  margin-bottom: 0;
  padding: 16px 20px 20px;
  flex: 1;
}
.board-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.board-metric-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.board-metric-card-hd {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f5f5f5;
}
.board-metric-card-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  line-height: 1.4;
}
.board-metric-card-desc {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  line-height: 1.4;
}
.board-metric-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.board-metric-block {
  min-width: 0;
  padding: 4px 0;
}
.board-metric-pair .board-metric-block + .board-metric-block {
  padding-left: 16px;
  border-left: 1px solid #f0f0f0;
}
.board-metric-label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  margin-bottom: 8px;
}
.board-metric-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.2;
}
.board-metric-num {
  font-size: 28px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  letter-spacing: -0.02em;
  word-break: break-all;
}
.board-metric-unit {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}
.board-page-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.detail-page-body { padding: 0 16px 16px; background: #fff; }
.detail-table-panel .table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.detail-meta-header {
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 24px;
  justify-content: flex-start !important;
}
.detail-meta-header span {
  white-space: nowrap;
}

@media (max-width: 960px) {
  .board-metric-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .board-metric-pair { grid-template-columns: 1fr; }
  .board-metric-pair .board-metric-block + .board-metric-block {
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
  }
  .board-page-footer { flex-wrap: wrap; }
}

.store-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  font-size: 14px;
  color: rgb(51, 51, 51);
}

.store-detail-summary {
  margin-top: 0;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}
.store-detail-summary .summary-row {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
}
.store-detail-summary .summary-label {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  color: rgb(50, 50, 50);
  font-size: 14px;
}
.store-detail-summary .summary-value {
  width: 28%;
  min-width: 140px;
  padding: 12px 16px;
  text-align: center;
  color: rgb(50, 50, 50);
  font-size: 14px;
  border-left: 1px solid #f0f0f0;
}

.store-detail-modal .ant-modal-body {
  overflow-x: hidden;
}
.store-detail-modal .ant-table-body,
.store-detail-modal .ant-table-content,
.store-detail-modal .ant-table-container {
  overflow-x: hidden !important;
}
.store-detail-modal .ant-table {
  width: 100% !important;
}
.store-detail-modal .ant-table-thead > tr > th,
.store-detail-modal .ant-table-tbody > tr > td {
  white-space: normal;
  word-break: break-all;
}
.store-detail-modal .ant-table-thead > tr > th:last-child,
.store-detail-modal .ant-table-tbody > tr > td:last-child {
  white-space: nowrap !important;
  word-break: keep-all;
}

.store-detail-footer {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 4px;
}
.store-detail-footer .ant-btn + .ant-btn {
  margin-left: 16px;
}
.store-detail-modal .ant-modal-footer {
  border-top: none;
  padding-top: 8px;
}

.settle-fee-table {
  width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  font-size: 14px;
}
.settle-fee-table td {
  border: 1px solid #f0f0f0;
  padding: 12px 16px;
  text-align: center;
}
.settle-fee-table td:first-child {
  width: 70%;
  color: rgb(50, 50, 50);
}
.settle-fee-table td:last-child {
  width: 30%;
  color: rgb(50, 50, 50);
}

.breadcrumb {  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text); }

.content {
  padding: var(--density-pad) 20px 28px;
  flex: 1;
}

.panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  padding: 16px 16px 0;
  margin-bottom: 12px;
}
.search-panel {
  overflow: visible;
  position: relative;
  z-index: 5;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 16px;
}
.field {
  display: flex;
  align-items: center;
  min-width: 0;
}
.field > label {
  flex: 0 0 100px;
  width: 100px;
  color: rgba(0, 0, 0, 0.88);
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
  line-height: 32px;
}
.field > label::after {
  content: ":";
  margin: 0 8px 0 2px;
}
.field > .ant-input,
.field > .ant-input-affix-wrapper,
.field > .ant-select,
.field > .ant-picker,
.field > .ant-cascader,
.field > .ant-input-number,
.field > .ant-space-compact {
  flex: 1;
  min-width: 0;
}

.filter-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px 0 16px;
  grid-column: 1 / -1;
}

.table-panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-panel.detail-table-panel {
  overflow: visible;
}
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
}
.ops {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  white-space: nowrap;
}

.reject-banner {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  font-size: 13px;
}
.meta-banner {
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 13px;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.meta-k {
  color: var(--muted);
}
.required-inline::before {
  content: "*";
  color: var(--danger);
  margin-right: 4px;
}
.store-pick-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}
.store-pick-filters .field {
  min-width: 0;
}
.store-pick-filters .field > label {
  flex: 0 0 72px;
  width: 72px;
}
.empty-hint {
  text-align: center;
  color: #bfbfbf;
  padding: 36px 12px;
  font-size: 13px;
}

.footer-note {
  text-align: center;
  color: #bfbfbf;
  font-size: 12px;
  padding: 16px 0 8px;
}
.footer-note::after { content: none; }

/* —— Placeholder module —— */
.placeholder {
  background: #fff;
  min-height: 420px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}
.placeholder h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
}
.placeholder p { margin: 0; font-size: 13px; }
.tag-lite {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 110, 255, 0.08);
  color: var(--accent);
  font-size: 12px;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  z-index: 1001;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: slideIn .2s ease;
}
.drawer-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.drawer-bd { padding: 20px; overflow: auto; flex: 1; }
.kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 12px;
  font-size: 13px;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); }

.rules-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - 160px);
}
.rules-panel {
  background: #fff;
  border-radius: 4px;
  padding: 20px 24px 28px;
}
.rules-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.rules-form { display: grid; gap: 28px; }
.rules-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
}
.rules-item > label {
  text-align: right;
  line-height: 32px;
  color: rgba(0, 0, 0, 0.88);
  white-space: nowrap;
  font-size: 14px;
}
.rules-item.required > label::before {
  content: "*";
  color: var(--danger);
  margin-right: 4px;
}
.rules-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  min-width: 0;
}
.rules-item-radio .rules-control {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.rules-input { width: 200px; }
.rules-input-sm { width: 120px; }
.rules-input .control {
  width: 100%;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px 0 0 6px;
  padding: 4px 11px;
}
.rules-hint {
  color: #8c8c8c;
  font-size: 13px;
  line-height: 1.5;
}
.rules-hint-block { margin-top: 2px; }
.rules-radios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}
.rules-radios .radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.rules-radios .radio input { width: 16px; height: 16px; }
.rules-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rules-inline-text {
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.rules-footer {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}

.cell-ellipsis {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-form { display: grid; gap: 12px; padding-bottom: 88px; }
.activity-form-panel {
  background: #fff;
  border-radius: 2px;
  padding: 20px;
}
.form-section-title {
  margin: 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.activity-form-panel > .form-section-title:first-child {
  margin-top: 0;
}
.form-section-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.form-section-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 8px 0 16px;
}
.store-manage-title {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
.store-manage-name { flex: 0 0 auto; }
.store-manage-desc {
  flex: 1 1 0%;
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #999;
  line-height: 1.6;
}
.store-manage-title .btn-ghost {
  flex: 0 0 auto;
  margin-left: 12px;
  align-self: center;
}
.form-grid-2 {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0;
  row-gap: 0;
  margin-bottom: 8px;
}
.form-grid-2 > .form-item {
  width: 520px;
  max-width: 100%;
}
.form-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: 0 10px;
  margin-bottom: 30px;
}
.form-item-full { width: 100%; }
.form-item > label {
  text-align: right;
  color: rgba(0, 0, 0, 0.88);
  line-height: 32px;
  white-space: nowrap;
  font-size: 14px;
}
.form-item.required > label::before {
  content: "*";
  color: var(--danger);
  margin-right: 4px;
}
.form-control-wrap { min-width: 0; position: relative; }
.control-w { width: 360px; max-width: 100%; }
.form-control-wrap > .control,
.form-control-wrap .affix-input .control,
.activity-form-panel .control {
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 4px 11px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 14px;
  width: 100%;
}
.form-control-wrap > .control:hover,
.form-control-wrap .affix-input .control:hover,
.activity-form-panel .control:hover {
  border-color: var(--accent);
}
.form-control-wrap > .control:focus,
.form-control-wrap .affix-input .control:focus,
.activity-form-panel .control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.12);
}
.form-control-wrap .control-w.range-picker,
.form-control-wrap .control-w.select-wrap,
.form-control-wrap .control-w.affix-input {
  width: 360px;
  max-width: 100%;
}
.form-readonly {
  min-height: 32px;
  line-height: 32px;
  color: var(--text);
  word-break: break-all;
}
.char-count {
  position: absolute;
  right: 10px;
  top: 8px;
  color: #bfbfbf;
  font-size: 12px;
  pointer-events: none;
}
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.affix-input {
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.affix-input .control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
}
.affix-input .affix {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  background: #fafafa;
  border: 1px solid #d9d9d9;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: #595959;
  font-size: 13px;
}
.check-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; min-height: 32px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check.disabled { opacity: 0.45; cursor: not-allowed; }
.check input { width: 14px; height: 14px; }

.ratio-group {
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  padding: 0 0 20px;
  margin-bottom: 20px;
  background: transparent;
  overflow: visible;
}
.ratio-group-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin: 0;
  background: #f9f9f9;
  border-bottom: 1px solid #d7d7d7;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}
.ratio-group-hd .btn-link {
  margin-left: 10px;
  color: var(--accent);
  padding: 0;
  height: auto;
  border: 0;
  background: transparent;
}
.ratio-group-hd .btn-link:disabled,
.ratio-group-hd .btn-link[disabled] {
  color: rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
}
.ratio-group-body { padding-top: 10px; }
.ratio-title-item {
  margin: 10px 0 6px;
  padding: 0;
}
.ratio-title-item > label { width: 150px; }
.ratio-fields-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
}
.ratio-fields-row > .ratio-field-item {
  width: auto;
  max-width: none;
  margin-bottom: 20px;
  flex: 0 0 auto;
  grid-template-columns: 150px 160px;
}
.ratio-fields-row > .ratio-field-item > label {
  width: 150px;
}
.ratio-input { width: 160px; max-width: 100%; }
.ratio-input .control {
  width: 100%;
  -moz-appearance: textfield;
  appearance: textfield;
}
.ratio-input .control::-webkit-outer-spin-button,
.ratio-input .control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.store-block { margin-top: 0; }
.store-block-hd {
  display: flex;
  align-items: flex-start;
  margin: 0 0 0 34px;
  gap: 8px;
}
.store-label-item {
  width: auto;
  margin-bottom: 16px;
  display: block;
  grid-template-columns: none;
}
.store-label-item > label {
  display: inline-block;
  width: auto;
  text-align: left;
  line-height: 32px;
}
.store-block-hd .btn-ghost {
  margin: 0;
  height: 32px;
}
.store-table-wrap {
  margin: 0 20px 0 30px;
  overflow-x: auto;
  max-width: calc(100% - 50px);
}
.store-table-wrap .data {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
}
.store-table-wrap .data th:nth-child(1),
.store-table-wrap .data td:nth-child(1) { width: 140px; }
.store-table-wrap .data th:nth-child(2),
.store-table-wrap .data td:nth-child(2) { width: 22%; }
.store-table-wrap .data th:nth-child(3),
.store-table-wrap .data td:nth-child(3) { width: 200px; }
.store-table-wrap .data th:nth-child(4),
.store-table-wrap .data td:nth-child(4) { width: 200px; }
.store-table-wrap .data th:nth-child(5),
.store-table-wrap .data td:nth-child(5) { width: 80px; }
.store-table-wrap .data td {
  white-space: normal;
  word-break: break-all;
}
.store-cap-input { width: 140px; }
.store-rate-input { width: 120px; }
.store-table-wrap .affix-input .control {
  height: 32px;
  border-radius: 6px 0 0 6px;
}

.store-picker-modal {
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.store-picker-modal .modal-bd {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.store-picker-bd { gap: 16px; padding: 16px 24px; }
.store-pick-search {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px 16px;
}
.store-pick-search .field {
  flex: 0 1 280px;
  max-width: 300px;
  min-width: 220px;
}
.store-pick-search .field > label {
  flex: 0 0 72px;
  width: 72px;
  text-align: right;
}
.store-pick-search .btn-primary { flex: 0 0 auto; }
.store-pick-table {
  max-height: min(420px, 48vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.store-pick-table table.data {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.store-pick-table table.data th,
.store-pick-table table.data td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-pick-table table.data tbody tr { cursor: pointer; }
.store-pick-table table.data tbody tr:hover { background: #fafafa; }
.store-pick-table table.data tbody tr.is-selected { background: #e6f4ff; }
.store-pick-table table.data tbody tr.is-selected:hover { background: #e6f4ff; }
.store-pick-table table.data th:nth-child(1),
.store-pick-table table.data td:nth-child(1) { width: 48px; text-align: center; }
.store-pick-table table.data th:nth-child(2),
.store-pick-table table.data td:nth-child(2) { width: 28%; }
.store-pick-table table.data th:nth-child(3),
.store-pick-table table.data td:nth-child(3) { width: 32%; }
.store-pick-table table.data th:nth-child(4),
.store-pick-table table.data td:nth-child(4) { width: 18%; }
.store-pick-table table.data th:nth-child(5),
.store-pick-table table.data td:nth-child(5) { width: 14%; }
.store-picker-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding: 12px 24px 16px;
}
.store-picker-modal .pager {
  margin: 0;
  padding: 0;
  border-top: 0;
  justify-content: flex-start;
  flex: 1;
  background: transparent;
}
.store-picker-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.modal-close {
  border: 0;
  background: transparent;
  color: #8c8c8c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: #595959; }

.form-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 16px 14px;
  background: #fff;
  border-top: 1px solid var(--border);
  margin: 0 -20px -28px;
  z-index: 5;
}
.form-footer .btn + .btn { margin-left: 0; }
.form-footer-save { margin-left: 20px !important; margin-right: 20px !important; }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-ghost:hover { background: rgba(0, 110, 255, 0.04); color: var(--accent); }
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.activity-form-panel .control:disabled,
.activity-form-panel .control[readonly]:disabled,
.affix-input .control:disabled {
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
  border-color: #d9d9d9;
  box-shadow: none;
}
.select-wrap.disabled .control {
  background: #f5f5f5;
  color: rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
}
.datetime-range {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 32px;
}
.datetime-range input[type="datetime-local"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  height: 28px;
}
.ratio-input { width: 160px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1200px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-item { grid-template-columns: 140px minmax(0, 1fr); }
}


/* —— antd helpers —— */
.pager-bar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.table-panel .ant-table-wrapper { background: #fff; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 12px;
}
.toolbar-hint {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}
.nowrap-table .ant-table-thead > tr > th,
.nowrap-table .ant-table-tbody > tr > td {
  white-space: nowrap;
}
.metric-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.metric-card {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fafafa;
}
.metric-card.accent { background: #e6f4ff; border-color: #91caff; }
.metric-card .k { font-size: 12px; color: rgba(0, 0, 0, 0.45); margin-bottom: 6px; }
.metric-card .v { font-size: 22px; font-weight: 600; color: rgba(0, 0, 0, 0.88); line-height: 1.3; }
.metric-card .v.sm { font-size: 16px; }
.metric-card .s { margin-top: 6px; font-size: 12px; color: rgba(0, 0, 0, 0.45); }
.table-panel .ant-table,
.activity-list-table .ant-table {
  white-space: nowrap;
}
.table-panel .ant-table-thead > tr > th,
.table-panel .ant-table-tbody > tr > td,
.activity-list-table .ant-table-thead > tr > th,
.activity-list-table .ant-table-tbody > tr > td {
  white-space: nowrap;
  word-break: keep-all;
}
.table-ops {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0;
}
.table-ops .ant-btn-link {
  padding: 0 4px;
  height: auto;
  line-height: 1.4;
  font-size: 13px;
}
.activity-list-table .ant-table-cell-fix-right {
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.control-w { width: 360px; max-width: 100%; }
.approval-form {
  position: relative;
  min-height: 300px;
  padding-right: 0;
}
.approval-tips-float {
  position: absolute;
  top: 40px;
  left: 410px;
  width: 280px;
  z-index: 2;
  font-size: 12px;
  line-height: 1.7;
  color: #bababa;
  pointer-events: none;
}
.approval-tip-main { color: #1677ff; margin-bottom: 10px; font-size: 13px; }
.approval-tip-sub,
.approval-tip-note { color: #bababa; }
.approval-node-name {
  display: inline-block;
  max-width: 180px;
  line-height: 32px;
  color: rgba(0, 0, 0, 0.88);
  white-space: nowrap;
}
.approval-error { margin: 0 0 8px 98px; }
.cc-picker {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.approval-modal .ant-modal-body { min-height: 320px; }
.form-footer .ant-btn + .ant-btn { margin-left: 0; }
.form-footer { gap: 12px; }
.store-manage-title .ant-btn { margin-left: auto; }

