/* ============================================================
   内部管理后台样式（与用户端样式隔离）
   ============================================================ */

:root {
  color-scheme: dark;
  --brand-bg: #070b16;
  --brand-surface: #101a2f;
  --brand-surface-2: #0b1324;
  --brand-border: rgba(148, 169, 204, 0.16);
  --brand-border-strong: rgba(148, 169, 204, 0.3);
  --brand-text: #e6edfa;
  --brand-muted: #8fa1c0;
  --brand-accent: #22d3ee;
  --brand-accent-soft: rgba(34, 211, 238, 0.12);
  --status-available: #34d399;
  --status-registered: #9aa9c2;
  --status-reserved: #f59e0b;
  --status-unknown: #eab308;
  --status-error: #f87171;
  --radius: 14px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  font-size: 12px;
}

/* ---------------- 登录页 ---------------- */
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(60vw 60vw at 20% 0%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(50vw 50vw at 90% 100%, rgba(59, 130, 246, 0.12), transparent 60%),
    var(--brand-bg);
}

.login-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(40vw 40vw at 50% 50%, rgba(34, 211, 238, 0.05), transparent 70%);
}

.login-wrap {
  position: relative;
  width: min(420px, 100%);
}

.login-card {
  padding: 30px;
  border: 1px solid var(--brand-border);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(20, 32, 58, 0.94), rgba(10, 17, 33, 0.96));
  box-shadow: 0 24px 60px rgba(2, 8, 22, 0.6);
}

.login-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-card__logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-accent) 0%, #3b82f6 100%);
  color: #041019;
  font-size: 21px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.25);
}

.login-card__title {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

.login-card__desc {
  color: var(--brand-muted);
  font-size: 12px;
}

.login-card__foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--brand-border);
  color: #6f81a5;
  font-size: 11px;
  line-height: 1.7;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------------- 通用表单 ---------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  color: var(--brand-muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 10px;
  background: rgba(5, 10, 22, 0.68);
  color: var(--brand-text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: #5b6c8d;
}

.field__textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.8;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
}

.field__select {
  appearance: none;
  min-width: 120px;
  cursor: pointer;
}

.field__select--sm {
  min-width: 96px;
  padding: 7px 10px;
}

/* 表格内联紧凑输入框（如钱包余额调整），显式深色品牌背景，避免回落到浏览器暗色默认灰底 */
.cell-input {
  padding: 7px 11px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 9px;
  background: rgba(5, 10, 22, 0.68);
  color: var(--brand-text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  vertical-align: middle;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.cell-input::placeholder {
  color: #5b6c8d;
}

.cell-input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.cell-input--amount {
  width: 92px;
}

.cell-input--remark {
  width: 150px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-muted);
  font-size: 12px;
  cursor: pointer;
}

.checkbox input {
  accent-color: var(--brand-accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-accent) 0%, #3b82f6 100%);
  color: #041019;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(34, 211, 238, 0.18);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  cursor: progress;
  opacity: 0.65;
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: rgba(16, 26, 47, 0.7);
  color: var(--brand-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.btn:hover {
  color: var(--brand-text);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.08);
}

.btn--danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.32);
}

.btn--danger:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.1);
}

.btn--ghost {
  background: transparent;
}

.mini-btn {
  padding: 4px 10px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: transparent;
  color: var(--brand-muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.mini-btn:hover {
  color: var(--brand-accent);
  border-color: rgba(34, 211, 238, 0.45);
}

.mini-btn--done {
  color: var(--status-available);
  border-color: rgba(52, 211, 153, 0.4);
  cursor: default;
}

.mini-btn--danger {
  color: #fca5a5;
}

.mini-btn--danger:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* ---------------- 顶部 ---------------- */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--brand-border);
  background: rgba(7, 11, 22, 0.86);
  backdrop-filter: blur(12px);
}

.admin-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1400px, 100% - 32px);
  margin: 0 auto;
  padding: 12px 0;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.admin-brand__logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-accent) 0%, #3b82f6 100%);
  color: #041019;
  font-size: 17px;
  font-weight: 700;
}

