/* ===== AI视频制作大师 · 响应式样式（电脑 + 手机自适应） ===== */
:root {
  --bg: #f5f6fb;
  --card: #ffffff;
  --primary: #5b5bf0;
  --primary-d: #4545d6;
  --primary-l: #ececfe;
  --accent: #ff7a59;
  --text: #1f2333;
  --muted: #8a8fa3;
  --line: #e7e8f0;
  --ok: #1fb877;
  --warn: #f0a020;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(40, 44, 90, 0.08);
  --shadow-sm: 0 2px 10px rgba(40, 44, 90, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-width: 360px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-name { font-size: 18px; letter-spacing: .5px; }
.topnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link {
  padding: 7px 12px; border-radius: 10px; color: var(--text);
  font-size: 14px; font-weight: 600; transition: background .15s;
}
.nav-link:hover { background: var(--primary-l); }
.nav-cta { background: var(--primary); color: #fff; border: none; }
.nav-cta:hover { background: var(--primary-d); }
.nav-cta:focus { outline: none; }
.topbar-auth { display: inline-flex; align-items: center; }
.topbar-auth .nav-link { padding: 7px 10px; }
.auth-sep { color: var(--muted); margin: 0 1px; user-select: none; }
.nav-admin { background: #fff3ec; color: var(--accent); }
.nav-admin:hover { background: #ffe2d4; }
.nav-user {
  font-size: 12px; color: var(--muted); max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-credits { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--primary-l); border-radius: 999px; padding: 5px 12px; }
.nav-credits a { color: var(--primary-d); }
.nav-credits a:hover { text-decoration: underline; }

/* 右上角三横菜单：宽屏默认隐藏，窄屏才出现 */
.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
  transition: background .15s;
}
.nav-burger:hover { background: var(--primary-l); }
.nav-menu {
  display: none; position: absolute; top: 100%; right: 12px; z-index: 40;
  min-width: 180px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 8px; margin-top: 6px;
}
.nav-menu.open { display: block; }
.nav-menu-item {
  display: block; padding: 10px 12px; border-radius: 9px; color: var(--text);
  font-size: 14px; font-weight: 600;
}
.nav-menu-item:hover { background: var(--primary-l); }
.nav-menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.container { flex: 1; min-width: 0; width: 100%; max-width: 100%; margin: 0; padding: 25px; }

/* 通用卡片 / 区块 */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px;
}
.card + .card { margin-top: 16px; }
/* 单显切换面板（同时只有一个可见）取消相邻卡片带来的额外顶间距，避免切到后面面板时顶部下移 */
.card.tab-panel,
.card[data-view-sec] { margin-top: 0 !important; }
.section-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  vertical-align: middle;
  padding: 11px 18px; border: none; border-radius: 12px; cursor: pointer;
  font-size: 15px; font-weight: 700; font-family: inherit; line-height: 1.4;
  white-space: nowrap;
  transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(91,91,240,.28); }
.btn-primary:hover { background: var(--primary-d); }
.btn-ghost { background: var(--primary-l); color: var(--primary-d); }
.btn-ghost:hover { background: #e0e0fc; }
.btn-danger { background: #ffe9e9; color: #e0484a; }
.btn-green { background: #22c55e; color: #fff; box-shadow: 0 6px 18px rgba(34,197,94,.28); }
.btn-green:hover { background: #16a34a; }
.btn-warn { background: #fff4e0; color: #d97706; }
.btn-warn:hover { background: #ffe9c2; }
.btn-orange { background: #f59e0b; color: #fff; }
.btn-orange:hover { background: #d97706; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; box-sizing: border-box; line-height: 1; flex-shrink: 0; white-space: nowrap; }
/* 裁剪弹窗试听按钮：试听选中 / 停止播放 两种文案宽度一致，避免切换跳跃 */
.trim-preview { min-width: 96px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 11px; font-size: 15px; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l);
}
.textarea { resize: vertical; min-height: 72px; }

/* 提示 / 消息 */
.msg { padding: 11px 14px; border-radius: 11px; font-size: 14px; margin-bottom: 14px; }
.msg-ok { background: #e7f8f0; color: #138a5b; }
.msg-err { background: #ffecec; color: #cf3a3c; }
.msg-info { background: var(--primary-l); color: var(--primary-d); }

/* 登录页 */
.auth-wrap { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head .logo { font-size: 42px; }
.auth-tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; border: none; background: transparent; padding: 10px; border-radius: 9px;
  font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit; font-size: 14px;
}
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.auth-form { display: none; }
.auth-form.active { display: block; }

/* ===== 登录/注册 分栏重构（2026-08-19） ===== */
.auth-wrap { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card.auth-split { max-width: 880px; display: flex; box-shadow: var(--shadow); overflow: hidden; }
.auth-aside {
  flex: 1 1 44%; padding: 38px 34px; color: #fff;
  background: linear-gradient(155deg, #5b5bf0 0%, #7b5bf0 55%, #ff7a59 140%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand .logo { height: 44px; width: auto; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.auth-brand h1 { margin: 0; font-size: 26px; letter-spacing: .5px; }
.auth-brand p { margin: 4px 0 0; font-size: 13px; opacity: .9; }
.auth-feats { list-style: none; margin: 26px 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.auth-feats li { display: flex; align-items: flex-start; gap: 12px; }
.auth-feats .fi { font-size: 22px; line-height: 1.4; flex: 0 0 28px; width: 28px; text-align: center; }
.auth-feats b { display: block; font-size: 15px; }
.auth-feats span { font-size: 13px; opacity: .88; }
.auth-aside-foot { font-size: 13px; opacity: .92; }
.auth-aside-foot b { color: #fff; }
.auth-panel { flex: 1 1 56%; padding: 32px 36px; display: flex; flex-direction: column; }
.auth-panel .auth-tabs { margin-bottom: 20px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot a { font-weight: 600; }

/* 中屏：分栏堆叠为单列；手机端表单在上、品牌文字区在下 */
@media (max-width: 860px) {
  .auth-card.auth-split { flex-direction: column; max-width: 440px; width: 100%; box-sizing: border-box; }
  .auth-aside { flex: none; padding: 15px; order: 2; }
  .auth-feats { display: flex; }
  .auth-aside-foot { display: none; }
  .auth-brand .logo { height: 38px; }
  .auth-brand h1 { font-size: 22px; }
  .auth-brand p { display: none; }
  .auth-panel { padding: 20px 15px; order: 1; }
}
/* 小屏：进一步收紧间距；登录表单靠上不垂直居中；auth-wrap 去 padding，卡片贴满屏幕边缘 */
@media (max-width: 640px) {
  .auth-wrap { align-items: flex-start; padding: 0; }
  .auth-card.auth-split { width: 100%; max-width: none; }
  /* 表单上方去掉多余间距，尽量一屏看完 */
  .auth-panel { padding: 8px 15px 14px; }
  .auth-panel .auth-tabs { margin-bottom: 12px; }
  .auth-panel .field { margin-bottom: 10px; }
  .auth-panel .btn[type="submit"] { margin-top: 7px !important; }
  /* 下方品牌文字区：只收行距，字号保持原样 */
  .auth-feats { gap: 6px; margin: 10px 0 2px; }
  .auth-feats li { gap: 8px; }
}
@media (max-width: 440px) {
  .auth-tabs button { font-size: 14px; }
  .auth-panel .input { padding: 10px 12px; }
}
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 任务列表 */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.req-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.req-thumb { width: 100%; aspect-ratio: 16/9; background: #eef0f7; object-fit: cover; }
.req-thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 28px; }
.req-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.req-prompt { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--primary-l); color: var(--primary-d); font-weight: 600; }
.tag.ratio { background: #eafaf2; color: #158a5b; }
.tag-admin { background: linear-gradient(135deg, #5b5bf0, #7a6bff); color: #fff; }
.tag-vip { background: #fff3e0; color: #d98200; }
/* 主页昵称旁会员类型角标：整体缩小一点 */
.uc-nick .tag { font-size: 11px; padding: 2px 7px; }
.req-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
/* 结算条 */
.settle { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.settle-head { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.settle-head b { color: var(--text); font-weight: 700; }
.settle-items { display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; font-size: 14px; color: var(--muted); }
.settle-items b { color: var(--text); font-weight: 700; font-size: 17px; margin-left: 4px; }
.si-pay { color: #cf3a3c; font-weight: 600; }
.si-pay b { color: #cf3a3c; }
#costNeedN { text-decoration: line-through; color: var(--muted); font-weight: 700; font-size: 17px; margin-left: 4px; }
.settle-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge.pending { background: #fff3ec; color: var(--accent); }
.badge.processing { background: var(--primary-l); color: var(--primary-d); }
.badge.done { background: #e7f8f0; color: #138a5b; }
.badge.failed { background: #ffe9e9; color: #e0484a; }
.badge.cancelled { background: #eef0f4; color: #6b7280; }

/* 进度条 */
.progress { height: 9px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #8a7bff); transition: width .6s ease; }
.progress.done > i { background: linear-gradient(90deg, var(--ok), #4fd79b); }
.progress-text { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 多任务表单 */
.task {
  border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px;
  background: #fbfbfe; position: relative;
}
.task-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.task-no { font-weight: 700; color: var(--primary-d); }
.task-del { background: #ffecec; color: #cf3a3c; border: none; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.task-row { display: grid; grid-template-columns: auto 220px 220px; gap: 10px; align-items: start; }
.task-row .frame-pair { display: grid; grid-template-columns: auto auto; gap: 15px; align-items: start; justify-content: start; width: max-content; }
.task-row .frame-col { min-width: 150px; }
.frame-label { font-size: 12px; color: #999; margin-bottom: 4px; display: block; }
.file-drop {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1.5px solid var(--accent); border-radius: 10px; padding: 9px 14px;
  color: var(--accent); font-size: 13px; font-weight: 700; background: #fff3ec;
  transition: background .15s, border-color .15s; max-width: 100%;
}
.file-drop:hover { background: #ffe2d4; }
.file-drop input { display: none; }
.file-drop.has-file { border-color: var(--ok); color: var(--ok); background: #e7f8f0; }
.file-drop.disabled { opacity: .5; cursor: not-allowed; border-style: dashed; background: #f3f3f3; color: #999; }
/* 图标与主文案横排；括号默认跟随同行（桌面） */
.drop-ico { line-height: 1; }
.drop-txt { display: inline-flex; align-items: baseline; gap: 2px; }
.drop-sub { font-weight: 400; font-size: 12px; color: #f08a5d; }
@media (max-width: 640px) {
  /* 手机端：图标与主文案同一行（左对齐），括号（可留空）另起一行 */
  .file-drop { padding: 5px 12px; flex-direction: row; align-items: flex-start; gap: 6px; }
  .drop-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
  .drop-sub { display: block; align-self: flex-start; text-align: left; width: auto; }
}
.preview-img { max-width: 100%; max-height: 90px; border-radius: 8px; margin-top: 8px; display: block; }
.ratio-seg { display: flex; gap: 8px; }
.ratio-seg label {
  flex: 1; text-align: center; padding: 9px; border: 1.5px solid var(--line); border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted);
}
.ratio-seg input { display: none; }
.ratio-seg input:checked + span { color: var(--primary-d); }
.ratio-seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-l); color: var(--primary-d); }

/* 详情页 */
.detail-video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 16/9; }
.video-frame { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 14px; background:#000; }
.stat-row { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; margin: 10px 0; }
.stat-row b { color: var(--primary-d); }
.prompt-box { background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

/* 列表内视频播放 */
.list-video { width: 100%; border-radius: 12px; background: #000; margin-top: 4px; }

/* 积分明细 */
.credits-list { display: flex; flex-direction: column; }
.credit-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.credit-row:last-child { border-bottom: none; }
.credit-main { flex: 1; min-width: 0; }
.credit-note { font-size: 14px; font-weight: 600; }
.credit-amt { font-size: 16px; font-weight: 800; white-space: nowrap; }
.credit-amt.plus { color: var(--ok); }
.credit-amt.minus { color: var(--accent); }
.credit-amt.voice { color: var(--primary-d); }
.wd-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.wd-status.pending { background: #fff4e0; color: #d98200; }
.wd-status.done { background: #e6f7ee; color: #1aa15a; }
.v-hint code { background: #f2f3f7; border-radius: 4px; padding: 0 4px; font-size: 12px; }
.vexp { white-space: nowrap; }
.req { color: var(--accent); }
.credit-bal { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 管理员：任务 / 会员表格 */
.task-table, .member-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.task-table th, .member-table th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line); white-space: nowrap; }
.task-table td, .member-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; box-sizing: border-box; }
.task-table td { height: 58px; }
.task-table tbody tr:hover, .member-table tbody tr:hover { background: var(--bg); }
.member-table th.col-cur { color: var(--primary-d); background: var(--primary-l); }
.member-table th:not(:first-child), .member-table td:not(:first-child) { text-align: center; }
.member-table td .m-nick, .m-nick { color: var(--muted); font-weight: 400; }
/* 任务管理：状态列加宽不换行；表格 min-width 防列挤压（窄屏横向滚动） */
.task-table { min-width: 1100px; }
.task-table th:nth-child(4), .task-table td:nth-child(4) { white-space: nowrap; min-width: 90px; }
/* 会员管理：类型 / 注册时间 / 到期时间 不换行；表格加宽保证所有列完整显示（窄屏横向滚动） */
.member-table th.c-type, .member-table td.c-type { white-space: nowrap; min-width: 90px; }
.member-table th.c-reg, .member-table td.c-reg { white-space: nowrap; }
.member-table th.c-exp, .member-table td.c-exp { white-space: nowrap; }
.member-table { min-width: 1000px; }
@media (max-width: 640px) {
  .op-wrap { flex-wrap: nowrap; }
}

/* ===== 通知公告（用户中心） ===== */
.notice-card { margin-top: 16px; }
.notice-body { line-height: 1.9; font-size: 18px; font-weight: 600; color: #e23b3b; white-space: normal; }
.notice-empty { color: var(--muted); font-size: 14px; padding: 4px 0; }

/* ===== 通告管理（后台表单） ===== */
.notice-textarea { width: 100%; resize: vertical; line-height: 1.7; font-size: 14px; font-family: inherit; }
.notice-form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; }

/* 系统配置表单 */
.cfg-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.cfg-row label { min-width: 220px; font-weight: 400; font-size: 13px; }
.cfg-row .input { max-width: 260px; }
.cfg-row .muted { font-size: 12px; }
.cfg-check { min-width: auto !important; font-weight: 400 !important; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* 留言管理：行内回复（details 原生折叠，无需 JS） */
details.msg-reply-box { display: inline-block; }
details.msg-reply-box > summary { list-style: none; cursor: pointer; }
details.msg-reply-box > summary::-webkit-details-marker { display: none; }
.reply-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 280px; }
.reply-form textarea { width: 100%; }
.msg-content { max-width: 260px; }
.msg-reply { max-width: 240px; }
.task-table .thumb { width: 96px; height: 56px; object-fit: cover; border-radius: 8px; background: #eef0f7; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 20px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 46px; display: block; margin-bottom: 8px; }

/* 路径列 / 操作列 */
.c-path { min-width: 220px; vertical-align: middle; }
.c-path-inner { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.c-path .admin-fill { margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; height: 34px; }
.fill-input { width: 100%; padding: 8px 10px; font-size: 13px; height: 34px; box-sizing: border-box; margin: 0; }
.uv-row { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin: 0; height: 34px; }
.uv-row .uv-btn,
.uv-row .btn { height: 34px; padding: 0 12px; box-sizing: border-box; margin: 0; }
.uv-btn { cursor: pointer; margin: 0; white-space: nowrap; }
.uv-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.c-path .admin-fill input, .c-path .uv-row * { vertical-align: middle; }
.op-cell { vertical-align: middle; white-space: nowrap; }
.op-cell form { display: inline-block; margin: 0 2px; }
.op-wrap { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; justify-content: center; }
.op-wrap form { margin: 0; }

/* 过滤切换 */
.filter-tabs { display: inline-flex; gap: 8px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.filter-tab { padding: 8px 16px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.filter-tab:hover { background: #fff; color: var(--text); }
.filter-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* 会员编辑行 */
.member-edit-form { background: var(--primary-l); border-radius: 12px; padding: 14px; margin: 4px 0; }
.mef-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.mef-info { min-width: 160px; }
.mef-field { display: flex; flex-direction: column; gap: 4px; }
.mef-field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.minput { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; min-width: 150px; font-family: inherit; background: #fff; }
.mef-disable { justify-content: flex-end; }
.mef-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* 会员管理：搜索栏 */
.search-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.sb-field { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.sb-field > label { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sb-field .input { min-width: 0; width: 110px; }
.sb-field select.input { width: 96px; }
.sb-field input[type="date"] { width: 124px; }
.sb-range { display: flex; align-items: center; gap: 4px; }
.sb-range .input { min-width: 0; width: 89px; }
.sb-range input[type="date"] { width: 122px; }
.sb-range span { color: var(--muted); font-size: 13px; }
.sb-actions { display: flex; gap: 8px; align-items: flex-end; margin-left: auto; }
/* 注册/到期日期字段组：桌面内联横排（手机端规则见 640px 媒体查询） */
.sb-date-wrap { display: flex; gap: 10px; min-width: 0; }
.sb-date-wrap .sb-field { min-width: 0; }
.sb-date-wrap .sb-range { flex-wrap: nowrap; }

/* 修改密码表单：居中并略微加宽 */
.profile-card { max-width: 560px; margin: 0 auto; }
.profile-card .section-title { justify-content: center; }
.narrow-form { max-width: 460px; margin: 0 auto; }

/* 生成 / 语音页：表单 ↔ 列表 切换 */
.view-switch { display: inline-flex; gap: 8px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.vs-btn { padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--muted); background: transparent; border: none; cursor: pointer; font-family: inherit; transition: background .15s, color .15s, box-shadow .15s; }
.vs-btn:hover { background: #fff; color: var(--text); }
.vs-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 生成页：比例/时长 标签与下拉同行 */
.inline-field { display: flex; align-items: center; gap: 8px; }
.inline-field > label { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; }
.inline-field .select { width: auto; flex: 1; min-width: 110px; }
/* 画面比例 / 时长：比例列表窄、时长列表宽 */
.inline-field .sel-ratio { flex: 0 0 auto; width: 110px; min-width: 0; }
.inline-field .sel-duration { flex: 1 1 auto; min-width: 120px; }
/* 画面比例 / 时长 两个下拉框等宽对齐 */
.task-row .inline-field > label { flex: 0 0 auto; }

/* 顶栏右侧：积分 / 账号 / 退出 */
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-credits { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--primary-l); border-radius: 999px; padding: 6px 14px; }
.nav-credits b { color: var(--primary-d); }
.nav-credits:hover { background: #e0e0fc; }
.nav-account { font-size: 13px; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-logout { font-size: 13px; font-weight: 700; color: #cf3a3c; padding: 7px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.nav-logout:hover { background: #ffecec; }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; }
.nav-burger:hover { background: var(--primary-l); }

/* 主体布局：左侧菜单 + 内容 */
.app-body { display: flex; flex: 1; min-height: 0; }
.sidebar { flex: 0 0 224px; width: 224px; background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 64px; align-self: flex-start; height: calc(100vh - 64px); overflow-y: auto; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 11px; color: var(--text); font-size: 14px; font-weight: 600; }
.side-ico { flex: 0 0 22px; width: 22px; text-align: center; font-size: 16px; line-height: 1; }
.side-txt { flex: 1 1 auto; }
.side-link:hover { background: var(--primary-l); }
.side-link.active { background: var(--primary-l); color: var(--primary-d); font-weight: 700; box-shadow: inset 3px 0 0 var(--primary); }
.side-sub { padding-left: 40px; font-size: 13px; font-weight: 500; }
/* 菜单项右上角未读/未回复小徽标 */
.side-badge {
  margin-left: auto;
  background: #e23b3b;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
/* 会员专区：权益「支持」绿色对勾 */
.ok-tick { color: #1f9d55; font-weight: 700; font-size: 15px; }
.side-sep { height: 1px; background: var(--line); margin: 12px 4px; }
.side-group { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 14px 6px; letter-spacing: .5px; }
.side-backdrop { display: none; }

/* 抽屉顶部：会员账号（仅移动端展开抽屉时显示，桌面顶栏正常显示） */
.side-account { display: none; padding: 12px 4px 2px; }
.side-account-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); }
.side-account-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 账号区块后面的分隔线：桌面隐藏（账号也不显示），移动端随账号一起显示 */
.side-account + .side-sep { display: none; }
@media (max-width: 900px) {
  .side-account { display: block; }
  .side-account + .side-sep { display: block; }
  .topbar .nav-account { display: none; }
}

/* 平板 / 手机：左侧菜单转为抽屉 */
@media (max-width: 900px) {
  .sidebar { position: fixed; top: 0; left: 0; z-index: 60; height: 100vh; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .side-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(20,22,40,.35); z-index: 55; }
  .nav-burger { display: inline-flex; }
}

/* 移动端 */
@media (max-width: 640px) {
  .brand { gap: 3px; }
  .topbar-right { gap: 8px; }
  .nav-credits { padding: 6px 10px; }
  .nav-account { max-width: 84px; }
  .nav-logout { padding: 6px 10px; }
  .container { padding: 15px; }
  .task-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  /* 手机端：首帧/尾帧作为一个整体占整行，内部两个按钮并排一行且各占一半宽度 */
  .task-row .frame-pair { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 10px; width: auto; }
  .task-row .frame-col { min-width: 0; }
  .task-row .frame-col .file-drop { width: 100%; box-sizing: border-box; }
  /* 手机端：选择图片按钮外部间距减半（textarea 底部 14→7、行距 16→8） */
  .task .field { margin-bottom: 7px; }
  /* 手机端：比例/时长下拉框收窄、左右间距减小，避免超宽 */
  .inline-field { gap: 6px; }
  .task-row .inline-field .sel-ratio { width: 76px; flex: 0 0 auto; min-width: 0; padding: 11px 6px; }
  .task-row .inline-field .sel-duration { flex: 1 1 auto; min-width: 0; padding: 11px 8px; }
  /* 手机端：结算条每行2项，现有积分与应扣积分同排 */
  .settle-items { flex-wrap: wrap; row-gap: 8px; }
  .settle-items .si { flex: 1 1 45%; min-width: 0; }
  .admin-row { grid-template-columns: 84px 1fr; }
  .admin-row .url-cell, .admin-row .act-cell { grid-column: 1 / -1; }
  .admin-row .thumb { width: 84px; height: 50px; }
  .grid { grid-template-columns: 1fr; }
  .member-actions { width: 100%; }
  .card { padding: 15px; }
  /* 会员搜索：注册/到期日期字段手机端独占一行并排（不与账号昵称挤） */
  .sb-date-wrap { flex-basis: 100%; }
  .sb-date-wrap .sb-field { flex: 1 1 0; min-width: 0; }
  .sb-date-wrap .sb-range .input { flex: 1 1 0; width: auto; min-width: 0; padding: 8px 3px; font-size: 13px; }
  /* 手机端：账号/昵称/类型/状态 四个搜索字段一行（flex 均分不溢出）
     注意：search-bar 第一个直接子元素是 <input type="hidden" name="tab">，
     所以账号~状态实际是 nth-child(2)~(5)，用 -n+5 命中 */
  .search-bar > .sb-field:nth-child(-n+5) { flex: 1 1 0; min-width: 0; }
  .search-bar > .sb-field:nth-child(-n+5) .input,
  .search-bar > .sb-field:nth-child(-n+5) select.input { width: 100%; min-width: 0; }
  .search-bar > .sb-field:nth-child(-n+5) .input { padding: 8px 6px; font-size: 13px; }
  .search-bar > .sb-field:nth-child(-n+5) select.input { padding: 0 6px; }
  /* 积分段：高度一致 + 收窄，与搜索/重置同一行
     积分段实际是 nth-child(7) */
  .search-bar > .sb-field:nth-child(7) { flex: 1 1 auto; min-width: 0; }
  .search-bar > .sb-field:nth-child(7) .sb-range .input { width: 60px; min-width: 0; padding: 0 4px; font-size: 13px; }
  /* 全部搜索输入（text/select/date/number 共10个）统一 34px 高，
     避免 UA 各自渲染高度不一（select/date 在手机端最明显） */
  .search-bar .input,
  .search-bar select.input { height: 34px !important; min-height: 34px !important; box-sizing: border-box; line-height: 1; }
  .search-bar select.input { -webkit-appearance: none; appearance: none; }
  .search-bar > .sb-actions { flex: 0 0 auto; }
  /* 手机端：系统配置 名称与输入框同行，提示文字换到下一行 */
  .cfg-row { gap: 8px; }
  .cfg-row label { min-width: 0; flex: 0 0 auto; font-size: 13px; }
  .cfg-row .input { max-width: 130px; }
  /* 手机端：配置页保存按钮 上下15px + 宽度铺满 */
  .config-form .btn[type="submit"] { width: 100%; margin: 15px 0; }
  .cfg-row .muted { flex-basis: 100%; margin-left: 0; }
  /* 语音列表手机端：固定列宽（table-layout:fixed），文案列不占满屏幕 */
  .voice-list-table { table-layout: fixed; }
  .voice-list-table th:nth-child(1), .voice-list-table td:nth-child(1) { width: 140px; }
  .voice-list-table th:nth-child(2), .voice-list-table td:nth-child(2) { width: 115px; }
  .voice-list-table th:nth-child(3), .voice-list-table td:nth-child(3) { width: 50px; }
  .voice-list-table th:nth-child(4), .voice-list-table td:nth-child(4) { width: 100px; }
  .voice-list-table th:nth-child(5), .voice-list-table td:nth-child(5) { width: 60px; }
  .voice-list-table th:nth-child(6), .voice-list-table td:nth-child(6) { width: 60px; }
  .voice-list-table th:nth-child(7), .voice-list-table td:nth-child(7) { width: 260px; }
  .voice-list-table td.vtext-cell { max-width: 140px; }
  .voice-list-table .vtext-one { max-width: 100%; }
  .voice-list-table td.vtimb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 音色选择列表手机端：一行3个（31% 预留滚动条宽），最多3行，超出上下滑动（2px 细滚动条可见）；内边距给右上角删除角标留空间 */
  .preset-list { gap: 8px; max-height: 90px; padding: 6px 6px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c9ccd8 transparent; }
  .preset-list::-webkit-scrollbar { width: 2px; }
  .preset-list::-webkit-scrollbar-track { background: transparent; }
  .preset-list::-webkit-scrollbar-thumb { background: #c9ccd8; border-radius: 2px; }
  .preset-chip { flex: 0 1 calc(50% - 6px); min-width: 0; gap: 4px; padding: 8px 6px; font-size: 13px; }
  .preset-chip .preset-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 用量明细手机端：描述列收窄（22%）单行省略；表格 min-width 750px 防过挤，窄屏横向滚动 */
  .credits-table { table-layout: fixed; min-width: 750px; }
  .credits-table th, .credits-table td { padding: 10px 6px; }
  .credits-table th:first-child, .credits-table td:first-child { width: 22%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 会员专区对比表手机端：权益列收窄，会员三列按「普通/VIP 压缩、年度放宽」分配，
     让年度会员「100,000 字」有充足宽度不换行难看；普通/VIP 列相应左移让出空间。 */
  .mem-compare { table-layout: fixed; min-width: 0; }
  .mem-compare th, .mem-compare td { padding: 10px 5px; }
  .mem-compare th:first-child, .mem-compare td:first-child { width: 26%; }   /* 权益列 */
  .mem-compare th:nth-child(2), .mem-compare td:nth-child(2) { width: 22%; } /* 普通会员（左移让宽） */
  .mem-compare th:nth-child(3), .mem-compare td:nth-child(3) { width: 22%; } /* VIP会员（左移让宽） */
  .mem-compare th:nth-child(4), .mem-compare td:nth-child(4) { width: 30%; } /* 年度会员（放宽容纳 100,000 字） */
  .mem-compare td:nth-child(4) { white-space: nowrap; }                       /* 年度列不换行 */
  /* 联系客服留言框手机端：加高（rows=6 原约 120px → 240px 约 2 倍） */
  #msgContent { min-height: 240px; }
  /* 后台语音管理手机端：文案列收窄（20%）省略，表格 min-width 横向滚动；操作列加宽齐平按钮 */
  .vtable-admin { table-layout: fixed; min-width: 1000px; }
  .vtable-admin th:nth-child(2), .vtable-admin td:nth-child(2) { width: 20%; }
  .vtable-admin th:nth-child(8), .vtable-admin td:nth-child(8) { width: 210px; }
  .vtable-admin .vtext-one { max-width: 100%; }
  .preset-chip .preset-ico { flex: 0 0 auto; }
  .preset-chip .preset-play { flex: 0 0 auto; width: 16px; height: 16px; font-size: 9px; }
  .profile-card { max-width: 100%; }
  .narrow-form { max-width: 100%; }
}

/* ===== 语音克隆 ===== */
.voice-form { display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.vf-row { display: flex; flex-direction: column; gap: 6px; }
.vf-label { font-size: 14px; font-weight: 600; }
.vtext-input { width: 100%; min-height: 225px; line-height: 1.7; resize: vertical; box-sizing: border-box; }
/* 手机端：合成文本框高度减 80（225→145px） */
@media (max-width: 640px) {
  /* 手机端：合成文本框固定高度 125px（rows=6 默认约160px，min-height 压不动，必须用 height 强制） */
  .vtext-input { height: 175px; min-height: 175px; }
}
/* 语音合成文本框占位提示颜色变淡 */
.vtext-input::placeholder { color: #b6b9c4; opacity: 1; }
.vtext-input::-webkit-input-placeholder { color: #b6b9c4; }
.vtext-input::-ms-input-placeholder { color: #b6b9c4; }
/* 内置音色选择 */
.ref-mode { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 2px; }
.rm-opt { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.ref-pane { margin-top: 2px; }
/* ===== 内置音色「分组选项卡」（前台 + 后台共用） ===== */
/* 选择音色列表的父容器 */
.preset-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 4px;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(20,20,40,.05);
}
.gtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gtab {
  padding: 6px 16px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  transition: all .15s;
}
.gtab:hover { border-color: var(--primary); color: var(--primary); }
.gtab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.gtab-pane { display: none; }
.gtab-pane.active { display: block; }
/* 手机端：音色分组选项卡（4 组）强制排成一行，不换行；超宽时横向滑动，
   避免不同机型因屏宽差异出现折行不一致。 */
@media (max-width: 640px) {
  .gtabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .gtab { flex: 1 0 0; padding: 6px 12px; font-size: 13px; white-space: nowrap; text-align: center; }
  /* 试听 / 停止按钮（含图标+中文）：强制一行不换行，且不被父 flex 容器压窄 */
  #trimPreview, #refPlayBtn { white-space: nowrap; flex: 0 0 auto; }
  /* 手机端：创建我的音色（标签）+ 选择文件按钮 放一行放不下 → 标签/按钮换行，按钮铺满 */
  .uv-add { flex-direction: column; align-items: stretch; }
  .uv-add .file-btn { width: 100%; flex: 1 1 auto; }
  /* 上传参考音频 的选择文件按钮 手机端也铺满 */
  .ref-upload-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .ref-upload-row .file-btn { width: 100%; flex: 1 1 auto; }
}

/* ===== 语音管理（后台：分组维护） ===== */
.vg-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 18px; }
.voice-group-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--card);
}
.voice-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.vg-inline { display: flex; align-items: center; gap: 8px; }
.vg-rename { font-weight: 600; }
.vg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 10px; }
.vg-field { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.vg-field .input { width: auto; }
.vg-del { display: inline; }
.voice-group-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vc-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; cursor: pointer; user-select: none;
}
.vc-item input { width: 16px; height: 16px; cursor: pointer; }
.vc-item.vc-unassigned span { color: #e23b3b; font-weight: 600; }
.sg-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; cursor: pointer; user-select: none;
  padding: 6px 8px; border-radius: 6px; background: var(--card2, #f5f6f8);
}
.sg-item input { width: 16px; height: 16px; cursor: pointer; }
.preset-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.preset-chip {
  display: inline-flex; align-items: center; gap: 8px; position: relative;
  padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.preset-chip:hover { border-color: var(--primary); }
.preset-chip input { display: none; }
.preset-chip.selected { border-color: var(--primary); background: var(--primary-l); color: var(--primary-d); }
.preset-name { line-height: 1; font-weight: 700; }
.preset-ico { line-height: 1; }
.preset-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 10px; line-height: 1; cursor: pointer;
}
.preset-play:hover { background: var(--primary-d); }

/* 我的音色 */
.uv-chip { position: relative; }
/* 内置音色删除角标（仅管理员可见，选中时显示） */
.preset-chip .preset-del {
  position: absolute; top: -5px; right: -5px;
  width: 12px; height: 12px; line-height: 12px; padding: 0;
  border: 1px solid #fff; border-radius: 50%;
  background: #e34d4d; color: #fff; font-size: 10px; font-weight: 700;
  cursor: pointer; display: none; z-index: 2;
}
.preset-chip .preset-del:hover { background: #c93b3b; }
.preset-chip.selected .preset-del { display: block; }
.uv-chip .uv-del {
  position: absolute; top: -5px; right: -5px;
  width: 12px; height: 12px; line-height: 12px; padding: 0;
  border: 1px solid #fff; border-radius: 50%;
  background: #e34d4d; color: #fff; font-size: 10px; font-weight: 700;
  cursor: pointer; display: none; z-index: 2;
}
.uv-chip .uv-del:hover { background: #c93b3b; }
/* 选中后才显示删除角标（符合「选中后右上角出删除图标」） */
.uv-chip.selected .uv-del { display: block; }
.uv-add {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding-left: 0;
}
/* 「创建我的音色」标签：字号/字重与「选择音色」(.vf-label) 保持一致 */
.uv-create-label { font-size: 14px; font-weight: 600; color: #222; white-space: nowrap; }
.uv-create-ico { margin-right: 4px; font-size: 14px; line-height: 1; }
.uv-create-sub { font-weight: 400; font-size: 13px; color: #888; }
/* 统一文件选择按钮：隐藏原生 file input，用此按钮触发，跨手机外观一致 */
.file-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 14px; font-size: 13px; font-weight: 600; line-height: 1;
  border: 1px solid var(--border, #d8dde6); border-radius: 9px;
  background: #fff; color: #2b313b; cursor: pointer; box-sizing: border-box;
  white-space: nowrap; flex: 0 0 auto;
}
.file-btn:active { transform: translateY(1px); }
.file-name {
  font-size: 13px; color: #5a6472; max-width: 180px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0;
}
/* 上传参考音频：标签独占一行，下方按钮 + 文件名同排，按钮不铺满 */
.ref-upload-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
@media (max-width: 640px) {
  /* 手机端：按钮 + 文件名同一行；文件名过长省略号，不换行不乱挤 */
  .uv-add { flex-wrap: nowrap; }
  .file-btn { flex: 0 0 auto; padding: 0 12px; font-size: 12px; }
}
.upload-preview audio { width: 100%; max-width: 360px; margin-top: 4px; }
.ref-picked { display: flex; }
.ref-picked-name { font-size: 13px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.v-counter { font-size: 13px; color: var(--muted); margin-top: 4px; }
.v-counter.v-lack-box { color: #d33; }
.v-counter .v-free { color: var(--primary-d); font-weight: 700; }
.v-counter .v-lack { color: #d33; font-weight: 700; }
.list-audio { width: 100%; margin-top: 6px; border-radius: 10px; }
.req-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.prog-wrap .progress > i { transition: width .4s ease; }

/* 我的语音 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
.vtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.vtable th, .vtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.vtable th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.vtable tbody tr:hover { background: var(--bg); }
.vtable tbody tr:last-child td { border-bottom: none; }
.vtable td.vtext-cell { text-align: left; max-width: 440px; }
.vtable td.vuser-cell { text-align: left; white-space: nowrap; }
.vtext-one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.vnum, .vcost { white-space: nowrap; color: var(--muted); }
.vtime { white-space: nowrap; color: var(--muted); }
.vtimb { white-space: nowrap; }
.vstat { white-space: nowrap; }
.vrow-audio { display: block; margin-top: 6px; width: 220px; max-width: 100%; }
.vtable td.vrow-err { color: #cf3a3c; font-size: 12px; margin-top: 4px; text-align: left; }
.vrow-prog { margin-top: 4px; width: 140px; margin-left: auto; margin-right: auto; }
.vtable td.vops { white-space: nowrap; text-align: center; }

/* 积分明细表格 */
.credits-table .c-time { white-space: nowrap; color: var(--muted); font-size: 13px; }
.credits-table .c-user { white-space: nowrap; }
.credits-table .c-amt { white-space: nowrap; }
.credits-table .credit-amt { font-size: 15px; font-weight: 800; }
.credits-table .credit-bal { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vops form, .vops a, .vops button { display: inline-flex; align-items: center; vertical-align: middle; }

/* ===== 翻页控件 ===== */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 4px;
  flex-wrap: wrap;
}
.pager-info {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.pager-btn.disabled {
  font-size: 13px;
  color: #c2c5d2;
  padding: 4px 10px;
  cursor: not-allowed;
  user-select: none;
}
.pg {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 7px;
  font-size: 13px; color: var(--text); text-decoration: none; background: #fff;
}
.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg.current { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
.pg.disabled { color: #c2c5d2; cursor: not-allowed; border-color: var(--line); }

/* ===== 多角色音色分配弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(15, 18, 30, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #fff; width: 100%; max-width: 460px;
  border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-sub { font-size: 13px; color: var(--muted); margin: 6px 0 14px; line-height: 1.6; }
.role-rows { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; }
.role-row { display: flex; gap: 12px; align-items: center; }
.role-name {
  flex: 0 0 88px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-sel { flex: 1 1 auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-row .input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }
/* 语音列表「多角色」徽章 */
.badge.role-multi {
  background: linear-gradient(135deg, #7b5cff, #b06bff);
  color: #fff; border-radius: 999px; padding: 2px 10px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* ===== 用户中心 ===== */
.uc-profile { display: flex; align-items: center; gap: 16px; padding: 6px 2px 16px; flex-wrap: wrap; }
.uc-avatar {
  width: 60px; height: 60px; border-radius: 50%; flex: 0 0 60px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: var(--primary-l); color: var(--primary-d);
}
.uc-id { flex: 1 1 auto; min-width: 0; }
.uc-nick { display: flex; align-items: center; gap: 10px; }
.uc-nick-name { font-size: 16px; font-weight: 700; color: var(--text); word-break: break-all; }
/* 昵称编辑：默认隐藏；显示时靠右对齐原「修改昵称」按钮位置（PC），手机端换行到下一行 */
.uc-nick-form { display: none; margin: 0; flex: 0 0 auto; align-items: center; gap: 8px; }
.uc-nick-form.uc-open { display: flex; }
.uc-nick-row { display: flex; gap: 8px; align-items: center; flex: 1 1 auto; min-width: 0; }
.uc-nick-row .input { flex: 1 1 200px; min-width: 160px; max-width: 300px; height: 34px; padding: 0 12px; }
/* 保存/取消按钮与「修改昵称」按钮等宽（不换行） */
.uc-nick-row .btn { min-width: 76px; white-space: nowrap; }
@media (max-width: 640px) {
  .uc-nick-form.uc-open { flex: 1 1 100%; }
  .uc-nick-row .input { max-width: none; }
}
.uc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 6px;
}
.uc-stat {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 14px;
}
.uc-stat-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.uc-stat-value { font-size: 15px; font-weight: 700; color: var(--text); }
.uc-stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.uc-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px;
}
.uc-links .btn { width: 100%; }
.tag-core { background: linear-gradient(135deg, #2b2b3a, #4a4a63); color: #fff; }
.tag-normal { background: #eef1f6; color: #5a6472; }
.tag-agent { background: linear-gradient(135deg, #138a5b, #1faa59); color: #fff; }
.tag-partner { background: linear-gradient(135deg, #c0392b, #e8584a); color: #fff; }
/* 代理会员主页推广链接卡片 */
.uc-promo-card { margin-top: 16px; padding: 14px 16px; border: 1px solid #cdeedb; border-radius: 12px; background: linear-gradient(180deg, #f3fbf6, #fff); }
.uc-promo-title { font-size: 14px; font-weight: 700; color: #1aa15a; margin-bottom: 6px; }
.uc-promo-stats { font-size: 13px; color: #2c3a33; margin-bottom: 10px; }
.uc-promo-stats b { color: #1aa15a; font-size: 15px; margin: 0 2px; }
.uc-promo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.uc-promo-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
.uc-promo-stat { font-size: 13px; color: #2c3a33; }
.uc-promo-stat b { color: #1aa15a; font-size: 15px; margin: 0 2px; }
.uc-promo-withdrawable { font-size: 13px; color: #2c3a33; }
.uc-promo-withdrawable b { color: #1aa15a; font-size: 15px; margin: 0 2px; }
.uc-promo-pending { font-size: 12px; color: #d98200; font-weight: 600; }
.uc-promo-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.uc-promo-input { flex: 1 1 auto; min-width: 0; width: 0; background: #f6faf8; color: #2c3a33; font-size: 13px; }
.uc-promo-btn { flex: 0 0 auto; min-width: 56px; text-align: center; padding-left: 6px; padding-right: 6px; }

/* ===== 会员促销区 ===== */
.promo-wrap { margin-top: 22px; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 14px; }
.promo-card {
  position: relative; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 10px;
}
.promo-card.promo-vip { border-top: 3px solid #d98200; }
.promo-card.promo-core { border-top: 3px solid #e23b3b; background: linear-gradient(180deg, #fff6f6, #fff); }
.promo-card.promo-video { border-top: 3px solid #2f8fff; background: linear-gradient(180deg, #f4f9ff, #fff); }
.promo-card.promo-agent { border-top: 3px solid #1faa59; background: linear-gradient(180deg, #f1fbf4, #fff); }
.promo-card.promo-agent .promo-badge.agent { background: #1faa59; box-shadow: 0 2px 6px rgba(31,170,89,.35); }
.promo-card.promo-agent .promo-price b { color: #1faa59; }
.promo-badge {
  position: absolute; top: -11px; right: 18px;
  background: #e23b3b; color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(226,59,59,.35);
}
.promo-name { font-size: 17px; font-weight: 700; color: var(--text); }
.promo-price { font-size: 14px; color: var(--muted); }
.promo-price b { font-size: 28px; color: var(--accent); margin-right: 4px; }
.promo-unit { font-size: 13px; }
.promo-feats { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 7px; }
.promo-feats li { font-size: 13px; color: #46506a; padding-left: 20px; position: relative; }
.promo-feats li::before { content: "✔"; position: absolute; left: 0; color: #138a5b; font-weight: 700; }
.promo-btn { margin-top: auto; }

/* 会员专区：无限量 红字 / 原价划线 / 优惠活动横幅 */
.infinite { color: #e23b3b; font-weight: 600; }
.promo-old {
  color: var(--muted); text-decoration: line-through;
  font-size: 15px; margin-right: 6px; font-weight: 400;
}
.promo-event {
  margin-top: 16px; padding: 13px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #ff7a18, #ff3d3d);
  color: #fff; font-weight: 700; font-size: 16px; text-align: center;
  box-shadow: 0 6px 18px rgba(255,61,61,.28);
}
.promo-event .promo-event-sub {
  display: block; font-weight: 400; font-size: 12px; opacity: .94; margin-top: 3px;
}

/* 收款二维码弹窗（会员专区「立即开通」） */
.pay-mask {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(20, 24, 40, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.pay-dialog {
  position: relative; width: 300px; max-width: 100%;
  background: #fff; border-radius: 18px; padding: 26px 22px 22px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
  text-align: center; animation: payPop .22s ease;
}
@keyframes payPop {
  from { transform: translateY(14px) scale(.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.pay-close {
  position: absolute; top: 10px; right: 14px;
  border: none; background: transparent; cursor: pointer;
  font-size: 24px; line-height: 1; color: #b6bcc8;
}
.pay-close:hover { color: #5b6270; }
.pay-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.pay-wechat {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: #07C160; color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.pay-title { font-size: 18px; font-weight: 700; color: #1f2330; line-height: 1.2; }
.pay-sub { font-size: 13px; color: #6b7280; margin-top: 3px; }
.pay-sub b { color: #07C160; }
.pay-qr {
  width: 196px; height: 196px; margin: 2px auto 14px;
  background: #f6f7fb; border: 1px solid #eef0f5; border-radius: 14px;
  padding: 10px; display: flex; align-items: center; justify-content: center;
}
.pay-qr img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.pay-tip { font-size: 14px; color: #1f2330; margin: 0 0 6px; }
.pay-tip strong { color: #07C160; }
.pay-note { font-size: 12px; color: #9aa3b2; margin: 0; line-height: 1.55; }

/* 系统配置分隔 */
.cfg-sep { height: 1px; background: var(--line); margin: 18px 0 6px; }
.cfg-group-title { font-size: 13px; font-weight: 700; color: var(--primary-d); margin: 14px 0 4px; padding-left: 9px; border-left: 3px solid var(--primary); letter-spacing: .3px; }

@media (max-width: 900px) {
  .promo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .uc-stats { grid-template-columns: repeat(2, 1fr); }
  .uc-links { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  /* 手机端：昵称旁会员类型标签缩小 */
  .uc-nick .tag { font-size: 10px; padding: 1px 5px; }
  /* 手机端：主页底部域名行（水平居中、颜色更淡、上间距加大） */
  .uc-foot-domain { display: block; text-align: center; color: #dfe1e8; font-size: 13px; font-weight: 300; letter-spacing: .5px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; padding: 28px 0 16px; }
}

/* 桌面端（>640px）隐藏底部域名行；手机端由上方媒体查询显示 */
@media (min-width: 641px) {
  .uc-foot-domain { display: none; }
}

/* 图片预览弹窗：横竖屏自适应 + 手机屏适配（视频任务列表参考图点击） */
.img-preview-grid {
  display: grid;
  gap: 10px;
  width: auto;
  max-width: 92vw;
}
/* 无横屏图：竖屏图一行两个 */
.img-preview-grid:not(.single) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* 存在横屏图：一行一个分两行 */
.img-preview-grid.single {
  grid-template-columns: 1fr;
}
.img-cell {
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-cell img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
}
.img-tag {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  z-index: 1;
}
/* 手机屏：单列 */
@media (max-width: 640px) {
  .img-preview-grid,
  .img-preview-grid:not(.single),
  .img-preview-grid.single {
    grid-template-columns: 1fr;
  }
}
