/* ============ 设计变量 ============ */
:root {
  --bg: #0a0d14;
  --bg-soft: #0e121b;
  --panel: rgba(255, 255, 255, 0.028);
  --panel-solid: #121722;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf4;
  --text-soft: #9aa4b8;
  --text-dim: #6b7488;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(700px 420px at 12% -8%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(620px 380px at 96% 4%, rgba(34, 211, 238, 0.14), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--brand-2); }

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 246px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ============ 侧栏 ============ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  backdrop-filter: blur(14px);
}

.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.32);
}
.brand-logo svg { width: 21px; height: 21px; }
.brand-title { font-weight: 600; letter-spacing: 0.3px; }
.brand-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-soft); cursor: pointer; text-align: left;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.24), rgba(34, 211, 238, 0.12));
  border-color: rgba(124, 92, 255, 0.36);
  box-shadow: 0 10px 26px -18px rgba(124, 92, 255, 0.9);
}
.nav-ico { width: 18px; text-align: center; opacity: 0.9; }
.nav-badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px;
  border-radius: 999px; font-size: 11px; text-align: center;
  background: rgba(124, 92, 255, 0.22); color: #cbbcff;
}
.nav-badge.zero { display: none; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-soft);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.pill.running .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.side-note { font-size: 11px; color: var(--text-dim); line-height: 1.6; }