.admin-brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.admin-brand small {
  color: var(--brand-muted);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.admin-header__user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.admin-header__name {
  color: var(--brand-accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-accent-soft);
}

.admin-header__link {
  color: var(--brand-muted);
  transition: color 0.16s ease;
}

.admin-header__link:hover {
  color: var(--brand-text);
}

.admin-header__link--danger {
  color: #f0a1a1;
}

/* ---------------- 主体 ---------------- */
.admin-main {
  width: min(1400px, 100% - 32px);
  margin: 0 auto;
  padding: 22px 0 40px;
}

.alert {
  margin-bottom: 16px;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 13px;
}

.alert--error {
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.alert--success {
  border: 1px solid rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.09);
  color: #a7f3d0;
}

.alert--warning {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.09);
  color: #fcd34d;
}

.alert--warning code {
  color: inherit;
  word-break: break-all;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 15px 17px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 27, 51, 0.82), rgba(9, 16, 31, 0.9));
}

.stat-card__label {
  display: block;
  color: var(--brand-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.stat-card__value {
  display: block;
  margin: 4px 0 2px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card__meta {
  color: #64748b;
  font-size: 11px;
}

.stat-card--health {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.health-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.health-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid transparent;
}

.health-tag--ok {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.1);
}

.health-tag--warn {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.1);
}

.health-tag--down {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: rgba(10, 17, 33, 0.7);
  width: fit-content;
  max-width: 100%;
}

.admin-tabs__link {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--brand-muted);
  font-size: 12.5px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.admin-tabs__link:hover {
  color: var(--brand-text);
}

.admin-tabs__link--active {
  color: var(--brand-accent);
  background: var(--brand-accent-soft);
}

/* ---------------- 面板 ---------------- */
.panel {
  padding: 20px;
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(16, 26, 47, 0.82), rgba(8, 13, 26, 0.9));
  box-shadow: 0 16px 42px rgba(2, 8, 22, 0.4);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 650;
}

.panel__desc {
  color: var(--brand-muted);
  font-size: 12px;
  max-width: 720px;
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------- 查询区 ---------------- */
.query-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}

.query-grid__main {
  min-width: 0;
}

.query-grid__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: rgba(5, 10, 22, 0.4);
}

.query-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.query-options__hint {
  color: #64748b;
  font-size: 11px;
}

.query-side__hint {
  color: #64748b;
  font-size: 11px;
  line-height: 1.7;
}

.query-side__suffixes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.suffix-tag {
  padding: 2px 8px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  color: #7f90b2;
  font-size: 10.5px;
}

.query-side__status {
  min-height: 18px;
  color: var(--brand-muted);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-word;
}

.query-side__status--error {
  color: #fca5a5;
}

/* ---------------- 表格 ---------------- */
.table-wrap {
  margin-top: 18px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: rgba(5, 10, 22, 0.35);
}

.table-caption {
  padding: 10px 14px;
  border-bottom: 1px solid var(--brand-border);
  color: var(--brand-muted);
  font-size: 11.5px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 169, 204, 0.09);
  vertical-align: middle;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: rgba(11, 19, 36, 0.96);
  color: #6f81a5;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.035);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table__empty {
  padding: 32px 14px !important;
  color: #64748b;
  text-align: center !important;
}

.cell-domain {
  color: #dbeafe;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.cell-muted {
  color: #7f90b2;
}

.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
}

.status-pill--available {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.12);
}

.status-pill--registered {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.1);
}

.status-pill--reserved {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.12);
}

.status-pill--unknown {
  color: #fef08a;
  border-color: rgba(234, 179, 8, 0.32);
  background: rgba(234, 179, 8, 0.1);
}

.status-pill--error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(248, 113, 113, 0.12);
}

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid transparent;
}

.tag--warn {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.tag--flag {
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.1);
}

.tag--follow {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
}

