/* 造价视界浏览器工作区：本地资源、紧凑桌面布局、明确的表格列边界。 */
:root, :root[data-portal-workspace] {
  --cv-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --cv-ink: rgba(0,0,0,.88);
  --cv-muted: rgba(0,0,0,.65);
  --cv-subtle: rgba(0,0,0,.58);
  --cv-disabled: rgba(0,0,0,.25);
  --cv-placeholder: #767676;
  --cv-line: #d9d9d9;
  --cv-line-soft: #f0f0f0;
  --cv-card-line: #f0f0f0;
  --cv-menu-divider: var(--cv-line);
  --cv-line-strong: var(--cv-line);
  --cv-primary: #1677ff;
  --cv-primary-hover: #4096ff;
  --cv-primary-active: #0958d9;
  --cv-primary-dark: var(--cv-primary-hover);
  --cv-on-primary: #fff;
  --cv-button-primary: #0958d9;
  --cv-button-hover: #2468e5;
  --cv-button-active: #073ea8;
  --cv-primary-soft: #e6f4ff;
  --cv-selected-row: #e6f4ff;
  --cv-hover: rgba(0,0,0,.04);
  --cv-fill: rgba(0,0,0,.06);
  --cv-switch-off: rgba(0,0,0,.25);
  --cv-blue-soft: var(--cv-primary-soft);
  --cv-blue-line: var(--cv-primary);
  --cv-paper: #fff;
  --cv-sider: #fff;
  --cv-page: #e6e8ec;
  --cv-elevated: #fff;
  --cv-ribbon: var(--cv-paper);
  --cv-chrome: var(--cv-page);
  --cv-header: #fafafa;
  --cv-success: #237804;
  --cv-warning: #ad6800;
  --cv-amber-soft: color-mix(in srgb, var(--cv-warning) 10%, var(--cv-paper));
  --cv-danger: #cf1322;
  --cv-danger-soft: color-mix(in srgb, var(--cv-danger) 10%, var(--cv-paper));
  --cv-ribbon-icon: var(--cv-ink);
  --cv-control-height: 32px;
  --cv-row-height: 32px;
  --cv-table-font: 14px;
  --cv-card-shadow: 0 1px 2px rgba(0,0,0,.04);
  --cv-menu-shadow: 0 6px 16px rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12);
  --cv-login-background: linear-gradient(135deg, #eef2ff, #fdf2f8, #ecfeff);
  --cv-login-card: rgba(255,255,255,.72);
  --cv-login-border: rgba(255,255,255,.6);
  --portal-ink: var(--cv-ink); --portal-muted: var(--cv-muted); --portal-paper: var(--cv-paper);
  --portal-canvas: var(--cv-page); --portal-line: var(--cv-line); --portal-blue: var(--cv-primary);
  --portal-tint: var(--cv-primary-soft); --portal-on-blue: var(--cv-on-primary); --portal-table-head: var(--cv-header);
  --portal-success: var(--cv-success); --portal-warning: var(--cv-warning); --portal-danger: var(--cv-danger);
  --portal-control-height: var(--cv-control-height); --portal-table-font: var(--cv-table-font); --portal-shadow: var(--cv-menu-shadow);
  font-family: var(--cv-font-family); font-size: 14px; color-scheme: light;
}
:root[data-theme="dark"], :root[data-portal-workspace][data-theme="dark"] {
  --cv-ink: rgba(255,255,255,.85); --cv-muted: rgba(255,255,255,.65); --cv-subtle: rgba(255,255,255,.45);
  --cv-disabled: rgba(255,255,255,.25); --cv-placeholder: rgba(255,255,255,.25);
  --cv-line: #50566e; --cv-line-soft: #414659; --cv-card-line: rgba(255,255,255,.06); --cv-menu-divider: rgba(255,255,255,.12);
  --cv-primary: #1668dc; --cv-primary-hover: #3c89e8; --cv-primary-active: #1554ad;
  --cv-button-primary: var(--cv-primary); --cv-button-hover: var(--cv-primary-hover); --cv-button-active: var(--cv-primary-active);
  --cv-primary-soft: #15325b; --cv-selected-row: #15325b;
  --cv-hover: rgba(255,255,255,.08); --cv-fill: rgba(255,255,255,.12); --cv-switch-off: rgba(255,255,255,.25);
  --cv-paper: #23252b; --cv-sider: #15161a; --cv-page: #1a1b1f; --cv-elevated: #2d2f37; --cv-header: #2c2e33;
  --cv-success: #49aa19; --cv-warning: #d89614; --cv-danger: #dc4446;
  --cv-card-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.03);
  --cv-menu-shadow: 0 6px 16px rgba(0,0,0,.4), 0 3px 6px -4px rgba(0,0,0,.45);
  --cv-login-background: radial-gradient(ellipse at 25% 20%, #152038, #0d1117);
  --cv-login-card: rgba(28,30,36,.55); --cv-login-border: rgba(255,255,255,.1);
  color-scheme: dark;
}
html, body, #app { min-width: 0; min-height: 100%; margin: 0; }
body { color: var(--cv-ink); font: 14px/1.5714286 var(--cv-font-family); background: var(--cv-page); }
button, input, select, textarea { font: inherit; }
input::placeholder, textarea::placeholder { color: var(--cv-placeholder); }
input[type="checkbox"] { accent-color: var(--cv-primary); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible, [role="tab"]:focus-visible {
  outline: 2px solid var(--cv-blue-line); outline-offset: -2px;
}
.ui-icon { width: 16px; height: 16px; flex: none; fill: currentColor; vertical-align: middle; }
.ui-icon.large { width: 24px; height: 24px; }
.ui-icon.tiny { width: 13px; height: 13px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.cv-app { height: 100dvh; min-height: 580px; display: flex; flex-direction: column; overflow: hidden; background: var(--cv-paper); }
.cv-menubar { height: 34px; flex: none; display: flex; align-items: stretch; gap: 4px; padding: 0 10px; color: var(--cv-ink); background: var(--cv-paper); border-bottom: 1px solid var(--cv-line); }
.cv-brand { display: flex; align-items: center; gap: 8px; min-width: 150px; padding-right: 14px; font-weight: 700; letter-spacing: .02em; }
.cv-brand .ui-icon { width: 19px; height: 19px; color: inherit; }
.cv-menu { position: relative; display: flex; align-items: stretch; }
.cv-menu summary { list-style: none; display: flex; align-items: center; padding: 0 11px; cursor: pointer; }
.cv-menu summary::-webkit-details-marker { display: none; }
.cv-menu[open] summary, .cv-menu summary:hover { background: var(--cv-hover); }
.cv-menu-panel { position: absolute; top: 33px; left: 0; z-index: 30; width: 215px; padding: 5px; background: var(--cv-elevated); color: var(--cv-ink); border: 1px solid var(--cv-line-strong); box-shadow: var(--cv-menu-shadow); border-radius: 8px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.cv-menu-panel button, .cv-menu-panel label { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px; border: 0; padding: 5px 10px; text-align: left; color: inherit; background: transparent; border-radius: 6px; }
.cv-menu-panel button:hover:not(:disabled):not(.danger), .cv-menu-panel label:hover { color: var(--cv-primary); background: color-mix(in srgb, var(--cv-primary) 14%, transparent); }
.cv-menu-panel button.danger { color: var(--cv-danger); }
.cv-menu-panel button.danger:hover:not(:disabled) { color: var(--cv-danger); background: var(--cv-danger-soft); }
.cv-menu-panel hr { border: 0; border-top: 1px solid var(--cv-menu-divider); margin: 4px 2px; }
.cv-menu-spacer { flex: 1; }
.cv-account { display: flex; align-items: center; color: var(--cv-muted); font-size: 14px; }
.cv-logout-form { display: flex; align-items: center; }
.cv-logout-form button { height: 26px; margin: 4px 0 4px 10px; padding: 0 9px; border: 1px solid var(--cv-line); border-radius: 6px; color: var(--cv-ink); background: transparent; }
.cv-logout-form button:hover { background: var(--cv-hover); }
.cv-menu-panel label, .cv-ribbon-action, .cv-empty-upload { position: relative; }
.cv-native-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.cv-ribbon { flex: none; height: 102px; background: var(--cv-ribbon); border-bottom: 1px solid var(--cv-line-strong); }
.cv-ribbon.collapsed { height: 30px; }
.cv-ribbon-body[hidden] { display: none; }
.cv-ribbon-tabs { height: 29px; display: flex; align-items: stretch; gap: 1px; padding: 0 13px; border-bottom: 1px solid var(--cv-line); background: var(--cv-paper); }
.cv-ribbon-tabs button { min-width: 57px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; color: var(--cv-ink); background: transparent; }
.cv-ribbon-tabs button:hover { background: var(--cv-primary-soft); }
.cv-ribbon-tabs button.active { color: var(--cv-primary-dark); border-bottom-color: var(--cv-primary); background: var(--cv-primary-soft); font-weight: 700; }
.cv-ribbon-tabs button.cv-ribbon-toggle { display: flex; align-items: center; gap: 4px; margin-left: auto; border-bottom: 0; white-space: nowrap; font-size: 12px; }
.cv-ribbon:not(.collapsed) .cv-ribbon-toggle .ui-icon { transform: rotate(180deg); }
.cv-ribbon-body { height: 88px; display: flex; align-items: stretch; overflow: hidden; }
.cv-ribbon-groups { display: flex; min-width: 0; flex: 1; overflow-x: auto; overflow-y: hidden; }
.cv-ribbon-group { position: relative; display: flex; flex: none; align-items: flex-start; gap: 4px; min-width: 0; padding: 5px 10px 16px; border-right: 1px solid var(--cv-line); }
.cv-ribbon-group::after { content: attr(data-title); position: absolute; bottom: 1px; left: 8px; right: 8px; text-align: center; color: var(--cv-muted); font-size: 11px; line-height: 14px; white-space: nowrap; }
.cv-ribbon-action { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0; min-width: 61px; height: 50px; padding: 1px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--cv-ink); white-space: nowrap; }
.cv-ribbon-action:hover { border-color: var(--cv-line-strong); background: var(--cv-primary-soft); }
.cv-ribbon-action:active, .cv-ribbon-action.active { border-color: var(--cv-line-strong); background: var(--cv-primary-soft); }
.cv-ribbon-options { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 3px; font-size: 11px; color: var(--cv-muted); }
.cv-ribbon-options > div { display: flex; gap: 2px; }
.cv-ribbon-options button { width: 33px; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 1px; padding: 2px; border: 1px solid transparent; border-radius: 6px; color: var(--cv-ink); background: transparent; }
.cv-ribbon-options button:hover { background: var(--cv-primary-soft); border-color: var(--cv-line-strong); }
.cv-ribbon-options button[aria-pressed="true"] { background: var(--cv-primary-soft); border-color: var(--cv-line-strong); }
.cv-font-icon { font-family: var(--cv-font-family); }
.cv-ribbon-options small { font-size: 9px; align-self: flex-end; }
.cv-ribbon-switch { gap: 2px; min-width: 72px; }
.cv-switch-caption { display: inline-flex; align-items: center; gap: 3px; }
.cv-switch-track { width: 44px; height: 22px; flex: none; position: relative; box-sizing: border-box; border: 0; border-radius: 100px; background: var(--cv-switch-off); transition: background .2s; }
.cv-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s; }
.cv-ribbon-switch[aria-checked="true"] .cv-switch-track { background: var(--cv-primary); border-color: var(--cv-primary); }
.cv-ribbon-switch[aria-checked="true"] .cv-switch-track::after { left: 24px; }
.cv-ribbon-switch:hover:not(:disabled) .cv-switch-track { background: var(--cv-subtle); }
.cv-ribbon-switch[aria-checked="true"]:hover:not(:disabled) .cv-switch-track { background: var(--cv-primary-hover); }
.cv-level-menu { position: fixed; z-index: 70; width: 190px; box-sizing: border-box; padding: 4px; border: 1px solid var(--cv-line-strong); border-radius: 6px; background: var(--cv-elevated); box-shadow: var(--cv-menu-shadow); max-height: calc(100dvh - 32px); overflow-y: auto; }
.cv-level-menu button { display: block; width: 100%; height: 27px; border: 0; border-radius: 6px; padding: 0 9px; text-align: left; white-space: nowrap; color: var(--cv-ink); background: transparent; }
.cv-level-menu button:hover, .cv-level-menu button.active { color: var(--cv-primary-dark); background: var(--cv-primary-soft); }
.cv-level-menu-hint { margin: 4px 5px 2px; padding: 7px 4px 2px; border-top: 1px solid var(--cv-line); color: var(--cv-muted); font-size: 11px; line-height: 1.4; }
.cv-ribbon-action .ui-icon { color: var(--cv-ribbon-icon); }
.cv-ribbon-action.small { flex-direction: row; justify-content: flex-start; gap: 5px; min-width: 88px; height: 23px; padding: 1px 4px; text-align: left; }
.cv-ribbon-stack { display: flex; flex-direction: column; gap: 0; }
.cv-ribbon-search { display: flex; flex: none; align-items: flex-start; gap: 7px; width: 278px; padding: 12px 11px 0; border-left: 1px solid var(--cv-line); }
.cv-ribbon-search input { min-width: 0; flex: 1; height: 28px; box-sizing: border-box; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 9px; background: var(--cv-paper); }
.cv-ribbon-search .ant-btn { height: 28px; padding: 0 11px; border-radius: 6px; }

.cv-file-tabs { flex: none; height: 34px; display: flex; align-items: end; gap: 0; padding: 0 8px; overflow-x: auto; overflow-y: hidden; background: var(--cv-chrome); border-bottom: 1px solid var(--cv-line); scrollbar-width: thin; }
.cv-file-tab { display: flex; flex: none; align-items: center; gap: 6px; min-width: 112px; max-width: 235px; height: 33px; box-sizing: border-box; padding: 0 6px 0 9px; border: 0; border-top: 2px solid transparent; border-right: 1px solid var(--cv-line); color: var(--cv-muted); background: var(--cv-chrome); cursor: pointer; }
.cv-file-tab:hover:not(.active) { background: var(--cv-chrome); }
.cv-file-tab.active { position: relative; z-index: 1; height: 34px; margin-bottom: -1px; color: var(--cv-ink); background: var(--cv-paper); border-top-color: var(--cv-primary); border-bottom: 1px solid var(--cv-paper); font-weight: 600; }
.cv-file-tab > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-file-tab .cv-file-tab-close { flex: none; width: 23px; height: 23px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: var(--cv-muted); background: transparent; }
.cv-file-tab .cv-file-tab-close:hover { color: var(--cv-ink); background: var(--cv-primary-soft); }
.cv-file-tab .cv-file-tab-close span { display: block; width: 100%; font-family: var(--cv-font-family); font-size: 22px; font-weight: 300; line-height: 1; text-align: center; transform: translateY(-1px); }
.cv-tab-context-menu { position: fixed; left: min(var(--ctx-x), calc(100vw - 145px)); top: min(var(--ctx-y), calc(100vh - 44px)); z-index: 80; min-width: 128px; padding: 4px; border: 1px solid var(--cv-line-strong); border-radius: 6px; background: var(--cv-elevated); box-shadow: var(--cv-menu-shadow); max-height: calc(100dvh - 32px); overflow-y: auto; }
.cv-tab-context-menu button { display: flex; align-items: center; gap: 7px; width: 100%; height: 28px; border: 0; padding: 0 7px; text-align: left; color: var(--cv-ink); background: transparent; }
.cv-tab-context-menu button:hover { background: var(--cv-primary-soft); }
.cv-tab-context-menu .ui-icon { width: 13px; height: 13px; }
.cv-empty-tab { height: 33px; min-width: 175px; padding: 6px 13px 0; color: var(--cv-muted); box-sizing: border-box; background: var(--cv-chrome); border-right: 1px solid var(--cv-line); }
.cv-library-tab { display: flex; flex: none; align-items: center; gap: 7px; height: 33px; min-width: 96px; padding: 0 12px; border: 0; border-top: 2px solid transparent; border-right: 1px solid var(--cv-line); color: var(--cv-muted); background: var(--cv-chrome); }
.cv-library-tab:hover:not(.active) { background: var(--cv-chrome); }
.cv-library-tab.active { position: relative; z-index: 1; height: 34px; margin-bottom: -1px; color: var(--cv-ink); background: var(--cv-paper); border-top-color: var(--cv-primary); border-bottom: 1px solid var(--cv-paper); font-weight: 600; }
.cv-library-tab .ui-icon { color: var(--cv-primary); }

.cv-workspace { --cv-sidebar-width: 218px; min-height: 0; flex: 1; display: flex; overflow: hidden; }
.cv-sidebar { flex: none; width: var(--cv-sidebar-width); display: flex; flex-direction: column; min-height: 0; background: var(--cv-paper); }
.cv-report-sidebar { flex: none; width: var(--cv-report-sidebar-width, 210px); min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--cv-paper); }
.cv-report-sidebar.collapsed { width: 34px; }
.cv-report-sidebar.collapsed .cv-sidebar-title { padding: 0 5px; justify-content: center; }
.cv-report-sidebar.collapsed .cv-sidebar-title > span,
.cv-report-sidebar.collapsed .cv-sidebar-scroll,
.cv-report-sidebar.collapsed + .cv-report-sidebar-splitter { display: none; }
.cv-report-sidebar.collapsed .cv-sidebar-toggle .ui-icon { transform: none; }
.cv-report-group { width: 100%; border: 0; cursor: pointer; color: inherit; background: transparent; text-align: left; }
.cv-report-tree .cv-tree-row { padding-left: 22px; }
.cv-report-tree-note { padding: 12px 8px; color: var(--cv-muted); font-size: 12px; }
.cv-report-tree button:focus-visible { outline: 2px solid var(--cv-accent, #2878c9); outline-offset: -2px; }
.cv-sidebar-title { height: 36px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-weight: 700; background: var(--cv-chrome); border-bottom: 1px solid var(--cv-line); }
.cv-sidebar-actions { display: flex; align-items: center; gap: 2px; }
.cv-sidebar-toggle .ui-icon { transform: rotate(180deg); }
.cv-workspace.sidebar-collapsed .cv-sidebar { width: 34px; }
.cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-title { padding: 0 5px; justify-content: center; }
.cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-title > span,
.cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-refresh,
.cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-scroll,
.cv-workspace.sidebar-collapsed > .cv-sidebar-splitter:not(.cv-report-sidebar-splitter) { display: none; }
.cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-toggle .ui-icon { transform: none; }
.cv-workspace.library-mode .cv-sidebar, .cv-workspace.library-mode .cv-sidebar-splitter { display: none; }
.cv-sidebar-splitter { flex: none; width: 6px; cursor: col-resize; background: var(--cv-chrome); border-left: 1px solid var(--cv-line); border-right: 1px solid var(--cv-line); box-sizing: border-box; }
.cv-sidebar-splitter:hover, .cv-sidebar-splitter:focus-visible { background: var(--cv-primary-soft); border-color: var(--cv-line-strong); }
.cv-sidebar-scroll { min-height: 0; overflow: auto; padding: 7px 6px 12px; }
.cv-tree-head, .cv-tree-row, .cv-library-row { width: 100%; display: flex; align-items: center; gap: 5px; min-height: 27px; border: 0; border-radius: 6px; padding: 3px 6px; text-align: left; color: var(--cv-ink); background: transparent; }
.cv-tree-head:hover, .cv-tree-row:hover, .cv-library-row:hover { background: color-mix(in srgb, var(--cv-primary) 10%, transparent); color: var(--cv-primary); }
.cv-tree-head .ui-icon, .cv-tree-row .ui-icon, .cv-library-row .ui-icon { width: 14px; height: 14px; color: var(--cv-primary); }
.cv-tree-row { padding-left: 20px; }
.cv-tree-row.active { background: color-mix(in srgb, var(--cv-primary) 20%, transparent); color: var(--cv-primary); font-weight: 400; }
.cv-tree-row span, .cv-tree-head span, .cv-library-row span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cv-sidebar-subtitle { padding: 12px 7px 5px; color: var(--cv-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cv-library-row { font-size: 12px; }
.cv-library-item { display: flex; align-items: center; min-width: 0; }
.cv-library-item .cv-library-row { flex: 1; width: auto; min-width: 0; }
.cv-library-delete, .cv-icon-button { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--cv-muted); }
.cv-library-delete:hover { color: var(--cv-danger); background: var(--cv-danger-soft); }
.cv-icon-button:hover { color: var(--cv-primary-dark); background: var(--cv-primary-soft); }
.cv-library-delete .ui-icon, .cv-icon-button .ui-icon { width: 14px; height: 14px; }
.cv-sidebar-empty { padding: 4px 8px; color: var(--cv-muted); font-size: 12px; }
.cv-load-more { margin: 5px 6px; padding: 4px 8px; border: 1px solid var(--cv-line); background: var(--cv-paper); color: var(--cv-primary-dark); }
.cv-library-row .cv-state-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--cv-warning); }
.cv-library-row.ready .cv-state-dot { background: var(--cv-success); }
.cv-library-row.failed .cv-state-dot { background: var(--cv-danger); }

.cv-main { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; background: var(--cv-paper); }
.cv-app.cv-fullscreen { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100dvh; min-height: 0; }
.cv-app.cv-fullscreen > .cv-menubar,
.cv-app.cv-fullscreen > .cv-ribbon,
.cv-app.cv-fullscreen > .cv-file-tabs,
.cv-app.cv-fullscreen > .cv-status,
.cv-app.cv-fullscreen > .cv-workspace > .cv-sidebar,
.cv-app.cv-fullscreen > .cv-workspace > .cv-sidebar-splitter:not(.cv-report-sidebar-splitter) { display: none; }
.cv-view-tabs .cv-fullscreen-toggle { flex: none; align-self: center; margin-left: auto; padding: 0 8px; height: var(--cv-control-height); border: 1px solid var(--cv-line); border-radius: 6px; color: var(--cv-ink); }
.cv-fullscreen-toggle span { display: inline-flex; align-items: center; gap: 5px; }
.cv-fullscreen-toggle .cv-fullscreen-exit,
.cv-fullscreen .cv-fullscreen-toggle .cv-fullscreen-enter { display: none; }
.cv-fullscreen .cv-fullscreen-toggle .cv-fullscreen-exit { display: inline-flex; }
.cv-view-tabs, .cv-report-tabs { display: flex; flex: none; align-items: stretch; gap: 2px; height: 34px; min-width: 0; padding: 0 10px; border-bottom: 1px solid var(--cv-line); background: var(--cv-paper); }
.cv-view-tab-list { display: flex; flex: 0 1 auto; min-width: 0; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.cv-view-tab-list > button { flex: none; }
.cv-view-tabs button, .cv-report-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 10px; color: var(--cv-muted); background: transparent; white-space: nowrap; }
.cv-view-tabs button:hover, .cv-report-tabs button:hover { background: var(--cv-primary-soft); }
.cv-view-tabs button.active, .cv-report-tabs button.active { border-bottom-color: var(--cv-primary); color: var(--cv-primary-dark); font-weight: 700; }
.cv-report-tabs { height: 29px; padding-left: 12px; }
.cv-view-context { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; padding: 0 9px 0 5px; color: var(--cv-muted); font-size: 12px; border-left: 1px solid var(--cv-line); }
.cv-view-context > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-view-context > span:first-child { max-width: 50%; }
.cv-view-context .cv-view-context-separator { flex: none; }
.cv-view-search { display: flex; flex: none; align-items: center; gap: 3px; width: 277px; min-width: 0; padding-left: 7px; border-left: 1px solid var(--cv-line); }
.cv-view-search input { flex: 1; min-width: 0; height: 25px; box-sizing: border-box; padding: 0 7px; border: 1px solid var(--cv-line-strong); border-radius: 6px; background: var(--cv-paper); }
.cv-view-tabs .cv-view-search button { display: flex; align-items: center; gap: 3px; align-self: center; height: 25px; padding: 0 7px; border: 1px solid var(--cv-line); border-radius: 6px; background: var(--cv-paper); }
.cv-view-tabs .cv-view-search button:hover { background: var(--cv-primary-soft); border-color: var(--cv-line-strong); }
.cv-view-search button .ui-icon { width: 13px; height: 13px; }
.cv-view-tabs .cv-view-search .cv-search-clear { width: 25px; justify-content: center; padding: 0; }
.cv-column-picker { position: relative; z-index: 12; display: flex; align-items: center; flex: none; }
.cv-column-picker summary { list-style: none; display: grid; place-items: center; width: 28px; height: 25px; box-sizing: border-box; border: 1px solid var(--cv-line); border-radius: 6px; padding: 0; color: var(--cv-muted); background: var(--cv-paper); cursor: pointer; }
.cv-column-picker summary::-webkit-details-marker { display: none; }
.cv-column-picker summary:hover, .cv-column-picker[open] summary { border-color: var(--cv-line-strong); background: var(--cv-primary-soft); }
.cv-column-picker summary .ui-icon { width: 16px; height: 16px; color: inherit; }
.cv-column-picker-panel { position: absolute; top: 30px; right: 0; z-index: 20; width: 172px; max-height: min(68vh, 350px); overflow: auto; box-sizing: border-box; padding: 5px; border: 1px solid var(--cv-line-strong); background: var(--cv-elevated); box-shadow: var(--cv-menu-shadow); border-radius: 8px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.cv-column-picker-title { padding: 4px 7px 6px; color: var(--cv-muted); font-size: 11px; border-bottom: 1px solid var(--cv-line); }
.cv-column-picker-panel label { display: flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 7px; cursor: pointer; }
.cv-column-picker-panel label:hover { background: var(--cv-primary-soft); }
.cv-column-picker-panel input { width: 14px; height: 14px; margin: 0; accent-color: var(--cv-primary); }
.cv-column-picker-panel button { width: 100%; height: 26px; margin-top: 4px; border-top: 1px solid var(--cv-line); text-align: center; color: var(--cv-primary-dark); }
.cv-view-tabs .cv-budget-filter-toggle { display: inline-grid; place-items: center; flex: none; align-self: center; width: 28px; height: 25px; border: 1px solid var(--cv-line); border-radius: 6px; padding: 0; color: var(--cv-muted); background: var(--cv-paper); }
.cv-view-tabs .cv-budget-filter-toggle:hover, .cv-view-tabs .cv-budget-filter-toggle.active { border-color: var(--cv-line-strong); color: var(--cv-primary); background: var(--cv-primary-soft); }
.cv-budget-filter-toggle .ui-icon { width: 16px; height: 16px; color: inherit; }
.cv-main-content { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.cv-view-content { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cv-main-content.cv-fees-layout { flex-direction: row; }
.cv-fee-conditions { flex: 0 0 210px; overflow: auto; padding: 10px 12px; border-right: 1px solid var(--cv-line-strong); background: var(--cv-chrome); box-sizing: border-box; }
.cv-fee-conditions h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.cv-fee-conditions dl { margin: 0; }
.cv-fee-conditions dt { color: var(--cv-muted); margin: 9px 0 3px; }
.cv-fee-conditions dd { margin: 0; overflow-wrap: anywhere; }
.cv-fee-conditions p { color: var(--cv-muted); margin-top: 14px; }
.cv-table-report thead th { white-space: normal; overflow-wrap: anywhere; }
.cv-table-report .center { text-align: center; }
.cv-empty { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; color: var(--cv-muted); }
.cv-empty-inner { max-width: 420px; text-align: center; }
.cv-empty-inner .ui-icon { width: 38px; height: 38px; color: var(--cv-primary); }
.cv-empty h2 { margin: 10px 0 4px; color: var(--cv-ink); font-size: 17px; font-weight: 600; }
.cv-empty p { margin: 0 0 16px; }
.cv-empty .ant-btn { margin: 0 4px; }
.cv-info-band { flex: none; min-height: 31px; display: flex; align-items: center; gap: 16px; padding: 3px 13px; box-sizing: border-box; border-bottom: 1px solid var(--cv-line); overflow: hidden; white-space: nowrap; color: var(--cv-muted); }
.cv-info-band strong { color: var(--cv-ink); font-weight: 600; }
.cv-info-band span { overflow: hidden; text-overflow: ellipsis; }
.cv-scroll-table { min-height: 0; flex: 1; overflow: auto; background: var(--cv-paper); scrollbar-color: var(--cv-line) var(--cv-paper); }
.cv-grid { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--cv-table-font); }
.cv-grid th, .cv-grid td { height: 29px; max-height: 29px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 7px; border-right: 1px solid var(--cv-line); border-bottom: 1px solid var(--cv-line); vertical-align: middle; background: var(--cv-paper); }
.cv-grid thead th { position: sticky; top: 0; z-index: 5; height: 36px; border-top: 0; border-bottom-color: var(--cv-line-strong); text-align: center; color: var(--cv-ink); background: var(--cv-header); font-weight: 600; }
.cv-grid thead th .cv-header-filter { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 2px; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0; vertical-align: middle; color: var(--cv-muted); background: var(--cv-paper); cursor: pointer; }
.cv-grid thead th .cv-header-filter:hover, .cv-grid thead th .cv-header-filter.active { color: var(--cv-primary-dark); background: var(--cv-primary-soft); }
.cv-grid thead th .cv-header-filter .ui-icon { width: 12px; height: 12px; }
.cv-grid thead tr:nth-child(2) th { top: 36px; }
.cv-grid tbody tr:hover td { background: var(--cv-header); }
.cv-grid tbody tr.selected td { background: var(--cv-selected-row); color: var(--cv-ink); }
.cv-grid tbody tr.level-root td { background: var(--cv-primary-soft); }
.cv-grid tbody tr.level-one td { background: var(--cv-primary-soft); }
.cv-grid tbody tr.kind-calculation td { background: var(--cv-amber-soft); }
.cv-grid tbody tr.selected.level-root td, .cv-grid tbody tr.selected.level-one td, .cv-grid tbody tr.selected.kind-calculation td { background: var(--cv-selected-row); }
.cv-grid .index { width: 42px; min-width: 42px; max-width: 42px; text-align: center; color: var(--cv-muted); background: var(--cv-chrome); }
.cv-grid .code { width: 132px; min-width: 132px; max-width: 132px; text-align: center; }
.cv-grid[data-grid-key="budget"] .code { width: 190px; min-width: 190px; max-width: 190px; }
.cv-grid .name { width: 310px; min-width: 310px; max-width: 310px; }
.cv-grid .unit { width: 72px; min-width: 72px; max-width: 72px; text-align: center; }
.cv-grid .kind { width: 64px; min-width: 64px; max-width: 64px; text-align: center; }
.cv-grid .source-type { width: 182px; min-width: 182px; max-width: 182px; text-align: center; }
.cv-grid .number { text-align: right; font-variant-numeric: tabular-nums; }
.cv-grid .amount { width: 125px; min-width: 125px; max-width: 125px; }
.cv-grid .quantity { width: 110px; min-width: 110px; max-width: 110px; }
.cv-grid .formula { width: 210px; min-width: 210px; max-width: 210px; }
.cv-grid .note { width: 190px; min-width: 190px; max-width: 190px; }
.cv-grid .resource-name { width: 280px; min-width: 280px; max-width: 280px; }
.cv-grid .resource-name.resource-sticky { left: var(--cv-name-left, 174px); }
.cv-grid .chapter { width: 125px; min-width: 125px; max-width: 125px; }
.cv-grid .index.sticky { position: sticky; left: 0; z-index: 4; }
.cv-grid .code.sticky { position: sticky; left: var(--cv-code-left, 42px); z-index: 4; }
.cv-grid .kind.sticky { position: sticky; left: var(--cv-kind-left, 232px); z-index: 4; }
.cv-grid .name.sticky { position: sticky; left: var(--cv-name-left, 296px); z-index: 4; }
.cv-grid thead th { user-select: none; }
.cv-grid thead th.cv-column-edge { cursor: col-resize; border-right-color: var(--cv-primary); }
body.cv-resizing-column { cursor: col-resize !important; user-select: none !important; }
.cv-grid thead .sticky { z-index: 8 !important; }
.cv-grid tbody tr:hover .sticky { background: var(--cv-header); }
.cv-grid tbody tr.selected .sticky { background: var(--cv-selected-row); }
.cv-grid tbody tr.level-root .sticky { background: var(--cv-primary-soft); }
.cv-grid tbody tr.level-one .sticky { background: var(--cv-primary-soft); }
.cv-grid tbody tr.kind-calculation .sticky { background: var(--cv-amber-soft); }
.cv-grid tbody tr.selected.level-root .sticky, .cv-grid tbody tr.selected.level-one .sticky, .cv-grid tbody tr.selected.kind-calculation .sticky { background: var(--cv-selected-row); }
.cv-grid .row-code { position: relative; display: inline-flex; align-items: center; gap: 4px; width: 100%; min-height: 20px; box-sizing: border-box; vertical-align: middle; }
.cv-grid .cv-tree-guide, .cv-grid .cv-tree-branch { position: absolute; top: -5px; bottom: -5px; width: 0; border-left: 1px dotted var(--cv-line); pointer-events: none; }
.cv-grid .cv-tree-branch:not(.continues) { bottom: 50%; }
.cv-grid .cv-tree-branch::after { content: ""; position: absolute; left: 0; bottom: 0; width: 7px; border-top: 1px dotted var(--cv-line); }
.cv-grid .cv-tree-branch.continues::after { bottom: auto; top: 50%; }
.cv-grid .tree-expander { position: relative; flex: none; border: 1px solid var(--cv-line-strong); border-radius: 1px; width: 13px; height: 13px; padding: 0; background: var(--cv-paper); z-index: 1; }
.cv-grid .tree-expander::before, .cv-grid .tree-expander::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--cv-primary); }
.cv-grid .tree-expander::before { width: 7px; height: 1px; }
.cv-grid .tree-expander.collapsed::after { width: 1px; height: 7px; }
.cv-grid .tree-expander:hover { border-color: var(--cv-line-strong); background: var(--cv-primary-soft); }
.cv-grid .tree-expander-space { flex: none; width: 13px; height: 13px; }
.cv-grid .cv-code-mark { flex: none; width: 14px; height: 14px; }
.cv-grid .cv-code-mark.folder { color: var(--cv-warning); }
.cv-grid .cv-code-mark.calculation { color: var(--cv-primary); }
.cv-grid span.cv-code-mark.quota { width: 11px; height: 11px; margin: 0 1.5px; border-radius: 50%; background: var(--cv-primary); }
.cv-grid .cv-code-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-grid-empty { text-align: center; color: var(--cv-muted); padding: 18px !important; }
.cv-empty-upload { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; color: #fff; background: var(--cv-button-primary); border-radius: 6px; cursor: pointer; }
.cv-empty-upload:hover { background: var(--cv-button-hover); }
.cv-ribbon-precision { display: flex; flex-direction: column; gap: 2px; padding: 3px 8px; color: var(--cv-muted); font-size: 11px; }
.cv-ribbon-precision select { height: 25px; border: 1px solid var(--cv-line-strong); border-radius: 6px; background: var(--cv-paper); color: var(--cv-ink); }
.cv-pager { flex: none; min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 12px; border-top: 1px solid var(--cv-line-strong); background: var(--cv-chrome); box-sizing: border-box; color: var(--cv-muted); }
.cv-pager button { height: 26px; padding: 0 8px; border: 1px solid var(--cv-line); border-radius: 6px; color: var(--cv-ink); background: var(--cv-paper); }
.cv-pager-actions { display: flex; gap: 6px; }
.cv-budget-split { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cv-budget-source-note { flex: none; padding: 6px 10px; border-bottom: 1px solid color-mix(in srgb, var(--cv-warning) 30%, var(--cv-line)); background: var(--cv-amber-soft); color: var(--cv-warning); font-size: 12px; line-height: 1.5; }
.cv-budget-primary { flex: none; height: var(--cv-budget-primary-height, 65%); min-height: 150px; display: flex; flex-direction: column; }
.cv-budget-filter-menu { position: fixed; z-index: 70; width: 292px; max-height: calc(100vh - 16px); box-sizing: border-box; display: flex; flex-direction: column; padding: 7px; border: 1px solid var(--cv-line-strong); border-radius: 6px; color: var(--cv-ink); background: var(--cv-elevated); box-shadow: var(--cv-menu-shadow); font-size: 12px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.cv-budget-filter-menu button { cursor: pointer; }
.cv-budget-filter-menu-title { display: flex; align-items: center; justify-content: space-between; min-height: 24px; border-bottom: 1px solid var(--cv-line); }
.cv-budget-filter-menu-title strong { font-weight: 600; }
.cv-budget-filter-menu-title button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 6px; color: var(--cv-muted); background: transparent; }
.cv-budget-filter-menu-title button:hover { color: var(--cv-ink); background: var(--cv-primary-soft); }
.cv-budget-filter-menu-title .ui-icon { width: 12px; height: 12px; }
.cv-budget-filter-mode { display: flex; border-bottom: 1px solid var(--cv-line); margin: 5px 0; }
.cv-budget-filter-mode button { flex: 1; height: 27px; border: 0; border-bottom: 2px solid transparent; color: var(--cv-muted); background: transparent; }
.cv-budget-filter-mode button.active { color: var(--cv-primary-dark); border-bottom-color: var(--cv-primary); font-weight: 600; }
.cv-filter-value-search, .cv-filter-condition input, .cv-filter-condition select { box-sizing: border-box; height: 27px; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 7px; color: var(--cv-ink); background: var(--cv-paper); }
.cv-filter-value-search { flex: none; width: 100%; margin: 2px 0 5px; }
.cv-filter-value-actions { display: flex; gap: 5px; margin-bottom: 4px; }
.cv-filter-value-actions button { height: 23px; border: 1px solid var(--cv-line); border-radius: 6px; padding: 0 6px; color: var(--cv-muted); background: var(--cv-chrome); }
.cv-filter-value-actions button:hover:not(:disabled) { background: var(--cv-primary-soft); }
.cv-filter-value-list { flex: 1 1 178px; min-height: 80px; max-height: min(33vh, 210px); overflow: auto; border: 1px solid var(--cv-line); background: var(--cv-paper); }
.cv-filter-value-list label { display: flex; align-items: center; gap: 6px; min-height: 25px; padding: 2px 6px; box-sizing: border-box; cursor: pointer; }
.cv-filter-value-list label:hover { background: var(--cv-primary-soft); }
.cv-filter-value-list label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-filter-value-list input { flex: none; width: 14px; height: 14px; margin: 0; accent-color: var(--cv-primary); }
.cv-filter-list-status { padding: 12px 8px; color: var(--cv-muted); }
.cv-filter-hint { margin-top: 4px; color: var(--cv-muted); font-size: 11px; line-height: 1.35; }
.cv-filter-condition { display: flex; flex-direction: column; gap: 6px; padding: 7px 0 12px; }
.cv-filter-condition select, .cv-filter-condition input { width: 100%; }
.cv-filter-validation { color: var(--cv-danger); }
.cv-budget-filter-menu-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; flex: none; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--cv-line); }
.cv-budget-filter-menu-footer button { height: 25px; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 7px; color: var(--cv-ink); background: var(--cv-paper); }
.cv-budget-filter-menu-footer button:hover:not(:disabled) { background: var(--cv-primary-soft); }
.cv-budget-filter-menu-footer button.primary { border-color: var(--cv-button-primary); color: #fff; background: var(--cv-button-primary); }
.cv-budget-filter-menu-footer button.primary:hover:not(:disabled) { background: var(--cv-button-hover); }
.cv-budget-primary > .cv-scroll-table { flex: 1; min-height: 0; }
.cv-budget-more { display: flex; justify-content: center; padding: 9px; border-bottom: 1px solid var(--cv-line); background: var(--cv-paper); }
.cv-budget-more button { min-height: 27px; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 14px; color: var(--cv-primary-dark); background: var(--cv-primary-soft); }
.cv-budget-more button:hover:not(:disabled) { background: var(--cv-primary-soft); }
.cv-budget-splitter { flex: none; height: 7px; cursor: row-resize; background: var(--cv-chrome); border-top: 1px solid var(--cv-line); border-bottom: 1px solid var(--cv-line); box-sizing: border-box; position: relative; }
.cv-budget-splitter::after { content: ""; position: absolute; left: 50%; top: 2px; width: 46px; height: 1px; transform: translateX(-50%); background: var(--cv-line-strong); box-shadow: 0 2px 0 var(--cv-line-strong); }
.cv-budget-splitter:hover, .cv-budget-splitter:focus-visible { background: var(--cv-primary-soft); border-color: var(--cv-line-strong); }
.cv-detail { flex: 1; min-height: 100px; display: flex; flex-direction: column; }
.cv-detail-title { flex: none; min-height: 30px; display: flex; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--cv-line); background: var(--cv-chrome); font-weight: 600; overflow-x: auto; }
.cv-detail-tabs { align-self: stretch; display: flex; gap: 2px; flex: none; margin: 0 12px 0 -7px; }
.cv-detail-tabs button { height: 30px; border: 0; border-bottom: 2px solid transparent; padding: 0 9px; color: var(--cv-muted); background: transparent; font-weight: 400; }
.cv-detail-tabs button:hover { background: var(--cv-primary-soft); }
.cv-detail-tabs button.active { border-bottom-color: var(--cv-primary); color: var(--cv-primary-dark); font-weight: 600; }
.cv-detail-heading { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.cv-detail-empty { padding: 13px; color: var(--cv-muted); }
.cv-detail-summary { flex: none; padding: 5px 12px; border-bottom: 1px solid var(--cv-line); overflow-wrap: anywhere; }
.cv-detail-note { margin: 8px 12px; color: var(--cv-muted); font-size: 12px; }
.cv-row-formula { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px; }
.cv-row-formula dl { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; margin: 0; }
.cv-row-formula dt { color: var(--cv-muted); }
.cv-row-formula dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .cv-fee-conditions { flex-basis: 170px; } }
@media (max-width: 640px) {
  .cv-main-content.cv-fees-layout { flex-direction: column; }
  .cv-fee-conditions { flex: none; max-height: 150px; border-right: 0; border-bottom: 1px solid var(--cv-line-strong); }
}
.cv-quota-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--cv-paper); }
.cv-quota-controls { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 37px; padding: 5px 11px; border-bottom: 1px solid var(--cv-line); }
.cv-quota-controls > span { color: var(--cv-muted); white-space: nowrap; }
.cv-quota-controls strong { color: var(--cv-ink); }
.cv-quota-controls label { display: inline-flex; align-items: center; gap: 5px; color: var(--cv-muted); }
.cv-quota-controls select { width: min(360px, 31vw); min-width: 180px; height: 25px; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 6px; color: var(--cv-ink); background: var(--cv-paper); }
.cv-quota-controls button, .cv-quota-grid button, .cv-quota-detail-head button { display: inline-flex; align-items: center; gap: 4px; height: 25px; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 8px; color: var(--cv-primary-dark); background: var(--cv-paper); white-space: nowrap; }
.cv-quota-controls button:hover:not(:disabled), .cv-quota-grid button:hover:not(:disabled), .cv-quota-detail-head button:hover { background: var(--cv-primary-soft); }
.cv-quota-controls button.cv-quota-search-btn { display: inline-grid; place-items: center; width: 26px; min-width: 26px; padding: 0; }
.cv-quota-search-btn .ui-icon { width: 15px; height: 15px; }
.cv-quota-controls button .ui-icon { width: 14px; height: 14px; }
.cv-quota-notice { flex: none; padding: 5px 11px; color: var(--cv-warning); background: var(--cv-amber-soft); border-bottom: 1px solid color-mix(in srgb, var(--cv-warning) 30%, var(--cv-line)); font-size: 11px; }
.cv-quota-message { flex: none; padding: 4px 11px; color: var(--cv-muted); background: var(--cv-chrome); border-bottom: 1px solid var(--cv-line); font-size: 11px; }
.cv-quota-grid { width: 100%; min-width: 900px; }
.cv-quota-grid th:nth-child(1) { width: 18%; }.cv-quota-grid th:nth-child(2) { width: 10%; }.cv-quota-grid th:nth-child(3) { width: 26%; }.cv-quota-grid th:nth-child(4) { width: 7%; }.cv-quota-grid th:nth-child(5) { width: 16%; }.cv-quota-grid th:nth-child(6) { width: 9%; }.cv-quota-grid th:nth-child(7) { width: 14%; }
.cv-quota-detail-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; padding: 3px 11px; border-bottom: 1px solid var(--cv-line); }
.cv-quota-detail-body { flex: 1; min-height: 0; overflow: auto; padding: 7px 11px 14px; }
.cv-quota-detail-body p { margin: 0 0 7px; white-space: pre-wrap; }
.cv-quota-detail-body p strong { margin-right: 7px; }
.cv-standard-consumption { width: 100%; min-width: 640px; margin: 5px 0 10px; }
.cv-standard-consumption th:nth-child(1) { width: 19%; }.cv-standard-consumption th:nth-child(2) { width: 37%; }.cv-standard-consumption th:nth-child(3) { width: 10%; }.cv-standard-consumption th:nth-child(4) { width: 18%; }.cv-standard-consumption th:nth-child(5) { width: 16%; }
.cv-standard-component { display: flex; align-items: center; gap: 12px; margin: 8px 0 3px; }
.cv-standard-component span { color: var(--cv-muted); }
.cv-overview { overflow: auto; padding: 17px 22px; }
.cv-overview h2 { margin: 0 0 11px; font-size: 16px; }
.cv-overview h3 { margin: 16px 0 7px; font-size: 13px; }
.cv-overview-note { color: var(--cv-muted); margin: 8px 0; }
.cv-overview dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); max-width: 880px; margin: 0; border-top: 1px solid var(--cv-line); border-left: 1px solid var(--cv-line); }
.cv-overview dt, .cv-overview dd { margin: 0; min-height: 34px; box-sizing: border-box; padding: 7px 11px; border-bottom: 1px solid var(--cv-line); border-right: 1px solid var(--cv-line); }
.cv-overview dt { background: var(--cv-chrome); color: var(--cv-muted); }
.cv-overview dd { overflow-wrap: anywhere; white-space: pre-wrap; }
.cv-overview-warning { max-width: 870px; padding: 10px 12px; color: var(--cv-warning); background: var(--cv-amber-soft); border: 1px solid color-mix(in srgb, var(--cv-warning) 30%, var(--cv-line)); }
.cv-business-data { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px; }
.cv-data-table-picker { display: flex; align-items: center; gap: 8px; padding-bottom: 7px; }
.cv-data-table-picker select { min-width: 0; max-width: 100%; height: 28px; border: 1px solid var(--cv-line); color: inherit; background: var(--cv-paper); }
.cv-project-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; max-width: 1000px; }
.cv-report-title { flex: none; min-height: 42px; display: flex; align-items: center; justify-content: center; padding: 6px 13px; text-align: center; font: 600 22px/1.4 var(--cv-font-family); color: #000; background: #fff; }
.cv-report-title + .cv-info-band { color: #000; background: #fff; }
.cv-report-basis { padding: 5px 13px; border-bottom: 1px solid var(--cv-line); color: var(--cv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-project-resources-toolbar { flex: none; display: flex; align-items: center; gap: 8px; min-height: 37px; padding: 4px 12px; box-sizing: border-box; border-bottom: 1px solid var(--cv-line); background: var(--cv-chrome); }
.cv-project-resources-toolbar label { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; color: var(--cv-muted); }
.cv-project-resources-search input { width: 220px; }
.cv-project-resources-type select { width: 182px; }
.cv-project-resources-toolbar input, .cv-project-resources-toolbar select { height: 25px; box-sizing: border-box; padding: 0 7px; border: 1px solid var(--cv-line-strong); border-radius: 6px; background: var(--cv-paper); }
.cv-project-resources-toolbar button { height: 25px; padding: 0 9px; border: 1px solid var(--cv-line); border-radius: 6px; background: var(--cv-paper); color: var(--cv-muted); white-space: nowrap; }
.cv-project-resources-toolbar button:hover:not(:disabled) { border-color: var(--cv-line-strong); background: var(--cv-primary-soft); }
.cv-state-text { color: var(--cv-warning); }
.cv-state-text.failed { color: var(--cv-danger); }
.cv-status { flex: none; min-height: 27px; display: flex; align-items: center; gap: 12px; padding: 2px 12px; box-sizing: border-box; border-top: 1px solid var(--cv-line-strong); background: var(--cv-chrome); color: var(--cv-muted); font-size: 12px; }
.cv-status-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-status-extra { flex: none; border-left: 1px solid var(--cv-line); padding-left: 12px; white-space: nowrap; }

/* 项目库与回收站共用紧凑表格，列边线贯穿表头和正文。 */
.cv-project-library { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--cv-paper); }
.cv-library-header { flex: none; min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 15px; box-sizing: border-box; border-bottom: 1px solid var(--cv-line); }
.cv-library-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cv-library-heading > .ui-icon { width: 20px; height: 20px; color: var(--cv-primary); }
.cv-library-heading h1 { margin: 0; white-space: nowrap; font-size: 16px; font-weight: 600; }
.cv-library-header-actions { display: flex; align-items: center; gap: 6px; }
.cv-library-header-actions > button, .cv-library-upload { position: relative; height: 27px; display: inline-flex; align-items: center; gap: 5px; box-sizing: border-box; padding: 0 9px; border: 1px solid var(--cv-line-strong); border-radius: 6px; color: var(--cv-ink); background: var(--cv-paper); white-space: nowrap; }
.cv-library-header-actions > button:hover { background: var(--cv-primary-soft); }
.cv-library-upload { border-color: var(--cv-button-primary); color: #fff; background: var(--cv-button-primary); cursor: pointer; }
.cv-library-upload:hover { background: var(--cv-button-hover); }
.cv-library-header-actions .ui-icon { width: 15px; height: 15px; }
.cv-library-switch { flex: none; display: flex; align-items: stretch; height: 33px; padding: 0 13px; border-bottom: 1px solid var(--cv-line); }
.cv-library-switch button { display: inline-flex; align-items: center; gap: 5px; border: 0; border-bottom: 2px solid transparent; padding: 0 11px; color: var(--cv-muted); background: transparent; }
.cv-library-switch button:hover { background: var(--cv-primary-soft); }
.cv-library-switch button.active { border-bottom-color: var(--cv-primary); color: var(--cv-primary-dark); font-weight: 600; }
.cv-library-switch button span { color: var(--cv-muted); font-size: 11px; font-weight: 400; }
.cv-library-switch .ui-icon { width: 14px; height: 14px; }
.cv-library-toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; min-height: 43px; padding: 5px 13px; box-sizing: border-box; border-bottom: 1px solid var(--cv-line); background: var(--cv-chrome); }
.cv-library-toolbar label { display: inline-flex; align-items: center; gap: 5px; color: var(--cv-muted); white-space: nowrap; }
.cv-library-toolbar select, .cv-library-search input { height: 27px; box-sizing: border-box; border: 1px solid var(--cv-line-strong); border-radius: 6px; padding: 0 7px; color: var(--cv-ink); background: var(--cv-paper); }
.cv-library-toolbar select { min-width: 92px; }
.cv-library-search { display: flex; align-items: center; min-width: 230px; width: min(30vw, 330px); height: 27px; border: 1px solid var(--cv-line-strong); border-radius: 6px; background: var(--cv-paper); }
.cv-library-search > .ui-icon { margin: 0 7px; width: 15px; height: 15px; color: var(--cv-muted); }
.cv-library-search input { flex: 1; min-width: 0; height: 25px; border: 0; padding: 0 8px; outline: 0; }
.cv-library-search:focus-within { outline: 2px solid var(--cv-blue-line); outline-offset: -2px; }
.cv-library-search button { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 0 7px; border: 0; border-left: 1px solid var(--cv-line); color: var(--cv-primary-dark); background: var(--cv-chrome); }
.cv-library-search button:hover { background: var(--cv-primary-soft); }
.cv-library-clear { height: 27px; padding: 0 8px; border: 1px solid transparent; color: var(--cv-primary-dark); background: transparent; }
.cv-library-clear:hover { border-color: var(--cv-line); background: var(--cv-paper); }
.cv-library-trash-note { flex: none; min-height: 35px; display: flex; align-items: center; padding: 5px 14px; box-sizing: border-box; border-bottom: 1px solid var(--cv-line); color: var(--cv-muted); background: var(--cv-chrome); }
.cv-library-grid-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--cv-paper); }
.cv-library-grid { width: 100%; min-width: 1000px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.cv-library-grid col.index { width: 4%; }
.cv-library-grid col.project { width: 23%; }
.cv-library-grid col.compilation { width: 8%; }
.cv-library-grid col.software { width: 8%; }
.cv-library-grid col.version { width: 9%; }
.cv-library-grid col.format { width: 7%; }
.cv-library-grid col.time { width: 11%; }
.cv-library-grid col.state { width: 9%; }
.cv-library-grid col.scopes { width: 8%; }
.cv-library-grid col.size { width: 6%; }
.cv-library-grid col.action { width: 7%; }
.cv-library-grid th, .cv-library-grid td { box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 9px; border-right: 1px solid var(--cv-line); border-bottom: 1px solid var(--cv-line); vertical-align: middle; }
.cv-library-grid th:last-child, .cv-library-grid td:last-child { border-right: 0; }
.cv-library-grid thead th { position: sticky; top: 0; z-index: 2; height: 34px; color: var(--cv-ink); background: var(--cv-header); text-align: center; font-weight: 600; border-bottom-color: var(--cv-line-strong); }
.cv-library-grid thead th.cv-column-edge { cursor: col-resize; border-right-color: var(--cv-primary); }
.cv-library-grid tbody tr:hover td { background: var(--cv-primary-soft); }
.cv-library-grid tbody tr.selected td,
.cv-library-grid tbody tr.selected:hover td { background: var(--cv-selected-row); color: var(--cv-ink); }
.cv-library-grid td { height: 42px; }
.cv-library-grid td.cv-library-version { white-space: pre-wrap; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.45; }
.cv-library-index { color: var(--cv-muted); background: var(--cv-chrome); text-align: center; font-variant-numeric: tabular-nums; }
.cv-library-name { text-align: left; }
.cv-library-name button, .cv-library-name strong { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; padding: 0; color: var(--cv-primary); background: transparent; font-weight: 600; text-align: left; }
.cv-library-name button:hover { color: var(--cv-primary-dark); text-decoration: underline; }
.cv-library-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cv-muted); font-size: 11px; }
.cv-library-num { text-align: right; font-variant-numeric: tabular-nums; }
.cv-library-center, .cv-library-grid td.cv-library-version { text-align: center; }
.cv-library-status { display: inline-flex; align-items: center; gap: 6px; color: var(--cv-warning); }
.cv-library-status i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--cv-warning); }
.cv-library-status.ready { color: var(--cv-success); }
.cv-library-status.ready i { background: var(--cv-success); }
.cv-library-status.failed { color: var(--cv-danger); }
.cv-library-status.failed i { background: var(--cv-danger); }
.cv-library-row-actions { text-align: center; }
.cv-library-row-actions button { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; box-sizing: border-box; gap: 3px; height: 24px; margin: 0 1px; border: 1px solid var(--cv-line); border-radius: 6px; padding: 0 5px; color: var(--cv-primary); background: var(--cv-paper); white-space: nowrap; }
.cv-library-row-actions button:hover { border-color: var(--cv-line-strong); background: var(--cv-primary-soft); }
.cv-library-row-actions button.cv-library-open, .cv-library-row-actions button.danger { width: 24px; padding: 0; }
.cv-library-row-actions button.danger { color: var(--cv-danger); }
.cv-library-row-actions button.danger:hover { border-color: color-mix(in srgb, var(--cv-danger) 35%, var(--cv-line)); background: var(--cv-danger-soft); }
.cv-library-row-actions .ui-icon { width: 14px; height: 14px; }
.cv-library-row-actions .cv-project-actions-toggle { width: 32px; height: 32px; padding: 0; border-color: transparent; color: var(--cv-ink); background: transparent; }
.cv-project-actions-toggle .ui-icon, .cv-project-actions-menu[popover] .ui-icon { width: 16px; height: 16px; }
.cv-project-actions-menu[popover] { position: fixed; inset: auto; margin: 0; padding: 4px; min-width: 180px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 32px); overflow-y: auto; box-sizing: border-box; border: 1px solid var(--cv-line); border-radius: 8px; color: var(--cv-ink); background: var(--cv-elevated); box-shadow: var(--cv-menu-shadow); font: 14px/22px var(--cv-font-family); }
.cv-project-actions-menu[popover] button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; height: 32px; margin: 0; padding: 0 8px; border: 0; border-radius: 6px; text-align: left; color: var(--cv-ink); background: transparent; font: inherit; }
.cv-project-actions-menu[popover] button:hover:not(:disabled):not(.danger) { color: var(--cv-primary); background: color-mix(in srgb, var(--cv-primary) 14%, transparent); }
.cv-project-actions-menu[popover] hr { margin: 4px 0; border: 0; border-top: 1px solid var(--cv-menu-divider); }
.cv-project-actions-menu[popover] button.danger { width: 100%; color: var(--cv-danger); }
.cv-project-actions-menu[popover] button.danger:hover:not(:disabled) { color: var(--cv-danger); background: var(--cv-danger-soft); }
.cv-library-grid td.cv-library-empty { height: 90px; color: var(--cv-muted); text-align: center; }
.cv-library-pager { flex: none; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 12px; box-sizing: border-box; border-top: 1px solid var(--cv-line-strong); color: var(--cv-muted); background: var(--cv-chrome); }
.cv-library-pager > div { display: flex; align-items: center; gap: 8px; }
.cv-library-pager button { height: 24px; padding: 0 8px; border: 1px solid var(--cv-line); border-radius: 6px; color: var(--cv-ink); background: var(--cv-paper); }
.cv-library-pager button:hover:not(:disabled) { background: var(--cv-primary-soft); }
body.cv-resizing-pane { user-select: none !important; cursor: col-resize !important; }
body.cv-resizing-pane.cv-resizing-height { cursor: row-resize !important; }

