/* ==========================================================================
   聚来业务看板 · styles.css
   纯手写样式，零框架零 CDN。设计目标：克制配色 / 圆角卡片 / 清晰层级 / 响应式
   ========================================================================== */

:root {
  /* 主色与中性色 */
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef0fe;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #172033;
  --text-2: #4b5768;
  --muted: #8a94a6;
  --border: #e6e9f2;
  --border-strong: #d5dae8;

  /* 语义色 */
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* 阶段色 */
  --c-script: #6366f1;
  --c-prod: #0ea5e9;
  --c-dist: #10b981;
  /* 平台色 */
  --c-hongguo: #db2777;
  --c-tiktok: #0f172a;
  --c-youtube: #dc2626;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 10px 26px -14px rgba(15, 23, 42, .16);
  --shadow-lg: 0 10px 40px -12px rgba(15, 23, 42, .28);
  --topbar-h: 60px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.noscript { padding: 40px; text-align: center; color: var(--danger); }

/* --------------------------------------------------------------------------
   基础控件
   -------------------------------------------------------------------------- */
.input, .select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .16s, box-shadow .16s, background .16s;
  appearance: none;
}
.select {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%238a94a6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.input:hover:not(:disabled), .select:hover:not(:disabled) { border-color: #bfc7da; }
.input:focus-visible, .select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}
.input::placeholder { color: #aab2c2; }
.input[type="search"]::-webkit-search-cancel-button { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  font: inherit; font-weight: 600; font-size: 13px;
  color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .12s, box-shadow .16s, background .16s, border-color .16s, color .16s;
  white-space: nowrap;
}
.btn:hover { background: #f8f9fd; border-color: #c3cbdd; transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, .22); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, #6d5ce8 100%);
  box-shadow: 0 6px 18px -8px rgba(79, 70, 229, .7);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-dark) 0%, #5f4ee0 100%); color: #fff; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-quiet:hover { background: rgba(255, 255, 255, .7); border-color: var(--border); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.btn-block { width: 100%; height: 42px; font-size: 14px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fef2f2; border-color: #fecaca; }

.icon-btn {
  width: 30px; height: 30px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--card); color: var(--text-2);
  font-size: 16px; line-height: 1; cursor: pointer;
  transition: .16s;
}
.icon-btn:hover { background: var(--brand-soft); border-color: #cfd4fb; color: var(--brand); }
.icon-btn.close { font-size: 18px; }

.field { display: block; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

.muted { color: var(--muted); }
.ta-r { text-align: right; }

/* --------------------------------------------------------------------------
   登录页
   -------------------------------------------------------------------------- */
.login {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 620px at 12% -10%, #6d5ce8 0%, transparent 55%),
    radial-gradient(900px 560px at 100% 0%, #8b5cf6 0%, transparent 50%),
    radial-gradient(800px 700px at 60% 120%, #4338ca 0%, transparent 55%),
    linear-gradient(160deg, #4b3fd6 0%, #5b3fd4 45%, #6d28d9 100%);
}
.login-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(700px 500px at 50% 30%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(700px 500px at 50% 30%, #000 0%, transparent 80%);
}
.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 30px 30px 26px;
  background: rgba(255, 255, 255, .97);
  border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(20, 12, 60, .55);
  animation: rise .4s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.login-brand h1 { font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.login-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  color: #fff; font-size: 21px; font-weight: 800;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .75);
}
.brand-mark.sm { width: 32px; height: 32px; font-size: 15px; border-radius: 10px; box-shadow: none; }
.login-form { display: grid; gap: 15px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 40px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; border-radius: 8px; font-size: 14px;
}
.pw-toggle:hover { background: #f1f3f9; color: var(--text-2); }
.login-error {
  font-size: 12.5px; color: var(--danger); font-weight: 600;
  background: #fef2f2; border: 1px solid #fecaca;
  padding: 8px 11px; border-radius: var(--radius-sm);
}
.login-hint { font-size: 11.5px; color: var(--muted); text-align: center; }
#login-guest { margin-top: 14px; height: 38px; font-weight: 500; }
.login-mock {
  margin-top: 16px; padding: 11px 13px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm);
  font-size: 12px; color: #92400e;
}
.login-mock b { display: block; margin-bottom: 5px; font-size: 12.5px; }
.login-mock .mock-accounts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.login-mock .acct {
  font: inherit; font-size: 11px; padding: 3px 8px; cursor: pointer;
  background: #fff; border: 1px solid #fcd34d; border-radius: 999px; color: #92400e;
}
.login-mock .acct:hover { background: #fef3c7; }

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */
.app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1720px; margin: 0 auto; height: 100%;
  padding: 0 22px;
  display: flex; align-items: center; gap: 16px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.topbar-titles { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-titles strong { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.topbar-sub { font-size: 11px; color: var(--muted); }
.topbar-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  padding: 4px 10px; border-radius: 999px; background: #f4f6fb;
  border: 1px solid var(--border);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.dot-busy { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); animation: pulse 1s infinite; }
.dot-err { background: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
@keyframes pulse { 50% { opacity: .35; } }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mock-badge {
  font-size: 11px; font-weight: 700; color: #92400e;
  background: #fef3c7; border: 1px solid #fde68a;
  padding: 3px 9px; border-radius: 999px;
}
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
}
.avatar {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  border-radius: 50%; font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-size: 12.5px; font-weight: 700; }
.role-tag { font-size: 10.5px; color: var(--muted); }

.banner {
  max-width: 1720px; margin: 12px auto 0; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--radius); font-size: 13px; font-weight: 600;
}
.banner-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.banner-close {
  margin-left: auto; border: 0; background: transparent;
  font-size: 18px; color: inherit; cursor: pointer; line-height: 1;
}

/* --------------------------------------------------------------------------
   布局容器
   -------------------------------------------------------------------------- */
.wrap { max-width: 1720px; margin: 0 auto; padding: 20px 22px 56px; }

/* 流程条 */
.flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px; align-items: stretch; margin-bottom: 16px;
}
.flow-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px 14px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.flow-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.flow-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.flow-card.s1::before { background: var(--c-script); }
.flow-card.s2::before { background: var(--c-prod); }
.flow-card.s3::before { background: var(--c-dist); }
.fc-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.fc-icon { font-size: 15px; }
.fc-num { font-size: 27px; font-weight: 800; letter-spacing: -.6px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fc-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.fc-bar { height: 4px; border-radius: 999px; background: #eef0f6; margin-top: 10px; overflow: hidden; }
.fc-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .3, 1); }
.flow-card.s1 .fc-bar i { background: var(--c-script); }
.flow-card.s2 .fc-bar i { background: var(--c-prod); }
.flow-card.s3 .fc-bar i { background: var(--c-dist); }
.flow-arrow { display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #c3c9dd; }

/* KPI */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.kpi {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-label { font-size: 12px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi-value {
  font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.kpi-unit { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpi.star {
  background: linear-gradient(180deg, #fff 0%, #fbfbff 100%);
  border-color: #dbe0fb;
}
.kpi.star::after {
  content: "重点"; position: absolute; right: 12px; top: 12px;
  font-size: 10px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 2px 7px;
}
.kpi.star.hongguo { border-color: #fadbe9; }
.kpi.star.hongguo::after { color: var(--c-hongguo); background: #fdf0f5; }
.kpi.star.play::after { color: var(--c-tiktok); background: #eef2f7; }
.kpi-accent-hongguo { color: var(--c-hongguo); }
.kpi-accent-play { color: #0f766e; }
.kpi-spark { display: flex; gap: 3px; margin-top: 8px; height: 22px; align-items: flex-end; }
.kpi-spark i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: #e3e7f5; }

/* 标签页导航 */
.view-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center;
}
.view-tabs .tab {
  font: inherit; font-size: 13px; font-weight: 700; color: var(--text-2);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 16px; cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform .14s, background .16s, border-color .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
}
.view-tabs .tab:hover { border-color: #c3cbdd; transform: translateY(-1px); box-shadow: var(--shadow); }
.view-tabs .tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, #6d5ce8 100%);
  box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .7);
}
#btn-add-drama {
  margin-left: 12px; margin-bottom: 14px;
  height: 32px; padding: 0 14px;
  font-size: 13px; font-weight: 700;
}

/* 筛选器 */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 14px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.filter-search { position: relative; flex: 1 1 260px; min-width: 180px; }
.filter-search .input { padding-left: 34px; padding-right: 30px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .55; pointer-events: none; }
.clear-x {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: #eef0f6; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
}
.clear-x:hover { background: #e2e6f0; color: var(--text-2); }
.filter-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.filter-item .select { width: auto; min-width: 116px; height: 34px; font-weight: 500; }
.filter-count {
  margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.filter-count span { color: var(--brand); font-weight: 800; }

/* --------------------------------------------------------------------------
   数据表
   -------------------------------------------------------------------------- */
.table-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
/* 列宽由 app.js 的 <colgroup> 统一下发；这里只保留表格基础行为 */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 1320px; }
.grid tbody td { overflow: hidden; }
/* 末尾弹性空白列：只吃剩余宽度，不画任何内容 */
.grid tbody td.cell-spacer,
.grid thead th.cell-spacer { border-bottom: 0; background: transparent; }
.grid tbody td.cell-spacer { border-bottom: 1px solid #f0f2f8; }

.grid thead th {
  position: sticky; top: 0; z-index: 2;
  background: #fafbfe;
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-align: left; white-space: nowrap; letter-spacing: .3px;
}
/* 表头内部：标签 + 按钮 */
.th-in { display: inline-flex; align-items: center; gap: 5px; }
.th-label { flex: 1; }
.th-btn {
  width: 16px; height: 16px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: #b3bac9;
  line-height: 1; cursor: pointer;
  border-radius: 4px; padding: 0;
  transition: background .14s, color .14s;
}
.th-btn:hover { background: #eef0f6; color: var(--text-2); }
.th-btn svg { display: block; fill: currentColor; }
.th-btn.active { color: var(--brand); }
.th-sort svg .up.on,
.th-sort svg .down.on { fill: var(--brand); }
.th-sort svg path:not(.on) { fill: #cdd3e0; }
.th-sort:hover svg path:not(.on) { fill: #8a94a6; }
.grid thead th.grp { text-align: center; background: #f4f6fb; color: var(--text-2); }
.grid thead th.grp.g-script { border-top: 2px solid var(--c-script); }
.grid thead th.grp.g-prod { border-top: 2px solid var(--c-prod); }
.grid thead th.grp.g-dist { border-top: 2px solid var(--c-dist); }
.grid tbody td {
  padding: 4px 8px; border-bottom: 1px solid #f0f2f8;
  font-size: 13px; vertical-align: middle; height: 40px;
}
.grid tbody tr { transition: background .14s; }
.grid tbody tr:hover { background: #f9fafd; }
.grid tbody tr.row-active { background: var(--brand-soft); }
.grid tbody tr:last-child td { border-bottom: 0; }
.cell-name { padding-left: 14px !important; }
/* 剧名：弹性列，允许两行后省略，避免长英文剧名把行高撑乱 */
.drama-name {
  display: flex; align-items: flex-start; gap: 8px;
  width: 100%;
  font-weight: 700; font-size: 13.5px; line-height: 1.4; color: var(--text);
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  max-width: 100%;
}
.drama-name > span:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-width: 0;
}
.drama-name:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.drama-name .idx { font-size: 11px; font-weight: 700; color: #b6bdcd; font-variant-numeric: tabular-nums; flex: none; line-height: 1.5; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.b-online { color: #047857; background: #ecfdf5; border-color: #bbf0d9; }
.badge.b-making { color: #1d4ed8; background: #eff6ff; border-color: #cfe1fb; }
.badge.b-wait { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.badge.b-none { color: var(--muted); background: #f4f6fb; border-color: var(--border); }
.badge.b-none::before { display: none; }
.tag-region { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tag-region.oversea { color: #7c3aed; background: #f5f3ff; }
.tag-region.domestic { color: #0369a1; background: #eff8ff; }
.tag-empty { color: #c2c8d6; }

/* 可编辑单元格 */
.editable {
  position: relative; display: block; width: 100%;
  min-height: 28px; padding: 3px 6px;
  font: inherit; font-size: 13px; color: var(--text);
  text-align: left;
  background: transparent; border: 1px dashed transparent; border-radius: 7px;
  cursor: text; transition: .14s;
  white-space: pre-wrap; word-break: break-word;
}
.editable:hover { background: #f6f8fd; border-color: #ccd4e8; }
.editable:hover::after {
  content: ""; position: absolute; right: 6px; top: 6px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .5;
}
.editable:focus {
  outline: none; background: #fff; border: 1px solid var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .13); cursor: text;
}
.editable.is-empty:not(:focus)::before { content: "点击填写"; color: #c2c8d6; font-weight: 500; }
.editable:empty:not(:focus)::before { content: "点击填写"; color: #c2c8d6; font-weight: 500; }
.editable-select {
  width: 100%; height: 28px; padding: 0 24px 0 6px; font: inherit; font-size: 12.5px;
  color: var(--text); background-color: transparent;
  border: 1px dashed transparent; border-radius: 7px;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%238a94a6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
}
.editable-select:hover { background-color: #f6f8fd; border-color: #ccd4e8; }
.editable-select:focus { outline: none; background-color: #fff; border-style: solid; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .13); }
.editable-date {
  width: 100%; height: 28px; padding: 0 6px; font: inherit; font-size: 12.5px;
  color: var(--text); background: transparent;
  border: 1px dashed transparent; border-radius: 7px; cursor: pointer;
}
.editable-date:hover { background: #f6f8fd; border-color: #ccd4e8; }
.editable-date:focus { outline: none; background: #fff; border-style: solid; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .13); }
/* 起止时间：精确到分钟 */
.editable-datetime {
  width: 100%; height: 28px; padding: 0 4px; font: inherit; font-size: 12px;
  color: var(--text); background: transparent;
  border: 1px dashed transparent; border-radius: 7px; cursor: text;
}
.editable-datetime:hover { background: #f6f8fd; border-color: #ccd4e8; }
.editable-datetime:focus { outline: none; background: #fff; border-style: solid; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .13); }
.cell-saving { background: #fffbeb !important; }
.ro-cell { color: var(--text-2); }
.ro.locked { color: #c2c8d6; letter-spacing: 1px; }
.duration-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: #334155;
  background: #f1f3f9; border-radius: 999px; padding: 3px 10px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.duration-pill.long { color: #b45309; background: #fff7e6; }
.duration-pill.empty { color: #c2c8d6; background: transparent; font-weight: 500; padding-left: 0; }

/* 整表看板：渠道标记 */
.channel-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.channel-flag:not(.on) { color: #c2c8d6; font-weight: 500; }
.platform-dot.off { background: #d7dbe8 !important; }

.platform-cell { display: flex; align-items: center; gap: 6px; }
.platform-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pd-hongguo { background: var(--c-hongguo); }
.pd-tiktok { background: var(--c-tiktok); }
.pd-youtube { background: var(--c-youtube); }

.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 34px; margin-bottom: 8px; opacity: .5; }
.empty p { margin-bottom: 12px; font-size: 13px; }

.footnote {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  margin-top: 14px; font-size: 11.5px; color: var(--muted);
}
.footnote b { font-variant-numeric: tabular-nums; color: var(--text-2); }

/* --------------------------------------------------------------------------
   详情抽屉
   -------------------------------------------------------------------------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 23, 42, .32);
  animation: fade .2s both;
}
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; z-index: 51; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  display: flex; flex-direction: column;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px -20px rgba(15, 23, 42, .3);
  animation: slide-in .26s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes slide-in { from { transform: translateX(28px); opacity: .5; } }
.drawer-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}
.drawer-head-main { display: flex; align-items: center; gap: 10px; }
.drawer-titlebox { flex: 1; min-width: 0; }
.drawer-title { font-size: 16.5px; font-weight: 800; line-height: 1.35; word-break: break-word; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 22px; }
.drawer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 18px; border-top: 1px solid var(--border);
  font-size: 11.5px; background: #fbfcfe;
}

.seg {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden; background: #fff;
}
.seg-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13px; font-weight: 800;
  background: #f8f9fd; border-bottom: 1px solid var(--border);
}
.seg-head .seg-icon { font-size: 15px; }
.seg-head .seg-note { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); }
.seg.script > .seg-head { color: var(--c-script); box-shadow: inset 3px 0 0 var(--c-script); }
.seg.prod > .seg-head { color: #0284c7; box-shadow: inset 3px 0 0 var(--c-prod); }
.seg.dist > .seg-head { color: #047857; box-shadow: inset 3px 0 0 var(--c-dist); }

.rows { display: grid; grid-template-columns: 96px 1fr; }
.rows .rlabel {
  padding: 9px 14px; font-size: 12px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid #f4f6fa; background: #fcfcfe;
}
.rows .rval { padding: 6px 12px 6px 4px; border-bottom: 1px solid #f4f6fa; min-width: 0; }
.rows > :last-child > .rlabel, .rows > :last-child > .rval { border-bottom: 0; }
.rows .ro { padding: 9px 4px 9px 0; font-size: 13px; color: var(--text); word-break: break-word; }
.rows .ro.ph { color: #c2c8d6; }

.subhead {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px 6px; font-size: 12px; font-weight: 700; color: var(--text-2);
}
.plat-block { padding: 0 12px 10px; }
.plat-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; color: var(--text-2);
  padding: 8px 2px 4px;
}
.plat-title .hint { font-weight: 500; color: var(--muted); font-size: 10.5px; }
.plat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.metric {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 9px; background: #fcfcfe; transition: .16s;
}
.metric:hover { border-color: #ccd4e8; background: #fff; }
.metric.key { border-color: #f3d3e3; background: #fdf7fa; }
.metric-label { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .2px; }
.metric .editable, .metric .editable-select { min-height: 26px; font-size: 13px; font-weight: 700; }
.metric .ro { font-size: 13.5px; font-weight: 700; padding: 4px 0; }

/* --------------------------------------------------------------------------
   人员管理弹窗
   -------------------------------------------------------------------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, .38);
  display: grid; place-items: center; align-items: center; justify-content: center; padding: 20px;
  animation: fade .18s both;
}
.modal {
  width: min(660px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: rise .24s cubic-bezier(.2, .8, .3, 1) both;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--border); background: #fbfcfe;
}
.modal-head h2 { font-size: 15.5px; font-weight: 800; }
.modal-body { padding: 16px 18px 20px; overflow-y: auto; }
.modal-intro { margin-bottom: 16px; color: var(--text-2); line-height: 1.65; }
.password-exit { margin-top: 8px; }
.password-gated #view-workspace,
.password-gated #view-app > .wrap,
.password-gated #pw-banner,
.password-gated .topbar-status,
.password-gated .topbar-nav,
.password-gated #btn-change-password,
.password-gated #btn-admin-users,
.password-gated #btn-refresh,
.password-gated #btn-logout { display: none !important; }
.project-dialog { width: min(620px, 94vw); max-height: 92vh; }
.project-dialog .modal-head { padding: 20px 24px; }
.project-dialog .modal-head h2 { font-size: 18px; }
.project-form {
  display: grid;
  gap: 18px;
  padding: 24px 24px 28px;
}
.project-form .field-label { margin-bottom: 9px; font-size: 13px; }
.project-form .input,
.project-form .select { min-height: 44px; }
.project-form textarea.input { min-height: 112px; padding-top: 12px; line-height: 1.6; }
.project-form .login-error { margin: -4px 0 0; }
.project-form-actions {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.project-form-actions .btn-block { height: 48px; font-size: 15px; }
.mini-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mini-table th {
  text-align: left; font-size: 11px; color: var(--muted); font-weight: 700;
  padding: 7px 10px; border-bottom: 1px solid var(--border); background: #fafbfe;
  white-space: nowrap;
}
.mini-table td { padding: 8px 10px; border-bottom: 1px solid #f2f4f9; vertical-align: middle; }
.mini-table tr:last-child td { border-bottom: 0; }
.divider {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 12px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.user-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.user-form .btn { height: 38px; }
.modal-note { margin-top: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.modal-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  background: #f4f6fb; padding: 1px 5px; border-radius: 4px; color: var(--brand-dark);
}
.role-select-mini { height: 30px; font-size: 12.5px; padding: 0 26px 0 8px; min-width: 110px; }

/* 确认气泡 */
.confirm-pop {
  position: fixed; z-index: 70; width: 232px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px;
}
.confirm-pop p { font-size: 12.5px; margin-bottom: 10px; color: var(--text-2); }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* 列筛选弹层 */
.col-pop {
  position: fixed; z-index: 75; width: 260px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  max-height: 70vh;
}
.col-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text);
}
.col-pop-close {
  width: 24px; height: 24px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--muted);
  font-size: 16px; line-height: 1; cursor: pointer; border-radius: 4px;
}
.col-pop-close:hover { background: #f4f6fb; color: var(--text-2); }
.col-pop-body {
  padding: 8px 12px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.col-pop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px; border-radius: 6px; cursor: pointer;
  font-size: 12.5px; color: var(--text);
}
.col-pop-item:hover { background: #f4f6fb; }
.col-pop-item input[type=checkbox] { cursor: pointer; }
.col-pop-date-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 12.5px; color: var(--text-2);
}
.col-pop-date-row .input { width: 120px; height: 30px; font-size: 12px; }
.col-pop-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 10px 12px; border-top: 1px solid var(--border);
}

/* Toast */
.toasts {
  position: fixed; z-index: 80; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(23, 32, 51, .93); color: #fff;
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .5);
  animation: toast-in .22s cubic-bezier(.2, .8, .3, 1) both;
  backdrop-filter: blur(6px);
  max-width: min(90vw, 520px);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.toast.out { animation: toast-out .2s ease-in both; }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
.toast.t-ok::before { content: "✓"; color: #6ee7b7; font-weight: 800; }
.toast.t-info::before { content: "ℹ"; color: #93c5fd; font-weight: 800; }
.toast.t-warn::before { content: "!"; color: #fcd34d; font-weight: 800; }
.toast.t-err { background: rgba(153, 27, 27, .95); }
.toast.t-err::before { content: "✕"; color: #fecaca; font-weight: 800; }

/* 滚动条 */
.table-scroll::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .modal-body::-webkit-scrollbar { height: 10px; width: 10px; }
.table-scroll::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
  background: #d7dbe8; border-radius: 999px; border: 3px solid transparent; background-clip: content-box;
}
.table-scroll::-webkit-scrollbar-thumb:hover, .drawer-body::-webkit-scrollbar-thumb:hover { background: #bcc3d6; background-clip: content-box; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { display: none; }
  .flow-card { padding: 13px 16px; }
  .fc-num { font-size: 22px; margin-top: 2px; }
  .fc-bar { margin-top: 8px; }
}

@media (max-width: 860px) {
  .topbar { height: auto; }
  .topbar-inner { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .topbar-status { order: 3; margin-left: auto; }
  .topbar-right { width: 100%; order: 4; flex-wrap: wrap; gap: 6px; }
  .user-chip { margin-right: auto; }
  .wrap { padding: 14px 12px 48px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
  .kpi-value { font-size: 20px; }
  .filters { padding: 10px; gap: 8px; }
  .filter-item { flex: 1 1 46%; }
  .filter-item .select { width: 100%; }
  .filter-count { width: 100%; margin-left: 0; text-align: right; }
  .drawer { width: 100vw; }
  .rows { grid-template-columns: 88px 1fr; }
  .user-form { grid-template-columns: 1fr; }
  table.grid { min-width: 760px; }
  .view-tabs .tab { padding: 6px 12px; font-size: 12px; }
  .project-dialog .modal-head { padding: 17px 18px; }
  .project-form { gap: 16px; padding: 20px 18px 22px; }
}

@media (max-width: 560px) {
  .login-card { padding: 24px 20px 20px; border-radius: 16px; }
  .topbar-titles .topbar-sub { display: none; }
  .banner { flex-wrap: wrap; }
  table.grid { min-width: 640px; }
}

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

/* ======================================================================
   个人工作台（业务管理系统）
   ====================================================================== */
.workspace {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.ws-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.ws-title { font-size: 20px; font-weight: 700; color: var(--text); }
.btn-workspace.active, #btn-workspace.active {
  background: var(--brand-soft); color: var(--brand-dark); border-color: transparent;
}
.ws-loading, .ws-error { text-align: center; color: var(--muted); padding: 40px 0; }
.ws-error p { margin-bottom: 12px; }

.ws-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.ws-chip {
  min-width: 96px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 4px;
}
.ws-chip-num { font-size: 24px; font-weight: 800; line-height: 1; }
.ws-chip-label { font-size: 12.5px; color: var(--text-2); }
.stage-s0 .ws-chip-num, .stage-s0 { --stage-c: #94a3b8; }
.stage-s1 .ws-chip-num, .stage-s1 { --stage-c: #6366f1; }
.stage-s2 .ws-chip-num, .stage-s2 { --stage-c: #0ea5e9; }
.stage-s3 .ws-chip-num, .stage-s3 { --stage-c: #f59e0b; }
.stage-s4 .ws-chip-num, .stage-s4 { --stage-c: #10b981; }
.ws-chip .ws-chip-num { color: var(--stage-c, var(--text)); }

.ws-group { margin-bottom: 28px; }
.ws-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ws-group-title { font-size: 15px; font-weight: 700; color: var(--stage-c, var(--text)); }
.ws-group-count {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--stage-c, var(--muted));
  border-radius: 999px; padding: 1px 9px;
}
.ws-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ws-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.ws-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ws-card-title { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.4; }
.ws-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px; color: var(--text-2); background: #f1f3f9;
  border-radius: 6px; padding: 2px 8px;
}
.tag-file { background: var(--brand-soft); color: var(--brand-dark); }
.ws-dwell { font-size: 12px; color: var(--muted); }
.ws-dwell.overdue { color: var(--danger); font-weight: 600; }
.ws-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.review-file-section { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.review-file-section h3 { font-size: 14px; color: var(--text); }
.review-file-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; background: var(--surface, #f6f9fc); border-radius: 8px; }
.review-file-info { display: grid; gap: 3px; min-width: 0; }
.review-file-info strong { overflow-wrap: anywhere; }
.review-file-actions { margin-top: 18px; }
.review-project-info { display: grid; gap: 12px; padding: 2px 0 18px; border-bottom: 1px solid var(--border); }
.review-project-info h3 { font-size: 15px; color: var(--text); }
.review-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.review-info-item { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; background: var(--surface, #f6f9fc); border-radius: 8px; }
.review-info-item strong { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.review-producer-field { margin-top: 18px; }
.review-comment-field { margin-top: 18px; }
@media (max-width: 720px) {
  .review-info-grid { grid-template-columns: 1fr; }
}

.ws-warn {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 16px; margin-bottom: 24px;
}
.ws-warn > p { font-size: 13.5px; font-weight: 600; color: #92400e; margin-bottom: 10px; }
.assign-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px dashed #fde68a;
}
.assign-name { font-size: 13px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-sm { width: auto; padding: 4px 8px; font-size: 12.5px; }

.upload-progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.upload-progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s ease; }

@media (max-width: 640px) {
  .ws-grid { grid-template-columns: 1fr; }
  .ws-summary { gap: 8px; }
  .ws-chip { min-width: 72px; padding: 10px 12px; }
}

/* 编剧工作台时间线表单 */
.ws-times { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 2px; }
.ws-time-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ws-time-label { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ws-time-input { flex: 1; max-width: 210px; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fbfcfe; color: var(--text); }
.ws-time-input:disabled { opacity: .55; background: #f3f4f8; }
.btn-sm.disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.ws-reject { font-size: 12px; color: #92400e; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 7px; padding: 6px 9px; }
.ws-status-note { font-size: 12.5px; color: var(--warn); padding: 2px 0; }
.ws-status-note.ok { color: var(--ok); font-weight: 600; }
.ws-review-times { display: flex; flex-wrap: wrap; gap: 6px; }

/* 聚来业务工作台视觉更新：端庄、开阔、适合长时间使用 */
:root {
  --brand: #24577f;
  --brand-dark: #173a5c;
  --brand-soft: #edf3f7;
  --text: #1d2935;
  --text-2: #53616e;
  --muted: #7b8792;
  --border: #dfe5e9;
  --border-strong: #c7d1d8;
  --card: #fff;
  --bg: #f5f6f6;
  --ok: #2f8068;
  --warn: #a8752c;
  --danger: #b94b48;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --shadow-xs: 0 1px 2px rgba(24, 45, 62, .04);
  --shadow: 0 6px 20px rgba(24, 45, 62, .07);
  --shadow-lg: 0 22px 64px rgba(20, 42, 60, .17);
}
body { color: var(--text); background: var(--bg); font-size: 14px; }
.login-bg { background: linear-gradient(135deg, #eef2f4 0%, #fafafa 52%, #f2eee6 100%); }
.login-bg::after { opacity: .28; }
.login-card { border: 1px solid #dfe5e8; border-top: 3px solid var(--brand); box-shadow: 0 22px 65px rgba(25, 49, 67, .12); }
.brand-em { color: var(--brand); }
.topbar { background: rgba(255,255,255,.98); border-bottom: 1px solid #d9e0e4; box-shadow: 0 2px 8px rgba(28,48,63,.045); backdrop-filter: none; }
.topbar-inner { max-width: 1840px; min-height: 72px; }
.topbar-nav { gap: 4px; }
.btn-nav { border-radius: 6px; }
.btn-nav.is-active { color: var(--brand-dark); background: #f0f4f7; box-shadow: inset 0 -2px 0 #c59a55; }
.btn-primary { background: var(--brand); border-color: var(--brand); box-shadow: none; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline { color: var(--brand-dark); border-color: #b9cad6; }
.btn-quiet:hover { color: var(--brand-dark); background: #eef2f5; }
.wrap { max-width: 1840px; padding-left: clamp(18px, 2.4vw, 40px); padding-right: clamp(18px, 2.4vw, 40px); }
.workspace { max-width: 1780px; padding: 28px clamp(18px, 2.4vw, 40px) 64px; }
.ws-head { margin-bottom: 28px; }
.ws-title { font-size: 23px; font-weight: 750; letter-spacing: -.2px; }
.ws-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; margin-bottom: 30px; }
.ws-chip { min-width: 0; padding: 17px 18px; border-radius: 8px; box-shadow: none; border-color: #dde4e8; border-top: 2px solid var(--stage-c, #b7c2c9); gap: 8px; background: #fff; }
.ws-chip-num { font-size: 26px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.ws-chip-label { color: #6d7882; font-size: 12px; letter-spacing: .2px; }
.stage-s0 .ws-chip-num, .stage-s0 { --stage-c: #7f8d99; }
.stage-s1 .ws-chip-num, .stage-s1 { --stage-c: #526b91; }
.stage-s2 .ws-chip-num, .stage-s2 { --stage-c: #397691; }
.stage-s3 .ws-chip-num, .stage-s3 { --stage-c: #ae7b37; }
.stage-s4 .ws-chip-num, .stage-s4 { --stage-c: #427b69; }
.ws-group { margin-bottom: 32px; }
.ws-group-head { padding-bottom: 11px; border-bottom: 1px solid #dbe2e6; margin-bottom: 16px; }
.ws-group-title { color: #304658; font-size: 15px; letter-spacing: .1px; }
.ws-group-count { color: #536575; background: #edf1f3; border-radius: 5px; padding: 2px 8px; }
.ws-grid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.ws-card { border-color: #dce3e7; border-radius: 8px; padding: 18px 19px; box-shadow: 0 2px 7px rgba(30,54,71,.035); gap: 12px; }
.ws-card:hover { border-color: #bdcbd4; box-shadow: 0 10px 26px rgba(28,58,78,.09); transform: translateY(-1px); }
.ws-card-title { font-size: 15px; letter-spacing: -.1px; }
.tag { background: #f0f3f5; color: #596a78; }
.tag-file, .owner-chip { background: var(--brand-soft); color: var(--brand-dark); }
.ws-warn { background: #fbf7ef; border-color: #e8d9bc; }
.modal { border-radius: 13px; }
.modal-head { background: #fff; }
.text-action-modal { width: min(520px, 100%); }
.text-action-body { padding: 18px 20px 12px; }
.text-action-description { color: var(--text-2); margin-bottom: 14px; line-height: 1.6; }
.text-action-input { width: 100%; min-height: 104px; resize: vertical; padding: 10px 12px; }
.text-action-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.text-action-error { color: var(--danger); margin-top: 8px; font-size: 12px; }
@media (max-width: 760px) { .ws-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 工作台时间输入：与明细表 .editable-datetime 一致的原生 datetime-local 外观 */
.ws-time-input { appearance: auto; -webkit-appearance: auto; }
.ws-time-input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

/* ======================================================================
   业务管理：负责人列 / 超期高亮
   ====================================================================== */
.owner-chip {
  display: inline-block; max-width: 100%;
  font-size: 12px; color: var(--brand-dark); background: var(--brand-soft);
  border-radius: 6px; padding: 2px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stage-cell { display: inline-flex; align-items: center; gap: 4px; }
.overdue-flag { font-size: 11px; line-height: 1; }
.grid tbody tr.b-overdue td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}
.grid tbody tr.b-overdue { background: #fff8f8; }

/* 工作台：信息行 / 紧凑卡片 / 危险标签 */
.ws-info { display: flex; flex-direction: column; gap: 3px; }
.ws-info-row { font-size: 12.5px; color: var(--text-2); }
.ws-info-row.overdue { color: var(--danger); font-weight: 600; }
.ws-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ws-card.mini { padding: 12px; gap: 6px; }
.ws-card.mini .ws-card-title { font-size: 13px; font-weight: 600; }
.tag-danger { background: #fef2f2; color: var(--danger); }
.ws-warn.danger { background: #fef2f2; border-color: #fecaca; }
.ws-warn.danger > p { color: #991b1b; }

/* 强制改密提示条 */
.banner-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.banner-danger .btn-outline { border-color: #fca5a5; color: #991b1b; }
.banner-danger .btn-outline:hover { background: #fee2e2; }


/* ======================================================================
   工作台优先：导航切换 / 报题表单 / 队列卡片
   ====================================================================== */
.topbar-nav { display: flex; gap: 6px; margin-left: 18px; }
.btn-nav {
  height: 32px; padding: 0 14px; font-size: 13px; font-weight: 600;
  color: var(--text-2); background: transparent; border: 1px solid transparent; border-radius: 999px;
}
.btn-nav:hover { background: rgba(79, 70, 229, .07); color: var(--brand-dark); }
.btn-nav.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; }

.ws-head { align-items: flex-start; }
.ws-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ws-toolbar { margin-bottom: 16px; }
.ws-chip.is-alert { border-color: #fecaca; background: #fff7f7; }
.ws-chip.is-alert .ws-chip-num { color: var(--danger); }
.ws-group-title.is-alert { color: var(--danger); }
.ws-card.is-alert { border-color: #fecaca; box-shadow: inset 3px 0 0 var(--danger); }

.tag-track { background: #ecfeff; color: #0e7490; font-weight: 600; }
.ws-desc {
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
  background: #f8fafc; border-radius: 7px; padding: 7px 9px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.modal-wide { width: min(560px, 92vw); }
textarea.input { height: auto; padding: 9px 12px; line-height: 1.55; resize: vertical; font-family: inherit; }

@media (max-width: 760px) {
  .topbar-nav { margin-left: 0; order: 3; width: 100%; }
  .topbar-inner { flex-wrap: wrap; }
}

/* 编剧在制分布（提示性，不做配额拦截） */
.ws-load {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 20px;
}
.ws-load-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 13.5px; }
.ws-load-head .muted { font-size: 12px; }
.ws-load-rows { display: flex; flex-direction: column; gap: 6px; }
.ws-load-row {
  display: grid; grid-template-columns: 110px 34px 1fr; align-items: center; gap: 10px;
  font-size: 12.5px; padding: 5px 8px; border-radius: 7px; background: #f8fafc;
}
.ws-load-row.is-busy { background: #fff7ed; }
.ws-load-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-load-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: #fff; background: var(--muted);
}
.ws-load-row.is-busy .ws-load-badge { background: var(--warn); }
.ws-load-books { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* 人员管理：多操作按钮与状态 */
.user-ops { white-space: nowrap; }
.user-ops .btn { margin-left: 4px; padding: 3px 8px; font-size: 12px; }
.mini-table tr.row-disabled td { opacity: .55; }


/* ======================================================================
   品牌标识：logo 图形与可点击首页
   ====================================================================== */
.brand-logo { display: block; flex: none; border-radius: 13px; }
.brand-logo.sm { border-radius: 10px; }
.brand-em { color: var(--brand); font-weight: 800; }
.login-brand .brand-em { color: var(--brand); }

a.topbar-brand {
  text-decoration: none; color: inherit; cursor: pointer;
  padding: 4px 8px 4px 4px; margin-left: -4px; border-radius: 12px;
  transition: background .15s ease;
}
a.topbar-brand:hover { background: rgba(79, 70, 229, .07); }
a.topbar-brand:hover .topbar-titles strong { color: var(--brand-dark); }
a.topbar-brand:active { transform: translateY(.5px); }
a.topbar-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ======================================================================
   统一商务视觉系统 v5
   明亮钴蓝建立可信度，青色用于流程与数据反馈，暖黄色只做关键点缀。
   ====================================================================== */
:root {
  --brand: #2563eb;
  --brand-dark: #1746a2;
  --brand-soft: #eaf2ff;
  --accent: #08a7b5;
  --accent-soft: #e9f9fa;
  --highlight: #f3b33d;
  --bg: #f3f7fc;
  --card: #ffffff;
  --text: #172b4d;
  --text-2: #52647a;
  --muted: #7f8fa4;
  --border: #dfe7f1;
  --border-strong: #c8d5e4;
  --ok: #159a75;
  --warn: #c98218;
  --danger: #d94b4b;
  --info: #1689d8;
  --c-script: #4f6fd9;
  --c-prod: #0f95b7;
  --c-dist: #16956e;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgba(34, 68, 105, .05);
  --shadow: 0 8px 24px rgba(45, 82, 120, .07);
  --shadow-lg: 0 22px 60px rgba(31, 64, 99, .18);
  --topbar-h: 72px;
}

body {
  background:
    radial-gradient(circle at 86% 4%, rgba(8, 167, 181, .06), transparent 24rem),
    linear-gradient(180deg, #f7faff 0, var(--bg) 260px);
  color: var(--text);
}

.input, .select {
  height: 40px; border-color: var(--border-strong); border-radius: 8px;
  background-color: #fff;
}
.input:hover:not(:disabled), .select:hover:not(:disabled) { border-color: #93add0; }
.input:focus, .select:focus, .editable:focus, .editable-select:focus, .editable-date:focus, .editable-datetime:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.btn {
  height: 36px; border-radius: 8px; border-color: var(--border-strong);
  font-weight: 650; box-shadow: none;
}
.btn:hover { background: #f5f8fc; border-color: #aabdd2; transform: none; box-shadow: none; }
.btn-primary, .btn-primary:hover {
  color: #fff; border-color: var(--brand); background: var(--brand);
  box-shadow: 0 5px 14px rgba(37, 99, 235, .18);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand-dark); border-color: #a9c1df; }
.btn-quiet:hover { background: var(--brand-soft); border-color: transparent; }
.icon-btn { border-radius: 8px; }
.icon-btn:hover { background: var(--brand-soft); border-color: #bcd0ea; color: var(--brand); }

.login-bg {
  background:
    radial-gradient(circle at 14% 16%, rgba(8, 167, 181, .23), transparent 27rem),
    radial-gradient(circle at 89% 84%, rgba(37, 99, 235, .16), transparent 30rem),
    linear-gradient(145deg, #eff8ff 0%, #f8fbff 52%, #edf5ff 100%);
}
.login-bg::after {
  opacity: .32; background-size: 54px 54px;
  background-image: linear-gradient(rgba(37,99,235,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.09) 1px, transparent 1px);
}
.login-card {
  width: min(440px, 100%); padding: 34px 34px 30px;
  border: 1px solid rgba(188, 207, 229, .85); border-top: 0; border-radius: 16px;
  box-shadow: 0 28px 80px rgba(34, 76, 124, .17);
}
.login-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  border-radius: 16px 16px 0 0; background: linear-gradient(90deg, var(--brand), var(--accent));
}
.login-brand { margin-bottom: 28px; }
.login-brand h1 { font-size: 21px; letter-spacing: .1px; }
.login-sub { margin-top: 4px; color: #718398; }
.pw-toggle { width: 44px; right: 3px; font-size: 11px; font-weight: 700; color: var(--brand); }
.pw-wrap .input { padding-right: 52px; }

.topbar {
  height: var(--topbar-h); background: rgba(255, 255, 255, .96);
  border: 0; border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 14px rgba(39, 77, 116, .055);
}
.topbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, #2780e8 48%, var(--accent) 100%);
}
.topbar-inner { min-height: 72px; padding-top: 3px; gap: 18px; }
.topbar-titles strong { font-size: 16px; letter-spacing: .1px; }
.topbar-sub { margin-top: 3px; color: #8090a3; }
a.topbar-brand { border-radius: 9px; }
a.topbar-brand:hover { background: #f2f7fd; }
.topbar-status { background: #f4f8fc; border-color: #e0e8f1; border-radius: 7px; }
.topbar-nav { margin-left: 18px; gap: 2px; padding: 4px; border-radius: 9px; background: #f2f6fb; }
.btn-nav { height: 34px; min-width: 82px; padding: 0 14px; border: 0; border-radius: 7px; color: #5b6c80; }
.btn-nav:hover { color: var(--brand-dark); background: #fff; }
.btn-nav.is-active { color: var(--brand-dark); background: #fff; border: 0; box-shadow: 0 2px 8px rgba(45, 82, 120, .10); }
.user-chip { border-radius: 9px; background: #f8fafc; padding-right: 11px; }
.avatar { border-radius: 7px; background: linear-gradient(145deg, var(--brand), var(--accent)); }

.workspace { max-width: 1780px; padding-top: 30px; }
.ws-head {
  position: relative; overflow: hidden; align-items: center; margin-bottom: 20px;
  padding: 22px 24px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
}
.ws-head::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}
.ws-title { font-size: 24px; font-weight: 760; color: var(--text); letter-spacing: -.35px; }
.ws-sub { margin-top: 4px; font-size: 13px; color: #75869a; }
.ws-summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.ws-chip {
  min-height: 94px; padding: 17px 18px; border: 1px solid var(--border);
  border-top: 3px solid var(--stage-c, #9aa9ba); border-radius: 10px;
  background: #fff; box-shadow: 0 5px 18px rgba(44, 79, 116, .055);
}
.ws-chip-num { font-size: 28px; font-weight: 760; }
.ws-chip-label { font-size: 12.5px; color: #65778c; }
.stage-s0 .ws-chip-num, .stage-s0 { --stage-c: #8494a7; }
.stage-s1 .ws-chip-num, .stage-s1 { --stage-c: #5b6fd8; }
.stage-s2 .ws-chip-num, .stage-s2 { --stage-c: #1594bd; }
.stage-s3 .ws-chip-num, .stage-s3 { --stage-c: #e49a28; }
.stage-s4 .ws-chip-num, .stage-s4 { --stage-c: #1a9a72; }
.ws-chip:nth-child(1), .ws-chip:nth-child(9) { border-top-color: #8494a7; background: linear-gradient(180deg, #fff, #f8fafc); }
.ws-chip:nth-child(2) { border-top-color: #5b6fd8; background: linear-gradient(180deg, #fff, #f6f7ff); }
.ws-chip:nth-child(3) { border-top-color: #796bd7; background: linear-gradient(180deg, #fff, #f8f6ff); }
.ws-chip:nth-child(4), .ws-chip:nth-child(5) { border-top-color: #1594bd; background: linear-gradient(180deg, #fff, #f2fbfd); }
.ws-chip:nth-child(6) { border-top-color: #e49a28; background: linear-gradient(180deg, #fff, #fff9ee); }
.ws-chip:nth-child(7) { border-top-color: #08a7b5; background: linear-gradient(180deg, #fff, #f0fbfb); }
.ws-chip:nth-child(8) { border-top-color: #1a9a72; background: linear-gradient(180deg, #fff, #f1faf7); }
.ws-clear { position: relative; padding-left: 20px; color: #527064; }
.ws-clear::before { content: ""; position: absolute; left: 2px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(21,154,117,.12); }
.ws-group { margin-bottom: 32px; }
.ws-group-head { padding: 0 2px 11px; border-bottom: 1px solid #dbe5ef; }
.ws-group-title { font-size: 16px; color: #243b5a; }
.ws-group-count { color: var(--brand-dark); background: var(--brand-soft); border-radius: 6px; }
.ws-card {
  padding: 18px 19px; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(44, 79, 116, .045); background: #fff;
}
.ws-card:hover { border-color: #b6cae1; box-shadow: 0 10px 28px rgba(38, 83, 130, .10); }
.ws-card.is-clickable { cursor: pointer; }
.ws-card.is-clickable:focus-visible {
  outline: 3px solid rgba(47, 100, 232, .24);
  outline-offset: 2px;
  border-color: var(--primary);
}
.ws-card.is-clickable .ws-card-actions { cursor: default; }
.ws-chip.is-clickable { cursor: pointer; }
.ws-chip.is-clickable:hover { border-color: #b6cae1; box-shadow: 0 8px 22px rgba(38, 83, 130, .08); }
.ws-chip.is-clickable:focus-visible {
  outline: 3px solid rgba(47, 100, 232, .24);
  outline-offset: 2px;
}
.assign-row.is-clickable { cursor: pointer; border-radius: 6px; }
.assign-row.is-clickable:hover { background: #f4f8fd; }
.assign-row.is-clickable:focus-visible { outline: 3px solid rgba(47, 100, 232, .24); outline-offset: 1px; }
.ws-book-link {
  appearance: none;
  border: 0;
  padding: 2px 4px;
  margin: -2px -4px;
  background: transparent;
  color: #315f9d;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.ws-book-link:hover { color: var(--primary); background: #edf4ff; }
.ws-book-link:focus-visible { outline: 2px solid rgba(47, 100, 232, .32); outline-offset: 1px; }
.ws-card-title { color: #203754; font-size: 15px; }
.tag { color: #526981; background: #eff4f9; border-radius: 5px; }
.tag-file, .owner-chip { color: #0a7783; background: var(--accent-soft); }
.ws-desc, .ws-load-row { background: #f6f9fc; }
.ws-load { box-shadow: var(--shadow-xs); }

.wrap { max-width: 1840px; padding-top: 26px; }
.flow { gap: 12px; margin-bottom: 18px; }
.flow-card {
  padding: 18px 20px 16px; border-radius: 11px; box-shadow: var(--shadow-xs);
  border-color: var(--border);
}
.flow-card:hover { transform: none; border-color: #b8cce3; box-shadow: var(--shadow); }
.flow-card::before { width: 5px; }
.fc-top { color: #40566f; }
.fc-icon {
  width: 27px; height: 27px; display: inline-grid; place-items: center;
  border-radius: 7px; color: #fff; font-size: 10px; letter-spacing: .3px;
  background: var(--c-script);
}
.flow-card.s2 .fc-icon { background: var(--c-prod); }
.flow-card.s3 .fc-icon { background: var(--c-dist); }
.flow-arrow { color: #94a9bf; }
.fc-bar { background: #eaf0f6; }

.kpis { gap: 12px; margin-bottom: 18px; }
.kpi {
  min-height: 105px; border-radius: 11px; border-color: var(--border);
  box-shadow: var(--shadow-xs); padding: 16px 18px;
}
.kpi:hover { transform: none; border-color: #bccfe3; box-shadow: var(--shadow); }
.kpi-label { color: #5d7086; }
.kpi-value { color: #203b5d; }
.kpi.star { background: #fff; border-color: #cbdcf0; }
.kpi.star::after { border-radius: 5px; color: var(--brand-dark); background: var(--brand-soft); }

.view-tabs {
  width: fit-content; max-width: 100%; padding: 5px; gap: 3px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  box-shadow: var(--shadow-xs);
}
.view-tabs .tab {
  border: 0; border-radius: 7px; padding: 8px 16px; color: #5a6c81;
  background: transparent; box-shadow: none;
}
.view-tabs .tab:hover { transform: none; background: #f2f6fb; box-shadow: none; }
.view-tabs .tab.active {
  color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(37,99,235,.18);
}
.filters {
  padding: 13px 15px; border-radius: 11px; border-color: var(--border);
  box-shadow: var(--shadow-xs); background: #fff;
}
.search-icon {
  left: 12px; width: 13px; height: 13px; border: 1.8px solid #75889d;
  border-radius: 50%; opacity: 1;
}
.search-icon::after {
  content: ""; position: absolute; width: 6px; height: 1.8px; right: -5px; bottom: -2px;
  border-radius: 2px; background: #75889d; transform: rotate(45deg);
}
.table-card { border-radius: 11px; border-color: #d9e4ef; box-shadow: var(--shadow); }
.grid thead th { background: #f4f7fb; color: #63758a; border-bottom-color: #d9e4ef; }
.grid thead th.grp { background: #edf3f9; color: #40566f; }
.grid tbody td, .grid tbody td.cell-spacer { border-bottom-color: #edf1f5; }
.grid tbody tr:hover { background: #f6faff; }
.grid tbody tr.row-active { background: #edf4ff; }
.drama-name:hover { color: var(--brand-dark); text-decoration: none; }
.badge { border-radius: 5px; }
.duration-pill { border-radius: 5px; background: #eef3f7; }

.drawer { box-shadow: -24px 0 70px rgba(28, 62, 94, .20); }
.drawer-head, .drawer-foot, .modal-head { background: #f7f9fc; }
.seg { border-radius: 9px; }
.seg-head { background: #f4f7fa; }
.seg-icon {
  width: 24px; height: 24px; display: inline-grid; place-items: center;
  border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); font-size: 11px;
}
.metric { background: #f8fafc; }
.metric:hover { border-color: #aec4dc; }
.modal { border: 1px solid #d9e3ed; border-radius: 12px; }
.modal-mask { background: rgba(20, 40, 64, .42); }
.toast { border-radius: 8px; background: rgba(23, 43, 70, .96); }
.confirm-pop, .col-pop { border-radius: 10px; }
.mini-table th { background: #f3f7fb; }

@media (max-width: 860px) {
  .topbar::before { height: 2px; }
  .topbar-nav { margin-left: 0; width: 100%; }
  .ws-head { padding: 18px; }
  .ws-title { font-size: 21px; }
}

/* ======================================================================
   v8 状态机：创作子阶段 / 两轮审核
   ====================================================================== */
.ws-creative-stage { display: flex; gap: 6px; margin: 2px 0; }
.btn-stage {
  flex: 1; height: 26px; font-size: 12px; font-weight: 600;
  color: var(--text-2); background: #f1f3f9; border: 1px solid transparent; border-radius: 7px;
  cursor: pointer; transition: all .15s ease;
}
.btn-stage:hover { background: #e6e9f4; }
.btn-stage.is-active { background: var(--brand); color: #fff; }
.ws-extra-info { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-revision { background: #fff7ed; color: #c2410c; font-weight: 600; }