.empty-tip {
  margin-top: 16px;
  padding: 28px;
  border: 1px dashed var(--brand-border);
  border-radius: var(--radius);
  color: #64748b;
  text-align: center;
  font-size: 12.5px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.filter-form .field__input {
  flex: 1 1 200px;
  min-width: 150px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.pagination__link {
  padding: 6px 14px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  color: var(--brand-muted);
  font-size: 12px;
}

.pagination__link:hover {
  color: var(--brand-accent);
  border-color: rgba(34, 211, 238, 0.42);
}

.pagination__info {
  color: #64748b;
  font-size: 11.5px;
}

.admin-footer {
  padding: 18px 16px 28px;
  color: #4b5a76;
  font-size: 11px;
  text-align: center;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .query-grid {
    grid-template-columns: 1fr;
  }

  .query-grid__side {
    order: -1;
  }
}

@media (max-width: 720px) {
  .admin-header__inner,
  .admin-main {
    width: calc(100% - 24px);
  }

  .admin-header__link:not(.admin-header__link--danger) {
    display: none;
  }

  .panel {
    padding: 14px;
  }

  .admin-tabs {
    border-radius: 14px;
  }

  .stat-card__value {
    font-size: 20px;
  }
}
/* ============================================================
   数据导出页面
   ============================================================ */
.admin-section__desc {
  margin: -6px 0 18px;
  color: var(--brand-muted);
  font-size: 14px;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.export-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.export-card:hover {
  border-color: var(--brand-border-strong);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

.export-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.export-card__title {
  margin: 0;
  font-size: 16px;
  color: var(--brand-text);
}

.export-card__count {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.export-card__desc {
  margin: 0;
  color: var(--brand-muted);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}

.export-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-bar__select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface-2);
  color: var(--brand-text);
  font-size: 14px;
  cursor: pointer;
}
/* ============================================================
   后台侧边栏布局（index / customers / quotes / settings / data-export）
   ============================================================ */
.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(34, 211, 238, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0, rgba(59, 130, 246, 0.08), transparent 55%),
    var(--brand-bg);
}

.admin-layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  width: 232px;
  height: 100vh;
  padding: 22px 16px;
  overflow-y: auto;
  background: var(--brand-surface-2);
  border-right: 1px solid var(--brand-border);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  font-size: 14px;
}

.admin-sidebar__brand strong {
  font-weight: 600;
  color: #00FFF6;
  letter-spacing: 0.15em;
}

.admin-sidebar__logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-accent), #3b82f6);
  color: #041018;
  font-weight: 700;
}

.admin-sidebar__logo--image {
  background: linear-gradient(135deg, var(--brand-accent), #3b82f6);
  border: 1px solid var(--brand-border);
  overflow: hidden;
}

.admin-sidebar__logo--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(4, 16, 24, 0.4));
}

.logo-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.logo-preview img {
  max-width: 120px;
  max-height: 60px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface);
  object-fit: contain;
}

.logo-preview__empty {
  color: var(--brand-muted);
  font-size: 13px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
}

.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--brand-muted);
  font-size: 13.5px;
  transition: background .16s ease, color .16s ease;
}

.admin-nav__link:hover {
  background: rgba(148, 169, 204, 0.08);
  color: var(--brand-text);
}

.admin-nav__link--active {
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  font-weight: 600;
}


/* ============================================================
   分组导航（v2.9.0）
   ============================================================ */
.admin-nav__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: .85;
}

.admin-nav__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.admin-nav__link--dash {
  margin-bottom: 8px;
}

.admin-nav__group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--brand-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.admin-nav__group-head:hover {
  background: rgba(148, 169, 204, 0.06);
  color: var(--brand-text);
}

.admin-nav__group--active > .admin-nav__group-head {
  color: var(--brand-text);
}

.admin-nav__chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: .55;
  transition: transform .2s ease;
}

.admin-nav__group.is-open > .admin-nav__group-head .admin-nav__chevron {
  transform: rotate(180deg);
}

.admin-nav__submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .22s ease;
}

