:root {
  --bg: #e8f2ea;
  --bg-2: #f2f8f3;
  --card: #ffffff;
  --ink: #1a2e24;
  --muted: #5a6f64;
  --line: #c5d9cb;
  --accent: #0f5c4c;
  --accent-2: #c45c26;
  --danger: #9b2c2c;
  --sidebar: #f7fbf8;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.55 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(15, 92, 76, 0.07), transparent 42%),
    linear-gradient(180deg, #eef6ef, var(--bg));
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 左侧导航 + 右侧工作区 */
body.has-sidebar {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 20;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  width: 78px;
  height: auto;
  display: block;
  object-fit: contain;
}
.brand-text {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-drop {
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}
.nav-drop[open] {
  background: rgba(15, 92, 76, 0.04);
  border-color: rgba(15, 92, 76, 0.08);
}
.nav-drop-title {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.nav-drop-title::-webkit-details-marker { display: none; }
.nav-drop-title::after {
  content: "▾";
  font-size: 13px;
  color: var(--muted);
  transition: transform .15s;
}
.nav-drop:not([open]) .nav-drop-title::after {
  transform: rotate(-90deg);
}
.nav-drop-title:hover {
  background: rgba(15, 92, 76, 0.07);
  color: var(--accent);
}
.nav-drop-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px 8px;
}
.nav-sub-label {
  margin: 10px 12px 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(15, 92, 76, 0.12);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: none;
}
.nav-drop-body > .nav-sub-label:first-child {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}
.nav-drop-sub {
  margin: 2px 0;
}
.nav-drop-sub[open] {
  background: rgba(15, 92, 76, 0.03);
  border-color: transparent;
}
.nav-drop-sub > .nav-drop-title {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
}
.nav-drop-sub > .nav-drop-body {
  padding: 0 4px 8px 8px;
}
.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 10px 18px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none !important;
}
.nav-drop-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.side-nav > .side-link {
  padding-left: 12px;
  font-size: 16px;
  font-weight: 600;
}
.side-link:hover {
  background: rgba(15, 92, 76, 0.08);
  color: var(--accent);
}
.side-link.active {
  background: rgba(15, 92, 76, 0.12);
  color: var(--accent);
  font-weight: 700;
}
.side-link.pnl-nav-loss,
.side-link.pnl-nav-loss:hover,
.side-link.pnl-nav-loss.active {
  color: #c62828;
  font-weight: 700;
}
.side-badge,
.oa-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e54d42;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top-userbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 14px 28px 10px;
  position: sticky;
  top: 0;
  z-index: 15;
  background: linear-gradient(180deg, rgba(238, 246, 239, 0.96), rgba(238, 246, 239, 0.88));
  backdrop-filter: blur(8px);
}
.top-user-meta {
  text-align: right;
  line-height: 1.35;
}
.top-user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.top-user-role {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.top-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.top-user-actions a {
  font-size: 13.5px;
  color: var(--accent);
  text-decoration: none !important;
  padding: 6px 10px;
  border-radius: 8px;
}
.top-user-actions a:hover {
  background: rgba(15, 92, 76, 0.08);
}
.top-logout {
  color: var(--muted) !important;
}

.container.with-sidebar {
  flex: 1;
  min-width: 0;
  max-width: none;
  padding: 12px 28px 60px;
}
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }

/* 兼容旧顶栏（若个别页仍用） */
.topbar {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 14px 28px;
  background: rgba(247, 251, 248, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
}
.brand a { color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar nav { display: flex; gap: 16px; flex: 1; }
.userbox { color: var(--muted); display: flex; gap: 12px; align-items: center; }

.hero-panel h1, h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: 0.02em; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin-top: 18px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.stat, .card, .form-card, .login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.stat .num { font-size: 30px; font-weight: 700; color: var(--accent); }
.stat .label { color: var(--muted); margin-top: 4px; }

.actions, .page-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 20px; }
.page-head { justify-content: space-between; }
.my-pnl-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.my-pnl-chip b { font-size: 18px; }
.my-pnl-chip.is-loss { border-color: #e7c4bc; }
.page-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sales-filter-card {
  margin: 0 0 14px;
  padding: 14px 16px;
}
.sales-filter-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}
.sales-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sales-filter-btns .btn {
  font-size: 13px;
  padding: 6px 12px;
}
.contract-stat-card {
  margin: 0 0 14px;
  padding: 14px 16px;
}
.contract-stat-card .biz-hub-grid { margin-top: 0; }
.hist-months {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.review-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.review-pill.warn { background: #8a3b12; }
.review-action-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 2px solid #0f5c4c;
  border-radius: 12px;
  background: #f3faf7;
  box-shadow: 0 4px 16px rgba(15, 92, 76, 0.12);
}
.review-action-bar.warn {
  border-color: #c45c26;
  background: #fff7f1;
  box-shadow: 0 4px 16px rgba(196, 92, 38, 0.12);
}
.review-action-bar-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.review-action-bar-title strong {
  font-size: 1.05rem;
  color: #0f5c4c;
}
.review-action-bar.warn .review-action-bar-title strong { color: #8a3b12; }
.review-action-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}
.review-action-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.review-action-form input[type="date"],
.review-action-form input[type="text"],
.review-action-form .review-note-field input {
  min-width: 140px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}
.review-note-field { flex: 1; min-width: 160px; }
.review-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.review-action-form .checkline {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
}

.btn, button[type="submit"] {
  appearance: none;
  border: none;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.btn.secondary { background: var(--accent-2); }
.btn.ghost, button.linkish {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
button.linkish { padding: 4px 8px; border: none; text-decoration: underline; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eaf4ec; font-weight: 600; }
tr:last-child td { border-bottom: none; }

.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input, .search select, label input, label select, label textarea, .stack input, .stack select, .stack textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: white;
}
.search input { max-width: 360px; }
/* 上面那条把 label 里的 input 一律拉成整行宽，勾选框会被撑开、文字挤到下一行看不出对应关系 */
label input[type="checkbox"],
label input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: none;
  vertical-align: middle;
}
label input.issuer-lock {
  background: #f3f7f4;
  color: inherit;
}
.hr-att-filter { flex-wrap: wrap; align-items: flex-end; }
.hr-att-filter select,
.hr-att-filter input[type="date"] {
  width: auto;
  min-width: 140px;
}
.hr-att-filter .hr-att-day {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--muted);
}
.sign-kind-note { display: block; margin-top: 4px; font-size: 12px; }
.iv-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.iv-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfb;
  color: inherit;
  text-decoration: none;
}
a.iv-stat:hover { border-color: var(--accent); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06); }
a.iv-stat.on { border-color: var(--accent); background: #eef5f0; }
.iv-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 13px;
}
.iv-need-line { margin: 0 0 14px; font-size: 15px; }
.iv-need,
.iv-need a,
a.iv-need,
tr.iv-need td,
tr.iv-need td a {
  color: #c62828;
  font-weight: 700;
}
.iv-list-panel { scroll-margin-top: 12px; margin: 0 0 18px; }
.iv-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 8px;
}
.iv-list-head h2 { margin: 0; font-size: 1rem; }
.iv-stat strong { font-size: 22px; line-height: 1.2; }
.iv-stat .muted { font-size: 12px; }
.iv-stat-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.iv-stat-box h3 { margin: 0 0 6px; font-size: 14px; }
.labor-table.compact th, .labor-table.compact td { padding: 6px 8px; font-size: 13px; }
.iv-visible-line { display: block; margin: 8px 0; }
.iv-pos-hint { display: block; margin-top: 4px; font-size: 12px; }
.iv-pos-card { margin-top: 16px; }
.iv-pos-table { margin-bottom: 12px; }
.iv-pos-table td form { margin: 0; }
.iv-pos-new { border-top: 1px dashed #dfeae3; padding-top: 12px; }
@media (max-width: 1100px) {
  .iv-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-stat-split { grid-template-columns: 1fr; }
}
.att-day-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.att-day-grid .labor-hub-card { cursor: default; }
.att-day-grid .labor-hub-card:hover { box-shadow: none; }
.att-oa-links { margin: 8px 0 18px; }
@media (max-width: 1200px) {
  .att-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
label { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 600; }
label[hidden] { display: none !important; }
.oa-star { color: #c45c26; font-weight: 700; }
.form-card, .stack { max-width: 520px; }
.salary-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  max-width: none;
}
.salary-card-grid > .form-card {
  max-width: none;
  min-width: 0;
}
@media (max-width: 800px) {
  .salary-card-grid { grid-template-columns: 1fr; }
}
.form-card.salary-sheet {
  max-width: none;
  overflow-x: auto;
}
.salary-sheet table {
  width: max-content;
  min-width: 100%;
}
.salary-sheet th,
.salary-sheet td {
  white-space: nowrap;
}
.wage-detail th,
.wage-detail td { text-align: center; vertical-align: middle; }
.wage-detail td.num { text-align: right; font-variant-numeric: tabular-nums; }
.wage-detail th.perf,
.wage-detail td.perf { color: #c62828; }
.wage-detail input.wage-in {
  width: 4.8rem;
  box-sizing: border-box;
  text-align: right;
  font: inherit;
  padding: 1px 3px;
}
.wage-detail td.perf input { color: #c62828; }
.wage-detail input.wage-days { width: 3.4rem; }
.wage-detail input.wage-note { width: 12rem; text-align: left; }
.wage-detail td.calc { font-weight: 600; }
.salary-sheet td.note {
  white-space: normal;
  text-align: left;
  min-width: 12rem;
  max-width: 18rem;
  line-height: 1.35;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.head-actions { display: flex; gap: 8px; }

.bigsearch { display: flex; gap: 10px; margin: 18px 0 14px; flex-wrap: wrap; align-items: flex-end; }
.bigsearch input {
  flex: 1;
  padding: 16px 18px;
  font-size: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.bigsearch .month-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.bigsearch .month-filter select {
  min-width: 148px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.bigsearch button { padding: 0 26px; border-radius: 14px; font-size: 16px; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--card);
}
.tab:hover { text-decoration: none; }
.tab.on { background: var(--accent); color: white; border-color: var(--accent); }

.contract-cards { display: grid; gap: 12px; }
.contract-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}
.contract-card h3 { margin: 0; font-size: 18px; }
.cc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.page-head .cc-name { margin: 0 0 8px; }
.page-head .cc-name h1 { margin: 0; }
.cc-deliver { margin: 0; }
.cc-deliver-text,
.cc-deliver select {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(15, 92, 76, 0.08);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 2px 10px;
  line-height: 1.4;
}
.cc-deliver select { cursor: pointer; }
.cc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-revise-btn { padding: 3px 12px; font-size: 13px; }
.cc-no {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(15, 92, 76, 0.08);
  padding: 3px 10px;
  border-radius: 8px;
}
.cc-status { font-size: 13px; padding: 3px 10px; border-radius: 8px; }
.cc-status.warn { background: #fdf0e2; color: var(--accent-2); }
.cc-status.ok { background: #e6f2ee; color: var(--accent); }
.cc-status.bad { background: #fbe6e2; color: #a8402c; }
.cc-status.plain { background: #eceae5; color: var(--muted); }
.cc-warn {
  background: #fbe6e2;
  color: #a8402c;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  margin: 0 0 12px;
}
.cc-note {
  background: #f1efea;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  margin: 0 0 12px;
}
.cc-date, .cc-check { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.cc-date input { padding: 7px 10px; }
.cc-check input { width: auto; }
.tabbadge {
  background: #a8402c;
  color: white;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 12px;
  margin-left: 2px;
}
.tab.on .tabbadge { background: white; color: var(--accent); }
.cc-meta { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.cc-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-upload input[type="file"] { flex: 1; min-width: 220px; padding: 8px; }
.cc-foot { display: flex; gap: 16px; }
.cc-detail { font-size: 14px; }

.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
}
.notice {
  background: #e6f2ee;
  color: var(--accent);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
code {
  background: #f1ece1;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 13px;
}

.tagok { background: #e6f2ee; color: var(--accent); padding: 2px 9px; border-radius: 7px; font-size: 13px; }
tr.cash-gap td { background: #fdecec; }
td.cash-gap { color: #b42318; font-weight: 600; }
table.labor-table th.num,
table.labor-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.salary-sheet td.cash-act form { display: inline-block; margin: 0 6px 0 0; }
.cash-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.cash-people .attendee-mini-btn.active {
  border-color: var(--accent);
  background: #e8f4ee;
  color: var(--accent);
}
table.cash-slip { margin: 0.35rem 0 0.2rem; font-size: 13px; }
table.cash-slip th,
table.cash-slip td { background: transparent; white-space: nowrap; text-align: left; }
table.cash-slip th { font-size: 12px; font-weight: 600; color: #5c6570; }
table.cash-slip th.num,
table.cash-slip td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tagbad { background: #fbe6e2; color: #a8402c; padding: 2px 9px; border-radius: 7px; font-size: 13px; margin-right: 6px; }
.taglate { background: #fff4e0; color: #9a5b00; padding: 2px 9px; border-radius: 7px; font-size: 13px; margin-right: 6px; }
.tag-late { background: #fff3d6; color: #8a5a10; padding: 2px 9px; border-radius: 7px; font-size: 13px; }
.pushstat { font-size: 15px; }
.pushstat .bad { color: #a8402c; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
button[disabled] { opacity: 0.45; cursor: not-allowed; }

.formgrid { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.formgrid label { display: flex; flex-direction: column; gap: 6px; }
.formgrid label > span { font-weight: 600; font-size: 14px; }
.formgrid small { font-size: 12.5px; line-height: 1.5; }
.formgrid .checkline { flex-direction: row; align-items: center; gap: 8px; }
.formgrid .checkline input { width: auto; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card { width: min(420px, 100%); }
.login-card h1 { margin-bottom: 4px; }
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.login-logo { width: 88px; height: auto; }
.login-title {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0;
}
.alert {
  background: #fde8e8;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.dial-list-wrap { padding: 0; overflow: hidden; }
.dial-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.dial-list {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dial-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.dial-item:last-child { border-bottom: 0; }
.dial-phone {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.dial-item-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dial-tag-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dial-tag-form .btn {
  font-size: 13px;
  padding: 8px 10px;
}
@media (min-width: 800px) {
  .dial-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: start;
  }
  .dial-item-actions { margin-top: 0; }
}

@media (max-width: 800px) {
  .stats, .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .kv { grid-template-columns: 1fr; }
}

/* 销售总首页 */
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats-5 { grid-template-columns: repeat(5, 1fr); }
.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s; cursor: pointer; }
.stat-link:hover, .stat-link.active { text-decoration: none; border-color: var(--accent); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.num-warn { color: var(--accent-2) !important; }
.home-salary-strip { margin: 8px 0 4px; max-width: none; }
.home-salary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.todo-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eceae5;
  color: var(--muted);
  white-space: nowrap;
}
.todo-dial { background: rgba(15, 92, 76, 0.12); color: var(--accent); }
.todo-follow { background: #fdf0e2; color: var(--accent-2); }
.todo-contract { background: #e8eef6; color: #2c4a6e; }
.todo-salary { background: #f0e8f6; color: #5a3d6e; }
.home-todo .todo-actions { white-space: nowrap; }
.home-todo .todo-actions a { margin-right: 8px; }

/* 统一工作台首页 */
.home-greet {
  margin-bottom: 8px;
}
.home-greet h1 {
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.home-greet-meta {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.home-kpis { margin-top: 18px; }
.stats-2 { grid-template-columns: repeat(2, 1fr); }
.home-todo-section { margin-top: 8px; }
.home-todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.home-todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.home-todo-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.home-todo-title {
  font-weight: 600;
  line-height: 1.35;
}
.home-todo-detail {
  font-size: 13px;
  margin-top: 4px;
}
.home-todo-item .todo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.home-todo-btn {
  padding: 10px 14px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.home-todo-btn:hover { text-decoration: none; }
.home-empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 22px 16px;
}
.home-app-actions { margin-top: 4px; }
.home-app-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.home-coming { margin-top: 8px; }
.home-coming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.home-coming-card {
  background: rgba(255, 253, 248, 0.7);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  opacity: 0.85;
}
.home-coming-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}
.todo-review { background: #fdf0e2; color: var(--accent-2); }
.todo-system { background: #eceae5; color: var(--muted); }
.todo-deliver { background: #fde8e8; color: var(--danger); }
.todo-func_week { background: #e8f2ea; color: #2f7a4d; }

/* 各岗位当日交付 */
.home-deliver { margin: 8px 0 4px; }
.home-deliver-head h2 { margin-bottom: 4px; }
.home-deliver-head .muted { margin: 0 0 12px; }
.deliver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.deliver-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s;
}
.deliver-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.08);
}
.deliver-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.deliver-group {
  font-size: 12px;
  color: var(--muted);
}
.deliver-status {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.deliver-pending .deliver-status {
  background: #fde8e8;
  color: var(--danger);
}
.deliver-done .deliver-status {
  background: #e6f2ee;
  color: var(--accent);
}
.deliver-title {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.deliver-detail {
  font-size: 13px;
  margin: 0 0 10px;
  min-height: 2.4em;
}
.deliver-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

@media (max-width: 900px) {
  body.has-sidebar { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .brand { flex-direction: row; justify-content: flex-start; gap: 12px; }
  .brand-logo { width: 52px; }
  .brand-text { font-size: 18px; text-align: left; }
  .side-nav { gap: 8px; }
  .nav-drop-title { font-size: 15px; }
  .top-userbar {
    justify-content: space-between;
    padding: 12px 16px 8px;
  }
  .top-user-meta { text-align: left; }
  .top-user-actions { border-left: none; padding-left: 0; }
  .container.with-sidebar { padding: 12px 16px 48px; }
}

@media (max-width: 900px) {
  .stats-4, .stats-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 20px 14px 48px; }
  .home-todo-item {
    flex-direction: column;
    align-items: stretch;
  }
  .home-todo-item .todo-actions {
    width: 100%;
    justify-content: stretch;
  }
  .home-todo-btn { flex: 1; justify-content: center; }
  .home-app-actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .stat-link, .stat { padding: 16px; }
  .stat .num { font-size: 28px; }
}
@media (max-width: 520px) {
  .stats-4, .stats-5, .stats-2, .home-kpis { grid-template-columns: 1fr; }
}

/* 内外勤 */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.th-status { white-space: nowrap; }
.status-pick {
  width: auto;
  margin-left: 8px;
  padding: 2px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  vertical-align: middle;
}
.inline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 12px 0 8px;
}
.inline-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.flash { padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.flash.ok { background: #e7f6ec; color: #1b5e3b; }
.flash.err { background: #fde8e8; color: #9b2c2c; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #e8f2ea;
  color: var(--accent);
  font-weight: 600;
}
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost.danger {
  color: var(--danger);
  background: transparent;
  border-color: transparent;
}
.btn.ghost.danger:hover {
  background: rgba(155, 44, 44, 0.1);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-head-row h2 { margin: 0; }
.time24-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}
.time24-pair select {
  width: auto;
  min-width: 72px;
  flex: 0 0 auto;
}
.time24-sep {
  font-weight: 600;
  color: var(--muted);
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 4px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
}
.check-line:hover { background: #f2f7f3; }
.check-line input { flex: 0 0 auto; margin: 0; }
/* 没加 check-line 的老表单也让「勾选框 + 文字」同一行，浏览器不支持 :has 时退回上面的宽度修正 */
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 6px;
}
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
@media (max-width: 900px) {
  .ops-grid { grid-template-columns: 1fr; }
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cal-nav h2 { margin: 0; }
.ops-cal {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ops-cal th, .ops-cal td {
  border: 1px solid var(--line);
  vertical-align: top;
  height: 96px;
  padding: 8px;
  background: #fff;
}
.ops-cal th { height: auto; background: #f2f8f3; font-weight: 600; text-align: center; }
.ops-cal td.empty { background: #f7faf8; }
.ops-cal td.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.ops-cal td.warn { background: #fff8f0; }
.ops-cal td.rest { background: #f3f4f6; }
.ops-cal td.leave { background: #eef6ff; }
.cal-daynum { font-weight: 700; margin-bottom: 6px; }
.cal-leave-tag {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: middle;
}
.cal-leave-tip { margin-top: 4px; font-size: 11px; color: #1d4ed8; }
.cal-rest-tag {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #e5e7eb;
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: middle;
}
.cal-rest-tip { margin-top: 4px; font-size: 11px; color: #6b7280; }
.cal-muted { color: #9ca3af; font-size: 13px; }
.cal-links { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cal-dot { margin-top: 6px; font-size: 12px; color: var(--accent-2); }
.duty-names { display: block; line-height: 1.4; word-break: break-all; }
.duty-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 16px;
  margin: 8px 0 16px;
}
.duty-person {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.year-cell {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none !important;
  color: inherit;
}
.year-cell:hover { border-color: var(--accent); }
.year-cell-m { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.incomplete-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
/* 进度备注：全文换行显示，格子随内容增高（不缩字体、不截断） */
.cell-clip,
.cell-note {
  max-width: none;
  min-width: 8em;
  overflow: visible;
  text-overflow: unset;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
  vertical-align: top;
}

@media (max-width: 900px) {
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-cal td { height: 110px; }
}

/* 员工档案 · 部门分层 */
.labor-hub { margin-top: 8px; }
.labor-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
  align-items: stretch;
}
.labor-hub-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  color: inherit;
  text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s;
}
.labor-hub-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.08);
}
.labor-hub-card.is-open {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.08);
}
.labor-hub-count {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.labor-hub-title {
  display: block;
  font-size: 17px;
  margin: 8px 0 4px;
}
.labor-hub-card .muted {
  font-size: 13px;
  margin: 0;
  min-height: 0;
  flex: 1;
  overflow-wrap: break-word;
}
.labor-hub-go {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.9rem;
  color: var(--accent, #2f6b4f);
}
@media (max-width: 1100px) {
  .labor-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .labor-hub-grid { grid-template-columns: 1fr; }
  .att-day-grid { grid-template-columns: 1fr 1fr; }
}
.biz-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 14px;
}
.biz-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e3d2f;
  line-height: 1.2;
}
.biz-stat-label {
  font-size: 0.78rem;
  color: #5a6b62;
  margin-top: 2px;
}
a.biz-stat-hit {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.biz-stat-hit:hover .biz-stat-num {
  text-decoration: underline;
}
/* —— 销售业绩：月汇总 + 横向明细表 —— */
.perf-grand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none !important;
  color: inherit;
}
a.perf-grand:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.08);
}
.perf-grand .muted { flex: 1 1 100%; margin: 0; }
.perf-grand.is-loss .perf-grand-num { color: #a8402c; }
.perf-grand-label {
  font-size: 0.95rem;
  color: #5a6b62;
}
.perf-grand-num {
  font-size: 1.85rem;
  font-weight: 700;
  color: #1e3d2f;
  letter-spacing: 0.02em;
}
.perf-month-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.perf-month-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  text-decoration: none !important;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.perf-month-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.08);
}
.perf-month-card.is-current {
  border-color: var(--accent);
  background: #f3faf6;
}
.perf-month-name {
  font-size: 0.92rem;
  font-weight: 600;
}
.perf-month-num {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e3d2f;
}
.perf-month-card.has-pending .perf-month-num {
  color: #c62828;
}
.perf-month-card.is-loss .perf-month-num { color: #a8402c; }
.perf-month-card.is-current.is-loss .perf-month-name,
.perf-month-card.is-current.is-loss .perf-month-num {
  color: #c62828;
  font-weight: 700;
}
.perf-month-card.is-future { opacity: 0.55; }
.perf-month-meta { font-size: 0.78rem; margin-top: 4px; }
.pnl-hub-qgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pnl-q-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none !important;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.pnl-q-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.08);
}
.pnl-q-card.is-current {
  border-color: var(--accent);
  background: #f3faf6;
}
.pnl-q-card.is-loss .gm-perf-quarter-num { color: #a8402c; }
.pnl-q-card.is-future { opacity: 0.55; }
.pnl-crumb { margin: 0 0 8px; font-size: 0.9rem; }
.pnl-crumb a { color: #3d5348; }
@media (max-width: 1100px) {
  .perf-month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .perf-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gm-perf-quarters { display: grid; gap: 16px; }
.gm-perf-quarter {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 16px;
}
.gm-perf-quarter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.gm-perf-quarter-head h2 { margin: 0; font-size: 1rem; }
.gm-perf-quarter-num { font-size: 1.25rem; font-weight: 700; color: #1e3d2f; }
.gm-perf-qgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gm-perf-month-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.gm-perf-month-kpis .perf-grand { margin: 0; }
.gm-perf-bar {
  margin: 4px 0 12px;
  padding: 10px 14px;
  background: #eef6f1;
  border: 1px solid #d7e6df;
  border-radius: 10px;
  color: #3d5348;
  font-size: 0.92rem;
}
.gm-perf-bar b { color: #1e3d2f; }

body.has-sidebar:has(.gm-perf-lock) {
  height: 100vh;
  overflow: hidden;
}
body.has-sidebar:has(.gm-perf-lock) .workspace {
  min-height: 0;
  overflow: hidden;
}
body.has-sidebar:has(.gm-perf-lock) .container.with-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 16px;
}
.gm-perf-lock {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.gm-perf-lock-head { flex: 0 0 auto; }
.gm-perf-lock-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.gm-perf-lock .perf-sheet-wrap {
  flex: 1;
  min-height: 160px;
  overflow: auto;
}
.gm-perf-lock-body > .actions { flex: 0 0 auto; }
.gm-perf-head-freeze {
  flex: 0 0 auto;
  overflow: hidden;
  background: #6b4f8a;
  border: 1px solid #c5b3d6;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}
.gm-perf-head-freeze table { margin: 0; }
.gm-perf-lock .perf-sheet-wrap {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.table-wrap { overflow-x: auto; }
@media (max-width: 720px) {
  .gm-perf-qgrid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .gm-perf-month-kpis { grid-template-columns: 1fr; }
  .pnl-hub-qgrid { grid-template-columns: 1fr; }
}

.comp-badge-done {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e4f2ea;
  color: #1e5c3a;
  font-size: 12px;
  font-weight: 600;
}
.comp-close-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #1e5c3a;
  font-weight: 600;
}
.comp-paid-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.comp-paid-form select {
  width: auto;
  min-width: 110px;
  margin: 0;
  padding: 4px 8px;
}
.comp-badge-paid {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eef0f3;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
}
.comp-badge-refund {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fde8e8;
  color: #8a2f2f;
  font-size: 12px;
  font-weight: 600;
}
.comp-row-done td { color: #5a6b60; }
.comp-row-done .perf-col-hl { background: #f3f8f5; }
.comp-row-paid td { color: #6b7280; }
.comp-row-paid .perf-col-hl { background: #f3f4f6 !important; color: #6b7280 !important; }
.comp-row-refund td,
.comp-row-refund td.perf-col-hl {
  background: #f3f4f6 !important;
  color: #c0392b !important;
}
.comp-row-refund input,
.comp-row-refund select {
  color: #c0392b !important;
  background: transparent;
}
.comp-badge-pending {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff4d6;
  color: #8a5a12;
  font-size: 12px;
  font-weight: 600;
}
.comp-row-pending td { color: #6b5420; }
.comp-row-pending .perf-col-hl { background: #fff8e8; }
.perf-sheet tr.comp-row-focus td,
.perf-sheet tr:target td {
  box-shadow: inset 0 0 0 2px #2f6f4e;
}
.comp-person-block h2 { color: #1e3d2f; }
.comp-batch-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f3f8f5;
  border-radius: 8px;
}
.comp-batch-bar .comp-paid-form { margin: 0; }
.comp-check-col { width: 36px; text-align: center; }

.biz-apply-sheet th { font-size: 13px; }
.biz-apply-sheet td { background: #fff; }
.biz-sheet-form .perf-sheet-wrap { margin-bottom: 8px; }
.biz-apply-sheet input,
.biz-apply-sheet select {
  min-width: 4.5em;
}
.biz-apply-sheet input[name="group_at"] {
  cursor: pointer;
  min-width: 10em;
  background: #f4f7f5;
}
.biz-apply-sheet .biz-name-custom {
  margin-top: 4px;
  min-width: 8em;
}
.biz-apply-sheet .biz-name-custom:not([hidden]) {
  display: block;
}
.biz-name-custom-row {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}
.biz-name-custom-row[hidden] {
  display: none !important;
}
.biz-name-custom-row .biz-name-custom {
  margin-top: 0;
  min-width: 8em;
}
.biz-name-custom-row .biz-name-custom:not([hidden]) {
  display: inline-block;
}
.biz-name-custom.field-bad {
  outline: 2px solid #c0392b;
  border-color: #c0392b;
  background: #fff1f0;
}
.biz-apply-sheet input.field-bad,
.biz-apply-sheet select.field-bad {
  outline: 2px solid #c0392b;
  border-color: #c0392b;
  background: #fff1f0;
}
.biz-apply-sheet td:nth-child(n+5) input {
  min-width: 7em;
}
.biz-sched {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.biz-sched-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.biz-sched .btn { width: 100%; }
.biz-sched-row .btn { width: auto; }
.biz-gm-handle {
  display: block;
  text-align: center;
  font-weight: 600;
  color: #1a7f4b;
  background: #e8f6ee;
  border: 1px solid #9fd4b3;
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 12px;
}
.biz-apply-sheet .biz-sched input[type="date"] {
  min-width: 8.2em;
  width: auto;
  flex: 1;
}

.perf-sheet-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #c5b3d6;
  border-radius: 10px;
}
html:has(.biz-list-page) {
  height: 100%;
  overflow: hidden;
}
body.has-sidebar:has(.biz-list-page) {
  height: 100vh;
  overflow: hidden;
}
body.has-sidebar:has(.biz-list-page) .workspace {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
body.has-sidebar:has(.biz-list-page) .container.with-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 16px;
}
.biz-list-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.biz-list-toolbar {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #eef6ef 70%, rgba(238, 246, 239, 0.92));
  padding-bottom: 6px;
}
.biz-list-toolbar .hero-panel h1 { margin-bottom: 4px; }
.biz-list-toolbar .inline-filter { margin-top: 8px; }
.biz-list-count { margin: 0 0 6px; }
.biz-list-sheet.perf-sheet-wrap,
.biz-list-sheet {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.biz-list-head-row {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  background: #6b4f8a;
}
.biz-list-head-row .biz-list-table { flex: 1 1 auto; }
.biz-list-sb {
  flex: 0 0 17px;
  background: #6b4f8a;
}
.biz-list-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.biz-list-table tr:target,
.biz-list-table tr.biz-stay {
  background: #f4eef8;
}
.biz-list-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.biz-list-table .col-no { width: 56px; }
.biz-list-table .col-time { width: 118px; }
.biz-list-table .col-biz { width: 88px; }
.biz-list-table .col-co { width: 16%; }
.biz-list-table .col-plan { width: 8%; }
.biz-list-table .cell-plan { min-width: 0; width: 8%; }
.biz-list-sheet .biz-list-head-row th.cell-plan { white-space: normal; }
.biz-list-table .col-person { width: 78px; }
.biz-list-table .col-note { width: 12%; }
.biz-list-table .col-status { width: 96px; }
.biz-list-sheet .biz-list-head-row th {
  font-size: calc(13px * 1.5);
  font-weight: 700;
  line-height: 1.25;
  padding: 12px 10px;
  min-height: 0;
  height: auto;
  background: #6b4f8a;
}
.biz-list-sheet .perf-sheet th.cell-no {
  width: 56px;
  min-width: 56px;
}
.perf-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
}
.perf-sheet th,
.perf-sheet td {
  min-height: 2.5cm;
  height: auto;
  box-sizing: border-box;
  vertical-align: middle;
}
.perf-sheet td.cell-clip,
.perf-sheet td.cell-note {
  vertical-align: top;
  text-align: left;
}
.perf-sheet th {
  background: #6b4f8a;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  padding: 10px 8px;
  border: 1px solid #5a3f75;
  text-align: center;
}
.perf-sheet td {
  border: 1px solid #d4c6e2;
  padding: 10px 8px;
  background: #fff;
}
.perf-sheet tfoot td {
  background: #f7f2fb;
  font-weight: 600;
  padding: 10px 8px;
}
.perf-sheet .perf-col-hl,
.perf-sheet th.perf-col-hl {
  background: #e11d48;
  color: #fff;
}
.perf-sheet td.perf-col-hl {
  background: #ffe4e8;
  color: #9f1239;
}
.perf-sheet tr.perf-row-focus td,
tr.perf-row-focus td,
.perf-sheet tr.perf-row-focus td.perf-col-hl {
  background: #fff4e5;
  color: #9a3412;
}
.perf-sheet td.perf-col-hl input {
  background: #fff5f6;
  font-weight: 600;
}
.perf-sheet input,
.perf-sheet select {
  width: 100%;
  min-width: 0;
  min-height: 1.5cm;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 4px;
  font-size: 13px;
  border-radius: 4px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  text-shadow: none;
}
.perf-sheet input:focus,
.perf-sheet select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.perf-sheet input[type="number"] { width: 5.5em; text-align: right; }
.perf-sheet input[type="date"] { width: 8.2em; }
.perf-sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.perf-sheet .cell-no {
  width: 46px;
  min-width: 46px;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.perf-sheet th.cell-no { color: #fff; }
.perf-sheet tr.is-locked td {
  min-height: 0;
  height: auto;
  padding: 5px 6px;
}
.perf-sheet tr.is-locked input,
.perf-sheet tr.is-locked select {
  min-height: 0;
  height: 28px;
  padding: 3px 4px;
  font-size: 13px;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  cursor: default;
  pointer-events: none;
}
.perf-sheet tr.is-locked td.perf-col-hl input {
  background: transparent;
}

/* 收支明细整表：15 列，收入/支出分色，单元格压紧 */
.cash-sheet th,
.cash-sheet td { min-height: 0; padding: 6px 5px; }
.cash-sheet input { min-height: 32px; }
.cash-acct-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.cash-sheet th.cash-acct {
  background: #4a3562;
  border-bottom: 1px solid #5a3f75;
}
.cash-sheet th.cash-acct a { color: #fff; text-decoration: underline; }
.cash-sheet th.cash-owner-h { padding: 4px 6px; }
.cash-owner-pick {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 9px) calc(50% - 1px), calc(100% - 4px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: #fff;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  max-width: 8.5em;
  padding: 2px 16px 2px 2px;
}
.cash-owner-pick option { color: #222; background: #fff; }
.cash-owner-pick.is-on {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.cash-sheet th.cash-in { background: #1f7a5a; }
.cash-sheet th.cash-out { background: #9c3b3b; }
.cash-sheet td.cash-in { background: #f2fbf7; }
.cash-sheet td.cash-out { background: #fdf4f4; }
.cash-sheet td.cash-in input { color: #146b4d; font-weight: 600; }
.cash-sheet td.cash-out input { color: #a13030; font-weight: 600; }
.cash-sheet input[type="number"] { width: 100%; min-width: 5.2em; }
.cash-sheet input.cash-company { width: 100%; min-width: 20em; }
.cash-sheet input.cash-times { width: 100%; min-width: 4.5em; }
.cash-sheet input.cash-owner { width: 100%; min-width: 6em; }
.cash-sheet td.cash-ops { white-space: nowrap; }
.cash-sheet td.cash-ops .btn { padding: 4px 7px; }
.cash-sheet tr.is-gap td,
.cash-sheet tr.is-gap td.cash-in,
.cash-sheet tr.is-gap td.cash-out {
  background: #ffe58a;
}
.cash-sheet tr.is-gap input {
  background: #ffe58a;
}
.cash-sheet tr.is-plain td {
  font-size: 13px;
  line-height: 28px;
  white-space: nowrap;
}
.cash-sheet tr.is-plain td.cash-day { min-width: 7.5em; }
.cash-sheet tr.is-plain td.cash-co { min-width: 20em; }
.cash-sheet tr.is-plain td.cash-times { min-width: 4.5em; }
.cash-sheet tr.is-plain td.cash-biz { min-width: 6em; }
.cash-sheet tr.is-plain td.cash-owner { min-width: 6em; }
.cash-sheet tr.is-plain td.cash-in,
.cash-sheet tr.is-plain td.cash-out {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 5.2em;
}
.cash-sheet tr.is-plain td.cash-in { color: #146b4d; }
.cash-sheet tr.is-plain td.cash-out { color: #a13030; }
.cash-sheet tfoot td.cash-in { background: #e4f5ee; color: #146b4d; }
.cash-sheet tfoot td.cash-out { background: #fbe9e9; color: #a13030; }

/* 收支明细：上方筛选/表头不跟表格一起滚，表头冻结两行 */
body.has-sidebar:has(.cash-page) {
  height: 100vh;
  overflow: hidden;
}
body.has-sidebar:has(.cash-page) .workspace {
  min-height: 0;
  overflow: hidden;
}
body.has-sidebar:has(.cash-page) .container.with-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 16px;
}
.cash-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cash-page .page-head,
.cash-page .search,
.cash-page .gm-perf-bar { flex: 0 0 auto; }
.cash-page #cash-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cash-page .cash-sheet-wrap {
  flex: 1;
  min-height: 180px;
  overflow: auto;
}
.cash-page .cash-form-actions {
  flex: 0 0 auto;
  margin-top: 10px;
}

/* 会议办理：抬头（标题/参会/归档）固定，只滚下面各岗内容 */
body.has-sidebar:has(.meet-lock) {
  height: 100vh;
  overflow: hidden;
}
body.has-sidebar:has(.meet-lock) .workspace {
  min-height: 0;
  overflow: hidden;
}
body.has-sidebar:has(.meet-lock) .container.with-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 12px;
}
.meet-lock {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.meet-lock-head {
  flex: 0 0 auto;
  background: #eef6ef;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  z-index: 4;
}
.meet-lock-head .page-head { margin-top: 0; margin-bottom: 10px; }
.meet-lock-head .notice { margin-bottom: 8px; }
.meet-lock-head .dispatch-detail { margin-bottom: 8px; }
.meet-lock-head .dispatch-section { margin-bottom: 0; }
.meet-lock-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 12px;
}
.att-check-wrap {
  max-height: calc(100vh - 200px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.att-check-table {
  border: none;
  border-radius: 0;
  overflow: visible;
  border-collapse: separate;
  border-spacing: 0;
}
.att-check-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  white-space: nowrap;
}
.att-check-table td:first-child:not([colspan]),
.att-check-table .btn {
  white-space: nowrap;
}
.cash-sheet {
  border-collapse: separate;
  border-spacing: 0;
}
.cash-sheet thead th {
  position: sticky;
  z-index: 4;
  top: 0;
}
.cash-sheet thead tr:nth-child(2) th {
  top: var(--cash-head-1, 34px);
  z-index: 5;
}
.cash-sheet tr.is-just-saved td {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.row-revenue { background: #fce7f0; }
.row-muted { background: #ececec; }

.daily-name-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.daily-name-btn:hover { color: var(--accent-2); }
.daily-person { vertical-align: middle; font-weight: 600; white-space: nowrap; }
.daily-account-pick { font: inherit; max-width: 9em; }
.daily-actions { white-space: nowrap; vertical-align: middle; }
.daily-actions form { display: inline; }
.daily-actions .btn.small { padding: 2px 8px; font-size: 12px; margin-right: 2px; }
.daily-wxid {
  font-variant-numeric: tabular-nums;
  user-select: all;
  cursor: copy;
  white-space: nowrap;
}
.daily-wxid.is-copied { color: var(--accent-2); }
.daily-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.daily-calc input {
  background: #f4f7f5;
  color: #4a5d54;
}
.daily-calc-hint { font-weight: 400; font-size: 12px; color: var(--muted); }

.biz-gap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.biz-gap-card {
  display: block;
  text-decoration: none;
  cursor: default;
}
.biz-gap-card:hover { transform: none; }
a.biz-gap-card { cursor: pointer; }
.biz-gap-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.biz-gap-form input[type="number"] {
  width: 160px;
}
.biz-gap-kind {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.biz-gap-kind label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 13px;
  color: #3d5348;
}
.biz-gap-people { margin-top: 16px; overflow-x: auto; }
.biz-gap-name { font-weight: 600; }
.biz-gap-editing td { background: #eef6f1; }
.biz-gap-edit-row td { background: #eef6f1; padding-top: 8px; padding-bottom: 12px; }
.num-ok { color: #1f7a4d; font-weight: 600; }
@media (max-width: 800px) {
  .biz-gap-grid { grid-template-columns: 1fr; }
}
.biz-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
  align-items: stretch;
}
.biz-hub-card {
  min-height: 0;
  height: 100%;
}
.biz-hub-card .muted {
  min-height: 2.2em;
}
@media (max-width: 1100px) {
  .biz-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .biz-hub-grid { grid-template-columns: 1fr; }
}
.num-warn { color: #b45309; font-weight: 600; }
.num-absent {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #fdecec;
  color: #a3202a;
  font-weight: 600;
}
.labor-sub-title {
  margin: 22px 0 10px;
  font-size: 16px;
}
.labor-table { margin-bottom: 18px; }
.pkg-sheet input[type="number"] { width: 6.2em; text-align: right; }
.pkg-sheet input[readonly] { background: transparent; border-color: transparent; color: inherit; }
.labor-table tr.is-focus td { background: #eef6f1; }
.labor-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  align-items: stretch;
}
.labor-top-grid > .card {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.labor-top-grid .stack { max-width: none; }
.labor-profile { margin-bottom: 24px; }
.labor-profile-form { max-width: none; }
.labor-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: start;
}
.labor-fields > label { margin-bottom: 0; }
.labor-fields .labor-sub-title,
.labor-fields-ro .labor-sub-title {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.labor-fields .labor-sub-title:first-child,
.labor-fields-ro .labor-sub-title:first-child { margin-top: 0; }
.labor-span-2 { grid-column: span 2; }
.labor-span-4 { grid-column: 1 / -1; }
.labor-profile-form textarea { min-height: 56px; resize: vertical; }
.labor-profile-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.labor-profile-form.is-locked input,
.labor-profile-form.is-locked select,
.labor-profile-form.is-locked textarea {
  background: #f4f7f5;
  color: var(--ink);
  cursor: default;
}
.labor-profile-form.is-locked #labor-profile-save {
  opacity: 0.45;
  cursor: not-allowed;
}
.labor-fields-ro > div {
  display: grid;
  gap: 6px;
  min-height: 0;
}
.labor-fields-ro > div span {
  font-weight: 600;
}
.labor-fields-ro > div b {
  font-weight: 500;
  background: #f4f7f5;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
}
@media (max-width: 1100px) {
  .labor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .labor-span-2 { grid-column: span 2; }
}
@media (max-width: 800px) {
  .labor-top-grid { grid-template-columns: 1fr; }
  .labor-fields { grid-template-columns: 1fr; }
  .labor-span-2, .labor-span-4 { grid-column: auto; }
}

/* —— 首页待处理（钉钉式） —— */
.home-inbox {
  margin: 8px 0 22px;
  background: #fff8f3;
  border: 1px solid #f0c9a8;
  border-radius: 16px;
  padding: 16px 18px 10px;
}
.home-inbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.home-inbox-head h2 {
  margin: 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 7px;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.home-inbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-inbox-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px;
  border-top: 1px solid rgba(196, 92, 38, 0.15);
}
.home-inbox-item:first-child { border-top: 0; }
.home-inbox-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1;
  min-width: 200px;
}
.inbox-cat {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #9a4a1a;
  background: rgba(196, 92, 38, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 2px;
}
.home-inbox-title { font-weight: 600; color: var(--ink); }
.home-inbox-detail { font-size: 13px; margin-top: 2px; }

/* —— 首页总经理日程 —— */
.home-gm-schedule {
  margin: 8px 0 22px;
  background: #fff;
  border: 1px solid #d7e6df;
  border-radius: 16px;
  padding: 16px 18px 10px;
}
.home-gm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.home-gm-head h2 {
  margin: 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-gm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 7px;
  border-radius: 999px;
  background: #2d6a4f;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.home-gm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-gm-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px;
  border-top: 1px solid #e8f0ec;
}
.home-gm-item:first-child { border-top: 0; }
.home-gm-item.done { opacity: 0.65; }
.home-gm-item.done .home-gm-title { text-decoration: line-through; }
.home-gm-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1;
  min-width: 200px;
}
.home-gm-when {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #2d6a4f;
  min-width: 6.5em;
  padding-top: 2px;
}
.home-gm-title { font-weight: 600; color: var(--ink); }
.home-gm-detail { font-size: 13px; margin-top: 2px; }
.home-gm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.home-gm-actions form { margin: 0; }


/* —— 总经理日程日历 —— */
.cal-nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 92, 76, 0.06);
  padding: 4px;
  border-radius: 12px;
}
.cal-tab {
  padding: 8px 16px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
}
.cal-tab.active {
  background: var(--card, #fff);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(15, 92, 76, 0.12);
}
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.cal-title { font-size: 1.15rem; margin: 0 8px; }

.cal-month-layout, .cal-day-layout {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 300px);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .cal-month-layout, .cal-day-layout { grid-template-columns: 1fr; }
}
.cal-month, .cal-mini-month {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.cal-month-dow, .cal-mini-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.cal-month-week, .cal-mini-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.cal-month-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 64px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 92, 76, 0.03);
  text-decoration: none !important;
  color: var(--ink);
}
.cal-month-day:hover { border-color: var(--accent); background: rgba(15, 92, 76, 0.08); }
.cal-month-day.empty, .cal-mini-day.empty { background: transparent; min-height: 28px; }
.cal-month-day.has { background: rgba(15, 92, 76, 0.1); }
.cal-month-day.today { border-color: var(--accent); font-weight: 700; }
.cal-month-day.selected { border-color: var(--accent); background: rgba(15, 92, 76, 0.16); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day-num { font-size: 15px; }
.cal-day-badges {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cal-day-badge {
  margin-top: auto;
  font-size: 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
}
.cal-day-badges .cal-day-badge { margin-top: 0; }
.cal-day-badge.wait { background: #8a5a10; }
.cal-agenda-date .cal-day-badge,
.cal-side-title .cal-day-badge {
  margin-top: 0;
  margin-left: 6px;
  vertical-align: middle;
}
.cal-mini-day.wait { box-shadow: inset 0 -2px 0 #8a5a10; }

.cal-side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.cal-side-title { font-size: 1rem; margin: 0 0 10px; }
.cal-agenda-group { margin-bottom: 14px; }
.cal-agenda-date {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none !important;
  display: block;
  margin-bottom: 4px;
}
.cal-agenda-list { margin: 0; padding-left: 1.1em; font-size: 14px; }
.cal-agenda-list li { margin: 4px 0; }
.cal-agenda-time { color: var(--muted); font-size: 12px; margin-right: 4px; }

.cal-timeline {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  max-height: 70vh;
  overflow-y: auto;
}
.cal-slot {
  display: grid;
  grid-template-columns: 56px 1fr;
  border-bottom: 1px solid var(--line);
  min-height: 40px;
}
.cal-slot:hover { background: rgba(15, 92, 76, 0.04); }
.cal-slot.busy { background: rgba(15, 92, 76, 0.06); }
.cal-slot-time {
  padding: 8px 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.cal-slot-body {
  padding: 4px 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.cal-slot-add {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border-radius: 8px;
  background: rgba(15, 92, 76, 0.1);
  color: var(--accent);
  text-decoration: none !important;
  font-weight: 700;
  opacity: 0.55;
}
.cal-slot:hover .cal-slot-add { opacity: 1; }
.cal-event {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  background: rgba(15, 92, 76, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  margin-right: 36px;
}
.cal-event.done { opacity: 0.65; text-decoration: line-through; }
.cal-event-actions { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }
.cal-event-actions .btn { padding: 2px 8px; font-size: 12px; }
.cal-incomplete-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cal-incomplete-form input[type="date"] {
  font-size: 12px;
  padding: 2px 4px;
  max-width: 9.5em;
}
.cal-add-panel {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cal-add-panel-top {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-top: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.cal-day-split {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cal-add-panel-side {
  margin: 0;
}
.cal-day-split.is-form-first .cal-add-panel-side {
  order: -1;
}
.cal-add-panel h3 { margin: 0 0 10px; font-size: 0.95rem; }
.cal-add-form label {
  display: block;
  margin: 6px 0;
  font-size: 13px;
}
.cal-add-form input,
.cal-add-form select,
.cal-add-form textarea {
  width: 100%;
  margin-top: 2px;
  box-sizing: border-box;
}
.cal-add-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: flex-end;
}
.cal-add-form-row label {
  margin: 0;
  min-width: 88px;
  flex: 0 0 auto;
  gap: 4px;
}
.cal-add-form-row label.grow {
  flex: 1 1 160px;
  min-width: 140px;
}
.cal-add-form-row label select {
  min-width: 108px;
  width: auto;
  min-height: 42px;
  padding: 8px 10px;
  font-size: 16px;
}
.cal-add-form-row .sched-kind-block {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sched-kind-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sched-kind-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 4px;
}
.sched-kind-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: auto !important;
  padding: 6px 12px;
  border: 1px solid #c5d9cb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.sched-kind-opt:has(input:checked) {
  border-color: var(--accent);
  background: #e8f4ee;
  color: var(--accent);
}
.sched-kind-opt input {
  margin: 0;
}
.away-span-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.away-span-row .attendee-mini-btn.active {
  border-color: var(--accent);
  background: #e8f4ee;
  color: var(--accent);
}
.tag-away {
  background: #f4eee4;
  color: #8a5a1a;
}
.attendee-stack {
  padding: 10px 12px;
  border: 1px solid #d7e6df;
  border-radius: 10px;
  background: #f7fbf8;
}
.attendee-stack-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
}
.attendee-stack-head .muted {
  flex: 1 1 180px;
}
.attendee-stack-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.attendee-mini-btn {
  border: 1px solid #c5d9cb;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.attendee-mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.attendee-layer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.attendee-layer-head .attendee-layer-title {
  margin-bottom: 0;
  flex: 1 1 auto;
}
.sched-comm-box textarea {
  min-height: 132px;
  resize: vertical;
}
.sched-comm-block { margin: 2px 0 0; }
.sched-comm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.sched-comm-rows {
  display: grid;
  gap: 4px;
}
.sched-comm-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(168px, 0.8fr);
  gap: 6px;
  align-items: stretch;
}
.sched-comm-row input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 12px;
  font-size: 15px;
  border: 1px solid #c5d9cb;
  border-radius: 8px;
}
.sched-comm-who {
  min-height: 52px;
  padding: 6px 8px;
  background: #f6faf8;
  border: 1px solid #d7e6df;
  border-radius: 8px;
}
.sched-comm-who-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.sched-comm-who-head .sched-comm-all {
  padding: 2px 8px;
  font-size: 12px;
}
.sched-comm-who .track-checks {
  margin: 0;
}
.sched-comm-block:not(.is-meet) .sched-comm-who { display: none; }
.sched-comm-block:not(.is-meet) .sched-comm-row {
  grid-template-columns: 1fr;
}
.sched-comm-away textarea {
  min-height: 72px;
  resize: vertical;
}
.attendee-dept-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.attendee-dept-btn {
  border: 1px solid #c5d9cb;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 14px;
  font: inherit;
  cursor: pointer;
}
.attendee-dept-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.attendee-layer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #d7e6df;
}
.attendee-layer-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.cal-add-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 1px;
}
.cal-day-agenda {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.cal-event-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-event-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 92, 76, 0.08);
  font-size: 14px;
  border-left: 4px solid var(--accent);
}
.cal-event-row.cal-event-gm {
  background: rgba(15, 92, 76, 0.1);
  border-left-color: #0f5c4c;
}
.cal-event-row.cal-event-assist {
  background: rgba(180, 110, 30, 0.1);
  border-left-color: #b46e1e;
}
.cal-event-row.done { opacity: 0.65; }
.cal-event-row.done .cal-event-main strong { text-decoration: line-through; }
.cal-event-row.late { background: #fffaf0; }
.cal-event-when {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 13px;
}
.cal-event-row.cal-event-assist .cal-event-when { color: #8a5410; }
.cal-event-main { min-width: 0; }
.cal-role-legend {
  margin: 0 0 14px;
  line-height: 1.6;
}
.cal-role-block {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.cal-role-block-gm {
  background: rgba(15, 92, 76, 0.04);
  border-color: rgba(15, 92, 76, 0.25);
}
.cal-role-block-assist {
  background: rgba(180, 110, 30, 0.06);
  border-color: rgba(180, 110, 30, 0.28);
}
.cal-role-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.cal-role-badge.cal-role-gm {
  background: #0f5c4c;
  color: #fff;
}
.cal-role-badge.cal-role-assist {
  background: #b46e1e;
  color: #fff;
}
@media (max-width: 720px) {
  .cal-event-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .cal-add-form-row label select { width: 100%; }
}

.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.cal-mini-head {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
  text-decoration: none !important;
}
.cal-mini-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  font-size: 12px;
  border-radius: 6px;
  text-decoration: none !important;
  color: var(--ink);
}
.cal-mini-day.has { background: rgba(15, 92, 76, 0.18); font-weight: 600; }
.cal-mini-day.today { outline: 1px solid var(--accent); }

/* 合同 PDF 在线预览（不落盘下载） */
.pdf-online {
  margin-top: 12px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: #f3f2ef;
  overflow: hidden;
}
.pdf-online-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line, #ddd);
}
.pdf-online-bar button {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 13px;
}
.pdf-online-bar button:hover { background: #f6f5f2; }
.pdf-online-bar .pdf-page {
  min-width: 4.5em;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.pdf-online-status {
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}
.pdf-online-stage {
  max-height: min(75vh, 900px);
  overflow: auto;
  text-align: center;
  padding: 12px;
  background: #525659;
}
.pdf-online-stage canvas,
.pdf-online-stage .contract-image-preview {
  max-width: 100%;
  height: auto !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.pdf-online-stage .contract-image-preview {
  display: block;
  margin: 0 auto;
}
.oa-doc-preview {
  max-width: 860px;
  margin: 16px auto;
  padding: 28px 32px;
  background: #fff;
  border: 1px solid #d7e0dc;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(26, 46, 36, 0.04);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: auto;
}
.oa-doc-preview p { margin: 0 0 10px; }
.oa-doc-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.oa-doc-preview td,
.oa-doc-preview th {
  border: 1px solid #c5d2cc;
  padding: 6px 8px;
  vertical-align: top;
}
.oa-doc-preview img {
  max-width: 100%;
  height: auto;
  background: #fff;
}
.oa-doc-preview:has(.oa-sheet-preview) {
  max-width: min(1100px, 96vw);
}
.oa-sheet-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.oa-sheet-tab {
  border: 1px solid #c5d2cc;
  background: #f4f8f6;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
}
.oa-sheet-tab.on {
  background: #1a5c3e;
  color: #fff;
  border-color: #1a5c3e;
}
.oa-sheet-preview h2 {
  margin: 0 0 10px;
  font-size: 16px;
}
.oa-sheet-preview table {
  width: auto;
  min-width: 100%;
}
.oa-sheet-preview th {
  background: #eef5f1;
  font-weight: 600;
  text-align: center;
}
.oa-sheet-cell-pic {
  display: block;
  max-width: min(280px, 100%);
  max-height: 220px;
  object-fit: contain;
  margin: 4px 0;
  border: 1px solid #c5d2cc;
  border-radius: 6px;
  background: #fff;
}
.oa-sheet-pics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
}
.oa-sheet-pics h3 {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 14px;
}
.oa-sheet-pics .oa-sheet-cell-pic {
  max-width: min(420px, 100%);
  max-height: 360px;
}
.pdf-frame-fallback {
  width: 100%;
  height: min(75vh, 900px);
  border: 0;
  background: #fff;
}

/* 岗位跟踪事宜 */
.dispatch-kpis {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.dispatch-kpis a { color: inherit; text-decoration: underline; }
.dispatch-kpis a:hover { color: var(--text); }
.dispatch-kpis strong { color: var(--text); }
.dispatch-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
  gap: 16px;
  align-items: start;
}
.dispatch-split-list {
  min-width: 0;
}
.dispatch-split-side {
  position: sticky;
  top: 12px;
}
@media (max-width: 980px) {
  .dispatch-split { grid-template-columns: 1fr; }
  .dispatch-split-side { position: static; }
}
.dispatch-entry {
  margin: 0;
  padding: 16px;
  background: #f3f8f5;
  border: 1px solid #d7e6df;
  border-radius: 10px;
}
.dispatch-entry h2 { margin: 0 0 12px; font-size: 1.1rem; }
.work-entry-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.work-entry-kinds .attendee-mini-btn.active {
  border-color: var(--accent);
  background: #e8f4ee;
  color: var(--accent);
}
.visit-when {
  display: flex;
  gap: 8px;
  align-items: center;
}
.visit-when .hcal-wrap,
.visit-when input[type="time"] {
  flex: 1;
  min-width: 0;
}
.visit-span-to {
  flex: none;
  color: #5c6b66;
}
.visit-left {
  margin: -2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #1f6b4a;
}
.visit-left.is-warn {
  color: #b42318;
}
.dispatch-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 860px) {
  .dispatch-entry-grid { grid-template-columns: 1fr; }
}
.dispatch-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2ebe6;
}
.dispatch-form h3 { margin: 0; font-size: 1rem; }
.dispatch-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.week-task-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.week-task-grid {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
  align-items: start;
}
.week-task-grid-3 {
  grid-template-columns: 1.4fr 88px 186px;
}
.week-task-col-qty { max-width: 88px; }
.week-task-col-due { min-width: 140px; }
.week-task-due-row { display: flex; align-items: center; gap: 6px; }
.week-task-due-row input { flex: 1; min-width: 0; }
/* 日期框换成标假日的日历控件后外面多一层 .hcal-wrap，别把这列撑出去 */
.week-task-due-row .hcal-wrap { flex: 1; min-width: 0; }
.week-task-due-row .hcal-input { width: 100%; min-width: 0; }
.week-task-del {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}
.week-task-del:hover { color: var(--danger); }
.week-done-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.week-done-table th,
.week-done-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}
.week-done-table th {
  background: #f2f7f3;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.week-done-table tbody tr:nth-child(even) { background: #fafcfa; }
.week-done-table tbody tr:hover { background: rgba(15, 92, 76, 0.07); }
.week-done-qty { width: 88px; }
.week-done-due { width: 130px; white-space: nowrap; }
.week-done-cell {
  min-width: 280px;
  white-space: normal;
}
.week-done-cell form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.week-done-cell .btn.small { padding: 3px 10px; font-size: 12px; }
.week-done-tag { margin-right: 8px; font-weight: 600; }
.week-done-table tr.is-done .week-done-tag { color: #2f7a4d; }
.week-done-table tr.is-half .week-done-tag { color: #a86b00; }
.week-done-table tr.is-miss .week-done-tag { color: #a33; }
/* 点选后浏览器按锚点回到这一行，标一下位置免得看不出点的是哪条 */
.week-done-table tbody tr:target { background: #fff6d9; }
.week-done-table tbody tr:target td { border-color: #e0c56a; }
/* 锚点落在表格行上时上方留一点余量，不要贴着窗口顶边 */
.week-done-table tbody tr { scroll-margin-top: 90px; }
.huddle-review {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.huddle-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.huddle-review-row.is-done { border-color: #bcdcc8; background: #f4faf6; }
.huddle-review-row.is-track { border-color: #e2cfa4; background: #fdfaf2; }
.huddle-review-row:target { border-color: #e0c56a; background: #fff6d9; }
.huddle-review-row { scroll-margin-top: 90px; }
.huddle-review-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.huddle-review-title { font-size: 14px; }
.huddle-review-main .muted { font-size: 12px; }
.huddle-review-act {
  display: flex;
  align-items: center;
  gap: 8px;
}
.huddle-review-act form {
  display: flex;
  gap: 8px;
}
.huddle-review-act .btn {
  padding: 4px 12px;
  font-size: 13px;
}
.huddle-review-tag {
  font-size: 12px;
  color: var(--muted);
}
.huddle-review-row.is-done .huddle-review-tag { color: #2f7a4d; }
.huddle-review-row.is-track .huddle-review-tag { color: #a3722f; }
.week-task-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.week-task-col > span {
  font-size: 13px;
  color: var(--muted);
}
.week-task-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.week-task-fields input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}
.week-task-fields input.is-bad {
  border-color: #c45c5c;
  background: #fff6f6;
}
.week-task-err {
  margin: 0 0 8px;
  color: #8a2f2f;
  font-size: 13px;
}
.dispatch-form input,
.dispatch-form select,
.dispatch-form .dispatch-submit-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.dispatch-form textarea {
  font: inherit;
  color: var(--text);
  padding: 8px 10px;
  border: 1px solid #cfdcd5;
  border-radius: 6px;
  background: #fff;
}
.week-plan-card {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid #cfe0d5;
  border-radius: 10px;
  background: #f7fbf8;
}
.week-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.week-plan-head h2 { margin: 0; font-size: 1.05rem; }
.week-plan-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.week-plan-sum { font-size: 14px; color: var(--muted); }
.week-plan-sum.warn { color: #a33; }
.week-plan-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.week-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e2ebe6;
  border-radius: 8px;
  background: #fff;
}
.week-plan-row.state-today { border-color: #e2b96a; }
.week-plan-row.state-overdue { border-color: #d98a8a; background: #fdf6f6; }
.week-plan-row.state-done { opacity: 0.65; }
.week-plan-row.state-done strong { text-decoration: line-through; }
.week-plan-main { min-width: 0; }
.week-plan-src { color: #2f6f8f; }
.week-plan-prog { color: #2f7a4d; font-weight: 600; }
.week-plan-trail {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.week-plan-today {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.week-plan-today input { width: 62px; margin-top: 0; }
.week-plan-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 3px;
}
.week-plan-state { color: var(--text); }
.week-plan-row.state-today .week-plan-state { color: #a5741f; }
.week-plan-row.state-overdue .week-plan-state { color: #a33; }
.week-plan-row.state-done .week-plan-state { color: #2f7a4d; }
.week-plan-act {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
}
.week-plan-act input[type="text"] {
  width: 90px;
  margin-top: 0;
}
.team-work-person + .team-work-person {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #d5e4db;
}
.team-work-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.team-work-name .muted { font-size: 13px; }
.dispatch-section {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid #e2ebe6;
  border-radius: 10px;
  background: #fff;
}
.dispatch-section.dispatch-self {
  border-color: #9fc4b0;
  background: #f7fbf8;
}
.dispatch-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.dispatch-section-head h2 { margin: 0; font-size: 1.15rem; }
.dispatch-head-total {
  display: inline-block;
  margin-left: 8px;
  min-width: 1.6em;
  padding: 0 8px;
  border-radius: 6px;
  background: #e7f2ec;
  color: #0f5c4c;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  vertical-align: middle;
}
.perf-track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.perf-track-grid.is-detail {
  grid-template-columns: 1fr;
  max-width: 720px;
}
.perf-track-count {
  color: #0f5c4c;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed #0f5c4c;
}
.perf-track-count:hover { color: #0a3d33; }
.perf-track-times {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(72px, 0.8fr);
  gap: 8px;
}
@media (max-width: 720px) {
  .perf-track-grid { grid-template-columns: 1fr; }
}
.dispatch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* 已归档概览：时间段 + 关键字 + 来源分类，一条一行 */
.arc-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfeae3;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}
.arc-filter .arc-dates {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5b6b62;
  font-size: 0.88rem;
}
.arc-filter .arc-dates em { font-style: normal; color: #8a998f; }
.arc-filter input[type="date"] { padding: 4px 6px; font-size: 0.88rem; }
.arc-filter .arc-q {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 5px 8px;
  font-size: 0.88rem;
}
.arc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.arc-chip {
  padding: 3px 10px;
  border: 1px solid #d9e6de;
  border-radius: 999px;
  background: #fff;
  color: #4d6055;
  font-size: 0.82rem;
  text-decoration: none;
}
.arc-chip b { font-weight: 600; color: #2f7a55; }
.arc-chip:hover { border-color: #9fc4b0; }
.arc-chip.on { background: #2f7a55; border-color: #2f7a55; color: #fff; }
.arc-chip.on b { color: #fff; }
.arc-cats { margin-bottom: 10px; }
.arc-note { align-self: center; color: #8a998f; font-size: 0.8rem; }
.arc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e5ede8;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.arc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid #f0f4f1;
  font-size: 0.9rem;
}
.arc-row:last-child { border-bottom: none; }
.arc-row:hover { background: #f7fbf8; }
.arc-date {
  flex: 0 0 84px;
  color: #7d8c83;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.arc-cat {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef4f0;
  color: #47695a;
  font-size: 0.76rem;
  white-space: nowrap;
}
.arc-cat.cat-meeting { background: #e8f1fb; color: #2f5d8a; }
.arc-cat.cat-training { background: #f3eefb; color: #5b4a8a; }
.arc-cat.cat-msg { background: #fdf2e6; color: #8a5a22; }
.arc-cat.cat-system { background: #eef0f2; color: #5b6570; }
.arc-cat.cat-assigned { background: #fbeef0; color: #8a3a4a; }
.arc-cat.cat-self { background: #e9f5ee; color: #2f7a55; }
.arc-title {
  flex: 1 1 auto;
  min-width: 0;
  color: #24352c;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arc-title:hover { text-decoration: underline; }
.arc-src {
  flex: 0 0 auto;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a998f;
  font-size: 0.8rem;
}
.arc-act {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.arc-act form { margin: 0; }
@media (max-width: 760px) {
  .arc-row { flex-wrap: wrap; }
  .arc-title { flex: 1 1 100%; order: 3; }
  .arc-src { order: 4; }
  .arc-act { order: 5; margin-left: auto; }
}
.dispatch-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid #e8efeb;
  border-radius: 8px;
  background: #fafcfb;
}
.dispatch-item-main { flex: 1; min-width: 0; }
.dispatch-item-main a { color: inherit; text-decoration: none; }
.dispatch-item-main a:hover { color: var(--accent); }
.dispatch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
}
.dispatch-fb {
  margin-top: 6px;
  font-size: 13px;
  color: #3d5c4d;
  background: #eef6f1;
  padding: 6px 8px;
  border-radius: 6px;
}
.dispatch-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.dispatch-item-actions form { margin: 0; }
.dispatch-assign {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.track-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.track-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.track-checks label,
.dispatch-form .track-checks label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.track-checks input[type="checkbox"] {
  margin: 0;
}
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #e8efeb;
  color: #3d5c4d;
}
.tag-src { background: #f1ece2; color: #6b5630; }
.tag-open { background: #eef2f6; color: #3a4a5a; }
.tag-doing { background: #e7f0ff; color: #1f4b99; }
.tag-await_confirm { background: #fff3d6; color: #8a5a00; }
.tag-done { background: #e6f4ea; color: #1e6b3a; }
.dispatch-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.dispatch-fb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dispatch-fb-list li {
  padding: 10px 12px;
  border: 1px solid #e2ebe6;
  border-radius: 8px;
  background: #fafcfb;
}
.dispatch-detail { margin-bottom: 16px; }
.donation-wechat { margin: 10px 0 4px; }
.donation-wechat p { margin: 0 0 8px; }
.donation-wechat img {
  width: 340px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.train-content {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f6faf8;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.train-ack-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  cursor: pointer;
}
.train-ack-check input { margin: 0; }
.rec-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.rec-board .form-card { max-width: none; margin: 0; }
.rec-board .form-card h2 { margin-top: 0; }
@media (max-width: 720px) {
  .rec-board { grid-template-columns: 1fr; }
}
.rec-person { margin: 0 0 16px; }
.rec-person h3 { margin: 0 0 8px; font-size: 15px; }
.rec-lines input[type="text"] { display: block; width: 100%; margin: 0 0 8px; }
.week-plan-act form { display: flex; gap: 8px; align-items: center; margin: 0; }
.meet-task {
  margin: 0 0 14px;
  padding: 12px 12px 10px;
  border: 1px solid #e2ebe6;
  border-radius: 8px;
  background: #fafcfb;
}
.meet-task-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}
.meet-task-head strong { font-weight: 600; }
.meet-task-form { margin-top: 8px; max-width: 640px; }
.meet-task-result {
  margin: 6px 0 0;
  white-space: pre-wrap;
  line-height: 1.5;
}
.meet-task.status-done,
.meet-task.status-tracked { opacity: 0.88; }
.sched-task-assign { margin: 8px 0 0; }
.sched-task-assign-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}
.sched-task-assign-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.4fr);
  gap: 8px;
  align-items: start;
}
.sched-task-assign-row span {
  padding: 6px 8px;
  background: #f6faf8;
  border-radius: 6px;
}
.dispatch-ocr-lines {
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed #d7e6df;
}
.dispatch-ocr-lines summary {
  cursor: pointer;
  margin-bottom: 8px;
  user-select: none;
}

.app-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  box-shadow: 0 16px 40px rgba(20, 50, 40, 0.18);
}
#contract-revise .app-dialog-body {
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.app-dialog::backdrop {
  background: rgba(20, 36, 30, 0.35);
}
.app-dialog-body {
  padding: 20px 22px 18px;
}
.app-dialog-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.meet-pick-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  max-height: 280px;
  overflow: auto;
}
.meet-pick {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid #e2ebe6;
  border-radius: 8px;
  background: #fafcfb;
  cursor: pointer;
}
.meet-pick input { margin-top: 3px; }
.meet-pick span { display: grid; gap: 2px; }
.app-dialog-body textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}
.urge-dialog {
  position: relative;
  width: min(920px, calc(100vw - 32px));
}
.urge-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3d5248;
  font: inherit;
  font-size: 13px;
  line-height: 26px;
  cursor: pointer;
}
.urge-close:hover { background: #f3f7f5; }
.urge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  align-items: start;
}
.urge-stack,
.urge-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.urge-side {
  padding-top: 0;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.urge-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.urge-col h2 { margin: 0; }
.urge-col .actions { margin: 0; }
.urge-col .muted { margin: 0; line-height: 1.45; }
.urge-post-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.urge-post-head select {
  font: inherit;
  font-weight: 650;
  font-size: 16px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
@media (max-width: 760px) {
  .urge-grid { grid-template-columns: 1fr; }
  .urge-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 16px;
  }
}
.biz-owner-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.biz-progress-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.biz-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.field-src {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--muted, #5c6f64);
  line-height: 1.45;
}
.field-kind {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #e7f0ea;
  color: #1d3b2e;
  font-weight: 650;
  font-size: 13px;
}
.field-when {
  display: flex;
  gap: 8px;
}
.field-when input {
  flex: 1;
  min-width: 0;
}

.form-card.form-wide { max-width: 960px; }
.form-card.form-wide textarea { resize: vertical; min-height: 64px; }
.intent-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  align-items: start;
}
.intent-fld {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 10px;
  align-items: center;
  margin: 0;
  font-weight: 600;
}
.intent-fld input,
.intent-fld select,
.intent-fld textarea {
  width: 100%;
  margin: 0;
}
.intent-fld-wide { grid-column: 1 / -1; }
.intent-fld-wide textarea { min-height: 64px; }
@media (max-width: 760px) {
  .intent-form { grid-template-columns: 1fr; }
}
.intent-wrap { overflow-x: auto; }
.intent-table { min-width: 1300px; font-size: 13px; }
.intent-table th, .intent-table td { padding: 8px 10px; }
.intent-table .intent-seq { width: 3em; text-align: center; color: #4a5c56; }
.intent-table .intent-track-cell { white-space: nowrap; }
.pool-row { cursor: pointer; }
.pool-row:hover td { background: #f3faf6; }
.pool-row a { font-weight: 600; }
.intent-day-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
}
.intent-day-nav form { margin: 0; }
.perf-month-card.is-empty .perf-month-num { color: #8a9a93; font-weight: 600; }
.intent-cell { white-space: pre-wrap; word-break: break-word; max-width: 220px; }

/* 跟进日 + 具体时间 */
.due-when {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.due-time-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #d7e6df;
  border-radius: 10px;
  background: #f7fbf8;
}
.due-time-panel input[type="time"] {
  max-width: 160px;
}
.hcal-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
}
.hcal-input {
  min-width: 11em;
  cursor: pointer;
  background: #fff;
}
.hcal-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7c74;
}
.hcal-hint.is-rest { color: #b42318; }
/* 不放提示行的地方（周计划）靠输入框自己标红，免得多一行把三列挤错位 */
.hcal-input.hcal-on-rest { color: #b42318; border-color: #e3b3ad; }
.hcal-fix {
  border: 1px solid #b42318;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font-size: 12px;
  padding: 1px 8px;
  cursor: pointer;
}
.hcal-fix:hover { background: #fdf1f0; }
.hcal-pop {
  position: fixed;
  z-index: 120;
  width: 292px;
  padding: 10px 10px 8px;
  background: #fff;
  border: 1px solid #c5d2cc;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(26, 46, 36, 0.14);
}
.hcal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}
.hcal-nav strong { font-size: 14px; }
.hcal-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #d7e0dc;
  background: #f4f8f6;
  border-radius: 8px;
  cursor: pointer;
}
.hcal-week,
.hcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hcal-week span {
  text-align: center;
  font-size: 12px;
  color: #6b7c74;
  padding: 2px 0 6px;
}
.hcal-day {
  min-height: 38px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 2px 0 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.hcal-day span { font-size: 13px; }
.hcal-day em {
  font-style: normal;
  font-size: 10px;
  color: #b42318;
  transform: scale(0.92);
}
.hcal-day.is-out { color: #b7c4be; }
.hcal-day.is-out em { opacity: 0.7; }
.hcal-day.kind-holiday span { color: #b42318; font-weight: 600; }
.hcal-day.kind-holiday em { color: #b42318; }
.hcal-day.kind-rest span { color: #8a958f; }
.hcal-day.kind-rest em { color: #8a958f; }
.hcal-day.kind-makeup span { color: #1a5c3e; font-weight: 600; }
.hcal-day.kind-makeup em { color: #1a5c3e; }
.hcal-day.is-today { box-shadow: inset 0 0 0 1px #1a5c3e; }
.hcal-day.is-on { background: #1a5c3e; color: #fff; }
.hcal-day.is-on em,
.hcal-day.is-on span { color: #fff; }
.hcal-day.is-off {
  opacity: 0.35;
  cursor: not-allowed;
}
.hcal-day:not(.is-off):hover { background: #eef5f1; }
.hcal-day.is-on:hover { background: #164e34; }
.hcal-legend {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6b7c74;
}
.cal-dispatch-day { margin: 0 0 22px; }
.home-dispatch-today { border-color: #9fc4b0; }

/* 右下角系统提醒 */
.live-alert {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: min(360px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid #9fc4b0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 92, 76, 0.16);
  padding: 12px 14px 10px;
}
.live-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-alert-head strong { font-size: 15px; color: var(--accent); }
.live-alert-slot {
  font-size: 12px;
  color: var(--muted);
  background: #eef6f1;
  border-radius: 999px;
  padding: 1px 8px;
}
.live-alert-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.live-alert-hint { margin: 4px 0 8px; font-size: 12px; }
.live-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}
.live-alert-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 8px;
  text-decoration: none !important;
  color: inherit;
  background: #f7fbf8;
}
.live-alert-list a:hover { background: #e8f3ec; }
.live-alert-time {
  flex: 0 0 44px;
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
}
.live-alert-main { flex: 1; min-width: 0; }
.live-alert-main strong {
  display: block;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-alert-main .muted { font-size: 12px; }
.live-alert-go {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

/* OA 审批台：分组纵向，卡片横向一行多枚（钉钉式） */
.oa-desk { max-width: none; }
.oa-desk-head h1 { margin-bottom: 20px; }
.oa-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 16px 32px;
  margin: 0 0 28px;
}
.oa-top-row .oa-group { margin: 0; min-width: 0; }
.oa-desk-list { max-width: none; margin: 0; overflow-x: auto; }
.oa-row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.oa-row-actions form { display: inline; margin: 0; }
.oa-history-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
}
.oa-history-filter label { margin: 0; }
.oa-history-filter input,
.oa-history-filter select { min-width: 220px; }
.oa-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.oa-file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.oa-file-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 720px) {
  .oa-top-row { grid-template-columns: 1fr; }
}
.oa-group { margin: 0 0 28px; }
.oa-group h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7c74;
}
.oa-group h2 a {
  color: inherit;
  text-decoration: none;
}
.oa-group h2 a:hover { color: var(--accent); }
.oa-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px 14px;
}
.oa-card {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  flex: 0 0 210px;
  width: 210px;
  min-height: 56px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #d7e0dc;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(26, 46, 36, 0.04);
}
.oa-card:hover {
  border-color: #9fc4b0;
  box-shadow: 0 4px 14px rgba(15, 92, 76, 0.1);
}
.oa-ico {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.oa-ico svg { width: 20px; height: 20px; fill: #fff; }
.oa-ico-mine,
.oa-ico-todo,
.oa-ico-punch,
.oa-ico-makeup,
.oa-ico-leave,
.oa-ico-reimburse,
.oa-ico-sales_reimburse,
.oa-ico-payout,
.oa-ico-income,
.oa-ico-contract { background: #3b7ddd; }
.oa-ico-overtime { background: #e6a23c; }
.oa-ico-resign { background: #e67a3a; }
.oa-ico-invoice { background: #22a06b; }
.oa-card-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.oa-card-badge {
  flex: 0 0 auto;
  margin-left: 4px;
}
@media (max-width: 720px) {
  .oa-card { flex: 0 0 calc(50% - 7px); width: calc(50% - 7px); }
}
@media (max-width: 420px) {
  .oa-card { flex: 1 1 100%; width: 100%; }
}
.oa-slip-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 16px;
}
.oa-slip-head .oa-steps { margin: 0; }
.oa-slip-head .btn { flex: 0 0 auto; }
.oa-book-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.oa-book-row form { margin: 0; display: flex; align-items: center; gap: 8px; }
.oa-book-reject input {
  width: 14rem;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: white;
}
.slip-view[hidden],
#income-revise-btn[hidden] { display: none; }
.kv .slip-edit { display: block; }
.kv .slip-edit[hidden] { display: none; }
.kv .slip-edit input,
.kv .slip-edit select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: white;
}
.oa-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.oa-step {
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef2f0;
  color: #5c6b64;
  font-size: 13px;
}
.oa-step.done { background: #d8efe3; color: #1f6b45; }
.oa-step.now { background: #f6dfc4; color: #8a4b12; font-weight: 600; }
.oa-detail-row { display: flex; gap: 8px; margin: 0 0 8px; }
.oa-detail-row input { flex: 1; }
.oa-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.oa-thumbs img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d7e0dc;
  cursor: zoom-in;
}
.oa-img-zoom {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 28, 24, 0.72);
  cursor: zoom-out;
}
.oa-img-zoom[hidden] { display: none; }
.oa-img-zoom img {
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  background: #fff;
}
.oa-punch-layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: none;
}
.oa-punch-left {
  flex: 0 0 420px;
  max-width: 100%;
  margin: 0;
}
.oa-punch-right {
  flex: 1 1 360px;
  min-width: 0;
  margin: 0;
}
.oa-punch-month {
  max-height: 520px;
  overflow: auto;
}
.oa-punch-now {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: baseline;
  margin-bottom: 16px;
}
.oa-punch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.oa-punch-slot {
  padding: 16px;
  border: 1px solid #d7e0dc;
  border-radius: 12px;
  background: #f7faf8;
}
.oa-punch-slot h2 { margin: 0 0 4px; font-size: 16px; }
.oa-punch-actual { margin: 8px 0 4px; font-size: 28px; font-weight: 700; }
.oa-punch-result { margin: 0 0 12px; font-size: 13px; color: #5c6b64; }
.oa-punch-late, .oa-punch-early, .oa-punch-notsigned { color: #b45309; }
.oa-punch-normal { color: #1f6b45; }
.oa-punch-leave, .oa-punch-rest { color: #3b7ddd; }
@media (max-width: 860px) {
  .oa-punch-layout { flex-direction: column; }
  .oa-punch-left { flex-basis: auto; width: 100%; }
}
@media (max-width: 640px) {
  .oa-punch-grid { grid-template-columns: 1fr; }
}

/* 站内消息 */
.msg-app {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  height: calc(100vh - 130px);
  min-height: 480px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.msg-side {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fbfdfb;
}
.msg-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.msg-tabs a {
  flex: 1;
  text-align: center;
  padding: 11px 0;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none !important;
}
.msg-tabs a.on {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.msg-threads, .msg-contacts { overflow-y: auto; flex: 1; min-height: 0; }
.msg-empty-side { padding: 18px 14px; font-size: 13px; }
.msg-avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #d9ebe0;
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.msg-avatar.is-group { background: #e5dcf5; color: #4b2f8a; }
.msg-thread {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none !important;
  color: inherit;
  border-bottom: 1px solid #edf3ee;
}
.msg-thread:hover { background: #eef6f0; }
.msg-thread.on { background: rgba(15, 92, 76, 0.1); }
.msg-thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-thread-top, .msg-thread-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.msg-thread-top strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-thread-when { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.msg-thread-preview {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-unread { margin-left: 0; }
.msg-dept {
  padding: 8px 12px 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  background: #f3f8f4;
}
.msg-contact { margin: 0; }
.msg-contact button {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #edf3ee;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}
.msg-contact button:hover { background: #eef6f0; }
.msg-contact-main { display: flex; flex-direction: column; min-width: 0; }
.msg-contact-main strong { font-size: 14px; }
.msg-contact-main .muted { font-size: 12px; }

.msg-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.msg-head-title { display: flex; align-items: baseline; gap: 10px; }
.msg-head-title strong { font-size: 16px; }
.msg-head-title .muted { font-size: 13px; cursor: help; }
.msg-month-form { margin: 0; }
.msg-month-form select { padding: 5px 8px; font-size: 13px; width: auto; }
.msg-month-notice { margin: 10px 18px 0; }
.msg-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f4f8f5;
}
.msg-empty { text-align: center; margin: auto; }
.msg-day {
  align-self: center;
  font-size: 12px;
  color: var(--muted);
  background: #e5eee8;
  border-radius: 999px;
  padding: 2px 10px;
  margin: 4px 0;
}
.msg-row { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg-row.mine .msg-wrap { align-items: flex-end; }
.msg-meta { display: flex; gap: 8px; font-size: 12px; color: var(--muted); }
.msg-sender { font-weight: 600; color: #3a4a5a; }
.msg-bubble {
  background: #fff;
  border: 1px solid #d7e6df;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}
.msg-row.mine .msg-bubble { background: #d5eadd; border-color: #bcd9c7; }
.msg-bubble.is-image { padding: 4px; background: transparent; border-color: transparent; }
.msg-bubble.is-image img {
  display: block;
  max-width: 320px;
  max-height: 320px;
  border-radius: 10px;
  border: 1px solid #d7e6df;
}
.msg-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  color: inherit;
}
.msg-file-ico {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 3px 6px;
}
.msg-file-name { font-weight: 600; word-break: break-all; }
.msg-file .muted { font-size: 12px; }
.msg-read { font-size: 11.5px; color: var(--muted); }
.msg-composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--line);
  margin: 0;
}
.msg-composer textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 160px;
  font: inherit;
  padding: 9px 12px;
}
.msg-composer-field {
  flex: 1;
  position: relative;
  min-width: 0;
  display: flex;
}
.msg-composer-field textarea { width: 100%; box-sizing: border-box; }
.msg-composer .btn { flex: 0 0 auto; height: 44px; }
.msg-at-btn {
  flex: 0 0 auto;
  height: 44px;
  min-width: 44px;
  border: 1px solid #9fc4b0;
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.msg-at-btn:hover { background: #eef6f0; }
.msg-at-list {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #bcd9c7;
  border-radius: 10px;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(15, 92, 76, 0.12);
  z-index: 8;
}
.msg-at-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.msg-at-item.on, .msg-at-item:hover { background: #eef6f0; }
.msg-at { color: #1a6b4a; font-weight: 600; }
.msg-recall-btn {
  border: 1px solid #d5ddd8;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 18px;
  border-radius: 7px;
}
.msg-recall-btn:hover { background: #f4f6f5; color: #3a4a5a; border-color: #b8c4bc; }
.msg-attach {
  flex: 0 0 auto;
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px dashed #9fc4b0;
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.msg-attach:hover { background: #eef6f0; }
.msg-attach input[type="file"] { display: none; }
.msg-main { position: relative; }
/* 消息转任务 */
.msg-row.is-system { justify-content: center; }
.msg-system {
  max-width: 80%; margin: 4px auto; padding: 4px 12px; border-radius: 10px;
  background: #eef2f0; color: var(--muted); font-size: 12px; text-align: center;
}
.msg-system a { color: var(--accent); margin-left: 4px; }
.msg-task-btn {
  border: 1px solid #bcd9c7; background: #fff; color: var(--accent); font-size: 12px; cursor: pointer;
  padding: 0 8px; line-height: 18px; border-radius: 7px; opacity: 1; transition: opacity .15s, background .15s;
}
.msg-row:hover .msg-task-btn, .msg-task-btn:focus { opacity: 1; }
.msg-task-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.msg-task-mark {
  font-size: 12px; padding: 0 7px; border-radius: 7px; background: #e6f2ee; color: var(--accent); text-decoration: none;
}
.msg-task-dialog { border: 0; border-radius: 14px; padding: 20px 22px; width: 460px; max-width: 92vw; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.msg-task-dialog::backdrop { background: rgba(20, 40, 30, .35); }
.msg-task-dialog label { display: block; margin-top: 0.6rem; }
.msg-task-dialog select, .msg-task-dialog textarea, .msg-task-dialog input { width: 100%; box-sizing: border-box; margin-top: 4px; }
.msg-task-err { color: var(--danger); font-size: 13px; margin-top: 0.5rem; }
.msg-main.is-dragover::after {
  content: "松开鼠标，发送文件";
  position: absolute; inset: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--accent); border-radius: 12px;
  background: rgba(230, 242, 238, 0.92); color: var(--accent);
  font-size: 18px; font-weight: 600; pointer-events: none; z-index: 5;
}
.msg-form-err { padding: 0 18px 10px; font-size: 13px; color: var(--danger); }
.msg-blank { margin: auto; padding: 40px; text-align: center; }

/* 全站新消息提示（右上角，避开右下角系统提醒） */
.msg-toast {
  position: fixed;
  right: 20px;
  top: 72px;
  z-index: 81;
  width: min(340px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid #9fc4b0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 92, 76, 0.16);
  padding: 10px 14px 10px;
}
.msg-toast-head { display: flex; align-items: center; gap: 8px; }
.msg-toast-head strong { font-size: 14px; color: var(--accent); }
.msg-toast-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.msg-toast-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f7fbf8;
  color: inherit;
  text-decoration: none !important;
}
.msg-toast-list a:hover { background: #e8f3ec; }
.msg-toast-who { font-size: 13px; font-weight: 700; }
.msg-toast-text {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-search {
  position: relative;
  padding: 8px 10px 0;
}
.msg-search input[type="search"] {
  width: 100%;
  height: 34px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.msg-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 76, 0.12);
}
.msg-search-clear {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #d7e6df;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
}
.msg-search-clear:hover { background: #c5d9cb; color: var(--ink); }
.msg-search-results { overflow-y: auto; flex: 1; min-height: 0; }
.msg-search-results mark {
  background: #fff3b0;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.msg-search-person {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #edf3ee;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}
.msg-search-person:hover { background: #eef6f0; }
.msg-row.is-focus .msg-bubble {
  box-shadow: 0 0 0 2px var(--accent);
  background: #fff8d6;
}
.msg-row.is-focus.mine .msg-bubble { background: #e8f3c8; }
.msg-side-bar { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.msg-new-group { width: 100%; height: 34px; font-size: 13px; }
.msg-pick-list {
  margin-top: 8px; max-height: 280px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb;
}
.msg-pick-dept { padding: 7px 10px 3px; font-size: 12px; color: var(--muted); font-weight: 600; background: #f3f8f4; }
.msg-pick-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; border-bottom: 1px solid #edf3ee;
  background: transparent; font: inherit; text-align: left; cursor: pointer;
}
.msg-pick-row:hover { background: #eef6f0; }
.msg-pick-row input { margin: 0; }
.msg-pick-row .msg-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; border-radius: 8px; }
.msg-pick-row span { font-size: 14px; }
.msg-rename-row { display: flex; gap: 8px; margin-top: 4px; }
.msg-rename-row input { flex: 1; }
.msg-rename-row .btn { flex: 0 0 auto; height: 36px; }
.msg-member-list { margin-top: 10px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.msg-member-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-bottom: 1px solid #edf3ee;
}
.msg-member-row:last-child { border-bottom: 0; }
.msg-member-row .msg-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; border-radius: 8px; }
.msg-member-row strong { flex: 1; font-size: 14px; }
.msg-member-row .btn { height: 28px; font-size: 12px; }
@media (max-width: 900px) {
  .msg-app { grid-template-columns: 1fr; height: auto; }
  .msg-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .msg-list { min-height: 50vh; }
}

/* ===== 工资条（员工确认） ===== */
.tagwarn { background: #fff3d6; color: #8a5a10; padding: 2px 9px; border-radius: 7px; font-size: 13px; }
.tagdue { background: #fbe6e2; color: #a8402c; padding: 2px 9px; border-radius: 7px; font-size: 13px; }
.slip-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.slip-card > summary { list-style: none; cursor: pointer; }
.slip-card > summary::-webkit-details-marker { display: none; }
.slip-card-due { border-left: 4px solid #d9603b; }
.slip-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.slip-summary > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slip-month { font-size: 17px; }
.slip-net b { font-size: 18px; }
.slip-table { margin-top: 0.8rem; width: 100%; }
.slip-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.slip-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.slip-table tr.slip-deduct td { color: #7a4a3a; }
.slip-table tr.slip-total td { font-weight: 600; background: #f6f8f7; }
.slip-table tr.slip-note td { vertical-align: top; border-bottom: none; }
.slip-table td.slip-note-text { text-align: left; white-space: normal; line-height: 1.5; }
.slip-object > summary { display: inline-block; list-style: none; }
.slip-object > summary::-webkit-details-marker { display: none; }
.slip-object textarea { width: 100%; max-width: 520px; display: block; margin-top: 4px; }
.slip-progress { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 0.4rem 0 0.8rem; }
.slip-progress .big { font-size: 22px; font-weight: 600; }
.slip-progress .ok { color: var(--accent); }
.slip-progress .bad { color: #a8402c; }

/* 月度盈亏 */
.pnl-good { color: #1f7a52; }
.pnl-bad { color: #a8402c; }
.page-head.pnl-month-loss h1 {
  color: #c62828;
  font-weight: 700;
}
.labor-hub-card.is-loss .labor-hub-count,
.labor-hub-card.is-loss .labor-hub-title {
  color: #c62828;
  font-weight: 700;
}
.gm-perf-bar .pnl-bad { color: #c62828; font-weight: 700; }
.pnl-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.pnl-num { text-align: right; }
.labor-table.compact th.pnl-num,
.labor-table.compact td.pnl-num { width: 7.5em; }
.labor-table.compact.pnl-income-table th.pnl-num,
.labor-table.compact.pnl-income-table td.pnl-num { width: 9em; min-width: 9em; }
.labor-table.compact.pnl-income-table th.pnl-contract,
.labor-table.compact.pnl-income-table td.pnl-contract {
  min-width: 14em;
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pnl-cno { display: block; line-height: 1.4; }
.pnl-cno em { font-style: normal; color: #9a8f86; margin-right: 4px; }
.pnl-minus { color: #7a6a5f; }
.pnl-num.is-loss { color: #a8402c; font-weight: 700; }
.pnl-sheet td:first-child { width: 14em; }
.pnl-sheet td:nth-child(2) { width: 10em; font-weight: 600; }
.pnl-sheet tr.pnl-mid td { border-top: 1px solid var(--line); background: #f6faf7; }
.pnl-sheet tr.pnl-total td { border-top: 2px solid #cfe0d6; background: #eef6f1; font-size: 15px; font-weight: 700; }
/* 提成行下面那句实发对照，比正文说明再淡一档，别抢主数 */
.pnl-hint { display: inline-block; margin-top: 2px; color: #9a8f86; font-size: 12px; }

/* 固定支出录入：待填行标出来，输入框大一点方便每月自己填 */
.pnl-fill-open { border-color: #e0c48a; box-shadow: 0 0 0 1px rgba(200, 150, 50, 0.18); }
.pnl-fill-table input[name="item_name"] { border: none; background: transparent; width: 8em; }
.pnl-fill-table input[name="amount"] { max-width: 10em; font-size: 15px; }
.pnl-fill-table input[name="note"] { min-width: 12em; }
.pnl-need-row td { background: #fff8e8; }
.pnl-need { color: #a86b12; font-size: 12px; font-weight: 600; }

/* 员工社保台账：列多，输入框收窄一点，合计列标出来 */
.social-sheet th { text-align: center; font-size: 12.5px; }
.social-sheet input { max-width: 7em; }
.social-sheet input[name="employee_name"] { max-width: 6em; }
.social-sheet input[name="note"] { max-width: 8em; }
.social-sheet td.social-sum { background: #fbf0e6; }
.social-sheet th.social-sum { background: #f4e2d2; }
.social-sheet .social-total { font-weight: 600; }

/* 乐捐池 */
.donate-open {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfb;
}
.donate-open strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.donate-open-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.donate-open-form input {
  width: 9em;
  margin: 0;
  padding: 8px 10px;
}
.donate-open-foot {
  margin: 18px 0 0;
}
.donate-open-foot .donate-open-form[hidden],
.donate-open-foot .js-open-lock[hidden],
.donate-open-foot .js-open-unlock[hidden] {
  display: none !important;
}
.donate-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.donate-stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfb;
}
.donate-stat .muted { font-size: 12px; }
.donate-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.donate-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.donate-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin: 0 0 8px;
}
.donate-forms .form-card { max-width: none; margin: 0; }
.donate-forms h2 { margin: 0 0 10px; font-size: 16px; }
.donate-in { color: #1b7a3a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.donate-out { color: #c62828; font-variant-numeric: tabular-nums; white-space: nowrap; }
.donate-neg { color: #c62828; }
.donate-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.donate-ops form { margin: 0; }
@media (max-width: 800px) {
  .donate-stats, .donate-forms { grid-template-columns: 1fr; }
}

.faq-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.faq-cats a {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.faq-cats a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.faq-block { margin-bottom: 16px; }
.faq-block h2 { margin: 0 0 10px; font-size: 16px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-row {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.faq-row:hover { border-color: var(--accent); text-decoration: none; }
.faq-row h3 { margin: 0 0 4px; font-size: 15px; }
.faq-row p { margin: 0; }
.faq-form { max-width: 720px; }
#faq-answer-form.faq-form { max-width: none; }
.faq-q-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.faq-q-row .faq-part-no {
  flex: 0 0 3.4em;
  margin-top: 8px;
  font-weight: 600;
}
.faq-q-row textarea.faq-q-text {
  flex: 1 1 240px;
  min-width: 0;
  width: auto;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  resize: vertical;
}
.faq-q-row .faq-cat-select,
.faq-q-row .faq-cat-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 168px;
  margin: 0;
  font-size: 13px;
}
.faq-q-row .faq-cat-note { flex-basis: 180px; }
.faq-q-row .faq-q-remove { margin-top: 26px; flex: 0 0 auto; }
.faq-part {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 4px;
  margin: 0 0 12px;
  background: #fff;
}
.faq-part-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.faq-part-head h3, .faq-part > h3 { margin: 0 0 8px; font-size: 15px; }
.faq-part-head h3 { margin: 0; }
.faq-lead { font-size: 16px; margin-top: 0; }
.faq-pre { white-space: pre-wrap; margin: 0 0 12px; }
.faq-steps { margin: 0 0 12px; padding-left: 1.2em; }
.faq-shots { display: flex; flex-wrap: wrap; gap: 12px; }
.faq-shots figure { margin: 0; }
.faq-shots img { max-width: 280px; max-height: 220px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.faq-group-title { margin: 14px 0 6px; font-size: 14px; }
.faq-pick {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.faq-pick input[type=checkbox] { width: auto; margin-top: 4px; flex: 0 0 auto; }
.faq-pick span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.faq-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
  padding: 12px 0;
  background: #fff;
  z-index: 2;
}
.faq-actions label { margin: 0; min-width: 220px; flex: 1 1 220px; }
.faq-quote-line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.faq-quote-line p { margin: 0 0 6px; }
.faq-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.perf-sheet tr.perf-row-late td,
tr.perf-row-late td { background: #fff3bf; }
.perf-late-note { color: #8a5a00; white-space: nowrap; }
.work-company { font-size: 1.35rem; }
.work-line { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.oa-decide { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.oa-decide form { margin: 0; }
.oa-decide .btn { width: 100%; }