/* ============ 主区 ============ */
.main { overflow-y: auto; padding: 0 26px 40px; }
.main::-webkit-scrollbar { width: 10px; }
.main::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.09); border-radius: 999px; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0 12px; margin-bottom: 16px;
  background: rgba(10, 13, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.crumb { font-size: 18px; font-weight: 600; letter-spacing: 0.4px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.mini-stat { text-align: right; line-height: 1.2; }
.mini-stat label { display: block; font-size: 11px; color: var(--text-dim); }
.mini-stat b { font-size: 16px; }

.page { display: none; animation: fade 0.28s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text); font-weight: 500;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: var(--grad); border: none; color: #0a0d14; font-weight: 600;
  box-shadow: 0 14px 30px -18px rgba(124, 92, 255, 0.95);
}
.btn.primary:hover { box-shadow: 0 18px 36px -16px rgba(124, 92, 255, 1); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.btn.danger:hover { background: rgba(248, 113, 113, 0.12); }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.link { background: none; border: none; color: var(--brand-2); cursor: pointer; font-size: 12.5px; padding: 0; }
.link:hover { text-decoration: underline; }
.hint { color: var(--text-dim); font-size: 12px; }

.auto-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auto-tip.warn { color: #ffd9a0; background: rgba(255, 176, 32, 0.1); border-color: rgba(255, 176, 32, 0.28); }
.auto-tip.ok { color: #a8f0c0; background: rgba(46, 204, 113, 0.1); border-color: rgba(46, 204, 113, 0.28); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.2px; }
.card-f { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.span2 { grid-column: span 2; }
.field > span { font-size: 12.5px; color: var(--text-soft); }
.field input, .field select, .field textarea, .inline-field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px; outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.field input:focus, .field select:focus, .field textarea:focus, .inline-field input:focus {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
}
.field textarea { resize: vertical; line-height: 1.65; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-soft); }
.inline-field input { width: 64px; padding: 7px 10px; }

/* ============ 工作台 ============ */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 26px 28px; margin-bottom: 16px; border-radius: 22px;
  background:
    radial-gradient(560px 240px at 8% 0%, rgba(124, 92, 255, 0.22), transparent 62%),
    radial-gradient(520px 240px at 92% 100%, rgba(34, 211, 238, 0.14), transparent 60%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.hero h1 { margin: 0 0 10px; font-size: 25px; line-height: 1.35; letter-spacing: 0.4px; }
.hero p { margin: 0 0 18px; color: var(--text-soft); line-height: 1.75; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; }
.hero-ring { position: relative; width: 138px; height: 138px; }
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-ring .ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 9; }
.hero-ring .ring-fg {
  fill: none; stroke: url(#none); stroke: #7c5cff; stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 0.7s ease;
}
.hero-ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hero-ring-text b { font-size: 24px; }
.hero-ring-text span { font-size: 11px; color: var(--text-dim); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.step-card {
  position: relative; padding: 18px 18px 16px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.step-card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.42); background: rgba(124, 92, 255, 0.07); }
.step-no {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: rgba(124, 92, 255, 0.2); color: #cbbcff; font-size: 12px; margin-bottom: 10px;
}
.step-card h3 { margin: 0 0 6px; font-size: 14px; }
.step-card p { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }

.acct-mini { display: flex; flex-direction: column; gap: 12px; }
.acct-mini-row { display: flex; align-items: center; gap: 12px; }
.acct-mini-name { width: 108px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { flex: 1; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width 0.6s ease; }
.acct-mini-val { width: 62px; text-align: right; font-size: 12px; color: var(--text-soft); }

.mini-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-video {
  border-radius: 12px; overflow: hidden; background: #0c1017; border: 1px solid var(--line);
  aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--text-dim); font-size: 11px;
}
.mini-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.empty { padding: 24px 6px; color: var(--text-dim); font-size: 13px; text-align: center; }

/* ============ 提示词审核 ============ */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.tab {
  border: none; background: transparent; color: var(--text-soft); cursor: pointer;
  padding: 7px 13px; border-radius: 10px; transition: background 0.16s, color 0.16s;
}
.tab:hover { color: var(--text); }
.tab.active { background: rgba(124, 92, 255, 0.22); color: #fff; }
.tab b { margin-left: 5px; font-weight: 600; opacity: 0.85; }
.bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 12.5px; cursor: pointer; }
.check input { accent-color: #7c5cff; width: 15px; height: 15px; }

.prompt-list { display: flex; flex-direction: column; gap: 12px; }
.prompt-item {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px;
  padding: 15px 17px 15px 15px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color 0.18s, background 0.18s;
}
.prompt-item::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--text-dim); opacity: 0.7;
}
.prompt-item[data-status="draft"]::before { background: var(--warn); }
.prompt-item[data-status="approved"]::before { background: var(--ok); }
.prompt-item[data-status="used"]::before { background: var(--brand-2); }
.prompt-item[data-status="failed"]::before { background: var(--danger); }
.prompt-item[data-status="running"]::before { background: var(--brand); }
.prompt-item:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.045); }
.prompt-item.selected { border-color: rgba(124, 92, 255, 0.55); background: rgba(124, 92, 255, 0.08); }
.prompt-check { padding-top: 3px; }
.prompt-body { min-width: 0; }
.prompt-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.badge {
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  background: rgba(255, 255, 255, 0.07); color: var(--text-soft);
}
.badge.draft { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.badge.approved { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.badge.used { background: rgba(34, 211, 238, 0.16); color: #67e8f9; }
.badge.failed { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.badge.running { background: rgba(124, 92, 255, 0.2); color: #cbbcff; }
.prompt-title { font-size: 12.5px; color: var(--text-dim); }
.prompt-text {
  width: 100%; background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 8px 10px; line-height: 1.75; color: var(--text); resize: vertical; min-height: 62px;
}
.prompt-text:hover { border-color: var(--line); }
.prompt-text:focus { border-color: rgba(124, 92, 255, 0.6); background: rgba(0, 0, 0, 0.25); outline: none; }
.prompt-file { margin-top: 8px; font-size: 12px; color: var(--text-dim); word-break: break-all; }
.prompt-actions { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }

/* ============ 任务 / 日志 ============ */
.job-card { position: relative; overflow: hidden; }
.progress-wrap { margin-top: 6px; }
.progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width 0.5s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 9px; font-size: 12.5px; color: var(--text-soft); }
.log-card .log { height: 340px; }
.log {
  height: 100%; overflow-y: auto; padding: 12px 14px; border-radius: 14px;
  background: #070a10; border: 1px solid var(--line);
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.85;
}
.log::-webkit-scrollbar { width: 8px; }
.log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 999px; }
.log-line { white-space: pre-wrap; word-break: break-all; color: #b9c2d4; }
.log-line .t { color: #4d586d; margin-right: 8px; }
.log-line.ok { color: #6ee7b7; }
.log-line.warn { color: #fcd34d; }
.log-line.error { color: #fca5a5; }
.log-line.step { color: #cbbcff; }
.log-line.start, .log-line.end { color: #67e8f9; }
.risk-list { margin: 0; padding-left: 18px; color: var(--text-soft); line-height: 2; font-size: 13px; }
.risk-list b { color: var(--text); }
.risk-note { margin-top: 12px; font-size: 12px; color: var(--text-dim); }

/* ============ 成片库 ============ */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.video-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.2s, border-color 0.2s;
}
.video-card:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.4); }
.video-card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #05070c; display: block; }
.video-info { padding: 12px 13px 14px; }
.video-name { font-size: 13px; margin-bottom: 7px; word-break: break-all; line-height: 1.5; }
.video-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.video-actions { display: flex; gap: 8px; }

/* ============ 账号 ============ */
.account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 14px; }
.account-card {
  padding: 16px 17px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
}
.account-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-name { font-size: 14px; font-weight: 600; }
.account-id { font-size: 11.5px; color: var(--text-dim); }
.account-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-soft); }
.account-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.switch { position: relative; width: 38px; height: 21px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); cursor: pointer; transition: background 0.2s; }
.switch::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.switch.on { background: rgba(52, 211, 153, 0.75); }
.switch.on::after { transform: translateX(17px); }

/* ============ 弹窗（绑定浏览器账号） ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 60;
  display: none; place-items: center;
  background: rgba(4, 6, 10, 0.74);
  backdrop-filter: blur(6px);
}
.modal-mask.open { display: grid; }
.modal {
  width: min(700px, 92vw); max-height: 84vh; overflow: auto;
  padding: 20px 22px 18px; border-radius: 20px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 1);
}
.modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-h h3 { margin: 0; font-size: 16px; }
.modal-b { margin-bottom: 12px; }
.modal-f { border-top: 1px solid var(--line); padding-top: 12px; }
.bind-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.bind-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.bind-item.logged { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.06); }
.bind-name { font-size: 13.5px; }
.bind-meta { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.6; }
#toast {
  position: fixed; right: 26px; bottom: 26px; z-index: 50;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  padding: 11px 16px; border-radius: 13px; font-size: 13px;
  background: rgba(18, 23, 34, 0.96); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 1);
  animation: toastIn 0.24s ease;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.5); }
.toast.error { border-color: rgba(248, 113, 113, 0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 76px 1fr; }
  .brand-title, .brand-sub, .nav-item span:not(.nav-ico):not(.nav-badge), .side-note { display: none; }
  .nav-item { justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span2 { grid-column: span 1; }
  .hero { grid-template-columns: 1fr; }
  .hero-ring { justify-self: center; }
}

/* ============ 手机端（<= 640px）============ */
@media (max-width: 640px) {
  html, body { font-size: 15px; }

  /* 整体：单列纵向，主区自己滚动（原来是 100vh 固定 + 内部滚动，手机上很挤） */
  .app { display: block; height: auto; min-height: 100vh; overflow: visible; }

  /* 侧栏 → 顶部横向导航条，可左右滑动 */
  .sidebar {
    position: sticky; top: 0; z-index: 30;
    flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 10px;
    border-right: none; border-bottom: 1px solid var(--line);
    background: rgba(10, 13, 20, 0.94);
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand { padding: 0; flex: 0 0 auto; }
  .brand-logo { width: 30px; height: 30px; border-radius: 9px; }
  .brand-title, .brand-sub { display: none; }
  .nav { flex-direction: row; gap: 6px; flex: 0 0 auto; }
  .nav-item { padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
  .nav-item span:not(.nav-ico):not(.nav-badge) { display: inline; } /* 恢复文字 */
  .nav-badge { margin-left: 4px; }
  .side-foot { display: none; }

  /* 主区 */
  .main { overflow: visible; padding: 0 12px 48px; }
  .topbar { padding: 10px 0; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
  .crumb { font-size: 16px; }
  .top-actions { gap: 10px; flex-wrap: wrap; justify-content: space-between; width: 100%; }
  .mini-stat { text-align: left; }
  .mini-stat b { font-size: 15px; }

  /* 卡片与表单 */
  .card { padding: 14px; border-radius: 14px; margin-bottom: 12px; }
  .card-h { margin-bottom: 10px; }
  .card-f { gap: 10px; margin-top: 12px; }
  .card-f .btn, .row .btn { flex: 1 1 auto; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .field.span2 { grid-column: span 1; }
  input, select, textarea { font-size: 16px; }  /* 防 iOS 聚焦时自动放大 */
  .field input, .field select, .field textarea { padding: 11px 12px; }
  .btn { padding: 11px 14px; }
  .btn.small { padding: 9px 12px; font-size: 13px; }

  /* 工作台 */
  .hero { padding: 18px 16px; border-radius: 16px; }
  .hero h1 { font-size: 20px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-ring { width: 110px; height: 110px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .mini-videos { grid-template-columns: 1fr 1fr; }
  .acct-mini-name { width: 90px; }

  /* 提示词审核 */
  .toolbar { gap: 10px; }
  .tabs { width: 100%; overflow-x: auto; }
  .prompt-item { grid-template-columns: auto 1fr; gap: 10px; padding: 12px; }
  .prompt-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .prompt-actions .btn { flex: 1 1 40%; }
  .prompt-text { min-height: 80px; }
  .bulk { width: 100%; }
  .bulk .btn { flex: 1 1 40%; }

  /* 成片库 / 账号 / 日志 */
  .video-grid, .account-list { grid-template-columns: 1fr; }
  .log-card .log { height: 240px; }
  .log { font-size: 12px; }
  .switch { width: 44px; height: 24px; }
  .switch::after { width: 18px; height: 18px; }

  /* 弹窗与提示 */
  .modal { width: 94vw; padding: 16px; border-radius: 16px; }
  .bind-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  #toast { right: 12px; left: 12px; bottom: 12px; }
  .toast { font-size: 13px; }

  /* 防止任何子元素把整页撑宽（实测顶部导航条 624px、下拉选项文字 493px 会把视口撑到 520） */
  html, body, .app, .main { max-width: 100%; overflow-x: hidden; }
  .sidebar { max-width: 100vw; }
  .nav { min-width: 0; }
  .nav-item { flex: 0 0 auto; }
  .field { min-width: 0; }
  select, input, textarea { max-width: 100%; }
  select { text-overflow: ellipsis; }
}