.admin-nav__group.is-open > .admin-nav__submenu {
  grid-template-rows: 1fr;
}

.admin-nav__submenu ul {
  min-height: 0;
  margin: 0;
  padding: 0 0 2px 6px;
  overflow: hidden;
  list-style: none;
}

.admin-nav__submenu .admin-nav__link {
  position: relative;
  padding: 8px 10px 8px 12px;
  font-size: 13px;
}

.admin-nav__submenu .admin-nav__link--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: #00FFF6;
}

.admin-nav__section {
  padding: 10px 12px 4px;
  color: #5b6b8a;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.admin-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.admin-nav__submenu .admin-nav__link--active .admin-nav__badge {
  background: rgba(248, 113, 113, 0.3);
}

/* 移动端导航抽屉：按钮与遮罩仅小屏显示 */
.admin-sidebar-toggle,
.admin-sidebar-mask {
  display: none;
}


/* 覆盖旧版顶部导航样式 */
.admin-layout .admin-main {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 26px 30px 48px;
}

/* ============================================================
   统一顶栏（v2.10.0）：面包屑 + 标题 + 描述 / 时间 + 身份 + 退出
   ============================================================ */
.admin-layout .admin-header {
  position: static;
  z-index: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 22px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--brand-border);
  background: none;
  backdrop-filter: none;
}

.admin-header__left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.admin-header__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-header__desc {
  margin: 0;
  color: var(--brand-muted);
  font-size: 12.5px;
}

.admin-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--brand-muted);
  font-size: 12px;
}

.admin-crumb a {
  color: var(--brand-muted);
  transition: color .16s ease;
}

.admin-crumb a:hover {
  color: var(--brand-text);
}

.admin-crumb__sep {
  opacity: .5;
}

.admin-crumb__current {
  color: var(--brand-accent);
}

.admin-header__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding-bottom: 3px;
}

.admin-header__time {
  flex-shrink: 0;
  color: var(--brand-muted);
  font-size: 12px;
}

.admin-header__user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-text);
  font-size: 13px;
}

.admin-header__user::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--status-available);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.admin-header__logout {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1px solid rgba(240, 161, 161, 0.35);
  border-radius: 9px;
  color: #f0a1a1;
  font-size: 13px;
  transition: background .16s ease, border-color .16s ease;
}

.admin-header__logout:hover {
  background: rgba(240, 161, 161, 0.12);
  border-color: rgba(240, 161, 161, 0.55);
}

.admin-section {
  margin-bottom: 28px;
}

.admin-section__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-text);
}

/* ============================================================
   仪表盘待办聚合（v2.10.0）
   ============================================================ */
.admin-todo__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.admin-todo__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: 2px;
}

.todo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: var(--brand-surface);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.todo-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border-strong);
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.45);
}

.todo-card--alert {
  border-color: rgba(248, 113, 113, 0.3);
}

.todo-card__value {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 24px;
  font-weight: 700;
}

.todo-card--alert .todo-card__value {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}

.todo-card--calm .todo-card__value {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.todo-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.todo-card__label {
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 600;
}

.todo-card__hint {
  color: var(--brand-muted);
  font-size: 12px;
}

/* 新版后台表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface);
  font-size: 13.5px;
}

.admin-table th,
.admin-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--brand-border);
}

.admin-table thead th {
  background: rgba(148, 169, 204, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.04);
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

/* 搜索栏（v2.10.0 粘性工具条：滚动时吸顶收纳搜索/筛选） */
.search-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: rgba(7, 11, 22, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(2, 8, 22, 0.4);
}

.search-bar__input {
  flex: 1 1 260px;
  min-width: 200px;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface);
  color: var(--brand-text);
  font-size: 14px;
  outline: none;
  transition: border-color .16s ease;
}

.search-bar__input:focus {
  border-color: var(--brand-accent);
}

.search-bar__input::placeholder {
  color: #64748b;
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-accent), #3b82f6);
  color: #041018;
  font-weight: 600;
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--sm {
  padding: 5px 11px;
  font-size: 12.5px;
}

