/* 与 Ant Design 4 CDN 配套的少量覆盖 */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 8px 12px 12px;
  padding: 0 4px;
}

.brand-logo-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--brand-theme-color, #52c41a);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-logo-mark--sm {
  width: 28px;
  height: 28px;
}

.brand-logo-inner {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
  user-select: none;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo-text {
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header {
  padding: 0 !important;
  border-bottom: 1px solid #f0f0f0;
}

.app-header-light {
  background: #fff !important;
}

.app-header-light .header-brand-title {
  color: rgba(0, 0, 0, 0.88);
}

.app-content {
  margin: 24px;
  min-height: 280px;
}

.page-card {
  background: #fff;
  border-radius: 8px;
}

.ant-menu-item > a {
  color: inherit;
  display: block;
}

.ant-menu-item > a:hover {
  color: inherit;
}

.ant-layout-sider-dark .ant-menu-item-selected a {
  color: #fff;
}

.actions-bar {
  margin-bottom: 16px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f5ff 0%, #fafafa 50%, #fff 100%);
}

.login-panel {
  width: 380px;
  padding: 8px;
}

/* 侧栏深蓝（贴近参考图） */
.app-sider-navy.ant-layout-sider-dark {
  background: #001529 !important;
}

.app-side-menu.ant-menu-dark {
  background: #001529 !important;
}

.menu-item-soon > a {
  cursor: not-allowed;
  opacity: 0.55;
}

/* 顶栏：Ant Design 暗色顶栏 #001529，左 LOGO+名称，右用户下拉 */
.app-header-dark {
  height: auto !important;
  min-height: 48px !important;
  padding: 0 !important;
  background: #001529 !important;
  border-bottom: none !important;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 12px;
  box-sizing: border-box;
}

.header-brand-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.header-brand-title {
  font-weight: 600;
  font-size: 15px;
  max-width: min(320px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-dark .header-brand-title {
  color: rgba(255, 255, 255, 0.98);
}

.header-download-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 12px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1.2;
}

.header-download-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  cursor: default;
}

.header-download-main:hover {
  color: #fff;
}

.header-download-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.header-ico {
  flex-shrink: 0;
  opacity: 0.9;
}

.header-user-side {
  flex: 0 0 auto;
  position: relative;
}

.header-user-dropdown-wrap {
  position: relative;
}

.header-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  margin: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  outline: none;
  transition: background 0.2s;
}

.app-header-dark .header-user-trigger {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
}

.app-header-dark .header-user-trigger:hover,
.app-header-dark .header-user-dropdown-wrap.is-open .header-user-trigger {
  background: rgba(255, 255, 255, 0.18);
}

.app-header-light .header-user-trigger {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
  color: rgba(0, 0, 0, 0.85);
}

.app-header-light .header-user-trigger:hover,
.app-header-light .header-user-dropdown-wrap.is-open .header-user-trigger {
  background: rgba(0, 0, 0, 0.06);
}

.header-user-avatar {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-header-light .header-user-avatar {
  background: #e6f4ff;
}

.header-user-name {
  font-size: 14px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-caret {
  opacity: 0.75;
  margin-left: 2px;
}

.header-user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  padding: 4px 0;
  margin: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
  z-index: 1050;
}

.header-user-dropdown-wrap.is-open .header-user-dropdown {
  display: block;
}

.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
  transition: background 0.15s;
}

.header-dropdown-item:hover {
  background: #f5f5f5;
}

.header-dropdown-item--danger:hover {
  color: #ff4d4f;
}

.header-dropdown-ico {
  flex-shrink: 0;
  opacity: 0.75;
}

.app-content-grey {
  background: #f0f2f5 !important;
  margin: 0 !important;
  padding: 16px 16px 24px !important;
}

/* 商家中心 · 筛选与表格 */
.merchant-page {
  max-width: 100%;
}

.merchant-toolbar-card {
  margin-bottom: 16px;
}

.merchant-filter-wrap .ant-card-body {
  padding: 16px 20px !important;
}

.merchant-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.merchant-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.filter-label {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
}

.filter-input {
  width: 200px !important;
}

.filter-select {
  width: 160px !important;
  height: 32px;
}

.merchant-filter-actions {
  display: inline-flex;
  gap: 8px;
}

.merchant-table-card .ant-card-body {
  padding-top: 0 !important;
}

.merchant-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 0;
}

.merchant-table-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toolbar-icon-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  color: rgba(0, 0, 0, 0.45);
}

.icon-tool-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  color: rgba(0, 0, 0, 0.55);
}

.icon-tool-btn:hover {
  color: #1890ff;
}

.merchant-table {
  overflow-x: auto;
  overflow-y: visible;
}

.merchant-table .ant-table-content {
  overflow-x: auto;
  overflow-y: visible;
}

.merchant-data-table {
  width: max-content;
  min-width: 1560px;
  border-collapse: collapse;
}

.merchant-data-table th,
.merchant-data-table td {
  white-space: nowrap;
}

.merchant-cell-link {
  color: #1890ff;
}

.merchant-cell-link:hover {
  color: #40a9ff;
}

.merchant-action-col {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}

.merchant-actions {
  white-space: nowrap;
  box-shadow: -8px 0 10px -10px rgba(0, 0, 0, 0.16);
  overflow: visible;
}

.merchant-actions .tbl-ico-form {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 0;
}

.merchant-actions .tbl-ico-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  color: #1677ff;
  text-decoration: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

.merchant-actions .tbl-ico-btn:last-child {
  margin-right: 0;
}

