:root {
  --bg: #f5f6f8; --panel: #ffffff; --line: #e5e7eb;
  --txt: #1f2329; --muted: #8a919f; --brand: #185fa5; --brand-soft: #e6f1fb;
  --danger: #a32d2d; --ok: #0f6e56; --warn: #854f0b; --warn-bg: #faeeda;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: var(--bg); color: var(--txt); font-size: 14px; }
.hidden { display: none !important; }
button { font-family: inherit; }

/* Logo */
.login-logo-img { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 auto 18px; }
.login-card h1 { font-size: 17px; font-weight: 500; letter-spacing: 1px; }
.side-brand { padding: 16px 14px 14px; }
.side-logo { display: block; width: 100%; max-width: 172px; height: auto; }
.topbar-title { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.topbar-logo { width: 20px; height: 20px; object-fit: contain; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 40px 36px; text-align: center; }
.login-logo { width: 56px; height: 56px; margin: 0 auto 14px; background: var(--brand); color: #fff; border-radius: 12px; font-size: 22px; font-weight: 500; line-height: 56px; }
.login-card h1 { font-size: 18px; font-weight: 500; }
.login-sub { color: var(--muted); font-size: 12px; margin: 6px 0 24px; }
.login-card input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; margin-bottom: 12px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: var(--brand); }
.login-card button { width: 100%; height: 42px; background: var(--brand); color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }
.login-card button:hover { filter: brightness(1.08); }
.login-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; flex-shrink: 0; background: #fbfbfc; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { padding: 18px 16px 14px; font-size: 15px; font-weight: 500; color: var(--brand); border-bottom: 1px solid var(--line); }
.nav-group { padding: 10px 8px 0; }
.nav-group-title { font-size: 12px; color: var(--muted); padding: 4px 10px; }
.nav-item { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--txt); }
.nav-item:hover { background: #f0f2f5; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.side-foot { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.side-foot #whoami { margin-bottom: 6px; color: var(--muted); }
.linklike { display: inline-block; background: none; border: none; color: var(--brand); cursor: pointer; font-size: 12.5px; padding: 2px 8px 2px 0; }

.main { flex: 1; min-width: 0; padding: 20px 24px 60px; }

/* 页面 */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 17px; font-weight: 500; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-input { height: 34px; width: 240px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 13px; }
.btn { height: 34px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 13px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card .v { font-size: 22px; font-weight: 500; color: var(--brand); }
.card .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.section h3 { font-size: 14px; font-weight: 500; margin-bottom: 12px; }

/* 表格 */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
table.grid { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 12.5px; }
table.grid th { position: sticky; top: 0; background: #f7f8fa; text-align: center; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; font-weight: 500; color: #444; }
table.grid th:hover { color: var(--brand); }
table.grid td { padding: 7px 10px; border-bottom: 1px solid #f0f1f3; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; text-align: center; vertical-align: middle; }
table.grid tr:hover td { background: #f8faff; }
table.grid td.num { text-align: center; font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; text-align: center; }
.row-actions button { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 12.5px; padding: 2px 6px; }
.row-actions button.del { color: var(--danger); }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 4px; font-size: 13px; color: var(--muted); }
.pager button { height: 28px; min-width: 28px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }
.total-note { color: var(--muted); font-size: 12.5px; margin: 8px 2px; }

/* 表用途说明 */
.table-desc { margin-top: 8px; max-width: 760px; font-size: 12.5px; color: #5b6472; line-height: 1.7; background: #f7f9fc; border-left: 3px solid var(--brand); padding: 8px 12px; border-radius: 0 6px 6px 0; }
.table-desc b { color: var(--brand); margin-right: 8px; font-weight: 500; }
.table-desc .owner { display: inline-block; margin-left: 8px; color: var(--muted); }

/* 项目全景信息条 */
.metaline { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 16px; }
.metaline .kv { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; font-size: 12.5px; }
.metaline .kv b { color: var(--muted); font-weight: normal; margin-right: 6px; }

/* 可点击跳转的行 */
tr.clickable, td.linkcell { cursor: pointer; }
td.linkcell { color: var(--brand); }
tr.clickable:hover td { background: #f0f6fd; }

/* 空状态 */
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 48px 20px; text-align: center; }
.empty-title { font-size: 14px; margin-bottom: 6px; }
.empty-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

/* 预设视图筛选 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font-size: 12.5px; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 500; }

/* 表单折叠区 */
.more-toggle { margin: 14px 0 10px; font-size: 12.5px; color: var(--brand); cursor: pointer; user-select: none; }
.more-toggle:hover { text-decoration: underline; }

/* 侧边栏二级标题 */
.nav-sub { font-size: 11.5px; color: var(--muted); padding: 8px 12px 2px; }
.nav-sub.foldable { cursor: pointer; user-select: none; }
.nav-sub.foldable:hover { color: var(--brand); }
.foldmark { font-size: 11px; }

/* 区块折叠：点标题收起 / 展开（长表格、平时不看的区块用） */
.section > h3.foldable { cursor: pointer; user-select: none; }
.section > h3.foldable:hover { color: var(--brand); }
.section.folded > .fold-body { display: none; }
.section.folded > h3 { margin-bottom: 0; }
.section > h3 > .foldmark { display: inline-block; min-width: 12px; color: var(--muted); }

/* 状态徽标 */
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.over { background: #fcebeb; color: var(--danger); }
.badge.ok { background: #e1f5ee; color: var(--ok); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px; z-index: 50; }
.modal { background: var(--panel); border-radius: 12px; width: 640px; max-width: 100%; max-height: 80vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.icon-btn { border: none; background: none; font-size: 15px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); text-align: right; display: flex; gap: 10px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.form-item label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.form-item input, .form-item select { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; font-size: 13px; }
.form-item input:focus, .form-item select:focus { outline: none; border-color: var(--brand); }
.form-item.wide { grid-column: 1 / -1; }
.form-item .hint { color: var(--brand); font-size: 11px; font-weight: normal; }
.form-item select { background: #fff; }

/* ================= v8：按职位、按项目 ================= */

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 12px; margin: -20px -24px 18px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-title { font-size: 13px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; font-size: 18px; }

/* 卡片强调 */
.card.danger .v { color: var(--danger); }
.badge.doing { background: #e6f1fb; color: var(--brand); }
.badge.done { background: #eef0f3; color: #5b6472; }

/* 「我要填的」大卡片 */
.formcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.formcard { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fcfdff; }
.formcard:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(24,95,165,.07); }
.fc-icon { font-size: 22px; line-height: 1.2; }
.fc-main { flex: 1; min-width: 0; }
.fc-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.fc-hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.fc-acts { display: flex; flex-direction: column; gap: 6px; }
.fc-acts .btn { height: 30px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; }

/* 项目总览 */
.pfilter { display: flex; gap: 8px; margin-bottom: 14px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; transition: .12s; }
.pcard:hover { border-color: var(--brand); box-shadow: 0 3px 14px rgba(24,95,165,.1); transform: translateY(-1px); }
.pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
/* 编号只作辅助标识：缩小、浅色、等宽数字。项目名称才是主位（见 .pc-name） */
.pc-id { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; opacity: .85; }
.pc-name { font-size: 15px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pc-dates { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pc-money { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #5b6472; border-top: 1px dashed var(--line); padding-top: 8px; }
.pc-money b { font-weight: 500; color: var(--txt); }
.pc-money .warn b { color: var(--danger); }
.pc-money .ok b { color: var(--ok); }
.pc-money .danger b { color: var(--danger); }

/* 项目页标签 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tab { border: none; background: none; padding: 9px 16px; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }

/* 表格「所属项目」列 */
table.grid td.pc a { color: var(--brand); cursor: pointer; }
table.grid td.pc a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* 看板两栏 */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.barrow, .mrow { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.barrow .bl, .mrow .ml { width: 76px; flex-shrink: 0; color: #5b6472; }
.btrack, .mtrack { flex: 1; height: 9px; background: #f0f1f3; border-radius: 5px; overflow: hidden; }
.mtrack { flex: 1; }
.btrack i, .mtrack i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.mtrack i.cost { background: #d98b3a; }
.bv, .mv { width: 132px; flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; color: #5b6472; }
.mrow { gap: 6px; }
.mrow .mv { width: 210px; }

/* 提示条 */
.tipbar { background: #eef6ff; border: 1px solid #cfe3f8; color: #1c4f80; border-radius: 8px; padding: 9px 13px; font-size: 12.5px; line-height: 1.6; margin-bottom: 12px; }

/* ================= 操作日志 + 安全检查 ================= */
/* 操作日志：变更内容列窄一点，长文本靠 title 提示 */
table.grid td.chg { max-width: 380px; font-size: 12.5px; line-height: 1.5; word-break: break-all; }
/* 安全检查：一行一项，左边徽标右边说明 */
.sec-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid var(--line, #eef0f3); }
.sec-row:last-child { border-bottom: 0; }
.sec-row .badge { flex: 0 0 auto; margin-top: 1px; }
.sec-row b { font-weight: 600; }
.sec-row .muted { font-size: 12.5px; line-height: 1.6; margin-top: 2px; }
/* 看板卡片的口径提示：小问号 = "鼠标悬停能看这个数字是怎么来的" */
.qmark { display: inline-block; width: 13px; height: 13px; line-height: 13px; text-align: center;
  border-radius: 50%; background: #dfe4ea; color: #5b6472; font-size: 10px; cursor: help; vertical-align: 1px; }
.card { cursor: default; }

/* ================= 「今天干了什么」的当天进度条 ================= */
.daybar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f7f9fc; border: 1px solid #e3e9f2; border-radius: 8px; padding: 9px 13px; margin-bottom: 12px; font-size: 12.5px; }
.daybar .db-l { color: #5b6472; }
.daybar .db-v b { font-size: 15px; color: #1f3864; }
.daybar .db-t { color: #5b6472; }
.daybar .db-t.ok { color: #1e6b34; font-weight: 600; }
.daybar .db-t.warn { color: #a33; font-weight: 600; }
.daybar .db-track { flex: 1 1 120px; min-width: 100px; height: 6px; background: #e6ebf2; border-radius: 3px; overflow: hidden; }
.daybar .db-track i { display: block; height: 100%; background: var(--brand, #2f5597); }
.daybar.full { background: #f1faf5; border-color: #cfe9da; }
.daybar.full .db-track i { background: #1e6b34; }
.daybar.over { background: #fdf3e7; border-color: #f0d9b5; }
.daybar.over .db-track i { background: #c98a1a; }
.dform .fhint { font-size: 11px; color: #8a93a3; margin-top: 3px; }

/* ================= v9：就地编辑 + 剧本进度 ================= */

/* 单元格直接改 */
table.grid td.editable { cursor: cell; }
table.grid td.editable:hover { background: #eef6ff; box-shadow: inset 0 0 0 1px #bcd9f5; }
table.grid td.editing { padding: 2px 4px; background: #fff; box-shadow: inset 0 0 0 2px var(--brand); }
table.grid td.saving { opacity: .55; }
table.grid td.saved { background: #e6f7ef; box-shadow: inset 0 0 0 1px #9fd9c0; }
.cell-input { width: 100%; min-width: 90px; height: 30px; border: 1px solid var(--brand); border-radius: 6px; padding: 0 7px; font-size: 12.5px; font-family: inherit; background: #fff; text-align: center; }
select.cell-input { min-width: 150px; }
.edit-hint { font-size: 12px; color: var(--muted); padding: 8px 2px 0; }
a.pjlink { color: var(--brand); cursor: pointer; }
a.pjlink:hover { text-decoration: underline; }

/* 项目页快改条 */
.quickbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: #f7f9fc; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 9px 13px; margin-bottom: 12px; }
.qb-label { font-size: 12.5px; color: var(--brand); font-weight: 500; }
.qb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.qb select, .qb input { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 12.5px; font-family: inherit; background: #fff; }
.qb select { min-width: 140px; }

/* 剧本总览 */
.scard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.scard.clickable { cursor: pointer; transition: .12s; }
.scard.clickable:hover { border-color: var(--brand); box-shadow: 0 3px 14px rgba(24,95,165,.1); transform: translateY(-1px); }
.sc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sc-id { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-name { font-size: 14px; font-weight: 500; line-height: 1.45; margin-bottom: 8px; }
.sc-row { font-size: 12.5px; color: #5b6472; margin-bottom: 4px; }
.sc-k { display: inline-block; width: 62px; color: var(--muted); }
.sc-prog { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.ptrack { flex: 1; height: 8px; background: #eef0f3; border-radius: 5px; overflow: hidden; }
.ptrack i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.sc-pct { font-size: 12px; color: var(--brand); font-variant-numeric: tabular-nums; }
.sc-note { font-size: 12px; color: #5b6472; background: #f7f9fc; border-radius: 6px; padding: 7px 10px; margin-top: 6px; line-height: 1.6; }
.wlist { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip { font-size: 12.5px; border-radius: 14px; padding: 4px 12px; background: #eef0f3; color: #5b6472; }
.wchip.ok { background: #e1f5ee; color: var(--ok); }
.wchip.warn { background: var(--warn-bg); color: var(--warn); }

/* ================= v10：工作日历 + 剧本来源 ================= */

/* 工作日历矩阵 */
.ts-wrap { overflow: auto; max-height: 74vh; }
table.ts-table { font-size: 12px; }
table.ts-table th, table.ts-table td { padding: 3px 4px; }
table.ts-table th.ts-name, table.ts-table td.ts-name { position: sticky; left: 0; z-index: 2; background: #fff; width: 96px; min-width: 96px; max-width: 96px; font-weight: 500; text-align: center; white-space: normal; }
table.ts-table thead th.ts-name { background: #f7f8fa; z-index: 3; }
table.ts-table td.ts-name small { display: block; color: var(--muted); font-size: 11px; font-weight: normal; }
table.ts-table th.ts-dept, table.ts-table td.ts-dept { position: sticky; left: 96px; z-index: 2; background: #fff; color: var(--muted); width: 108px; min-width: 108px; max-width: 108px; text-align: center; white-space: normal; }
table.ts-table thead th.ts-dept { background: #f7f8fa; z-index: 3; }
table.ts-table th.ts-day { text-align: center; min-width: 40px; cursor: default; font-variant-numeric: tabular-nums; }
table.ts-table th.ts-day small { color: var(--muted); font-weight: normal; }
table.ts-table th.ts-day.we, table.ts-table td.ts-cell.we { background: #fafbfc; }
table.ts-table th.ts-day.today { background: #e6f1fb; color: var(--brand); }
table.ts-table td.ts-cell { text-align: center; cursor: pointer; padding: 2px; }
table.ts-table td.ts-cell:hover { background: #eef6ff; box-shadow: inset 0 0 0 1px #bcd9f5; }
table.ts-table td.ts-cell.empty::after { content: ""; display: block; height: 20px; }
table.ts-table td.ts-sum { text-align: center; font-variant-numeric: tabular-nums; color: #5b6472; }
.ts-chip { display: inline-block; min-width: 32px; max-width: 62px; padding: 2px 5px; border-radius: 5px; font-size: 11px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-chip i { font-style: normal; opacity: .7; margin-left: 2px; }
/* 剧本写作打卡（编剧不写日报）：白底蓝框，跟"有工时的项目格"区分开 */
.ts-chip.script { background: #fff; border: 1px dashed #7aa7d9; color: #2b5c93; }
table.ts-table td.ts-cell.script { background: #f6faff; }
.ts-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; font-size: 12px; color: #5b6472; }
.ts-lg { display: inline-flex; align-items: center; gap: 5px; }
.ts-lg i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid; display: inline-block; }
.dc-list { display: grid; gap: 8px; }
.dc-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fcfdff; }
.dc-main { flex: 1; font-size: 13px; }
.dc-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* 剧本来源标签 */
.pc-src { display: inline-block; background: #eef6ff; color: #1c4f80; border-radius: 5px; padding: 2px 8px; font-size: 11.5px; margin-bottom: 6px; }

/* 剧本来源 / 作者 */
.si-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.si { font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.si-k { color: var(--muted); font-size: 12.5px; min-width: 84px; }

/* 表单字段说明 */
.fhint { display: block; color: #8a919f; font-size: 11.5px; font-weight: normal; margin-top: 2px; line-height: 1.5; }

/* 极简日报 */
.dform { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 16px; }
.df-item { display: flex; flex-direction: column; gap: 6px; }
.df-item label { font-size: 12.5px; color: var(--muted); }
.df-item input, .df-item select { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 14px; font-family: inherit; background: #fff; }
.df-item select { height: 44px; }
.df-item input:focus, .df-item select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24,95,165,.12); }
.df-wide { grid-column: 1 / -1; }
.btn.big { height: 44px; padding: 0 26px; font-size: 15px; }
.dlist { display: grid; gap: 8px; }
.drow { display: grid; grid-template-columns: 84px 140px 96px 120px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fcfdff; font-size: 13px; }
.drow-p { font-weight: 500; color: var(--brand); }
.drow-h { font-variant-numeric: tabular-nums; }
.drow-n { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow-a { display: flex; gap: 6px; }
.drow-a .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.warn-t { color: var(--warn); font-style: normal; }

/* 人事看板 */
.bday-today { display: flex; flex-wrap: wrap; gap: 10px; }
.bday-chip { background: #fff4e5; color: #8a5200; border: 1px solid #f5d9ab; border-radius: 16px; padding: 6px 14px; font-size: 13px; }
.section.danger-sec h3 { color: var(--danger); }

/* 项目状态：卡片右上角点开就能改 */
select.pc-status {  -webkit-appearance: none; appearance: none; border: 0; outline: none;
  font-family: inherit; font-size: 11.5px; line-height: 1.5; cursor: pointer;
  padding: 3px 20px 3px 10px; border-radius: 10px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M0 0l4.5 6L9 0z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
select.pc-status:hover { box-shadow: 0 0 0 2px rgba(24,95,165,.18); }
select.pc-status.doing { background-color: #e6f1fb; color: var(--brand); }
select.pc-status.done { background-color: #e1f5ee; color: var(--ok); }
select.pc-status.warn { background-color: var(--warn-bg); color: var(--warn); }
select.pc-status.over { background-color: #fcebeb; color: var(--danger); }

/* 看板里的项目链接 */
a.pjlink2 { color: var(--brand); cursor: pointer; }
a.pjlink2:hover { text-decoration: underline; }

/* 看板里的日期格 */
input.mini-date { border: 1px solid var(--line); border-radius: 12px; padding: 3px 8px; font-size: 11.5px; font-family: inherit; background: #fff; cursor: pointer; color: #5b6472; width: 118px; }
input.mini-date:hover { border-color: var(--brand); }
input.mini-date:disabled { opacity: .5; }
.fl-old { font-size: 12.5px; color: #5b6472; background: #f7f9fc; border-radius: 6px; padding: 8px 10px; line-height: 1.6; white-space: pre-wrap; max-height: 140px; overflow: auto; }
.follow-btn { margin-right: 6px; }

/* 看板里的状态下拉 */
select.mini-status { -webkit-appearance: none; appearance: none; border: 1px solid var(--line); border-radius: 12px; padding: 3px 10px; font-size: 11.5px; font-family: inherit; background: #fff; cursor: pointer; max-width: 160px; }
select.mini-status:hover { border-color: var(--brand); }
select.mini-status:disabled { opacity: .5; }

/* 小按钮（看板里每行的操作） */
.btn.mini { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn.mini.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.mini.primary:hover { filter: brightness(1.08); }

/* 项目卡片底部 + 删除对话框 */
.pc-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.pc-open { font-size: 12px; color: var(--brand); }
.pc-del { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit; padding: 2px 6px; border-radius: 5px; }
.pc-del:hover { color: var(--danger); background: #fcebeb; }
.del-head { margin-bottom: 14px; }
.del-name { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.del-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.del-links { display: flex; flex-wrap: wrap; gap: 8px; }
.del-chip { background: #f0f2f5; border-radius: 14px; padding: 4px 12px; font-size: 12.5px; color: #5b6472; }
.del-chip b { color: var(--txt); }
.del-opts { display: grid; gap: 10px; }
.del-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; cursor: pointer; background: #fcfdff; }
.del-opt:hover { border-color: var(--brand); }
.del-opt input { margin-top: 3px; }
.del-opt b { font-size: 13.5px; font-weight: 500; display: block; }
.del-opt small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.del-pick { margin: -4px 0 2px 38px; }
.del-pick select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13px; font-family: inherit; max-width: 100%; }

/* 批量选项目 */
.pcard { position: relative; }
.pcard .pc-ck { position: absolute; top: 10px; left: 10px; z-index: 2; }
.pcard .pc-ck input { width: 16px; height: 16px; cursor: pointer; }
.pcard.picked { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24,95,165,.22); }
.pc-hint { font-size: 11.5px; color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 4px 8px; margin-bottom: 8px; line-height: 1.5; }

/* 批量改 */
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #eef6ff; border: 1px solid #cfe3f8; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px; color: #1c4f80; }
.bulkbar select, .bulkbar input { height: 30px; border: 1px solid #cfe3f8; border-radius: 6px; padding: 0 8px; font-size: 12.5px; font-family: inherit; background: #fff; }
.bulkbar input { width: 200px; }
.bulkbar .btn { height: 30px; }
th.ckcol, td.ckcol { width: 34px; text-align: center; padding: 2px 4px; }
th.ckcol input, td.ckcol input { cursor: pointer; }

/* 快捷录入 */
.qadd { display: grid; gap: 8px; }.qitem { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: #fcfdff; border-radius: 9px; padding: 11px 14px; cursor: pointer; }
.qitem:hover { border-color: var(--brand); background: var(--brand-soft); }
.qi-icon { font-size: 19px; }
.qi-txt b { font-size: 13.5px; font-weight: 500; }
.qi-txt small { color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 1000px) { .cols2 { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .dform { grid-template-columns: 1fr 1fr; }
  .drow { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .drow-n { grid-column: 1 / -1; white-space: normal; }
  .drow-a { grid-column: 1 / -1; justify-content: flex-end; }
  .btn.big { width: 100%; }
  .app { flex-direction: column; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; height: 100vh; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,.2); }
  .main { padding: 14px; }
  .topbar { margin: -14px -14px 14px; padding: 10px 14px; }
  .menu-btn { display: block; }
  .global-search { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .formcards, .pgrid { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
}

/* ---------- ③ 项目总览：业务分类标签（原创自制 / 剧本销售 / 承制 / TVC / 样片） ---------- */
.pf-label { font-size: 12.5px; color: var(--muted); align-self: center; margin-right: 2px; }
.cattag { display: inline-block; font-size: 12px; line-height: 20px; height: 22px; padding: 0 8px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--txt); margin: 4px 0 2px; }
select.cattag { cursor: pointer; padding: 0 4px; }
.cattag.cat-orig { background: #e8f3ff; border-color: #bcd8f5; color: #14508c; }
.cattag.cat-sell { background: #fff2e0; border-color: #f3d6a8; color: #8a5a12; }
.cattag.cat-contract { background: #eaf6ee; border-color: #bfe0cb; color: #0f6e56; }
.cattag.cat-tvc { background: #f2ecff; border-color: #d8ccf5; color: #4b3a8f; }
.cattag.cat-sample { background: #fdeef2; border-color: #f2c9d6; color: #93304f; }
.cattag.cat-other { background: #f2f3f5; border-color: #dfe1e6; color: #4a5568; }
.cattag.cat-none { background: #fff; border-style: dashed; color: var(--muted); }

/* 副本剧本流程 */
.wf-members { border:1px solid var(--line,#ddd); border-radius:8px; padding:14px; margin:16px 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; }
.wf-members label { display:flex; align-items:center; gap:6px; }
.wf-members input { width:auto; margin:0; }
.wf-error { color:var(--danger,#b42318); }
#modal-body > label, #modal-body .form-grid > label { display:flex; flex-direction:column; gap:8px; margin:10px 0; font-weight:500; }
#modal-body label > input:not([type=checkbox]), #modal-body label > select, #modal-body label > textarea {
  width:100%; box-sizing:border-box; min-height:40px; padding:9px 11px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--txt); font:inherit;
}
#modal-body label > input:disabled { background:#f5f6f8; }
#modal-body label > textarea { resize:vertical; min-height:90px; }
#np-preview { margin-top:14px; padding:14px; border:1px solid #c8ddef; border-radius:8px; background:#f4f9fe; line-height:1.65; }
#np-preview b { color:var(--txt); font-size:15px; }
#np-preview p { margin:5px 0; }
.scard a[data-script] { color:var(--brand); text-decoration:none; }
.scard h3 { margin:10px 0; line-height:1.5; }
.scard .sc-row, .scard > .muted { margin:6px 0; line-height:1.55; }

.production-overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px}.production-overview-card{padding:18px;border:1px solid var(--border,#dfe5ed);border-radius:12px;background:#fafcff}.production-overview-card h3{line-height:1.5}.production-meter{display:grid;grid-template-columns:70px minmax(60px,1fr) 82px;gap:10px;align-items:center;margin:15px 0;font-size:13px}.production-meter b{text-align:right;font-weight:500}.production-track{height:10px;background:#e8edf4;border-radius:6px;overflow:hidden}.production-track i{display:block;height:100%;border-radius:6px}
