/* ============ 登录 / 注册 弹层 ============ */
.auth-tabs {
  display: flex; gap: 6px; margin-bottom: 6px;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px;
}
.auth-tab {
  flex: 1; height: 34px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-sub); font-weight: 600; font-size: 13px;
}
.auth-tab.is-on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
#authModal .field { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 12px; }
#authModal .field__label { font-size: 12px; }
#authModal .field__input { width: 100%; }
#authModal .captcha-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
#authModal .captcha-row .field__input { width: auto; flex: 1 1 auto; min-width: 0; }
#authModal .captcha-img { height: 42px; width: 120px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; flex: 0 0 auto; background: var(--surface-2); }
.auth-connect {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 42px; margin-top: 14px; padding: 0 14px;
  border: 1px solid #2f3135; border-radius: var(--radius-sm);
  background: #1c1c1e; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.auth-connect:hover { background: #303034; }
.auth-connect:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.auth-connect:disabled { cursor: wait; opacity: .7; }
.auth-connect__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; border-radius: 50%; background: #ffb003; color: #1c1c1e;
  font-size: 9px; font-weight: 900;
}
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: var(--text-weak); font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }

/* ============ 账户 / 管理员 弹层 ============ */
#accountModal .modal__panel { max-width: min(720px, calc(100vw - 24px)); }
.account-info {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); margin-bottom: 10px;
}
.account-info__summary {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 14px;
  flex: 1; min-width: 0;
}
.account-info__identity {
  display: inline-flex; align-items: baseline; gap: 6px;
  min-width: 0; color: var(--text); font-size: 16px; font-weight: 700;
}
.account-info__identity strong {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-info__identity i { color: var(--text-weak); font-style: normal; font-weight: 400; }
.account-info__meta {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 5px 14px;
  color: var(--text-sub); font-size: 12px; font-weight: 400;
}
.account-info__meta-item { white-space: nowrap; }
.account-info__meta-item.is-warn { color: #c8881a; }
.account-info__meta-item.is-expired { color: var(--up); }
.account-info__meta-item.is-permanent { color: var(--text-sub); }
.account-info__link {
  padding: 0; margin: 0; border: none; background: none;
  flex: 0 0 auto; font-size: 13px; font-weight: 500; color: var(--up); cursor: pointer;
}
.account-info__link:hover { opacity: 0.85; }
.account-row { color: var(--text-sub); font-size: 13px; padding: 4px 0; }
.account-row--muted { color: var(--text-weak); }
.account-section-head {
  min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--text); font-size: 13px; font-weight: 700;
}
.account-section-head small { color: var(--text-sub); font-size: 11px; font-weight: 500; }

/* 账户面板内自选列表 */
.account-watchlist {
  background: var(--surface-2); border-radius: var(--radius-sm);
  min-width: 0; padding: 8px 10px; margin: 0;
}
.account-watchlist__list { max-height: 168px; overflow-y: auto; margin: 2px -2px 0; padding: 0 2px; }
.account-watchlist__empty { padding: 18px 4px; color: var(--text-weak); font-size: 12px; text-align: center; }
.account-watchlist__footer { display: flex; justify-content: flex-end; padding-top: 6px; }
.account-watchlist__footer .btn { height: 28px; padding: 0 12px; font-size: 11px; }
.account-wl__row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 4px;
  font-size: 13px; transition: background .15s;
}
.account-wl__row:hover { background: var(--surface); }
.account-wl__stock {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  color: inherit; text-decoration: none;
}
.account-wl__stock:hover .account-wl__code,
.account-wl__stock:hover .account-wl__name { color: var(--brand); }
.account-wl__code {
  font-family: var(--mono, monospace); font-weight: 600;
  color: var(--primary); min-width: 52px; flex-shrink: 0;
}
.account-wl__name {
  color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-wl__date {
  margin-left: auto; color: var(--text-sub); font-size: 11px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.account-wl__del {
  width: 24px; height: 24px; line-height: 22px; text-align: center;
  padding: 0; border-radius: 50%; font-size: 16px; color: var(--text-weak);
  flex-shrink: 0; opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.account-wl__row:hover .account-wl__del { opacity: 1; }
.account-wl__del:hover { color: #fff; background: var(--down, #e74c3c); }
.modal__actions--col { flex-direction: column; gap: 10px; }
.modal__actions--col .btn { margin-top: 0; }

.account-admin-nav { margin-top: 14px; }
.account-action-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 7px;
}
.account-action-card {
  position: relative; min-width: 0; min-height: 54px; padding: 8px 12px 20px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text); cursor: pointer;
  font-size: 13px; font-weight: 700; text-align: left;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.account-action-card::after {
  content: attr(data-description); position: absolute; left: 12px; right: 10px; bottom: 7px;
  overflow: hidden; color: var(--text-sub); font-size: 10px; font-weight: 400;
  text-overflow: ellipsis; white-space: nowrap;
}
.account-action-card:hover { border-color: var(--brand); background: var(--surface-hover); transform: translateY(-1px); }
.account-action-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.account-quick-actions {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  margin-top: 12px;
}
.account-quick-action {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-width: 0; min-height: 60px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-align: left; text-decoration: none;
  transition: border-color .15s, background-color .15s, transform .15s, box-shadow .15s;
}
.account-quick-action:hover {
  border-color: var(--brand); background: var(--surface-hover); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 42, 68, .08);
}
.account-quick-action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.account-quick-action__mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 8px; background: var(--brand-weak); color: var(--brand);
  font-size: 10px; font-weight: 800; letter-spacing: .2px;
}
.account-quick-action--plans .account-quick-action__mark { background: var(--brand); color: #fff; }
.account-quick-action--linuxdo .account-quick-action__mark { background: #ffb003; color: #1c1c1e; }
.account-quick-action__copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.account-quick-action__copy strong { overflow: hidden; font-size: 13px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.account-quick-action__copy small { overflow: hidden; color: var(--text-sub); font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.account-quick-action__arrow { color: var(--text-weak); font-size: 22px; font-weight: 300; line-height: 1; }
.account-session-actions { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.account-logout {
  width: 100%; background: transparent; color: var(--text-sub); border-color: var(--border);
}
.account-logout:hover { color: var(--text); background: var(--surface-2); }

.admin-tip {
  font-size: 12px; color: var(--text-sub); line-height: 1.5;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 8px 10px; margin-bottom: 12px;
}
.admin-list-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 10px 0; flex-wrap: wrap;
}
.admin-list-search { display: flex; align-items: center; gap: 6px; flex: 1 1 360px; }
.admin-list-search .field__input { flex: 1; min-width: 140px; }
.admin-list-summary { color: var(--text-sub); font-size: 12px; white-space: nowrap; }
.data-pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 12px 0 4px; color: var(--text-sub); font-size: 12px;
  flex-wrap: wrap;
}
.data-pager .btn:disabled { opacity: .45; cursor: not-allowed; }
.data-pager__pages { display: inline-flex; align-items: center; gap: 4px; }
.data-pager__page { min-width: 30px; padding-left: 7px; padding-right: 7px; }
.data-pager__page.is-current { border-color: var(--brand); background: var(--brand); color: #fff; }
.data-pager__ellipsis { min-width: 18px; text-align: center; color: var(--text-weak); }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-row__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row__meta { font-size: 11px; color: var(--text-sub); }
.admin-row__ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-row__feedback { color: #16864b; font-size: 12px; font-weight: 600; }
.admin-row__feedback.is-error { color: var(--up); }
.admin-row__group { height: 32px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; }
.admin-row__exp { height: 32px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; color: var(--text); }
.admin-row__exp:focus { outline: none; border-color: var(--brand); }
.admin-row__save { height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 600; font-size: 12px; }
.admin-row__reset { height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 12px; }
.admin-row__del { height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--danger-border); background: var(--danger-bg); color: var(--danger-text); font-weight: 600; font-size: 12px; }
/* 会员管理：快捷设置有效期按钮组 */
.admin-row__quick { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; width: 100%; margin-top: 2px; }
.admin-row__quick-label { font-size: 11px; color: var(--text-sub); }
.admin-row__quick-btn { height: 28px; padding: 0 8px; font-size: 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.admin-row__quick-btn:hover { border-color: var(--brand); color: var(--brand); }
.admin-row__quick-btn:active { background: var(--brand); color: #fff; }

/* 危险按钮 */
.btn--danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }
.btn--danger:hover { background: #ffe3e3; }

/* 修改密码弹层字段（复用 .field 排版） */
#pwdModal .field { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 12px; }
#pwdModal .field__label { font-size: 12px; }
#pwdModal .field__input { width: 100%; }

/* ============ 兑换码系统 ============ */

/* 会员中心：兑换表单 */
.account-redeem {
  margin-top: 14px; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.account-redeem__title { display: flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.account-redeem__row { display: flex; gap: 8px; align-items: stretch; }
.account-redeem__row .field__input { flex: 1; min-width: 0; }
.account-redeem__msg { margin-top: 8px; font-size: 12px; padding: 6px 10px; border-radius: var(--radius-sm); }
.account-redeem__msg.is-error { color: var(--danger-text); background: var(--danger-bg); }
.account-redeem__msg.is-ok { color: #1a8a4a; background: #eafaf0; }

/* QQ 交流群提示（账户弹层兑换会员标题旁，低侵入红色文字） */
.qq-group-hint {
  margin-left: 10px;
  font-size: 12px; font-weight: 400;
  color: var(--up);
  cursor: pointer;
  user-select: none;
}
.qq-group-hint small { margin-left: 4px; opacity: .75; }
.qq-group-hint:hover { text-decoration: underline; }

/* 复选框行（交流群启用开关） */
.field--row { flex-direction: row !important; align-items: center !important; gap: 6px; }
.field--row .field__label { margin: 0; }

/* 管理员弹层：Tab 栏 */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.admin-tab {
  flex: 1 1 118px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-sub); font-size: 13px; font-weight: 600; cursor: pointer;
}
.admin-tab.is-on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow); }
.admin-tab:hover:not(.is-on) { border-color: var(--brand); color: var(--brand); }

/* 管理员：生成兑换码表单 */
.redeem-gen {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
}
.redeem-gen__title { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.redeem-gen__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.redeem-gen__row:last-child { margin-bottom: 0; }
.redeem-gen__row .field { flex-direction: column; align-items: stretch; gap: 4px; }
.redeem-gen__row .field__label { font-size: 12px; }
.redeem-gen__row .field__input,
.redeem-gen__row .select { min-width: 120px; }

/* 管理员：兑换码列表 */
.redeem-list__title { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.redeem-list { display: flex; flex-direction: column; gap: 6px; }
.redeem-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 12px;
}
.redeem-row__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700; letter-spacing: 0.5px; color: var(--text); cursor: pointer;
}
.redeem-row__meta { color: var(--text-sub); }
.redeem-row__status { padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.redeem-row__status.is-on { color: #1a8a4a; background: #eafaf0; }
.redeem-row__status.is-used { color: var(--text-sub); background: #f0f0f0; }
.redeem-row__status.is-expired { color: var(--danger-text); background: var(--danger-bg); }
.redeem-row__used { color: var(--text-sub); }
.redeem-row__copy { margin-left: auto; }

/* ============ 兑换码管理（置于「管理中心」弹层「兑换码管理」分页签内） ============ */
.redeem-page { width: min(100%, var(--maxw)); margin: 0 auto; padding: 16px 0 40px; }
.redeem-page__head { margin-bottom: 14px; }
.redeem-page__title {
  font-size: 18px; font-weight: 800; margin: 0 0 4px; color: var(--text);
  border-left: 3px solid var(--brand); padding-left: 8px;
}
.redeem-page__sub { margin: 0; font-size: 12px; color: var(--text-sub); }
.redeem-list__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.redeem-list__head .redeem-list__title { margin-bottom: 0; }

/* 管理员：缓存维护 */
.admin-cache-panel__meta { margin: -2px 0 12px; font-size: 12px; color: var(--text-sub); line-height: 1.5; }
.admin-cache-settings { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.admin-cache-settings small { color: var(--text-sub); font-size: 11px; }
.admin-cache-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-cache-panel .btn:disabled { opacity: .65; cursor: wait; }

/* 管理员：LDC 商品目录。 */
.payment-setting-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.payment-setting-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--text-primary); }
.payment-setting-toggle input { width: 16px; height: 16px; accent-color: var(--brand); }
.payment-setting-hint { margin: 10px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.payment-product-section { margin: 0 0 18px; }
.payment-product-section--orders { margin-top: 22px; }
.payment-product-section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 0 0 8px; color: var(--text);
}
.payment-product-section__head h3 { margin: 0; font-size: 14px; }
.payment-product-section__head span { color: var(--text-sub); font-size: 11px; }
.payment-product-create {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  margin-bottom: 8px; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2);
}
.payment-product-create .field { min-width: 150px; flex: 1 1 150px; }
.payment-product-create .field:nth-child(2),
.payment-product-create .field:nth-child(3) { flex: 0 1 130px; }
.payment-product-create .btn { height: 34px; }
.payment-product-test-toggle {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer;
}
.payment-product-test-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.payment-product-test-toggle span { display: flex; flex-direction: column; gap: 1px; }
.payment-product-test-toggle strong { color: var(--text); font-size: 11px; }
.payment-product-test-toggle small { color: var(--text-sub); font-size: 9px; white-space: nowrap; }
.payment-product-list, .payment-feature-list { display: flex; flex-direction: column; gap: 6px; }
.payment-product-row, .payment-feature-row {
  display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(160px, 1.5fr) 100px 90px auto;
  align-items: end; gap: 8px; padding: 9px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-2);
}
.payment-feature-row { grid-template-columns: minmax(150px, 1.5fr) 100px 90px auto; }
.payment-product-row--test { grid-template-columns: minmax(130px, 1.3fr) minmax(160px, 1.5fr) 100px auto; }
.payment-product-row.is-disabled, .payment-feature-row.is-disabled { opacity: .68; }
.payment-product-row__identity { min-width: 0; align-self: center; }
.payment-product-row__identity strong { display: block; overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.payment-product-row__identity small { display: block; margin-top: 3px; overflow-wrap: anywhere; color: var(--text-weak); font: 10px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace; }
.payment-product-input { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.payment-product-input span { color: var(--text-sub); font-size: 10px; }
.payment-product-input input { width: 100%; min-width: 0; height: 32px; padding: 0 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 12px; }
.payment-product-row__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.payment-product-row__actions .btn { white-space: nowrap; }

/* LDC 订单状态在用户订单页与管理员退款页保持同一语义。 */
.payment-status {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-sub);
  font-size: 10px; font-weight: 700; line-height: 1.2;
}
.payment-status--granted { background: #eaf8ef; color: #197044; }
.payment-status--grant_failed,
.payment-status--refund_failed,
.payment-status--refund_revoke_failed { background: var(--danger-bg); color: var(--danger-text); }
.payment-status--refund_requested { background: #fff3d9; color: #8a5a00; }
.payment-status--refund_pending,
.payment-status--refund_revoke_pending { background: #eaf3fb; color: #315f87; }
.payment-status--refunded { background: #eeeeef; color: #65676c; }
.payment-admin-summary { margin: 0 0 10px; color: var(--text-sub); font-size: 12px; }
.payment-admin-list { display: flex; flex-direction: column; gap: 8px; }
.payment-admin-order {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
}
.payment-admin-order__main { min-width: 0; flex: 1; }
.payment-admin-order__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text); font-size: 13px; }
.payment-admin-order__meta { margin-top: 5px; color: var(--text-sub); font-size: 11px; }
.payment-admin-order__number { margin-top: 4px; overflow-wrap: anywhere; color: var(--text-weak); font: 10px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace; }
.payment-admin-order__error { margin-top: 6px; color: var(--danger-text); font-size: 11px; line-height: 1.5; }
.payment-admin-order__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
html[data-theme='dark'] .payment-status--granted { background: #183123; color: #8ed6aa; }
html[data-theme='dark'] .payment-status--refund_requested { background: #392e17; color: #e9c66f; }
html[data-theme='dark'] .payment-status--refund_pending,
html[data-theme='dark'] .payment-status--refund_revoke_pending { background: #182839; color: #9cc4e8; }

/* 管理员：行情副图组矩阵与单会员三态覆盖。 */
#adminModal .modal__panel { max-width: min(1120px, calc(100vw - 24px)); }
.chart-user-permission,
.chart-permission-card {
  margin-bottom: 14px; padding: 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
}
.chart-user-permission { border-color: #b8ccff; background: #f7f9ff; }
.chart-group-permissions > h3 { margin: 16px 0 9px; font-size: 15px; }
.chart-permission-card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.chart-permission-card__head h3 { margin: 0; font-size: 14px; }
.chart-permission-card__head p { margin: 3px 0 0; color: var(--text-sub); font-size: 11px; line-height: 1.5; }
.chart-permission-category + .chart-permission-category { margin-top: 11px; }
.chart-permission-category h4 { margin: 0 0 6px; color: #59606b; font-size: 12px; }
.chart-permission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chart-group-indicator,
.chart-user-indicator {
  min-width: 0; display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
}
.chart-group-indicator { align-items: stretch; flex-direction: column; cursor: default; }
.chart-group-indicator.is-allow { border-color: #9db9ff; background: #f1f5ff; }
.chart-group-indicator.is-purchase { border-color: #d9b35b; background: #fff8e7; }
.chart-group-indicator .select { width: 100%; max-width: none; height: 30px; margin-top: 4px; font-size: 11px; }
.chart-group-indicator span,
.chart-user-indicator > span { min-width: 0; display: flex; flex-direction: column; }
.chart-group-indicator b,
.chart-user-indicator b {
  overflow: hidden; color: var(--text); font-size: 13px; font-weight: 800; line-height: 1.35;
  text-overflow: ellipsis; white-space: nowrap;
}
.chart-group-indicator small,
.chart-user-indicator small {
  margin-top: 2px; color: #68707c; font: 10px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;
}
.chart-group-indicator .select:disabled { opacity: .72; }
.chart-user-indicator { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(112px, .9fr) auto; }
.chart-user-indicator .select { width: 100%; max-width: none; height: 32px; font-size: 11px; }
.chart-user-indicator em { color: var(--text-sub); font-size: 10px; font-style: normal; white-space: nowrap; }
.chart-user-indicator.is-effective em { color: #16864b; font-weight: 700; }
.chart-user-indicator.is-purchase em { color: #9b6812; font-weight: 700; }
.chart-permission-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 760px) {
  .chart-permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-permission-card__head { flex-wrap: wrap; }
  .payment-product-row, .payment-feature-row { grid-template-columns: minmax(120px, 1fr) repeat(2, minmax(82px, .55fr)); }
  .payment-product-row__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 620px) {
  .account-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  #accountModal .modal__panel { max-width: calc(100vw - 20px); }
  .account-info { gap: 10px; padding: 10px; }
  .account-info__summary { display: block; }
  .account-info__identity { display: flex; width: 100%; }
  .account-info__identity strong { max-width: 150px; }
  .account-info__meta { display: flex; gap: 3px 10px; margin-top: 5px; }
  .account-wl__row { gap: 6px; padding-left: 4px; padding-right: 4px; }
  .account-wl__date { font-size: 10px; }
  .account-action-card { min-height: 52px; padding-left: 10px; padding-right: 8px; }
  .account-action-card::after { left: 10px; right: 8px; }
  .account-wl__del { opacity: 1; }
  .account-redeem__title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .qq-group-hint { margin-left: 0; }
  .account-quick-actions { grid-template-columns: minmax(0, 1fr); }
  .account-quick-action { min-height: 56px; }
  .admin-cache-settings { grid-template-columns: minmax(0, 1fr); }
  .admin-list-search { flex-basis: 100%; }
  .admin-list-search .field__input { width: 100%; }
  .admin-list-summary { width: 100%; }
  .payment-admin-order { align-items: flex-start; flex-direction: column; }
  .payment-admin-order__actions { width: 100%; justify-content: flex-start; }
}



/* 管理分页共用加载态，不再沿用旧业务页面命名。 */
.panel-loading--error { color: var(--up); }
.panel-loading {
  grid-column: 1 / -1;
  padding: 30px 20px;
  text-align: center;
  color: var(--text-sub);
  font-size: 13px;
}
.panel-loading::before {
  content: '';
  display: block;
  width: 18px; height: 18px;
  margin: 0 auto 8px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: panel-spin 1s linear infinite;
}
@keyframes panel-spin { to { transform: rotate(360deg); } }