.empty-text {
  padding: 28px;
  text-align: center;
  color: var(--brand-muted);
  border: 1px dashed var(--brand-border);
  border-radius: var(--radius);
}

.quote-detail-info {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: var(--brand-surface);
  font-size: 13.5px;
}

.settings-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin-bottom: 18px;
}

.field__hint {
  display: block;
  margin-top: 4px;
  color: var(--brand-muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .admin-layout {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 84vw);
    height: 100vh;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s ease;
    border-right: 1px solid var(--brand-border);
    box-shadow: 24px 0 60px rgba(2, 8, 22, 0.55);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    background: rgba(16, 26, 47, 0.92);
    backdrop-filter: blur(8px);
    color: var(--brand-text);
    cursor: pointer;
  }

  .admin-sidebar-toggle__icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
  }

  .admin-sidebar-toggle__icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .admin-sidebar-toggle__icon--close {
    display: none;
  }

  body.admin-nav-open .admin-sidebar-toggle__icon--menu {
    display: none;
  }

  body.admin-nav-open .admin-sidebar-toggle__icon--close {
    display: inline-flex;
  }

  .admin-sidebar-mask {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(4, 8, 18, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .admin-sidebar-mask.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  body.admin-nav-open {
    overflow: hidden;
  }

  .admin-layout .admin-main {
    padding: 66px 16px 36px;
  }

  .admin-layout .admin-header {
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .admin-header__title {
    font-size: 18px;
  }

  .admin-header__desc,
  .admin-header__time {
    display: none;
  }

  .admin-header__right {
    padding-bottom: 0;
    gap: 10px;
  }

  .admin-header__user {
    display: none;
  }

  .admin-header__logout {
    padding: 9px 16px;
    min-height: 40px;
  }

  .admin-crumb {
    font-size: 11px;
  }

  .search-bar {
    position: static;
    padding: 10px 12px;
  }

  .admin-todo__grid {
    gap: 10px;
  }

  .todo-card {
    gap: 12px;
    padding: 13px 14px;
  }

  .todo-card__value {
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
/* ============================================================
   域名账号 / 注册商直达模块 (v2.3.0)
   ============================================================ */
.tag--registrar {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.32);
  background: rgba(59, 130, 246, 0.12);
}

.tag--deliver {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.12);
}

.da-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.da-card {
  padding: 16px 18px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 27, 51, 0.82), rgba(9, 16, 31, 0.9));
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.da-card:hover {
  border-color: var(--brand-border-strong);
  box-shadow: 0 8px 28px rgba(2, 8, 22, .45);
}

.da-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.da-card__domain {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: #dbeafe;
  word-break: break-all;
}

.da-card__meta {
  color: var(--brand-muted);
  font-size: 12.5px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.da-card__note {
  color: #94a3b8;
  font-size: 12px;
}

.da-card__time {
  color: #64748b;
  font-size: 11px;
}

.da-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--brand-border);
}

.da-actions__link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--brand-accent);
  font-size: 12px;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease;
}

.da-actions__link:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.55);
  color: #a5f3fc;
}

.da-form {
  padding: 18px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: var(--brand-surface);
  max-width: 760px;
}

.da-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.da-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 720px) {
  .da-grid {
    grid-template-columns: 1fr;
  }

  .da-form__grid {
    grid-template-columns: 1fr;
  }
}
/* ============ 订单管理 + 支付设置（v2.4.0） ============ */

