/* =========================================================
   二级域名分发系统 · 纯白极简风（移动端优先）
   - 锁定深色模式（始终纯白）
   - 禁止缩放
   - 居中长方形小圆角按钮
   - 文字溢出在容器内滚动，不撑乱布局
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 去除原生控件外观：输入框/按钮统一自定义风格，不用浏览器默认样式 */
input, textarea, select, button {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
input, textarea, select {
    border: 1px solid #d6d9dd; border-radius: 8px; outline: none; background: #fff;
    /* 凹槽质感 */
    box-shadow: inset 0 2px 5px rgba(0,0,0,.07), inset 0 1px 0 rgba(0,0,0,.04);
    text-align: center;   /* 居中输入框 */
}
select { padding: 10px 12px; font-size: 14px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: inset 0 2px 5px rgba(0,0,0,.06), 0 0 0 3px rgba(31,45,55,.08); outline: none; }
button { border: none; background: none; }

/* 内置 SVG 图标（非 emoji）统一尺寸 */
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.menu-item .icon { width: 1em; height: 1em; } /* 图标与菜单文字等大 */
.mini-btn .icon, .btn .icon, .side-close .icon, .pw-toggle .icon { width: 18px; height: 18px; }

:root {
    --white: #ffffff;
    --bg: #ffffff;
    --border: #ececec;
    --text: #1a1a1a;
    --muted: #8a8a8a;
    --accent: #111111;
    --ok: #16a34a;
    --err: #dc2626;
    --warn: #b45309;
    --radius: 8px;          /* 长方形小圆角，不做成圆形 */
}

/* 强制浅色：无论系统深浅色模式都保持纯白，颜色不随深色模式变化 */
html.forced-light { color-scheme: light only; }
html, body { color-scheme: light; background: var(--white); }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;   /* 去掉手机点按的原生高亮/描边 */
    /* 锁定缩放 / 禁用双击放大 */
    touch-action: manipulation;
}
/* 双保险：系统深色模式也强制白底黑字 */
@media (prefers-color-scheme: dark) {
    html, body, .topbar, .sidebar, .modal-card, .view-card, .panel,
    input, button, .btn, .stat-box, .domain-item, .um-item, .side-user,
    .auth-card, .install-card {
        background-color: #fff !important;
        color: #1a1a1a !important;
    }
    input { color-scheme: light; }
}

