/* ==================================================================
 * 玖数Ai数字人视频 · 深蓝科技风主题
 * 蓝底 / 白字 / 玻璃面板 / 细网格 + 光晕
 * ================================================================== */

:root {
  /* 底色 */
  --bg: #06122c;
  --bg-deep: #040b1d;
  --card: rgba(255, 255, 255, .065);
  --card-solid: #0b1e44;
  --line: rgba(122, 166, 255, .18);
  --line-strong: rgba(122, 166, 255, .34);

  /* 文字 */
  --text: #eaf1ff;
  --muted: #93a9cf;

  /* 主色 */
  --primary: #4d8dff;
  --primary-dark: #2f6bff;
  --primary-soft: rgba(77, 141, 255, .16);
  --cyan: #64d2ff;

  /* 语义色 */
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, .14);

  --radius: 16px;
  --shadow: 0 18px 40px rgba(2, 8, 24, .38);
  --glow: 0 0 24px rgba(77, 141, 255, .28);
}

* { box-sizing: border-box; }

html {
  background: var(--bg-deep);
  scrollbar-color: rgba(122, 166, 255, .3) transparent;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;

  background-color: #06122c;
  background-image:
    /* 细网格 */
    repeating-linear-gradient(0deg, rgba(122, 166, 255, .055) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(122, 166, 255, .055) 0 1px, transparent 1px 48px),
    /* 光晕 */
    radial-gradient(900px 520px at 10% -10%, rgba(56, 116, 255, .38), transparent 62%),
    radial-gradient(820px 500px at 92% -4%, rgba(104, 72, 255, .30), transparent 60%),
    radial-gradient(1100px 760px at 50% 116%, rgba(20, 92, 205, .30), transparent 66%),
    linear-gradient(180deg, #081a3d 0%, #061229 55%, #040c1e 100%);
  background-attachment: fixed;
}

a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }

::selection { background: rgba(77, 141, 255, .45); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(122, 166, 255, .26);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(122, 166, 255, .45); background-clip: content-box; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 62px;
  padding: 0 24px;
  background: rgba(6, 16, 38, .72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(122, 166, 255, .08), 0 10px 30px rgba(2, 8, 24, .35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .3px;
  white-space: nowrap;
  color: #fff;
}

.brand .logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(122, 166, 255, .35), 0 0 16px rgba(77, 141, 255, .35);
}

.brand .brand-name { white-space: nowrap; }

.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }

.nav a {
  padding: 7px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  transition: .16s;
  border: 1px solid transparent;
}

.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.nav a.on {
  background: linear-gradient(180deg, rgba(77, 141, 255, .28), rgba(77, 141, 255, .14));
  border-color: rgba(122, 166, 255, .45);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(77, 141, 255, .25);
}

.userbox { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.userbox .who { color: var(--muted); font-size: 13px; }
.userbox .who b { color: var(--text); }

.credit-chip {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(77, 141, 255, .16);
  border: 1px solid rgba(122, 166, 255, .38);
  color: #a9c8ff;
  font-weight: 600;
  font-size: 12.5px;
}

/* ---------------- 布局 ---------------- */
.app { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; position: relative; z-index: 1; }
.app.wide { max-width: 1280px; }

.page-head { margin-bottom: 22px; }
.page-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -.3px;
  color: #fff;
  text-shadow: 0 0 30px rgba(77, 141, 255, .35);
}
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), var(--shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
  transition: border-color .2s;
}

.card:hover { border-color: rgba(122, 166, 255, .28); }
.card + .card { margin-top: 16px; }

.card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
}

.card h3 .ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(122, 166, 255, .26);
}

.card h3 .ic img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------------- 表单 ---------------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
label.field > span em { color: var(--danger); font-style: normal; }

input[type="text"], input[type="password"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 11, 28, .55);
  color: var(--text);
  outline: none;
  transition: .16s;
}