.tag--paid {
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.tag--pending {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.tag--closed {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

.order-detail-info {
  background: rgba(17, 28, 51, 0.55);
  border: 1px solid rgba(148, 169, 204, 0.12);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 2;
}

.order-detail-info p {
  margin: 0;
}

.conflict-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-left: 4px solid #f87171;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 13px;
  color: #fca5a5;
}

.conflict-alert strong {
  color: #f87171;
}

.conflict-alert__domains {
  color: #fcd34d;
  font-family: inherit;
}

/* ---------- 支付设置 ---------- */

.env-banner {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--brand-muted, #8fa3c8);
  margin-bottom: 14px;
  line-height: 1.8;
}

.env-banner code {
  background: rgba(148, 169, 204, 0.12);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
}

.env-banner--live {
  background: rgba(34, 211, 238, 0.06);
  border-color: rgba(34, 211, 238, 0.28);
}

.env-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.env-tab {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 8px;
  border: 1px solid rgba(148, 169, 204, 0.2);
  color: var(--brand-muted, #8fa3c8);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.env-tab:hover {
  border-color: rgba(34, 211, 238, 0.4);
  color: #22d3ee;
}

.env-tab--active {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.5);
  color: #22d3ee;
  font-weight: 600;
}

.env-tab-hint {
  font-size: 12px;
  color: #fbbf24;
}

.pay-card--disabled {
  opacity: 0.55;
}

.pay-form__switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--brand-text, #dbe6f5);
  margin-bottom: 14px;
  cursor: pointer;
}

.pay-form__switch input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #22d3ee;
  cursor: pointer;
}

.pay-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.pay-form__key {
  font-family: Consolas, Monaco, monospace;
  font-size: 11.5px;
  line-height: 1.5;
}

.pay-form__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--brand-muted, #8fa3c8);
  line-height: 1.7;
}

.pay-form__hint code {
  background: rgba(148, 169, 204, 0.12);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
}

.pay-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ping-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}

.ping-result--loading {
  background: rgba(148, 169, 204, 0.08);
  border: 1px solid rgba(148, 169, 204, 0.2);
  color: var(--brand-muted, #8fa3c8);
}

.ping-result--ok {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.ping-result--fail {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.ping-result__note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  font-size: 12px;
  line-height: 1.7;
  color: var(--brand-muted, #8fa3c8);
}

@media (max-width: 720px) {
  .pay-form__grid {
    grid-template-columns: 1fr;
  }
}
/* 兜底：未加样式类的原生表单控件跟随深色品牌主题，避免 color-scheme: dark 下回落到浏览器默认灰底 */
.admin-body input:not([class]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
.admin-body select:not([class]),
.admin-body textarea:not([class]) {
  padding: 7px 11px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 9px;
  background: rgba(5, 10, 22, 0.68);
  color: var(--brand-text);
  font-family: inherit;
}

.admin-body input:not([class]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"])::placeholder,
.admin-body textarea:not([class])::placeholder {
  color: #5b6c8d;
}
.muted {
  color: var(--brand-muted, #64748b);
}
/* ============================================================
   手动发信：自由组合模板构建器（v2.6.0）
   —— 白底黑字大字号，彻底解决灰色背景看不清问题
   ============================================================ */
.admin-section.mail-send {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 26px;
  margin-bottom: 22px;
}
.mail-send__form { max-width: 940px; }
.mail-send__form .form-field { margin-bottom: 22px; }
.mail-send__form .form-field__label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}
.mail-send__form .form-field__input,
.mail-send__form .form-field__textarea,
#varsInputs input,
#varsInputs textarea {
  width: 100%;
  box-sizing: border-box;
  background: #FFFFFF !important;
  color: #333333 !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 8px;
  padding: 12px 14px !important;
  font-size: 15px;
  line-height: 1.7;
  outline: none;
  transition: border-color .15s;
}
.mail-send__form .form-field__textarea {
  min-height: 150px;
  resize: vertical;
  font-family: inherit;
}
.mail-send__form .form-field__input:focus,
.mail-send__form .form-field__textarea:focus,
.mail-editor .ql-editor:focus,
.mail-editor--fallback textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.mail-send__form .cell-muted { font-size: 13px; line-height: 1.6; }

/* 邮件正文编辑器（Quill snow 主题 + textarea 降级） */
.mail-editor {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
}
.mail-editor .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
}
.mail-editor .ql-container.ql-snow {
  border: none;
  font-size: 14px;
}
.mail-editor .ql-editor {
  min-height: 260px;
  line-height: 1.7;
  color: #1f2937;
}
.mail-editor .ql-editor.ql-blank::before {
  color: #94a3b8;
  font-style: normal;
}
.mail-editor--fallback .cell-muted {
  margin: 0;
  padding: 10px 12px 0;
  font-size: 12px;
}
.mail-editor--fallback textarea {
  border: none;
  border-radius: 8px;
  display: block;
  width: 100%;
  margin-top: 6px;
}

/* 自定义模板操作条（选中自定义模板时显示） */
.tpl-ops {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}
.tpl-ops__hint {
  font-size: 12px;
  color: #64748b;
  margin-right: auto;
}
.tpl-ops__btn {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  line-height: 1.5;
}
.tpl-ops__btn:hover {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
}
.tpl-ops__btn--danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
}
@media (max-width: 768px) {
  .mail-editor .ql-editor { min-height: 200px; }
  .tpl-ops__hint { flex-basis: 100%; }
}

/* 操作按钮区 */
.admin-form .form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 另存为弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal[hidden] { display: none; }
.modal__dialog {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 420px;
  max-width: 92vw;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.modal__title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
/* ============================================================
   优惠券多模式批量发放（grant 页三 Tab + 进度条 + 结果弹窗）
   ============================================================ */
.grant-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: rgba(10, 17, 33, 0.7);
  width: fit-content;
  max-width: 100%;
}

.grant-tabs__btn {
  padding: 8px 18px;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.grant-tabs__btn:hover {
  color: var(--brand-text);
}

.grant-tabs__btn--active {
  color: var(--brand-accent);
  background: var(--brand-accent-soft);
}

.grant-pane {
  margin-bottom: 18px;
}

.grant-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.grant-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: var(--brand-surface-2);
}

.grant-form__item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--brand-muted);
}

