:root {
  --bg: #f5f6f8;
  --panel: #fff;
  --ink: #1f2329;
  --ink-2: #4e5969;
  --muted: #86909c;
  --line: #e5e6eb;
  --line-2: #ebeef5;
  --line-strong: #d9d9d9;
  --head: #f7f8fa;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-hover: #4096ff;
  --primary-weak: #e6f4ff;
  --green: #389e0d;
  --green-weak: #f6ffed;
  --amber: #d46b08;
  --amber-weak: #fff7e6;
  --red: #cf1322;
  --red-weak: #fff1f0;
  --gray-weak: #f2f3f5;
  --shadow: none;
  --radius: 2px;
  --sidebar: 208px;
  --topbar: 48px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font-family: inherit; font-size: 13px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.ar-layout { display: flex; min-height: 100vh; }
.ar-sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: var(--panel);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.ar-brand {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-2);
  font-weight: 600;
  font-size: 15px;
}
.ar-brand-mark {
  width: 26px; height: 26px; border-radius: 2px; background: var(--primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.ar-nav { padding: 8px 0; overflow-y: auto; flex: 1; }
.ar-nav-group { padding: 4px 0; }
.ar-nav-title {
  padding: 10px 16px 6px; color: var(--muted); font-size: 11px; letter-spacing: .5px;
}
.ar-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; color: var(--ink-2); border-left: 2px solid transparent;
}
.ar-nav a:hover { background: var(--head); color: var(--ink); }
.ar-nav a.active {
  background: var(--primary-weak); color: var(--primary);
  border-left-color: var(--primary); font-weight: 500;
}
.ar-nav-ico {
  width: 20px; height: 20px; border-radius: 2px; background: var(--gray-weak);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-2);
}
.ar-nav a.active .ar-nav-ico { background: #fff; color: var(--primary); }
.ar-sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 11px; }

.ar-main { margin-left: var(--sidebar); flex: 1; min-width: 0; }
.ar-topbar {
  height: var(--topbar); background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  position: sticky; top: 0; z-index: 10;
}
.ar-crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.ar-crumb strong { color: var(--ink); font-weight: 500; }
.ar-user { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 12px; }
.ar-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-weak); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}
.ar-content { padding: 18px 20px 40px; width: 100%; max-width: 1800px; margin: 0 auto; display: flex; flex-direction: column; }
.ar-content > .ar-flash { order: 0; }
.ar-content > .ar-page-head { order: 1; }
.ar-content > .ar-tabbar { order: 2; }
.ar-content > * { order: 3; }
.ar-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.ar-page-title { font-size: 20px; font-weight: 600; }
.ar-page-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.55; }
.ar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.ar-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.ar-card-head {
  min-height: 44px; padding: 8px 14px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ar-card-title { font-weight: 600; font-size: 14px; }
.ar-card-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ar-card-body { padding: 14px; }
.ar-card-body.flush { padding: 0; }
.ar-card-togglable .ar-card-head { cursor: pointer; user-select: none; }
.ar-card-togglable.is-collapsed .ar-card-body { display: none; }

.ar-btn {
  height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink); border-radius: var(--radius); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.ar-btn:hover { border-color: var(--primary); color: var(--primary); }
.ar-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ar-btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.ar-btn.danger { color: var(--red); border-color: #ffccc7; }
.ar-btn.danger:hover { background: var(--red-weak); }
.ar-btn.small { height: 26px; padding: 0 8px; font-size: 12px; }
.ar-btn.ghost { border-color: transparent; background: transparent; }
.ar-btn:disabled { opacity: .5; cursor: not-allowed; }

.ar-input, .ar-select, .ar-textarea {
  height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--ink); outline: none; width: 100%;
}
.ar-textarea { height: auto; padding: 7px 9px; resize: vertical; }
.ar-input:focus, .ar-select:focus, .ar-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.08); }
.ar-field { display: flex; flex-direction: column; gap: 5px; }
.ar-field > label { color: var(--ink-2); font-size: 12px; }
.ar-form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ar-form-row .ar-field { min-width: 160px; }
.ar-hint { color: var(--muted); font-size: 12.5px; }
.ar-error { color: var(--red); font-size: 12px; }

