* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #2c3e50; min-height: 100vh; display: flex; flex-direction: column;
  background-color: #eef2f8;
  background-image:
    radial-gradient(900px 480px at 88% -8%, rgba(13,148,136,.08), transparent 62%),
    radial-gradient(760px 460px at -6% 108%, rgba(180,83,9,.05), transparent 60%),
    linear-gradient(180deg, #f7f8fa 0%, #eff1f4 100%);
  background-attachment: fixed;
}
a { color: #0d9488; text-decoration: none; transition: color .2s; }
a:hover { text-decoration: underline; }
/* 页面入场动画 + 切页淡出 */
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body.page-leave .content, body.page-leave .container { animation: none; opacity: 0; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }

/* 未登录页顶栏: 毛玻璃 */
.navbar { background: rgba(255,255,255,.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(148,163,184,.18); padding: 0 20px; position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #1f2937; font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand-ico { width: 30px; height: 30px; border-radius: 9px; background: #111827; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: #4b5563; font-size: 14px; }
.nav-links a:hover { color: #0d9488; text-decoration: none; }
.nav-user { color: #9ca3af; font-size: 13px; }
.inline-form { display: inline; }
.link-btn { background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 14px; }
.link-btn:hover { color: #fff; }

/* 右上角用户头像菜单 */
.nav-user-menu { position: relative; }
.nav-user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 20px; }
.nav-user-chip:hover { background: rgba(255,255,255,.08); }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: inline-block; }
.nav-avatar-fallback { background: #374151; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.nav-user-name { color: #e5e7eb; font-size: 14px; }
/* padding-top 形成悬停桥接区, 鼠标从头像移向卡片不会断开 */
.user-pop { display: none; position: absolute; right: 0; top: 100%; padding-top: 10px; width: 260px; z-index: 100; }
.nav-user-menu:hover .user-pop, .nav-user-menu.open .user-pop { display: block; }
.user-pop-card { background: #fff; color: #1f2937; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.16); padding: 14px; }
.user-pop-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #f0f2f5; }
.user-pop-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.user-pop-name { display: flex; flex-direction: column; }
.user-pop-name b { font-size: 15px; }
.user-pop-name small { color: #9ca3af; font-size: 12px; }
.user-pop-rows { padding: 8px 0; }
.user-pop-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #6b7280; }
.user-pop-row em { font-style: normal; color: #374151; }
.user-pop-actions { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.user-pop-actions + .user-pop-actions { border-top: 1px solid #f0f2f5; padding-top: 10px; margin-top: 10px; }
.pop-switch { color: #0d9488; }
.user-pop-actions a { color: #0d9488; }
.user-pop-actions .link-btn { color: #ef4444; font-size: 13px; padding: 0; }

.container { max-width: 1080px; margin: 24px auto; padding: 0 16px; flex: 1; width: 100%; animation: pageIn .45s cubic-bezier(.22,.61,.36,1) both; }
.footer { text-align: center; color: #9ca3af; font-size: 12px; padding: 20px 0; }
body.app .footer { margin-left: 232px; }

.card { background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.7); border-radius: 12px; padding: 22px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(31,45,80,.06); transition: box-shadow .25s; }
.card:hover { box-shadow: 0 6px 22px rgba(31,45,80,.09); }
.card h2 { font-size: 16px; margin-bottom: 14px; border-left: 3px solid #0d9488; padding-left: 8px; }
.card h3 { font-size: 14px; margin: 12px 0 8px; }

.auth-wrap { max-width: 400px; margin: 60px auto; }
.auth-wrap-wide { max-width: 520px; }
.auth-wrap h1 { font-size: 22px; text-align: center; margin-bottom: 20px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; color: #6b7280; }

/* 找回密码: 步骤条 */
.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9ca3af; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: #e5e7eb; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.step.on { color: #0d9488; font-weight: 600; }
.step.on i { background: #0d9488; }
.step-line { width: 40px; height: 2px; background: #e5e7eb; margin: 0 8px; }
.step-line.on { background: #0d9488; }

/* 找回密码: 验证方式卡片 */
.channel-card { display: flex; align-items: center; gap: 12px; border: 1px solid #e2e6ec; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.channel-card:hover { border-color: #0d9488; }
.channel-ico { font-size: 22px; }
.channel-info { flex: 1; display: flex; flex-direction: column; }
.channel-info b { font-size: 14px; }
.channel-info small { color: #9ca3af; font-size: 12px; margin-top: 2px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 5px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number],
.form-row input[type=url], .form-row select, .form-row textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #fff;
}
.form-row textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.btn { display: inline-block; padding: 9px 18px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; background: #0d9488; color: #fff; transition: background .2s, box-shadow .2s, transform .12s; box-shadow: 0 2px 6px rgba(13,148,136,.18); }
.btn:hover { background: #0f766e; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-green { background: #16a34a; } .btn-green:hover { background: #15803d; }
.btn-red { background: #dc2626; } .btn-red:hover { background: #b91c1c; }
.btn-gray { background: #6b7280; } .btn-gray:hover { background: #4b5563; }
.btn-block { width: 100%; }

.alert { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.alert-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.alert-warn a { color: #b45309; font-weight: 600; }
/* 日志/订单行内错误摘要 */
.log-err { margin-top: 4px; font-size: 12px; color: #dc2626; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid #eef0f3; text-align: left; }
th { background: #f9fafb; color: #6b7280; font-weight: 600; white-space: nowrap; }
td { transition: background .15s; }
table tr:hover > td { background: #f7f9fd; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-gray { background: #e5e7eb; color: #4b5563; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.plan-card { border: 2px solid #e5e7eb; border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; transition: border-color .15s; }
.plan-card:hover { border-color: #5eead4; }
.plan-card input[type=radio] { margin-bottom: 8px; }
.plan-card .plan-name { font-weight: 600; font-size: 15px; }
.plan-card .plan-price { font-size: 22px; color: #dc2626; margin: 8px 0; }
.plan-card .plan-days { font-size: 12px; color: #9ca3af; }
.plan-card .plan-remark { font-size: 12px; color: #6b7280; margin-top: 6px; line-height: 1.5; }

.qr-box { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.qr-box img { max-width: 220px; max-height: 220px; border: 1px solid #e5e7eb; border-radius: 8px; }
.qr-empty { width: 220px; height: 220px; border: 1px dashed #d1d5db; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; }
/* 虚拟币收款地址表 */
.wallet-table { min-width: 460px; }
.wallet-table th { font-size: 12px; color: #6b7280; }
.wallet-chain { white-space: nowrap; font-weight: 600; }
.wallet-addr { font-family: monospace; word-break: break-all; font-size: 13px; }

.muted { color: #9ca3af; font-size: 12px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.right { text-align: right; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 侧边栏布局: 最左列通栏, 从上到下铺满 ---------- */
.layout { display: block; flex: 1; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 232px; z-index: 60;
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #16181d 0%, #101216 100%);
  padding: 18px 14px 14px;
  box-shadow: 2px 0 18px rgba(15,23,42,.16);
}
.sidebar .brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 16px; padding: 2px 8px 16px; }
.side-nav { flex: 1; overflow-y: auto; padding-right: 2px; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }
.sidebar .side-title { font-size: 11px; letter-spacing: .08em; color: #7487ab; padding: 10px 12px 6px; }
.sidebar a { display: block; padding: 9px 12px; margin: 2px 0; font-size: 14px; color: #b6c2d9; border-radius: 9px; transition: background .2s, color .2s, padding-left .2s; }
.sidebar a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; padding-left: 16px; }
.sidebar a.active { background: #0d9488; color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(13,148,136,.25); }
.sidebar .side-sub a { padding-left: 30px; font-size: 13px; color: #8fa0bd; }
.sidebar .side-sub a:hover { padding-left: 34px; }
.sidebar .side-sub a.active { padding-left: 30px; }
/* 侧边栏底部用户区 */
.side-foot { border-top: 1px solid rgba(255,255,255,.09); padding-top: 12px; margin-top: 10px; }
.side-foot .nav-user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 8px 10px; border-radius: 10px; transition: background .2s; }
.side-foot .nav-user-chip:hover { background: rgba(255,255,255,.08); }
.side-foot .nav-user-name { color: #e2e8f0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 用户卡片在侧边栏内向上弹出, padding-bottom 形成悬停桥接 */
.side-foot .user-pop { top: auto; bottom: 100%; left: 0; right: 0; width: auto; padding: 0 0 10px; }
.content { margin-left: 232px; flex: 1; min-width: 0; padding: 26px 30px 6px; max-width: 1260px; animation: pageIn .45s cubic-bezier(.22,.61,.36,1) both; }

/* 设置页子导航选项卡 */
.subnav { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.subnav a { padding: 7px 16px; border-radius: 20px; font-size: 13px; color: #6b7280; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.subnav a:hover { color: #0d9488; text-decoration: none; }
.subnav a.active { background: #0d9488; color: #fff; font-weight: 600; }

/* 配置测试区 */
.test-box { background: #f8fafc; border: 1px dashed #99f6e4; border-radius: 10px; padding: 14px 16px; margin-top: 18px; }
.test-box-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.test-box-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.test-box-row input { flex: 1; min-width: 180px; padding: 9px 12px; border: 1px solid #e2e6ec; border-radius: 8px; font-size: 14px; }
.interval-row { display: flex; gap: 8px; }
.interval-row input { flex: 1; }
.interval-row select { padding: 9px 12px; border: 1px solid #e2e6ec; border-radius: 8px; font-size: 14px; background: #fff; }

/* 申请审批: 操作区单行对齐 + 天数输入框 */
.approve-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.approve-form { display: flex; align-items: center; gap: 6px; }
.note-input { width: 130px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; }
.days-box { display: inline-flex; align-items: center; background: #fff; border: 1px solid #dfe3ea; border-radius: 8px; padding-right: 8px; transition: border-color .15s; }
.days-box:focus-within { border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13,148,136,.12); }
.days-input { width: 52px; border: none; outline: none; padding: 7px 4px 7px 10px; font-size: 13px; background: transparent; text-align: center; }
.days-input::-webkit-inner-spin-button { opacity: 1; }
.days-unit { font-size: 12px; color: #9ca3af; }

/* 付费订阅页: 我的订阅状态 */
.sub-status { display: flex; gap: 32px; flex-wrap: wrap; }
.sub-status-item { display: flex; flex-direction: column; gap: 4px; }
.sub-status-item small { color: #9ca3af; font-size: 12px; }
.sub-expire { font-size: 16px; color: #0f766e; }
.sub-expire.expired { color: #ef4444; }
code { background: #f3f4f6; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.chip { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; border-radius: 14px; padding: 2px 10px; font-size: 12px; cursor: pointer; margin: 2px; }
.chip:hover { background: #ccfbf1; }
.content { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 12px; box-shadow: none; }
  .sidebar .brand { padding-bottom: 10px; }
  .side-nav { display: flex; flex-wrap: wrap; gap: 2px 6px; overflow: visible; padding: 0; }
  .sidebar .side-title { display: none; }
  .sidebar .side-sub { display: contents; }
  .sidebar a, .sidebar .side-sub a { padding: 8px 12px; margin: 0; }
  .sidebar a:hover, .sidebar .side-sub a:hover { padding-left: 12px; }
  .sidebar .side-sub a.active { padding-left: 12px; }
  .side-foot { border-top: none; margin-top: 6px; padding-top: 6px; }
  .side-foot .user-pop { bottom: auto; top: 100%; padding: 10px 0 0; }
  .content, body.app .footer { margin-left: 0; }
  .content { padding: 18px 14px 6px; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-size: 19px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- 用户中心 ---------- */
.uc-hero { display: flex; align-items: center; gap: 22px; background: linear-gradient(120deg, #0f172a 0%, #1e293b 60%, #334155 100%); border-radius: 14px; padding: 28px; margin-bottom: 18px; color: #fff; box-shadow: 0 6px 20px rgba(15,23,42,.2); }
.uc-avatar-wrap { position: relative; display: block; width: 92px; height: 92px; cursor: pointer; flex-shrink: 0; }
.uc-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.uc-avatar-empty { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.22); font-size: 36px; font-weight: 700; }
.uc-avatar-mask { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; font-size: 13px; opacity: 0; transition: opacity .18s; }
.uc-avatar-wrap:hover .uc-avatar-mask { opacity: 1; }
.uc-name { font-size: 22px; font-weight: 700; }
.uc-sub { font-size: 13px; opacity: .8; margin: 4px 0 10px; }
.uc-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.uc-badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,.18); backdrop-filter: blur(2px); }
.uc-badge-on { background: rgba(34,197,94,.3); }
.uc-badge-off { opacity: .75; }

.uc-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .uc-grid { grid-template-columns: 1fr; } .uc-hero { flex-direction: column; text-align: center; } .uc-badges { justify-content: center; } }

.uc-card { background: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.uc-card-title { font-size: 15px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #f0f2f5; }
.uc-field { margin-bottom: 16px; }
.uc-field label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.uc-field input[type=text] { width: 100%; padding: 10px 14px; border: 1px solid #e2e6ec; border-radius: 8px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.uc-field input[type=text]:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.uc-radio-group { display: flex; gap: 10px; }
.uc-radio { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border: 1px solid #e2e6ec; border-radius: 20px; font-size: 13px; cursor: pointer; transition: all .15s; color: #6b7280; }
.uc-radio input { display: none; }
.uc-radio.checked { background: #f0fdfa; border-color: #0d9488; color: #0f766e; font-weight: 600; }
.uc-save-btn { margin-top: 4px; border-radius: 8px; padding: 10px 26px; }

.uc-bind { padding: 16px 0; border-bottom: 1px solid #f0f2f5; }
.uc-bind:last-of-type { border-bottom: none; }
.uc-bind-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.uc-bind-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.uc-bind-icon-phone { background: #fef3c7; }
.uc-bind-icon-mail { background: #dbeafe; }
.uc-bind-name { font-size: 14px; font-weight: 600; }
.uc-bind-status { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.uc-bind-status b { color: #374151; font-weight: 600; }
.uc-state { margin-left: auto; font-size: 12px; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; }
.uc-state-on { background: #dcfce7; color: #15803d; }
.uc-state-off { background: #f3f4f6; color: #9ca3af; }
.uc-code-row { display: flex; gap: 8px; margin-bottom: 8px; }
.uc-code-row input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #e2e6ec; border-radius: 8px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.uc-code-row input:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.uc-code-btn { background: #fff; color: #0d9488; border: 1px solid #99f6e4; border-radius: 8px; padding: 0 14px; font-size: 13px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.uc-code-btn:hover:not(:disabled) { background: #f0fdfa; }
.uc-code-btn:disabled { border-color: #e5e7eb; color: #9ca3af; background: #f9fafb; cursor: not-allowed; }
.uc-bind-btn { background: #0d9488; color: #fff; border: none; border-radius: 8px; padding: 0 22px; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s; }
.uc-bind-btn:hover { background: #0f766e; }
.uc-tip { font-size: 12px; color: #b0b7c3; margin-top: 12px; }

/* ---------- 注册页 / 滑块验证码 ---------- */
.input-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.input-group input { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; flex: 1; min-width: 100px; }
.hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.auth-card { max-width: 440px; margin: 30px auto; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.7); border-radius: 14px; padding: 26px; box-shadow: 0 12px 40px rgba(31,45,80,.12); animation: pageIn .45s cubic-bezier(.22,.61,.36,1) both; }
.auth-card h2 { font-size: 18px; margin-bottom: 16px; text-align: center; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 13px; color: #6b7280; }

/* ---------- 认证页(登录/注册/找回密码): 深色背景图 + 毛玻璃卡片 ---------- */
body.auth { background: linear-gradient(165deg, rgba(9,14,34,.68) 0%, rgba(15,23,52,.60) 45%, rgba(10,15,38,.76) 100%), url('/img/auth-bg.png') center / cover no-repeat fixed; }
body.auth .navbar { background: rgba(10,16,38,.38); border-bottom-color: rgba(255,255,255,.14); }
body.auth .brand { color: #fff; }
body.auth .nav-links a { color: rgba(255,255,255,.82); }
body.auth .nav-links a:hover { color: #5eead4; }
body.auth .auth-wrap { margin: 8vh auto; }
/* 登录卡片: 品牌头 + 图标输入框 */
.login-card { max-width: 400px; margin: 10vh auto; background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.5); border-radius: 18px; padding: 38px 34px 28px; box-shadow: 0 24px 60px rgba(5,10,30,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: pageIn .45s cubic-bezier(.22,.61,.36,1) both; }
.login-head { text-align: center; margin-bottom: 26px; }
.login-logo { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 15px; background: #111827; color: #fff; font-size: 26px; margin-bottom: 14px; box-shadow: 0 8px 22px rgba(17,24,39,.35); }
.login-head h1 { font-size: 21px; color: #111827; margin-bottom: 6px; letter-spacing: .5px; }
body.auth .login-card .login-head h1 { color: #111827; font-size: 21px; text-shadow: none; }
.login-head p { font-size: 13px; color: #9ca3af; }
.login-field { position: relative; margin-bottom: 14px; }
.login-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #9aa3b2; pointer-events: none; }
.login-field input { width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid #e5e8ee; border-radius: 10px; background: #f6f7f9; font-size: 14px; transition: background .15s, border-color .15s, box-shadow .15s; }
.login-field input::placeholder { color: #aab2bf; }
.login-field input:focus { outline: none; background: #fff; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.13); }
.login-btn { height: 46px; border-radius: 10px; font-size: 15px; font-weight: 600; letter-spacing: 8px; text-indent: 8px; margin-top: 6px; }
body.auth .login-card .auth-links { margin-top: 18px; }
body.auth .auth-wrap h1 { color: #fff; font-size: 26px; letter-spacing: 1px; text-shadow: 0 2px 14px rgba(0,0,0,.5); }
body.auth .auth-card { margin: 8vh auto; }
body.auth .card, body.auth .auth-card { background: rgba(255,255,255,.96); border-color: rgba(255,255,255,.4); border-radius: 16px; padding: 30px 28px; box-shadow: 0 18px 50px rgba(5,10,30,.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.auth .footer { color: rgba(255,255,255,.55); }
/* 认证页表单: 更饱满的输入框与主按钮 */
body.auth .form-row input[type=text], body.auth .form-row input[type=password], body.auth .form-row input[type=tel], body.auth .form-row select {
  padding: 11px 14px; border: 1px solid #e2e6ec; border-radius: 9px; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
body.auth .form-row input:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.14); }
body.auth .auth-card .btn-block, body.auth .auth-wrap .btn-block { padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; letter-spacing: 6px; margin-top: 4px; }
body.auth .auth-links { margin-top: 18px; }
body.auth .auth-card h2 { font-size: 19px; }
/* 步骤条在深色背景上的可读性 */
body.auth .step { color: rgba(255,255,255,.62); }
body.auth .step.on { color: #5eead4; }
body.auth .step i { background: rgba(255,255,255,.22); }
body.auth .step.on i { background: #0d9488; }
body.auth .step-line { background: rgba(255,255,255,.25); }
body.auth .step-line.on { background: #5eead4; }
.btn-outline { background: #fff; color: #0d9488; border: 1px solid #0d9488; white-space: nowrap; }
.btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-danger { background: #fff; color: #ef4444; border: 1px solid #ef4444; }
.btn-danger:hover { background: #fef2f2; }
.btn-cancel { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.btn-cancel:hover { background: #e5e7eb; color: #374151; }
.row-disabled td { color: #9ca3af; }

/* 机器人向导: 类型选择卡片 */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.type-card { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 22px 14px; text-align: center; color: #1f2937; transition: border-color .15s, box-shadow .15s; }
.type-card:hover { border-color: #0d9488; box-shadow: 0 4px 14px rgba(13,148,136,.1); text-decoration: none; }
.type-card.disabled { opacity: .55; cursor: not-allowed; background: #fafafa; }
.type-icon { font-size: 30px; }
.type-card small { color: #9ca3af; font-size: 12px; }
/* 机器人列表操作列 */
.robot-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 推送效果演示图 */
.demo-img { max-width: 460px; width: 100%; border-radius: 12px; border: 1px solid #e5e7eb; box-shadow: 0 6px 20px rgba(31,45,80,.10); }
/* 机器人配置教程: 可折叠区块 */
.tutorial { border: 1px solid #e2e6ec; border-radius: 10px; background: #f8fafc; margin-bottom: 16px; }
.tutorial summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 14px; font-weight: 600; color: #0f766e; cursor: pointer; user-select: none; list-style: none; }
.tutorial summary::-webkit-details-marker { display: none; }
.tutorial-toggle { margin-left: auto; font-size: 12px; font-weight: 400; color: #9aa3b2; }
.tutorial-toggle::after { content: '点击展开'; }
.tutorial[open] { background: #fff; }
.tutorial[open] .tutorial-toggle::after { content: '点击收起'; }
.tutorial-body { padding: 4px 16px 16px; border-top: 1px dashed #e2e6ec; }
.tutorial-body h3 { font-size: 13px; margin: 14px 0 6px; }
.tutorial-body ol { margin: 0 0 4px; padding-left: 20px; }
.tutorial-body li { font-size: 13px; color: #4b5563; line-height: 1.9; }
/* 表头排序按钮 */
.th-sort { display: inline-flex; flex-direction: column; vertical-align: middle; margin-left: 4px; line-height: 0.8; }
.sort-btn { font-size: 9px; color: #b6bcc6; padding: 0 2px; border: none; background: none; cursor: pointer; }
.sort-btn:hover { color: #0d9488; }
.sort-btn.active { color: #0d9488; }
.btn-outline:hover { background: #f0fdfa; }
.btn-outline:disabled { border-color: #d1d5db; color: #9ca3af; background: #f9fafb; cursor: not-allowed; }

.captcha-box { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; background: #fafbfc; }
.captcha-stage { position: relative; height: 110px; background: linear-gradient(135deg, #e7ebee 0%, #dde7e4 55%, #d8e8e2 100%) center/100% 100% no-repeat; border-radius: 6px; overflow: hidden; margin-bottom: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.captcha-target { position: absolute; width: 40px; height: 40px; border: 2px dashed rgba(255,255,255,.9); border-radius: 6px; background: rgba(15,23,42,.45); box-shadow: 0 0 6px rgba(0,0,0,.35); }
.captcha-piece { position: absolute; left: 0; width: 40px; height: 40px; background: #0d9488; border: 2px solid rgba(255,255,255,.95); border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.4); background-repeat: no-repeat; }
.captcha-track { position: relative; height: 40px; background: #e5e7eb; border-radius: 6px; user-select: none; }
.captcha-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #9ca3af; pointer-events: none; }
.captcha-slider { position: absolute; left: 0; top: 0; width: 44px; height: 40px; background: #0d9488; color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.captcha-slider:active { cursor: grabbing; }
.captcha-msg { min-height: 18px; font-size: 12px; margin-top: 6px; }
.captcha-msg.ok { color: #15803d; }
.captcha-msg.err { color: #b91c1c; }

/* ---------- 咨询客服入口(侧边栏底部) ---------- */
.side-support { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #dbe4ff; font-size: 14px; text-decoration: none; transition: background .2s ease, color .2s ease; }
.side-support:hover { background: rgba(255,255,255,.16); color: #fff; }
.side-support.active { background: #0d9488; color: #fff; }

/* ---------- 聊天对话框 ---------- */
.chat-box { height: 460px; overflow-y: auto; padding: 16px; background: #f7f9fd; border: 1px solid #e8ecf4; border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.chat-hint { text-align: center; color: #9aa3b2; font-size: 12px; }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg-right { align-self: flex-end; align-items: flex-end; }
.msg-left { align-self: flex-start; align-items: flex-start; }
.msg-name { font-size: 12px; color: #8a93a3; margin-bottom: 2px; }
.msg-bubble { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; word-break: break-word; box-shadow: 0 1px 3px rgba(31,45,80,.08); }
.msg-left .msg-bubble { background: #fff; border: 1px solid #e8ecf4; border-top-left-radius: 4px; }
.msg-right .msg-bubble { background: #0d9488; color: #fff; border-top-right-radius: 4px; }
.msg-img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; margin-top: 4px; }
.msg-time { font-size: 11px; color: #a0a8b5; margin-top: 3px; }
.chat-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chat-form textarea { flex: 1 1 100%; box-sizing: border-box; resize: vertical; min-height: 44px; padding: 10px 12px; border: 1px solid #d9dee8; border-radius: 10px; font-size: 14px; font-family: inherit; }
.chat-img-btn { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; padding: 9px 18px; border: 1px dashed #b9c2d4; border-radius: 6px; color: #5a6478; font-size: 14px; cursor: pointer; white-space: nowrap; box-sizing: border-box; }
.chat-img-btn:hover { border-color: #0d9488; color: #0d9488; }
/* 聊天图片上传: 圆形加号按钮, 点击弹出系统选图窗口 */
.chat-add-img { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; margin-right: auto; border: 1px dashed #b9c2d4; border-radius: 50%; background: #fff; color: #8a93a6; font-size: 22px; line-height: 1; font-weight: 400; cursor: pointer; user-select: none; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .15s ease; }
.chat-add-img:hover { border-color: #0d9488; color: #0d9488; background: #f0fdfa; transform: scale(1.06); }
.chat-add-img:active { transform: scale(.96); }
.chat-add-img input { display: none; }

/* ---------- 分页条 ---------- */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; }
.pager-item { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid #dfe4ee; border-radius: 8px; background: #fff; color: #4b5563; font-size: 13px; text-decoration: none; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.pager-item:hover { border-color: #0d9488; color: #0d9488; background: #f0fdfa; }
.pager-item.active { background: #0d9488; border-color: transparent; color: #fff; cursor: default; }
.pager-dots { color: #9aa3b2; padding: 0 2px; }
.pager-info { color: #9aa3b2; font-size: 12px; margin-left: 8px; }
.chat-preview { margin-top: 10px; font-size: 13px; color: #5a6478; display: flex; align-items: center; gap: 8px; }
.chat-preview img { height: 56px; border-radius: 8px; border: 1px solid #e8ecf4; }
.chat-error { margin-top: 8px; color: #d92d20; font-size: 13px; }

/* ---------- 后台客服留言布局 ---------- */
.support-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.conv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.conv-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: inherit; transition: background .2s ease; }
.conv-item:hover { background: #f2f5fb; }
.conv-item.active { background: #f0fdfa; }
.conv-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.conv-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: #475569; color: #fff; font-weight: 600; }
.conv-info { display: flex; flex-direction: column; min-width: 0; }
.conv-info b { font-size: 14px; }
.conv-info small { color: #8a93a3; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 用户管理表格列较多, 字号收窄 */
.users-table { font-size: 13px; }
.um-cell { display: flex; align-items: center; gap: 10px; }
.um-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.um-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: #475569; color: #fff; font-weight: 600; font-size: 15px; }
.um-names { display: flex; flex-direction: column; line-height: 1.3; }
.um-names small { color: #9aa3b2; }
.um-contact { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #5a6478; }
.um-time { font-size: 12px; color: #6b7280; white-space: nowrap; }

/* ---------- 用户详情页 ---------- */
.ud-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ud-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; font-size: 26px; }
.ud-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: #475569; color: #fff; font-weight: 600; }
.ud-title { flex: 1; min-width: 200px; }
.ud-title h2 { margin: 0 0 6px; }
.ud-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ud-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ud-actions .inline-form { display: inline-flex; }
.ud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f3; }
.ud-item label { display: block; font-size: 12px; color: #9aa3b2; margin-bottom: 3px; }
.ud-item > div { font-size: 14px; color: #1f2d50; word-break: break-all; }
.ud-ops { display: flex; gap: 6px; align-items: center; }
.ud-ops .inline-form { display: inline-flex; }
.ud-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #6b7280; }
.ud-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ud-inline-form input, .ud-inline-form select { padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }
.ud-inline-form input[type=text] { width: 170px; }
.ud-inline-form input[type=number] { width: 90px; }
.ud-inline-form .ud-flex-input { flex: 1; min-width: 220px; width: auto; }

/* ---------- 检测周期单位选择 ---------- */
.interval-group { display: flex; gap: 8px; }
.interval-group input { flex: 1; }
.interval-group select { width: 130px; }

/* ---------- 收款码放大弹框 ---------- */
.qr-img-zoom { cursor: zoom-in; transition: transform .2s ease, box-shadow .2s ease; }
.qr-img-zoom:hover { transform: scale(1.02); box-shadow: 0 6px 18px rgba(31,45,80,.16); }
.qr-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.62); backdrop-filter: blur(2px); }
.qr-modal img { max-width: 88vw; max-height: 84vh; border-radius: 12px; background: #fff; padding: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: pageIn .22s ease both; cursor: zoom-out; }

@media (max-width: 900px) {
  .support-layout { grid-template-columns: 1fr; }
  .chat-box { height: 360px; }
}

/* ---------- 可搜索下拉选择器 ---------- */
.ss { position: relative; }
.ss-btn { display: block; width: 100%; text-align: left; padding: 9px 32px 9px 12px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.ss-btn::after { content: ''; position: absolute; right: 12px; top: 50%; margin-top: -2px; border: 5px solid transparent; border-top-color: #9aa3b2; }
.ss.open .ss-btn { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.ss-panel { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.14); z-index: 80; overflow: hidden; }
.ss.open .ss-panel { display: block; }
.ss-search { width: 100%; box-sizing: border-box; padding: 9px 12px; border: none; border-bottom: 1px solid #eef0f3; font-size: 13px; outline: none; }
.ss-list { max-height: 240px; overflow-y: auto; }
.ss-item { padding: 8px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item:hover { background: #f0fdfa; }
.ss-item.active { color: #0d9488; font-weight: 600; }
.ss-item.disabled { color: #c0c4cc; cursor: not-allowed; }
.ss-empty { padding: 14px 12px; text-align: center; color: #9aa3b2; font-size: 13px; }
.ud-inline-form .ss { min-width: 220px; }

/* 帮助文档 */
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.help-toc a { padding: 6px 14px; border: 1px solid #e2e6ec; border-radius: 999px; font-size: 13px; color: #334155; text-decoration: none; background: #f8fafc; }
.help-toc a:hover { color: #0d9488; border-color: #0d9488; background: #f0fdfa; }
.doc-p { line-height: 1.9; margin: 8px 0; }
.doc-p b, .doc-list b { color: #0f766e; }
.doc-list { line-height: 2; padding-left: 22px; margin: 8px 0; }
.doc-list li { margin-bottom: 4px; }
.doc-pre { background: #101216; color: #d1d5db; padding: 14px 16px; border-radius: 10px; font-size: 13px; line-height: 1.8; overflow-x: auto; margin: 10px 0; }
.faq-item { padding: 12px 0; border-bottom: 1px dashed #e5e8ee; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-item b { display: block; color: #111827; margin-bottom: 4px; }
.faq-item p { margin: 0; line-height: 1.9; color: #4b5563; font-size: 13px; }
#h-intro h3, #h-subscribe h3, #h-push h3 { font-size: 14px; margin: 16px 0 6px; color: #0f766e; }

/* ---------- IP 管控页 ---------- */
.iprule-add-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.iprule-add-form input[type="text"], .iprule-add-form select,
.iprule-edit-form input[type="text"], .iprule-edit-form select {
  padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px;
}
.iprule-ip-input { flex: 1; min-width: 220px; }
.iprule-msg-input { flex: 1; min-width: 200px; }
.iprule-action-select { min-width: 130px; }
.iprule-edit-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.iprule-edit-form .iprule-msg-input { min-width: 160px; }

/* ---------- IP 管控弹窗(管理员自定义文案) ---------- */
.ip-popup-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .18s ease;
}
.ip-popup-box {
  background: #fff; border-radius: 12px; max-width: 420px; width: 100%;
  padding: 28px 24px 22px; text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .35);
  animation: pageIn .2s ease;
}
.ip-popup-ico { font-size: 40px; line-height: 1; }
.ip-popup-title { font-size: 17px; font-weight: 700; color: #111827; margin: 10px 0 8px; }
.ip-popup-msg { font-size: 14px; color: #4b5563; line-height: 1.8; margin-bottom: 18px; word-break: break-word; }
.ip-popup-box .btn { min-width: 120px; }