input::placeholder, textarea::placeholder { color: #6c82a8; }

input[type="text"]:focus, input[type="password"]:focus, input[type="tel"]:focus,
input[type="number"]:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  background: rgba(5, 16, 40, .75);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, .18), 0 0 22px rgba(77, 141, 255, .18);
}

select option { background: #0b1e44; color: var(--text); }

textarea { resize: vertical; min-height: 90px; line-height: 1.7; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.6; cursor: pointer; }
.check input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--primary); flex: none; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #dce8ff;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: .16s;
  white-space: nowrap;
}

.btn:hover { background: rgba(255, 255, 255, .12); border-color: var(--line-strong); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(135deg, #5b9bff, #2f6bff 55%, #1f4fe0);
  border-color: rgba(140, 185, 255, .55);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(47, 107, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 8px 28px rgba(47, 107, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }

.btn.ghost { background: transparent; }
.btn.ok { background: linear-gradient(135deg, #34d399, #0f9d70); border-color: rgba(52, 211, 153, .5); color: #04231a; font-weight: 600; }
.btn.danger { color: #ffb3c0; border-color: rgba(251, 113, 133, .38); background: rgba(251, 113, 133, .08); }
.btn.danger:hover { background: rgba(251, 113, 133, .18); border-color: rgba(251, 113, 133, .6); color: #ffd0d8; }

.btn.lg { padding: 12px 24px; font-size: 15px; border-radius: 12px; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------------- 状态徽章 ---------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.pill.queued { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.pill.generating { background: var(--primary-soft); color: #8fb8ff; border-color: rgba(122, 166, 255, .4); }
.pill.delivered { background: var(--ok-soft); color: var(--ok); border-color: rgba(52, 211, 153, .35); }
.pill.cancelled { background: rgba(255, 255, 255, .07); color: var(--muted); border-color: rgba(255, 255, 255, .12); }
.pill.pending { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.pill.paid { background: var(--ok-soft); color: var(--ok); border-color: rgba(52, 211, 153, .35); }

/* ---------------- 统计块 ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }

.stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--shadow);
  backdrop-filter: blur(10px);
}

.stat::after {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 166, 255, .7), transparent);
}

.stat .k { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }

.stat .v {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.6px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 22px rgba(77, 141, 255, .45);
  font-variant-numeric: tabular-nums;
}

.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; text-shadow: none; }

/* ---------------- 工单卡片 ---------------- */
.order-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(122, 166, 255, .1);
  cursor: pointer;
  transition: .15s;
}
.order-item:last-child { border-bottom: 0; }
.order-item:hover { background: rgba(77, 141, 255, .09); }

.order-item .main { flex: 1; min-width: 0; }
.order-item .t { font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.order-item .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 30px; opacity: .4; margin-bottom: 8px; }
.empty p { margin: 0 0 14px; }

/* ---------------- 素材 ---------------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

.asset {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, .035);
  position: relative;
  transition: .16s;
}
.asset:hover { border-color: rgba(122, 166, 255, .35); background: rgba(255, 255, 255, .055); }
.asset.on {
  border-color: rgba(122, 166, 255, .8);
  background: rgba(77, 141, 255, .14);
  box-shadow: 0 0 22px rgba(77, 141, 255, .22);
}

.asset .thumb {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(3, 11, 28, .6);
  display: block;
}

.asset .thumb.audio { display: grid; place-items: center; font-size: 26px; }
.asset .nm { font-size: 11.5px; color: var(--muted); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.asset .badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #5b9bff, #2f6bff);
  color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(47, 107, 255, .45);
}

.asset .ops { display: flex; gap: 6px; margin-top: 6px; }
.asset .ops button { flex: 1; }

.uploader {
  display: grid;
  place-items: center;
  height: 110px;
  border: 1.5px dashed rgba(122, 166, 255, .38);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, .025);
  transition: .16s;
  text-align: center;
  line-height: 1.5;
}
.uploader:hover {
  border-color: var(--primary);
  color: #bcd6ff;
  background: rgba(77, 141, 255, .12);
  box-shadow: 0 0 22px rgba(77, 141, 255, .18);
}

/* ---------------- 文案卡片 ---------------- */
.ver-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.ver {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: .16s;
  font-size: 13px;
  line-height: 1.75;
  max-height: 210px;
  overflow: hidden;
}
.ver:hover { border-color: rgba(122, 166, 255, .4); background: rgba(255, 255, 255, .06); }
.ver.on {
  border-color: rgba(122, 166, 255, .8);
  background: rgba(77, 141, 255, .12);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, .12), 0 0 26px rgba(77, 141, 255, .2);
}

.ver .st { font-size: 11.5px; font-weight: 700; color: var(--cyan); margin-bottom: 6px; letter-spacing: .4px; }
.ver .tt { font-weight: 600; margin-bottom: 6px; font-size: 13.5px; color: #fff; }
.ver .bd { color: #b9cbea; white-space: pre-wrap; }

/* ---------------- 会员卡 ---------------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 14px;
}

.plan {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  position: relative;
  backdrop-filter: blur(10px);
}
.plan.hot {
  border-color: rgba(122, 166, 255, .65);
  box-shadow: 0 0 0 1px rgba(122, 166, 255, .25), 0 0 40px rgba(77, 141, 255, .22);
}

.plan .nm { font-weight: 700; font-size: 15px; color: #fff; }
.plan .pr { font-size: 32px; font-weight: 700; letter-spacing: -1px; margin: 6px 0 2px; color: #fff; text-shadow: 0 0 26px rgba(77, 141, 255, .45); }
.plan .pr small { font-size: 13px; font-weight: 500; color: var(--muted); text-shadow: none; }
.plan .ds { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.plan .ds .bonus {
  color: #ff5d5d;
  font-weight: 700;
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 93, 93, .13);
  border: 1px solid rgba(255, 93, 93, .3);
}

/* ---------------- 表格 ---------------- */
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }

table.tb th {
  text-align: left;
  padding: 11px 12px;
  color: #9db4d8;
  font-weight: 500;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
}

table.tb td { padding: 11px 12px; border-bottom: 1px solid rgba(122, 166, 255, .09); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tr.clickable:hover { background: rgba(77, 141, 255, .1); cursor: pointer; }

/* ---------------- 弹窗 ---------------- */
.modal-host {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 7, 20, .72);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal-host.hidden { display: none; }

.modal {
  width: 100%; max-width: 720px;
  background: linear-gradient(180deg, #0c2050, #081736);
  border: 1px solid rgba(122, 166, 255, .3);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(122, 166, 255, .08), 0 0 60px rgba(47, 107, 255, .18);
  animation: pop .18s ease-out;
}

@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; color: #fff; }
.modal-body { padding: 20px 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--line);
  background: rgba(4, 12, 30, .45); border-radius: 0 0 16px 16px;
}

.x {
  border: 0; background: transparent; font-size: 20px; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 4px 9px; border-radius: 8px;
}
.x:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { word-break: break-word; color: #dbe6fa; }

.script-box {
  background: rgba(3, 11, 28, .55);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(122, 166, 255, .6);
  border-radius: 10px;
  padding: 14px 16px;
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.85;
  color: #d3e2fb;
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13px; color: #c6d6ef; }

.timeline li::before {
  content: ''; position: absolute; left: 4px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(122, 166, 255, .35);
}
.timeline li:first-child::before {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(77, 141, 255, .9);
}
.timeline li::after {
  content: ''; position: absolute; left: 7.5px; top: 17px; bottom: 0;
  width: 1.5px; background: rgba(122, 166, 255, .18);
}
.timeline li:last-child::after { display: none; }
.timeline .ts { color: var(--muted); font-size: 12px; margin-left: 8px; }

/* ---------------- 提示 ---------------- */
.toast-host {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 20px; border-radius: 10px;
  background: rgba(11, 30, 68, .95);
  border: 1px solid rgba(122, 166, 255, .4);
  color: #eaf1ff; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 24px rgba(77, 141, 255, .25);
  backdrop-filter: blur(8px);
  animation: pop .18s ease-out;
}
.toast.err { background: rgba(74, 16, 28, .95); border-color: rgba(251, 113, 133, .5); color: #ffd6dd; }
.toast.ok { background: rgba(6, 48, 36, .95); border-color: rgba(52, 211, 153, .5); color: #b8f5dd; }

.hint { color: var(--muted); font-size: 12.5px; }
.hint.warn { color: var(--warn); }
.divider { height: 1px; background: rgba(122, 166, 255, .14); margin: 18px 0; }

/* ---------------- 登录 ---------------- */
.auth-wrap { max-width: 400px; margin: 7vh auto 0; }
.auth-wrap .brand { justify-content: center; margin-bottom: 24px; font-size: 19px; }

.auth-tabs {
  display: flex; gap: 4px;
  background: rgba(3, 11, 28, .55);
  border: 1px solid var(--line);
  padding: 4px; border-radius: 12px; margin-bottom: 20px;
}
.auth-tabs button {
  flex: 1; padding: 8px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 13.5px;
  transition: .16s;
}
.auth-tabs button:hover { color: #fff; }
.auth-tabs button.on {
  background: linear-gradient(180deg, rgba(77, 141, 255, .32), rgba(77, 141, 255, .18));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* ---------------- 其它 ---------------- */
.step-n {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #5b9bff, #2f6bff);
  color: #fff;
  font-size: 12px; font-weight: 700; flex: none;
  box-shadow: 0 0 14px rgba(77, 141, 255, .5);
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button {
  padding: 9px 15px; border: 0; background: transparent;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
  transition: .16s;
}
.tabs button:hover { color: #fff; }
.tabs button.on {
  color: #fff;
  border-bottom-color: var(--primary);
  font-weight: 600;
  text-shadow: 0 0 18px rgba(77, 141, 255, .6);
}

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { display: none; }
.switch .track {
  width: 40px; height: 22px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid var(--line);
  position: relative; transition: .18s;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: .18s; box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.switch input:checked + .track {
  background: linear-gradient(135deg, #5b9bff, #2f6bff);
  border-color: rgba(140, 185, 255, .6);
  box-shadow: 0 0 16px rgba(77, 141, 255, .5);
}
.switch input:checked + .track::after { transform: translateX(18px); }

.section-title {
  font-size: 12px; font-weight: 700; color: #8aa6d4;
  letter-spacing: 1px; margin: 4px 0 10px;
}

.video-box {
  background: #030a18;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: inset 0 0 40px rgba(47, 107, 255, .12);
}
.video-box video {
  width: auto;
  max-width: 100%;
  max-height: 380px;
  border-radius: 8px;
  display: block;
  background: #000;
}

/* 音频控件在深色下的底 */
audio { filter: invert(1) hue-rotate(180deg) saturate(.8) brightness(.95); }
audio:hover { filter: invert(1) hue-rotate(180deg) saturate(.9) brightness(1.05); }

/* ---------------- 验证码 / 时长选择 / 反馈 ---------------- */

.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { flex: none; min-width: 112px; }

.dev-code {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 2px;
  border-radius: 6px;
  background: rgba(77, 141, 255, .18);
  border: 1px solid rgba(122, 166, 255, .4);
  color: #a9c8ff;
  cursor: pointer;
  letter-spacing: 2px;
}
.dev-code:hover { background: rgba(77, 141, 255, .3); }

.dur-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* 小号分段选择器（无人值守时长等） */
.unatt-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 11, 28, .55);
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: .15s;
}
.seg button:hover:not(:disabled) { color: #fff; }
.seg button.on {
  background: linear-gradient(180deg, rgba(77, 141, 255, .32), rgba(77, 141, 255, .16));
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.seg button:disabled { opacity: .4; cursor: not-allowed; }

.dur {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, .035);
  transition: .16s;
}
.dur:hover { border-color: rgba(122, 166, 255, .4); background: rgba(255, 255, 255, .06); }
.dur.on {
  border-color: rgba(122, 166, 255, .85);
  background: rgba(77, 141, 255, .14);
  box-shadow: 0 0 26px rgba(77, 141, 255, .22);
}
.dur .d1 { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.dur .d2 { font-size: 12px; color: var(--muted); margin-top: 2px; }

.reject-box {
  background: rgba(251, 113, 133, .1);
  border: 1px solid rgba(251, 113, 133, .34);
  border-radius: 10px;
  padding: 12px 14px;
  color: #ffc3cc;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.7;
}

.ref-box {
  background: rgba(3, 11, 28, .5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.share-box {
  background: rgba(3, 11, 28, .55);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(122, 166, 255, .6);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.9;
  color: #d3e2fb;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
}

/* ---------------- 案例演示 ---------------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.case-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: .16s;
}
.case-card:hover { border-color: rgba(122, 166, 255, .45); transform: translateY(-1px); }

.case-media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #030a18;
  overflow: hidden;
}
.case-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-media video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

.case-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
  background: rgba(8, 18, 42, .62);
  border: 1px solid rgba(255, 255, 255, .4);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.case-title {
  padding: 10px 13px 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-dl {
  display: block;
  margin: 0 11px 11px;
  padding: 7px 10px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(122, 166, 255, .38);
  background: rgba(77, 141, 255, .14);
  color: #bcd6ff;
  font-size: 12.5px;
  font-weight: 600;
  transition: .15s;
}
.case-dl:hover { background: rgba(77, 141, 255, .28); color: #fff; border-color: rgba(122, 166, 255, .6); }

.case-ph {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

/* ---------------- 录音采集音色 ---------------- */
.voice-pick { display: grid; gap: 12px; }

.voice-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: .16s;
}
.voice-opt:hover {
  border-color: rgba(122, 166, 255, .5);
  background: rgba(77, 141, 255, .1);
  transform: translateY(-1px);
}
.voice-opt .ic { font-size: 26px; line-height: 1; }
.voice-opt .tx b { display: block; font-size: 15px; color: #fff; margin-bottom: 3px; }
.voice-opt .tx p { margin: 0; font-size: 12.5px; color: var(--muted); }
.voice-opt.off { opacity: .5; cursor: not-allowed; }
.voice-opt.off:hover { transform: none; border-color: var(--line); background: rgba(255, 255, 255, .035); }

.voice-script {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(77, 141, 255, .08);
  border: 1px solid rgba(122, 166, 255, .22);
  font-size: 14px;
  line-height: 1.9;
  color: #dce8ff;
  letter-spacing: .3px;
}

.rec-box {
  margin-top: 16px;
  padding: 18px 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

.rec-time {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.rec-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.rec-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #4d8dff, #7aa6ff);
  transition: width .2s linear;
}

/* ---------------- 代理商 ---------------- */
.agent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, .5));
  vertical-align: -2px;
}
.agent-badge svg { width: 15px; height: 15px; display: block; }

/* 付费用户标记 */
.paid-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  color: #64d2ff;
  filter: drop-shadow(0 0 6px rgba(100, 210, 255, .55));
  vertical-align: -2px;
}
.paid-badge svg { width: 13px; height: 13px; display: block; }

/* 普通用户标记 */
.free-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  color: #7f93b5;
  vertical-align: -2px;
}
.free-badge svg { width: 14px; height: 14px; display: block; }

/* 未解锁提示 */
.lock-box {
  border: 1px dashed rgba(122, 166, 255, .4);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(77, 141, 255, .06);
}
.lock-title {
  font-size: 14px;
  font-weight: 600;
  color: #cfe0ff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lock-title::before {
  content: '🔒';
  font-size: 13px;
}

.agent-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, .1), rgba(77, 141, 255, .06));
  border: 1px solid rgba(251, 191, 36, .28);
}

.agent-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.6px;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 0 24px rgba(251, 191, 36, .35);
}
.agent-num span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 5px; }

.plan-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(135deg, #5b9bff, #2f6bff);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(47, 107, 255, .5);
}

.fb-item { padding: 14px 0; border-bottom: 1px solid rgba(122, 166, 255, .1); }
.fb-item:last-child { border-bottom: 0; padding-bottom: 0; }
.fb-q { color: #dbe6fa; font-size: 13.5px; margin-bottom: 4px; white-space: pre-wrap; }

.fb-a {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(77, 141, 255, .1);
  border-left: 2px solid rgba(122, 166, 255, .7);
  font-size: 13px;
  color: #cfe0ff;
}
.fb-a b { display: block; font-size: 12px; color: #9cc3ff; margin-bottom: 4px; }
.fb-a div { white-space: pre-wrap; }

.fb-card { margin-bottom: 14px; }

.alert-err {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(251, 113, 133, .12);
  border: 1px solid rgba(251, 113, 133, .4);
  color: #ffc3cc;
  font-size: 13px;
  margin-bottom: 14px;
}

.pill.rejected { background: var(--danger-soft); color: var(--danger); border-color: rgba(251, 113, 133, .38); }

.modal.wide { max-width: 820px; }

/* ---------------- 后台管理 ---------------- */

.admin-body { background: inherit; }

.admin-login { max-width: 380px; margin: 10vh auto 0; padding: 0 16px; }
.admin-login .brand { justify-content: center; margin-bottom: 22px; font-size: 18px; }

.admin-layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  background: rgba(4, 12, 30, .72);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
}

.side-brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; }
.side-brand img {
  width: 34px; height: 34px; border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(122, 166, 255, .35), 0 0 16px rgba(77, 141, 255, .3);
}
.side-brand b { display: block; font-size: 13px; color: #fff; line-height: 1.3; }
.side-brand span { font-size: 11.5px; color: var(--muted); }

.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px;
  border: 1px solid transparent;
  transition: .15s;
}
.side-nav a i { font-style: normal; width: 16px; text-align: center; opacity: .85; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on {
  background: linear-gradient(180deg, rgba(77, 141, 255, .28), rgba(77, 141, 255, .12));
  border-color: rgba(122, 166, 255, .42);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(77, 141, 255, .2);
}
.side-nav a em {
  margin-left: auto; background: var(--danger); color: #fff;
  font-style: normal; font-size: 11px; border-radius: 999px; padding: 0 6px;
}

.side-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 8px 0; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

.admin-main { padding: 26px 30px 70px; min-width: 0; }

.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.admin-head h1 { margin: 0; font-size: 22px; color: #fff; letter-spacing: -.3px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

.admin-main input[type="text"], .admin-main input[type="number"], .admin-main input[type="password"] {
  padding: 8px 10px;
}

@media (max-width: 980px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .side-nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .admin-main { padding: 18px 14px 60px; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 760px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ver-list { grid-template-columns: 1fr; }
  .app { padding: 18px 14px 70px; }

  /* 窄屏顶栏换成两行：品牌 + 账号在上，导航在下（可横向滑动） */
  .topbar {
    height: auto;
    padding: 9px 14px 0;
    gap: 0 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .brand { order: 1; font-size: 13.5px; gap: 7px; }
  .brand .logo { width: 24px; height: 24px; border-radius: 7px; }
  .userbox { order: 2; margin-left: auto; gap: 8px; }
  .userbox .who { display: none; }
  .nav {
    order: 3;
    flex: 0 0 100%;
    margin: 4px -14px 0;
    padding: 0 14px 8px;
    gap: 2px;
  }
  .nav a { padding: 6px 9px; font-size: 12.5px; }

  .case-grid { grid-template-columns: repeat(2, 1fr); }

  .toast-host { bottom: 96px; }
  .modal-foot { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
