/* aucms 资产插件：前台与后台共用样式
   统一使用 member-system.css 的 --ms-* 设计令牌，保证与会员体系其它插件同色系。 */

/* ---------- 前台：资产卡 ---------- */
.wallet-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.wallet-card {
  padding: 16px 18px;
  border-radius: var(--ms-radius);
  background: var(--ms-bg-alt);
  border: 1px solid var(--ms-border);
  box-shadow: var(--ms-shadow-sm);
}
.wallet-card-label { font-size: 12px; color: var(--ms-muted); }
.wallet-card-value {
  font-size: 26px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--ms-text);
  font-variant-numeric: tabular-nums;
}
.wallet-card-value small {
  font-size: 13px;
  font-weight: 400;
  color: var(--ms-muted);
  margin-left: 3px;
}
.wallet-card.is-points .wallet-card-value { color: var(--ms-warn); }
.wallet-card.is-balance .wallet-card-value { color: var(--ms-success); }

/* ---------- 前台：流水 ---------- */
.wallet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wallet-tabs a {
  padding: 5px 13px;
  border-radius: var(--ms-radius-sm);
  font-size: 13px;
  border: 1px solid var(--ms-border);
  color: var(--ms-muted);
  text-decoration: none;
}
.wallet-tabs a:hover { border-color: var(--ms-accent); color: var(--ms-accent); }
.wallet-tabs a.is-active {
  background: var(--ms-accent);
  border-color: var(--ms-accent);
  color: #fff;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--ms-border);
}
.wallet-row:last-child { border-bottom: 0; }
.wallet-row-main { flex: 1; min-width: 0; }
.wallet-row-title { font-size: 14px; color: var(--ms-text); }
.wallet-row-meta { font-size: 12px; color: var(--ms-muted); margin-top: 3px; }
.wallet-row-amount {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wallet-in { color: var(--ms-danger); }   /* 收入用红色（国内习惯） */
.wallet-out { color: var(--ms-success); }  /* 支出用绿色 */
.wallet-row-after { font-size: 12px; color: var(--ms-muted); margin-top: 3px; text-align: right; }

/* ---------- 前台：兑换 ---------- */
.wallet-goods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.wallet-good {
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--ms-bg);
  box-shadow: var(--ms-shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.wallet-good:hover { transform: translateY(-2px); box-shadow: var(--ms-shadow); }
.wallet-good-title { font-size: 15px; font-weight: 500; }
.wallet-good-desc { font-size: 12px; color: var(--ms-muted); line-height: 1.6; min-height: 34px; }
.wallet-good-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wallet-price { font-weight: 600; color: var(--ms-warn); font-variant-numeric: tabular-nums; }
.wallet-stock { font-size: 12px; color: var(--ms-muted); }
.wallet-good form { margin: 0; }

/* ---------- 通用 ---------- */
.wallet-empty { padding: 36px; text-align: center; color: var(--ms-muted); font-size: 13px; }
.wallet-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
}
.wallet-pager a, .wallet-pager span {
  padding: 5px 12px;
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius-sm);
  text-decoration: none;
  color: var(--ms-muted);
}
.wallet-pager a:hover { border-color: var(--ms-accent); color: var(--ms-accent); }
.wallet-pager .is-current { border-color: transparent; color: var(--ms-muted); }

/* ---------- 后台 ---------- */
.wallet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.wallet-stat {
  padding: 14px 16px;
  border-radius: var(--ms-radius-sm);
  background: var(--ms-bg);
  border: 1px solid var(--ms-border);
  box-shadow: var(--ms-shadow-sm);
}
.wallet-stat-label { font-size: 12px; color: var(--ms-muted); }
.wallet-stat-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--ms-text);
}
.wallet-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.wallet-field { display: flex; flex-direction: column; gap: 5px; }
.wallet-field label { font-size: 12px; color: var(--ms-muted); }
.wallet-field input, .wallet-field select, .wallet-field textarea {
  padding: 7px 10px;
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius-sm);
  font-size: 13px;
  background: var(--ms-bg);
  color: var(--ms-text);
  font-family: inherit;
}
.wallet-field input:focus, .wallet-field select:focus, .wallet-field textarea:focus {
  outline: 2px solid rgba(47, 111, 235, .3);
  outline-offset: 1px;
  border-color: var(--ms-accent);
}
.wallet-field input[readonly] { background: var(--ms-bg-alt); color: var(--ms-muted); }
.wallet-note { font-size: 12px; color: var(--ms-muted); line-height: 1.8; }
.wallet-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  background: var(--ms-accent-weak);
  color: var(--ms-accent-hover);
}
.wallet-badge.is-ok { background: #dcfce7; color: #15803d; }
.wallet-badge.is-warn { background: #fef3c7; color: #b45309; }
.wallet-badge.is-off { background: var(--ms-bg-alt); color: var(--ms-muted); }
.wallet-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--ms-muted); }
.wallet-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wallet-actions form { display: inline; }
