@charset "UTF-8";

/* 全站蓝白主题：深色导航、浅色内容、蓝色操作；状态色独立于操作主色。 */
:root {
  --nav:#252b35;
  --ink:#303744;
  --muted:#626b76;
  --label:#48525f;
  --placeholder:#68737f;
  --line:#e5e8ec;
  --paper:#f4f5f7;
  --white:#fff;
  --surface:#fff;
  --surface-solid:#fff;
  --surface-soft:#f7f8fa;
  --accent:#296dc4;
  --accent-hover:#225da8;
  --accent-ink:#245da4;
  --accent-light:#6b9cdd;
  --accent-soft:#e8f0fb;
  --accent-soft-hover:#dbe8f8;
  --accent-border:#b6cceb;
  --focus:#296dc4;
  --focus-ring:rgba(41,109,196,.2);
  --selection:#c4ddfb;
  --border:#d9dee5;
  --border-hover:#97b6dc;
  --disabled:#edf0f3;
  --meter-track:#e5ecf5;
  --green:#247448;
  --green-soft:#e0f2e5;
  --green-border:#abd4ba;
  --online-badge-ink:#14803f;
  --online-badge-bg:#d8f4e2;
  --amber:#805b1a;
  --amber-soft:#fff3d9;
  --amber-border:#e8d19b;
  --red:#a13e38;
  --red-soft:#fbe8e5;
  --red-border:#e4bbb5;
  --sidebar:#1b1e2e;
  --sidebar-text:#e7eaf0;
  --sidebar-muted:#b5becd;
  --sidebar-line:rgba(255,255,255,.12);
  --sidebar-hover:#252d40;
  --sidebar-active:#233f68;
  --sidebar-focus:#6ba5f2;
  --sidebar-width:224px;
  --sidebar-brand-space:16px;
  --radius:16px;
  --shadow:0 6px 24px rgba(27,30,46,.04);
  --shadow-hover:0 4px 12px rgba(27,30,46,.08);
  --shadow-dialog:0 24px 80px rgba(27,30,46,.22);
  --shadow-login:0 16px 48px rgba(27,30,46,.08);
  --overlay:rgba(27,30,46,.45);
  font-family:"Aptos","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:14px;
  color:var(--ink);
  background:var(--paper);
  color-scheme:light;
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; isolation:isolate; }
body::before {
  content:""; position:fixed; inset:0; z-index:-2; pointer-events:none;
  background:var(--paper);
}
::selection { background:var(--selection); color:var(--nav); }
a { color:var(--accent-ink); text-decoration:none; text-underline-offset:4px; }
a:hover { text-decoration:underline; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button,a,input,select,textarea,summary { outline-offset:4px; -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:2px solid var(--accent); }
/* Safari 弹窗恢复焦点后可能仍匹配 focus-visible；只隐藏指针操作的非编辑控件轮廓。 */
html[data-focus-input="pointer"] :is(a,button,summary,[tabindex]):not(input,select,textarea,[contenteditable]):focus { outline:none; }
h1,h2,h3,p { margin-top:0; }
h1 { color:var(--nav); font-size:40px; font-weight:600; letter-spacing:-1.2px; margin-bottom:12px; line-height:1.3; }
h2 { font-size:24px; font-weight:650; letter-spacing:-.3px; margin-bottom:24px; }
h3 { font-size:16px; }
small,.fine { font-size:12px; color:var(--muted); }
.muted { color:var(--muted); line-height:1.8; }
.ui-icon { width:20px; height:20px; flex:none; vertical-align:middle; }
.skip-link { position:fixed; top:8px; left:50%; z-index:100; padding:14px 20px; border-radius:10px; background:var(--nav); color:white; transform:translate(-50%,-180%); }
.skip-link:focus { transform:translate(-50%,0); }

/* 贴边侧栏与单层页头；账号放在导航底部，给业务内容留出空间。 */
.sidebar,.panel,.login-shell {
  border:1px solid var(--line);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.sidebar { width:var(--sidebar-width); position:fixed; inset:0 auto 0 0; padding:var(--sidebar-brand-space) 0 18px; display:flex; flex-direction:column; z-index:20; border:0; border-right:1px solid var(--sidebar-line); box-shadow:none; background:var(--sidebar); overflow-y:auto; scrollbar-width:thin; }
.wordmark { display:flex; gap:12px; align-items:center; color:var(--nav); font-weight:750; letter-spacing:.7px; font-size:22px; white-space:nowrap; }
.sidebar .wordmark { margin:0 28px var(--sidebar-brand-space); gap:12px; font-size:18px; color:var(--white); }
.sidebar .brand-mark { width:32px; height:32px; border-radius:10px; font-size:25px; }
.wordmark:hover { text-decoration:none; }
.brand-mark { height:40px; width:40px; flex:none; display:grid; place-items:center; font:italic 800 28px Georgia,serif; border-radius:12px; color:#fff; background:var(--accent); border:1px solid transparent; box-shadow:none; }
.nav-item { display:flex; gap:16px; align-items:center; color:var(--sidebar-text); min-height:64px; padding:16px 28px 16px 25px; border-left:3px solid transparent; font-size:16px; transition:background .18s,color .18s; }
.nav-item:hover { background:var(--sidebar-hover); text-decoration:none; color:var(--white); }
.nav-item.active { color:var(--white); background:var(--sidebar-active); font-weight:600; }
/* 背景左右等距；品牌和菜单的图标、文字分别共用左对齐线。 */
@media (min-width:901px) {
  .nav-item { position:relative; justify-content:flex-start; gap:20px; margin:0 16px; padding-right:12px; padding-left:12px; border-left:0; border-radius:8px; }
  .nav-item .ui-icon { width:24px; height:24px; }
  .nav-item.active { position:relative; isolation:isolate; background:transparent; }
  .nav-item.active::before { content:""; position:absolute; inset:0; z-index:-1; border-radius:8px; background:var(--sidebar-active); pointer-events:none; }
  .nav-item .nav-count { position:absolute; right:8px; margin-left:0; }
}
.nav-count { margin-left:auto; background:var(--amber); color:#fff; padding:2px 6px; min-width:20px; text-align:center; border-radius:6px; font-size:11px; }
.sidebar-account { margin:auto 16px 0; padding:12px 0 0; border-top:1px solid var(--sidebar-line); }
.account-trigger { display:flex; align-items:center; min-width:0; min-height:48px; padding:10px 12px; border-radius:8px; color:var(--sidebar-text); }
.sidebar-account .account-trigger > .ui-icon { width:24px; height:24px; margin-right:20px; }
.account-trigger:hover { background:var(--sidebar-hover); text-decoration:none; }
.account-trigger[aria-expanded="true"] { background:var(--sidebar-active); color:var(--white); }
.account-chevron { width:16px; height:16px; flex:none; margin-left:8px; filter:brightness(0) invert(1); opacity:.9; transform:rotate(180deg); }
.account-trigger[aria-expanded="true"] .account-chevron { transform:none; }
.user-identity { flex:1; min-width:0; font-size:16px; font-weight:600; line-height:1.4; color:var(--sidebar-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.text-button { background:none; border:0; color:var(--accent-ink); padding:10px 8px; border-radius:9px; min-height:44px; }
.text-button:hover { background:var(--accent-soft); }
.sidebar :focus-visible { outline-color:var(--sidebar-focus); }
.mobile-bar { display:none; }
.mobile-menu-dialog { inset:0 auto 0 0; width:min(260px,calc(100% - 48px)); max-width:none; height:100dvh; max-height:100dvh; margin:0; padding:0; border:0; border-radius:0; background:var(--sidebar); color:var(--sidebar-text); box-shadow:var(--shadow-dialog); overflow:auto; }
.mobile-menu-dialog::backdrop,.mobile-filter-dialog::backdrop { background:var(--overlay); }
.mobile-menu-close { position:absolute; top:calc(var(--sidebar-brand-space) - 6px); right:12px; z-index:1; display:grid; place-items:center; width:44px; height:44px; color:var(--sidebar-text); }
.mobile-menu-close:hover { background:var(--sidebar-hover); }
.mobile-menu-close:focus-visible { outline-color:var(--sidebar-focus); }
html:has(.mobile-menu-dialog[open],.mobile-filter-dialog[open]) { overflow:hidden; }
.workspace { margin-left:var(--sidebar-width); padding:44px 28px 28px 30px; min-width:0; }
main#main { max-width:1600px; margin:auto; outline:none; }
.heading-link { display:inline-flex; align-items:center; gap:10px; font-size:15px; padding:10px 0; }
.panel > .filter:last-child { margin-bottom:0; }

/* 表单和必要的业务提示共用控件，不增加前端状态或接口。 */
.button { border:1px solid var(--border); background:var(--surface); color:var(--ink); padding:11px 17px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; gap:9px; white-space:nowrap; font-size:14px; font-weight:500; min-height:44px; transition:background .18s,box-shadow .18s,transform .18s; }
.button:hover { background:var(--surface-soft); text-decoration:none; box-shadow:var(--shadow-hover); }
.button:active { transform:translateY(1px); }
.button.primary { background:var(--accent); border-color:var(--accent-ink); color:#fff; box-shadow:none; }
.button.primary:hover { background:var(--accent-hover); }
.button.danger { color:var(--red); border-color:var(--red-border); }
.button.danger:hover { background:var(--red-soft); }
.button:disabled { opacity:.5; cursor:not-allowed; }
.wide { width:100%; justify-content:space-between; }
.notice { padding:14px 18px; background:var(--accent-soft); border:1px solid var(--accent-border); border-radius:12px; line-height:1.8; margin-bottom:24px; font-size:13px; overflow-wrap:anywhere; }
.notice.warning { background:var(--amber-soft); border-color:var(--amber-border); color:var(--amber); }
.notice.danger { background:var(--red-soft); border-color:var(--red-border); color:var(--red); }
.notice.success { background:var(--green-soft); border-color:var(--green-border); color:var(--green); }
label { display:block; color:var(--label); font-size:14px; margin-bottom:20px; line-height:1.5; }
input,select,textarea { display:block; width:100%; min-width:0; min-height:44px; margin-top:8px; border:1px solid var(--border); border-radius:10px; background:var(--surface); padding:11px 12px; color:var(--ink); transition:border-color .18s,background .18s,box-shadow .18s; }
input::placeholder,textarea::placeholder { color:var(--placeholder); opacity:1; }
input:hover,select:hover,textarea:hover { border-color:var(--border-hover); }
input:focus,select:focus,textarea:focus { background:var(--surface); border-color:var(--focus); outline:2px solid var(--focus-ring); outline-offset:2px; box-shadow:none; }
input[type=hidden] { display:none; }
input[type=checkbox] { width:16px; height:16px; min-height:0; display:inline-block; margin-right:10px; accent-color:var(--accent-ink); }
select option { background:var(--surface); color:var(--ink); }
textarea { resize:vertical; min-height:100px; }
.form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 18px; }
.equal-columns .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-grid .span-all { grid-column:1/-1; }
.listing-editor fieldset { border:0; padding:0; min-width:0; margin:16px 0; }
.listing-editor legend { padding:0; margin-bottom:8px; font-weight:600; }
.listing-editor .listing-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.listing-input { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; margin-top:8px; padding-right:12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.listing-input:hover { border-color:var(--border-hover); }
.listing-input:focus-within { border-color:var(--focus); outline:2px solid var(--focus-ring); outline-offset:2px; }
.listing-input input { margin:0; padding-right:8px; border:0; background:transparent; }
.listing-input input:focus { outline:none; }
.listing-input small { white-space:nowrap; }
.listing-input:has(input:read-only) { background:var(--surface-soft); }
.listing-input input:read-only { color:var(--muted); }
.listing-editor .listing-term-picker { margin:0 0 20px; }
.listing-term-picker legend { margin:0; }
.listing-term-options { display:flex; flex-wrap:wrap; gap:0 24px; }
.listing-term-options label { display:inline-flex; align-items:center; gap:8px; min-height:44px; margin:0; cursor:pointer; }
.listing-term-options input { width:18px; height:18px; min-height:0; margin:0; padding:0; accent-color:var(--accent); }
.listing-term-picker [data-listing-term] { max-width:240px; }
.listing-term-picker:has([value="fixed"]:checked) [data-listing-term="duration"],
.listing-term-picker:has([value="duration"]:checked) [data-listing-term="fixed"] { display:none; }
.listing-term-picker [data-listing-term] > :is(input,label) { margin:0; }
.listing-actions { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; }
.listing-unlist { text-align:right; }
@media (max-width:600px) {
  .listing-editor .listing-fields { grid-template-columns:minmax(0,1fr); }
  .listing-term-picker [data-listing-term] { max-width:none; }
}
.form-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:10px; }
.filter { display:flex; align-items:flex-end; flex-wrap:wrap; gap:14px; margin-bottom:24px; }
.filter label { flex:1; min-width:145px; max-width:240px; margin:0; }
.inline-form { display:flex; gap:8px; align-items:center; }
.inline-form input { margin:0; }
[data-agent-control-note]:empty { display:none; }

/* 指标用细分隔线分组；表格和图表使用白色面板。 */
/* 独立绘制指标文字层，保持绘制顺序稳定。 */
.metrics { position:relative; z-index:0; }
.metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:32px; }
.metric { padding:0 28px; min-width:0; border-left:1px solid var(--line); }
.metric:first-child { border-left:0; }
.metric:last-child { padding-right:0; }
.metric-label { color:var(--muted); font-size:19px; margin-bottom:14px; }
.metric-value { font:600 50px "Aptos","Segoe UI",sans-serif; letter-spacing:-1.3px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; line-height:1.15; }
.metric-value small { font-size:18px; letter-spacing:0; }
.metric-note { font-size:14px; line-height:1.6; color:var(--muted); margin-top:8px; }
.metric.accent .metric-value { color:var(--accent-ink); }
.panel { border-radius:var(--radius); padding:26px; margin-bottom:24px; min-width:0; }
.panel-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px; margin-bottom:22px; }
.panel-head h2 { margin:0; }
.panel-head a { font-size:14px; }
.two-columns { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:24px; }
.equal-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.table-wrap { overflow-x:auto; border-radius:10px; scrollbar-width:thin; scrollbar-color:var(--border-hover) transparent; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
th { font-size:13px; color:var(--muted); font-weight:500; background:var(--surface-soft); padding:14px 13px; border-bottom:1px solid var(--line); white-space:nowrap; }
th:first-child { border-radius:8px 0 0 0; }
th:last-child { border-radius:0 8px 0 0; }
td { padding:18px 13px; border-bottom:1px solid var(--line); vertical-align:middle; line-height:1.6; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:var(--surface-soft); }
td small { display:block; margin-top:5px; font-size:12px; }
.table-wrap td { min-width:90px; }
.table-wrap td:first-child { min-width:130px; }
.table-wrap td small { overflow-wrap:anywhere; }
.number { text-align:right; font-family:"Consolas",monospace; font-variant-numeric:tabular-nums; white-space:nowrap; }
.mono { font-family:"Consolas",monospace; font-variant-numeric:tabular-nums; }
.badge { display:inline-block; font-size:12px; padding:4px 9px; border-radius:6px; background:var(--disabled); color:var(--label); border:1px solid transparent; white-space:nowrap; line-height:1.5; }
.badge.good { background:var(--green-soft); color:var(--green); }
.badge.bad { background:var(--red-soft); color:var(--red); }
.badge.warn { background:var(--amber-soft); color:var(--amber); }
.empty { padding:38px 20px; text-align:center; color:var(--muted); line-height:1.9; font-size:14px; }
.empty strong { display:block; font-size:16px; font-weight:500; color:var(--ink); margin-bottom:8px; }
.empty-symbol { width:44px; height:44px; border:1px solid var(--accent-border); border-radius:12px; background:var(--accent-soft); display:grid; place-items:center; margin:0 auto 15px; color:var(--accent-ink); font-size:21px; }
.pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-top:22px; color:var(--muted); font-size:13px; }
.chart { min-height:240px; position:relative; }
.chart svg { width:100%; height:auto; display:block; overflow:visible; }
.chart-bar { transition:opacity .15s; }
.chart-bar:hover { opacity:.75; }
.chart-source { font-size:12px; color:var(--muted); line-height:1.8; margin-bottom:16px; }
.detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px 20px; margin:20px 0; }
.detail-grid dt { font-size:13px; color:var(--muted); margin-bottom:9px; }
.detail-grid dd { margin:0; font-size:15px; line-height:1.6; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.tabs { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:24px; font-size:14px; }
.tabs a { padding:11px 16px; border-radius:10px; border:1px solid var(--border); background:var(--surface); }
.tabs a:hover { background:var(--surface-soft); text-decoration:none; }
.tabs.settings-tabs,.tabs.machine-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; width:390px; max-width:100%; margin-bottom:20px; border-radius:999px; background:var(--disabled); }
.tabs.settings-tabs a,.tabs.machine-tabs a { display:flex; align-items:center; justify-content:center; min-width:0; min-height:44px; padding:10px 16px; border:1px solid transparent; border-radius:12px; background:transparent; white-space:nowrap; color:var(--muted); line-height:1.5; }
.tabs.settings-tabs a:hover,.tabs.machine-tabs a:hover { background:var(--surface-soft); }
.tabs.settings-tabs a[aria-selected="true"],.tabs.machine-tabs a[aria-current="page"] { border-color:var(--accent-border); background:var(--accent-soft); color:var(--accent-ink); font-weight:600; }
.tabs.machine-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); width:260px; }
@media (max-width:600px) {
  .tabs.settings-tabs { width:100%; margin-bottom:16px; }
  .tabs.settings-tabs a,.tabs.machine-tabs a { padding:10px 6px; font-size:13px; }
}
/* 机器概况第二版：左侧整机摘要、右侧 GPU 明细；窄屏自然堆叠。 */
.machine-monitor-stack,.earnings-workspace { display:grid; grid-template-columns:clamp(340px,29.2%,420px) minmax(0,1fr); gap:16px; align-items:stretch; min-width:0; }
.machine-monitor-stack > .panel { grid-area:auto; margin:0; min-width:0; padding:20px; box-shadow:0 8px 28px rgba(27,30,46,.045); }
.machine-summary { container-type:inline-size; }
.machine-summary-header { padding-bottom:16px; border-bottom:1px solid var(--line); }
.machine-summary-topline { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 8px; }
.machine-summary-identity { display:contents; }
.machine-summary-identity h1 { grid-column:1; grid-row:1; margin:0; font-size:clamp(20px,6.3cqw,25px); line-height:1.3; font-weight:700; letter-spacing:-.5px; overflow-wrap:anywhere; }
.machine-summary-model { grid-column:1/-1; grid-row:2; margin:0; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.machine-summary-actions { grid-column:2; grid-row:1; display:flex; align-items:center; gap:6px; margin-left:auto; }
.machine-summary-actions .button { min-height:34px; padding:6px 10px; border-radius:8px; font-size:12px; gap:4px; }
.machine-summary-actions > .button { color:var(--accent-ink); }
.machine-summary-statusline { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
.machine-summary-statusline .badge,.machine-card-statuses .badge { padding:5px 8px; font-size:12px; line-height:1.25; border-radius:6px; }
.machine-summary-statusline .badge.good,.machine-card-statuses .badge.good { background:var(--online-badge-bg); color:var(--online-badge-ink); font-size:13px; font-weight:700; }
.machine-summary-rental { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding-left:10px; border-left:1px solid var(--line); font-size:12px; }
.machine-more { position:relative; }
.machine-more > summary { list-style:none; }
.machine-more > summary::-webkit-details-marker { display:none; }
.machine-more > summary img { opacity:.75; }
.machine-more[open] > summary img { transform:rotate(180deg); }
.machine-more-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:5; display:grid; width:max-content; padding:6px; background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:var(--shadow-dialog); }
.machine-more-menu .button { border:0; justify-content:flex-start; gap:7px; }
.machine-more-menu img,.machine-more-menu svg { flex:none; opacity:.8; }
.machine-summary-metrics,.earnings-periods { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; }
.machine-summary-metrics > div,.earnings-period { min-width:0; padding:14px 8px; position:relative; }
.machine-summary-metrics > div:nth-child(3n+1),.earnings-period:nth-child(3n+1) { padding-left:0; }
.machine-summary-metrics > div:nth-child(3n),.earnings-period:nth-child(3n) { padding-right:0; }
.machine-summary-metrics > div:not(:nth-child(3n))::after,.earnings-period:not(:nth-child(3n))::after { content:""; position:absolute; right:0; top:14px; bottom:14px; width:1px; background:var(--line); }
.machine-summary-metrics > div:nth-child(n+4),.earnings-period:nth-child(n+4) { border-top:1px solid var(--line); }
.machine-summary-metrics dt,.earnings-period-label { color:var(--label); font-size:12px; line-height:1.5; margin:0 0 6px; }
.machine-summary-metrics dt small { color:var(--muted); font-size:inherit; }
.machine-summary-metrics dd,.earnings-period-amount strong { margin:0; font-size:clamp(18px,5.8cqw,23px); line-height:1.25; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:-.4px; }
.machine-summary-metrics > div:nth-child(-n+2) > dd { color:var(--accent-ink); }
.machine-summary-hardware-note > p { margin:0 0 12px; font-size:12px; line-height:1.5; }
.machine-summary-system { padding:14px 0; border-top:1px solid var(--line); }
.machine-summary-resource { display:grid; grid-template-columns:34px 48px minmax(32px,1fr) minmax(0,150px); align-items:center; gap:8px; min-height:38px; font-size:13px; }
.machine-summary-resource + .machine-summary-resource { margin-top:4px; }
.machine-summary-resource > strong { font-size:18px; font-weight:650; font-variant-numeric:tabular-nums; }
.machine-summary-resource .machine-summary-capacity { grid-column:4; color:var(--muted); font-size:12px; line-height:1.5; text-align:right; overflow-wrap:anywhere; }
.machine-summary .machine-summary-details > .monitor-rail-section { margin:0; padding:16px 0; border:0; border-top:1px solid var(--line); }
.machine-summary .machine-summary-details > .monitor-rail-section:last-child { padding-bottom:0; }
.machine-summary-details .host-panel-heading { margin:0 0 8px; gap:8px; }
.machine-summary .machine-summary-details h2 { margin:0; font-size:19px; font-weight:650; }
.machine-summary-details .button { min-height:32px; padding:4px 0 4px 8px; border:0; border-radius:6px; background:transparent; color:var(--accent-ink); font-size:13px; gap:3px; box-shadow:none; }
.machine-summary-details .button:hover { background:var(--accent-soft); }
.machine-summary-details .fine { margin:4px 0 0; font-size:12px; line-height:1.5; }
.machine-summary-details .disk-summary-row { display:block; }
.machine-summary-details .disk-summary-row + .disk-summary-row { border:0; margin-top:16px; padding-top:0; }
.machine-summary-details .disk-usage { margin:0 0 6px; gap:10px; font-size:15px; }
.machine-summary-details .disk-summary-capacity { margin-top:6px; }
.machine-monitor-stack .monitor-panel-heading { justify-content:space-between; }
.machine-monitor-stack .monitor-panel-heading h2 { font-size:26px; font-weight:700; letter-spacing:-.5px; }
.machine-monitor-stack .monitor-power-link { min-height:40px; padding:8px 14px; font-size:14px; border-radius:9px; }
.machine-monitor-stack .gpu-overview-scroll { margin-top:20px; }
.machine-monitor-stack .gpu-overview-table { min-width:720px; }
.machine-monitor-stack .gpu-overview-table th { padding:10px 8px; font-size:13px; font-weight:500; color:var(--label); }
.machine-monitor-stack .gpu-overview-table td { padding:12px 8px; font-size:15px; }
.machine-monitor-stack .gpu-overview-table th:first-child,.machine-monitor-stack .gpu-overview-table td:first-child { width:8%; min-width:60px; }
.machine-monitor-stack .gpu-detail-link { justify-content:flex-start; min-height:36px; min-width:32px; padding:3px 0; }
.machine-monitor-stack .gpu-power-button { min-height:36px; padding:6px 12px; font-size:13px; border-radius:9px; }
.machine-monitor-stack .gpu-overview-table tbody tr:hover { background:var(--surface-soft); }
@container (max-width:350px) {
  .machine-summary-identity h1 { font-size:20px; }
  .machine-summary-model { font-size:12px; }
  .machine-summary-actions .button { padding-right:7px; padding-left:7px; }
  .machine-summary-metrics dt,.earnings-period-label { font-size:11px; }
  .machine-summary-metrics > div:not(:nth-child(3n+1)),.earnings-period:not(:nth-child(3n+1)) { padding-left:6px; }
  .machine-summary-metrics > div:not(:nth-child(3n)),.earnings-period:not(:nth-child(3n)) { padding-right:6px; }
  .machine-summary-resource { grid-template-columns:30px 44px minmax(28px,1fr) minmax(0,126px); gap:6px; }
}
@container (max-width:280px) {
  .machine-summary-metrics > div:not(:nth-child(3n+1)),.earnings-period:not(:nth-child(3n+1)) { padding-left:3px; }
  .machine-summary-metrics > div:not(:nth-child(3n)),.earnings-period:not(:nth-child(3n)) { padding-right:3px; }
}
@media (max-width:1300px) {
  .machine-monitor-stack,.earnings-workspace { grid-template-columns:minmax(0,1fr); }
}
@media (min-width:601px) and (max-width:1300px) {
  .machine-summary-system { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
  .machine-summary-resource + .machine-summary-resource { margin-top:0; }
  .machine-summary-resource { grid-template-columns:34px 48px minmax(28px,1fr); }
  .machine-summary-resource .machine-summary-capacity { grid-column:1/-1; text-align:left; }
}
@media (max-width:600px) {
  .machine-monitor-stack { gap:16px; }
  .machine-monitor-stack > .panel { padding:16px 14px; }
  .machine-summary-topline { align-items:start; row-gap:8px; }
  .machine-summary-identity h1 { min-width:0; font-size:20px; line-height:1.35; }
  .machine-summary-actions { align-self:start; }
  .machine-summary-actions .button { min-height:44px; font-size:12px; padding:8px; }
  .machine-summary-metrics dd,.earnings-period-amount strong { font-size:clamp(16px,5.7cqw,20px); }
  .machine-summary-details .button { min-height:44px; }
  .machine-summary-resource { min-height:40px; }
  .machine-summary-resource .machine-summary-capacity { font-size:11px; }
  .machine-monitor-stack .monitor-panel-heading h2 { font-size:20px; }
  .machine-monitor-stack .monitor-power-link { min-height:44px; font-size:13px; }
  .machine-monitor-stack .gpu-overview-table th { font-size:12px; padding:9px 10px; }
  .machine-monitor-stack .gpu-overview-table td { font-size:13px; padding:5px 10px; }
  .machine-monitor-stack .gpu-detail-link,.machine-monitor-stack .gpu-power-button { min-height:44px; min-width:44px; }
}
.timeline-item { border-left:2px solid var(--accent-border); padding:0 0 20px 17px; margin-left:6px; }
.timeline-item p { margin:6px 0; color:var(--muted); line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
details>summary { cursor:pointer; color:var(--accent-ink); padding:10px 0; font-size:14px; }
pre { white-space:pre-wrap; word-break:break-all; font-size:12px; background:var(--surface-soft); padding:16px; border:1px solid var(--line); border-radius:10px; }
.row-actions { display:flex; gap:10px; }
.nowrap { white-space:nowrap; }
.section-note { line-height:1.9; font-size:13px; color:var(--muted); margin-bottom:18px; }

/* 单机概况：GPU 主栏 + 宿主机侧栏，详细读数和维护表单按需展开。 */
.machine-overview-page .workspace { font-size:16px; }
@media (min-width:901px) {
  .machine-overview-page .workspace { padding-top:28px; }
}
.machine-title-gpu { display:inline; font-size:.8em; font-weight:400; }
.machine-identity { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; margin:0 0 20px; }
.machine-identity h1 { margin:0; min-width:0; overflow-wrap:anywhere; line-height:1.5; font-size:22px; font-weight:650; }
.machine-identity .machine-status-strip { margin:0; flex-shrink:0; }
.machine-tabs a[aria-busy="true"] { opacity:.65; }
.machine-tabs:focus { outline:none; }
.machine-navigation-bar { display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.machine-navigation-bar .machine-tabs { flex:0 1 260px; min-width:0; margin:0; }
.machine-tab-status { margin:-4px 0 18px; }
.machine-tab-status[hidden] { display:none; }
[data-machine-view]:focus { outline:none; }
[data-machine-view]:focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:8px; }
.machine-status-strip { display:flex; flex-wrap:wrap; align-items:center; gap:12px 22px; margin:0 0 22px; font-size:15px; }
.machine-status-strip > span + span { border-left:1px solid var(--line); padding-left:22px; }
.machine-monitor-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); grid-template-areas:"gpu aside"; gap:18px; align-items:stretch; }
.monitor-gpu { grid-area:gpu; }
.monitor-aside { grid-area:aside; display:flex; flex-direction:column; justify-content:space-between; }
.machine-monitor-grid .panel { margin:0; padding:20px; }
.monitor-panel-heading { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.monitor-panel-heading h2 { margin:0; }
.monitor-power-link { margin-left:auto; min-height:38px; padding:7px 12px; color:var(--accent-ink); }
.monitor-sample { margin:0 0 0 auto; line-height:1.6; font-size:11px; }
.gpu-summary-strip { display:grid; grid-template-columns:1.2fr 1fr 1fr; margin:20px 0 16px; }
.gpu-summary-strip > div { display:flex; flex-direction:column-reverse; padding:0 16px; border-left:1px solid var(--line); min-width:0; }
.gpu-summary-strip > div:first-child { padding-left:0; border:0; }
.gpu-summary-strip > div:last-child { padding-right:0; }
.gpu-summary-strip dt { color:var(--muted); margin-top:7px; font-size:14px; }
.gpu-summary-strip dd { margin:0; font-size:clamp(23px,2.3vw,34px); font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; letter-spacing:-.8px; }
.gpu-summary-strip > div:first-child dd { color:var(--accent-ink); }
.gpu-diagnostic { margin:7px 0 14px; line-height:1.6; }
.gpu-overview-scroll { margin-top:14px; }
.gpu-overview-table { table-layout:auto; min-width:720px; }
.gpu-overview-table th { padding:9px 8px; font-size:12px; white-space:nowrap; text-align:left; }
.gpu-overview-table td { padding:12px 8px; font-size:14px; line-height:1.4; vertical-align:middle; text-align:left; }
.gpu-overview-table th:first-child { width:10%; }
.gpu-overview-table .gpu-load-column { width:18%; }
.gpu-overview-table .gpu-persistence { text-align:center; color:var(--muted); }
.persistence-dot { display:inline-block; width:10px; height:10px; border-radius:50%; vertical-align:middle; }
.persistence-dot.is-enabled { background:var(--green); box-shadow:0 0 0 3px var(--green-soft); }
.persistence-dot.is-disabled { background:var(--placeholder); box-shadow:0 0 0 3px var(--disabled); }
.gpu-overview-table td:first-child { min-width:92px; }
.gpu-detail-link { display:inline-flex; align-items:center; justify-content:center; min-width:40px; min-height:40px; padding:4px 6px; font-weight:600; border-radius:7px; text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--border-hover); }
.gpu-detail-link:hover { background:var(--accent-soft); }
.gpu-identity { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.gpu-power-button { min-height:36px; padding:6px 10px; font-size:12px; }
.gpu-power-button:disabled { color:var(--muted); background:var(--disabled); border-color:var(--border); opacity:1; box-shadow:none; transform:none; }
.gpu-dialog { color:var(--ink); background:var(--surface-solid); width:min(620px,calc(100% - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:24px; border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow-dialog); overflow:auto; }
.gpu-dialog::backdrop { background:var(--overlay); backdrop-filter:blur(3px); }
.gpu-dialog:not([open]):target { display:block; position:relative; margin:20px auto; }
.gpu-dialog-heading { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.gpu-dialog-heading h2 { margin:0; font-size:22px; }
.gpu-dialog-heading .button { flex-shrink:0; }
.machine-dialog { width:min(860px,calc(100% - 32px)); padding:0; }
.machine-dialog > .gpu-dialog-heading { position:sticky; top:0; z-index:2; padding:20px 24px; margin:0 0 20px; border-bottom:1px solid var(--line); background:var(--surface-solid); }
.machine-dialog-body { padding:0 24px 24px; }
.machine-dialog-body > .record-section:first-child h2 { margin-top:0; }
.machine-dialog:not([open]):has(:target) { display:block; position:relative; margin:20px auto; }
.machine-dialog[data-dialog-enhanced]:not([open]) { display:none; }
.account-popover { display:none; position:fixed; inset:auto; width:min(300px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); margin:0; padding:0; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--ink); box-shadow:0 8px 32px rgba(27,30,46,.18); overflow:hidden; }
.account-popover:popover-open { display:flex; flex-direction:column; }
.account-popover::backdrop { background:transparent; pointer-events:none; }
.account-popover:focus { outline:none; }
.account-popover-heading { flex:none; padding:16px; border-bottom:1px solid var(--line); }
.account-popover-heading h2 { margin:0; font-size:18px; }
.account-popover-body { min-height:0; padding:16px; overflow:auto; }
.account-popover .account-amounts > div + div { margin-top:14px; padding-top:14px; }
.account-popover .account-amounts dt { font-size:13px; }
.account-popover .account-amounts dd { font-size:26px; }
.account-popover .account-amounts p { margin-top:6px; }
.account-logout { flex:none; margin:0; padding:8px 12px; border-top:1px solid var(--line); }
.account-logout-button { display:flex; align-items:center; gap:16px; width:100%; min-height:44px; padding:10px 8px; color:var(--red); font-size:16px; text-align:left; }
.account-logout-button > .ui-icon { width:24px; height:24px; }
.account-logout-button:hover { color:var(--red); background:var(--red-soft); }
.account-popover :focus-visible { outline-color:var(--focus); }
.user-create-dialog { width:min(520px,calc(100% - 32px)); }
.account-summary-page { max-width:520px; }
.account-summary-page .account-logout { margin-top:20px; padding:12px 0 0; }
.account-amounts { margin:0; }
.account-amounts > div + div { border-top:1px solid var(--line); margin-top:20px; padding-top:20px; }
.account-amounts dt { color:var(--muted); font-size:14px; }
.account-amounts dd { margin:6px 0 0; font-size:30px; font-weight:600; color:var(--accent-ink); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.account-amounts dd[data-negative="true"] { color:var(--red); }
.account-amounts p { margin:8px 0 0; font-size:12px; }
.account-stale { color:var(--amber); }
.machine-dialog .detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.machine-monitor-dialog table { min-width:480px; }
.machine-monitor-dialog td { padding:12px; }
.gpu-dialog-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.gpu-setting-rules { margin:0; }
.gpu-setting-rules > summary { list-style:none; cursor:pointer; }
.gpu-setting-rules > summary::-webkit-details-marker { display:none; }
.gpu-setting-rules[open] > summary { background:var(--accent-soft); color:var(--accent-ink); }
.gpu-setting-rules-body { position:absolute; z-index:3; top:calc(100% + 10px); left:0; right:0; max-height:calc(100dvh - 180px); overflow:auto; padding:16px 18px; border:1px solid var(--border); border-radius:12px; background:var(--surface-solid); box-shadow:var(--shadow-dialog); }
.gpu-setting-rules-body dl { margin:0; font-size:13px; line-height:1.8; }
.gpu-setting-rules-body dl > div + div { margin-top:12px; }
.gpu-setting-rules-body dt { color:var(--nav); font-weight:600; }
.gpu-setting-rules-body dd { margin:3px 0 0; color:var(--muted); }
.gpu-setting-rules-body .fine { margin-bottom:0; }
.gpu-dialog .fine { line-height:1.8; }
.gpu-dialog-model { font-size:16px; color:var(--nav); }
.gpu-dialog-model .badge { white-space:normal; vertical-align:middle; }
.monitor-heading-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.batch-targets { border:0; padding:0; margin:20px 0; min-width:0; }
.batch-targets legend { font-weight:600; color:var(--nav); }
.batch-selection-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:8px 0 12px; }
.batch-selection-actions .text-button { font-size:12px; }
.batch-gpu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
.batch-gpu-option { display:flex; gap:10px; align-items:flex-start; padding:10px 0; margin:0; border-top:1px solid var(--line); min-width:0; }
.batch-gpu-option input[type="checkbox"] { width:18px; height:18px; flex-shrink:0; margin:2px 0; accent-color:var(--accent-ink); }
.batch-gpu-option strong { font-size:14px; }
.batch-gpu-option small { display:block; font-size:11px; line-height:1.6; color:var(--muted); overflow-wrap:anywhere; }
.gpu-batch-dialog .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.power-feedback:empty { display:none; }
.power-feedback { margin-top:20px; padding-top:16px; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.power-result-heading { display:flex; align-items:center; gap:9px; margin:0; font-size:14px; }
.power-result-indicator { width:9px; height:9px; border-radius:50%; background:var(--muted); flex-shrink:0; }
.power-feedback[data-status="succeeded"] .power-result-indicator, .power-feedback[data-status="saved"] .power-result-indicator { background:var(--green); }
.power-feedback[data-status="failed"] .power-result-indicator { background:var(--red); }
.power-feedback[data-status="unknown"] .power-result-indicator, .power-feedback[data-status="partial"] .power-result-indicator { background:var(--amber); }
.power-feedback[aria-busy="true"] .power-result-indicator { width:14px; height:14px; background:transparent; border:2px solid var(--border); border-top-color:var(--accent-ink); animation:power-loading .8s linear infinite; }
.power-result-list { list-style:none; padding:0; margin:12px 0 0; }
.power-result-list li { display:grid; grid-template-columns:32px minmax(0,1fr); gap:12px; padding:9px 0; border-top:1px solid var(--line); font-size:13px; }
.power-result-list li strong { color:var(--nav); }
@keyframes power-loading { to { transform:rotate(360deg); } }
[data-machine-delete-operation][aria-busy="true"] [data-machine-delete-feedback]::before { content:""; display:inline-block; width:14px; height:14px; margin-right:9px; vertical-align:-2px; border:2px solid var(--border); border-top-color:var(--accent-ink); border-radius:50%; animation:power-loading .8s linear infinite; }
@media (prefers-reduced-motion:reduce) { [data-machine-delete-operation][aria-busy="true"] [data-machine-delete-feedback]::before { animation:none; } }
@media (prefers-reduced-motion:reduce) { .power-feedback[aria-busy="true"] .power-result-indicator { animation:none; } }
.gpu-detail-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; margin:20px 0; }
.gpu-detail-metrics > div { border-top:1px solid var(--line); padding:12px 0; min-width:0; }
.gpu-detail-metrics dt,.gpu-identifiers dt { font-size:12px; color:var(--muted); margin-bottom:6px; }
.gpu-detail-metrics dd { margin:0; font-size:18px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.gpu-identifiers { padding-top:12px; border-top:1px solid var(--line); }
.gpu-identifiers > div { display:grid; grid-template-columns:84px minmax(0,1fr); gap:12px; padding:5px 0; }
.gpu-identifiers dd { margin:0; font-size:13px; overflow-wrap:anywhere; }
.gpu-power-section { border-top:1px solid var(--line); padding-top:20px; margin:20px 0; }
.gpu-power-section h3 { margin:0 0 12px; font-size:18px; }
.gpu-power-section .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.gpu-power-section .form-actions { margin-top:12px; }
.gpu-rule-row { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); }
.gpu-rule-row:last-child { border:0; }
.gpu-rule-row p { font-size:13px; line-height:1.8; margin:8px 0; }
.gpu-uuid { overflow-wrap:anywhere; }
.gpu-overview-table small { display:block; font-size:11px; margin:3px 0 0; line-height:1.4; }
.gpu-overview-table small.gpu-unavailable { display:block; }
.gpu-overview-table td:not(:first-child) { white-space:nowrap; font-variant-numeric:tabular-nums; }
.gpu-power-pair span,.gpu-memory-pair span { color:var(--muted); }
.gpu-load { display:flex; align-items:center; justify-content:flex-start; gap:6px; }
.gpu-load strong { font-weight:500; min-width:4ch; flex-shrink:0; text-align:left; }
.gpu-load strong:only-child { min-width:0; }
.gpu-load .usage-meter { min-width:28px; }
.gpu-unavailable-row td { color:var(--muted); }
.gpu-unavailable-row .badge { margin:0 0 0 6px; font-size:11px; padding:2px 5px; }
.gpu-unavailable { max-width:190px; white-space:normal; }
.usage-meter { display:block; width:100%; min-width:0; height:9px; border:0; border-radius:10px; background:var(--meter-track); overflow:hidden; }
.usage-meter::-webkit-meter-bar { background:var(--meter-track); border:0; box-shadow:none; border-radius:10px; height:9px; }
.usage-meter::-webkit-meter-optimum-value { background:var(--accent); border-radius:10px; }
.usage-meter::-moz-meter-bar { background:var(--accent); border-radius:10px; }
.monitor-rail-section + .monitor-rail-section { border-top:1px solid var(--line); margin-top:18px; padding-top:18px; }
.monitor-rail-section h2 { margin:0 0 18px; font-size:22px; }
.host-panel-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.host-panel-heading h2 { margin:0; }
.host-panel-heading .button,.host-panel-actions .button { padding:7px 11px; font-size:13px; }
.host-panel-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:16px; }
.host-panel-actions .button { text-align:center; }
.host-panel-actions .machine-delete-button { grid-column:1/-1; justify-self:end; }
.machine-delete-dialog { width:min(540px,calc(100% - 32px)); }
.machine-delete-dialog form { display:grid; gap:16px; }
.monitor-rail-section .fine { font-size:13px; line-height:1.5; margin-bottom:6px; overflow-wrap:anywhere; }
.host-usage-row { display:grid; grid-template-columns:36px 64px minmax(32px,1fr) minmax(0,150px); align-items:center; gap:10px; margin-bottom:14px; }
.host-usage-row > strong { font-size:22px; font-variant-numeric:tabular-nums; }
.host-usage-row > span:first-child { white-space:nowrap; }
.host-capacity { min-width:0; color:var(--muted); font-size:12px; line-height:1.5; font-variant-numeric:tabular-nums; }
.host-capacity > span { display:inline-block; }
.hardware-power { display:flex; flex-direction:column-reverse; margin:10px 0 14px; }
.hardware-power dt { color:var(--muted); margin-top:4px; }
.hardware-power dd { font-size:34px; font-weight:650; color:var(--accent-ink); margin:0; font-variant-numeric:tabular-nums; }
.disk-summary-row + .disk-summary-row { border-top:1px solid var(--line); margin-top:12px; padding-top:12px; }
.disk-usage { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; }
.disk-usage strong { color:var(--accent-ink); overflow-wrap:anywhere; min-width:0; }
.disk-usage span { font-weight:600; white-space:nowrap; }
.disk-summary-row .fine { margin-top:8px; }
.monitor-disclosure > summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; list-style:none; padding:0; min-height:24px; font-size:16px; color:var(--nav); font-weight:600; }
.machine-monitor-grid .monitor-disclosure.panel { padding:16px 20px; }
.monitor-disclosure > summary::-webkit-details-marker { display:none; }
.monitor-disclosure > summary::after { content:"›"; margin-left:auto; color:var(--muted); font-size:24px; line-height:1; }
.monitor-disclosure[open] > summary::after { transform:rotate(90deg); }
.monitor-disclosure > summary .fine { font-weight:400; }
.disclosure-body { border-top:1px solid var(--line); margin-top:18px; padding-top:18px; min-width:0; }
.disclosure-body .table-wrap { max-width:100%; }
.record-section + .record-section { border-top:1px solid var(--line); margin-top:24px; padding-top:24px; }
.record-section h2 { font-size:18px; margin-bottom:18px; }
.record-section .panel-head { flex-wrap:wrap; }
.monitor-disclosure { scroll-margin-top:20px; }
@media (max-width:1200px) {
  .machine-monitor-grid { grid-template-columns:minmax(0,1fr); grid-template-areas:"gpu" "aside"; }
}
@media (max-width:600px) {
  .machine-status-strip { gap:10px 14px; margin-bottom:18px; font-size:13px; }
  .machine-status-strip > span + span { padding-left:14px; }
  .machine-monitor-grid .panel { padding:18px 14px; }
  .monitor-panel-heading h2 { font-size:20px; }
  .host-usage-row { grid-template-columns:32px 52px minmax(32px,1fr) minmax(0,105px); gap:8px; }
  .host-usage-row > strong { font-size:18px; }
  .monitor-panel-heading { gap:8px; }
  .monitor-power-link { padding:6px 9px; font-size:12px; }
  .gpu-summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 0; }
  .gpu-summary-strip > div:nth-child(3) { border:0; padding-left:0; }
  .gpu-summary-strip dd { font-size:28px; }
  .gpu-summary-strip dt { font-size:12px; }
  .gpu-overview-table { min-width:710px; }
  .gpu-overview-table th { font-size:11px; padding:9px 8px; }
  .gpu-overview-table td { padding:11px 8px; font-size:12px; }
  .gpu-overview-table th:first-child,.gpu-overview-table td:first-child { position:sticky; left:0; z-index:1; background:var(--surface-solid); }
  .gpu-overview-table small { display:block; font-size:10px; margin-top:3px; }
  .gpu-unavailable-row .badge { margin:4px 0 0; white-space:normal; }
  .gpu-load .usage-meter { display:none; }
  .gpu-load strong { min-width:0; text-align:left; }
  .gpu-load { gap:0; }
  .gpu-dialog { padding:18px 16px; max-height:calc(100dvh - 24px); width:calc(100% - 24px); }
  .gpu-dialog-heading { flex-wrap:wrap; }
  .gpu-dialog-heading h2 { flex:1 0 140px; font-size:20px; }
  .gpu-dialog-actions { gap:6px; margin-left:auto; }
  .gpu-dialog-actions .button { padding:7px 9px; }
  .machine-dialog { padding:0; }
  .machine-dialog > .gpu-dialog-heading { padding:16px; }
  .machine-dialog-body { padding:0 16px 20px; }
  .machine-dialog .detail-grid { grid-template-columns:minmax(0,1fr); }
  .machine-identity { gap:10px 16px; margin-bottom:16px; }
  .machine-identity h1 { font-size:18px; }
  .machine-title-gpu { display:block; font-size:15px; }
  .machine-navigation-bar { gap:8px; }
  .machine-navigation-bar .machine-tabs { flex:1; width:auto; }
  .gpu-detail-metrics { gap:0 16px; }
  .gpu-detail-metrics dd { font-size:16px; }
  .gpu-power-section .form-grid { grid-template-columns:minmax(0,1fr); }
  .gpu-power-section .form-actions .button { width:100%; }
  .gpu-batch-dialog .form-grid,.batch-gpu-grid { grid-template-columns:minmax(0,1fr); }
  .gpu-batch-dialog [data-batch-submit] { width:100%; }
  .monitor-disclosure > summary { font-size:15px; }
  .monitor-disclosure > summary .fine { flex-basis:80%; font-size:11px; }
  .monitor-disclosure > summary::after { margin-top:-26px; }
}

/* 收益中心第二版：左侧收益摘要、右侧趋势与账期；复用概况的面板与状态徽标。 */
.finance-page { min-width:0; }
.earnings-workspace .panel { min-width:0; margin:0; padding:24px; box-shadow:0 8px 28px rgba(27,30,46,.045); }
.earnings-summary { container-type:inline-size; display:flex; flex-direction:column; }
.earnings-workspace > .earnings-summary { padding:20px; }
.earnings-summary-section { display:flex; flex:1 0 auto; }
.earnings-summary .earnings-periods { flex:1; grid-auto-rows:1fr; }
.earnings-period { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; min-height:44px; color:var(--ink); }
a.earnings-period:hover { text-decoration:none; background:var(--accent-soft); }
.earnings-period-label { font-weight:500; }
.earnings-period-label small { color:var(--muted); font-size:10px; font-weight:400; }
.earnings-period-amount { max-width:100%; }
.earnings-period-amount strong { display:block; overflow-wrap:anywhere; }
.earnings-period-amount small { font-size:11px; font-weight:500; letter-spacing:0; white-space:nowrap; }
.earnings-period:is([data-earnings-period="day"],[data-earnings-period="month"]) .earnings-period-label { color:var(--accent-ink); font-weight:700; }
.earnings-period:is([data-earnings-period="day"],[data-earnings-period="month"]) .earnings-period-amount strong { color:var(--accent-ink); font-weight:750; }
.finance-income-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.finance-income-list > div { position:relative; min-width:0; display:flex; flex-direction:column; gap:6px; padding:12px 14px; }
.finance-income-list > div:nth-child(odd) { padding-left:0; }
.finance-income-list > div:nth-child(even) { padding-right:0; }
.finance-income-list > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
.finance-income-list > div:nth-child(odd)::after { content:""; position:absolute; right:0; top:12px; bottom:12px; width:1px; background:var(--line); }
.finance-income-list dt { font-size:13px; color:var(--muted); }
.finance-income-list dd { margin:0; font-size:clamp(18px,5.8cqw,22px); font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.earnings-total { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; margin:14px 0 0; padding-top:12px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
.earnings-total strong { color:var(--ink); font-size:15px; }
.earnings-trends { display:flex; flex-direction:column; min-width:0; gap:inherit; }
/* 两个面板各自在标题和最小图高的基础上均分余量，绘图区始终等高。 */
.earnings-trends > .panel,.earnings-trend { display:flex; flex-direction:column; flex:1 0 auto; }
.earnings-report-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; align-items:center; }
.earnings-report-heading h2 { margin:0; font-size:22px; line-height:1.5; }
.earnings-actions { display:flex; align-items:center; gap:8px; }
.earnings-actions .button { min-height:38px; padding:8px 12px; border-radius:9px; font-size:13px; }
.earnings-actions .machine-more-menu { box-shadow:0 6px 24px rgba(27,30,46,.12); }
.earnings-applied-period { grid-column:1 / -1; margin:0; font-size:14px; line-height:1.7; color:var(--muted); }
.finance-chart { min-height:0; margin:12px 0 0; }
.finance-chart.empty { min-height:220px; display:grid; place-items:center; }
.finance-chart svg { display:block; width:100%; }
.finance-chart[data-chart-fill],.energy-chart { flex:1 0 160px; min-height:160px; }
.finance-chart[data-chart-fill] svg { position:absolute; inset:0; width:100%; height:100%; }
.earnings-contracts { display:grid; gap:8px; padding-top:12px; border-top:1px solid var(--line); }
.contract-heading,.contract-pages { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.contract-heading { justify-content:space-between; }
.contract-heading h2 { margin:0; font-size:18px; }
.contract-heading small { margin-left:4px; color:var(--muted); font-size:12px; font-weight:400; white-space:nowrap; }
.contract-heading .button { min-height:34px; padding:4px 10px; font-size:13px; }
.contract-pages { color:var(--muted); font-size:12px; }
.contract-list { container-type:inline-size; }
.contract-columns { display:grid; grid-template-columns:minmax(74px,1.45fr) minmax(0,1fr) minmax(0,.93fr) minmax(0,1fr) minmax(86px,1.65fr); align-items:center; gap:4px; padding:0 4px; overflow-wrap:anywhere; }
.current-contract-list .contract-columns { grid-template-columns:minmax(0,1.1fr) repeat(2,minmax(0,1fr)) minmax(0,.65fr) minmax(86px,1.8fr); }
.contract-list-state { color:var(--muted); font-weight:600; }
.contract-list-state[data-contract-state="Running"] { color:var(--online-badge-ink); }
.contract-labels { min-height:26px; background:var(--surface-soft); color:var(--muted); font-size:12px; line-height:1.25; }
.contract-entry { min-height:32px; padding-block:4px; border-bottom:1px solid var(--line); color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; }
.contract-entry:is(:hover,:focus-visible) { color:var(--accent-ink); background:var(--accent-soft); text-decoration:none; }
.contract-entry:focus-visible { outline-offset:-2px; }
.contract-entry:last-child { border-bottom:0; }
@container (min-width:580px) {
  #contract-history .contract-columns { grid-template-columns:minmax(76px,1fr) repeat(2,minmax(0,.8fr)) minmax(0,1fr) minmax(86px,1.2fr) minmax(144px,1.6fr); }
}
@container (max-width:579.99px) {
  .contract-departure-label { display:none; }
  .contract-departure { grid-column:1 / -1; color:var(--muted); font-size:12px; }
  .contract-departure::before { content:"退租时间（确认） "; }
}
.contract-empty { color:var(--muted); }
.contract-price { color:var(--accent-ink); font-weight:600; }
.contract-state { max-width:40%; white-space:normal; overflow-wrap:anywhere; }
.contract-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; padding:14px 0; border-radius:8px; background:var(--surface-soft); }
.contract-facts > div { min-width:0; padding:0 14px; }
.contract-facts > div + div { border-left:1px solid var(--border); }
.contract-facts dt,.contract-fields dt { color:var(--label); font-size:13px; }
.contract-facts dd,.contract-fields dd { margin:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.contract-facts strong { display:block; margin:3px 0; font-size:20px; line-height:1.35; color:var(--nav); }
@media (max-width:360px) {
  .contract-facts > div { padding-inline:8px; }
  .contract-facts strong { font-size:16px; }
}
.contract-facts small { display:block; }
.contract-section { margin-top:18px; }
.contract-section h3 { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:0; padding-bottom:6px; border-bottom:1px solid var(--line); font-size:15px; }
.contract-section h3 small,.contract-fields small { font-weight:400; }
.contract-fields { margin:2px 0 0; }
.contract-fields > div { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:baseline; gap:12px; padding:5px 0; line-height:1.5; }
.contract-fields dd { text-align:right; font-size:14px; }
.contract-other-rates > summary { display:list-item; width:fit-content; padding:8px 0; font-size:13px; }
@media (pointer:coarse), (max-width:600px) {
  .contract-other-rates > summary { min-height:44px; line-height:28px; }
}
@container (max-width:340px) {
  .contract-columns { column-gap:3px; }
  .contract-labels { font-size:11px; }
  .contract-entry { font-size:12px; }
}
@container (max-width:285px) {
  .contract-columns { grid-template-columns:minmax(70px,1.3fr) repeat(3,minmax(0,1fr)); row-gap:0; }
  .current-contract-list .contract-columns { grid-template-columns:minmax(0,1.1fr) repeat(2,minmax(0,1fr)) minmax(0,.65fr); }
  .contract-duration-label { display:none; }
  .contract-duration { grid-column:1 / -1; color:var(--muted); font-size:12px; }
  .contract-duration::before { content:"已运行 "; }
  #contract-history .contract-duration::before { content:"确认时长 "; }
}
.contract-sync-note,.contract-empty { margin:0; font-size:12px; }
.contract-sync-note { color:var(--amber); }
.contract-pages { justify-content:center; margin-top:12px; }
.contract-pages a { display:inline-flex; align-items:center; min-height:32px; padding:0 8px; }
@media (min-width:1301px) {
  .earnings-contracts .contract-entry { min-height:clamp(31px,calc(6vh - 16px),44px); }
}
@media (max-width:1300px) {
  .earnings-workspace { display:flex; flex-direction:column; }
  .earnings-trends { flex:1 0 auto; }
}
@media (min-width:1301px) and (max-height:820px) {
  .earnings-workspace > .earnings-summary { padding-block:12px; }
  .earnings-summary .machine-summary-header { padding-bottom:10px; }
  .earnings-summary .earnings-period { padding-block:9px; }
  .earnings-contracts { padding-top:8px; gap:6px; }
}
@media (max-width:600px), (pointer:coarse) {
  .contract-list .contract-entry,.contract-heading .button,.contract-pages a { min-height:44px; }
}
.earnings-trends > .earnings-energy-trend { padding-top:16px; padding-bottom:16px; }
.earnings-energy-heading { grid-template-columns:minmax(0,1fr) auto auto; }
.earnings-energy-heading .earnings-applied-period { grid-column:2; grid-row:1; font-size:12px; }
.earnings-energy-heading .energy-chart-unit { grid-column:3; grid-row:1; }
.energy-chart-unit { justify-self:end; color:var(--muted); font-size:12px; }
.energy-chart { margin-top:8px; }
.energy-chart svg { position:absolute; inset:0; width:100%; height:100%; }
.energy-chart-tooltip { position:absolute; z-index:2; max-width:calc(100% - 16px); padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); box-shadow:0 4px 16px rgba(27,30,46,.12); color:var(--ink); font-size:12px; line-height:1.7; white-space:pre-line; pointer-events:none; font-variant-numeric:tabular-nums; }
.energy-chart-tooltip[hidden] { display:none; }
/* 精确收益、账期、电费与采样保持原有独立弹窗。 */
.earnings-detail-dialog { width:min(1020px,calc(100% - 32px)); }
.ledger-heading,.ledger-heading nav,.ledger-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.ledger-heading { justify-content:space-between; }
.ledger-heading h3 { margin:0; font-size:17px; }
.ledger-heading h3 small { color:var(--muted); font-weight:400; }
.ledger-share-hint { margin:0 0 16px; color:var(--muted); }
.ledger-share-page { padding:clamp(12px,4vw,40px); }
.ledger-share-page > main { max-width:800px; margin:0 auto; }
.ledger-share-page h1 { margin:0; font-size:clamp(20px,3vw,28px); }
[data-copy-ledger-share][hidden],[data-share-copy-status]:empty { display:none; }
.ledger-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); background:var(--surface-soft); padding:14px 0; border-radius:10px; }
.ledger-totals div { min-width:0; padding:0 12px; border-right:1px solid var(--line); }
.ledger-totals div:last-child { border:0; color:var(--accent-ink); }
.ledger-totals dt { color:var(--muted); font-size:12px; }
.ledger-totals dd { margin:5px 0 0; font-size:clamp(16px,2vw,22px); font-weight:700; overflow-wrap:anywhere; }
.ledger-totals dd,.ledger-entry b { font-variant-numeric:tabular-nums; }
.ledger-entry { display:grid; grid-template-columns:minmax(0,1fr) fit-content(46%); align-items:start; gap:8px 16px; padding:14px 0; border-bottom:1px solid var(--line); }
.ledger-entry-info { min-width:0; overflow-wrap:anywhere; }
.ledger-entry-info strong { font-size:15px; }
.ledger-entry-meta { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; margin-top:4px; font-size:12px; color:var(--muted); }
.ledger-entry-meta span { border-right:1px solid var(--border); padding-right:8px; }
.ledger-entry-note { margin:5px 0 0; color:var(--muted); font-size:13px; white-space:pre-wrap; }
.ledger-entry-thumb { flex:none; width:48px; height:48px; overflow:hidden; border:1px solid var(--border); border-radius:7px; background:var(--surface-soft); }
.ledger-entry-thumb:hover { border-color:var(--accent); }
.ledger-entry-thumb img { display:block; width:100%; height:100%; object-fit:contain; }
.ledger-entry-images { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:6px; }
.ledger-entry-value { display:grid; justify-items:end; min-width:102px; text-align:right; }
.ledger-entry-value b { font-size:16px; overflow-wrap:anywhere; }
.ledger-entry-value b small { font-size:12px; font-weight:500; }
.ledger-income { color:var(--green); }
.ledger-entry-actions { display:flex; align-items:center; }
.ledger-entry-actions form { margin:0; }
.ledger-entry-edit,.ledger-entry-delete { display:inline-flex; align-items:center; justify-content:flex-end; min-height:28px; min-width:44px; font-size:13px; }
.ledger-entry-delete,.ledger-remove-pending { padding:0; border:0; background:transparent; color:var(--red); cursor:pointer; }
.ledger-entry-delete:hover,.ledger-remove-pending:hover { text-decoration:underline; }
@media (max-width:600px) {
  .ledger-entry { column-gap:10px; padding:12px 0; }
  .ledger-entry-value { min-width:86px; }
  .ledger-entry-edit,.ledger-entry-delete { min-height:44px; }
  .ledger-entry-thumb { width:44px; height:44px; }
}
.ledger-remove-image { display:inline-flex; align-items:center; min-height:44px; gap:6px; margin:0; }
.ledger-remove-image input { width:18px; min-height:18px; margin:0; }
.ledger-receipt-label { margin-bottom:8px; }
.ledger-receipt-label small { margin-left:3px; color:var(--muted); font-size:12px; }
.ledger-receipt-actions { position:relative; }
.ledger-receipt-choose { display:none; margin:0; cursor:pointer; background:var(--accent-soft); border-color:var(--accent-border); color:var(--accent-ink); font-weight:600; }
.ledger-receipt-choose::before { content:""; width:17px; height:17px; background:currentColor; -webkit-mask:url("/assets/icons/camera.svg") center/contain no-repeat; mask:url("/assets/icons/camera.svg") center/contain no-repeat; }
.ledger-receipt-choose:hover { background:var(--accent-soft-hover); }
.ledger-receipt[data-ready] .ledger-receipt-choose { display:inline-flex; }
.ledger-receipt[data-ready] input[type=file] { position:absolute; top:0; left:0; width:1px; height:1px; min-height:0; padding:0; margin:0; border:0; overflow:hidden; clip-path:inset(50%); }
.ledger-receipt:not([data-ready]) input[type=file] { margin:0; padding:0; border:0; background:transparent; }
.ledger-receipt input::file-selector-button { min-height:44px; padding:8px 15px; margin-right:10px; border:1px solid var(--accent-border); border-radius:10px; background:var(--accent-soft); color:var(--accent-ink); font:inherit; cursor:pointer; }
.ledger-receipt input[type=file]:focus-visible + .ledger-receipt-choose { outline:2px solid var(--focus); outline-offset:3px; }
.ledger-receipt [data-receipt-status] { overflow-wrap:anywhere; }
.ledger-receipt .fine { margin:8px 0; }
.ledger-receipt [hidden],.ledger-receipt [data-receipt-status]:empty { display:none; }
.ledger-receipt-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(72px,1fr)); gap:8px; }
.ledger-receipt-gallery:empty { display:none; }
.ledger-receipt-item { display:flex; flex-direction:column; align-items:center; min-width:0; }
.ledger-receipt-item a { width:100%; }
.ledger-receipt-preview { display:block; width:100%; height:72px; object-fit:contain; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }
.ledger-receipt-item:has(input:checked) img { opacity:.4; }
.ledger-remove-pending { min-width:44px; min-height:44px; font-size:13px; }
.earnings-composition-dialog { width:min(520px,calc(100% - 32px)); }
.finance-period-dialog { width:min(520px,calc(100% - 32px)); }
.finance-period-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.finance-period-form label { min-width:0; }
.finance-period-form .button { grid-column:1/-1; justify-self:end; min-width:100px; }
.earnings-daily-table { min-width:780px; }
.earnings-daily-table th,.earnings-daily-table td { padding:12px 10px; white-space:nowrap; }
.earnings-daily-table .badge { margin-left:6px; font-size:11px; }
.earnings-daily-table tfoot { border-top:1px solid var(--border); font-weight:600; }
.earnings-overview-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.electricity-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.electricity-actions .button { min-height:38px; padding:8px 14px; }
.electricity-period { margin:14px 0 24px; }
.electricity-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; }
.electricity-metrics > div { min-width:0; padding:0 20px; border-left:1px solid var(--line); }
.electricity-metrics > div:first-child { padding-left:0; border:0; }
.electricity-metrics dt { color:var(--muted); font-size:13px; }
.electricity-metrics dd { margin:8px 0 0; color:var(--nav); font-size:22px; font-weight:600; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.electricity-coverage { margin:20px 0 0; }
.electricity-details { width:min(100% - 32px,860px); }
.electricity-settings { width:min(100% - 32px,480px); }
.electricity-records { width:min(100% - 32px,1100px); }
.electricity-rules { margin-top:20px; color:var(--muted); font-size:13px; line-height:1.8; }
.electricity-rules summary { cursor:pointer; color:var(--accent-ink); width:fit-content; }
@media (max-width:600px) {
  .earnings-workspace { gap:14px; }
  .earnings-workspace .panel { padding:18px 16px; }
  .earnings-workspace > .earnings-summary { padding:16px 14px; }
  .earnings-report-heading { grid-template-columns:minmax(0,1fr); gap:10px; }
  .earnings-report-heading h2 { font-size:20px; }
  .earnings-actions { grid-row:2; justify-content:flex-start; }
  .earnings-actions .button { min-height:44px; }
  .earnings-applied-period { font-size:12px; }
  .finance-chart { margin-top:8px; }
  .finance-chart[data-chart-fill],.energy-chart { flex-basis:180px; min-height:180px; }
  .earnings-energy-heading { grid-template-columns:minmax(0,1fr) auto; gap:6px 8px; }
  .earnings-energy-heading .earnings-applied-period { grid-column:1 / -1; grid-row:2; }
  .earnings-energy-heading .energy-chart-unit { grid-column:2; }
  .earnings-detail-dialog,.earnings-composition-dialog,.finance-period-dialog,.electricity-details { width:calc(100% - 24px); }
  .finance-period-form { grid-template-columns:minmax(0,1fr); }
  .finance-period-form .button { width:100%; }
  .electricity-actions { width:100%; }
  .electricity-actions > .fine { width:100%; }
  .electricity-actions .button { min-height:44px; }
  .electricity-metrics { grid-template-columns:1fr; gap:18px; }
  .electricity-metrics > div { padding:18px 0 0; border-left:0; border-top:1px solid var(--line); }
  .electricity-metrics > div:first-child { padding-top:0; }
}

/* 机器筛选采用紧凑横排；手机继续移动同一表单到筛选弹窗。 */
.machine-filter-panel { padding:20px; }
.machine-filter-form.filter { display:grid; grid-template-columns:minmax(240px,2fr) repeat(3,minmax(120px,1fr)) auto auto; align-items:center; gap:12px; margin:0; }
.agent-management-filter.filter { grid-template-columns:minmax(240px,1fr) minmax(180px,240px) auto auto; }
.machine-filter-form.filter label { min-width:0; max-width:none; margin:0; }
.machine-filter-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.machine-filter-form input,.machine-filter-form select { height:44px; margin:0; padding:10px 12px; border-radius:8px; font-size:14px; }
.machine-filter-form .button { height:44px; padding:10px 16px; border-radius:8px; }
.machine-search-control { display:block; position:relative; }
.machine-search-control img { position:absolute; top:50%; left:12px; transform:translateY(-50%); opacity:.72; pointer-events:none; }
.machine-search-control input { padding-left:42px; }
@media (min-width:901px) and (max-width:1150px) {
  .machine-filter-form.filter { grid-template-columns:repeat(3,minmax(0,1fr)) auto auto; }
  .agent-management-filter.filter { grid-template-columns:minmax(0,1fr) auto auto; }
  .machine-filter-search { grid-column:1/-1; }
}

/* 机器按卡片排列；固定最小列宽，少量机器也不会拉伸成整行。 */
.machine-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr)); gap:16px; margin-bottom:20px; }
.machine-card { display:flex; flex-direction:column; padding:14px; margin:0; }
.machine-card-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 10px; }
.machine-card-title { display:flex; flex:1 1 150px; align-items:baseline; flex-wrap:wrap; gap:3px 8px; min-width:0; }
.machine-card-head h2 { min-width:0; margin:0; font-size:16px; line-height:1.4; letter-spacing:-.2px; overflow-wrap:anywhere; }
.machine-card-head h2 a { color:var(--nav); }
.machine-card-statuses { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; max-width:100%; margin-left:auto; }
.machine-card-statuses .badge { flex:none; }
.machine-card-warning { font-size:11px; line-height:1.4; font-weight:400; color:var(--amber); white-space:nowrap; }
.machine-card-gpu { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:start; margin:8px 0; padding:8px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.machine-card dt { font-size:12px; line-height:1.3; color:var(--muted); margin-bottom:2px; }
.machine-card dd { margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.machine-card-gpu dd { color:var(--nav); font-size:18px; font-weight:600; line-height:1.35; }
.machine-card-occupancy { text-align:right; }
.machine-card-occupancy dd { color:var(--accent-ink); }
.machine-card-occupancy small { font-size:12px; font-weight:400; white-space:nowrap; }
.machine-card-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.machine-card-details dd { font-size:13px; line-height:1.4; }
.machine-card-meta { grid-template-columns:minmax(0,.9fr) minmax(0,1.2fr); gap:4px 8px; margin-bottom:8px; }
.machine-card-meta > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:0 4px; min-width:0; }
.machine-card-meta dt { margin:0; white-space:nowrap; }
.machine-card-meta dt::after { content:"："; }
.machine-card-meta dd { min-width:0; }
.machine-card-meta small { font-size:11px; white-space:nowrap; }
.machine-verified { display:inline-flex; align-items:center; gap:6px; color:var(--green); }
/* 卡片监控与出租状态分开；旧采样不作为实时读数展示。 */
.machine-card-monitor { border-top:1px solid var(--line); padding-top:8px; margin-bottom:10px; }
.machine-card-monitor .machine-card-details { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; }
.machine-card-monitor dd { font-size:15px; line-height:1.35; color:var(--nav); }
.machine-card-monitor .machine-card-metrics { gap:0; }
.machine-card-metrics > div { position:relative; min-width:0; padding:8px 6px; }
.machine-card-metrics > div:nth-child(3n+1) { padding-left:0; }
.machine-card-metrics > div:nth-child(3n) { padding-right:0; }
.machine-card-metrics > div:not(:nth-child(3n))::after { content:""; position:absolute; right:0; top:8px; bottom:8px; width:1px; background:var(--line); }
.machine-card-metrics > div:nth-child(n+4) { border-top:1px solid var(--line); }
.machine-card-metrics dt { margin-bottom:5px; }
.machine-card-metrics dd { min-height:27px; font-size:16px; font-weight:500; font-variant-numeric:tabular-nums; }
.machine-card-metrics .machine-card-key-metric dt { color:var(--label); font-weight:600; }
.machine-card-metrics .machine-card-key-metric dd { color:var(--accent-ink); font-size:20px; font-weight:700; }
.machine-card-monitor p { margin:4px 0 0; font-size:11px; line-height:1.4; }
.machine-card-monitor p:empty { display:none; }
.machine-card-sample-meta { margin-top:6px; padding-top:6px; border-top:1px solid var(--line); }
.machine-card-sample-meta > p:first-child { margin-top:0; }
.machine-card-sample-times { display:flex; flex-wrap:wrap; column-gap:10px; }
.machine-card-sample-times p { white-space:nowrap; }
.machine-card-summary-group { margin-top:8px; padding-top:8px; border-top:1px solid var(--line); }
.machine-card-section-title { display:flex; justify-content:space-between; align-items:center; margin:0 0 4px; font-size:13px; line-height:1.4; font-weight:600; }
.machine-card-section-title span { color:var(--accent-ink); font-variant-numeric:tabular-nums; }
.machine-card-contracts { width:100%; table-layout:fixed; min-width:0; font-size:12px; }
.machine-card-contracts th, .machine-card-contracts td { padding:4px 0; text-align:center; font-size:12px; line-height:1.4; font-weight:400; font-variant-numeric:tabular-nums; }
.machine-card-contracts th { background:transparent; }
.machine-card-contracts th:first-child { width:23%; text-align:left; }
.machine-card-contracts thead th { color:var(--muted); font-size:11px; }
.machine-card-contracts tbody th { color:var(--ink); }
.machine-card-contracts tbody tr:last-child th { border-bottom:0; }
.machine-card-contracts tbody td:last-child { font-weight:600; }
.machine-card-earnings dd { color:var(--accent-ink); font-size:17px; font-weight:600; }
.machine-card-earnings dd[data-negative="true"] { color:var(--red); }
.machine-card-earnings p { margin-top:2px; }
@media (max-width:600px) {
  .machine-card-metrics dt { font-size:11px; }
  .machine-card-metrics dd { font-size:15px; min-height:25px; }
  .machine-card-metrics .machine-card-key-metric dd { font-size:18px; }
}
@media (max-width:370px) {
  .machine-card-metrics > div:not(:nth-child(3n+1)) { padding-left:3px; }
  .machine-card-metrics > div:not(:nth-child(3n)) { padding-right:3px; }
}
.machine-card-footer { margin-top:auto; }
.machine-card-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.machine-card-actions .button { min-width:0; min-height:32px; padding:5px 6px; font-size:12px; }
.machine-card-actions .button:first-child { background:var(--accent-soft); border-color:var(--accent-border); color:var(--accent-ink); }
.machine-card-actions .button:first-child:hover { background:var(--accent-soft-hover); }
/* 同排卡片共用八个内容行；异常说明增高时同步撑开对应区块，轮询无需测量或重排 DOM。 */
@supports (grid-template-rows:subgrid) {
  .machine-card { display:grid; grid-template-rows:subgrid; grid-row:span 8; row-gap:0; align-items:start; }
  .machine-card .machine-card-monitor { display:grid; grid-template-rows:subgrid; grid-row:span 4; row-gap:0; align-self:stretch; min-width:0; }
  .machine-card .machine-card-monitor { align-items:start; }
}
@media (max-width:900px) {
  .machine-card-actions .button { min-height:44px; }
}
.machine-empty { grid-column:1/-1; margin:0; }
.machine-grid + .pagination { margin-bottom:24px; position:relative; z-index:0; }

/* 经营总览：五项指标共用一条白色面板，通栏趋势与机器收益紧凑排列。 */
@media (min-width:901px) {
  .dashboard-page .workspace { padding-top:30px; }
}
.overview-metrics.panel { display:grid; grid-template-columns:1.2fr 1.1fr 1.1fr .95fr .9fr; padding:24px 32px; margin-bottom:20px; }
.overview-metrics .metric { padding:0 24px; }
.overview-metrics .metric:first-child { padding-left:0; }
.overview-metrics .metric:last-child { padding-right:0; }
.overview-metrics .metric-label { font-size:14px; line-height:1.5; margin-bottom:8px; }
.overview-metrics .metric-value { font-family:"Segoe UI","Aptos",sans-serif; font-size:32px; letter-spacing:-.5px; line-height:1.15; }
.overview-metrics .metric-value small { font-size:14px; white-space:nowrap; }
.overview-metrics .metric-note { font-size:13px; margin-top:6px; }
.overview-chart.panel,.overview-machines.panel { padding:22px 24px; margin-bottom:20px; }
.overview-chart .panel-head { gap:16px 24px; margin-bottom:16px; }
.overview-panel-title { display:flex; align-items:center; flex-wrap:wrap; gap:12px 24px; min-width:0; }
.overview-panel-title h2 { margin:0; font-size:20px; }
.overview-panel-title .fine { font-size:13px; }
.overview-period { font-size:14px; color:var(--muted); }
/* 仅总览使用纯色柱形；负收益继续使用共用图表的红色。 */
.overview-chart .chart-bar[fill^="url("] { fill:var(--accent); }
.overview-chart-legend { display:flex; justify-content:center; flex-wrap:wrap; gap:16px 36px; margin-top:2px; color:var(--muted); font-size:13px; }
.overview-chart-legend > span { display:inline-flex; align-items:center; gap:12px; }
.overview-chart-legend > span::before { content:""; width:14px; height:14px; border-radius:3px; background:var(--accent); }
.overview-machines .panel-head { gap:12px 20px; margin-bottom:18px; }
.overview-machines .heading-link { margin-left:auto; font-size:14px; }
.overview-machines table { min-width:680px; font-size:14px; }
.overview-machines th { font-size:13px; padding:13px 16px; }
.overview-machines td { padding:18px 16px; }
.overview-machines .number,.overview-machines .mono { font-family:inherit; font-variant-numeric:tabular-nums; }
.overview-machines .number { text-align:left; }
.overview-machines td.number { font-weight:600; }
@media (min-width:601px) and (max-width:1200px) {
  .overview-metrics.panel { grid-template-columns:repeat(6,minmax(0,1fr)); gap:22px 0; padding:24px; }
  .dashboard-page .overview-metrics .metric { grid-column:span 2; padding:0 20px; border-left:1px solid var(--line); }
  .overview-metrics .metric:nth-child(4),.overview-metrics .metric:nth-child(5) { grid-column:span 3; padding-top:18px; border-top:1px solid var(--line); }
  .overview-metrics .metric:nth-child(3) { padding-right:0; }
  .overview-metrics .metric:first-child,.overview-metrics .metric:nth-child(4) { padding-left:0; border-left:0; }
  .overview-metrics .metric-value { font-size:30px; }
}
@media (max-width:600px) {
  .overview-metrics.panel { grid-template-columns:repeat(2,minmax(0,1fr)); padding:18px; gap:16px 0; margin-bottom:18px; }
  .overview-metrics .metric { padding:16px 0 0; border-top:1px solid var(--line); border-left:0; }
  .overview-metrics .metric:first-child { grid-column:1/-1; border-top:0; padding-top:0; }
  .overview-metrics .metric:nth-child(3),.overview-metrics .metric:nth-child(5) { padding-left:16px; border-left:1px solid var(--line); }
  .overview-metrics .metric-label { font-size:13px; margin-bottom:8px; }
  .overview-metrics .metric-value { font-size:26px; letter-spacing:-.5px; }
  .overview-metrics .metric:first-child .metric-value { font-size:30px; }
  .overview-metrics .metric-value small { font-size:13px; }
  .overview-metrics .metric-note { font-size:12px; margin-top:6px; }
  .overview-chart.panel,.overview-machines.panel { padding:18px 14px; margin-bottom:18px; }
  .overview-panel-title { gap:8px 16px; }
  .overview-panel-title h2 { font-size:18px; }
  .overview-panel-title .fine { font-size:12px; }
  .overview-period { font-size:12px; }
  .overview-chart-legend { font-size:12px; gap:24px; }
  .overview-chart-legend > span { gap:8px; }
  .overview-machines .panel-head { align-items:flex-start; }
  .overview-machines .overview-panel-title { flex:1; flex-direction:column; align-items:flex-start; }
  .overview-machines .heading-link { min-height:44px; padding:8px 0; font-size:13px; }
}

/* 登录沿用浅灰背景、白色面板和蓝色操作色，保持居中单列表单。 */
.login-body { min-height:100svh; padding:clamp(40px,10.4vh,110px) 24px 60px; display:flex; flex-direction:column; align-items:center; background:var(--paper); color:var(--nav); }
.login-body::before,.login-body::after { content:none; }
.login-backdrop { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.login-backdrop::before { content:""; position:absolute; inset:0; background:var(--paper); }
.login-brand,.login-shell { position:relative; z-index:1; }
.login-brand { gap:20px; margin-bottom:clamp(48px,8.5vh,90px); font-size:28px; letter-spacing:1px; color:var(--nav); }
.login-brand .brand-mark { width:46px; height:46px; border-radius:13px; font-size:34px; }
.login-shell { width:min(584px,100%); padding:58px 53px 70px; border-radius:34px; background:var(--surface); box-shadow:var(--shadow-login); }
.login-shell h1 { margin:0 0 52px; text-align:center; font-size:40px; font-weight:600; letter-spacing:0; }
.login-shell label { margin-bottom:38px; font-size:20px; color:var(--label); }
.login-shell label:last-of-type { margin-bottom:0; }
.login-shell input { height:66px; padding:16px 23px; border-color:var(--border); border-radius:12px; background:var(--surface); font-size:20px; color:var(--ink); box-shadow:none; }
.login-shell input::placeholder { color:var(--placeholder); }
.login-shell input:hover { border-color:var(--border-hover); }
.login-shell input:focus { border-color:var(--focus); outline:2px solid var(--focus-ring); outline-offset:2px; background:var(--surface); box-shadow:none; }
/* 自动填充也沿用主题底色，焦点轮廓继续由上面的规则显示。 */
input:is(:-webkit-autofill,:autofill),.login-shell input:is(:-webkit-autofill,:autofill) { box-shadow:0 0 0 1000px var(--surface) inset; -webkit-text-fill-color:var(--ink); caret-color:var(--ink); }
.login-shell .button { width:100%; min-height:68px; margin-top:56px; border-radius:12px; border-color:var(--accent-ink); background:var(--accent); font-size:22px; font-weight:600; box-shadow:none; }
.login-shell .button:hover { background:var(--accent-hover); box-shadow:var(--shadow-hover); }
.login-shell .notice { margin:-24px 0 24px; font-size:14px; }

/* 窄屏导航回到文档流，宽表格只在容器内滚动。 */
@media (max-width:1200px) {
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:28px; }
  .metric:nth-child(odd) { border-left:0; padding-left:0; }
  .two-columns,.equal-columns { grid-template-columns:1fr; }
  .two-columns,.equal-columns { gap:0; }
  .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .sidebar { position:relative; inset:auto; width:100%; padding:18px 20px 12px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:18px; border-right:0; border-bottom:1px solid var(--sidebar-line); overflow:visible; }
  .sidebar .wordmark { margin:0; font-size:18px; gap:10px; }
  .sidebar .brand-mark { height:34px; width:34px; font-size:25px; border-radius:10px; }
  .sidebar nav { grid-column:1/-1; grid-row:2; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; }
  .nav-item { justify-content:center; gap:8px; min-height:44px; padding:10px 5px; font-size:14px; border-radius:8px; }
  .nav-item .ui-icon { width:17px; height:17px; }
  .nav-count { font-size:10px; min-width:16px; padding:1px 4px; margin-left:0; }
  .sidebar-account { margin:0; padding:0; border:0; }
  .workspace { margin:0; padding:28px 20px; }
  h1 { font-size:32px; letter-spacing:-.8px; }
}
@media (max-width:600px) {
  .sidebar nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sidebar { padding:14px 12px 10px; gap:14px 10px; }
  .sidebar .wordmark { font-size:16px; gap:8px; }
  .nav-item { gap:6px; font-size:12px; }
  .workspace { padding:26px 16px; }
  h1 { font-size:28px; }
  h2 { font-size:20px; }
  .heading-link { font-size:13px; }
  .metrics { row-gap:26px; margin-bottom:30px; }
  .metric { padding:0 16px; }
  .metric-label { font-size:14px; margin-bottom:14px; }
  .metric-value { font-size:32px; }
  .metric-value small { font-size:14px; }
  .metric-note { font-size:12px; }
  .panel { padding:20px 18px; border-radius:14px; margin-bottom:18px; }
  .panel-head { gap:10px; }
  .form-grid,.equal-columns .form-grid { grid-template-columns:1fr; }
  .detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .filter { gap:12px; }
  .filter label { min-width:125px; max-width:none; }
  .inline-form { flex-wrap:wrap; }
  .tabs { gap:8px; }
  .tabs a { padding:10px 12px; font-size:13px; }
  .chart { min-height:0; }
  .chart.empty { min-height:160px; }
}
@media (max-width:370px) {
  .sidebar .wordmark { font-size:14px; }
  .nav-item { gap:4px; font-size:11px; }
  .metric { padding-right:12px; }
  .metric-value { font-size:28px; }
}

/* 手机深色顶栏只留菜单、当前标题及必要操作；无脚本时原导航和筛选仍可直接使用。 */
@media (max-width:900px) {
  .workspace { padding-top:0; }
  .mobile-bar { position:sticky; top:0; z-index:21; display:grid; grid-template-columns:76px minmax(0,1fr) 76px; align-items:center; gap:8px; min-height:64px; padding:10px 20px; margin:0 -20px 24px; border-bottom:1px solid var(--sidebar-line); background:var(--sidebar); color:var(--sidebar-text); }
  .mobile-bar h1 { margin:0; font-size:20px; line-height:1.4; letter-spacing:0; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--white); }
  .mobile-bar .button { color:var(--sidebar-text); background:transparent; border-color:var(--sidebar-line); box-shadow:none; }
  .mobile-bar .button:hover { background:var(--sidebar-hover); }
  .mobile-bar :focus-visible { outline-color:var(--sidebar-focus); }
  .mobile-menu-button { width:44px; padding:10px; }
  .mobile-filter-button { justify-self:end; padding:10px 12px; gap:6px; }
  .mobile-bar .ui-icon { width:20px; height:20px; }
  .mobile-chrome-ready .sidebar,.mobile-chrome-ready .machine-filter-panel { display:none; }
  .mobile-chrome-ready .mobile-menu-dialog .sidebar { position:static; display:flex; flex-direction:column; align-items:stretch; gap:0; width:100%; min-height:100dvh; padding:var(--sidebar-brand-space) 0 22px; border:0; overflow:visible; }
  .mobile-menu-dialog .sidebar .wordmark { margin:0 28px var(--sidebar-brand-space); gap:12px; font-size:18px; }
  .mobile-menu-dialog .brand-mark { width:32px; height:32px; font-size:25px; }
  .mobile-menu-dialog .sidebar nav { display:block; }
  .mobile-menu-dialog .nav-item { position:relative; justify-content:flex-start; gap:20px; min-height:56px; margin:0 16px; padding:14px 12px; border-left:0; border-radius:8px; font-size:16px; }
  .mobile-menu-dialog .nav-item .ui-icon { width:24px; height:24px; }
  .mobile-menu-dialog .nav-item.active { position:relative; isolation:isolate; background:transparent; }
  .mobile-menu-dialog .nav-item.active::before { content:""; position:absolute; inset:0; z-index:-1; border-radius:8px; background:var(--sidebar-active); pointer-events:none; }
  .mobile-menu-dialog .sidebar-account { margin:auto 16px 0; padding:12px 0 0; border-top:1px solid var(--sidebar-line); }
  .mobile-menu-dialog .nav-count { position:absolute; right:8px; margin-left:0; }
  .mobile-chrome-ready .mobile-filter-dialog .machine-filter-panel { display:block; padding:0; margin:0; border:0; box-shadow:none; background:transparent; }
  .mobile-filter-dialog .filter { display:grid; grid-template-columns:1fr 1fr; gap:18px 12px; margin:0; }
  .mobile-filter-dialog .filter label { grid-column:1/-1; min-width:0; max-width:none; width:100%; }
  .machine-filter-form.filter { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
  .machine-filter-form.filter label { grid-column:1/-1; }
  .machine-filter-label { position:static; display:block; width:auto; height:auto; margin-bottom:6px; overflow:visible; clip-path:none; white-space:normal; font-size:13px; }
  .machine-filter-form input,.machine-filter-form select { height:48px; font-size:16px; }
  .machine-filter-form .button { width:100%; height:48px; }
  .mobile-filter-dialog { padding:20px; }
}
@media (max-width:600px) {
  .mobile-bar { padding-right:16px; padding-left:16px; margin-right:-16px; margin-left:-16px; margin-bottom:20px; }
}

/* 登录保留既有尺寸，独立适配手机及矮屏。 */
@media (max-width:760px) {
  .login-body { padding:56px 20px 40px; }
  .login-brand { margin-bottom:48px; gap:14px; font-size:23px; }
  .login-brand .brand-mark { width:40px; height:40px; font-size:29px; border-radius:11px; }
  .login-shell { max-width:460px; padding:38px 28px 42px; border-radius:28px; }
  .login-shell h1 { margin-bottom:36px; font-size:30px; }
  .login-shell label { margin-bottom:26px; font-size:16px; }
  .login-shell input { height:56px; padding:14px 16px; font-size:16px; }
  .login-shell .button { min-height:56px; margin-top:36px; font-size:18px; }
  .login-shell .notice { margin:-12px 0 22px; }
}
@media (min-width:761px) and (max-height:850px) {
  .login-body { padding-top:38px; padding-bottom:38px; }
  .login-brand { margin-bottom:36px; }
  .login-shell { padding-top:40px; padding-bottom:44px; }
  .login-shell h1 { margin-bottom:36px; }
  .login-shell label { margin-bottom:26px; }
  .login-shell .button { margin-top:36px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
@media print {
  body::before,.sidebar,.mobile-bar,.mobile-menu-dialog,.mobile-filter-dialog { display:none; }
  body { background:#fff; }
  .workspace { margin:0; padding:0; }
  .panel { background:#fff; border:1px solid var(--border); box-shadow:none; backdrop-filter:none; break-inside:avoid; }
}
/* Agent 管理沿用现有面板和表单；手机机器列表逐台堆叠。 */
.upgrade-confirm { display:flex; align-items:center; gap:10px; }
.upgrade-confirm input,.agent-management-table input[type="checkbox"] { width:auto; flex:0 0 auto; }
.upgrade-result-message { display:block; margin-top:4px; color:var(--muted); }
.upgrade-divider { border:0; border-top:1px solid var(--border); margin:20px 0; }
.agent-update-toolbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin-bottom:12px; }
.agent-update-toolbar label { min-width:200px; margin:0; }
.agent-update-selection { display:flex; align-items:center; gap:12px; }
.agent-update-selection [data-agent-selection-count] { white-space:nowrap; }
.agent-update-toolbar [data-agent-update-submit] { margin-left:auto; }
.agent-management-table td { vertical-align:top; }
.agent-management-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.agent-management-actions a { white-space:nowrap; }
.agent-management-actions .agent-revoke-link { color:var(--red); }
.agent-revoke-dialog { width:min(540px,calc(100% - 32px)); }
#vps-traffic { container-type:inline-size; }
.vps-entry { display:grid; grid-template-columns:minmax(0,1fr); gap:14px 12px; border-top:1px solid var(--line); padding:18px 0; }
.vps-entry:has(> form) { grid-template-columns:minmax(0,1fr) max-content; }
.vps-entry:last-child { padding-bottom:0; }
.vps-identity,.vps-readings { grid-column:1; }
.vps-identity { align-self:center; }
.vps-entry > form { grid-column:2; align-self:center; }
.vps-entry > form button { width:100%; }
.vps-entry > [data-vps-refresh] { align-self:end; }
.vps-identity h3 { margin:0; font-size:17px; overflow-wrap:anywhere; }
.vps-identity h3 small,.vps-readings dd small { color:var(--muted); font-size:12px; font-weight:500; }
.vps-identity h3 small { display:inline-block; margin-left:6px; }
.vps-expiry,.vps-expiry-reading { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.vps-expiry { margin-top:4px; font-size:13px; color:var(--muted); }
.vps-expiry time { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.vps-expiry .vps-due-today { color:var(--amber); }
.vps-expiry .vps-overdue { color:var(--red); }
.vps-expiry a { display:inline-flex; align-items:center; min-height:28px; }
.vps-readings { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) minmax(128px,1fr) minmax(160px,1.4fr); gap:16px; margin:0; }
.vps-readings > div { display:grid; grid-template-rows:subgrid; grid-row:span 2; row-gap:5px; min-width:0; }
.vps-readings dt,.vps-updated,.vps-cadence { color:var(--muted); font-size:12px; }
.vps-readings dt { align-self:start; line-height:1.5; }
.vps-cadence { margin:4px 0 0; }
.preference-tabs { display:flex; gap:8px; margin-bottom:20px; border-bottom:1px solid var(--border); }
.preference-tabs a { display:flex; align-items:center; justify-content:center; min-height:44px; padding:0 12px; border-bottom:2px solid transparent; color:var(--muted); white-space:nowrap; }
.preference-tabs a:hover { color:var(--accent-ink); text-decoration:none; }
.preference-tabs a[aria-selected="true"] { border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
@media (max-width:600px) { .preference-tabs { gap:0; } .preference-tabs a { flex:1; padding:0 4px; font-size:13px; } }
.notification-fields,.notification-topics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.notification-topics { margin:0 0 16px; padding:0; border:0; }
.notification-topics legend { margin-bottom:8px; font-weight:600; }
.notification-topics label { display:grid; grid-template-columns:auto 1fr; align-content:center; gap:2px 8px; min-height:44px; margin:0 0 6px; }
.notification-topics input { align-self:center; margin:0; }
.notification-topics small { grid-column:2; }
.notification-threshold { max-width:230px; }
.heat-subscriptions { min-width:0; margin:16px 0; padding:0; border:0; }
.heat-subscriptions legend { font-weight:600; }
.heat-limits { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); gap:4px 20px; max-width:660px; }
.heat-limits .heat-toggle { display:flex; align-items:center; gap:8px; min-height:44px; margin:0; }
.heat-toggle input { margin:0; }
.notification-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
@media (max-width:600px) { .notification-fields,.notification-topics { grid-template-columns:minmax(0,1fr); } }
.vps-readings dd { align-self:first baseline; margin:0; font-size:clamp(18px,2vw,23px); font-weight:600; line-height:1.3; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.vps-readings > div:nth-child(2) dd { color:var(--accent-ink); }
.vps-readings dd.vps-reset { font-size:16px; }
.vps-readings dd.vps-addresses { display:grid; gap:2px; font-size:14px; font-weight:500; }
[data-vps-refresh] .button { min-height:32px; padding:4px 10px; font-size:13px; }
.vps-updated { grid-column:1/-1; margin:0; line-height:1.6; }
.vps-updated span { color:var(--amber); margin-inline-start:8px; }
.vps-trend { grid-column:1/-1; min-width:0; margin:2px 0 0; padding-top:16px; border-top:1px solid var(--line); }
.vps-trend figcaption { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:8px 16px; }
.vps-trend h4 { margin:0; font-size:15px; }
.vps-trend p,.vps-forecast span { margin:4px 0 0; color:var(--muted); font-size:12px; }
.vps-forecast { display:flex; flex-wrap:wrap; gap:8px 24px; text-align:right; }
.vps-forecast strong { margin-left:6px; color:var(--accent-ink); font-size:18px; font-variant-numeric:tabular-nums; }
.vps-trend-grid { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:10px; row-gap:5px; margin:18px 0 8px; }
.vps-trend-y,.vps-trend-x { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.vps-trend-y { flex-direction:column; text-align:right; }
.vps-trend-x { grid-column:2; }
.vps-trend-plot { display:block; width:100%; height:144px; }
.vps-trend-rule { stroke:var(--line); stroke-dasharray:3 4; }
.vps-trend-plot rect { fill:var(--accent); }
.vps-trend-plot rect.is-selected { fill:var(--accent-ink); stroke:var(--accent-ink); stroke-width:2; vector-effect:non-scaling-stroke; }
.vps-trend-detail { font-variant-numeric:tabular-nums; }
.vps-trend .vps-trend-empty { padding:14px 0 4px; }
@container (max-width:520px) {
  .vps-trend figcaption { flex-direction:column; }
  .vps-forecast { text-align:left; }
  .vps-trend-plot { height:120px; }
}
#vps-connect,.vps-expiry-dialog { --admin-dialog-width:480px; width:min(480px,calc(100% - 32px)); }
@container (max-width:700px) {
  .vps-readings { grid-area:2/1/3/-1; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .vps-entry > [data-vps-refresh] { grid-row:2; }
}
@container (max-width:440px) {
  .vps-readings { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  [data-vps-refresh] .button,.vps-expiry a { min-height:44px; }
  .vps-updated span { display:block; margin:0; }
}
.agent-management-table td.agent-select-cell,.agent-management-table th.agent-select-cell { min-width:52px; width:52px; }
.agent-management-table td:nth-last-child(2) { max-width:280px; }
@media (max-width:600px) {
  .agent-update-toolbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .agent-update-toolbar label { grid-column:1/-1; min-width:0; }
  .agent-update-selection { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .agent-update-toolbar [data-agent-update-submit] { grid-column:1/-1; margin-left:0; }
  .agent-management-table,.agent-management-table tbody { display:block; width:100%; }
  .agent-management-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .agent-management-table tr { display:block; padding:12px 0; border-top:1px solid var(--line); }
  .agent-management-table td[data-label] { display:grid; grid-template-columns:76px minmax(0,1fr); gap:4px 12px; padding:7px 0; max-width:none; border:0; overflow-wrap:anywhere; }
  .agent-management-table td[data-label]::before { content:attr(data-label); grid-row:1/3; color:var(--muted); }
  .agent-management-table td[data-label] > * { min-width:0; }
  .agent-management-table td.agent-select-cell { width:auto; }
  .agent-management-table input[type="checkbox"] { justify-self:start; align-self:center; }
  .agent-management-table .upgrade-result-message { margin-top:0; }
}
