/* 公司管理APP 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: #f4f6f9; color: #2b3445; font-size: 14px;
}
a { color: #2f6fed; text-decoration: none; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 210px; background: #1f2a44; color: #cdd6e8;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0;
}
.brand { padding: 20px 16px; font-size: 17px; font-weight: bold; color: #fff; border-bottom: 1px solid #33405e; }
.sidebar nav { flex: 1; padding: 10px 0; }
.sidebar nav a {
  display: block; padding: 11px 20px; color: #cdd6e8; font-size: 14px;
}
.sidebar nav a:hover { background: #2a3757; color: #fff; }
.sidebar nav a.active { background: #2f6fed; color: #fff; }
.user-box { padding: 14px 16px; border-top: 1px solid #33405e; font-size: 12px; }
.user-name { color: #fff; font-weight: bold; }
.user-dept { color: #8fa0bf; margin: 2px 0 6px; }
.user-links a { color: #7ea2f5; font-size: 12px; }

.content { margin-left: 210px; flex: 1; padding: 24px 28px; max-width: 1200px; }

/* ---------- 页头 ---------- */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; margin-bottom: 6px; }
.page-desc { color: #6b7688; font-size: 13px; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-card {
  background: #fff; border-radius: 8px; padding: 16px 20px; min-width: 130px;
  box-shadow: 0 1px 3px rgba(20,40,80,.08);
}
.stat-num { font-size: 26px; font-weight: bold; color: #2f6fed; }
.stat-num.stat-warn { color: #e2574c; }
.stat-label { color: #6b7688; font-size: 12px; margin-top: 2px; }

/* ---------- 面板 ---------- */
.panel {
  background: #fff; border-radius: 8px; padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20,40,80,.08);
}
.panel-head { font-size: 15px; font-weight: bold; margin-bottom: 12px; color: #1f2a44; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #eef1f6; }
th { background: #f7f9fc; color: #55617a; font-weight: 600; font-size: 13px; }
tr:hover td { background: #fafcff; }

/* ---------- 空状态 ---------- */
.empty-note {
  color: #8b94a7; background: #f7f9fc; border: 1px dashed #d5dbe6;
  border-radius: 6px; padding: 22px; text-align: center; line-height: 1.9;
}

/* ---------- 徽章与标签 ---------- */
.badge-green { background: #e6f6ec; color: #1d8a4e; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.badge-gray { background: #eef1f6; color: #8b94a7; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #eef4ff; color: #2f6fed; padding: 5px 12px; border-radius: 14px; font-size: 13px; }

/* ---------- 流程条 ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.flow-step {
  background: #eef4ff; color: #2f6fed; padding: 6px 12px; border-radius: 6px; font-size: 13px;
}
.flow-arrow { color: #b6bfd0; }

/* ---------- 表单 ---------- */
label { display: block; margin: 12px 0 4px; color: #55617a; font-size: 13px; }
input {
  width: 100%; padding: 9px 12px; border: 1px solid #d5dbe6; border-radius: 6px; font-size: 14px;
}
input:focus { outline: none; border-color: #2f6fed; }
.form-narrow { max-width: 380px; }
.btn-primary {
  margin-top: 16px; width: 100%; padding: 11px; background: #2f6fed; color: #fff;
  border: none; border-radius: 6px; font-size: 15px; cursor: pointer;
}
.btn-primary:hover { background: #275fd0; }

/* ---------- 登录页 ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, #1f2a44 0%, #2f6fed 100%);
}
.login-card {
  background: #fff; border-radius: 10px; padding: 34px 36px; width: 360px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.login-brand { font-size: 20px; font-weight: bold; text-align: center; color: #1f2a44; }
.login-sub { text-align: center; color: #8b94a7; font-size: 12px; margin: 6px 0 18px; }
.login-hint { text-align: center; color: #b0b8c8; font-size: 12px; margin-top: 16px; }

/* ---------- 提示条 ---------- */
.alert-error { background: #fdecea; color: #c0392b; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.alert-ok { background: #e6f6ec; color: #1d8a4e; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }

/* ---------- 手机适配 ---------- */
@media (max-width: 760px) {
  .sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar nav { display: flex; flex-wrap: wrap; padding: 4px 0; }
  .sidebar nav a { padding: 8px 12px; font-size: 13px; }
  .user-box { display: none; }
  .content { margin-left: 0; padding: 14px; }
  .brand { width: 100%; }
}

/* ---------- 第2步新增 ---------- */
.panel-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel-head-row .panel-head { margin-bottom: 0; }
.btn-small {
  display: inline-block; background: #2f6fed; color: #fff; padding: 6px 14px;
  border-radius: 6px; font-size: 13px; border: none; cursor: pointer;
}
.btn-small:hover { background: #275fd0; }
.btn-danger { background: #e2574c; }
.btn-danger:hover { background: #c9473d; }
.btn-ghost {
  display: inline-block; padding: 10px 18px; background: #eef1f6; color: #55617a;
  border-radius: 6px; font-size: 14px; margin-left: 10px;
}
.btn-inline { width: auto; padding: 10px 26px; }
.inline-form { display: inline; }
.link-btn { background: none; border: none; color: #e2574c; cursor: pointer; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }
.form-wide { max-width: 860px; }
.form-section {
  font-size: 15px; font-weight: bold; color: #1f2a44; margin: 20px 0 4px;
  padding-bottom: 6px; border-bottom: 2px solid #eef1f6;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid > div { min-width: 0; }
.form-hint { color: #b0b8c8; font-size: 12px; margin-top: 4px; }
.form-actions { margin-top: 20px; display: flex; align-items: center; }
select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #d5dbe6; border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff;
}
textarea { resize: vertical; }
select:focus, textarea:focus { outline: none; border-color: #2f6fed; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
.info-item { padding: 8px 0; border-bottom: 1px solid #f0f3f8; }
.info-label { display: block; color: #8b94a7; font-size: 12px; margin-bottom: 2px; }
.info-block { margin-top: 12px; }
.info-text { color: #2b3445; line-height: 1.8; white-space: pre-wrap; }
.badge-blue { background: #eef4ff; color: #2f6fed; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.text-red { color: #e2574c; font-weight: 600; }
.note-row td { background: #fafcff; color: #6b7688; font-size: 12.5px; line-height: 1.7; }
.note-label { color: #2f6fed; font-weight: bold; }
.compare-wrap { overflow-x: auto; }
.compare-rowhead { background: #f7f9fc; color: #55617a; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) {
  .info-grid, .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 第二阶段新增：审批台账追溯 / 变更对比 ---------- */
.diff-line { margin: 2px 0; line-height: 1.6; }
.diff-key { color: #2f6fed; font-weight: 600; }
.diff-old { color: #c0392b; text-decoration: line-through; }
.diff-new { color: #1d8a4e; font-weight: 600; }
.snap-json {
  background: #f7f9fc; border: 1px solid #eef1f6; border-radius: 6px;
  padding: 8px 10px; margin: 4px 0 8px; font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow-y: auto;
}
.inline-details { display: inline-block; margin-left: 8px; font-size: 12px; }

/* ---------- 第3步新增：成本管理 ---------- */
.badge-light { padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.badge-light-green { background: #e6f6ec; color: #1d8a4e; }
.badge-light-yellow { background: #fdf3e0; color: #b57c1f; }
.badge-light-red { background: #fdecea; color: #c0392b; }
.badge-light-none { background: #eef1f6; color: #8b94a7; }
.light-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}
.light-dot-green { background: #34b46f; }
.light-dot-yellow { background: #f2b53d; }
.light-dot-red { background: #e2574c; }
.light-dot-none { background: #d5dbe6; }
.cat-row td { background: #f7f9fc; font-weight: 600; }
.total-row td { background: #eef4ff; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ops-cell { white-space: nowrap; }
.ops-cell a, .ops-cell form { margin-right: 10px; }
.note-cell { color: #6b7688; font-size: 12.5px; max-width: 320px; }
.row-dim td { color: #9aa3b5; }

/* ---------- 第5步新增：财务管理 ---------- */
.money-in { color: #1d8a4e; font-weight: 600; }
.money-out { color: #e2574c; font-weight: 600; }

/* ---------- 第6步新增：OA 审批 ---------- */
.flow-step-done { background: #e6f6ec; color: #1d8a4e; }
.flow-step-active { background: #2f6fed; color: #fff; }
.flow-step-rejected { background: #fdecea; color: #c0392b; }
.flow-step-wait { background: #eef1f6; color: #8b94a7; }
.btn-approve {
  padding: 10px 26px; background: #1d8a4e; color: #fff; border: none;
  border-radius: 6px; font-size: 14px; cursor: pointer;
}
.btn-approve:hover { background: #17753f; }
.btn-reject {
  padding: 10px 26px; background: #e2574c; color: #fff; border: none;
  border-radius: 6px; font-size: 14px; cursor: pointer; margin-left: 10px;
}
.btn-reject:hover { background: #c9473d; }

/* ---------- 第7步新增：知识库 ---------- */
.kb-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
}
.kb-search { display: flex; gap: 8px; }
.kb-search input {
  width: 240px; padding: 8px 12px; border: 1px solid #d5dbe6;
  border-radius: 6px; font-size: 13px;
}
.kb-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kb-count {
  background: #fff; color: #2f6fed; border-radius: 10px;
  padding: 0 7px; margin-left: 6px; font-size: 12px;
}
.kb-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.kb-cat {
  padding: 5px 14px; border-radius: 14px; background: #eef1f6; color: #55617a;
  font-size: 13px;
}
.kb-cat.on { background: #2f6fed; color: #fff; }
.kb-meta { color: #6b7688; font-size: 13px; margin-bottom: 14px; }
.kb-content {
  white-space: pre-wrap; line-height: 1.9; background: #f7f9fc;
  border: 1px solid #eef1f6; border-radius: 6px; padding: 14px 16px;
  margin-bottom: 12px;
}
.kb-attach {
  background: #eef4ff; border-radius: 6px; padding: 10px 14px; margin-bottom: 12px;
}
.kb-review { border-top: 1px dashed #d5dbe6; margin-top: 16px; padding-top: 14px; }
tr.me-row td { background: #eef4ff; }

/* ---------- 第8.1步新增：侧边栏待办角标 / 首页工作台 ---------- */
.nav-badge {
  display: inline-block; background: #e2574c; color: #fff;
  border-radius: 9px; font-size: 11px; line-height: 1;
  padding: 3px 6px; margin-left: 6px; vertical-align: 1px;
}
.sidebar nav a.active .nav-badge { background: #fff; color: #2f6fed; }
.stat-card a { display: block; color: inherit; text-decoration: none; }
.stat-card a:hover .stat-num { color: #1d4ed8; }
.dash-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .dash-panel-grid { grid-template-columns: 1fr; } }
.dash-list li { list-style: none; padding: 9px 2px; border-bottom: 1px solid #eef1f6; }
.dash-list li:last-child { border-bottom: none; }
.dash-list li a { font-weight: 600; }
.dash-sub { color: #6b7688; font-size: 12px; margin-top: 2px; }
.dash-more { display: block; text-align: right; margin-top: 10px; font-size: 13px; }

/* Phase 1: shared workspace, accessible controls and responsive ledgers. */
:root { --blue: #235fca; --ink: #213452; --muted: #596b81; --line: #dfe7f1; --surface: #fff; }
body { background: radial-gradient(ellipse at 90% 0, #e5effe 0, transparent 38%), #f3f6fa; color: var(--ink); line-height: 1.6; }
a { color: var(--blue); }
a:hover { text-decoration: underline; }
button, input, textarea, select { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #db920b; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; background: white; padding: 12px 18px; border: 2px solid var(--blue); }
.skip-link:focus { top: 12px; }
.sidebar { width: 224px; background: linear-gradient(155deg, #213451, #182741); overflow-y: auto; z-index: 5; }
.brand { padding: 27px 18px 22px; font-size: 17px; letter-spacing: .3px; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border: 1px solid #739be1; border-radius: 8px; background: #345882; }
.brand-sub { display: block; color: #a7bbd7; font-size: 11px; font-weight: normal; margin: 8px 0 0 40px; }
.sidebar nav { padding: 18px 10px; }
.sidebar nav a { border-radius: 7px; padding: 12px; margin-bottom: 5px; }
.sidebar nav a.active { background: #306ace; box-shadow: inset 3px 0 0 #a7caff; }
.nav-index { color: #a6bada; font-size: 11px; margin-right: 13px; font-variant-numeric: tabular-nums; }
.sidebar a.active .nav-index { color: #dbe8ff; }
.user-box { padding: 18px 22px; }
.user-dept { color: #bac9de; }
.user-links { display: flex; align-items: center; gap: 10px; }
.user-links a { color: #b6d1ff; padding: 6px 0; }
.content { margin-left: 224px; min-width: 0; width: calc(100% - 224px); max-width: 1664px; padding: 30px clamp(18px, 3vw, 44px); }
.page-head { margin-bottom: 23px; }
.page-head h1 { font-size: clamp(22px, 2.1vw, 30px); line-height: 1.4; letter-spacing: -.5px; overflow-wrap: anywhere; }
.page-desc, .dash-sub, .form-hint, .info-label, .list-caption { color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 14px #18385d05; padding: 22px; }
.panel-head { font-size: 16px; font-weight: 700; line-height: 1.5; }
.panel-head-row { flex-wrap: wrap; gap: 10px; }
.panel-head-row > span { min-width: 0; }
.eyebrow { display: block; font-size: 12px; color: var(--blue); letter-spacing: 1px; margin-bottom: 7px; }
.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 8px 0 4px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { border: 1px solid var(--line); border-radius: 11px; padding: 19px; min-width: 0; }
a.stat-card { color: var(--ink); border-top: 3px solid #3a74d2; transition: border-color .18s, transform .18s; }
a.stat-card:hover { text-decoration: none; border-color: #86a9e4; transform: translateY(-2px); }
.stat-card > span, .stat-card > strong { display: block; }
.stat-num { font-size: clamp(23px,2.7vw,34px); font-variant-numeric: tabular-nums; letter-spacing: -.6px; overflow-wrap: anywhere; }
.stat-num small { font-size: 12px; font-weight: normal; color: var(--muted); }
.stat-money { font-size: clamp(21px,2.1vw,28px); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-detail, .list-caption { font-size: 12px; margin-top: 8px; }
.dash-panel-grid { align-items: start; margin-bottom: 0; }
.dash-panel-grid > .panel { min-width: 0; }
.task-line { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.task-line a { overflow-wrap: anywhere; }
.task-line > [class^="badge-"] { flex-shrink: 0; }
.dash-list li { padding: 13px 0; }
.dash-sub { line-height: 1.7; margin-top: 5px; }
.count-pill { display: inline-block; font-size: 12px; background: #e9f0fc; color: var(--blue); border-radius: 20px; padding: 1px 8px; margin-left: 5px; }
.secondary-action { display: flex; align-items: center; gap: 6px; padding: 12px 14px; margin-top: 15px; background: #eef4fd; border-radius: 8px; }
.secondary-action > span { margin-left: auto; }
.scope-note { padding: 12px 16px; background: #edf4ff; border-left: 3px solid #5385d6; color: #375578; border-radius: 5px; line-height: 1.8; font-size: 13px; margin: 0 0 18px; }
.project-context { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 5px 0 10px; }
.project-context strong { font-size: 17px; margin-right: 12px; }
.project-context .eyebrow { font-size: 10px; margin: 0; }
.project-tabs, .section-tabs { display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid #cbd9ee; margin-bottom: 22px; padding: 0 0 3px; }
.project-tabs a, .section-tabs a { white-space: nowrap; padding: 10px 15px; color: var(--muted); border-bottom: 3px solid transparent; }
.project-tabs a.active, .section-tabs a:focus { color: var(--blue); background: #e9f1fd; border-bottom-color: var(--blue); }
table { font-size: 13px; line-height: 1.65; }
th, td { padding: 11px 12px; vertical-align: top; }
th { color: #455c78; white-space: nowrap; }
td { overflow-wrap: anywhere; }
td.num { white-space: nowrap; }
.table-wrap, .compare-wrap { overflow-x: auto; max-width: 100%; border-radius: 7px; scrollbar-width: thin; }
.table-wrap table, .compare-wrap table { min-width: 720px; }
.table-wrap th, .table-wrap td, .compare-wrap th, .compare-wrap td { min-width: 95px; }
.table-wrap th:first-child, .table-wrap td:first-child, .compare-wrap th:first-child, .compare-wrap td:first-child { min-width: 145px; }
.table-wrap .ops-cell, .compare-wrap .ops-cell { min-width: 150px; }
.table-wrap[tabindex]:focus-visible, .compare-wrap[tabindex]:focus-visible { outline-offset: -3px; }
.table-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 14px 0 12px; }
.table-toolbar label { margin: 0; font-size: 12px; min-width: 105px; }
.table-toolbar label:first-child { flex: 1 1 180px; }
.table-toolbar input, .table-toolbar select { display: block; margin-top: 4px; min-height: 38px; font-size: 13px; }
.filter-count { font-size: 12px; color: var(--muted); padding-bottom: 9px; }
.table-empty { margin-top: 12px; }
.empty-note { color: #61748b; padding: 25px 20px; background: #f7faff; line-height: 1.9; }
.badge-red, .badge-yellow { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.badge-red { color: #a12d25; background: #ffe9e6; }
.badge-yellow { color: #845400; background: #fff0cc; }
.badge-gray, .badge-light-none { color: #607089; }
.badge-light-yellow { color: #855800; }
.row-dim td { color: #687991; }
.note-cell { min-width: 120px; }
form.form-wide, form.form-narrow { padding: 20px 24px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.panel form.form-narrow { padding: 0; border: 0; max-width: 640px; }
.form-section:first-child { margin-top: 0; }
.form-actions { flex-wrap: wrap; gap: 10px; }
.form-actions .btn-primary { margin-top: 0; }
.form-actions .btn-ghost, .form-actions .btn-reject { margin-left: 0; }
input[type="checkbox"], input[type="radio"] { width: auto; }
.btn-small, .btn-primary, .btn-approve, .btn-reject, .btn-ghost { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; line-height: 1.4; }
.btn-danger { color: white; border: 0; border-radius: 6px; cursor: pointer; }
[aria-disabled="true"], form[aria-busy="true"] button { opacity: .65; cursor: wait; }
.form-status { margin: 12px 0 0; color: var(--blue); font-size: 13px; }
.draft-notice { margin-bottom: 14px; background: #fff4dc; color: #765017; padding: 12px 15px; border-radius: 6px; }
.draft-notice button { margin: 5px 8px 0 0; }
.error-panel { max-width: 780px; margin: 25px auto; padding: 32px; border-top: 4px solid #d2932e; }
.error-message { font-size: 18px; margin: 20px 0 12px; overflow-wrap: anywhere; }
.draft-help { font-size: 13px; color: var(--muted); margin-top: 14px; }
.nav-toggle { background: #304969; border: 1px solid #7892b7; color: white; padding: 8px 14px; border-radius: 6px; }
.login-card { max-width: calc(100vw - 32px); }
@media (min-width: 761px) { .nav-toggle { display: none !important; } #main-nav[hidden] { display: block !important; } }
@media (max-width: 1100px) { .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { position: static; width: 100%; flex-direction: row; align-items: center; overflow: visible; }
  .brand { width: auto; flex: 1; padding: 14px 16px; border: 0; }
  .brand-sub { display: none; }
  .nav-toggle { margin-right: 16px; }
  .sidebar nav { flex: 1 1 100%; padding: 6px 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar nav a { margin: 0; padding: 11px 10px; }
  .user-box { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; width: 100%; padding: 8px 16px; }
  .user-name, .user-dept { font-size: 11px; margin: 0; }
  .user-links { margin-left: auto; }
  .user-links a { padding: 8px 0; }
  .content { margin-left: 0; width: 100%; max-width: 100%; padding: 20px 14px; }
  .panel { padding: 16px; border-radius: 9px; }
  .dashboard-hero { align-items: start; flex-direction: column; gap: 12px; }
  .dashboard-stats { gap: 10px; }
  .stat-card { padding: 13px; }
  .stat-num { font-size: 27px; }
  .stat-money { font-size: 21px; }
  .stat-detail { font-size: 11px; }
  .project-context { align-items: start; }
  .project-context > a { white-space: nowrap; }
  .project-tabs a { padding: 9px 12px; }
  .table-toolbar { gap: 8px; }
  .table-toolbar label { flex: 1 1 120px; min-width: 0; }
  .filter-count { flex: 1 1 100%; padding: 0; }
  form.form-wide, form.form-narrow { padding: 16px; }
  .kb-search { width: 100%; }
  .kb-search input { width: auto; min-width: 0; flex: 1; }
  .btn-small, .btn-ghost, .btn-primary, .btn-approve, .btn-reject { min-height: 42px; }
  .error-panel { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Progressive sections keep one business question visible at a time. */
[data-section][hidden], tr[hidden], [data-pager][hidden] { display: none !important; }
.page-section-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 20px; padding: 5px; background: #eaf0f8; border-radius: 8px; }
.page-section-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; color: #50627c; font-size: 14px; border-radius: 5px; }
.page-section-tabs a.active { color: #1f5ec7; background: white; box-shadow: 0 1px 4px #20365b16; font-weight: 600; }
.page-section-tabs a:focus-visible { outline: 2px solid #2868cd; outline-offset: 2px; }
[data-section] { min-width: 0; scroll-margin-top: 16px; }
[data-section]:focus-visible { outline: 2px solid #2868cd; outline-offset: 4px; }
details { margin-top: 10px; }
details > summary { cursor: pointer; color: #546780; font-size: 13px; padding: 9px 0; line-height: 1.6; }
details > summary:focus-visible { outline: 2px solid #2868cd; }
details[open] > summary { margin-bottom: 8px; }
details.panel > summary { font-size: 14px; font-weight: 600; padding: 0; }
.table-pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 0 0; color: #61718a; font-size: 13px; }
.table-pager .page-size { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 0 0; font-size: 13px; }
.table-pager select { width: 80px; padding: 7px; }
.table-pager button { margin: 0; padding: 7px 12px; min-height: 36px; font-size: 13px; }
.table-pager button:disabled { opacity: .45; cursor: not-allowed; }
.page-info { white-space: nowrap; }
@media (max-width: 760px) {
  .page-section-tabs { gap: 4px; margin: 12px 0 16px; }
  .page-section-tabs a { flex: 1 1 auto; padding: 8px 10px; min-height: 42px; }
  .table-pager { gap: 7px; }
  .table-pager button { padding: 8px 9px; min-height: 40px; }
  .table-pager .page-size { gap: 4px; }
  .table-pager select { width: 66px; }
}
