@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";
@import "./tokens.css";
.ops-card-link { display:inline-flex;align-items:center;gap:5px;margin-left:auto;padding:5px 8px;border-radius:5px;color:var(--primary);font-size:var(--type-support);font-weight:700;text-decoration:none;white-space:nowrap; }
.ops-card-link:hover { background:var(--primary-soft); }
.ops-card-link:focus-visible { outline:2px solid var(--primary);outline-offset:2px; }
.ops-card-link svg { flex:none; }
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-primary-hover: var(--primary-hover);
--color-primary-soft: var(--primary-soft);
--color-primary-soft-foreground: var(--primary-soft-foreground);
--color-primary-border: var(--primary-border);
--color-surface-subtle: var(--surface-subtle);
--color-text-secondary: var(--text-secondary);
--color-border-subtle: var(--border-subtle);
--color-border-hover: var(--border-hover);
--color-icon: var(--icon);
--color-success: var(--success);
--color-success-soft: var(--success-soft);
--color-success-border: var(--success-border);
--color-warning: var(--warning);
--color-warning-soft: var(--warning-soft);
--color-warning-border: var(--warning-border);
--color-info: var(--info);
--color-info-soft: var(--info-soft);
--color-info-border: var(--info-border);
--color-destructive-hover: var(--destructive-hover);
--color-destructive-foreground: var(--destructive-foreground);
--color-destructive-soft: var(--destructive-soft);
--color-destructive-border: var(--destructive-border);
--color-notice: var(--notice);
--color-notice-foreground: var(--notice-foreground);
--color-overlay: var(--overlay);
--radius-sm: calc(var(--radius) * 0.6);
--radius-md: calc(var(--radius) * 0.8);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) * 1.4);
--radius-2xl: calc(var(--radius) * 1.8);
--radius-3xl: calc(var(--radius) * 2.2);
--radius-4xl: calc(var(--radius) * 2.6);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
--font-sans: "IBM Plex Sans", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
--font-serif: "Iowan Old Style", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
box-sizing: border-box;
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
width: 9px;
height: 9px;
}
*::-webkit-scrollbar-track {
background: var(--scrollbar-track);
}
*::-webkit-scrollbar-thumb {
border: 2px solid transparent;
border-radius: 999px;
background: var(--scrollbar-thumb);
background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
background-color: var(--scrollbar-thumb-hover);
}
*::-webkit-scrollbar-corner {
background: transparent;
}
/*
* 「表格没横向超出 ⇒ 收起横向滚动条」只适用于**量过**的容器。
* ⚠️ ⛔ 把这条判据挂在裸 `:not(.has-horizontal-overflow)` 上当默认值:没接
* `useHorizontalOverflow()` 的容器永远拿不到那个类,会被误判成"不超出"而
* `overflow-x:hidden`,把末列夹成看不见也点不到(2026-11-14 实测:客户门户
* 工单进度表 960px 视口下「操作」列不可达,`.work-order-table-wrap` 自带的
* `overflow-x:auto` 被本条以更高优先级覆盖)。
* ⇒ 判据改绑 hook 在测量后落地的 `data-overflow-measured`:未测量的容器保持原生 `auto`。
*/
:root .measured-table-scroll[data-overflow-measured="true"]:not(.has-horizontal-overflow) {
overflow-x: hidden;
}
/*
* 台账列表:高度对齐「运营商管理」——占满主内容区可见高度,表体区内滚,底部分页固定。
* 页根加 .page-fill;列表卡片加 .list-shell-fill;表滚动区保持 .measured-table-scroll。
*
* 缺陷 P-38(2026-11-14 Chrome 960×640 实测:工单台账 18 行 `
` 明明在 DOM 里,
* 列表区却只剩约 2px 可见、既看不见也点不到):这里原本写的是**固定** height,
* 只预留了顶栏 4rem 与主区上下内边距 2.5rem(见 `AppShell.tsx` 的 `h-16`、`py-4 sm:py-5`),
* ⛔ 没算页内要素换行长出来的高度——窄视口下 `.work-order-ledger-alerts` 由 4 列换成 2 行、
* 筛选行随之换行,把这些 `flex: none` 的兄弟推到多高,下面的 `.list-shell-fill`
* (`flex:1 + min-height:0 + overflow:hidden`)就被挤到贴着底边,表体超出底边的部分整段裁掉。
* 现在把「视口高度」当**下限**而不是上限:容器至少铺满一屏,页内要素要得更多时整体长高,
* 纵向滚动交给文档级滚动(AppShell 内容列是 `min-h-svh`、`` 无 overflow,
* 顶栏 `sticky top-0 h-16` 始终可见;⛔ 给这两层加 overflow:hidden,那样又变成裁切);
* 表体自身的下限兜底见本文件下方 `.list-shell-fill > .measured-table-scroll`。
* ⛔ 在 `.page-fill` 本身上回退成固定 height(需要锁高的列表页另用 `.page-fill-window`,
* 那条变体自带表体 240px 下限,见下);也⛔ 按 640/900 这类具体视口高度写白名单分支。
* ⛔ 用 `overflow:clip` + 无高度子容器:那会让 flex 轨道失去确定高度,
* 表体撑到自然高度、分页器被顶出屏幕(2026-11-13 实测分页栏不可见)。
*/
.page-fill {
display: flex;
flex-direction: column;
min-height: calc(100dvh - 4rem - 2.5rem);
}
/*
* 「整页锁高」变体(各台账列表页,与「运营商管理」同形):`.page-fill` 的 min-height
* 只保证页根至少一屏,flex 子项仍按内容高度排布——行数一多,表体就把页根撑高、整页
* 滚动,而不是表体内滚、分页器固定在底部。要与「运营商管理」一致,页根须有**确定**高度:
* 加 `.page-fill-window` 后按视口锁高(同 `organization.css` 的 `.org-operator-page`)。
*
* 视口高度只是**目标**高度,不是硬上限——矮视口下固定要素(标题/统计卡/4 张待办卡换行/
* 筛选行)本身就吃掉一屏时,表体会被压到看不见(P-38)。故给列表卡片本身一个下限:
* 表体 `flex-basis: 240px`(=`.list-shell-fill > .measured-table-scroll` 的 min-height)
* 让卡片的 `fit-content` 等于「卡片内固定部分 + 240」,卡片再按此下限长高、由文档级滚动接住,
* 卡片不破、分页器不被裁。⛔ 只写 `height` 不留下限:那会重现 P-38。
* ⛔ 把这条并进 `.page-fill`:非台账页没有「表体让位」的结构,锁高只会裁切。
*/
.page-fill.page-fill-window {
height: calc(100dvh - 4rem - 2.5rem);
min-height: 0;
}
/*
* 锁高页的高度改由「`` 的剩余空间」给出,⛔ 再裸算视口:
* 上面那条 `calc(100dvh - 4rem - 2.5rem)` 只扣了顶栏与 `` 的上下内边距,
* 一旦 `` 里还有别的兄弟节点(区域运营身份的提示条 `p[role=note]`),那段高度不被扣,
* 页面就比视口高出一整个提示条——列表明明已锁高,整页却还要多滚五六十像素(2026-11-16 实测 753×954:溢出 58px)。
* 这里让含锁高页的 `` 变成确定高度的纵向 flex:提示条按内容、页根吃掉剩余高度。
* ⚠️ 内容真的超出一屏时(矮视口 4 张卡换行)页根靠下方 `.list-shell-fill { min-height: fit-content }`
* 长高、由文档级滚动接住,⛔ 给 main 加 overflow:hidden 把它裁掉。
*/
main:has(> .page-fill.page-fill-window) {
display: flex;
flex-direction: column;
height: calc(100dvh - 4rem);
}
main:has(> .page-fill.page-fill-window) > :not(.page-fill.page-fill-window) {
flex: none;
}
main:has(> .page-fill.page-fill-window) > .page-fill.page-fill-window {
flex: 1 1 auto;
height: auto;
min-height: 0;
}
.page-fill.page-fill-window > .list-shell-fill {
min-height: fit-content;
}
.page-fill.page-fill-window > .list-shell-fill > :is(.measured-table-scroll, .ops-table-wrap, .workspace-table-wrap, .list-scroll-fill) {
flex-basis: 240px;
}
/* 页内其余要素(标题、统计卡、告警条、第二张台账面板…)一律按内容高度,⛔ 被压扁。 */
.page-fill.page-fill-window > :not(.list-shell-fill) {
flex: none;
}
/*
* 同页还有第二张台账面板时(如成本管理「② 成本金额定义」的矩阵表 + 录入面板),
* 两张表无法共用一个视口:退回页面级滚动与内容高度,⛔ 让下面那张被压到 min-height
* 之下、内容既看不见也滚不到(`cost-ledger-scroll` 是 `overflow-y:hidden`)。
*/
.page-fill.page-fill-window:has(> .ops-list-shell:not(.list-shell-fill)) {
height: auto;
min-height: calc(100dvh - 4rem - 2.5rem);
}
.page-fill.page-fill-window:has(> .ops-list-shell:not(.list-shell-fill)) > .list-shell-fill {
flex: none;
min-height: 0;
}
.page-fill.page-fill-window:has(> .ops-list-shell:not(.list-shell-fill)) > .list-shell-fill > :is(.measured-table-scroll, .ops-table-wrap) {
flex-basis: auto;
}
@media (max-width: 640px) {
/* 订阅页 ≤640 走卡片列表(`.order-mobile-list`),不是表体:锁高会把整叠卡片
裁在 `.list-shell-fill` 的 overflow:hidden 里,改为恢复页面级滚动。 */
.page-fill.page-fill-window.order-page {
height: auto;
min-height: calc(100dvh - 4rem - 2.5rem);
}
}
.page-fill > .list-shell-fill,
.page-fill > .org-ledger,
.page-fill > .org-maintenance-ledger-shell,
.page-fill > .order-list-shell,
.page-fill > .work-order-list-shell,
.page-fill > .ops-list-shell,
.page-fill > .workspace-panel.list-shell-fill {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.page-fill > .ops-heading,
.page-fill > .ops-back-link,
.page-fill > .customer-sub-overview,
.page-fill > .order-heading,
.page-fill > .work-order-heading,
.page-fill > .work-order-ledger-alerts,
.page-fill > .workspace-heading,
.page-fill > .workspace-metrics,
.page-fill > .workspace-alert,
.page-fill > .workspace-panel:not(.list-shell-fill),
.page-fill > .work-order-inbox,
.page-fill > .work-order-guidance,
.page-fill > .work-order-reminder,
.page-fill > .ops-import-note,
.page-fill > .scheduled-jobs-overview {
flex: none;
}
.list-shell-fill {
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.list-shell-fill > .ops-list-heading,
.list-shell-fill > .ops-toolbar,
.list-shell-fill > .ops-tabs,
.list-shell-fill > .org-filterbar,
.list-shell-fill > .ops-list-footer,
.list-shell-fill > .org-maintenance-ledger-note,
.list-shell-fill > .order-list-heading,
.list-shell-fill > .order-tabs,
.list-shell-fill > .order-filters,
.list-shell-fill > .order-list-footer,
.list-shell-fill > .order-rule-strip,
.list-shell-fill > .order-mobile-list,
.list-shell-fill > .order-empty,
.list-shell-fill > .work-order-list-heading,
.list-shell-fill > .work-order-tabs,
.list-shell-fill > .work-order-filters,
.list-shell-fill > .work-order-ledger-filters,
.list-shell-fill > .workspace-toolbar,
.list-shell-fill > .workspace-note,
.list-shell-fill > .ops-import-note,
.list-shell-fill > .list-pager,
.list-shell-fill > .org-list-pager,
.list-shell-fill > .work-order-ledger-pager {
flex: none;
}
.list-shell-fill > header {
flex: none;
}
.list-shell-fill > .measured-table-scroll,
.list-shell-fill > .ops-table-wrap,
.list-shell-fill > .workspace-table-wrap,
.list-shell-fill > .list-scroll-fill {
position: relative;
flex: 1;
/* 缺陷 P-38(2026-11-14 Chrome 960×640 实测:工单台账 18 行 `` 在 DOM 里,
* 表体却只剩约 2px 可见、点不到):这里原本是 `min-height: 0`,等于明确告诉浏览器
* "本表体可以被压到 0";而同级的标题/筛选/分页/汇总条全是 `flex: none`,
* 窄视口下筛选行与告警卡一换行,剩下的空间就够不上海拔最低的本表体 ⇒ 夹成 0。
* 这就是"测量/布局结果过小"时的**下限兜底**:⛔ 退回 0,也⛔ 按 640/900 这类
* 具体视口高度写白名单分支。240px ≈ 4 行行高 + 吸顶表头,保证列表始终可见且能纵向滚动;
* 页根 `.page-fill` 已改成下限高度,多出来的空间由文档级滚动接住(见上方 `.page-fill` 注释),
* ⛔ 用"取消表体内滚、整页堆叠"来绕开(那会连带废掉表头吸顶与分页器)。 */
min-height: 240px;
overflow: auto;
scrollbar-gutter: stable;
}
.list-shell-fill thead th {
position: sticky;
top: 0;
z-index: 1;
}
/* 底部分页栏:与运营商管理 .org-list-pager 同形。 */
.list-pager,
.org-list-pager {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 10px;
padding: 14px 24px;
border-top: 1px solid var(--border-subtle, var(--border));
color: var(--muted-foreground);
font-size: var(--type-support);
}
.list-pager > div,
.org-list-pager > div {
display: flex;
align-items: center;
gap: 9px;
}
.list-pager strong,
.org-list-pager strong {
color: var(--foreground);
font-variant-numeric: tabular-nums;
}
.list-pager button,
.org-list-pager button {
min-height: 30px;
padding: 4px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--card);
color: var(--foreground);
font: inherit;
font-size: var(--type-support);
cursor: pointer;
}
.list-pager button:hover:not(:disabled),
.list-pager button:focus-visible:not(:disabled),
.org-list-pager button:hover:not(:disabled),
.org-list-pager button:focus-visible:not(:disabled) {
border-color: var(--primary);
color: var(--primary);
}
.list-pager button:disabled,
.org-list-pager button:disabled {
opacity: 0.45;
cursor: not-allowed;
}
html {
min-width: 320px;
min-height: 100%;
}
/* 浏览器窗口的滚动条不参与普通 z-index 层叠;模态层出现时隐藏背景滚动条。 */
html:has(dialog[open], [aria-modal="true"]) {
overflow: hidden;
}
body {
min-width: 320px;
min-height: 100svh;
margin: 0;
background: var(--background);
color: var(--foreground);
font-family: "IBM Plex Sans", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* 原生单选菜单:沿用「更多」菜单的表面、层次和选中反馈。 */
@supports (appearance: base-select) {
select:not([multiple]) {
appearance: base-select !important;
display: flex !important;
align-items: center !important;
background-image: var(--select-chevron) !important;
background-repeat: no-repeat !important;
background-position: right 10px center !important;
background-size: 16px 16px !important;
padding-right: 34px !important;
cursor: pointer;
}
select:not([multiple])::picker-icon {
display: none;
}
select:not([multiple]):open {
color: var(--primary);
}
select:not([multiple]):disabled {
cursor: not-allowed;
}
select:not([multiple])::picker(select) {
appearance: base-select;
min-inline-size: anchor-size(width);
max-inline-size: min(360px, calc(100vw - 24px));
max-block-size: min(320px, 46vh);
margin-block: 5px;
padding: 6px;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--card);
color: var(--foreground);
box-shadow: var(--shadow-dialog);
scrollbar-width: thin;
}
select:not([multiple]) option {
display: flex;
align-items: center;
gap: 8px;
min-block-size: 34px;
margin-block: 1px;
padding: 7px 10px;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--text-secondary);
font-size: var(--type-body);
font-weight: 550;
line-height: 1.45;
white-space: normal;
overflow-wrap: anywhere;
cursor: pointer;
transition: background-color .16s, color .16s;
}
select:not([multiple]) option:is(:hover, :focus-visible, :checked) {
background: var(--primary-soft);
color: var(--primary);
}
select:not([multiple]) option:checked {
font-weight: 650;
}
select:not([multiple]) option::checkmark {
order: 1;
margin-left: auto;
color: var(--primary);
}
select:not([multiple]) option:disabled {
color: var(--muted-foreground);
opacity: .55;
cursor: not-allowed;
}
}
@media (prefers-reduced-motion: reduce) {
select:not([multiple]) option { transition: none; }
}
/* 三态渲染(册2 §2.5):取数失败≠无值,失败态用醒目色并挂原文,⛔ 回落成"—"或 0 */
.oss-tri-fail {
color: var(--destructive);
font-weight: 700;
}
.oss-tri-missing {
color: var(--muted-foreground);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}