.grant-form__item > span {
  color: var(--brand-text);
  white-space: nowrap;
}

.grant-form__item em {
  font-style: normal;
  font-size: 12px;
  color: var(--brand-muted);
}

.grant-form__item input[type="date"],
.grant-form__item input[type="number"],
.grant-form__item select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 10px;
  background: rgba(7, 11, 22, 0.85);
  color: var(--brand-text);
  font-family: inherit;
  font-size: 13px;
}

.grant-warn {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 13px;
}

.grant-info {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  font-size: 13px;
}

.grant-sample-tip {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--brand-muted);
}

.grant-row--bad td {
  color: var(--status-error);
}

.grant-progress {
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 169, 204, 0.15);
}

.grant-progress__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-accent), #4ade80);
  transition: width 0.25s ease;
}

.grant-progress__text {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--brand-muted);
}

.grant-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 22, 0.72);
  backdrop-filter: blur(4px);
}

.grant-modal__box {
  width: min(640px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--brand-border-strong);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(16, 26, 47, 0.97), rgba(8, 13, 26, 0.98));
  box-shadow: 0 24px 60px rgba(2, 8, 22, 0.6);
}

.grant-modal__title {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--brand-text);
}

.grant-modal__stat {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--brand-accent);
}

.grant-modal__table {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
}

.grant-modal__ops {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .grant-tabs__btn {
    padding: 8px 12px;
  }

  .grant-form {
    flex-direction: column;
    gap: 10px;
  }

  .grant-form__item,
  .grant-form__item input[type="date"],
  .grant-form__item input[type="number"],
  .grant-form__item select {
    width: 100%;
  }

  .grant-modal {
    padding: 12px;
  }
}
/* ============================================================
   会员详情抽屉（右侧滑出，深色主题）
   ============================================================ */
