/* ============================================================
   微信刷步 · 管理后台注入面板样式
   ------------------------------------------------------------
   作用域：全部 .fx-adm 前缀，避免与原站 / Vant 冲突
   主题：rgba(var(--glow-rgb), .x) 跟随站点发光色
   分层：页签栏是唯一的功能层（轻玻璃）；内容层全部不透明
   ============================================================ */

/* ---------- 容器 ---------- */
.fx-adm,
.fx-adm *,
.fx-adm *::before,
.fx-adm *::after {
  box-sizing: border-box;
}

.fx-adm {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 12px 10px;
  color: #16241c;
  font-size: 14px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.fx-adm h2 {
  margin: 0;
}

.fx-adm button,
.fx-adm input,
.fx-adm select {
  font: inherit;
  color: inherit;
}

.fx-adm button {
  -webkit-appearance: none;
  appearance: none;
}

.fx-adm :focus-visible {
  outline: 2px solid rgba(var(--glow-rgb), .8);
  outline-offset: 2px;
}

/* ---------- 页签栏（功能层，唯一玻璃面） ---------- */
.fx-adm-tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 6px;
  margin: 0 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
  box-shadow:
    0 2px 10px rgba(60, 80, 70, .06),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.fx-adm-tabs::-webkit-scrollbar {
  display: none;
}

.fx-adm-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7d8f85;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease;
}

.fx-adm-tab.fx-adm-on {
  color: #16241c;
  background: linear-gradient(-75deg,
    rgba(var(--glow-rgb), .45),
    rgba(var(--glow-rgb), .7),
    rgba(var(--glow-rgb), .45));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* ---------- 面板 / 标题 ---------- */
.fx-adm-pane[hidden] {
  display: none;
}

.fx-adm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 10px;
}

.fx-adm-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #16241c;
}

/* ---------- 卡片 ---------- */
.fx-adm-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(60, 80, 70, .06);
  padding: 14px;
  margin-bottom: 12px;
}

.fx-adm-list > .fx-adm-card:last-child {
  margin-bottom: 0;
}

.fx-adm-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fx-adm-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.fx-adm-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-adm-name {
  color: #16241c;
  font-size: 14.5px;
  font-weight: 700;
  word-break: break-word;
}

.fx-adm-meta {
  margin-top: 3px;
  color: #7d8f85;
  font-size: 12px;
  word-break: break-word;
}

.fx-adm-amount {
  margin-top: 4px;
  color: #16241c;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
}

.fx-adm-sub {
  color: #16241c;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.fx-adm-note {
  color: #7d8f85;
  font-size: 11.5px;
  line-height: 1.55;
  margin: 2px 0 10px;
}

/* ---------- 标签 ---------- */
.fx-adm-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}

.fx-adm-tag--vip {
  color: #2f7fcd;
  background: rgba(90, 169, 255, .16);
  border-color: #5AA9FF;
}

.fx-adm-tag--pro {
  color: #6a58d8;
  background: rgba(139, 123, 255, .16);
  border-color: #8B7BFF;
}

.fx-adm-tag--max {
  color: #d4643a;
  background: rgba(255, 138, 92, .18);
  border-color: #FF8A5C;
}

.fx-adm-tag--plain {
  color: #5f7368;
  background: #eef3ef;
}

.fx-adm-tag--state.fx-adm-wait {
  color: #8a6512;
  background: rgba(226, 186, 60, .18);
}

.fx-adm-tag--state.fx-adm-ok {
  color: #25794d;
  background: rgba(60, 170, 110, .15);
}

.fx-adm-tag--state.fx-adm-no {
  color: #b8453a;
  background: rgba(224, 90, 74, .14);
}

.fx-adm-tag--state.fx-adm-off {
  color: #6b7d72;
  background: #eef3ef;
}

.fx-adm-done {
  color: #7d8f85;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- 表单控件 ---------- */
.fx-adm-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.fx-adm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fx-adm-field--wide {
  grid-column: 1 / -1;
}

.fx-adm-label {
  color: #7d8f85;
  font-size: 11.5px;
  font-weight: 600;
}

.fx-adm-disc {
  margin-left: 2px;
  color: #16241c;
  font-weight: 700;
}

.fx-adm-field input,
.fx-adm-field select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #e3e9e5;
  border-radius: 10px;
  background: #f8faf8;
  color: #16241c;
  font-size: 14px;
  outline: none;
}

.fx-adm-field input::placeholder {
  color: #a7b5ac;
}

.fx-adm-field input:focus,
.fx-adm-field select:focus {
  border-color: rgba(var(--glow-rgb), .7);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--glow-rgb), .14);
}

/* ---------- 按钮 ---------- */
.fx-adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #eef3ef;
  color: #16241c;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease, box-shadow .18s ease;
}

.fx-adm-btn--tiny {
  min-height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
}

.fx-adm-btn--main {
  background: linear-gradient(-75deg,
    rgba(var(--glow-rgb), .45),
    rgba(var(--glow-rgb), .7),
    rgba(var(--glow-rgb), .45));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 2px 8px rgba(60, 80, 70, .08);
}

