/* ===========================================================
   沐晨收款 · 管理后台控制台（PC 形态，与客户端完全两套视觉）
   =========================================================== */

:root {
  --bg: #080D1A;
  --bg-glow-1: rgba(14, 165, 233, .16);
  --bg-glow-2: rgba(20, 184, 166, .10);

  --surface: rgba(255, 255, 255, .026);
  --surface-2: rgba(255, 255, 255, .05);
  --surface-3: rgba(255, 255, 255, .082);
  --border: rgba(148, 178, 214, .13);
  --border-strong: rgba(148, 178, 214, .24);

  --text: #E6EDF7;
  --text-dim: #8FA2BE;
  --text-mute: #5D6E8C;

  --brand-1: #0EA5E9;
  --brand-2: #06B6D4;
  --brand-3: #14B8A6;
  --accent: #22D3EE;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, .9);
}

body.admin { background: #080D1A; }

/* 网格底纹，一眼看出是后台 */
body.admin::before {
  background:
    linear-gradient(rgba(148, 178, 214, .040) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(148, 178, 214, .040) 1px, transparent 1px) 0 0 / 44px 100%,
    radial-gradient(1100px 500px at 78% -12%, rgba(14, 165, 233, .16), transparent 62%),
    radial-gradient(800px 420px at 4% 2%, rgba(20, 184, 166, .10), transparent 60%);
}

/* ---------- 顶栏 + 横向导航 ---------- */
.console-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(8, 13, 26, .88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.console-top .bar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; height: 58px;
}
.console-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.console-brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #04121B;
}
.console-brand .nm { font-weight: 650; font-size: 14.5px; letter-spacing: .2px; }
.console-brand .tag {
  font-size: 10.5px; font-weight: 600; letter-spacing: .8px;
  padding: 2px 7px; border-radius: 5px; margin-left: 2px;
  background: rgba(34, 211, 238, .13); color: #67E8F9;
  border: 1px solid rgba(34, 211, 238, .3);
}
.console-user { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-dim); }

