:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --border: #e5e9f0;
  --border-strong: #d4dae5;
  --text: #1f2937;
  --text-soft: #5b6675;
  --text-mute: #93a0b2;
  --primary: #2563eb;
  --primary-dark: #1e4fc4;
  --primary-soft: #eaf1ff;
  --accent: #0ea5a4;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #d97706;
  --ok: #16a34a;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .04);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.hidden { display: none !important; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #0ea5a4 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 420px; background: var(--panel);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.18); overflow: hidden;
}
.login-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 26px 30px; background: #fff;
  border-bottom: 1px solid var(--border);
}
.login-brand-img { display: block; width: 100%; max-width: 340px; height: auto; }
.login-logo {
  width: 48px; height: 48px; border-radius: 12px; flex: 0 0 auto;
  background: var(--primary); color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-brand h1 { margin: 0; font-size: 22px; }
.login-brand p { margin: 2px 0 0; color: var(--text-soft); font-size: 13px; }
.login-body { padding: 28px 32px 32px; }
.login-body h2 { margin: 0 0 4px; font-size: 18px; }
.login-hint { margin: 0 0 22px; color: var(--text-soft); font-size: 12px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text); font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: 8px; outline: none; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.field textarea { resize: vertical; min-height: 72px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; min-height: 0; }
.global-error { margin-bottom: 10px; }
.btn {
  border: 1px solid transparent; border-radius: 8px; padding: 9px 16px;
  cursor: pointer; font-weight: 600; background: var(--panel-soft); color: var(--text);
  white-space: nowrap; transition: .15s;
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex: 0 0 230px; background: #101a30; color: #cbd5e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; justify-content: center; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-logo-chip { width: 100%; background: #fff; border-radius: 10px; padding: 7px 9px; box-sizing: border-box; }
.brand-logo-chip img { display: block; width: 100%; height: auto; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg,#3b82f6,#0ea5a4);
  color: #fff; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { color: #fff; font-size: 16px; letter-spacing: .5px; }
.brand-text span { font-size: 11px; color: #7d8aa3; }
.nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.nav-group-label { font-size: 11px; color: #64748b; padding: 14px 12px 6px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 2px 0;
  border-radius: 8px; color: #aab6c9; text-decoration: none; font-size: 13.5px; transition: .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-ico { width: 18px; text-align: center; font-size: 15px; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #334155; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; flex: 0 0 auto;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-meta strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 11px; color: #7d8aa3; }
.icon-btn { background: transparent; border: none; color: #7d8aa3; cursor: pointer; font-size: 16px; padding: 4px; }
.icon-btn:hover { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { margin: 0; font-size: 19px; }
.topbar-sub { color: var(--text-mute); font-size: 12px; }
.sync-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-soft); }
.sync-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sync-status.err .dot { background: var(--danger); }
.page-content { padding: 24px 28px 60px; flex: 1; }

/* ---------- Common ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 17px; }
.page-head .sub { color: var(--text-mute); font-size: 12px; margin-top: 2px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.grid { display: grid; gap: 16px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px;
  border-radius: 50%; background: var(--primary-soft); opacity: .6;
}
.stat-card .label { color: var(--text-soft); font-size: 12px; }
.stat-card .value { font-size: 30px; font-weight: 700; margin-top: 6px; line-height: 1; }
.stat-card .hint { color: var(--text-mute); font-size: 11px; margin-top: 8px; }
.section-title { font-size: 14px; font-weight: 700; margin: 0 0 14px; padding-left: 9px; border-left: 3px solid var(--primary); }

/* toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search input {
  width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--border-strong);
  border-radius: 8px; outline: none; background: #fff;
}
.toolbar .search::before {
  content: '⌕'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-mute); font-size: 16px;
}
.toolbar select {
  padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff; outline: none; min-width: 120px;
}
.toolbar > input {
  padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff; outline: none; width: 132px;
}
.toolbar > input::placeholder { color: var(--text-mute); }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 11px 14px; background: var(--panel-soft); color: var(--text-soft);
  font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12px;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafcff; }
table.data td.actions { white-space: nowrap; }
table.data .link { color: var(--primary); cursor: pointer; font-weight: 600; }
table.data .link:hover { text-decoration: underline; }
.cell-limit { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-mute); }
.empty .big { font-size: 38px; margin-bottom: 8px; opacity: .5; }

/* tags & badges */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px;
  font-weight: 600; background: #eef2f7; color: var(--text-soft); white-space: nowrap;
}
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: #e7f7ee; color: var(--ok); }
.badge.amber { background: #fdf3e2; color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.gray { background: #eef2f7; color: var(--text-soft); }
.tag { display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 5px; background: #eef2f7; color: var(--text-soft); font-size: 11px; }

/* stage stepper */
.stage-flow { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.stage-step { font-size: 11px; padding: 2px 8px; border-radius: 5px; background: #eef2f7; color: var(--text-mute); }
.stage-step.done { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.stage-step.current { background: var(--primary); color: #fff; font-weight: 600; }

/* 匹配中心分组表：固定列宽，保证上下各分组卡片列对齐 */
table.data.match-table { table-layout: fixed; }
table.data.match-table th,
table.data.match-table td { overflow-wrap: anywhere; word-break: break-word; vertical-align: middle; }
table.data.match-table th:last-child,
table.data.match-table td.actions { text-align: center; white-space: nowrap; }
table.data.match-table td .cell-limit { max-width: 100%; }
table.data.match-table .stage-flow { gap: 2px; flex-wrap: nowrap; }
table.data.match-table .stage-step { padding: 2px 6px; font-size: 10px; white-space: nowrap; }

/* two-col layout */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 9px 16px; cursor: pointer; font-weight: 600; color: var(--text-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto;
}
.modal {
  background: var(--panel); border-radius: 14px; width: 100%; max-width: 760px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25); margin: auto 0;
}
.modal.wide { max-width: 940px; }
.modal.small { max-width: 460px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-mute); line-height: 1; }
.modal-body { padding: 22px; max-height: calc(100vh - 200px); overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px;
  border-top: 1px solid var(--border); background: var(--panel-soft);
  border-radius: 0 0 14px 14px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { margin-bottom: 22px; }
.form-group-title {
  font-size: 13px; font-weight: 700; color: var(--primary);
  padding-bottom: 8px; margin-bottom: 16px; border-bottom: 1px dashed var(--border-strong);
}
.req::after { content: ' *'; color: var(--danger); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.detail-item { display: flex; flex-direction: column; gap: 2px; }
.detail-item .k { color: var(--text-mute); font-size: 11px; }
.detail-item .v { color: var(--text); font-size: 13.5px; word-break: break-word; }
.detail-item.full { grid-column: 1 / -1; }

/* 历史年度合作归档 */
.history-card { padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-soft); }
.history-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

/* follow-ups */
.follow-list { display: flex; flex-direction: column; gap: 10px; }
.follow-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-soft); }
.follow-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-mute); margin-bottom: 5px; }
.follow-content { white-space: pre-wrap; font-size: 13px; }
.follow-next { font-size: 12px; color: var(--primary); margin-top: 6px; }

/* attachments */
.file-list { display: flex; flex-direction: column; gap: 7px; }
.file-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.file-item .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-time { font-size: 11px; color: var(--text-mute); white-space: nowrap; }

/* 匹配综合跟踪 */
.track-row { display: flex; align-items: center; gap: 10px; }
.track-row select { flex: 1; }
.track-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.track-add .field { flex: 0 0 150px; }
.track-add .field.full { flex: 1 1 100%; }
.track-add textarea { min-height: 64px; }
.mlog-list { display: flex; flex-direction: column; gap: 8px; }
.mlog { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-soft); }
.mlog-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--text-mute); margin-bottom: 5px; }
.mlog-time { color: var(--text-soft); }
.mlog-text { white-space: pre-wrap; font-size: 13px; line-height: 1.5; }

/* toast */
.toast-root { position: fixed; top: 80px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: 8px; background: #1f2937; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 13px; min-width: 180px;
  animation: toastIn .2s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 批量选择操作条 */
.batch-bar {
  display: none; align-items: center; gap: 10px; margin: 0 0 12px; padding: 9px 14px;
  background: #eef4ff; border: 1px solid #c7dbff; border-radius: 9px; font-size: 13px; color: var(--text-soft);
}
.batch-bar.show { display: flex; }
.batch-bar strong { color: var(--primary); font-size: 15px; }
.batch-bar button { margin-left: 2px; }
.data th input[type="checkbox"], .data td input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

/* 多联系人编辑 */
.contacts-editor { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.contacts-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 8px; align-items: center; }
.contacts-row input {
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 7px;
  outline: none; background: #fff; color: var(--text); font-size: 13px; min-width: 0;
}
.contacts-row input:focus { border-color: var(--primary); }
.contacts-add { align-self: flex-start; }
@media (max-width: 700px) { .contacts-row { grid-template-columns: 1fr; } }

/* 跟踪中快捷改阶段 */
.stage-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.stage-quick .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.stage-quick .current:not(.active) { border-color: var(--accent); color: var(--accent); }
.stage-group + .stage-group { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.stage-group > label { display: block; font-weight: 600; color: var(--text-soft); margin-bottom: 4px; }
.confirm-text { line-height: 1.7; color: var(--text); margin: 4px 0; }

/* report */
.report-table td.num, .report-table th.num { text-align: right; }
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-track { flex: 1; height: 7px; background: #eef2f7; border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; }

/* 工作日报 / 工作分析 */
.field-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-soft); }
.field-inline select, .field-inline input[type="date"], .field-inline input[type="month"] {
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff; color: var(--text); outline: none; font-size: 13px;
}
.field-inline input[type="month"]:focus { border-color: var(--primary); }
.daily-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.metric-box > span { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.metric-input { display: flex; align-items: center; gap: 6px; }
.metric-input input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 7px; outline: none; background: #fff; }
.metric-input input:focus { border-color: var(--primary); }
.metric-input em { font-style: normal; font-size: 12px; color: var(--text-mute); flex: 0 0 auto; }
/* 运营周报分组 */
.ops-group + .ops-group { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.ops-group-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.ops-group-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }
/* 财务月报：公司卡片与明细表 */
#finance-companies { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.fin-company { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 16px; box-shadow: var(--shadow); }
.fin-company-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.fin-company-head strong { font-size: 14px; color: var(--primary); white-space: nowrap; }
.fin-company-head .fc-name { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 7px; outline: none; font-size: 13px; color: var(--text); }
.fin-company-head .fc-name:focus { border-color: var(--primary); }
.fin-section + .fin-section { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.fin-sec-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.fin-sec-title .login-hint { margin: 0; font-size: 11px; font-weight: 400; }
.fin-kv { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; }
.fin-kv label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-soft); }
.fin-kv input { width: 130px; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 7px; outline: none; color: var(--text); background: #fff; }
.fin-kv input:focus, .fp-row input:focus { border-color: var(--primary); }
.fin-sub { margin-left: auto; font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.fin-sub b, .fin-company-total b, .fin-grand b { color: var(--primary); font-variant-numeric: tabular-nums; }
.fp-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fp-row { display: flex; align-items: center; gap: 8px; }
.fp-row input { padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 7px; outline: none; font-size: 12px; color: var(--text); background: #fff; }
.fp-row .fp-name { flex: 1; min-width: 0; }
.fp-row .fp-amount { width: 130px; }
.fp-row .fp-del { color: var(--danger); font-size: 16px; line-height: 1; padding: 3px 7px; }
.fin-company-total { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); text-align: right; font-size: 13px; font-weight: 700; color: var(--text); }
.fin-grand { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; font-weight: 700; color: var(--text); }
.fin-grand span { white-space: nowrap; }
.fin-grand b { color: var(--primary); font-variant-numeric: tabular-nums; }
.fin-grand span:last-child b { color: var(--ok); }
.bar-chart { display: flex; align-items: flex-end; gap: 5px; height: 180px; padding: 16px 6px 0; overflow-x: auto; }
.bar-col { flex: 1; min-width: 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar { width: 100%; max-width: 42px; background: linear-gradient(180deg, #60a5fa, #2563eb); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; }
.bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-soft); white-space: nowrap; }
.bar-label { font-size: 10px; color: var(--text-mute); white-space: nowrap; }
.report-feed { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
/* 日报详情 */
.rd-head { font-size: 13px; color: var(--text-soft); margin-bottom: 14px; }
.rd-sec-title { font-weight: 700; font-size: 13px; color: var(--primary); margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.rd-metric { border: 1px solid var(--border); border-radius: 8px; background: #fbfcfe; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.rd-metric span { font-size: 11px; color: var(--text-soft); }
.rd-metric b { font-size: 14px; color: var(--text); }
.rd-block { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcfe; }
.rd-block strong { color: var(--text); font-size: 13px; }
.rd-line { font-size: 12px; color: var(--text-soft); line-height: 1.8; }
.rd-grand { font-size: 13px; font-weight: 700; color: var(--primary); text-align: right; margin-top: 8px; }
.rd-content { font-size: 13px; color: var(--text); line-height: 1.8; white-space: pre-wrap; background: #fbfcfe; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.feed-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fbfcfe; }
.feed-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.feed-date { margin-left: auto; color: var(--text-mute); font-size: 11px; }
.feed-metrics { color: var(--primary); font-size: 12px; margin: 8px 0 4px; }
.feed-content { color: var(--text-soft); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.review-text pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.8; color: var(--text); background: #f7f9fc; border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 0; }

/* 项目负责人多选 */
.multiuser-select { width: 100%; min-height: 84px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-size: 13px; }
.multiuser-select option { padding: 4px 6px; }
.multi-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.multi-option { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text-soft); font-size: 12px; cursor: pointer; user-select: none; }
.multi-option input { accent-color: var(--primary); }
.multi-option.checked { border-color: var(--primary); background: #edf3ff; color: var(--primary); font-weight: 600; }
.multiuser-readonly { min-height: 36px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; background: #f8fafc; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* 员工个人信息与账号权限设置 */
.muted { color: var(--text-mute); }
.toolbar-input { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; color: var(--text); font-size: 13px; outline: none; }
.toolbar-input:focus { border-color: var(--primary); }
.form-section-title { margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); font-weight: 700; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.personal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fbfcfe; }
.perm-label { font-weight: 700; font-size: 12px; color: var(--primary); margin-bottom: 8px; }
.perm-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-soft); padding: 4px 0; cursor: pointer; }
.perm-item input { accent-color: var(--primary); }

@media (max-width: 860px) {
  .sidebar { width: 64px; flex-basis: 64px; }
  .brand-text, .nav-group-label, .nav-item span:not(.nav-ico), .user-meta, .icon-btn { display: none; }
  .nav-item { justify-content: center; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .page-content { padding: 18px 14px 50px; }
  .personal-grid, .perm-grid { grid-template-columns: 1fr; }
  #finance-companies { grid-template-columns: 1fr; }
  .fin-sub { margin-left: 0; width: 100%; }
}