/* ---------- 通用工具 ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.txt-ok { color: var(--ok); }
.txt-err { color: var(--err); }

/* ---------- 按钮：居中 + 长方形 + 小圆角 + 凸起质感 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 26px; border-radius: var(--radius);   /* 小圆角 */
    font-size: 15px; font-weight: 500; cursor: pointer;
    border: 1px solid #cfd3d8; background: linear-gradient(180deg, #fff 0%, #f1f3f5 100%); color: var(--text);
    text-decoration: none; transition: all .15s ease;
    /* 凸起质感 */
    box-shadow: 0 2px 4px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9);
}
.btn:hover { border-color: var(--accent); }
.btn:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.10); }  /* 按下凹陷 */
.btn-dark { background: linear-gradient(180deg, #2a3440, #171d24); color: #fff; border-color: #171d24; box-shadow: 0 2px 5px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-dark:hover { background: linear-gradient(180deg, #1f2937, #111827); }
.btn-line { background: linear-gradient(180deg, #fff 0%, #f1f3f5 100%); }
.btn-block { width: 100%; }
.mini-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 14px; border-radius: 6px; font-size: 12px;
    border: 1px solid var(--border); background: var(--white); color: var(--text); cursor: pointer;
}
.mini-btn.ok { color: var(--ok); border-color: #d1fae5; }
.mini-btn.danger { color: var(--err); border-color: #fecaca; }

/* ---------- 首页 ---------- */
.home-wrap {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.home-logo { line-height: 1; margin-bottom: 18px; text-align:center; }
.home-logo .icon { width: 60px; height: 60px; }
.home-title { font-size: 30px; font-weight: 600; letter-spacing: 1px; }
.home-sub { color: var(--muted); margin: 10px 0 40px; font-size: 15px; }
.home-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.home-admin-entry { margin-top: 48px; color: var(--muted); font-size: 13px; }
.home-admin-entry a { color: var(--muted); text-decoration: underline; }

/* ---------- 登录/注册 ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card {
    width: 100%; max-width: 400px; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px 26px; background: var(--white);
}
.auth-back { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 20px; }
.auth-card h2 { font-size: 24px; font-weight: 600; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.auth-card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.auth-card input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 15px; outline: none; background: var(--white);
}
.auth-card .btn { margin-top: 22px; }
.auth-switch { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--accent); text-decoration: underline; }

/* ---------- 消息 ---------- */
.msg-err, .msg-ok, .msg-warn, .msg-box {
    padding: 10px 12px; border-radius: 6px; font-size: 13px; margin: 12px 0; word-break: break-word;
}
.msg-err { background: #fef2f2; color: var(--err); border: 1px solid #fecaca; }
.msg-ok  { background: #f0fdf4; color: var(--ok);  border: 1px solid #bbf7d0; }
.msg-warn{ background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; height: 60px;
    background: var(--white); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 12px; z-index: 30;
}
.hamburger {
    width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; color: var(--text);
}
.hamburger .icon { width: 24px; height: 24px; }
.topbar-spacer { flex: 1; }
.topbar-pts { font-size: 12px; margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: #eef4ff; color: #2b6ef2; flex-shrink: 0; }
.top-user {
    display: flex; align-items: center; gap: 7px; border: none; background: transparent; cursor: pointer;
    padding: 4px 8px; border-radius: 8px; flex-shrink: 0; max-width: 40vw; position: relative;
}
.top-user:active { background: var(--border); }
.top-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--border); flex-shrink: 0; }
.top-user .name-wrap {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    line-height: 1.15; min-width: 0; position: relative; overflow: visible;
    padding-top: 9px;
}
.top-user .name-wrap > span:last-child { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22vw; }

/* ---------- 头像下拉菜单（右上角卡片） ---------- */
.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; left: auto; width: 220px;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 8px;
    display: none; z-index: 60;
}
.top-user.open .user-dropdown { display: block; animation: udIn .2s ease; }
@keyframes udIn { from { opacity:0; transform:translateY(-6px);} to { opacity:1; transform:translateY(0);} }
.ud-user { padding: 8px 12px 10px; }
.ud-hello { font-size: 14px; color: var(--text); }
.ud-hello b { font-weight: 700; }
.ud-email { font-size: 12px; color: var(--muted); margin: 3px 0 6px; word-break: break-all; }
.ud-verified { display: inline-block; font-size: 11px; color: #1f8a4c; background: #e9f7ef; border: 1px solid #c6ecd2; border-radius: 999px; padding: 2px 9px; }
.ud-divider { height: 1px; background: var(--border); margin: 5px 4px; }
.ud-item {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 10px 12px; border: none; background: none; border-radius: 8px;
    font-size: 14px; color: var(--text); cursor: pointer; text-align: left;
}
.ud-item:hover { background: #f3f4f6; }
.ud-item .icon { width: 1em; height: 1em; flex-shrink: 0; }
.ud-danger { color: #e5484d; }
.ud-danger:hover { background: #fdecec; }
/* 从下拉跳到账号安全时的字段高亮 */
.focus-flash { animation: focusFlash 1.4s ease; border-color: var(--accent) !important; }
@keyframes focusFlash { 0%{ box-shadow:0 0 0 3px rgba(24,144,255,.25);} 60%{ box-shadow:0 0 0 3px rgba(24,144,255,.10);} 100%{ box-shadow:0 0 0 0 rgba(24,144,255,0);} }

/* ---------- 角色头衔徽章（名字左上角） ---------- */
.role-badge {
    position: absolute; top: -8px; left: 0;
    font-size: 9px; line-height: 1; padding: 2px 6px; border-radius: 8px;
    font-weight: 700; letter-spacing: 1px; white-space: nowrap; color: #fff;
}
@keyframes badgeShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 3px rgba(34,197,94,.45); }
    50%      { box-shadow: 0 0 11px rgba(34,197,94,.95); }
}
@keyframes badgeGrayGlow {
    0%, 100% { box-shadow: 0 0 3px rgba(156,163,175,.4); }
    50%      { box-shadow: 0 0 9px rgba(156,163,175,.8); }
}
/* 官方：金色 + 闪动 */
.badge-admin {
    background: linear-gradient(90deg, #9a6b00, #ffd700 42%, #fff3a0 50%, #ffd700 58%, #9a6b00);
    background-size: 250% 100%; color: #4a3200;
    animation: badgeShimmer 2s linear infinite;
    box-shadow: 0 0 7px rgba(255, 215, 0, .55);
}
/* 代理：绿色 + 绿光 */
.badge-agent {
    background: #16a34a; color: #fff;
    animation: badgeGlow 1.5s ease-in-out infinite;
}
/* 用户：灰色 + 灰色闪动 */
.badge-user {
    background: linear-gradient(90deg, #6b7280, #c0c5cc 42%, #e5e7eb 50%, #c0c5cc 58%, #6b7280);
    background-size: 250% 100%; color: #fff;
    animation: badgeShimmer 2.6s linear infinite, badgeGrayGlow 2.6s ease-in-out infinite;
}
.topbar-user { color: var(--muted); font-size: 13px; margin-right: 10px; white-space: nowrap; }
.topbar-logout { font-size: 13px; color: var(--accent); text-decoration: none; flex-shrink: 0; }
.pts-badge {
    display: inline-flex; align-items: center; padding: 4px 12px;
    border-radius: 6px; border: 1px solid var(--border); color: var(--ok); font-size: 12px; flex-shrink: 0;
}
.topbar-pts { margin-right: 10px; }

/* ---------- 侧边菜单 ---------- */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84vw;
    background: var(--white); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .25s ease;
    z-index: 50; overflow-y: auto; padding: 16px;
}
.sidebar.open { transform: translateX(0); }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side-title { font-weight: 600; font-size: 15px; }
.side-close { border: none; background: transparent; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.25); opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 40; }
.overlay.show { opacity: 1; visibility: visible; }

.side-menu { display: flex; flex-direction: column; gap: 10px; }
.menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--white); color: var(--text); font-size: 15px; text-align: left; cursor: pointer;
}
.menu-item.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.side-foot { margin-top: 18px; }

/* ---------- 主内容 ---------- */
.dash-main { padding: 78px 14px 40px; max-width: 720px; margin: 0 auto; }
.view-loading { text-align: center; color: var(--muted); padding: 40px 0; }
.view-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; margin-bottom: 20px; background: var(--white);
}
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.view-head h3 { font-size: 17px; font-weight: 600; }
.view-subtitle { font-size: 13px; color: var(--muted); margin: 16px 0 10px; font-weight: 500; }
.view-toolbar { margin-bottom: 14px; }
.empty-state { text-align: center; color: var(--muted); padding: 24px 0; font-size: 14px; }

/* 统计 */
.stat-row { display: flex; gap: 10px; }
.stat-box { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 14px 8px; text-align: center; }
.stat-box b { display: block; font-size: 22px; font-weight: 600; }
.stat-box span { font-size: 12px; color: var(--muted); }

/* 概览欢迎语 */
.stat-welcome { font-size: 15px; color: var(--text); background: #eef4ff; border-radius: 8px; padding: 14px 14px; margin-bottom: 14px; line-height: 1.6; }

/* 收款概览卡片 */
.pay-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pay-card { border: 1px solid var(--border); border-radius: 8px; padding: 14px 12px; background: #fff; }
.pay-card .pay-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pay-card b { font-size: 20px; font-weight: 600; color: var(--text); }
.pay-card span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.pay-card-accent { border-color: #bfd8ff; background: #f4f8ff; }
.pay-card-accent b { color: #2b6ef2; }

/* 表单 */
.form-stack label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.form-stack input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 15px; outline: none; background: var(--white);
}
.form-stack input:focus { border-color: var(--accent); }
.form-stack .btn { margin-top: 14px; }
.add-domain-line { display: flex; align-items: center; gap: 8px; }
.add-domain-line input { flex: 1; }

/* 密码显隐 */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; font-size: 18px; cursor: pointer; padding: 6px;
}

/* 域名列表 */
.domain-list { display: flex; flex-direction: column; gap: 12px; }
.domain-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.d-link { font-size: 15px; font-weight: 600; color: var(--accent); text-decoration: none; word-break: break-all; }
.d-link:hover { text-decoration: underline; }
.d-actions { display: flex; gap: 8px; }
.d-meta {
    display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px;
    font-size: 13px; color: var(--muted);
}
.d-meta b { color: var(--text); font-weight: 500; word-break: break-all; }

/* 用户/代理信息卡片 */
.side-user { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.side-user-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.side-user-head b { font-size: 14px; }
.side-user-domains { font-size: 12px; color: var(--muted); line-height: 1.6; word-break: break-all; }
.role-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); }
.pts-inline { font-size: 12px; color: var(--ok); }

/* 标签 */
.chip { display: inline-block; padding: 4px 10px; margin: 2px 4px 2px 0; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }

/* 用户管理列表 */
.user-manage-list { display: flex; flex-direction: column; gap: 12px; }
.um-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.um-avatar { background: #eef1f5; }

/* ---------- 订单日志 ---------- */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-user { font-weight: 600; font-size: 15px; color: var(--text); }
.order-status { font-size: 11px; padding: 2px 9px; border-radius: 999px; flex-shrink: 0; }
.st-paid { color: #1f8a4c; background: #e9f7ef; border: 1px solid #c6ecd2; }
.st-pending { color: #b26a00; background: #fff6e5; border: 1px solid #ffe3b3; }
.st-closed { color: #6b7280; background: #f1f3f5; border: 1px solid #e5e7eb; }
.order-mail { margin-top: 2px; word-break: break-all; }
.order-body { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.order-prod { font-size: 14px; color: var(--text); }
.order-amt { font-size: 15px; font-weight: 700; color: #e5484d; }
.order-ch { }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.order-actions { display: flex; gap: 6px; }

/* 订单详情弹窗 */
.detail-grid { display: flex; flex-direction: column; }
.dg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.dg-row:last-child { border-bottom: none; }
.dg-row span { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.dg-row b { font-size: 14px; color: var(--text); text-align: right; word-break: break-all; }
.um-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.um-name { font-size: 15px; font-weight: 600; }
.um-pts { font-size: 13px; color: var(--ok); }
.um-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.um-domains { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 弹窗（固定浮层；淡入 + 卡片上浮缩放的过渡动画） ---------- */
.modal {
    position: fixed !important; inset: 0;
    background: rgba(0,0,0,.35);
    display: flex !important; align-items: center; justify-content: center; padding: 20px; z-index: 90;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}
.modal.show { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-card {
    width: 100%; max-width: 420px; background: var(--white);
    border-radius: var(--radius); padding: 20px; max-height: 86vh; overflow-y: auto;
    border: 1px solid var(--border);
    transform: translateY(26px) scale(.92);
    opacity: 0; transition: transform .34s cubic-bezier(.2,.9,.25,1.15), opacity .28s ease;
}
.modal.show .modal-card { transform: translateY(0) scale(1); opacity: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-head h3 { font-size: 16px; }
.modal-close { border: none; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-foot { display: flex; gap: 10px; margin-top: 18px; }
.modal-foot .btn { flex: 1; }
.switch-saved { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.sw-saved-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); }
.sw-saved-name { font-size: 14px; font-weight: 600; }
.sw-saved-actions { display: flex; gap: 8px; }

/* ---------- 转圈加载遮罩 ---------- */
.spinner-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,.9);
    display: none; align-items: center; justify-content: center; flex-direction: column; gap: 16px; z-index: 100;
}
.spinner-overlay.show { display: flex; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-text { font-size: 14px; color: var(--muted); }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .topbar-user { display: none; }
    .dash-main { padding: 76px 10px 30px; }
}

/* ---------- 头像 / 账号与安全 ---------- */
.sec-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sec-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--border); }
.sec-name { font-size: 16px; font-weight: 600; }
.top-avatar-fallback { width: 30px; height: 30px; border-radius: 50%; }

/* ---------- 验证码 / 套餐 / 积分输入 ---------- */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-btn { flex-shrink: 0; white-space: nowrap; }
.reg-email-row input { width: 100%; }
.txt-ok { color: var(--ok); }
.txt-err { color: var(--err); }
.pay-chk-row { display: flex; gap: 18px; padding: 2px 0; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.chk input[type=checkbox], .chk input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); }
.pts-input { width: 76px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.menu-item.danger-item { color: var(--err); }
.menu-item.menu-link { color: var(--text); }

/* ---------- 套餐（后台列表） ---------- */
.pack-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; flex-wrap: wrap;
}
.pack-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.pack-actions { display: flex; gap: 8px; flex-shrink: 0; }
.chip-soft { color: var(--muted); }
.chip-stock { color: #2b6ef2; border-color: #bfd8ff; background: #f4f8ff; }
.chip-soldout { color: var(--warn); border-color: #fde68a; background: #fffbeb; }

/* ---------- 充值中心（购买页） ---------- */
.shop-view .view-head { align-items: flex-start; }
.shop-rule {
    display: flex; align-items: center; gap: 8px;
    background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 12px; margin: 2px 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5;
}
.shop-rule-icon { color: var(--accent); flex-shrink: 0; display: inline-flex; }
.shop-rule-icon .icon { width: 1.1em; height: 1.1em; }
.pack-list { display: flex; flex-direction: column; gap: 12px; }
.pack-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 16px;
    background: var(--white); box-shadow: 0 3px 12px rgba(30,40,80,.05);
}
.pack-card.pack-featured { border-color: rgba(24,144,255,.45); box-shadow: 0 6px 18px rgba(24,144,255,.10); }
.pack-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pack-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pack-tag {
    font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(135deg,#ff9d2e,#ff5f4a);
    border-radius: 5px; padding: 2px 7px;
}
.pack-price { color: #e63f3f; font-weight: 800; font-size: 22px; line-height: 1; }
.pack-price small { font-size: 13px; font-weight: 600; }
.pack-intro { color: var(--muted); font-size: 13px; margin: 6px 0 2px; }
.pack-pts-chip {
    display: inline-flex; align-items: center; gap: 5px;
    margin: 10px 0 12px; padding: 5px 11px; border-radius: 999px;
    background: #eef4ff; color: #2b6ef2; font-size: 13px; font-weight: 600;
}
.pack-pay { display: flex; gap: 10px; margin-bottom: 14px; }
.pay-opt { flex: 1; position: relative; cursor: pointer; }
.pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay-opt span {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 0; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; color: var(--muted); background: var(--white);
    transition: all .18s ease; text-align: center;
}
.pay-opt input:checked + span {
    border-color: var(--accent); color: var(--accent); background: #eef6ff;
    box-shadow: 0 2px 8px rgba(24,144,255,.12); font-weight: 600;
}
.btn-buy { margin-top: 2px; }

/* 购买数量（1-99，自定义） */
.pack-qty { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.qty-label { font-size: 13px; color: var(--muted); }
.qty-stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--white); }
.qty-btn { width: 40px; height: 40px; border: none; background: var(--white); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; transition: background .15s ease; }
.qty-btn:active { background: #f2f2f2; }
.qty-input { width: 58px; height: 40px; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-size: 16px; color: var(--text); background: var(--white); -moz-appearance: textfield; appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-total { font-size: 13px; color: var(--muted); }
.qty-total b { color: var(--accent); font-size: 15px; }

/* ---------- 套餐数量 / 售罄（用户与代理端充值中心） ---------- */
.pack-stock { font-size: 12px; color: #2b6ef2; margin: -6px 0 12px; }
.pack-stock-out { color: var(--warn); font-weight: 600; }
.pack-tag-soldout { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.pack-card.pack-soldout { background: #fafafa; box-shadow: none; }
.pack-card.pack-soldout .pack-intro { color: #a3a3a3; }
.pack-card.pack-soldout .pack-price { color: #9ca3af; }
.pack-card.pack-soldout .pack-pts-chip { background: #f1f3f5; color: var(--muted); }
.pack-card .btn-buy[disabled] { opacity: .65; cursor: not-allowed; box-shadow: none; }

/* QQ 号弹窗头像预览 */
.qq-avatar-preview { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.pass-row { margin-top: 2px; }


/* ============ 企业版 首页 / 登录 / 注册 ============ */
.enterprise-body {
    --eb-navy:#0a1f3c; --eb-navy2:#0e2a4d; --eb-cyan:#22d3ee; --eb-teal:#2dd4a0;
    --eb-gold:#f6b04a; --eb-violet:#8b7cf6; --eb-ink:#14294a;
    min-height:100vh; position:relative; overflow-x:hidden;
    background:
        radial-gradient(1100px 760px at 18% -12%, #143566 0%, transparent 55%),
        radial-gradient(900px 680px at 92% 8%, #0f3a5f 0%, transparent 50%),
        radial-gradient(700px 600px at 60% 110%, #0f3557 0%, transparent 55%),
        linear-gradient(160deg, #0a1f3c 0%, #0d2a4b 48%, #0b2340 100%);
    color:#eaf4ff; display:flex; flex-direction:column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
/* 系统深色模式下企业前台仍保持深蓝科技底（覆盖全局强制白底，避免变白/原生观感） */
@media (prefers-color-scheme: dark) {
    body.enterprise-body {
        background:
            radial-gradient(1100px 760px at 18% -12%, #143566 0%, transparent 55%),
            radial-gradient(900px 680px at 92% 8%, #0f3a5f 0%, transparent 50%),
            radial-gradient(700px 600px at 60% 110%, #0f3557 0%, transparent 55%),
            linear-gradient(160deg, #0a1f3c 0%, #0d2a4b 48%, #0b2340 100%) !important;
        color:#eaf4ff !important;
    }
}
.enterprise-body a { color: inherit; }
#ebNet { position:fixed; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; }
.eb-orb { position:fixed; border-radius:50%; filter:blur(74px); z-index:0; pointer-events:none; animation:ebFloat 14s ease-in-out infinite; }
.eb-orb1 { width:360px; height:360px; background:#1f6feb; top:-70px; left:-70px; opacity:.5; }
.eb-orb2 { width:320px; height:320px; background:#14b8a6; bottom:-90px; right:-60px; opacity:.42; animation-delay:-5s; }
.eb-orb3 { width:270px; height:270px; background:#eab308; top:42%; left:74%; opacity:.22; animation-delay:-9s; }
@keyframes ebFloat { 0%,100% { transform:translateY(0) translateX(0); } 50% { transform:translateY(-24px) translateX(16px); } }

/* 顶部品牌（左上角） */
.eb-brand { position:relative; z-index:3; display:flex; align-items:center; gap:12px; padding:18px 20px; }
.eb-brand a { display:flex; align-items:center; gap:12px; text-decoration:none; }
.eb-logo { width:44px; height:44px; border-radius:11px; object-fit:cover; box-shadow:0 6px 18px rgba(0,0,0,.28); animation:ebLogo 6s ease-in-out infinite; }
@keyframes ebLogo { 0%,100% { transform:translateY(0);} 50% { transform:translateY(-4px);} }
.eb-brand-name { font-size:28px; font-weight:800; letter-spacing:3px; color:#fff; text-shadow:0 2px 14px rgba(0,0,0,.3); }
.eb-brand-tag { align-self:flex-end; margin-bottom:4px; font-size:11px; color:#a8c6ea; letter-spacing:2px; white-space:nowrap; }
.eb-brand-back { position:relative; z-index:3; margin-left:auto; font-size:13px; color:#bcd3ef; text-decoration:none; display:inline-flex; align-items:center; gap:4px; padding:8px 12px; border:1px solid rgba(255,255,255,.25); border-radius:999px; }

/* 首页主体 */
.eb-main { position:relative; z-index:2; flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:12px 24px 60px; }
.eb-hero { font-size:40px; line-height:1.25; font-weight:800; letter-spacing:1px; margin:0 0 14px; color:#fff; text-shadow:0 2px 22px rgba(0,0,0,.35); animation:ebFadeUp .7s ease both; }
.eb-sub { font-size:15px; color:#9fc0e8; letter-spacing:1px; margin:0 0 30px; animation:ebFadeUp .7s .1s ease both; }
.eb-actions { display:flex; gap:14px; animation:ebFadeUp .7s .18s ease both; }
.eb-btn { display:inline-flex; align-items:center; justify-content:center; min-width:140px; padding:13px 26px; border-radius:12px; font-size:16px; font-weight:700; text-decoration:none; transition:transform .18s ease, box-shadow .18s ease; }
.eb-btn:active { transform:scale(.97); }
.eb-btn-primary { color:#fff; background:linear-gradient(135deg,#1f6feb,#14b8a6); box-shadow:0 10px 26px rgba(20,120,230,.4); }
.eb-btn-ghost { color:#eaf4ff; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.28); backdrop-filter:blur(6px); }

/* 功能图标 */
.eb-feats { display:flex; gap:14px; margin-top:44px; animation:ebFadeUp .7s .26s ease both; }
.eb-feat { width:84px; display:flex; flex-direction:column; align-items:center; gap:8px; }
.eb-feat-ic { width:52px; height:52px; border-radius:15px; display:flex; align-items:center; justify-content:center; color:#fff; box-shadow:0 8px 20px rgba(0,0,0,.22); animation:ebFloat 6s ease-in-out infinite; }
.eb-feat:nth-child(1) .eb-feat-ic { background:linear-gradient(135deg,#1f6feb,#22d3ee); }
.eb-feat:nth-child(2) .eb-feat-ic { background:linear-gradient(135deg,#0ea5e9,#2dd4a0); animation-delay:-2s; }
.eb-feat:nth-child(3) .eb-feat-ic { background:linear-gradient(135deg,#f59e0b,#f6b04a); animation-delay:-3.5s; }
.eb-feat:nth-child(4) .eb-feat-ic { background:linear-gradient(135deg,#8b5cf6,#22d3ee); animation-delay:-5s; }
.eb-feat-ic .icon { width:26px; height:26px; }
.eb-feat-label { font-size:12px; color:#c3d8f0; letter-spacing:.5px; }

.eb-foot { position:relative; z-index:2; text-align:center; padding:14px 0 20px; font-size:12px; color:#7ea3cd; }
.eb-foot a { color:#a9c8ec; text-decoration:none; }

/* 登录 / 注册卡片 */
.eb-auth { position:relative; z-index:2; flex:1; display:flex; align-items:center; justify-content:center; padding:8px 20px 40px; }
.eb-auth-card { width:100%; max-width:404px; background:rgba(255,255,255,.95); border-radius:18px; padding:28px 26px; color:var(--eb-ink); box-shadow:0 24px 60px rgba(0,0,0,.30); border:1px solid rgba(255,255,255,.6); animation:ebFadeUp .6s ease both; }
.eb-auth-card h2 { font-size:22px; font-weight:800; margin:0 0 4px; }
.eb-auth-card .eb-auth-sub { font-size:13px; color:var(--muted); margin:0 0 18px; }
.eb-auth-card label { display:block; font-size:13px; color:var(--muted); margin:14px 0 6px; }
.eb-auth-card input { width:100%; box-sizing:border-box; padding:12px 14px; border:1px solid #d6d9dd; border-radius:8px; font-size:15px; text-align:center; background:#fff; box-shadow:inset 0 2px 5px rgba(0,0,0,.06); transition:border-color .15s, box-shadow .15s; }
.eb-auth-card input:focus { outline:none; border-color:var(--accent); box-shadow:inset 0 2px 5px rgba(0,0,0,.04), 0 0 0 3px rgba(24,144,255,.14); }
.eb-auth-card .btn { margin-top:22px; }
.eb-auth-switch { margin-top:16px; font-size:14px; color:var(--muted); text-align:center; }
.eb-auth-switch a { color:var(--accent); font-weight:600; text-decoration:none; }
.eb-auth-err { background:#fff0f0; color:#d53f3f; border:1px solid #ffd4d4; border-radius:8px; padding:10px 12px; font-size:13px; margin-bottom:4px; }
.code-row { display:flex; gap:8px; }
.code-row input { flex:1; }
.code-btn { flex-shrink:0; white-space:nowrap; }

@keyframes ebFadeUp { from { opacity:0; transform:translateY(18px);} to { opacity:1; transform:translateY(0);} }


