* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #222; background: #f6f7f9;
}
a { color: #1a5fb4; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; background: #1f2937; color: #fff;
}
.topbar .brand a { color: #fff; font-weight: 600; }
.usernav { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.logout-form { margin: 0; }
.linklike {
  background: none; border: none; color: #9ecbff; cursor: pointer; font-size: 14px; padding: 0;
}
.linklike:hover { text-decoration: underline; }
.content { max-width: 1080px; margin: 24px auto; padding: 0 20px; }
.footer { text-align: center; color: #888; font-size: 12px; padding: 24px 0; }
.login-card {
  max-width: 360px; margin: 60px auto; background: #fff; border: 1px solid #e3e5e8;
  border-radius: 8px; padding: 28px;
}
.login-card label { display: block; margin: 14px 0 6px; font-size: 14px; }
.login-card input {
  width: 100%; padding: 8px 10px; border: 1px solid #c9ccd1; border-radius: 4px; font-size: 14px;
}
button.primary {
  margin-top: 18px; width: 100%; padding: 9px 0; background: #1a5fb4; color: #fff;
  border: none; border-radius: 4px; font-size: 15px; cursor: pointer;
}
button.primary:hover { background: #155096; }
.error { color: #b3261e; font-size: 14px; }
.warn {
  background: #fff7e6; border: 1px solid #f0c36d; border-radius: 6px; padding: 12px 16px;
}
.meta { color: #666; font-size: 13px; }
.bu-list { font-size: 16px; line-height: 2; }
.chart { width: 100%; height: 380px; background: #fff; border: 1px solid #e3e5e8; border-radius: 8px; }
.messages { list-style: none; padding: 0; }
.messages li { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; background: #eef3fa; }

/* S4 预算进度表 */
.month-nav { font-size: 14px; margin: 14px 0; line-height: 1.9; }
.month-nav .dim { font-size: 12px; }
table.report { border-collapse: collapse; width: 100%; font-size: 13px; margin: 10px 0 6px; }
table.report th, table.report td { border: 1px solid #e3e5e8; padding: 5px 8px; text-align: right; white-space: nowrap; }
table.report th { background: #f5f7fa; text-align: center; }
table.report td.lbl { text-align: left; font-weight: 500; }
table.report tr.row-region td { background: #f9fafb; font-weight: 600; }
table.report tr.row-total td { background: #eef3fa; font-weight: 700; }
.nobudget { display: inline-block; font-size: 11px; color: #b3261e; border: 1px solid #b3261e; border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.dim { color: #999; font-size: 12px; }

/* S4 来源追溯 */
table.kv { border-collapse: collapse; font-size: 13px; margin: 8px 0 14px; }
table.kv th, table.kv td { border: 1px solid #e3e5e8; padding: 4px 10px; text-align: left; }
table.kv th { background: #f5f7fa; white-space: nowrap; font-weight: 500; color: #444; }
td.sha { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
