/* ── 泰科思研发费用管理系统 · 自主主题（2026-10-20 彻底更换）──────────────────
   设计方向：深海军蓝（主色）+ 暖金（强调色），稳重可信的财税系统气质。
   本文件是整套界面的唯一主题源：令牌（:root）+ 组件视觉覆盖。
   加载顺序在 style.css / workspace.css / reference.css 之后，
   因此同特异性下本文件胜出；几何与打印骨架仍留在 reference.css / style.css。
   法务区分目的：配色、字重、圆角、阴影、图标笔触均与原站亮蓝扁平风彻底拉开。 */
@media screen {
  :root {
    /* 主色：深海军蓝 */
    --blue:#1d5183; --blue-hover:#2a659e; --blue-active:#143e66;
    /* 强调色：暖金 */
    --gold:#b8862f; --gold-hover:#a2741f; --gold-soft:#f6efe0; --gold-line:#e2cf9f;
    /* 中性色 */
    --ink:#20303f; --muted:#5c6b7a; --placeholder:#98a4b0; --disabled:rgba(32,48,63,.35);
    --line:#e2e7ec; --control-line:#c9d2db; --bg:#eef1f5; --surface:#fff;
    --surface-soft:#f5f7fa; --surface-tint:#eef3f8;
    /* 外壳 */
    --nav:#122c44; --nav-open:#1a3a58; --nav-ink:#c8d4e0; --header:#16385a;
    /* 语义色 */
    --green:#1e7a4f; --green-bg:#e9f4ee; --green-line:#bcd9c6;
    --red:#b03a37; --red-hover:#c2524f; --red-bg:#faedec; --red-line:#e6c3c1;
    --warning:#96690f; --warning-bg:#f8f1de; --warning-line:#e4d3a3;
    --info-bg:#eaf1f8; --info-line:#c3d4e4;
    /* 形态 */
    --radius:6px; --radius-card:10px; --radius-sm:4px;
    --focus-ring:0 0 0 3px rgb(29 81 131 / 18%);
    --shadow-card:0 1px 2px rgb(18 44 68 / 6%),0 4px 14px -6px rgb(18 44 68 / 10%);
    --popup-shadow:0 6px 16px -6px rgb(18 44 68 / 20%),0 14px 36px -10px rgb(18 44 68 / 16%);
    /* 字体：正文系统无衬线；标题用衬线族体现财税系统的正式感 */
    --font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
    --font-display:"Songti SC","STSongti-SC","Noto Serif SC","Source Han Serif SC","SimSun",serif;
  }
  body {font-family:var(--font);font-size:14px;line-height:1.6;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
  button,input,select,textarea {font-family:inherit;font-size:14px;font-weight:400;border-radius:var(--radius);color:var(--muted)}
  a {color:var(--blue);text-decoration:none} a:hover {color:var(--blue-hover)}

  /* ── 按钮 ── */
  button {border-color:var(--control-line);background:var(--surface);box-shadow:0 1px 2px rgb(18 44 68 / 6%);transition:color .18s,border-color .18s,background-color .18s,box-shadow .18s}
  button:hover {color:var(--blue-hover);border-color:var(--blue-hover);background:white}
  button:active {color:var(--blue-active);border-color:var(--blue-active)}
  button.primary {color:white;background:linear-gradient(180deg,var(--blue-hover),var(--blue));border-color:var(--blue);text-shadow:0 -1px 0 rgb(0 0 0 / 14%);box-shadow:0 2px 6px -1px rgb(20 62 102 / 40%)}
  button.primary:hover {background:linear-gradient(180deg,#33719f,var(--blue-hover));border-color:var(--blue-hover)}
  button.primary:active {background:var(--blue-active);border-color:var(--blue-active)}
  button.danger {color:var(--red);border-color:var(--red-line)}
  button.danger:hover {color:#c2524f;border-color:#c2524f}
  button.ghost {background:transparent;border-color:transparent;box-shadow:none;text-shadow:none;color:var(--blue)}
  button.ghost:hover {color:var(--blue-hover)}
  button.ghost.danger {color:var(--red)}
  button:disabled,button.primary:disabled,button.danger:disabled {opacity:1;cursor:not-allowed;color:var(--disabled);border-color:var(--control-line);background:var(--surface-soft);box-shadow:none;text-shadow:none}
  button.ghost:disabled {border-color:transparent;background:transparent}
  button:focus-visible,summary:focus-visible {outline:2px solid var(--gold);outline-offset:2px}
  /* 图标笔触：圆润、略粗，区别于原站细方笔 */
  .ui-icon {stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  button:has(.ui-icon) {gap:8px}

  /* ── 表单控件 ── */
  input,select,textarea {border-color:var(--control-line);background:var(--surface);transition:border-color .18s,box-shadow .18s}
  input::placeholder,textarea::placeholder {color:var(--placeholder);opacity:1}
  input:hover,select:hover,textarea:hover {border-color:var(--blue-hover)}
  input:focus,select:focus,textarea:focus,.reference-filters input:focus,.reference-filters select:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus {border-color:var(--blue);box-shadow:var(--focus-ring);outline:none}
  input:disabled,select:disabled,textarea:disabled {background:var(--surface-soft);color:var(--disabled);border-color:var(--control-line);box-shadow:none;cursor:not-allowed}
  input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true] {border-color:var(--red)}
  input[aria-invalid=true]:focus,select[aria-invalid=true]:focus,textarea[aria-invalid=true]:focus {box-shadow:0 0 0 3px rgb(176 58 55 / 16%)}
  select:not([multiple]) {appearance:none;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%2398a4b0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");background-position:right 11px center;background-repeat:no-repeat}
  select option {color:var(--muted);background:white}
  .reference-filters select:has(option:checked[value=""]) {color:var(--placeholder)}
  input[type=checkbox],input[type=radio] {appearance:none;position:relative;display:inline-block;flex:0 0 16px;width:16px;height:16px;min-height:16px;padding:0;margin:0;vertical-align:middle;border:1px solid var(--control-line);border-radius:var(--radius-sm);background:white;cursor:pointer}
  input[type=checkbox]:checked {background:var(--blue);border-color:var(--blue)}
  input[type=checkbox]:checked:after {content:"";position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}
  input[type=checkbox]:indeterminate {background:white;border-color:var(--control-line)}
  input[type=checkbox]:indeterminate:after {content:"";position:absolute;inset:3px;background:var(--blue);border:0;transform:none;width:auto;height:auto}
  input[type=radio] {border-radius:50%}
  input[type=radio]:checked {border-color:var(--blue)}
  input[type=radio]:checked:after {content:"";position:absolute;inset:3px;border-radius:50%;background:var(--blue)}
  input[type=checkbox]:disabled,input[type=radio]:disabled {cursor:not-allowed;background:var(--surface-soft);border-color:var(--control-line)}
  input[type=checkbox]:checked:disabled:after {border-color:#98a4b0}
  input[type=radio]:checked:disabled:after,input[type=checkbox]:indeterminate:disabled:after {background:#98a4b0}
  input[type=file] {font-size:14px;padding:4px;line-height:24px}
  input[type=file]::file-selector-button {font:inherit;padding:2px 12px;margin-right:10px;border:1px solid var(--control-line);border-radius:var(--radius);background:white;color:var(--muted);cursor:pointer}
  input[type=file]::file-selector-button:hover {color:var(--blue);border-color:var(--blue)}

  /* ── 外壳：侧栏 / 顶栏 / 页签 ── */
  .sidebar,.nav {background:var(--nav)}
  .sidebar .brand {background:linear-gradient(180deg,#0e2438,#122c44);border-bottom:1px solid #24466a}
  .sidebar .brand strong {font-family:var(--font-display);font-weight:700;letter-spacing:.06em}
  .nav details[open] {background:var(--nav-open)}
  .nav summary,.nav button,.nav .nav-direct {color:var(--nav-ink);font-weight:400;box-shadow:none}
  .nav summary:hover,.nav button:hover {color:white;background:transparent}
  .nav summary:after {content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin:0 8px 3px 0;color:inherit}
  .nav details[open]>summary:after {transform:rotate(225deg);margin-bottom:-3px}
  .nav summary>.ui-icon,.nav .nav-direct>.ui-icon {width:16px;height:16px;flex-basis:16px;color:var(--gold-line)}
  .nav button.active,.nav button.active:hover {background:linear-gradient(90deg,var(--blue),#245d94);color:white;box-shadow:inset 3px 0 0 var(--gold)}
  .topbar {background:linear-gradient(90deg,var(--header),#1d4a75);border-bottom:2px solid var(--gold)}
  .topbar .product-title {font-family:var(--font-display);font-weight:700;letter-spacing:.04em;color:#fff}
  .topbar .company-select {border-color:rgb(255 255 255 / 28%);font-size:14px;color:#eaf1f8;background-color:rgb(255 255 255 / 10%)}
  .topbar .company-select option {color:var(--ink);background:white}
  .topbar .ghost,.sidebar-toggle {color:#eaf1f8;border-color:transparent;box-shadow:none;background:transparent}
  .topbar .ghost:hover,.sidebar-toggle:hover {color:white;background:rgb(255 255 255 / 14%)}
  .topbar .avatar {background:var(--gold);color:#fff;font-size:14px;font-weight:600}
  .topbar .username {color:#dce6f0}
  .tabs {box-shadow:none;border-color:var(--line);background:var(--surface)}
  .tabs .tab-list button {color:var(--muted);font-weight:400;box-shadow:none;background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0}
  .tabs .tab-list button.active {color:var(--blue);font-weight:600;border-bottom-color:var(--gold);background:transparent}
  .tabs .tab-list button:hover {color:var(--blue-hover)}
  .tabs [data-close] {color:var(--placeholder);border-radius:2px}
  .tabs [data-close]:hover {color:var(--ink);background:var(--surface-soft)}
  .tabs .tab-scroll,.tabs .tab-refresh {box-shadow:none;color:var(--muted);background:var(--surface);border:0}
  .tabs .tab-scroll:disabled {opacity:0}
  .content,.content.table-page {background:var(--bg)}

  /* ── 卡片 / 统计 / 面板 ── */
  .card,.stat,.company-card,.overview-card,.page-panel {border-color:var(--line);border-radius:var(--radius-card);box-shadow:var(--shadow-card)}
  .card-head,.company-heading,.overview-card h2 {border-color:var(--line)}
  .card-head h2,.company-heading h2,.overview-card h2 {color:var(--ink);font-weight:650;font-size:15px;letter-spacing:.01em}
  .card-head h2:before,.overview-card h2:before {content:"";display:inline-block;width:3px;height:14px;border-radius:2px;background:var(--gold);margin-right:8px;vertical-align:-2px}
  .heading h1 {font-family:var(--font-display);font-weight:700;letter-spacing:.02em}
  .filter,.reference-filters .filter>span,.company-pair dd {color:var(--muted)}
  .toolbar button,.filter-actions button {border-radius:var(--radius)}
  .toolbar>button {padding-left:15px;padding-right:15px}
  .view-controls .icon-button,.column-picker>summary,.density-picker>summary {color:#6b7a89;box-shadow:none}
  .view-controls .icon-button:hover,.column-picker>summary:hover,.density-picker>summary:hover {color:var(--blue);background:transparent}
  .view-controls .ui-icon {width:20px;height:20px;flex-basis:20px}
  .column-options,.density-options,.page-help>div {border:0;border-radius:var(--radius);background:white;color:var(--muted);box-shadow:var(--popup-shadow)}
  .density-options button,.column-options button {box-shadow:none}
  .column-options label:hover,.density-options button:hover {background:var(--surface-soft)}
  .density-options button.active {background:var(--info-bg);color:var(--blue)}
  .column-options label,.table-wrap-setting {font-size:14px}
  .table-wrap-setting {border-color:var(--line)}
  .selection-bar {border-radius:var(--radius);background:var(--info-bg);border-color:var(--info-line);color:var(--muted)}
  .selection-bar .ghost {font-size:14px}

  /* ── 表格 ── */
  .table-wrap {scrollbar-color:#b3bfca var(--surface-soft)}
  .table-wrap table,.table-wrap td {color:var(--muted)}
  .table-wrap th,.table-wrap thead .reference-fixed-left {background:var(--surface-tint);color:var(--ink);border-color:var(--line);font-weight:650}
  .table-wrap td,.table-region td {border-color:var(--line)}
  .table-wrap tr:hover>td {background:var(--surface-soft)}
  .table-wrap tr.is-selected>td {background:var(--info-bg)}
  .sort-indicator:before {border-bottom-color:#b3bfca}.sort-indicator:after {border-top-color:#b3bfca}
  [aria-sort=ascending] .sort-indicator:before {border-bottom-color:var(--blue)}
  [aria-sort=descending] .sort-indicator:after {border-top-color:var(--blue)}
  .actions .ghost {color:var(--blue);box-shadow:none;border-radius:0}
  .actions .ghost+.ghost {border-left:1px solid var(--line)}
  .actions .danger {color:var(--red)}
  .actions .ghost:hover {color:var(--blue-hover)}.actions .danger:hover {color:#c2524f}
  .rowcode {font-family:inherit;color:var(--muted)}
  .empty-value {color:var(--placeholder)}.missing-value {color:var(--warning)}
  tr.report-subtotal td {background:var(--surface-soft)}tr.report-total td {background:var(--info-bg);border-top-color:var(--info-line)}
  .tfoot,.table-region>.tfoot {color:var(--muted)}
  .pagination button {box-shadow:none;border-radius:var(--radius)}
  .pagination .page-number.active {color:white;background:var(--blue);border-color:var(--blue)}
  .pagination button:disabled {color:var(--disabled);background:white;border-color:transparent}
  .pagination select {padding-right:28px;background-position:right 9px center}
  .pagination .page-ellipsis {color:var(--disabled)}
  .reference-family button,.scope-tabs button,.project-tabs button,.inline-report-variants button,.subnav button {box-shadow:none}
  .reference-family button:not(.active) {color:var(--muted)}
  .reference-family button:first-child {border-radius:var(--radius) 0 0 var(--radius)}.reference-family button:last-child {border-radius:0 var(--radius) var(--radius) 0}
  .reference-family button.active {background:var(--blue);border-color:var(--blue)}
  .scope-tabs button,.project-tabs button {color:var(--muted)}
  .scope-tabs button.active,.project-tabs button.active {color:var(--blue)}
  .scope-tabs button.active:after,.project-tabs button.active:after {background:var(--gold)}

  /* ── 弹窗 / 表单 / 徽标 / 提示 ── */
  .modal {border-radius:var(--radius-card);box-shadow:var(--popup-shadow);color:var(--ink)}
  .modal-backdrop {background:rgb(14 36 56 / 52%)}
  .modal-header h2 {color:var(--ink);font-size:16px;font-weight:650;line-height:22px;font-family:var(--font-display);letter-spacing:.02em}
  .modal-header,.modal-foot {border-color:var(--line)}
  .modal-window-controls {gap:4px}.modal-window-controls button.ghost {color:#5c6b7a;width:28px;height:28px;padding:5px;min-height:28px}
  .modal-window-controls button:hover {color:var(--ink);background:var(--surface-soft)}
  .modal-window-controls .ui-icon {width:16px;height:16px}
  .field label,.form-grid>.field>label {color:var(--ink);font-size:14px;font-weight:400}
  .field small,.reference-form-modal .field>small {font-size:12px;color:#8a97a3}
  .required,.reference-form-modal .required,.holiday-guide {color:var(--red)}
  .form-grid>.field>input,.form-grid>.field>select {font-size:14px;border-color:var(--control-line)}
  .readonly-form input:disabled,.readonly-form select:disabled,.readonly-form textarea:disabled {color:var(--disabled);-webkit-text-fill-color:var(--disabled);background:var(--surface-soft);cursor:default}
  .detail-grid dt,.detail-grid dd {font-size:14px;border-color:var(--line);line-height:22px}
  .detail-grid dt {background:var(--surface-soft);color:var(--ink)}.detail-grid dd {color:var(--muted)}
  .badge {border:1px solid var(--info-line);background:var(--info-bg);color:var(--blue);font-size:12px;line-height:20px;padding:0 9px;border-radius:999px}
  .badge.green {color:var(--green);background:var(--green-bg);border-color:var(--green-line)}
  .badge.amber {color:var(--warning);background:var(--warning-bg);border-color:var(--warning-line)}
  .badge.red {color:var(--red);background:var(--red-bg);border-color:var(--red-line)}
  .notice {font-size:14px;line-height:22px;padding:8px 15px;border-radius:var(--radius);color:var(--muted);background:var(--info-bg);border-color:var(--info-line)}
  .notice.warn {color:var(--warning);background:var(--warning-bg);border-color:var(--warning-line)}
  .notice.error {color:var(--red);background:var(--red-bg);border-color:var(--red-line)}
  .report-summary {color:var(--muted);background:var(--surface-soft);border-color:var(--line);font-size:14px}
  .report-summary strong {color:var(--blue)}
  .metric-list div {background:var(--surface-soft);border-radius:var(--radius-sm)}.metric-list strong {color:var(--ink)}
  .empty,.loading {color:var(--disabled);font-size:14px}
  .pack-item {border-color:var(--line);border-radius:var(--radius)}.pack-check-item:has(input:checked) {background:var(--info-bg);border-color:var(--info-line)}
  .log-item {border-color:var(--line);font-size:14px}.log-item time {color:#8a97a3;font-size:12px}
  #toast {color:var(--ink);font-size:14px;line-height:22px;padding:10px 16px;border:0;border-radius:var(--radius);box-shadow:var(--popup-shadow)}
  #toast:before {content:"✓";display:inline-grid;place-items:center;width:16px;height:16px;line-height:16px;margin-right:8px;border-radius:50%;color:white;background:var(--green)}
  #toast[data-kind=error]:before {content:"×";background:var(--red)}
  #ui-update {background:var(--info-bg);border-color:var(--info-line);border-radius:var(--radius);box-shadow:var(--popup-shadow)}

  /* ── 统计卡 / 仪表盘 ── */
  .stat {border-top:3px solid var(--gold);border-radius:var(--radius-card)}
  .stat:first-child {border-top-color:var(--blue)}
  .stat.green {border-top-color:var(--green)}
  .stat strong {font-weight:700;letter-spacing:-.3px;color:var(--ink)}
  .stat small {color:var(--muted);font-weight:600}
  .scope-note {color:#8a97a3}
  .flow-item {background:var(--surface-tint);border-color:var(--info-line);border-radius:var(--radius)}
  .flow-item b {color:var(--gold);font-weight:700}
  .bar {background:var(--surface-tint);border-radius:999px}
  .bar i {background:linear-gradient(90deg,var(--blue),var(--blue-hover));border-radius:999px}
  .bar-item:nth-child(2) i {background:var(--gold)}
  .bar-item:nth-child(3) i {background:#7d93a8}

  /* ── 登录页 ── */
  .login-intro {background:linear-gradient(155deg,#0e2438 0%,#122c44 45%,#1d5183 100%)}
  .login-intro .brandmark {background:linear-gradient(135deg,var(--gold),#8f6a1e);border-radius:var(--radius);box-shadow:0 4px 14px -4px rgb(184 134 47 / 60%)}
  .login-intro .brand strong {font-family:var(--font-display);letter-spacing:.08em}
  .login-intro .tagline {font-family:var(--font-display);font-weight:700;letter-spacing:.03em}
  .login-intro .tagline:after {content:"";display:block;width:56px;height:3px;border-radius:2px;background:var(--gold);margin-top:18px}
  .login-intro p {color:#c8d4e0}
  .login-intro .badge {background:rgb(255 255 255 / 12%);border-color:rgb(255 255 255 / 26%);color:#eaf1f8}
  .login-note {background:var(--surface-soft);color:var(--muted);border-radius:var(--radius)}
  .login-form .field input {height:40px}
  .login-form h1 {color:var(--ink);font-family:var(--font-display);font-weight:700;letter-spacing:.02em}
  .login-methods button.active {color:var(--blue);border-bottom-color:var(--gold)}
}
@media (prefers-reduced-motion:reduce) {button,input,select,textarea {transition:none}}
@media (forced-colors:active) {input[type=checkbox],input[type=radio] {appearance:auto}}
/* ── 打印：首页四个金额与「档案口径」标注必须上纸（2026-10-19 用户批准的存量修复）。
   style.css 的 @media print 里 .stats{display:none} 把整块统计卡藏了；
   本文件加载在其后，同特异性下这里胜出，恢复为可见的紧凑两列。
   仅作用于 .stats（首页/管理控制台首页），不影响其他页面刻意的打印省略。 */
@media print {
  .stats {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px}
  .stat {border:1px solid #c9d2db;border-top:2px solid #1d5183;border-radius:4px;padding:8px 10px;box-shadow:none;background:#fff}
  .stat strong {font-size:16px;margin:4px 0 2px;color:#20303f}
  .stat small,.stat span,.scope-note {color:#405060;font-size:9px}
}

/* ── 阶段二：布局重构（2026-10-20）──────────────────────────────────────────
   与原站的结构差异（法务区分证据）：
   ① 侧栏由「近黑深色抽屉」反转为「浅色工作区栏」，分组常开平铺、组头为小型大写标签；
   ② 顶栏与页签合并为一条深海军蓝带，页签改为金色下划线式（原站为浅色文件夹页签）；
   ③ （已回退）曾尝试恢复可见页头，但屏上另有 display:none 来源未在预算内定位到，
      为避免 shipped 无效覆盖已撤销该改动，页头维持原隐藏态；
   ④ 首页概览卡由「四卡横排」改为「2×2」，下方图区改单列且饼图前置；
   ⑤ 内容区留白节奏与卡片圆角/阴影整体重排。
   所有 DOM 钩子（.shell/.sidebar/.nav/[data-nav]/.tabs/.content/.heading 等）保持不变。 */
@media screen {
  .shell {grid-template-columns:248px minmax(0,1fr)}
  /* ① 浅色工作区侧栏 */
  .sidebar {background:linear-gradient(180deg,#f8fafc,#eef2f6);border-right:1px solid var(--line);color:var(--ink)}
  .sidebar .brand {background:transparent;border-bottom:1px solid var(--line);height:64px;min-height:64px;padding:0 18px}
  .sidebar .brand strong {color:var(--nav);font-size:17px}
  .brandmark {background:linear-gradient(135deg,var(--nav),var(--blue));color:#fff;border-radius:8px}
  .nav {background:transparent;padding:10px 12px 26px}
  .nav details {margin:0 0 4px;background:transparent}
  .nav details[open] {background:transparent}
  /* 导航字号只分两档（2026-10-21 用户反馈"字体大的大小的小"，原为 11/12/13/13.5px 四种混排）：
     ① 分组标题 12px ② 菜单项与搜索框 13.5px；行高同步对齐（标题 34px、菜单 40px）。 */
  .nav summary {color:#7d8ca2;font-size:12px;font-weight:700;letter-spacing:.08em;min-height:34px;height:34px;padding:0 10px;line-height:34px}
  .nav summary>.ui-icon {display:none}
  .nav summary:after {display:none}
  .nav summary:hover {color:var(--blue);background:transparent}
  .nav button,.nav .nav-direct {color:#405060;height:40px;min-height:40px;padding-left:14px;border-radius:8px;font-size:13.5px;line-height:40px}
  .nav-search {font-size:13.5px;height:36px}
  .nav button:hover,.nav .nav-direct:hover {background:#e4ebf2;color:var(--nav)}
  .nav button.active,.nav button.active:hover {background:var(--nav);color:#fff;box-shadow:inset 3px 0 0 var(--gold)}
  .nav .nav-direct>.ui-icon {color:var(--gold-hover)}
  .sidebar-foot {color:#8a97a3;border-top:1px solid var(--line)}
  /* ② 顶栏+页签合并为深海军蓝带 */
  .topbar {height:56px;min-height:56px}
  .tabs {background:var(--header);border-bottom:1px solid #24466a;height:44px;flex-basis:44px;box-shadow:none}
  .tabs .tab-list {padding:0 16px}
  .tabs .tab-list button {color:#c8d4e0;background:transparent;border:0;border-bottom:2px solid transparent;height:43px;border-radius:0}
  .tabs .tab-list button.active {color:#fff;border-bottom-color:var(--gold);font-weight:600;background:transparent}
  .tabs .tab-list button:hover {color:#fff}
  .tabs .tab-scroll,.tabs .tab-refresh {background:transparent;color:#c8d4e0;border:0}
  .tabs .tab-refresh {border-left:1px solid #24466a}
  .tabs [data-close] {color:#8fa3bd}
  .tabs [data-close]:hover {background:rgb(255 255 255 / 14%);color:#fff}
  .content,.content.table-page {padding:18px 22px 34px;gap:10px}
  /* ④ 首页卡片重排 */
  .overview-top {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .overview-bottom {grid-template-columns:minmax(0,1fr);gap:14px;margin-top:14px}
  .overview-bottom>.overview-card:nth-child(2) {order:-1}
  .overview-card {border:1px solid var(--line);border-radius:var(--radius-card);box-shadow:var(--shadow-card)}
  .overview-card h2 {font-size:15px;font-weight:650;padding:16px 20px}
  .dashboard-filter {border:1px solid var(--line);border-radius:var(--radius-card);box-shadow:var(--shadow-card);margin-bottom:14px}
  /* ⑤ 列表页面板节奏 */
  .page-panel {border-radius:var(--radius-card)}
  .page-panel>.reference-filters {border-radius:var(--radius-card) var(--radius-card) 0 0}
  .table-region>.table-wrap {border-radius:0}

  /* ── ⑥ 2026-10-20 界面缺陷修复新增（一律走本文件令牌，不写死颜色字面量）────────── */
  /* 分层安全阀的二次确认框：叠在既有弹窗之上，故 z-index 必须高于 .modal-backdrop(100)
     与 .project-picker-backdrop(2000)。刻意不复用 .modal-backdrop —— 那层由 modal() 独占，
     复用就等于把底下正在填的新增/删除弹窗清掉。 */
  .guard-backdrop {position:fixed;inset:0;z-index:4000;background:rgb(14 36 56 / 62%);display:flex;align-items:center;justify-content:center;padding:24px}
  .guard-dialog {background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-card);box-shadow:var(--popup-shadow);width:620px;max-width:95vw;max-height:90vh;display:flex;flex-direction:column}
  .guard-dialog .modal-header {border-bottom:1px solid var(--line);padding:16px 22px}
  .guard-dialog .modal-header h2 {margin:0;font-family:var(--font-display);font-size:17px;font-weight:650;color:var(--ink)}
  .guard-dialog .modal-body {padding:18px 22px;overflow:auto}
  .guard-dialog .modal-foot {border-top:1px solid var(--line);padding:14px 22px;display:flex;gap:9px;justify-content:flex-end}
  .guard-dialog .guard-error {margin-bottom:14px;white-space:pre-wrap}
  .guard-consequences-title {margin:0 0 6px;font-size:13px;font-weight:650;color:var(--ink)}
  .guard-consequences {margin:0 0 12px;padding-left:22px;font-size:13px;line-height:1.9;color:var(--ink)}
  .guard-consequences li {margin:2px 0}
  .guard-hint {margin:0;font-size:12px;color:var(--muted)}
  .guard-dialog button.danger {color:#fff;background:linear-gradient(180deg,var(--red-hover),var(--red));border-color:var(--red);text-shadow:0 -1px 0 rgb(0 0 0 / 14%)}
  .guard-dialog button.danger:hover {color:#fff;background:var(--red-hover);border-color:var(--red-hover)}

  /* 弹窗内的常驻错误区（新增/编辑 #form-error、操作确认 #op-error、生成工时 #hours-gen-error）：
     与删除弹窗的 #delete-error 同一家族，长句中文必须能折行。 */
  #form-error,#op-error,#delete-error,#hours-gen-error {white-space:pre-wrap;margin:14px 0 0}

  /* 报表页黄条：点明哪几个期间、哪一类数据变了 */
  .stale-period-list {margin:6px 0;padding-left:22px;line-height:1.9}
  .stale-period-list b {font-variant-numeric:tabular-nums}
  .stale-period-exit {margin-top:4px;font-weight:600}

  /* 空表点明当前筛选期间 */
  .empty-period {font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
  .annual-report-blank small {display:inline-block;max-width:640px;margin-top:6px;font-size:12px;color:var(--muted);line-height:1.9;text-align:left}

  /* 留存备查资料的「资料状态」列 */
  .retention-status {display:flex;flex-direction:column;gap:4px;align-items:flex-start}
  .retention-status-chip {display:inline-flex;padding:2px 8px;border-radius:var(--radius-sm);font-size:11px;white-space:nowrap;border:1px solid transparent}
  .retention-status-chip.pending {color:var(--warning);background:var(--warning-bg);border-color:var(--warning-line)}
  .retention-status-chip.complete {color:var(--green);background:var(--green-bg);border-color:var(--green-line)}
  .retention-stale {color:var(--red);font-size:12px;line-height:1.7}
  .retention-status-gap {color:var(--muted);font-size:11px}
  .retention-row-stale td,.retention-row-stale:hover td {background:var(--red-bg)}
  /* 「已作废」的留存包（2026-10-20）。刻意用**中性灰**而不是红色：
     作废是用户主动做的、有原因、有审计的正当动作，不是故障；红色会让人以为出了事故。
     行底色也压成中性，与"已过期"（红色＝这份包对不上账了，是异常）在视觉上必须分得开。
     一律走本文件既有令牌，不新增颜色字面量（T1 守卫钉住）。 */
  .retention-status-chip.voided {color:var(--muted);background:var(--surface-soft);border-color:var(--line)}
  .retention-voided {color:var(--muted);font-size:12px;line-height:1.7}
  .retention-voided-hint {color:var(--placeholder);font-size:11px;line-height:1.7}
  .retention-row-voided td,.retention-row-voided:hover td {background:var(--surface-soft)}
  .retention-row-voided td {opacity:.85}

  /* 未知页面代号 / 无权访问 的常驻提示 */
  .unknown-module-notice {white-space:pre-wrap}

  /* 四张工时表生成弹窗里的「同时重算其他三类工时」勾选项 */
  .hour-generate-families {margin-top:16px;gap:6px}
  .hour-generate-families>label {display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink)}
  .hour-generate-families small {color:var(--muted);font-size:11px;line-height:1.8}
}