@media (max-width: 1180px) {
  .cv-ribbon-optional { display: none; }
  .cv-workspace { --cv-sidebar-width: 188px; }
  .cv-report-sidebar { width: var(--cv-report-sidebar-width, 188px); }
  .cv-ribbon-search { width: 258px; }
}
@media (max-width: 940px) {
  .cv-ribbon-secondary { display: none; }
  .cv-workspace { --cv-sidebar-width: 168px; }
  .cv-report-sidebar { width: var(--cv-report-sidebar-width, 168px); }
  .cv-ribbon-search { width: 220px; }
  .cv-brand { min-width: 120px; }
  .cv-project-resources-toolbar { flex-wrap: wrap; }
}
@media (max-width: 1050px) {
  .cv-view-tabs { flex-wrap: wrap; height: auto; }
  .cv-view-context { display: flex; flex-basis: 100%; min-height: 28px; justify-content: flex-start; border-left: 0; }
  .cv-view-search { margin-left: auto; }
}
@media (max-width: 800px) {
  .cv-view-tabs { padding: 0 4px; }
  .cv-view-tab-list > button { padding: 0 7px; }
  .cv-view-search { width: 210px; }

}

.cv-workbench-link { display: flex; align-items: center; color: inherit; white-space: nowrap; font-size: 12px; padding: 4px 8px; text-decoration: none; }
.cv-workbench-link:hover { text-decoration: underline; }