.merchant-actions .tbl-ico-btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.merchant-actions .tbl-ico-btn:hover {
  color: #4096ff;
}

.merchant-actions .merchant-op-btn--disable {
  color: #ff4d4f;
}

.merchant-actions .merchant-op-btn--disable:hover {
  color: #ff7875;
}

.merchant-actions .merchant-op-btn--enable {
  color: #52c41a;
}

.merchant-actions .merchant-op-btn--enable:hover {
  color: #73d13d;
}

.merchant-actions .tbl-ico-btn::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 15;
}

.merchant-actions .tbl-ico-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.88);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  z-index: 15;
}

.merchant-actions .tbl-ico-btn:hover::after,
.merchant-actions .tbl-ico-btn:hover::before {
  opacity: 1;
}

.merchant-flash {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 10px 14px;
}

.merchant-flash-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: currentColor;
  color: #fff;
}

.merchant-edit-card {
  max-width: 980px;
}

.merchant-edit-alert {
  margin-bottom: 16px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
}

.merchant-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

.merchant-edit-select {
  width: 100% !important;
  height: 42px;
}

.merchant-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f5f5f5;
}

.merchant-modal-open {
  overflow: hidden;
}

.merchant-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  z-index: 1000;
}

.merchant-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 24px;
}

.merchant-modal[hidden],
.merchant-modal-mask[hidden] {
  display: none !important;
}

.merchant-modal-panel {
  width: min(1060px, 94vw);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.merchant-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.merchant-modal-head h3 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
}

.merchant-modal-close {
  border: none;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding: 0 2px;
}

.merchant-modal-close:hover {
  color: rgba(0, 0, 0, 0.75);
}

.merchant-modal-form {
  padding: 14px 22px 16px;
}

.merchant-edit-item {
  margin-bottom: 14px !important;
}

.merchant-edit-label {
  padding-bottom: 4px !important;
}

.merchant-edit-label label {
  font-size: 15px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
}

.merchant-modal-form .ant-input {
  height: 42px;
  border-radius: 6px;
}

.merchant-modal-form input[type="date"].ant-input {
  padding-right: 10px;
}

.merchant-edit-actions .ant-btn {
  min-width: 78px;
  height: 36px;
  border-radius: 8px;
}

.merchant-reset-panel {
  width: min(520px, 94vw);
}

.merchant-rate-panel {
  width: min(520px, 94vw);
}

.merchant-log-panel {
  width: min(1080px, 95vw);
}

.merchant-log-table-wrap {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  max-height: 420px;
  overflow: auto;
}

.merchant-log-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.merchant-log-table thead th {
  background: #fafafa;
  color: rgba(0, 0, 0, 0.88);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.merchant-log-table tbody td {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.78);
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  white-space: nowrap;
}

.merchant-log-empty {
  margin-top: 12px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
}

.merchant-log-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.merchant-log-footer-actions {
  display: inline-flex;
  gap: 8px;
}

.merchant-reset-meta {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f5f7fb;
  color: rgba(0, 0, 0, 0.75);
  font-size: 13px;
}

.merchant-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.merchant-pagination-total {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  margin-right: auto;
}

.merchant-pagination {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.merchant-pagination .ant-pagination-prev,
.merchant-pagination .ant-pagination-next {
  text-decoration: none;
  min-width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
}

.merchant-pagination .ant-pagination-prev.ant-pagination-disabled,
.merchant-pagination .ant-pagination-next.ant-pagination-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.merchant-pagination .ant-pagination-item-active {
  display: inline-block;
  min-width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border: 1px solid #1890ff;
  color: #1890ff;
  border-radius: 4px;
}

.merchant-page-size-label {
  margin-left: 8px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

.user-modal-open {
  overflow: hidden;
}

.user-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

.user-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 24px;
}

.user-modal[hidden],
.user-modal-mask[hidden] {
  display: none !important;
}

.user-modal-panel {
  width: min(560px, 92vw);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.user-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.user-modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
}

.user-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding: 0 2px;
}

.user-modal-close:hover {
  color: rgba(0, 0, 0, 0.75);
}

.user-modal-form {
  padding: 14px 18px 16px;
}

.user-create-error {
  margin-bottom: 12px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
}

.user-modal-actions {
  margin-bottom: 0 !important;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sys-settings-page {
  max-width: 1080px;
}

.sys-settings-card .ant-card-body {
  padding: 16px 20px 20px !important;
}

.sys-settings-alert-error {
  margin-bottom: 14px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
}

.sys-settings-alert-ok {
  margin-bottom: 14px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
}

.sys-settings-section {
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.sys-settings-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: rgba(0, 0, 0, 0.88);
}

.sys-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.sys-grid-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 14px;
}

.sys-image-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.sys-image-item {
  flex: 1 1 0;
}

.sys-image-preview {
  width: 104px;
  height: 104px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  margin-bottom: 8px;
  background: #fafafa;
}

.sys-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sys-image-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sys-settings-tip {
  margin: 6px 0 0;
  color: #ff4d4f;
  font-size: 12px;
}

.sys-theme-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sys-theme-input {
  width: 140px !important;
}

.sys-theme-preview {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  display: inline-block;
}

.sys-theme-palette {
  display: grid;
  grid-template-columns: repeat(12, 18px);
  gap: 5px;
  margin-top: 8px;
}

.sys-theme-color {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  padding: 0;
}

.sys-inline-radio {
  margin-right: 12px;
}

.sys-settings-submit {
  padding-top: 6px;
}