.ar-table-wrap { overflow: auto; border-radius: var(--radius); }
.ar-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ar-table th, .ar-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.ar-table th {
  background: var(--head); color: var(--ink-2); font-weight: 500; position: sticky; top: 0; z-index: 2;
  white-space: nowrap;
}
.ar-table tbody tr:hover { background: #fafcff; }
.ar-table .num { text-align: right; white-space: nowrap; }
.ar-table .center { text-align: center; }
.ar-table .muted { color: var(--muted); }
.ar-table tfoot td { background: var(--head); font-weight: 600; }
.ar-table.compact th, .ar-table.compact td { padding: 5px 8px; font-size: 12.5px; }
.ar-scroll { max-height: 65vh; overflow: auto; }

.ar-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 2px;
  font-size: 11px; border: 1px solid var(--line); background: var(--gray-weak); color: var(--ink-2);
  white-space: nowrap;
}
.ar-chip.ok { background: var(--green-weak); border-color: #b7eb8f; color: var(--green); }
.ar-chip.warn { background: var(--amber-weak); border-color: #ffe58f; color: var(--amber); }
.ar-chip.error { background: var(--red-weak); border-color: #ffa39e; color: var(--red); }
.ar-chip.primary { background: var(--primary-weak); border-color: #91caff; color: var(--primary); }
.ar-chip.gray { background: var(--gray-weak); border-color: var(--line); color: var(--muted); }

.ar-tabbar { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ar-tabbar a { padding: 8px 0; color: var(--ink-2); position: relative; }
.ar-tabbar a.active { color: var(--primary); font-weight: 500; }
.ar-tabbar a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); }

.ar-flash { padding: 9px 12px; border-radius: var(--radius); margin-bottom: 10px; border: 1px solid var(--line); background: var(--head); }
.ar-flash.success { background: var(--green-weak); border-color: #b7eb8f; color: var(--green); }
.ar-flash.error { background: var(--red-weak); border-color: #ffa39e; color: var(--red); }
.ar-flash.warning { background: var(--amber-weak); border-color: #ffe58f; color: var(--amber); }

.ar-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ar-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.ar-stat-label { color: var(--muted); font-size: 12.5px; }
.ar-stat-value { font-size: 24px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ar-stat-sub { color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.5; }

.ar-dept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ar-dept-card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 12px; }
.ar-dept-card h4 { font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.ar-dept-meta { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 12px; margin: 3px 0; }
.ar-dept-meta strong { font-variant-numeric: tabular-nums; }

.ar-empty { padding: 30px 14px; text-align: center; color: var(--muted); }
.ar-divider { height: 1px; background: var(--line-2); margin: 12px 0; }

.ar-rangebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 9px 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 2px;
}
.ar-range-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 2px; overflow: hidden; }
.ar-range-tabs a {
  height: 30px; display: inline-flex; align-items: center; padding: 0 12px;
  border-right: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-size: 11.5px; text-decoration: none;
}
.ar-range-tabs a:last-child { border-right: 0; }
.ar-range-tabs a:hover { background: var(--head); text-decoration: none; color: var(--ink); }
.ar-range-tabs a.active { background: var(--primary); color: #fff; }
.ar-range-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.ar-rangebar label { font-size: 11.5px; color: var(--muted); }
.ar-rangebar select {
  height: 30px; border: 1px solid var(--line-strong); border-radius: 2px;
  background: #fff; font: inherit; font-size: 12px; padding: 0 24px 0 9px; color: var(--ink-2);
  min-width: 76px;
}
.ar-month-select { width: 96px; min-width: 96px; flex: 0 0 96px; padding-right: 24px; }
.ar-spacer { flex: 1 1 auto; }

.ar-chart { width: 100%; overflow: hidden; }
.ar-chart svg { width: 100%; height: auto; display: block; }
.ar-chart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ar-span-2 { grid-column: 1 / -1; }
.ar-bar-row { display: flex; align-items: center; gap: 9px; margin: 8px 0; }
.ar-bar-label { width: 96px; flex: 0 0 96px; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-bar-track { flex: 1; height: 10px; background: var(--gray-weak); border-radius: 0; overflow: hidden; }
.ar-bar-track > span { display: block; height: 100%; background: var(--primary); min-width: 0; }
.ar-bar-value { width: 76px; flex: 0 0 76px; text-align: right; font-variant-numeric: tabular-nums; }
.ar-bar-share { width: 50px; flex: 0 0 50px; text-align: right; color: var(--muted); font-size: 11px; }
.ar-stack-chart { display: flex; align-items: flex-end; gap: 18px; min-height: 270px; padding: 4px 4px 0; overflow-x: auto; }
.ar-stack-col { display: flex; flex-direction: column; align-items: center; min-width: 58px; flex: 1 1 0; }
.ar-stack-total { font-size: 11px; color: var(--ink-2); margin-bottom: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-stack-bar { width: 40px; display: flex; flex-direction: column-reverse; background: var(--gray-weak); border-radius: 1px; overflow: hidden; }
.ar-stack-seg { width: 100%; min-height: 1px; }
.ar-stack-label { margin-top: 7px; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.ar-stack-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--ink-2); }
.ar-stack-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ar-stack-legend i { width: 9px; height: 9px; border-radius: 1px; display: inline-block; }

.ar-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ar-donut { width: 176px; height: 176px; border-radius: 50%; position: relative; flex: 0 0 176px; }
.ar-donut-inner {
  position: absolute; inset: 34px; background: #fff; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.ar-donut-label { font-size: 10.5px; color: var(--muted); }
.ar-donut-value { font-size: 17px; font-weight: 600; margin: 2px 0; font-variant-numeric: tabular-nums; }
.ar-donut-legend { flex: 1; min-width: 230px; }
.ar-donut-item { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.ar-donut-item:last-child { border-bottom: 0; }
.ar-donut-item i { width: 9px; height: 9px; border-radius: 1px; flex: 0 0 9px; }
.ar-donut-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-donut-item .amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-donut-item .pct { width: 50px; text-align: right; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.ar-line-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line-2); font-size: 11px; color: var(--ink-2);
}
.ar-line-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ar-line-legend i { width: 12px; height: 2px; display: inline-block; }

.ar-rank { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gray-weak); color: var(--ink-2); font-size: 11px; }
.ar-rank.top { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.ar-rank-bar { height: 8px; background: var(--gray-weak); min-width: 90px; overflow: hidden; }
.ar-rank-bar > span { display: block; height: 100%; background: var(--primary); }

.ar-year-filter { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.ar-year-filter .ar-select { width: 96px; height: 28px; }
.ar-project-note { padding: 8px 14px 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.ar-project-pivot { table-layout: fixed; min-width: 1060px; }
.ar-project-pivot th, .ar-project-pivot td { white-space: nowrap; }
.ar-project-pivot td:nth-child(2) { white-space: normal; }
.ar-project-pivot tr.is-diff td { color: var(--muted); }
.ar-first-month { margin-left: 2px; font-size: 10.5px; color: var(--primary); }

.ar-dept-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ar-dept-employee-card > summary,
.ar-dept-project-card > summary { list-style: none; cursor: pointer; }
.ar-dept-employee-card > summary::-webkit-details-marker,
.ar-dept-project-card > summary::-webkit-details-marker { display: none; }
.ar-dept-employee-card > summary:hover .ar-card-title,
.ar-dept-project-card > summary:hover .ar-card-title { color: var(--primary); }
.ar-dept-head-right { display: flex; align-items: center; gap: 8px; }
.ar-dept-caret::before { content: "▸"; font-size: 11px; color: var(--muted); }
.ar-dept-employee-card[open] .ar-dept-caret::before,
.ar-dept-project-card[open] .ar-dept-caret::before { content: "▾"; }

.ar-dept-rank-item { border-bottom: 1px dashed var(--line-2); }
.ar-dept-rank-item:last-child { border-bottom: 0; }
.ar-dept-rank-summary { list-style: none; cursor: pointer; }
.ar-dept-rank-summary::-webkit-details-marker { display: none; }
.ar-dept-rank-summary::after { content: "▸"; font-size: 11px; color: var(--muted); flex: 0 0 auto; margin-left: 2px; }
.ar-dept-rank-item[open] .ar-dept-rank-summary::after { content: "▾"; }
.ar-dept-rank-summary:hover .ar-bar-label { color: var(--primary); }
.ar-dept-rank-detail { padding-bottom: 10px; }
.ar-dept-rank-meta { margin: 0 0 6px 105px; font-size: 11px; color: var(--muted); }
.ar-dept-rank-scroll { max-height: 360px; }
.ar-dept-rank-detail .ar-rank-bar { min-width: 80px; }

.ar-dept-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ar-dept-work-card {
  border: 1px solid var(--line); background: #fff; border-radius: 2px; padding: 14px;
  display: flex; flex-direction: column;
}
.ar-dept-work-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ar-dept-work-name { font-size: 14px; font-weight: 600; }
.ar-dept-work-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ar-flow {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding: 6px 8px;
  background: var(--head); border-radius: 2px; font-size: 11px; color: var(--muted);
}
.ar-flow span { display: inline-flex; align-items: center; gap: 4px; }
.ar-flow span.done { color: var(--green); }
.ar-flow span.active { color: var(--primary); font-weight: 600; }
.ar-flow span.warn { color: var(--amber); font-weight: 600; }
.ar-dept-work-issues { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ar-dept-work-actions {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line-2);
}
.ar-dept-work-actions form { display: inline; }

.ar-month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ar-month-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 2px;
  padding: 14px; color: inherit; text-decoration: none; transition: border-color .15s;
}
.ar-month-card:hover { border-color: #91caff; color: inherit; text-decoration: none; }
.ar-month-card.recent { border-color: var(--primary); }
.ar-month-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ar-month-title { font-size: 15px; font-weight: 600; }
.ar-month-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ar-month-status { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.ar-month-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ar-month-numbers span { display: block; font-size: 11px; color: var(--muted); }
.ar-month-numbers b {
  display: block; font-size: 15px; font-weight: 600; margin-top: 2px;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ar-month-numbers small { font-size: 11px; color: var(--muted); font-weight: 400; }
.ar-month-progress { margin-top: 12px; }
.ar-month-footer { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 6px; }

.ar-stepper {
  display: flex; margin-bottom: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 2px; overflow-x: auto;
}
.ar-step-item {
  flex: 1; min-width: 150px; display: flex; gap: 8px; align-items: center;
  padding: 10px 12px; border-right: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none;
}
.ar-step-item:last-child { border-right: 0; }
.ar-step-item:hover { background: var(--head); color: var(--ink); text-decoration: none; }
.ar-step-item.active { background: var(--primary-weak); }
.ar-step-label { display: block; font-size: 12.5px; font-weight: 600; }
.ar-step-hint { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.ar-step-item.active .ar-step-label { color: var(--primary); }
.ar-step-item.todo .ar-step-num { background: var(--gray-weak); color: var(--muted); }
.ar-step-item.done .ar-step-num { background: var(--green-weak); color: var(--green); }
.ar-step-item.active .ar-step-num { background: var(--primary); color: #fff; }
.ar-step-item.warn .ar-step-num { background: var(--amber-weak); color: var(--amber); }
.ar-step-info {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  padding: 12px; border-bottom: 1px solid var(--line-2);
}
.ar-step-info > div { display: flex; flex-direction: column; gap: 2px; }
.ar-step-info span { font-size: 11px; color: var(--muted); }
.ar-step-info b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.ar-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr); gap: 14px; }
.ar-step { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.ar-step:last-child { border-bottom: 0; padding-bottom: 0; }
.ar-step-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary-weak); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: 0 0 24px;
}
.ar-step-title { font-size: 12.5px; font-weight: 600; }
.ar-step-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.65; }
.ar-gate { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.ar-gate:last-child { border-bottom: 0; }
.ar-gate-ico {
  width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; background: var(--gray-weak); color: var(--muted); flex: 0 0 20px;
}
.ar-gate-ico.ok { background: var(--green-weak); color: var(--green); }
.ar-gate-ico.warn { background: var(--amber-weak); color: var(--amber); }
.ar-gate-label { flex: 1; color: var(--ink-2); }
.ar-gate-val { font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 1200px) {
  .ar-split { grid-template-columns: minmax(0, 1fr); }
}

.ar-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; align-items: center;
  justify-content: center; z-index: 100; padding: 20px;
}
.ar-modal-mask.open { display: flex; }
.ar-modal {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  width: min(720px, 96vw); max-height: 88vh; overflow: auto; box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.ar-modal-head { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.ar-modal-body { padding: 16px; }
.ar-modal-foot { padding: 12px 16px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }

.ar-issue { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); padding: 9px 11px; margin-bottom: 8px; }
.ar-issue.blocker { border-left-color: var(--red); background: #fffafa; }
.ar-issue.warning { border-left-color: var(--amber); background: #fffdf7; }
.ar-issue.info { border-left-color: var(--primary); background: #fafdff; }
.ar-issue-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ar-issue-code { font-size: 11px; color: var(--muted); }
.ar-issue-msg { font-size: 12px; color: var(--ink-2); }
.ar-issue-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ar-issue.resolved { opacity: .6; }

.ar-inline-form { display: inline-flex; gap: 6px; align-items: center; }
.ar-inline-form input, .ar-inline-form select { height: 26px; padding: 0 6px; font-size: 12px; }
.ar-mini-input { width: 88px; height: 26px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 2px; }
.ar-reason { min-width: 140px; }

.ar-drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.25); display: none; z-index: 90; }
.ar-drawer-mask.open { display: block; }
.ar-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 94vw); background: #fff;
  border-left: 1px solid var(--line); z-index: 91; transform: translateX(100%); transition: transform .16s ease;
  display: flex; flex-direction: column;
}
.ar-drawer.open { transform: translateX(0); }
.ar-drawer-head { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.ar-drawer-body { padding: 14px 16px; overflow: auto; flex: 1; }

.ar-source-grid { font-size: 11px; }
.ar-source-grid td { white-space: pre-wrap; }

.ar-toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.ar-toast { background: #1f2329; color: #fff; padding: 9px 12px; border-radius: 2px; font-size: 12px; max-width: 360px; }
.ar-toast.error { background: var(--red); }
.ar-toast.success { background: var(--green); }

.ar-progress { height: 4px; background: var(--line-2); border-radius: 0; overflow: hidden; }
.ar-progress > span { display: block; height: 100%; background: var(--primary); }

.ar-mono { font-variant-numeric: tabular-nums; }
.ar-right { text-align: right; }
.ar-nowrap { white-space: nowrap; }
.ar-mt { margin-top: 12px; }
.ar-mb { margin-bottom: 12px; }
.ar-flex { display: flex; gap: 10px; align-items: center; }
.ar-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ar-wrap { flex-wrap: wrap; }
.ar-muted { color: var(--muted); }
.ar-small { font-size: 12.5px; }
.ar-danger-text { color: var(--red); }
.ar-warn-text { color: var(--amber); }

@media (max-width: 1500px) {
  .ar-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1400px) {
  .ar-dept-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .ar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .ar-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-step-item { min-width: 132px; }
  .ar-step-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ar-dept-work-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ar-month-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ar-sidebar { position: static; width: 100%; height: auto; flex-direction: row; overflow-x: auto; }
  .ar-layout { display: block; }
  .ar-main { margin-left: 0; }
  .ar-nav { display: flex; padding: 0; }
  .ar-nav-group { display: flex; }
  .ar-nav-title, .ar-sidebar-foot { display: none; }
  .ar-dept-grid, .ar-stats { grid-template-columns: 1fr; }
}

/* ===== 原表在线预览（与工资平台同一套标准：网格 + PDF 打印版、并排可拖宽、拖动画布、Ctrl+滚轮分侧缩放） ===== */
:root { --sf-preview-width: 45vw; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 120; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(680px, 92vw); background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.12); transform: translateX(105%); transition: transform .2s; z-index: 130; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.drawer-title { font-weight: 600; font-size: 13px; }
.icon-btn { border: 1px solid transparent; background: transparent; width: 26px; height: 26px; line-height: 1; font-size: 15px; color: var(--muted); border-radius: 2px; cursor: pointer; }
.icon-btn:hover { background: #f5f5f5; color: var(--ink); }
body.sf-preview-open .ar-main { margin-right: var(--sf-preview-width); min-width: 0; transition: margin-right .16s ease; }
body.sf-preview-open .ar-main .ar-content { min-width: 0; }
body.sf-preview-open.sf-preview-full .ar-main { margin-right: 0; }
.drawer.sf-preview { width: var(--sf-preview-width); min-width: 340px; max-width: 96vw; height: 100vh; transition: width .16s ease; }
.drawer.sf-preview.sf-full { width: 96vw; }
.sf-preview-overlay { background: transparent !important; pointer-events: none !important; }
.sf-preview-resizer { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 6; background: transparent; }
.sf-preview-resizer:hover { background: rgba(22,119,255,.16); }
body.sf-resizing { cursor: col-resize; user-select: none; }
body.sf-resizing .drawer.sf-preview, body.sf-resizing .ar-main { transition: none !important; }
.sf-preview-hint { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) {
  body.sf-preview-open .ar-main { margin-right: 0; }
  .drawer.sf-preview { width: min(92vw, 720px); }
  .sf-preview-resizer { display: none; }
}
.sf-preview-tabs { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: #fafafa; flex-wrap: wrap; flex: none; }
.sf-tab { border: 0; background: transparent; padding: 5px 8px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; }
.sf-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.sf-preview-body { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #eef1f5; }
.sf-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sf-pane[hidden] { display: none; }
.sf-sheet-tabs { display: flex; gap: 2px; padding: 5px 8px 0; background: #f5f7fa; border-bottom: 1px solid var(--line); overflow: auto; flex: none; }
.sf-sheet-tab { border: 1px solid var(--line); border-bottom: 0; background: #fff; padding: 4px 10px; font-size: 11.5px; border-radius: 2px 2px 0 0; white-space: nowrap; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.sf-sheet-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sf-grid-wrap { flex: 1; min-height: 0; overflow: auto; background: #fff; cursor: grab; touch-action: none; outline: none; }
.sf-grid-wrap.sf-panning { cursor: grabbing; user-select: none; }
body.sf-panning { user-select: none; }
.sf-grid { display: inline-block; min-width: 100%; }
.sf-sheet-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; background: #fff; }
.sf-sheet-table td { border-right: 1px solid #e1e5ea; border-bottom: 1px solid #e1e5ea; padding: 1px 4px; overflow: hidden; white-space: pre; vertical-align: middle; background: #fff; box-sizing: border-box; }
.sf-sheet-table td.sf-num { text-align: right; }
.sf-sheet-table td.sf-formula { color: #7c3aed; }
.sf-sheet-table td.sf-hit { outline: 2px solid #f59e0b; outline-offset: -2px; background: #fff7cc !important; }
.sf-sheet-table td.sf-frozen-row { position: sticky; z-index: 3; }
.sf-sheet-table td.sf-frozen-col { position: sticky; z-index: 2; }
.sf-sheet-table td.sf-frozen-row.sf-frozen-col { z-index: 4; }
.sf-pdf-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: #fafafa; flex: none; flex-wrap: wrap; }
.sf-pdf-wrap { flex: 1; min-height: 0; overflow: auto; background: #e7ebf0; cursor: grab; touch-action: none; padding: 10px; outline: none; }
.sf-pdf-wrap.sf-panning { cursor: grabbing; user-select: none; }
.sf-pdf-page { display: block; margin: 0 auto 12px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.12); max-width: none; }

/* ===== 第一步部门行展开（个人明细） ===== */
.ar-dept-row { cursor: pointer; }
.ar-dept-row.is-open { background: #f2f8ff; }
.ar-dept-row.is-open:hover { background: #eaf4ff; }
.ar-dept-row .ar-expander { display: inline-block; width: 14px; margin-right: 4px; color: var(--muted); font-size: 11px; }
.ar-dept-detail > td { background: #f5f7fa; padding: 0 !important; border-bottom: 1px solid var(--line); }
.ar-people-panel { padding: 10px 14px 12px; }
.ar-people-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px; font-size: 12px; }
.ar-people-panel .ar-table { background: #fff; }
.ar-step1-table { min-width: 1300px; }

.ar-stats.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ar-people-group { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.ar-people-group-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--head); border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.ar-people-group-head .ar-muted { font-size: 12.5px; }
.ar-person-table { margin: 0; }
.ar-person-table td, .ar-person-table th { padding: 7px 12px; }
@media (max-width: 900px) { .ar-stats.is-three { grid-template-columns: 1fr; } }

.ar-person-title { padding: 12px 14px; text-align: center; font-weight: 600; font-size: 15px; background: var(--head); border-bottom: 1px solid var(--line-2); }
.ar-person-dept { background: var(--head); font-weight: 600; vertical-align: middle; border-right: 1px solid var(--line); }
.ar-person-table tbody tr:hover .ar-person-dept { background: var(--head); }
.ar-person-table td, .ar-person-table th { padding: 7px 12px; }

/* ===== 第2步审核原型 ===== */
.ar-rp-depts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ar-rp-dept-tab { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink-2); font-size: 13px; }
.ar-rp-dept-tab:hover { border-color: var(--primary); color: var(--primary); }
.ar-rp-dept-tab.active { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }
.ar-rp-mini { display: inline-flex; gap: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.ar-rp-mini-b { color: var(--red); }
.ar-rp-mini-w { color: var(--amber); }
.ar-rp-mini-i { color: var(--muted); font-weight: 400; }
.ar-rp-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.ar-rp-main { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ar-review-form-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; flex-wrap: wrap; }
.ar-review-form-wrap { max-height: calc(100vh - 340px); }
.ar-review-form { min-width: 1180px; }
.ar-review-form td, .ar-review-form th { padding: 7px 9px; }
.ar-rp-project { background: #fafcff; }
.ar-rp-project:hover { background: #f2f8ff; }
.ar-rp-member td { color: var(--ink-2); }
.ar-issue-cell { white-space: nowrap; }
.ar-rp-chip { display: inline-block; min-width: 34px; text-align: center; padding: 1px 5px; margin: 1px 2px 1px 0; font-size: 10.5px; border-radius: 2px; border: 1px solid; cursor: default; }
.ar-rp-chip.blocker { color: var(--red); border-color: #ffccc7; background: var(--red-weak); }
.ar-rp-chip.warning { color: var(--amber); border-color: #ffe58f; background: var(--amber-weak); }
.ar-rp-chip.info { color: var(--primary); border-color: #bae0ff; background: var(--primary-weak); }
.ar-rp-flash { animation: rpFlash 1.6s ease; }
@keyframes rpFlash { 0%, 60% { background: #fff3b0 !important; } 100% { background: transparent; } }
.ar-rp-panel { position: sticky; top: 12px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ar-rp-panel-head { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.ar-rp-filters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ar-rp-filter { border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 11.5px; padding: 3px 8px; border-radius: 2px; cursor: pointer; font-family: inherit; }
.ar-rp-filter.active { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }
.ar-rp-panel-body { flex: 1; min-height: 0; overflow: auto; padding: 10px; }
.ar-rp-panel-foot { padding: 8px 12px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-rp-issue { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px; font-size: 12px; }
.ar-rp-issue.blocker { border-left-color: var(--red); background: #fffafa; }
.ar-rp-issue.warning { border-left-color: var(--amber); background: #fffdf7; }
.ar-rp-issue.info { border-left-color: var(--primary); background: #fafdff; }
.ar-rp-issue.is-resolved { opacity: .6; }
.ar-rp-issue-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.ar-rp-sev { font-size: 10.5px; font-weight: 600; padding: 1px 5px; border-radius: 2px; }
.ar-rp-sev.blocker { color: var(--red); background: var(--red-weak); }
.ar-rp-sev.warning { color: var(--amber); background: var(--amber-weak); }
.ar-rp-sev.info { color: var(--primary); background: var(--primary-weak); }
.ar-rp-code { font-size: 11px; color: var(--muted); }
.ar-rp-proto { font-size: 10px; color: #7c3aed; border: 1px solid #d3adf7; background: #f9f0ff; padding: 0 4px; border-radius: 2px; }
.ar-rp-dept { margin-left: auto; font-size: 11px; color: var(--muted); }
.ar-rp-msg { color: var(--ink-2); line-height: 1.5; }
.ar-rp-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.ar-rp-actions { display: flex; gap: 6px; margin-top: 6px; }
.ar-rp-footbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-2); background: var(--head); flex-wrap: wrap; }
/* 方案 B */
.ar-rp-b-split { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 14px; align-items: start; }
.ar-rp-queue { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); position: sticky; top: 12px; }
.ar-rp-queue-tools { padding: 10px 12px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.ar-rp-queue-list { flex: 1; min-height: 0; overflow: auto; padding: 10px; }
.ar-rp-queue-item { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); padding: 8px 10px; margin-bottom: 7px; cursor: pointer; font-size: 12px; }
.ar-rp-queue-item.blocker { border-left-color: var(--red); }
.ar-rp-queue-item.warning { border-left-color: var(--amber); }
.ar-rp-queue-item.info { border-left-color: var(--primary); }
.ar-rp-queue-item.active { box-shadow: 0 0 0 2px var(--primary-weak); border-color: var(--primary); }
.ar-rp-queue-item.is-resolved { opacity: .55; }
.ar-rp-queue-top { display: flex; gap: 6px; align-items: center; margin-bottom: 3px; flex-wrap: wrap; }
.ar-rp-queue-msg { color: var(--ink-2); line-height: 1.45; }
.ar-rp-dept-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ar-rp-dept-form[hidden] { display: none; }
/* 方案 C */
.ar-rp-c-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.ar-rp-issues-strip { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ar-rp-strip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.ar-rp-strip-body { max-height: 260px; overflow: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.ar-rp-strip-body .ar-rp-issue { margin-bottom: 0; }
@media (max-width: 1200px) {
  .ar-rp-split { grid-template-columns: 1fr; }
  .ar-rp-panel { position: static; max-height: none; }
  .ar-rp-b-split { grid-template-columns: 1fr; }
  .ar-rp-queue { position: static; max-height: 380px; }
}

/* 方案 D：Excel 式一项目一行 + 行内改数 */
.ar-rp-d-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.ar-rp-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.ar-rp-d-table { min-width: 1320px; }
.ar-rp-d-row.has-blocker td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.ar-rp-d-row.has-warning td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.ar-rp-d-row.has-blocker { background: #fffafa; }
.ar-rp-d-row.has-warning { background: #fffdf7; }
.ar-rp-d-issues { white-space: nowrap; }
.ar-rp-more { display: inline-block; margin-left: 2px; font-size: 11px; color: var(--muted); }
.ar-rp-link { border: 0; background: transparent; color: var(--primary); cursor: pointer; font-family: inherit; font-size: 13px; padding: 0; }
.ar-rp-link:hover { text-decoration: underline; }
.ar-rp-editrow > td { padding: 0 !important; background: #f7fbff; border-bottom: 1px solid var(--line); }
.ar-edit-panel { padding: 12px 16px; }
.ar-edit-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ar-edit-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ar-edit-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.ar-edit-fields .ar-input { width: 150px; height: 30px; }
.ar-edit-fields .ar-edit-wide .ar-input { width: 260px; }
.ar-edit-actions { display: flex; gap: 8px; margin-top: 10px; }
.ar-rp-medit > td { background: #f7fbff; padding: 8px 10px !important; }
.ar-rp-mini-edit { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ar-rp-mini-edit label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.ar-rp-mini-edit .ar-input { width: 110px; height: 28px; }
.ar-rp-member-mask { position: fixed; inset: 0; background: rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .16s; z-index: 139; }
.ar-rp-member-mask.open { opacity: 1; pointer-events: auto; }
.ar-rp-member-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(600px, 94vw); background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.14); transform: translateX(105%); transition: transform .18s ease; z-index: 140; display: flex; flex-direction: column; }
.ar-rp-member-drawer.open { transform: none; }
.ar-rp-member-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ar-rp-member-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; }

.ar-rp-general { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); background: var(--head); border-radius: var(--radius); font-size: 12px; }
.ar-rp-general-title { color: var(--muted); font-size: 12px; }
.ar-rp-general-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 2px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.ar-rp-general-item.blocker { border-left: 3px solid var(--red); }
.ar-rp-general-item.warning { border-left: 3px solid var(--amber); }

.ar-rp-d-issues { vertical-align: top; }
.ar-rp-d-issues .ar-rp-chip { cursor: pointer; }
.ar-rp-issue-line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 2px; background: #fff; font-size: 11.5px; line-height: 1.5; }
.ar-rp-issue-line.warning { border-left: 3px solid var(--amber); }
.ar-rp-issue-line.blocker { border-left: 3px solid var(--red); }
.ar-rp-issue-line.info { border-left: 3px solid var(--primary); }
.ar-rp-issue-line:last-child { border-bottom: 0; }
.ar-rp-issue-text { flex: 1; min-width: 0; color: var(--ink-2); white-space: normal; }
.ar-rp-issue-line.is-resolved { opacity: .55; }
.ar-rp-issue-line.is-resolved .ar-rp-issue-text { text-decoration: line-through; }
.ar-rp-resolve { flex: none; white-space: nowrap; height: 26px; padding: 0 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--primary) !important; color: var(--primary) !important; background: #fff !important; border-radius: 2px; }
.ar-rp-resolve:hover { background: var(--primary-weak) !important; }
.ar-rp-resolve.is-resolved { border-color: #b7eb8f !important; color: var(--green) !important; background: var(--green-weak) !important; opacity: 1; }
.ar-rp-general-item.is-resolved { opacity: .55; }

.ar-rp-pick { flex: none; width: 14px; height: 14px; margin: 3px 0 0; accent-color: var(--primary); cursor: pointer; }

.ar-rp-members { white-space: normal; min-width: 130px; }
.ar-rp-member-name { display: block; margin: 0; line-height: 1.6; font-size: 12px; color: var(--ink-2); }
.ar-rp-member-name .ar-muted { margin-left: 4px; font-size: 10.5px; }
.ar-rp-done-toggle { border: 0; background: transparent; color: var(--muted); font-size: 11.5px; cursor: pointer; padding: 2px 0; font-family: inherit; }
.ar-rp-done-toggle:hover { color: var(--primary); }
.ar-edit-members { margin-top: 12px; }
.ar-edit-members-title { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.ar-rp-mini-input { width: 96px; height: 28px; text-align: right; }
[hidden] { display: none !important; }
.ar-rp-norepeat { flex: none; font-size: 10.5px; color: var(--green); border: 1px dashed #b7eb8f; background: var(--green-weak); padding: 1px 5px; border-radius: 2px; white-space: nowrap; }

.ar-rp-edit-mask { position: fixed; inset: 0; background: rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .16s; z-index: 139; }
.ar-rp-edit-mask.open { opacity: 1; pointer-events: auto; }
.ar-rp-edit-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(640px, 94vw); background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.14); transform: translateX(105%); transition: transform .18s ease; z-index: 140; display: flex; flex-direction: column; }
.ar-rp-edit-drawer.open { transform: none; }

/* ===== 第3步确认原型 / 审核报告 ===== */
.ar-report-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; background: #fff; }
.ar-report-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; background: var(--head); cursor: pointer; list-style: none; }
.ar-report-head::-webkit-details-marker { display: none; }
.ar-report-head::after { content: "▸"; margin-left: auto; color: var(--muted); }
details[open] > .ar-report-head::after { content: "▾"; }
.ar-report-table { margin: 0; }
.ar-report-table th, .ar-report-table td { padding: 6px 9px; vertical-align: top; }
.ar-report-table tr.is-resolved { opacity: .65; }
.ar-report-msg { white-space: normal; line-height: 1.5; }

.ar-report-type { padding: 6px 12px 10px; border-bottom: 1px dashed var(--line-2); }
.ar-report-type:last-child { border-bottom: 0; }
.ar-report-type-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 6px; font-size: 12.5px; }
.ar-report-type-head strong { color: var(--primary-dark); }

/* ===== 归档管理 ===== */
.ar-filterbar {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px;
}
.ar-filterbar .ar-field { min-width: 120px; }
.ar-filterbar .ar-field.wide { min-width: 220px; flex: 1 1 260px; }
.ar-filterbar .ar-field > label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.ar-filter-actions { display: flex; gap: 6px; align-items: center; }
.ar-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12px; }
.ar-pager-links { display: flex; gap: 6px; align-items: center; }
.ar-pager-links a, .ar-pager-links span {
  min-width: 28px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink-2);
}
.ar-pager-links .active { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }
.ar-status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 2px; font-size: 11px; border: 1px solid var(--line); white-space: nowrap; }
.ar-status.archived, .ar-status.ok { background: var(--green-weak); border-color: #b7eb8f; color: var(--green); }
.ar-status.candidate, .ar-status.warn { background: var(--amber-weak); border-color: #ffe58f; color: var(--amber); }
.ar-status.missing, .ar-status.error { background: var(--red-weak); border-color: #ffa39e; color: var(--red); }
.ar-status.exempt { background: var(--gray-weak); border-color: var(--line); color: var(--ink-2); }
.ar-status.unchecked { background: var(--gray-weak); border-color: var(--line); color: var(--muted); }
.ar-row-warn { background: #fffdf5; }
.ar-row-missing { background: #fff8f8; }
.ar-kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.ar-kv > div { padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.ar-kv > div:nth-child(2n+1) { background: var(--head); color: var(--ink-2); }
.ar-kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.ar-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr); gap: 14px; align-items: start; }
.ar-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ar-form-grid .ar-span-2 { grid-column: span 2; }
.ar-form-grid .ar-span-3 { grid-column: span 3; }
.ar-section-title { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 4px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.ar-scorebar { width: 64px; height: 6px; background: var(--gray-weak); display: inline-block; vertical-align: middle; margin-right: 6px; }
.ar-scorebar > span { display: block; height: 100%; background: var(--primary); }
.ar-link-btn { border: 0; background: transparent; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }
.ar-link-btn:hover { color: var(--primary-hover); text-decoration: underline; }
.ar-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.ar-pre { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: var(--head); padding: 8px; border: 1px solid var(--line-2); max-height: 260px; overflow: auto; }
.ar-empty-card { padding: 36px 16px; text-align: center; color: var(--muted); }
.ar-inline { display: inline; }
.ar-nowrap { white-space: nowrap; }
.ar-right { text-align: right; }
.ar-mt { margin-top: 10px; }
.ar-mb { margin-bottom: 10px; }
.ar-muted { color: var(--muted); }
.ar-small { font-size: 11.5px; }
.ar-danger { color: var(--red); }
.ar-warn { color: var(--amber); }
.ar-green { color: var(--green); }
.ar-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ar-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(180deg,#f7f9fc, #eef2f7); }
.ar-login-card { width: min(380px, 96vw); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 26px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.ar-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.ar-login-brand .ar-brand-mark { width: 34px; height: 34px; font-size: 15px; }
.ar-login-title { font-size: 18px; font-weight: 600; }
.ar-login-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ar-login-form .ar-field { margin-bottom: 14px; }
.ar-login-form .ar-input { height: 36px; }
.ar-login-form .ar-btn.primary { width: 100%; height: 36px; }
.ar-import-result { border: 1px solid var(--line); border-left-width: 3px; padding: 9px 11px; margin-bottom: 8px; }
.ar-import-result.ok { border-left-color: var(--green); background: #fafff7; }
.ar-import-result.fail { border-left-color: var(--red); background: #fffafa; }
.ar-issues { max-height: 420px; overflow: auto; }
.ar-stat-grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ar-clickable { cursor: pointer; }
.ar-clickable:hover { color: var(--primary); }
.ar-mono-num { font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .ar-detail-grid, .ar-form-grid, .ar-stat-grid-5 { grid-template-columns: minmax(0, 1fr); }
  .ar-form-grid .ar-span-2, .ar-form-grid .ar-span-3 { grid-column: span 1; }
  .ar-kv { grid-template-columns: 110px minmax(0, 1fr); }
}

/* ===== 归档总览看板 ===== */
.ar-stat-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ar-quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.ar-quarter {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s;
}
.ar-quarter:hover { border-color: #91caff; color: inherit; text-decoration: none; }
.ar-quarter.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.08); }
.ar-quarter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ar-quarter-head b { font-size: 12.5px; }
.ar-quarter-head span { color: var(--muted); font-size: 10.5px; }
.ar-quarter-value { font-size: 20px; font-weight: 600; margin-top: 5px; font-variant-numeric: tabular-nums; }
.ar-quarter-value small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.ar-quarter-meta { color: var(--muted); font-size: 10.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-trend-wrap { overflow-x: auto; }
.ar-trend-svg { width: 100%; min-width: 720px; height: auto; display: block; }
.ar-dept-matrix th, .ar-dept-matrix td { vertical-align: middle; }
.ar-dept-count { min-width: 150px; }
.ar-dept-bar { display: inline-block; width: 76px; height: 7px; background: var(--gray-weak); vertical-align: middle; margin-right: 7px; overflow: hidden; }
.ar-dept-bar > span { display: block; height: 100%; background: var(--primary); }
.ar-quality-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ar-quality-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; color: var(--ink-2); }
.ar-quality-list b { font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 1500px) {
  .ar-stat-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .ar-stat-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-quarter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ar-company-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.ar-company-grid.single { grid-template-columns: minmax(0, 1fr); }
.ar-company-body { display: grid; grid-template-columns: minmax(380px, .95fr) minmax(0, 1.55fr); gap: 16px; align-items: start; }
.ar-company-card .ar-card-body { padding-top: 10px; }
.ar-company-chart { overflow-x: auto; margin-bottom: 8px; }
.ar-company-svg { width: 100%; min-width: 360px; max-width: 620px; height: auto; display: block; }
.ar-month-table th, .ar-month-table td { padding: 5px 6px; font-size: 11.5px; }
.ar-month-table th:first-child, .ar-month-table td:first-child { min-width: 96px; }
@media (max-width: 1250px) {
  .ar-company-body { grid-template-columns: minmax(0, 1fr); }
  .ar-company-svg { max-width: 100%; }
}
.ar-month-table { table-layout: fixed; width: 100%; }
.ar-month-table th:first-child, .ar-month-table td:first-child { width: 108px; }
.ar-month-table th:nth-last-child(2), .ar-month-table td:nth-last-child(2) { width: 58px; text-align: right; }
.ar-month-table th:last-child, .ar-month-table td:last-child { width: 66px; text-align: right; }
.ar-month-table th:not(:first-child):not(:nth-last-child(2)):not(:last-child),
.ar-month-table td:not(:first-child):not(:nth-last-child(2)):not(:last-child) { text-align: center; }
.ar-company-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 2px 0 14px; }
.ar-company-tab {
  display: flex; align-items: center; gap: 10px; min-width: 156px;
  padding: 9px 12px 9px 10px; border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong); border-radius: 3px;
  background: #fff; color: var(--ink-2); text-decoration: none; position: relative;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ar-company-tab:hover { border-color: #91caff; background: #fafcff; color: var(--ink); text-decoration: none; }
.ar-company-mark {
  width: 30px; height: 30px; border-radius: 3px; flex: 0 0 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--gray-weak); color: var(--ink-2);
}
.ar-company-tab-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ar-company-tab-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.ar-company-tab-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ar-company-tab-current {
  position: absolute; right: 8px; top: 6px; font-size: 10px;
  color: var(--primary); background: var(--primary-weak); padding: 0 5px;
  border-radius: 2px; line-height: 17px;
}
.ar-company-tab.active { border-color: var(--primary); background: var(--primary-weak); box-shadow: 0 0 0 2px rgba(22,119,255,.07); }
.ar-company-tab.active .ar-company-tab-name { color: var(--primary); }
.ar-company-tab.active .ar-company-mark { background: #fff; color: var(--primary); }
.tab-ks { border-top-color: #1677ff; }
.tab-yh { border-top-color: #13c2c2; }
.tab-rd { border-top-color: #722ed1; }
.tab-all { border-top-color: #86909c; min-width: 128px; }
.tab-ks .ar-company-mark { background: #e6f4ff; color: #1677ff; }
.tab-yh .ar-company-mark { background: #e6fffb; color: #08979c; }
.tab-rd .ar-company-mark { background: #f9f0ff; color: #722ed1; }
.tab-all .ar-company-mark { background: #f2f3f5; color: #4e5969; }