/* 保留造价工作区的密度、列宽与 A4 阅读方式；应用外壳和纸面分别着色。 */
.cv-ribbon-body { overflow-x: auto; overflow-y: hidden; }
.cv-ribbon-groups { overflow: visible; flex: none; }
.cv-ribbon-tabs button.active, .cv-view-tabs button.active { color: var(--cv-primary); border-bottom-color: var(--cv-primary); background: var(--cv-blue-soft); font-weight: 600; }
.cv-sidebar-title { height: 30px; font-weight: 400; }
.cv-grid td { height: 25px; }
.cv-report-preview { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; padding: 10px; background: var(--cv-page); }
.cv-report-sheet { width: max(calc(var(--cv-paper-width, 297mm) * var(--cv-report-zoom, 1)), var(--cv-report-content-width, 0px)); min-width: 0; height: 100%; flex: none; display: flex; flex-direction: column; box-sizing: border-box; margin: 0 auto; padding: 10px 18px 6px; border: 1px solid #d9d9d9; background: #fff; color: #000; }
.cv-report-sheet[data-report-fit="true"] { width: calc(min(var(--cv-paper-width, 297mm), var(--cv-preview-width, 100vw)) * var(--cv-report-zoom, 1)); }
.cv-report-sheet .cv-info-band { flex-wrap: wrap; min-height: 28px; gap: 2px 12px; padding: 2px 0 6px; border: 0; white-space: normal; color: #000; font: 12px/1.5 var(--cv-font-family); }
.cv-report-sheet .cv-info-band strong { font-weight: 400; color: inherit; }
.cv-report-sheet .cv-info-band span { overflow: visible; text-overflow: clip; }
.cv-report-sheet .cv-scroll-table { border: 0; }
.cv-report-sheet .cv-grid { min-width: 0; border-left: 1px solid #d9d9d9; font: var(--cv-report-font, 12px)/1.35 var(--cv-font-family); }
.cv-report-sheet .cv-grid th, .cv-report-sheet .cv-grid td { min-width: 0; max-height: none; padding: 3px 5px; border-color: #d9d9d9; color: #000; text-overflow: clip; }
.cv-report-sheet .cv-grid thead th { height: auto; min-height: 32px; padding: 5px 3px; white-space: normal; overflow-wrap: anywhere; color: #000; background: #fafafa; border-right: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; font-weight: 600; text-align: center; vertical-align: middle; }
.cv-report-sheet .cv-grid thead tr:first-child th { border-top: 1px solid #d9d9d9; box-shadow: inset 0 1px #d9d9d9; }
.cv-report-sheet .cv-grid td { height: var(--cv-report-row, 30px); }
.cv-report-sheet .cv-grid td:not(.number) { white-space: normal; overflow-wrap: anywhere; }
.cv-report-sheet .cv-grid .center, .cv-report-sheet .cv-grid .code, .cv-report-sheet .cv-grid .unit { text-align: center; }
.cv-report-sheet .cv-grid td.number { white-space: nowrap; text-align: right; }
.cv-report-sheet .cv-grid td.sticky { position: static; }
.cv-report-sheet .cv-grid th.sticky { left: auto; }
.cv-report-sheet .cv-grid tbody .index { color: #000; background: #fff; }
.cv-report-sheet .cv-grid tbody tr.level-root td, .cv-report-sheet .cv-grid tbody tr.level-one td { background: #fff; }
.cv-report-sheet .cv-grid tbody tr:hover td { background: #fafafa; }
.cv-report-sheet .cv-grid tbody tr.selected td { background: var(--cv-selected-row); }
.cv-report-sheet .cv-library-pager { padding: 4px 0 0; border: 0; background: #fff; }
.cv-report-sheet .cv-report-title { box-sizing: border-box; width: var(--cv-report-table-width, 100%); color: #000; background: #fff; font-size: calc(22px * var(--cv-report-zoom, 1)); }
.cv-report-sheet .cv-info-band { box-sizing: border-box; width: var(--cv-report-table-width, 100%); font-size: calc(12px * var(--cv-report-zoom, 1)); }
.cv-ribbon-options button.cv-zoom-value { width: 48px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cv-filter-value-actions label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.cv-filter-value-actions input { margin: 0; accent-color: var(--cv-primary); }
.cv-view-search { width: 345px; }
.cv-search-position { flex: none; font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .cv-view-search { width: 260px; } }

/* 共用主题/密度只控制工作区；报表保留自己的纸面、字号、行高及缩放偏好。 */
:root[data-density="comfortable"] { --cv-control-height: 36px; --cv-row-height: 36px; --cv-table-font: 14px; }
.cv-library-upload, .cv-empty-upload, .cv-budget-filter-menu-footer button.primary { color: var(--cv-on-primary); }
.cv-menubar.portal-workspace-header { height: var(--portal-header-height, 56px); box-sizing: border-box; align-items: center; gap: 8px; color: var(--cv-ink); background: var(--cv-paper); border-bottom: 1px solid var(--cv-line); }
.cv-page-heading { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.cv-menubar .cv-brand { min-width: 0; padding-right: 8px; color: var(--cv-ink); text-decoration: none; font-size: 16px; font-weight: 600; }
.cv-brand img, .cv-login-mark img { width: 32px; height: 32px; object-fit: contain; }
.cv-login-mark img { width: 48px; height: 48px; }
.cv-brand-dark { display: none; }
:root[data-theme="dark"] .cv-brand-light { display: none; }
:root[data-theme="dark"] .cv-brand-dark { display: inline-block; }
.cv-workbench-link { height: var(--cv-control-height); box-sizing: border-box; padding: 0 10px; border-radius: 6px; color: var(--cv-muted); font-size: 14px; }
.cv-workbench-link:hover { background: var(--cv-primary-soft); color: var(--cv-primary); text-decoration: none; }
.cv-account-menu { position: relative; flex: none; }
.cv-account-menu summary { display: flex; align-items: center; gap: 5px; min-height: var(--cv-control-height); max-width: 180px; padding: 0 8px; list-style: none; cursor: pointer; border-radius: 6px; color: var(--cv-muted); }
.cv-account-menu summary::-webkit-details-marker { display: none; }
.cv-account-menu summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-account-menu summary:hover, .cv-account-menu[open] summary { color: var(--cv-primary); background: var(--cv-primary-soft); }
.cv-account-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 180px; max-width: min(300px, calc(100vw - 24px)); padding: 12px; border: 1px solid var(--cv-line); border-radius: 6px; color: var(--cv-ink); background: var(--cv-elevated); box-shadow: var(--cv-menu-shadow); overflow-wrap: anywhere; max-height: calc(100dvh - 32px); overflow-y: auto; }
.cv-account-panel > span { display: block; margin-bottom: 8px; }
.cv-logout-form button { width: 100%; min-height: var(--cv-control-height); margin: 0; border-color: var(--cv-line); color: var(--cv-danger); }
.cv-logout-form button:hover { background: var(--cv-danger-soft); }
.cv-appearance { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: var(--cv-control-height); padding: 0 8px; border: 1px solid transparent; border-radius: 6px; color: var(--cv-muted); background: transparent; }
.cv-appearance:hover { color: var(--cv-primary); background: var(--cv-primary-soft); }
.cv-mobile-label { display: none; }
.cv-library-row .cv-project-name { flex: 1; }
.cv-library-row .cv-project-status { flex: none; font-size: 11px; color: var(--cv-muted); }
.cv-app :is(input:not([type="checkbox"]):not([type="file"]), select) { height: var(--cv-control-height); color: var(--cv-ink); background: var(--cv-paper); }
.cv-app :is(.cv-library-header-actions > button, .cv-library-upload, .cv-library-search, .cv-library-clear, .cv-library-pager button, .cv-pager button, .cv-project-resources-toolbar button, .cv-quota-controls button, .cv-quota-detail-head button, .cv-budget-filter-menu-footer button, .cv-filter-value-actions button) { min-height: var(--cv-control-height); height: var(--cv-control-height); }
.cv-library-search input { height: calc(var(--cv-control-height) - 2px); }
.cv-library-search button { min-height: calc(var(--cv-control-height) - 2px); }
.cv-ribbon-tabs, .cv-file-tabs, .cv-view-tabs { min-height: var(--cv-control-height); height: var(--cv-control-height); }
.cv-ribbon { height: calc(var(--cv-control-height) + 89px); }
.cv-ribbon.collapsed { height: calc(var(--cv-control-height) + 1px); }
.cv-file-tab, .cv-file-tab.active, .cv-library-tab, .cv-library-tab.active { min-height: var(--cv-control-height); height: var(--cv-control-height); }
.cv-view-tabs .cv-view-search button, .cv-view-tabs .cv-budget-filter-toggle, .cv-column-picker summary { min-height: var(--cv-control-height); height: var(--cv-control-height); }
.cv-view-tabs .cv-view-search .cv-search-clear { width: var(--cv-control-height); }
.cv-grid, .cv-library-grid { font-size: var(--cv-table-font); }
.cv-grid td { height: var(--cv-row-height); max-height: none; }
.cv-grid td.center { text-align: center; }
.cv-grid th.index, .cv-library-grid th.index { min-width: 48px; white-space: nowrap; }
.cv-grid .index { width: 48px; min-width: 48px; max-width: none; }
.cv-grid thead th { vertical-align: middle; }
.cv-grid .name, .cv-grid .resource-name, .cv-grid .formula, .cv-grid .note { text-align: left; }
.cv-grid thead :is(.name, .resource-name, .formula, .note) { text-align: center; }
.cv-grid tbody tr.selected td, .cv-library-grid tbody tr.selected td { color: var(--cv-ink); }
.cv-status.has-error { color: var(--cv-danger); background: var(--cv-danger-soft); }
.cv-grid-empty, .cv-library-empty { line-height: 1.6; }
.cv-message-page { max-width: 640px; margin: 10vh auto; padding: 24px; color: var(--cv-ink); }
.cv-message-page h1 { margin: 0 0 16px; font-size: 22px; }
.cv-message-page a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cv-primary); }
.cv-message-page code { overflow-wrap: anywhere; }
.cv-report-sheet, .cv-table-report { --cv-paper: #fff; --cv-chrome: #fff; --cv-ink: #000; --cv-muted: #000; --cv-header: #fafafa; --cv-line: #d9d9d9; --cv-line-strong: #d9d9d9; --cv-primary-soft: #fafafa; --cv-amber-soft: #fff; --cv-selected-row: #e6f4ff; color: #000; background: #fff; color-scheme: light; }
.cv-grid.cv-table-report thead th { color: #000; background: #fafafa; }
.cv-report-sheet .cv-library-pager { --cv-primary: #1677ff; color: #000; }
.cv-report-sheet .cv-grid { font-size: var(--cv-report-font, 12px); }
.cv-report-sheet .cv-grid td { height: var(--cv-report-row, 30px); }
.cv-report-sheet .cv-grid tbody tr.selected td { color: #000; }
.cv-report-sheet :is(.cv-grid .name, .cv-grid .resource-name, .cv-grid .formula, .cv-grid .note) { text-align: left; }
.cv-report-sheet .cv-grid thead :is(.name, .resource-name, .formula, .note) { text-align: center; }
@media (max-width: 1050px) and (min-width: 681px) {
  .cv-view-tabs { height: auto; }
}
@media (max-width: 680px) {
  :root[data-density] { --cv-control-height: 44px; --cv-row-height: 44px; --cv-table-font: 14px; }
  .cv-app { min-height: 0; }
  .cv-menubar.portal-workspace-header { flex-wrap: wrap; height: auto; min-height: 56px; padding: 4px 8px; gap: 2px; }
  .cv-brand { flex: 1 0 140px; min-height: 44px; font-size: 15px; }
  .cv-menu-spacer { display: none; }
  .cv-account-menu summary { max-width: 112px; padding: 0 5px; }
  .cv-account-menu summary .cv-account-name { display: none; }
  .cv-menubar .cv-appearance { min-width: 44px; }
  .cv-ribbon { height: 143px; }
  .cv-ribbon.collapsed { height: 45px; }
  .cv-ribbon-tabs { padding: 0 4px; }
  .cv-ribbon-tabs button { min-width: 48px; padding: 0 8px; }
  .cv-ribbon-tabs button.cv-ribbon-toggle { font-size: 12px; }
  .cv-ribbon-body { height: 98px; }
  .cv-ribbon-action { min-height: 58px; }
  .cv-ribbon-options button { min-width: 44px; height: 44px; }
  .cv-ribbon-optional, .cv-ribbon-secondary { display: flex; }
  .cv-workspace { flex-direction: column; overflow: hidden; }
  .cv-sidebar, .cv-report-sidebar { width: 100%; max-height: 25dvh; border-bottom: 1px solid var(--cv-line); }
  .cv-sidebar-title { height: 44px; min-height: 44px; padding: 0 10px; }
  .cv-sidebar-actions button, .cv-sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: auto; min-width: 44px; min-height: 44px; }
  .cv-sidebar-scroll { padding: 4px 6px; }
  .cv-tree-head, .cv-tree-row, .cv-library-row { min-height: 44px; }
  .cv-workspace.sidebar-collapsed .cv-sidebar, .cv-report-sidebar.collapsed { width: 100%; max-height: 44px; }
  .cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-title, .cv-report-sidebar.collapsed .cv-sidebar-title { justify-content: space-between; padding: 0 10px; }
  .cv-workspace.sidebar-collapsed > .cv-sidebar .cv-sidebar-title > span, .cv-report-sidebar.collapsed .cv-sidebar-title > span { display: inline; }
  .cv-sidebar-splitter { display: none; }
  .cv-main { min-height: 150px; }
  .cv-view-tabs { height: auto; flex-wrap: wrap; padding: 0 6px; gap: 4px; }
  .cv-view-tab-list { flex: 1 0 100%; min-height: 44px; }
  .cv-view-context { display: flex; flex: 1 0 100%; order: 2; justify-content: flex-start; min-height: 28px; padding: 0 3px 4px; border: 0; }
  .cv-view-context > span:first-child { max-width: 55%; }
  .cv-view-search { flex: 1; width: auto; padding: 0; margin-left: 0; border-left: 0; }
  .cv-app :is(input:not([type="checkbox"]):not([type="file"]), select) { font-size: 16px; }
  .cv-view-search input { width: 80px; }
  .cv-mobile-label { display: inline; font-size: 12px; white-space: nowrap; }
  .cv-view-tabs .cv-view-search .cv-search-clear, .cv-view-tabs .cv-budget-filter-toggle, .cv-column-picker summary, .cv-quota-controls button.cv-quota-search-btn { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: auto; min-width: 44px; padding: 0 5px; }
  .cv-column-picker-panel { position: fixed; top: 120px; right: 8px; width: min(260px, calc(100vw - 16px)); }
  .cv-column-picker-panel label, .cv-column-picker-panel button, .cv-filter-value-list label, .cv-level-menu button { min-height: 44px; }
  .cv-library-header { flex-wrap: wrap; padding: 6px 10px; gap: 4px; }
  .cv-library-toolbar { padding: 6px 10px; gap: 6px; }
  .cv-library-search { width: 100%; min-width: 0; }
  .cv-library-toolbar label { flex: 1; }
  .cv-library-toolbar select { flex: 1; min-width: 0; }
  .cv-library-switch { height: 44px; }
  .cv-library-grid-wrap, .cv-scroll-table, .cv-quota-detail-body { overscroll-behavior-inline: contain; }
  .cv-library-grid td { height: 54px; }
  .cv-library-row-actions button, .cv-library-row-actions button.cv-library-open, .cv-library-row-actions button.danger { min-width: 44px; min-height: 44px; width: auto; height: 44px; padding: 0 5px; }
  .cv-library-pager, .cv-pager { flex-wrap: wrap; padding: 4px 8px; gap: 4px; }
  .cv-main-content.cv-fees-layout { flex-direction: column; }
  .cv-fee-conditions { flex: none; max-height: 25dvh; border-right: 0; border-bottom: 1px solid var(--cv-line); }
  .cv-info-band { flex-wrap: wrap; gap: 2px 8px; padding: 4px 8px; white-space: normal; }
  .cv-grid :is(th.sticky, td.sticky):not(.index) { position: static; }
  .cv-grid .tree-expander { width: 36px; height: 36px; }
  .cv-grid .tree-expander-space { width: 36px; height: 36px; }
  .cv-detail-title { flex-wrap: wrap; min-height: 44px; padding: 0 8px; }
  .cv-detail-tabs { overflow-x: auto; width: 100%; margin: 0; }
  .cv-detail-tabs button { min-height: 44px; height: 44px; white-space: nowrap; }
  .cv-budget-primary { min-height: 140px; }
  .cv-project-resources-toolbar, .cv-quota-controls { flex-wrap: wrap; padding: 4px 8px; gap: 6px; }
  .cv-project-resources-toolbar label { width: 100%; }
  .cv-project-resources-toolbar input, .cv-project-resources-toolbar select, .cv-quota-controls select { flex: 1; width: auto; max-width: 100%; min-width: 0; }
  .cv-quota-controls label { flex: 1; }
  .cv-overview { padding: 12px 10px; }
  .cv-overview dl { grid-template-columns: 110px minmax(0, 1fr); }
  .cv-status-extra:last-child { display: none; }
  .cv-report-preview { padding: 6px; }
  .cv-report-sheet { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) { .cv-switch-track, .cv-switch-track::after { transition: none; } }
@media print {
  html, body, .cv-shell-content, .cv-app { min-height: 0; background: #fff !important; color: #000; color-scheme: light !important; }
  .cv-project-actions-menu[popover] { display: none !important; }
  .cv-app:has(.cv-report-sheet) { height: auto; min-height: 0; overflow: visible; }
  .cv-app:has(.cv-report-sheet) :is(.cv-menubar, .cv-ribbon, .cv-file-tabs, .cv-status, .cv-sidebar, .cv-report-sidebar, .cv-sidebar-splitter, .cv-view-tabs, .cv-report-tabs, .cv-library-pager) { display: none !important; }
  .cv-app:has(.cv-report-sheet) :is(.cv-workspace, .cv-main, .cv-main-content, .cv-view-content, .cv-report-preview, .cv-scroll-table) { display: block; height: auto; min-height: 0; overflow: visible; padding: 0; background: #fff; }
  .cv-report-sheet { --cv-report-zoom: 1 !important; width: 100% !important; height: auto; margin: 0; padding: 0; border: 0; }
  .cv-report-sheet .cv-grid { min-width: 100%; }
  .cv-report-sheet .cv-grid thead th { position: static; }
  .cv-report-sheet .cv-grid :is(th, td) { color: #000 !important; print-color-adjust: exact; }
  .cv-report-sheet .cv-grid tbody tr:is(:hover, .selected) td { background: #fff; }
  .cv-report-sheet .cv-grid tr { break-inside: avoid; }
}

.cv-app :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
