:root {
  --navy: #002E6C;
  --navy-deep: #00234F;
  --blue: #5091FF;
  --blue-hover: #3B7FF0;
  --blue-soft: #E8F1FF;
  --sky: #91D2FF;
  --steel: #A5A6A7;
  --ink: #0C1A2E;
  --muted: #54617A;
  --faint: #8892A6;
  --line: #DDE4EF;
  --line-soft: #EAEFF6;
  --surface: #FFFFFF;
  --surface-alt: #F5F8FC;
  --green: #0E7A4E;
  --green-soft: #E4F4EC;
  --orange: #A96400;
  --orange-soft: #FCF0DE;
  --red: #BF3A31;
  --red-soft: #FBE9E7;
  --font: "PingFang TC", "PingFang SC", "Hiragino Sans GB", "Microsoft JhengHei", "Microsoft YaHei", "Noto Sans CJK TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", "Menlo", monospace;
  --radius: 8px;
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { margin: 0; min-height: 100%; background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin-top: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: 100vh; height: 100vh; overflow: hidden; }
.sidebar { min-width: 0; display: flex; flex-direction: column; overflow-y: auto; color: #C9DDF7; background: var(--navy); }
.sidebar-brand { padding: 18px 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.brand-symbol { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 6px; background: linear-gradient(150deg, var(--blue), var(--sky)); color: var(--navy); font-size: 12px; font-weight: 800; }
.sidebar-brand > span:last-child { min-width: 0; }
.sidebar-brand strong { display: block; max-width: 156px; overflow: hidden; color: #FFFFFF; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand small { display: block; color: #8FB4E4; font-size: 10.5px; line-height: 1.4; }
.sidebar-nav { padding-bottom: 16px; }
.nav-section { margin-top: 0; }
.nav-section h2 { margin: 0; padding: 14px 22px 6px; color: #5C86BE; font-size: 10px; line-height: 1.6; font-weight: 600; text-transform: uppercase; }
.nav-section a, .nav-parent { width: calc(100% - 40px); min-height: 34px; margin: 1px 20px; padding: 7px 10px; border: 0; border-radius: 6px; display: flex; align-items: center; gap: 9px; background: transparent; color: #BBD3F0; font-size: 13px; line-height: 1.5; text-align: left; cursor: pointer; transition: background .12s, color .12s; }
.nav-section a:hover, .nav-parent:hover { background: rgba(255, 255, 255, .07); color: #FFFFFF; }
.nav-section a.active { background: var(--blue); color: #FFFFFF; font-weight: 600; }
.dashboard-nav-section { padding-top: 10px; }
.dashboard-nav-section + .nav-section { border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-icon { width: 15px; flex: none; color: inherit; font-size: 12px; text-align: center; opacity: .75; }
.nav-caret { margin-left: auto; font-size: 11px; opacity: .7; transition: transform .18s; }
.nav-parent[aria-expanded="false"] .nav-caret { transform: rotate(-90deg); }
.nav-parent[aria-expanded="false"] + .nav-children { display: none; }
.nav-children a { min-height: 32px; padding: 7px 10px 7px 34px; position: relative; font-size: 12.5px; }
.nav-children a::before { content: ""; width: 5px; height: 1px; position: absolute; left: 19px; top: 50%; background: currentColor; opacity: .4; }

.main-shell { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.topbar { height: 54px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 0; color: var(--faint); font-size: 12.5px; }
.breadcrumb span::after { content: "/"; margin: 0 6px; color: var(--faint); }
.breadcrumb b { color: var(--ink); font-weight: 500; }
.environment { margin-left: auto; padding: 1px 7px; border: 1px dashed var(--orange); border-radius: 4px; background: var(--orange-soft); color: var(--orange); font: 10.5px var(--mono); }
.user-menu { min-height: 34px; max-width: 220px; padding: 3px 8px 3px 3px; border: 0; border-radius: 20px; display: flex; align-items: center; gap: 8px; background: transparent; cursor: pointer; }
.user-menu:hover { background: var(--surface-alt); }
.avatar { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sky); color: var(--navy); font-size: 11px; font-weight: 700; }
.user-menu > span:nth-child(2) { min-width: 0; text-align: left; }
.user-menu b, .user-menu small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu b { font-size: 12.5px; line-height: 1.2; font-weight: 500; }
.user-menu small { color: var(--faint); font-size: 10.5px; line-height: 1.3; }
.user-popover { z-index: 30; width: 128px; padding: 5px; position: absolute; top: 48px; right: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 8px 24px rgba(24, 44, 72, .12); }
.user-popover button { width: 100%; padding: 8px 10px; border: 0; border-radius: 4px; background: var(--surface); text-align: left; cursor: pointer; }
.user-popover button:hover { background: var(--surface-alt); }
.mobile-menu { display: none !important; }

.workspace { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 88px; }
.page { display: none; width: 100%; }
.page.active { display: block; animation: page-in .18s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-header { margin-bottom: 16px; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-header > div:first-child { min-width: 0; }
.page-header h2 { margin: 0; font-size: 19px; line-height: 1.45; font-weight: 600; }
.page-header > .btn { margin-left: auto; }
.page-state { min-height: 42px; margin: -4px 0 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; gap: 9px; background: var(--surface-alt); color: var(--muted); font-size: 12.5px; }
.page-state.error { border-color: #EDC5C1; background: var(--red-soft); color: var(--red); }
.page-state .btn { margin-left: auto; }
.page-state-spinner { width: 14px; height: 14px; flex: none; display: inline-block; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; vertical-align: -2px; animation: state-spin .7s linear infinite; }
.inline-error { min-height: 52px; padding: 9px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--red); font-size: 12px; text-align: center; }
@keyframes state-spin { to { transform: rotate(360deg); } }

.dashboard-header { align-items: center; }
.dashboard-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dashboard-actions label { min-height: 31px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; background: var(--surface); color: var(--muted); font-size: 12px; white-space: nowrap; }
.dashboard-actions select { border: 0; outline: 0; background: transparent; color: var(--ink); }
.dashboard-metrics { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-tile { min-height: 126px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dashboard-tile.metric-updated { animation: metric-updated .2s ease-out; }
@keyframes metric-updated { 50% { border-color: var(--blue); background: var(--blue-soft); } }
.dashboard-tile-disabled { background: var(--surface-alt); }
.dashboard-tile-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.live-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.live-dot.muted { background: var(--steel); box-shadow: 0 0 0 3px var(--line-soft); }
.dashboard-tile-value { min-height: 50px; margin-top: 4px; display: flex; align-items: baseline; gap: 6px; }
.dashboard-tile-value strong { font: 600 29px/1.5 var(--mono); }
.dashboard-tile-value span { color: var(--muted); font-size: 12px; }
.dashboard-tile-detail { min-height: 22px; color: var(--faint); font-size: 11.5px; }
.dashboard-tile-detail b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.dashboard-change-up { color: var(--green); }
.dashboard-change-down { color: var(--red); }
.dashboard-panel { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dashboard-panel > header { min-height: 48px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; }
.dashboard-panel h3 { margin: 0; font-size: 14px; font-weight: 600; }
.dashboard-legend { margin-left: auto; color: var(--muted); font-size: 11px; }
.dashboard-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dashboard-legend i { width: 14px; height: 3px; border-radius: 2px; background: #1D5FA8; }
.dashboard-chart-wrap { width: 100%; min-height: 240px; padding: 8px 12px 4px; overflow-x: auto; }
.dashboard-chart-wrap.is-loading { position: relative; overflow: hidden; background: var(--surface-alt); }
.dashboard-chart-wrap.is-loading::after { content: ""; width: 34%; position: absolute; inset: 0 auto 0 -34%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent); animation: chart-skeleton 1.1s ease-in-out infinite; }
.dashboard-chart-wrap.is-loading svg { visibility: hidden; }
@keyframes chart-skeleton { to { left: 100%; } }
.dashboard-chart-wrap svg { width: 100%; min-width: 620px; height: 240px; display: block; }
.dashboard-chart-grid { stroke: #E5EAF2; stroke-width: 1; }
.dashboard-chart-axis { fill: var(--faint); font: 10px var(--font); }
.dashboard-chart-area { fill: var(--blue-soft); opacity: .7; }
.dashboard-chart-line { fill: none; stroke: #1D5FA8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-chart-point { fill: var(--surface); stroke: #1D5FA8; stroke-width: 2; }
.dashboard-chart-point:hover { fill: var(--blue-soft); }
.dashboard-chart-empty { fill: var(--faint); font: 12px var(--font); text-anchor: middle; }
.dashboard-health-summary { margin-left: auto; color: var(--faint); font-size: 11px; }
.dashboard-health-table { border: 0; border-radius: 0; }
.dashboard-health-table table { min-width: 760px; }
.dashboard-health-table th:nth-child(4), .dashboard-health-table td:nth-child(4) { width: 34%; }
.dashboard-progress { width: 100%; height: 6px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
.dashboard-progress i { width: 0; height: 100%; display: block; background: var(--green); }
.dashboard-progress.unavailable { border: 1px dashed var(--line); background: var(--surface-alt); }

.btn { min-height: 34px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--surface); color: var(--ink); font-size: 13px; line-height: 1.4; font-weight: 500; cursor: pointer; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--steel); background: var(--surface-alt); }
.btn.primary { border-color: var(--blue); background: var(--blue); color: #FFFFFF; }
.btn.primary:hover { border-color: var(--blue-hover); background: var(--blue-hover); }
.btn.small { min-height: 29px; padding: 4px 10px; font-size: 12px; }
.btn.danger { border-color: var(--red); background: var(--surface); color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; display: inline-grid; place-items: center; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.icon-button:hover { background: var(--surface-alt); color: var(--ink); }
.icon-button:disabled { opacity: .4; cursor: not-allowed; }
.icon-button:disabled:hover { background: transparent; color: var(--muted); }
.icon-button.round { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.icon-button.round:hover { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.text-button { padding: 2px 4px; border: 0; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; background: transparent; color: var(--blue-hover); font-size: 12.5px; cursor: pointer; }
.text-button:hover { background: var(--blue-soft); color: var(--blue); }
.text-button.danger { color: var(--red); }
.text-button.danger:hover { background: var(--red-soft); color: var(--red); }
.text-button:disabled { opacity: .42; cursor: not-allowed; }
.text-button:disabled:hover { background: transparent; }

.knowledge-layout { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 14px; align-items: start; }
.knowledge-panel { position: sticky; top: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { min-height: 45px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.panel-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-heading span { margin-left: auto; color: var(--faint); font: 11px var(--mono); }
.panel-heading-actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.panel-heading-actions span { margin-left: 0; }
.tree-search { height: 38px; margin: 8px 8px 0; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; gap: 5px; color: var(--faint); background: var(--surface); }
.tree-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(80, 145, 255, .12); }
.tree-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.knowledge-tree { max-height: calc(100vh - 236px); padding: 7px; overflow-y: auto; }
.tree-branch, .tree-leaf { width: 100%; min-width: 0; min-height: 32px; border: 0; border-radius: 5px; display: grid; align-items: center; background: transparent; text-align: left; cursor: pointer; }
.tree-branch { grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px; padding: 5px 8px 5px calc(7px + var(--tree-depth) * 13px); color: var(--muted); }
.tree-branch:hover, .tree-leaf:hover { background: var(--surface-alt); color: var(--ink); }
.tree-branch strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tree-branch i, .tree-leaf i { color: var(--faint); font: 10.5px var(--mono); font-style: normal; }
.tree-caret { width: 14px; color: var(--faint); font-size: 16px; line-height: 1; text-align: center; transform: rotate(0); transition: transform .12s; }
.tree-branch[aria-expanded="true"] .tree-caret { transform: rotate(90deg); }
.tree-leaf { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 6px 8px 6px calc(21px + var(--tree-depth) * 13px); position: relative; color: var(--muted); }
.tree-leaf::before { content: ""; width: 6px; height: 1px; position: absolute; left: calc(10px + var(--tree-depth) * 13px); top: 50%; background: var(--steel); }
.tree-leaf span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tree-leaf.active { background: var(--blue-soft); color: var(--blue-hover); }
.tree-leaf.active::before { background: var(--blue-hover); }
.base-list { padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.base-item { width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; display: block; position: relative; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.base-item::before { content: ""; width: 6px; height: 1px; position: absolute; left: 9px; top: 15px; background: var(--steel); opacity: .6; }
.base-item:hover { background: var(--surface-alt); color: var(--ink); }
.base-item.active { background: var(--blue-soft); color: var(--blue-hover); }
.base-item.active::before { background: var(--blue-hover); opacity: 1; }
.base-item strong { display: block; padding-left: 12px; overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.base-item span { margin-top: 2px; padding-left: 12px; display: flex; justify-content: space-between; gap: 6px; color: var(--faint); font-size: 10.5px; }
.base-item i { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.document-panel { min-width: 0; }
.base-summary { min-height: 72px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: minmax(190px, 1fr) auto 65px; gap: 16px; align-items: center; background: var(--surface-alt); }
.base-summary h2 { margin: 0; font-size: 13px; font-weight: 600; }
.base-summary p { max-width: 520px; margin: 2px 0 0; overflow: hidden; color: var(--faint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.base-summary dl { margin: 0; display: flex; gap: 18px; }
.base-summary dl div { min-width: 52px; }
.base-summary dt { color: var(--faint); font-size: 10.5px; }
.base-summary dd { margin: 1px 0 0; font: 500 11.5px var(--mono); }
.base-summary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.icon-button.danger { color: var(--red); }
.icon-button.danger:hover { background: var(--red-soft); color: var(--red); }
.table-toolbar { min-height: 52px; display: flex; align-items: center; gap: 8px; }
.search-field { width: min(300px, 100%); min-height: 33px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; gap: 6px; background: var(--surface); color: var(--faint); font-size: 12.5px; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.table-toolbar .icon-button { margin-left: auto; }
.table-frame { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 12.5px; }
th { padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-alt); color: var(--faint); font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-alt); }
.file-name, .entity-name { max-width: 280px; }
.file-name strong, .entity-name strong { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-name small, .entity-name small { display: block; margin-top: 1px; overflow: hidden; color: var(--faint); font: 10.5px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.actions-col { min-width: 146px; text-align: right; }
td.actions-col { white-space: nowrap; }
.empty-cell { height: 160px; color: var(--faint); text-align: center; }
.loading-line { padding: 22px 10px; color: var(--faint); font-size: 12px; text-align: center; }
.tag, .status-label { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 21px; padding: 2px 8px; border-radius: 11px; background: var(--surface-alt); color: var(--muted); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.tag { border: 1px solid var(--line); border-radius: 4px; }
.tag.hk { border: 0; background: var(--blue-soft); color: var(--blue-hover); }
.tag.mo { border: 0; background: #F3ECFA; color: #76529B; }
.status-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-label { background: var(--orange-soft); color: var(--orange); }
.status-label.success { background: var(--green-soft); color: var(--green); }
.status-label.disabled { border: 1px solid var(--line); background: var(--surface-alt); color: var(--faint); }
.status-label.failed { background: var(--red-soft); color: var(--red); }
.status-label.compact { min-height: 20px; font-size: 10.5px; }
.switch { width: 34px; height: 19px; padding: 0; border: 0; border-radius: 10px; position: relative; background: var(--steel); cursor: pointer; }
.switch::after { content: ""; width: 15px; height: 15px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: #FFFFFF; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"]::after { left: 17px; }
.pagination { min-height: 46px; padding-top: 10px; display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; }
.pagination.compact { min-height: 42px; padding: 6px 8px; border-top: 1px solid var(--line-soft); justify-content: center; }
.pagination .icon-button { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; line-height: 1; }
.pagination .icon-button:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.pagination .icon-button:disabled { opacity: .4; cursor: not-allowed; }
.pagination-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pagination-controls label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.pagination-controls select { width: 58px; height: 28px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); outline: 0; }
.pagination-controls select:focus { border-color: var(--blue); }

.filter-bar { margin-bottom: 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; background: var(--surface); }
.filter-bar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.filter-bar input, .filter-bar select { width: 200px; height: 34px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); outline: 0; font-size: 13px; }
.filter-bar select { width: 120px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(80, 145, 255, .15); }
.audit-filter { gap: 12px; }
.audit-filter label { display: grid; gap: 5px; align-items: start; }
.audit-filter input { width: 190px; }
.audit-filter select { width: 132px; }
.audit-table { min-width: 1120px; }
.audit-table td { white-space: nowrap; }
.audit-table .audit-target { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.audit-table .audit-ip { font-family: var(--mono); font-weight: 500; }
.audit-detail-grid, .quality-detail-meta { margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.audit-detail-item, .quality-detail-meta > div { min-width: 0; padding: 10px 12px; background: var(--surface); }
.audit-detail-item.wide, .quality-detail-meta > .wide { grid-column: 1 / -1; }
.audit-detail-grid dt, .quality-detail-meta dt { margin-bottom: 3px; color: var(--faint); font-size: 11px; }
.audit-detail-grid dd, .quality-detail-meta dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.knowledge-base-table { min-width: 940px; }
.action-bar { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.push-right { margin-left: auto; }

.permission-layout { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 14px; align-items: start; }
.role-selector { min-height: 420px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.role-selector h2 { margin: -8px -8px 8px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.role-choice { width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; display: block; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.role-choice:hover { background: var(--surface-alt); color: var(--ink); }
.role-choice.active { background: var(--blue-soft); color: var(--blue-hover); }
.role-choice strong { display: block; font-size: 12.5px; font-weight: 500; }
.role-choice small { display: block; color: var(--faint); font: 11px var(--mono); }
.permission-matrix { min-width: 0; }
.matrix-heading { min-height: 56px; display: flex; align-items: flex-start; gap: 12px; }
.matrix-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.matrix-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.matrix-heading .status-label { margin-left: auto; }
.matrix-table { min-width: 850px; }
.matrix-table th:not(:first-child), .matrix-table td:not(:first-child) { text-align: center; }
.matrix-table input { width: 15px; height: 15px; accent-color: var(--blue); }
.not-applicable { color: #C0C7D2; }

.model-stats { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.model-stats > div { min-height: 74px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.model-stats span { display: block; color: var(--muted); font-size: 11.5px; }
.model-stats b { display: block; margin-top: 2px; font: 600 24px var(--mono); }

.usage-tools { min-height: 46px; margin-bottom: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-alt); color: var(--muted); font-size: 12px; }
.usage-tools > span, .usage-tools label { min-height: 28px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 5px; display: inline-flex; align-items: center; gap: 4px; background: var(--surface); white-space: nowrap; }
.usage-tools label { margin-left: auto; }
.usage-tools select { border: 0; outline: 0; background: transparent; color: var(--ink); }
.usage-panel { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.usage-panel > header { min-height: 48px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; }
.usage-panel h3 { margin: 0; font-size: 14px; font-weight: 600; }
.usage-panel header small { display: block; margin-top: 1px; color: var(--faint); font-size: 10.5px; }
.usage-legend { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.usage-legend span { display: inline-flex; align-items: center; gap: 5px; }
.usage-legend i { width: 8px; height: 8px; border-radius: 2px; }
.usage-legend .hk { background: #1D5FA8; }
.usage-legend .mo { background: #D16A43; }
.usage-chart-wrap { width: 100%; min-height: 248px; padding: 8px 12px 4px; overflow-x: auto; }
.usage-chart-wrap svg { width: 100%; min-width: 620px; height: 248px; display: block; }
.usage-chart-grid { stroke: #E5EAF2; stroke-width: 1; }
.usage-chart-axis { fill: var(--faint); font: 10px var(--font); }
.usage-chart-bar { transition: opacity .12s; }
.usage-chart-bar:hover { opacity: .76; }
.usage-chart-empty { fill: var(--faint); font: 12px var(--font); text-anchor: middle; }
.usage-list-header > div:first-child { margin-right: auto; }
.usage-list-header .search-field { width: 220px; min-height: 31px; }
.usage-list-header > select { height: 31px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); outline: 0; font-size: 12px; }
.usage-table { min-width: 820px; }
.number-col { text-align: right; font-family: var(--mono); }
.production-model { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.production-model > header { min-height: 44px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; }
.production-model h3 { margin: 0; font-size: 14px; font-weight: 600; }
.production-model dl { margin: 0; padding: 13px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 24px; }
.production-model dl div { min-width: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.production-model dt { color: var(--faint); font-size: 11.5px; }
.production-model dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 12.5px; }
.token-budget-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.token-budget-line strong { font: 600 13px var(--mono); }
.token-budget-progress { width: 180px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
.token-budget-progress i { height: 100%; display: block; background: var(--green); }
.token-budget-progress.warning i { background: var(--orange); }
.token-budget-progress.exceeded i { background: var(--red); }

.analytics-tools { min-height: 52px; margin-bottom: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: end; gap: 10px; flex-wrap: wrap; background: var(--surface); }
.analytics-tools label { min-width: 150px; display: grid; gap: 4px; color: var(--faint); font-size: 11px; }
.analytics-tools select, .analytics-tools input { width: 100%; height: 33px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); outline: 0; font-size: 12px; }
.analytics-tools select:focus, .analytics-tools input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(80, 145, 255, .12); }
.analytics-tools .analytics-search { min-width: 280px; flex: 1; }
.analytics-metrics { margin-bottom: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.analytics-metrics > div { min-width: 0; min-height: 88px; padding: 15px 18px; display: grid; align-content: center; gap: 5px; border-right: 1px solid var(--line-soft); }
.analytics-metrics > div:last-child { border-right: 0; }
.analytics-metrics span { color: var(--faint); font-size: 11.5px; }
.analytics-metrics strong { color: var(--navy); font: 600 24px var(--mono); }
.analytics-metrics small { color: var(--muted); font-size: 11px; }
.compact-metrics { margin: 0; border-width: 0 0 1px; border-radius: 0; }
.compact-metrics > div { min-height: 72px; padding: 11px 14px; }
.compact-metrics strong { font-size: 18px; }
.quality-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-panel { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.analytics-panel > header { min-height: 45px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; }
.analytics-panel > header h3 { margin: 0; font-size: 13.5px; }
.analytics-panel > header span { margin-left: auto; color: var(--faint); font-size: 11px; }
.performance-table { min-width: 720px; }
.performance-table td:nth-child(4) { width: 34%; }
.analytics-progress { width: 100%; height: 7px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
.analytics-progress i { height: 100%; display: block; background: var(--blue); }
.performance-inline { padding: 12px 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.performance-inline > div { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.performance-inline span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.performance-inline strong { font: 600 12px var(--mono); }
.performance-inline .analytics-progress { grid-column: 1 / -1; }
.quality-table { min-width: 900px; }
.quality-table .content-cell { min-width: 280px; max-width: 480px; overflow-wrap: anywhere; }
.session-table { min-width: 1180px; }
.conversation-meta { margin-bottom: 14px; padding: 10px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 7px 12px; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); }
.conversation-meta span { color: var(--faint); font-size: 11px; }
.conversation-meta strong { min-width: 0; overflow-wrap: anywhere; font: 500 12px var(--mono); }
.conversation-list { display: grid; gap: 10px; }
.conversation-message { max-width: 86%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.conversation-message.user { margin-left: auto; border-color: #BFD4F2; background: var(--blue-soft); }
.conversation-message > header { margin-bottom: 7px; display: flex; align-items: center; gap: 10px; }
.conversation-message > header strong { font-size: 12px; }
.conversation-message > header span { margin-left: auto; color: var(--faint); font-size: 10.5px; }
.conversation-message > div { overflow-wrap: anywhere; color: var(--ink); font-size: 12.5px; line-height: 1.65; }
.conversation-message > footer { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 10.5px; }
.modal.wide { width: min(920px, 94vw); }

.placeholder-page { min-height: calc(100vh - 142px); align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.placeholder-page.active { display: flex; }
.placeholder-symbol { width: 54px; height: 54px; margin-bottom: 14px; border: 1px solid #BCD1EE; border-radius: 7px; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy); font: 600 20px var(--mono); }
.placeholder-page h1 { margin: 0 0 9px; font-size: 20px; }
.placeholder-page .status-label { margin-bottom: 18px; }

.modal-layer { z-index: 100; position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6, 18, 37, .42); }
.modal { z-index: 1; width: min(620px, 92vw); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 24px 70px -20px rgba(6, 18, 37, .5); }
.modal > header { min-height: 54px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.modal > header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.modal > header .icon-button { margin-left: auto; }
.modal-body { max-height: 64vh; overflow-y: auto; padding: 18px; }
.modal footer { min-height: 58px; padding: 12px 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: flex-end; gap: 9px; background: var(--surface-alt); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.form-grid label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); outline: 0; font-size: 13px; }
.form-grid input, .form-grid select { height: 37px; }
.form-grid textarea { min-height: 72px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(80, 145, 255, .15); }
.checkbox-field { min-height: 36px; display: flex !important; grid-template-columns: 18px 1fr; align-items: center; gap: 7px !important; }
.checkbox-field input { width: 16px; height: 16px; accent-color: var(--blue); }
.role-radio-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.role-radio-group legend { margin-bottom: 5px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.role-radio-group > div { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-choice { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; display: inline-flex !important; grid-template-columns: 16px auto; align-items: center; gap: 7px !important; background: var(--surface); color: var(--ink) !important; font-weight: 400 !important; cursor: pointer; }
.radio-choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.radio-choice input { width: 16px !important; height: 16px !important; margin: 0; padding: 0 !important; accent-color: var(--blue); }
.field-hint { margin: -4px 0 0; color: var(--faint); font-size: 10.5px; }
.upload-drop { min-height: 106px; padding: 22px; border: 1.5px dashed var(--blue); border-radius: 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-hover); text-align: center; }
.upload-drop > span { display: grid; gap: 3px; }
.upload-drop strong { color: #175DAF; font-size: 14px; }
.upload-drop small { color: var(--muted); font-size: 11px; font-weight: 400; }
.upload-drop input { max-width: 100%; height: auto; padding: 5px; border: 0; background: transparent; box-shadow: none; }
.upload-target { margin-bottom: 14px; min-height: 66px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; background: var(--surface-alt); }
.upload-target > span { color: var(--faint); font-size: 11.5px; }
.upload-target-info { min-width: 0; display: grid; gap: 2px; }
.upload-target-info strong, .upload-target-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-target-info strong { font-size: 13px; }
.upload-target-info small { color: var(--faint); font-size: 11px; }
.upload-file-summary { margin: -8px 0 0; color: var(--faint); font-size: 11px; }

.toast-stack { z-index: 200; width: min(360px, calc(100vw - 36px)); position: fixed; top: 18px; right: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 220px; padding: 11px 16px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 8px 28px -8px rgba(6, 18, 37, .22); font-size: 13px; }
.toast.error { border-left-color: var(--red); }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: var(--surface-alt); }
.login-shell { width: min(410px, 100%); }
.login-brand { margin-bottom: 17px; display: flex; align-items: center; gap: 11px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 15px; }
.login-brand span { color: var(--muted); font-size: 11px; }
.login-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.login-panel header { margin-bottom: 20px; }
.login-panel h1 { margin: 0; font-size: 20px; }
.login-panel header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.login-panel form { display: grid; gap: 14px; }
.login-panel label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.login-panel input { width: 100%; height: 39px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; color: var(--ink); }
.login-panel input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(80, 145, 255, .15); }
.login-submit { width: 100%; min-height: 39px; margin-top: 3px; }
.form-error { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--red-soft); color: var(--red); font-size: 12px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { z-index: 80; width: 236px; position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); box-shadow: 10px 0 30px rgba(10, 28, 51, .18); transition: transform .18s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid !important; }
  .workspace { padding: 18px 15px 60px; }
  .topbar { padding: 0 12px; }
  .knowledge-layout, .permission-layout { grid-template-columns: 1fr; }
  .knowledge-panel { position: static; }
  .knowledge-tree { max-height: 320px; }
  .base-list, .role-selector > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .role-selector { min-height: 0; }
  .base-summary { grid-template-columns: minmax(0, 1fr) 65px; }
  .base-summary dl { grid-column: 1 / -1; grid-row: 2; }
  .base-summary-actions { grid-column: 2; grid-row: 1; }
  .analytics-metrics { grid-template-columns: 1fr; }
  .analytics-metrics > div { min-height: 70px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .analytics-metrics > div:last-child { border-bottom: 0; }
  .performance-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conversation-message { max-width: 96%; }
  .production-model dl { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-tile:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .breadcrumb span, .breadcrumb span::after, .environment, .user-menu small { display: none; }
  .user-menu { max-width: 145px; margin-left: auto; }
  .page-header { align-items: center; }
  .page-header h2 { font-size: 18px; }
  .base-list, .role-selector > div, .model-stats, .form-grid { grid-template-columns: 1fr; }
  .upload-target { grid-template-columns: 1fr; gap: 4px; }
  .base-summary dl { gap: 13px; flex-wrap: wrap; }
  .filter-bar { align-items: stretch; }
  .filter-bar label, .filter-bar input, .filter-bar select { width: 100%; }
  .filter-bar label { display: grid; }
  .filter-bar .btn { flex: 1; }
  .modal-layer { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .usage-tools label { width: 100%; margin-left: 0; justify-content: space-between; }
  .usage-list-header { align-items: stretch !important; flex-direction: column; }
  .usage-list-header .search-field, .usage-list-header > select { width: 100%; }
  .production-model dl div { grid-template-columns: 1fr; gap: 2px; }
  .dashboard-header { align-items: stretch; }
  .dashboard-actions { width: 100%; margin-left: 0; }
  .dashboard-actions label { flex: 1; justify-content: space-between; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-tile:last-child { grid-column: auto; }
  .dashboard-health-summary { display: none; }
  .audit-detail-grid, .quality-detail-meta { grid-template-columns: 1fr; }
  .audit-detail-item.wide, .quality-detail-meta > .wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ===== 產品要素（要素抽取與合併） ===== */
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions select { min-width: 220px; }
.tab-bar { display: flex; align-items: center; gap: 4px; padding: 4px 0 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.tab-bar .tab { border: none; background: none; padding: 7px 14px; border-radius: var(--radius); color: var(--muted); cursor: pointer; font-weight: 600; }
.tab-bar .tab:hover { background: var(--surface-alt); color: var(--ink); }
.tab-bar .tab.active { background: var(--blue-soft); color: var(--navy); }
.element-job-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt); margin-bottom: 12px; font-size: 13px; }
.element-job-bar.running { border-color: var(--blue); background: var(--blue-soft); }
.element-job-bar.partial { border-color: var(--orange); background: var(--orange-soft); }
.element-job-bar.failed { border-color: var(--red); background: var(--red-soft); }
.element-job-bar.completed { border-color: var(--green); background: var(--green-soft); }
.element-job-bar .job-status-tag { font-weight: 700; }
.element-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.element-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.element-card-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface-alt); }
.element-card-head strong { font-size: 14px; }
.element-card-head .element-meta { margin-left: auto; color: var(--faint); font-size: 12px; font-family: var(--mono); }
.element-card-code { color: var(--faint); font-size: 11px; font-family: var(--mono); }
.element-card-content { margin: 0; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.8; max-height: 260px; overflow-y: auto; font-family: var(--font); }
.element-empty { padding: 40px 0; text-align: center; color: var(--faint); }
/* 产品与文件元数据展示 */
#productFields[hidden] { display: none; }
.product-cell { min-width: 130px; max-width: 300px; white-space: normal; overflow-wrap: anywhere; }
.file-metadata-cell { white-space: pre-wrap; min-width: 100px; max-width: 300px; overflow-wrap: anywhere; }
.metadata-file-name { overflow-wrap: anywhere; }
.inheritance-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 12px; margin: 10px 0; }
.inheritance-row input { width: 100%; }
.inheritance-options { max-height: 240px; overflow: auto; border: 1px solid #dce3ed; border-radius: 8px; }
.inheritance-options button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #dce3ed; padding: 12px; background: white; cursor: pointer; }
.inheritance-options button:hover, .inheritance-options button:focus { background: #edf4fc; }

.source-label { display: block; margin-top: 5px; color: #66758a; }

.tracking-report { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.tracking-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 12px 0; }

.usage-tools label { margin-left: 0; }
.usage-tools label:has(#usageTrendRegion) { margin-left: auto; }
.usage-tools input[type="date"] { border: 0; background: transparent; color: var(--ink); font: inherit; }
