/* ==========================================================================
   播丫 AI 短视频数字人平台 · 设计系统
   深色科技风：纯黑底 + 玻璃面板 + 蓝紫渐变强调色
   ========================================================================== */

:root {
  --bg: #05060a;
  --bg-2: #090b10;
  --panel: #0e1118;
  --panel-2: #141822;
  --panel-3: #1a1f2b;
  --line: #202634;
  --line-soft: #171c26;
  --text: #e9eef7;
  --text-2: #c2cadb;
  --muted: #8a94a8;
  --muted-2: #5f6a7d;
  --brand: #3b82f6;
  --brand-2: #7c3aed;
  --cyan: #22d3ee;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .55);
  --grad: linear-gradient(120deg, #2563eb 0%, #6d28d9 60%, #9333ea 100%);
  --grad-soft: linear-gradient(120deg, rgba(37, 99, 235, .18), rgba(147, 51, 234, .14));
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232a38; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #313a4c; }

/* ---------------------------------- 布局 --------------------------------- */

.app { display: flex; height: 100vh; overflow: hidden; background:
  radial-gradient(900px 500px at 12% -10%, rgba(37, 99, 235, .12), transparent 70%),
  radial-gradient(700px 400px at 95% 0%, rgba(147, 51, 234, .10), transparent 70%),
  var(--bg); }

.rail {
  width: 88px; flex: 0 0 88px; background: rgba(8, 10, 15, .92);
  border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 10px; gap: 4px; overflow-y: auto; backdrop-filter: blur(12px);
}
.rail::-webkit-scrollbar { width: 0; }
.rail-logo { width: 44px; height: 44px; margin-bottom: 10px; border-radius: 12px; }
.rail-group { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; }
.rail-divider { width: 32px; height: 1px; background: var(--line); margin: 4px 0; }
.rail-item {
  width: 72px; padding: 7px 2px; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 11.5px; line-height: 1.15; text-align: center;
  transition: all .18s ease; border: 1px solid transparent; background: none;
}
.rail-item:hover { color: var(--text-2); background: rgba(255, 255, 255, .04); }
.rail-item.active {
  color: #fff; background: var(--grad-soft); border-color: rgba(96, 165, 250, .35);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18);
}
.rail-item svg { width: 20px; height: 20px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px; flex: 0 0 62px; padding: 0 22px; display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line-soft); background: rgba(7, 9, 14, .7); backdrop-filter: blur(10px);
  /* backdrop-filter 会生成独立层叠上下文，必须显式提升层级，
     否则右上角「个人中心 / 退出登录」下拉菜单会被下方内容卡片盖住 */
  position: relative; z-index: 30;
}
/* 用户菜单面板：保证浮在内容之上（顶栏层叠上下文内部也要够高） */
.user-chip > .panel { z-index: 80; }
.topbar .title { font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }

.balance-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25);
  color: #7de7f7; font-size: 13px; font-weight: 600;
}
.balance-chip b { color: #fff; font-weight: 700; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--panel); }
.user-chip:hover { border-color: #2c3446; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user-chip .meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip .meta span:first-child { font-size: 12.5px; }
.user-chip .meta span:last-child { font-size: 10.5px; color: var(--muted); }

.content { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }

.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.page-head h2 { font-size: 20px; font-weight: 650; }
.page-head p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.page-head .spacer { flex: 1; }
/* 列表页：顶部导航已展示栏目名，页内只保留说明文字，避免标题重复 */
.page-head.slim { align-items: center; margin-bottom: 12px; }
.page-head.slim .lead { color: var(--muted); font-size: 12.5px; margin: 0; }

/* ---------------------------------- 通用 --------------------------------- */

.panel {
  background: linear-gradient(180deg, rgba(22, 26, 36, .92), rgba(13, 16, 23, .92));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}
.panel-pad { padding: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { font-size: 14.5px; font-weight: 600; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 18px; }

.row { display: flex; gap: 16px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; }
.grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .16s ease; white-space: nowrap;
}
.btn:hover { border-color: #313b4e; background: var(--panel-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { border: none; background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 8px 20px rgba(79, 70, 229, .32); }
.btn-primary:hover { filter: brightness(1.08); background: var(--grad); }
.btn-ghost { background: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 26px; font-size: 14.5px; border-radius: 12px; }
.btn-danger { color: #fca5a5; border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .1); }
.btn-link { background: none; border: none; color: #7dd3fc; padding: 0; height: auto; cursor: pointer; font-size: 12.5px; }
.btn-block { width: 100%; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--line); color: var(--text-2); background: rgba(255, 255, 255, .03); }
.tag.ok { color: #86efac; border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .1); }
.tag.warn { color: #fcd34d; border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .1); }
.tag.danger { color: #fca5a5; border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .1); }
.tag.info { color: #93c5fd; border-color: rgba(59, 130, 246, .35); background: rgba(59, 130, 246, .1); }
.tag.cyan { color: #7de7f7; border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .1); }
.tag.purple { color: #c4b5fd; border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .12); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.mono { font-family: "SF Mono", ui-monospace, Menlo, monospace; }
.strong { font-weight: 600; }
.center { text-align: center; }
.right { text-align: right; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------- 表单 --------------------------------- */

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%; background: #0b0e14; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 0 12px; height: 38px; font-size: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; min-height: 84px; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(96, 165, 250, .6); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }
.input::placeholder, .textarea::placeholder { color: #4d5768; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b7789 50%), linear-gradient(135deg, #6b7789 50%, transparent 50%); background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.switch { width: 40px; height: 22px; border-radius: 999px; background: #232a38; border: none; position: relative; cursor: pointer; transition: background .18s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8b94a6; transition: all .18s; }
.switch.on { background: var(--grad); }
.switch.on::after { left: 21px; background: #fff; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: #0b0e14; border: 1px solid var(--line); border-radius: 10px; }
.segmented button { border: none; background: none; color: var(--muted); padding: 6px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.segmented button.active { background: var(--panel-3); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.segmented.blue button.active { background: var(--grad); }

/* 颜色选择：色块 + 十六进制值 */
.swatch { display: flex; align-items: center; gap: 8px; }
.swatch-color {
  width: 40px; height: 36px; padding: 0; flex: 0 0 auto; cursor: pointer;
  border: 1px solid var(--line); border-radius: 9px; background: #0b0e14;
}
.swatch-color::-webkit-color-swatch-wrapper { padding: 4px; }
.swatch-color::-webkit-color-swatch { border: none; border-radius: 5px; }
.swatch-hex {
  flex: 1; min-width: 0; height: 36px; letter-spacing: .5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase;
}

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.tabs button { background: none; border: none; color: var(--muted); padding: 10px 0 12px; font-size: 13.5px; cursor: pointer; position: relative; }
.tabs button.active { color: #fff; font-weight: 600; }
.tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); border-radius: 2px; }
.tabs .count { color: var(--muted); margin-left: 4px; font-size: 12px; }

/* ---------------------------------- 表格 --------------------------------- */

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.table tbody tr:hover td { background: rgba(255, 255, 255, .022); }
.table .actions { display: flex; gap: 8px; }
.table-empty { padding: 42px 0; text-align: center; color: var(--muted-2); }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 4px 0; }
.pager .info { color: var(--muted); font-size: 12px; margin-right: auto; }
.pager button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); cursor: pointer; font-size: 12px; }
.pager button.active { background: var(--grad); color: #fff; border: none; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------------------------- 卡片 --------------------------------- */

.stat-card { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(26, 31, 44, .9), rgba(13, 16, 23, .92)); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .18), transparent 70%); }
.stat-card .label { color: var(--muted); font-size: 12px; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.stat-card .value small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat-card .delta { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* 首页横幅 + 数据 */
.hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); min-height: 208px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .95; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 10, .15) 0%, rgba(5, 6, 10, .75) 62%, rgba(5, 6, 10, .95) 100%); }
.hero-inner { position: relative; z-index: 1; padding: 26px 28px 22px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 208px; }
.hero .hello { font-size: 13px; color: #a8b3c6; }
.hero h1 { font-size: 24px; margin-top: 6px; font-weight: 700; }
.hero .stats { display: flex; gap: 54px; margin-top: 22px; }
.hero .stats .item { text-align: center; }
.hero .stats .num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero .stats .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 作品 / 形象卡片 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.tile { border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: transform .18s ease, border-color .18s; position: relative; align-self: start; }
.tile:hover { transform: translateY(-3px); border-color: rgba(96, 165, 250, .45); }
.tile .thumb { position: relative; aspect-ratio: 9 / 14; background: #0a0d13; overflow: hidden; }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .18s; background: rgba(0, 0, 0, .35); }
.tile:hover .thumb .play { opacity: 1; }
.tile .thumb .play span { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: #111; font-size: 14px; padding-left: 3px; }
.tile .meta { padding: 9px 11px 10px; }
.tile .meta .name { font-size: 12.5px; color: var(--text); }
.tile .meta .sub { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.tile .badge-corner { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .12); }
.tile .progress-wrap { position: absolute; inset: auto 0 0 0; padding: 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent); }

/* 模版卡片：按模版标题样式渲染的迷你预览 */
.tile .thumb.tpl-thumb.vertical { aspect-ratio: 3 / 4; }
.tile .thumb.tpl-thumb.horizontal { aspect-ratio: 16 / 9; }
.tpl-face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 22px 16px; text-align: center; font-weight: 800; line-height: 1.28;
  letter-spacing: .6px; word-break: break-word; overflow: hidden;
}

.progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s ease; }

/* 声音条目 */
.voice-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(16, 78, 74, .55), rgba(21, 32, 44, .8)); margin-bottom: 10px; }
.voice-row .icon { width: 34px; height: 34px; border-radius: 50%; background: rgba(34, 211, 238, .14); display: grid; place-items: center; color: #7de7f7; flex: 0 0 auto; }
.voice-row .name { font-size: 13.5px; }
.voice-row .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.voice-row.purple { background: linear-gradient(120deg, rgba(49, 30, 92, .75), rgba(23, 26, 40, .85)); }

/* ---------------------------------- 合成工作台 ---------------------------- */

.studio { display: grid; grid-template-columns: 232px 1fr 356px; gap: 16px; height: calc(100vh - 148px); }
.studio-col { display: flex; flex-direction: column; min-height: 0; }
.studio-scroll { overflow-y: auto; padding: 14px; }
.canvas-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; min-height: 0; }
.canvas-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #2a3140; background: #0a0d14; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.canvas-frame.vertical { height: min(100%, 520px); aspect-ratio: 9 / 16; }
.canvas-frame.horizontal { width: 100%; max-width: 760px; aspect-ratio: 16 / 9; }
.canvas-frame img.bg { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.canvas-frame .canvas-bg { position: absolute; inset: 0; }
/* 合成预览里的人物剪影：真实数字人视频接入后替换为视频层 */
.canvas-frame .avatar-glow {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 86%; height: 56%; border-radius: 50% 50% 0 0 / 32% 32% 0 0;
  background: radial-gradient(60% 70% at 50% 78%, rgba(96, 165, 250, .22), transparent 72%);
  pointer-events: none;
}
.canvas-frame .avatar-figure {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 46%; height: 55%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 76%, transparent 100%);
}
.canvas-frame .avatar-figure .head {
  width: 42%; aspect-ratio: 1; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(165deg, #b3c4dc, #4b5c74);
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, .28), 0 0 38px rgba(96, 165, 250, .2);
}
.canvas-frame .avatar-figure .body {
  width: 100%; flex: 1; margin-top: -3%;
  border-radius: 50% 50% 0 0 / 26% 26% 0 0;
  background: linear-gradient(172deg, #93a5c1, #232c3b);
  box-shadow: inset 0 10px 26px rgba(255, 255, 255, .08);
}
.canvas-frame .avatar-img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 88%; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .6)); }
.canvas-frame .title-overlay { position: absolute; left: 8%; top: 7%; right: 8%; font-weight: 700; line-height: 1.25; text-shadow: 0 4px 18px rgba(0, 0, 0, .5); }
.canvas-frame .subtitle-overlay {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%);
  max-width: 88%; text-align: center; font-weight: 600; padding: 6px 14px;
  background: rgba(4, 6, 12, .55); border-radius: 999px; backdrop-filter: blur(6px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.canvas-frame .shot-tag { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .5); font-size: 11px; color: #cbd5e1; }

.shot-strip { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line-soft); overflow-x: auto; }
.shot { position: relative; width: 64px; height: 96px; border-radius: 8px; border: 1px solid var(--line); background: #0a0d14; overflow: hidden; cursor: pointer; flex: 0 0 auto; }
.shot img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.shot.active { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96, 165, 250, .3); }
.shot .idx { position: absolute; left: 4px; bottom: 3px; font-size: 10px; background: rgba(0, 0, 0, .6); padding: 0 4px; border-radius: 3px; }
.shot .del { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: rgba(0, 0, 0, .65); border: none; color: #f87171; font-size: 10px; line-height: 1; cursor: pointer; }
.shot-add { width: 64px; height: 96px; border-radius: 8px; border: 1px dashed #2f3849; display: grid; place-items: center; color: var(--muted); cursor: pointer; flex: 0 0 auto; font-size: 20px; }
.shot-add:hover { border-color: #4b5a75; color: #93c5fd; }

.pick-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pick-item { width: 68px; flex: 0 0 auto; cursor: pointer; }
.pick-item img { width: 68px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pick-item.active img { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96, 165, 250, .28); }
.pick-item .n { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.script-box { background: #0a0d14; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.script-box textarea { background: none; border: none; color: var(--text); width: 100%; min-height: 118px; resize: vertical; outline: none; font-size: 13px; line-height: 1.7; font-family: inherit; }
.script-tools { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* ---------------------------------- 登录页 ------------------------------- */

.login { display: grid; grid-template-columns: 1.25fr .75fr; height: 100vh; background: #05060a; }
.login-visual { position: relative; overflow: hidden; border-right: 1px solid var(--line-soft); }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-visual .veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 6, 10, .25), rgba(5, 6, 10, .9)); }
.login-visual .brand { position: absolute; left: 52px; top: 44px; display: flex; align-items: center; gap: 12px; z-index: 2; }
.login-visual .brand img { position: static; width: 38px; height: 38px; border-radius: 10px; }
.login-visual .brand span { font-size: 15px; letter-spacing: 1px; }
.login-visual .copy { position: absolute; left: 52px; bottom: 76px; z-index: 2; max-width: 560px; }
.login-visual .copy h1 { font-size: 38px; line-height: 1.28; font-weight: 700; background: linear-gradient(100deg, #ffffff, #9ec7ff 55%, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-visual .copy p { color: #9aa6ba; margin-top: 16px; font-size: 13.5px; line-height: 1.9; }
.login-visual .copy .chips { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.login-visual .copy .chips span { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); font-size: 12px; color: #c8d3e4; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px; background: radial-gradient(600px 400px at 80% 10%, rgba(59, 130, 246, .08), transparent 70%), #070910; }
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.login-card .sub { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.login-card .form { margin-top: 26px; }
.login-card .roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.login-card .role { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; background: #0b0e14; transition: all .16s; }
.login-card .role b { display: block; font-size: 12.5px; font-weight: 600; }
.login-card .role span { font-size: 10.5px; color: var(--muted-2); }
.login-card .role.active { border-color: rgba(96, 165, 250, .55); background: rgba(37, 99, 235, .12); }
.login-card .role.active b { color: #bfdbfe; }
.login-tabs { display: flex; gap: 18px; margin-bottom: 16px; }
.login-tabs button { background: none; border: none; color: var(--muted); font-size: 13px; padding-bottom: 8px; cursor: pointer; position: relative; }
.login-tabs button.active { color: #fff; font-weight: 600; }
.login-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #3b82f6; }
.login-tip { margin-top: 18px; padding: 11px 13px; border-radius: 10px; background: rgba(59, 130, 246, .07); border: 1px solid rgba(59, 130, 246, .18); color: #9db4d6; font-size: 11.5px; line-height: 1.8; }
.login-tip code { color: #bfdbfe; }
.login-foot { margin-top: 22px; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 11.5px; }

/* ---------------------------------- 弹窗 / 提示 --------------------------- */

.modal-mask { position: fixed; inset: 0; background: rgba(3, 4, 8, .72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 60; padding: 24px; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: #0c0f16; border: 1px solid #262d3c; border-radius: 16px; box-shadow: var(--shadow); }
.modal.wide { max-width: 760px; }
.modal.xwide { max-width: 980px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-head .close { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; }

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 18px; border-radius: 10px; font-size: 13px; background: #12161f; border: 1px solid #2a3244; box-shadow: var(--shadow); animation: slideIn .22s ease; }
.toast.ok { border-color: rgba(34, 197, 94, .45); color: #bbf7d0; }
.toast.err { border-color: rgba(239, 68, 68, .45); color: #fecaca; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.empty { padding: 56px 0; text-align: center; color: var(--muted-2); }
.empty .big { font-size: 30px; opacity: .35; }

.upload-box { border: 1px dashed #2b3344; border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; transition: all .16s; background: #0a0d13; }
.upload-box:hover { border-color: #3f4d66; background: #0c1119; }
.upload-box .icon { font-size: 24px; color: #4b5b74; }
.upload-box .t { font-size: 13px; margin-top: 8px; }
.upload-box .s { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; }
.upload-box.has { border-style: solid; border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .05); }

/* 支付 */
.pay-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.qr-box { background: #0a0d13; border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.qr-code { width: 196px; height: 196px; margin: 14px auto 10px; background: #fff; border-radius: 10px; padding: 8px; display: grid; place-items: center; }
.qr-code canvas, .qr-code svg { width: 100%; height: 100%; }
.pay-amount { font-size: 26px; font-weight: 700; }
.pay-plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #0b0e14; cursor: pointer; }
.pay-plan.active { border-color: rgba(96, 165, 250, .55); background: rgba(37, 99, 235, .1); }
.pay-plan .p { margin-left: auto; font-weight: 700; }

/* 图表 */
.chart { width: 100%; height: 190px; }
.legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.stepline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.stepline .st { display: flex; align-items: center; gap: 6px; }
.stepline .n { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; background: #1b2130; color: #93a2bb; }
.stepline .st.done .n { background: rgba(34, 197, 94, .18); color: #86efac; }
.stepline .st.now .n { background: var(--grad); color: #fff; }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .studio { grid-template-columns: 200px 1fr 320px; }
}
@media (max-width: 1024px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .studio { grid-template-columns: 1fr; height: auto; }
}