.console-nav {
  display: flex; align-items: center; gap: 2px;
  padding: 0 16px; overflow-x: auto;
}
.console-nav a {
  position: relative;
  padding: 11px 14px 12px; font-size: 13px; color: var(--text-dim);
  white-space: nowrap; border-bottom: 2px solid transparent; transition: .16s ease;
}
.console-nav a:hover { color: var(--text); background: var(--surface); }
.console-nav a.on { color: #7DD3FC; border-bottom-color: #22D3EE; font-weight: 550; }
.console-nav .pill {
  margin-left: 6px; font-size: 10.5px; padding: 0 6px; border-radius: 20px;
  background: var(--danger); color: #fff; font-weight: 600;
}

.console-main { max-width: 1520px; margin: 0 auto; padding: 22px 24px 70px; }

/* ---------- 组件覆写：更方、更硬、更像管理端 ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .034), rgba(255, 255, 255, .016));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card-head { border-bottom: 1px solid var(--border); padding-bottom: 11px; margin-bottom: 14px; }
.card-title { font-size: 13.5px; font-weight: 600; letter-spacing: .2px; }
.card-sub { font-size: 11.5px; }

.btn { border-radius: 7px; font-weight: 500; }
.btn-primary {
  background: linear-gradient(180deg, #0EA5E9, #0284C7);
  border: 1px solid rgba(125, 211, 252, .45);
  box-shadow: 0 8px 18px -10px rgba(14, 165, 233, .9);
}
.btn-sm { border-radius: 6px; }

.input, .select, .textarea { border-radius: 7px; background: rgba(4, 9, 19, .6); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(34, 211, 238, .65);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

.seg { border-radius: 8px; background: rgba(4, 9, 19, .5); }
.seg button { border-radius: 6px; }
.seg button.on {
  background: linear-gradient(180deg, #0EA5E9, #0284C7);
  box-shadow: none; color: #fff;
}

.badge { border-radius: 5px; font-size: 11px; padding: 2px 8px; font-weight: 500; }
.chip { border-radius: 5px; font-size: 11.5px; padding: 3px 9px; }

.stat {
  position: relative; border-radius: var(--radius); padding: 15px 17px 15px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .034), rgba(255, 255, 255, .016));
  overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #22D3EE, #14B8A6);
}
.stat .v { font-size: 26px; font-family: var(--mono); font-weight: 600; letter-spacing: -1px; }

/* 通道卡片 */
.ch-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-radius: 9px;
  border: 1px solid var(--border); background: rgba(4, 9, 19, .35);
  margin-bottom: 10px;
}
.ch-card:last-child { margin-bottom: 0; }
.ch-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.ch-dot.on { background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.ch-dot.off { background: #64748B; box-shadow: 0 0 0 3px rgba(100, 116, 139, .16); }
.ch-name { font-size: 13.5px; font-weight: 600; }

/* 表格更紧凑 */
th { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; padding: 0 12px 9px; }
td { padding: 10px 12px; font-size: 13px; }
tbody tr:hover td { background: rgba(34, 211, 238, .035); }

.grad-text {
  background: linear-gradient(100deg, #7DD3FC, #67E8F9 55%, #5EEAD4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.qr-wrap { border-radius: 8px; }

/* 登录页（后台专用，居中窄卡 + 顶部标签） */
.admin-auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  position: relative; z-index: 1;
}
.admin-auth .card {
  width: 100%; max-width: 380px; padding: 30px 28px;
  background: rgba(9, 15, 29, .9); border-radius: 14px; box-shadow: var(--shadow);
}
.admin-auth .mark {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  display: grid; place-items: center; font-size: 20px; font-weight: 700; color: #04121B;
}
.admin-auth .tagline {
  display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .8px;
  padding: 3px 8px; border-radius: 5px; margin-bottom: 10px;
  background: rgba(34, 211, 238, .13); color: #67E8F9; border: 1px solid rgba(34, 211, 238, .3);
}

@media (max-width: 900px) {
  .console-main { padding: 18px 14px 60px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-brand .nm { display: none; }
}
@media (max-width: 620px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
}

/* ===========================================================
   地址总览（所有用户的所有收款地址）
   =========================================================== */
.addr-cell {
  display: inline-block; max-width: 330px; vertical-align: middle;
  cursor: text; user-select: all;
}
td .num.low { color: #FCD34D; }
.addr-actions { display: flex; gap: 6px; }

/* ---------- C2C 管理 ---------- */
.c2c-av {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: grid; place-items: center; color: #04121B; font-weight: 700; font-size: 15px;
  background: linear-gradient(140deg, #22D3EE, #14B8A6);
}
.c2c-av.xs { width: 22px; height: 22px; font-size: 11px; display: inline-grid; vertical-align: -6px; margin-right: 5px; }
.c2c-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
}
.chip.on { background: rgba(14, 165, 233, .16); border-color: rgba(14, 165, 233, .45); color: #7DD3FC; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-qr {
  width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--border-strong); cursor: zoom-in; background: #fff;
}

/* ---------- 地址查询 ---------- */
.pool-user {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
}
.pool-user .badge { flex: 0 0 auto; }
.search-hero .input { transition: border-color .15s ease, box-shadow .15s ease; }
.search-hero .input:focus {
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}

.console-search { display: flex; align-items: center; gap: 8px; flex: 0 1 380px; }
.console-search .input { height: 34px; font-size: 12.5px; }
@media (max-width: 1100px) { .console-search { display: none; } }

/* ---------- 工单客服 ---------- */
.tk-row { display: flex; flex-direction: column; gap: 6px; }
.tk-row .tk-who { font-size: 11.5px; color: var(--text-dim); }
.tk-row .tk-body {
  padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6;
  background: var(--surface-2); border: 1px solid var(--border);
}
.tk-row.admin .tk-body {
  background: rgba(34, 211, 238, .09); border-color: rgba(34, 211, 238, .3);
}

/* 导航角标：红标=待处理，灰标=今日新增（只是参考数字） */
.console-nav .pill.grey { background: rgba(255, 255, 255, .16); color: var(--text-2, #cbd5e1); }

/* ---------- 顶栏提示音：没解锁 / 被浏览器拦截时用红点闪一下，提醒运营点开 ---------- */
.sound-alert {
  background: #FFF1F0 !important;
  border-color: #FFB4AC !important;
  color: #C81E1E !important;
  animation: soundPulse 1.7s ease-in-out infinite;
}
@keyframes soundPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 70, 93, .42); }
  50%      { box-shadow: 0 0 0 6px rgba(246, 70, 93, 0); }
}
@media (prefers-reduced-motion: reduce) { .sound-alert { animation: none; } }