.fx-adm-btn--ghost {
  background: #fff;
  border: 1px solid #e3e9e5;
  color: #41544a;
}

.fx-adm-btn--danger {
  background: #fff;
  border: 1px solid rgba(224, 90, 74, .35);
  color: #b8453a;
}

.fx-adm-btn--danger.fx-adm-armed {
  background: #c9473a;
  border-color: #c9473a;
  color: #fff;
}

.fx-adm-btn.fx-adm-armed {
  box-shadow:
    inset 0 0 0 2px rgba(22, 36, 28, .16),
    0 2px 10px rgba(60, 80, 70, .12);
}

.fx-adm-btn:active:not(:disabled) {
  transform: scale(.97);
}

.fx-adm-btn:disabled {
  opacity: .55;
  cursor: default;
  transform: none;
}

.fx-adm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.fx-adm-flash {
  color: #25794d;
  font-size: 12px;
  font-weight: 600;
  animation: fx-adm-flash-in .18s ease-out;
}

@keyframes fx-adm-flash-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 筛选条 ---------- */
.fx-adm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.fx-adm-chip {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #e6ece8;
  border-radius: 999px;
  background: #fff;
  color: #5f7368;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.fx-adm-chip.fx-adm-on {
  border-color: rgba(var(--glow-rgb), .5);
  background: rgba(var(--glow-rgb), .16);
  color: #16241c;
}

/* ---------- 代理统计 ---------- */
.fx-adm-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.fx-adm-stat {
  padding: 8px 10px;
  border: 1px solid #eef3ef;
  border-radius: 10px;
  background: #f7faf8;
}

.fx-adm-stat-k {
  display: block;
  color: #7d8f85;
  font-size: 11.5px;
}

.fx-adm-stat-v {
  display: block;
  margin-top: 2px;
  color: #16241c;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 收款码 ---------- */
.fx-adm-qr-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.fx-adm-qr {
  display: block;
  width: 96px;
  height: 96px;
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  border: 1px solid #e7eeea;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
}

.fx-adm-qr-tip {
  padding-bottom: 4px;
  color: #7d8f85;
  font-size: 11px;
}

.fx-adm-qr-none {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  padding: 6px;
  border: 1px dashed #d8e2db;
  border-radius: 12px;
  color: #7d8f85;
  font-size: 11px;
  text-align: center;
}

/* ---------- 加载 / 空状态 ---------- */
.fx-adm-hint {
  padding: 26px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(60, 80, 70, .06);
  color: #7d8f85;
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
}

.fx-adm-hint.fx-adm-err {
  color: #b8453a;
}

/* ---------- 轻提示 ---------- */
.fx-adm-toast {
  position: fixed;
  left: 50%;
  top: 20%;
  z-index: 10000;
  max-width: calc(100vw - 48px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(22, 36, 28, .92);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 8px 24px rgba(20, 35, 26, .22);
  transform: translateX(-50%) translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.fx-adm-toast.fx-adm-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.fx-adm-toast.fx-adm-err {
  background: rgba(150, 45, 36, .95);
}

/* ---------- 收款码大图 ---------- */
.fx-adm-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 20, 16, .78);
  cursor: zoom-out;
  animation: fx-adm-fade .18s ease-out;
}

.fx-adm-zoom-img {
  max-width: 92vw;
  max-height: 86vh;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

@keyframes fx-adm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- 触屏加大点击区 ---------- */
@media (pointer: coarse) {
  .fx-adm-btn {
    min-height: 44px;
  }

  .fx-adm-btn--tiny {
    min-height: 38px;
  }

  .fx-adm-chip {
    min-height: 38px;
  }

  .fx-adm-field input,
  .fx-adm-field select {
    height: 44px;
  }
}

@media (min-width: 480px) {
  .fx-adm {
    padding: 18px 16px 12px;
  }
}

/* ---------- 降级：减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-adm *,
  .fx-adm-toast,
  .fx-adm-zoom {
    transition: none !important;
    animation: none !important;
  }

  .fx-adm-btn:active:not(:disabled) {
    transform: none;
  }
}

/* ---------- 降级：减弱透明 ---------- */
@media (prefers-reduced-transparency: reduce) {
  .fx-adm-tabs {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ---------- 降级：增强对比 ---------- */
@media (prefers-contrast: more) {
  .fx-adm-card,
  .fx-adm-hint {
    border: 1px solid #cfd9d1;
  }

  .fx-adm-field input,
  .fx-adm-field select,
  .fx-adm-btn--ghost,
  .fx-adm-chip {
    border-color: #9fb0a4;
  }

  .fx-adm-tab.fx-adm-on {
    outline: 2px solid #16241c;
    outline-offset: -2px;
  }
}

/* top tabs: keep the last tab clear of the floating palette button */
.fx-adm-tabs {
  padding-right: 58px;
  scroll-padding-right: 58px;
}


/* ---------- 待办角标 ---------- */
.fx-adm-tab {
  position: relative;
}
.fx-adm-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  pointer-events: none;
}