.user-detail-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.user-detail-link:hover {
  color: var(--brand-accent, #22d3ee);
  text-decoration: underline;
}

.batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--brand-surface-2, rgba(10, 17, 33, 0.7));
  border: 1px solid var(--brand-border, #1e293b);
  border-radius: 10px;
}
.batch-bar__info {
  font-size: 13px;
  color: var(--brand-muted, #94a3b8);
  margin-right: auto;
}
.batch-bar__info b {
  color: var(--brand-accent, #22d3ee);
}

/* ============================================================
   会员管理 Tab 状态分类（深色科技感，选中下划线高亮）
   ============================================================ */
.user-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 4px 4px 0;
  border-bottom: 1px solid var(--brand-border, #1e293b);
}
.user-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  min-height: 40px;
  font-size: 13.5px;
  color: var(--brand-muted, #94a3b8);
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  transition: color 0.16s ease, background-color 0.16s ease;
  cursor: pointer;
}
.user-tab:hover {
  color: var(--brand-text, #e2e8f0);
  background: rgba(255, 255, 255, 0.04);
}
.user-tab--active {
  color: var(--brand-accent, #22d3ee);
  font-weight: 600;
}
.user-tab--active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--brand-accent, #22d3ee), rgba(59, 130, 246, 0.7));
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}
.user-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-muted, #94a3b8);
}
.user-tab--active .user-tab__badge {
  background: rgba(34, 211, 238, 0.15);
  color: var(--brand-accent, #22d3ee);
}
.user-tab__badge--warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.user-tab--active .user-tab__badge--warn {
  color: #f59e0b;
}

/* ============================================================
   操作列「更多 ⌄」折叠下拉
   ============================================================ */
.op-more {
  position: relative;
  display: inline-block;
}
.op-more__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 90;
  min-width: 132px;
  padding: 6px;
  background: var(--brand-surface-2, #101a30);
  border: 1px solid var(--brand-border, #1e293b);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: opMenuIn 0.16s ease;
}
.op-more__menu[hidden] { display: none; }
@keyframes opMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.op-more__item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  min-height: 36px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--brand-text, #e2e8f0);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.op-more__item:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--brand-accent, #22d3ee);
}

/* 运营弹窗平滑过渡动画 */
.modal {
  animation: opsModalIn 0.18s ease;
}
.modal__dialog {
  animation: opsDialogIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal[hidden] { display: none; }
@keyframes opsModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes opsDialogIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
  .user-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .user-tab {
    padding: 9px 12px;
    font-size: 12.5px;
  }
  .op-more__menu {
    position: fixed;
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.user-drawer[hidden] { display: none; }
.user-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.user-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 28, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.user-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 720px;
  max-width: 96vw;
  background: var(--brand-surface, #0f1729);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  animation: udSlideIn 0.22s ease;
}
@keyframes udSlideIn {
  from { transform: translateX(40px); opacity: 0.4; }
  to   { transform: translateX(0);    opacity: 1; }
}
.user-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--brand-border, #1e293b);
  flex-shrink: 0;
}
.user-drawer__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-text, #e2e8f0);
  margin: 0;
}
.user-drawer__close {
  background: none;
  border: none;
  color: var(--brand-muted, #94a3b8);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  min-height: 40px;
  min-width: 40px;
}
.user-drawer__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--brand-text, #e2e8f0);
}
.user-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.ud-section {
  margin-bottom: 24px;
}
.ud-section__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-accent, #22d3ee);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--brand-border, #1e293b);
  letter-spacing: 0.04em;
}
.ud-kv {
  display: flex;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.7;
}
.ud-kv__k {
  flex-shrink: 0;
  width: 96px;
  color: var(--brand-muted, #94a3b8);
}
.ud-kv__v {
  flex: 1;
  color: var(--brand-text, #e2e8f0);
  word-break: break-all;
}
.ud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 8px;
}
.ud-table th,
.ud-table td {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ud-table th {
  color: var(--brand-muted, #94a3b8);
  font-weight: 600;
  font-size: 12px;
}
.ud-table td {
  color: var(--brand-text, #e2e8f0);
}
.ud-table .cell-muted {
  color: var(--brand-muted, #94a3b8);
}

@media (max-width: 768px) {
  .user-drawer__panel {
    width: 100vw;
  }
  .user-drawer__head,
  .user-drawer__body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ud-kv__k {
    width: 80px;
  }
}
