:root {
  --bg:#0b111a; --panel:#111c2a; --raised:#172434; --line:#26364b;
  --line-soft:#1d2b3e; --text:#e6edf7; --muted:#9aacc4; --faint:#7489a5;
  --teal:#79dfbe; --blue:#a3c1ff; --amber:#e8c17b; --red:#f79aa6;
  --radius:12px;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color-scheme:dark; font-synthesis:none;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-size:13px; line-height:1.55; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button,a { touch-action:manipulation; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.5; }
a { color:inherit; text-decoration:none; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:2px solid var(--teal); outline-offset:3px; }
input,select,textarea { min-width:0; border:1px solid #33465e; border-radius:8px; color:var(--text); background:#0d1723; padding:10px 11px; }
input::placeholder,textarea::placeholder { color:#778ba6; }
input[type=checkbox] { width:16px; height:16px; margin:0; accent-color:var(--teal); flex-shrink:0; }
select { padding-right:25px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:26px; line-height:1.3; letter-spacing:-.5px; font-weight:650; }
h2 { font-size:17px; font-weight:600; }
h3 { font-size:14px; font-weight:600; }
.icon { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.icon-library,.hidden { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; left:10px; top:-60px; z-index:100; background:var(--teal); color:#10251d; padding:10px; border-radius:6px; }
.skip-link:focus { top:10px; }
.mono { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.muted-text,.subtle { color:var(--muted); font-size:11px; }
.warning { color:var(--amber); } .danger { color:var(--red); } .accent { color:var(--teal); }

/* Navigation and page frame. */
.sidebar { position:fixed; inset:0 auto 0 0; width:208px; border-right:1px solid var(--line-soft); background:#0e1723; padding:28px 14px 22px; display:flex; flex-direction:column; z-index:20; }
.brand { display:flex; align-items:center; gap:10px; padding:0 5px; margin-bottom:38px; font-size:18px; font-weight:650; }
.brand small { display:block; color:var(--faint); font-size:7px; letter-spacing:.8px; margin-top:3px; font-weight:500; }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; border:1px solid #3b6658; border-radius:10px; color:#a6f3d7; background:#1c4438; }
.brand-mark .icon { width:22px; height:22px; }
.nav-label { margin:0 12px 10px; color:var(--faint); font-size:10px; letter-spacing:1px; }
.nav-item { width:100%; display:flex; align-items:center; gap:11px; padding:12px 11px; margin:3px 0; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); text-align:left; font-size:13px; }
.nav-item:hover { background:#172333; color:var(--text); }
.nav-item.active { background:#18372d; border-color:#305345; color:#a1eacd; }
.nav-count { margin-left:auto; min-width:21px; padding:1px 5px; text-align:center; border-radius:4px; font-size:10px; background:#294537; color:#b6edd6; }
.nav-count.warning { background:#3a3122; color:var(--amber); }
.sidebar-bottom { margin-top:auto; padding:18px 9px 0; color:var(--faint); font-size:11px; }
.sidebar-bottom p { margin:9px 0 15px; }
.sidebar-bottom>a { display:flex; justify-content:space-between; border-top:1px solid var(--line-soft); margin-top:12px; padding-top:14px; }
.connection-line { display:flex; align-items:center; gap:7px; color:var(--muted); }
.status-dot { display:inline-block; flex-shrink:0; width:6px; height:6px; border-radius:50%; background:var(--teal); }
.status-dot.offline,.status-dot.danger { background:var(--red); }
.status-dot.partial,.status-dot.warning { background:var(--amber); }
.status-dot.neutral { background:var(--faint); }
main { margin-left:208px; padding:26px 28px 22px; max-width:1920px; }
.page-header { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:20px; }
.eyebrow { font-size:10px; letter-spacing:.6px; color:var(--faint); margin-bottom:7px; }
.eyebrow span { color:var(--muted); }
.page-header p { margin-top:6px; color:var(--muted); font-size:12px; }
.header-actions { display:flex; align-items:center; gap:8px; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:1px solid transparent; border-radius:7px; padding:9px 12px; font-size:12px; line-height:1.4; font-weight:550; white-space:nowrap; }
.button .icon { width:15px; height:15px; }
.primary { color:#0e291f; background:var(--teal); border-color:var(--teal); }
.primary:hover { background:#a1efd3; }
.secondary { color:#c6d3e5; background:#172434; border-color:#34465c; }
.secondary:hover { background:#203248; border-color:#4e6684; }
.quiet { background:transparent; color:var(--muted); }
.quiet:hover { background:#1c2a3d; color:var(--text); }
.danger-text { color:var(--red); }
.danger-text:hover { background:#35232d; color:#ffd2d8; }
.danger-button { background:#a94455; color:white; border-color:#c15d6e; }
.danger-button:hover { background:#bf4e62; }
.small-button { font-size:11px; padding:6px 9px; }
.icon-button { display:grid; place-items:center; padding:7px; border:1px solid transparent; border-radius:7px; color:var(--muted); background:transparent; }
.icon-button:hover { background:#203046; color:var(--text); }
.summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.summary-card { min-width:0; width:100%; text-align:left; cursor:pointer; border:1px solid var(--line); border-radius:11px; padding:14px 16px; background:linear-gradient(125deg,#172535,#111c2a); transition:border-color .15s,background .15s,transform .1s; }
.summary-card:hover { border-color:#456180; background:linear-gradient(125deg,#1c2d40,#142233); }
.summary-card:active { transform:translateY(1px); }
.summary-card.active { border-color:var(--teal); box-shadow:0 0 0 1px #77d4b533 inset; }
.summary-top { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; }
.summary-top .icon { width:16px; height:16px; color:#7892b4; }
.summary-main { display:flex; align-items:baseline; gap:7px; margin-top:6px; }
.summary-value { font-size:28px; line-height:1.2; font-weight:600; font-variant-numeric:tabular-nums; }
.summary-unit { color:var(--faint); font-size:10px; }
.summary-foot { margin-top:6px; color:var(--faint); font-size:10px; }
body:not([data-view=overview]) .summary-card { padding:10px 14px; }
body:not([data-view=overview]) .summary-main { margin-top:2px; }
body:not([data-view=overview]) .summary-value { font-size:23px; }
body:not([data-view=overview]) .summary-foot { display:none; }
.workspace-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:13px; }
.view-heading { display:flex; align-items:center; gap:9px; }
.view-heading h2 { font-size:15px; }
#order-devices { margin-left:3px; }
.filters { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.search-box { display:flex; align-items:center; gap:7px; padding:0 10px; border:1px solid var(--line); border-radius:7px; color:var(--faint); background:#101a27; }
.search-box input { width:175px; padding:8px 0; background:transparent; border:0; font-size:11px; }
.search-box .icon { width:14px; height:14px; }
.filters select { max-width:178px; border-color:var(--line); background:#101a27; padding:8px 25px 8px 9px; font-size:11px; }
.filters .button { padding:8px; font-size:11px; }
.view-note { margin-bottom:12px; color:var(--muted); font-size:11px; }
.view-note details { border:1px solid var(--line); border-radius:8px; padding:8px 11px; background:#111d2a; }
.view-note summary { display:flex; align-items:center; gap:8px; cursor:pointer; list-style:none; }
.view-note summary::after { content:'说明'; margin-left:auto; font-size:10px; color:var(--faint); }
.view-note .icon { width:14px; height:14px; color:var(--blue); }
.view-note p { margin-top:10px; color:var(--muted); }

/* Device cards: resources, monitored applications and real cleaner receipts. */
.device-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; align-items:start; }
.device-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); }
.device-card:hover { border-color:#405874; }
.device-card.needs-attention { border-top-color:#c6a164; }
.device-card.offline { border-color:#75404d; }
.card-header { display:flex; align-items:flex-start; gap:9px; padding:14px 13px 12px; }
.device-avatar { width:32px; height:32px; display:grid; place-items:center; flex-shrink:0; border:1px solid #30475e; border-radius:8px; color:#a3bbd7; background:#1b2d40; }
.device-avatar.windows { background:#1b2d48; border-color:#36517a; color:#a5c4fa; }
.device-avatar .icon { width:17px; height:17px; }
.card-name { flex:1; min-width:0; }
.card-name h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.card-name p { margin-top:4px; color:var(--faint); font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.badge { display:inline-flex; align-items:center; gap:5px; padding:2px 6px; border:1px solid #315a49; border-radius:5px; font-size:10px; line-height:1.5; white-space:nowrap; color:#a3e6c9; background:#183a2f; }
.badge .status-dot { width:4px; height:4px; }
.badge.warning { color:var(--amber); border-color:#62502f; background:#382f21; }
.badge.danger { color:var(--red); border-color:#633947; background:#38232f; }
.badge.neutral { color:#a9bdd5; border-color:#354a65; background:#1c2b3e; }
.badge.blue,.layer-pill { color:#b0cafb; border:1px solid #354b6e; background:#1c2c45; }
.device-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:11px 13px; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); background:#101a27; }
.metric-title { color:#99acc5; font-size:10px; }
.metric-value { margin:3px 0 7px; font-size:23px; line-height:1.2; font-weight:550; font-variant-numeric:tabular-nums; }
.metric-value small { color:var(--faint); font-size:10px; margin-left:2px; font-weight:400; }
.meter { height:3px; border-radius:4px; background:#2a3b51; overflow:hidden; }
.meter-fill { height:100%; border-radius:4px; background:#77d4b5; }
.meter-fill.warning { background:#dbb569; } .meter-fill.danger { background:#e68998; }
.metric-description { margin-top:6px; color:var(--faint); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-height:14px; }
.project-area { padding:12px 13px; }
.project-area-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.project-area-heading .mini-label,.project-area-heading h3 { margin:0; }
.mini-label { color:var(--muted); font-size:10px; }
.mini-label span { color:var(--faint); margin-left:4px; }
.project-area-heading .button { font-size:10px; padding:3px; }
.project-area-heading .icon { width:12px; height:12px; }
.project-list { display:flex; align-items:center; flex-wrap:wrap; gap:5px; min-height:24px; }
.project-chip { display:inline-flex; align-items:center; gap:5px; max-width:100%; min-width:0; border:1px solid #2b4056; border-radius:5px; padding:4px 6px; background:#192a3c; color:#c8d8ea; font-size:10px; }
.project-chip:hover { border-color:#52755f; background:#203a32; }
.project-chip span:not(.status-dot) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-chip .status-dot { width:4px; height:4px; }
.project-chip small { font-size:9px; color:var(--red); }
.project-more { color:var(--teal); }
.cleaner-receipt { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; overflow:hidden; margin-top:12px; border:1px solid #2c4357; border-radius:8px; background:#2a3a4e; }
.cleaner-cell { min-width:0; padding:10px 11px; background:#142334; }
.cleaner-cell>span { display:block; color:var(--muted); font-size:10px; margin-bottom:4px; }
.cleaner-amount-history { color:var(--amber); font-size:inherit; margin-left:5px; }
.cleaner-cell strong { display:block; color:#e0ecfa; font-size:12px; font-weight:550; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.cleaner-cell.is-good strong { color:#9be5c4; }
.cleaner-cell.is-warning strong { color:var(--amber); }
.cleaner-cell.is-danger strong { color:#ff9a9a; }
.cleaner-history.is-danger { color:#ff9a9a; }
.cleaner-receipt.compact { margin-top:10px; border-color:#263c4f; }
.compact .cleaner-cell { padding:7px 8px; background:#132233; }
.compact .cleaner-cell>span { font-size:9px; margin-bottom:3px; }
.compact .cleaner-cell strong { font-size:10px; line-height:1.45; }
.cleaner-history { grid-column:1/-1; padding:4px 8px; color:var(--amber); background:#30291e; font-size:9px; }
.memory-receipt { margin-top:10px; padding:10px 12px; border:1px solid #2c4357; border-radius:8px; background:#142334; }
.memory-counts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.memory-stat { min-width:0; }
.memory-receipt span,.memory-receipt small { color:var(--muted); font-size:10px; }
.memory-stat>span,.memory-stat>strong { display:block; }
.memory-stat>strong { margin-top:4px; }
.memory-receipt strong { color:#d7f3e7; font-size:15px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.memory-receipt small { display:block; margin-top:5px; line-height:1.5; }
.memory-receipt .memory-history { color:var(--amber); }
.memory-total { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; border-top:1px solid var(--line); margin-top:10px; padding-top:8px; }
.memory-total.unavailable strong { color:var(--muted); font-size:11px; font-weight:400; }
.memory-receipt .memory-basis { color:var(--faint); font-size:9px; }
.memory-receipt.compact { padding:8px 10px; }
.memory-receipt.compact strong { font-size:12px; }
.memory-receipt.compact .memory-total.unavailable strong { font-size:10px; }
.card-footer { display:flex; align-items:center; justify-content:space-between; gap:7px; padding:8px 9px 8px 13px; border-top:1px solid var(--line-soft); }
.uptime { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:10px; white-space:nowrap; }
.uptime .icon { width:12px; height:12px; }
.card-actions { display:flex; align-items:center; gap:2px; }
.card-actions .button { font-size:10px; padding:5px 6px; }
.card-actions .icon-button { padding:5px; }
.card-actions .icon { width:13px; height:13px; }
.card-warning { display:flex; align-items:center; gap:6px; width:100%; padding:7px 13px; color:var(--amber); background:#30291e; border:0; border-top:1px solid #493d28; font-size:10px; text-align:left; cursor:pointer; }
.card-warning:hover { background:#3a3122; }
.card-warning>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-warning .icon { width:12px; height:12px; }
.card-warning .icon:last-child { margin-left:auto; }

/* Shared inventory and mobile records. */
.table-wrap { border:1px solid var(--line); border-radius:11px; overflow:auto; background:var(--panel); }
.audit-table { width:100%; border-collapse:collapse; text-align:left; white-space:nowrap; }
.audit-table th { padding:12px 13px; border-bottom:1px solid var(--line); background:#162435; color:#a7bad1; font-size:11px; font-weight:500; }
.audit-table td { padding:12px 13px; border-bottom:1px solid var(--line-soft); color:#c1d1e4; font-size:12px; vertical-align:middle; }
.audit-table tr:last-child td { border-bottom:0; }
.audit-table tbody tr:hover { background:#172739; }
.audit-table .name-cell { color:var(--text); font-weight:550; max-width:290px; overflow:hidden; text-overflow:ellipsis; }
.table-subtitle { display:block; color:var(--faint); font-size:10px; font-weight:400; margin-top:4px; max-width:290px; overflow:hidden; text-overflow:ellipsis; }
.table-device { display:flex; align-items:center; gap:6px; font-size:11px; color:#a8bdd8; }
.table-actions { display:flex; justify-content:flex-end; align-items:center; gap:4px; }
.truncate { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.port-number { font-size:15px; font-weight:600; color:#b2cdfb; }
.layer-pill { display:inline-block; padding:2px 6px; border-radius:5px; font-size:10px; white-space:nowrap; }
.owner-kind { color:var(--blue); font-size:9px; }
.expiry-number { color:var(--teal); font-size:16px; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.expiry-number.warning { color:var(--amber); } .expiry-number.danger { color:var(--red); } .expiry-number.neutral { color:var(--muted); font-size:12px; }
.expiry-number small { margin-left:4px; font-size:10px; font-weight:400; }
.mobile-record-list { display:grid; gap:10px; }
.mobile-record { min-width:0; padding:14px; background:var(--panel); border:1px solid var(--line); border-radius:10px; }
.mobile-record-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.mobile-record-heading h3 { min-width:0; font-size:13px; overflow-wrap:anywhere; }
.mobile-record-heading p { color:var(--faint); font-size:11px; margin-top:4px; overflow-wrap:anywhere; }
.record-meta { display:flex; flex-wrap:wrap; align-items:center; gap:7px 14px; color:var(--muted); font-size:11px; margin-top:10px; }
.record-projects,.record-path { color:#a1b7d2; font-size:11px; margin-top:9px; overflow-wrap:anywhere; }
.record-path { font-size:10px; }
.device-record .table-actions { margin-top:12px; border-top:1px solid var(--line-soft); padding-top:11px; justify-content:space-between; }
.device-record .table-actions .button { padding:7px 10px; font-size:11px; }
.certificate-owner { display:flex; align-items:center; gap:8px; margin-top:9px; color:var(--muted); font-size:11px; }
.certificate-expiry { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
.certificate-expiry>span:last-child { font-size:10px; color:var(--muted); }
.mobile-record-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding-top:10px; border-top:1px solid var(--line-soft); font-size:10px; color:var(--muted); }
.mobile-record-footer .truncate { min-width:0; flex:1; }
.port-record h3 { display:flex; align-items:center; gap:8px; }
.pagination { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:14px; font-size:10px; color:var(--muted); }
.pagination-buttons { display:flex; align-items:center; gap:5px; }
.pagination button { min-width:30px; height:29px; padding:0 8px; border:1px solid var(--line); border-radius:6px; background:#152131; color:var(--muted); font-size:11px; }
.pagination button.current { background:#254a3c; border-color:#416b58; color:#b7f1d8; }
.empty-state,.loading-state { display:flex; flex-direction:column; align-items:center; padding:52px 20px; border:1px dashed #344a65; border-radius:12px; background:#101a27; text-align:center; color:var(--muted); }
.empty-state>.icon { width:28px; height:28px; color:#7593b7; margin-bottom:13px; }
.empty-state h3 { font-size:14px; margin-bottom:7px; color:#cfdded; }
.empty-state p { max-width:430px; font-size:12px; }
.empty-state .button { margin-top:17px; }
.loading-state p { margin-top:12px; }
.page-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:20px; color:var(--faint); font-size:10px; }
.page-footer>span:last-child { display:flex; align-items:center; gap:6px; }

/* Actual scan lifecycle; no fabricated progress. */
.scan-progress { margin-bottom:14px; padding:11px 13px; border:1px solid #35516c; border-radius:9px; background:#142538; color:#c1d6ef; font-size:11px; }
.scan-progress-main { display:flex; align-items:center; gap:9px; }
.scan-progress-main>.icon { width:16px; height:16px; color:var(--amber); }
.scan-progress .spinner { width:14px; height:14px; }
.scan-start { margin-left:auto; font-size:10px; color:var(--faint); }
.scan-progress>p { margin-top:8px; color:var(--muted); }
.scan-progress details { margin-top:8px; }
.scan-progress summary { color:var(--muted); font-size:10px; cursor:pointer; }
.scan-device-list { display:flex; flex-wrap:wrap; gap:8px 20px; padding-top:9px; }
.scan-device-list>span { display:flex; align-items:center; gap:7px; }
.spinner { width:21px; height:21px; border:2px solid #315145; border-top-color:var(--teal); border-radius:50%; animation:spin 1s linear infinite; }
.spinning .icon { animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.notice { margin-bottom:15px; padding:11px 13px; border:1px solid #3b5b4b; border-radius:8px; background:#1b3229; color:#b6e5cd; white-space:pre-wrap; overflow-wrap:anywhere; font-size:11px; }
.notice.danger { background:#39242f; border-color:#70404d; color:#f5b1ba; }
.notice.warning { background:#342d21; border-color:#6c5834; color:#e9ce99; }
.notice.info { background:#1a2d43; border-color:#385778; color:#c1d7f1; }

/* Dialogs, onboarding and project selection. */
dialog { margin:auto; padding:0; border:1px solid #3a506b; background:#121f2e; color:var(--text); box-shadow:0 25px 100px #0008; }
dialog::backdrop { background:#020914b8; backdrop-filter:blur(3px); }
.modal { width:min(620px,calc(100% - 32px)); max-height:calc(100dvh - 40px); border-radius:14px; }
.modal form { display:flex; flex-direction:column; max-height:calc(100dvh - 42px); }
.modal-header { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:18px 22px; border-bottom:1px solid var(--line); }
.modal-header .eyebrow { margin-bottom:4px; }
.modal-header h2 { font-size:19px; }
.modal-body { padding:20px 22px; overflow-y:auto; }
.form-intro { margin-bottom:18px; font-size:12px; color:var(--muted); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 14px; }
.form-grid label,.form-label { display:flex; flex-direction:column; gap:7px; color:#c0d0e3; font-size:12px; }
.form-grid small { color:var(--faint); font-size:10px; }
.full-width { grid-column:1/-1; }
.checkbox-line { display:flex; align-items:center; gap:8px; margin-top:16px; color:var(--muted); font-size:11px; }
.modal-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 22px; border-top:1px solid var(--line); background:#111c29; }
.modal-footer-right { display:flex; gap:7px; }
.credential-note { color:var(--faint); font-size:10px; }
.advanced-settings { margin-top:20px; padding-top:15px; border-top:1px solid var(--line); }
.advanced-settings>summary { color:#b3c6de; font-size:12px; cursor:pointer; }
.advanced-settings>summary span { color:var(--faint); font-size:10px; margin-left:7px; }
.advanced-settings .form-grid { margin-top:17px; }
.advanced-settings #test-device { margin-top:17px; }
.device-modal .notice { margin:15px 0 0; }
.host-key-panel { margin-top:17px; padding:13px; border:1px solid #77613b; border-radius:8px; background:#302a21; color:#e5c688; font-size:12px; }
.host-key-panel p { margin:5px 0 10px; color:#c3b18f; font-size:11px; }
.host-key-panel code { display:block; font-size:11px; overflow-wrap:anywhere; }
.confirm-modal { max-width:480px; }
.confirm-modal .modal-body>p { color:#b7c8de; font-size:12px; line-height:1.8; }
.confirm-targets { list-style:none; margin:16px 0; padding:10px 13px; border:1px solid var(--line); border-radius:8px; background:#0f1a28; max-height:210px; overflow-y:auto; }
.confirm-targets li { display:flex; justify-content:space-between; gap:10px; padding:5px 0; font-size:12px; }
.confirm-targets li span { color:var(--faint); font-size:10px; }
.confirm-modal .notice { margin-top:15px; margin-bottom:0; }
.project-discovery-line { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:15px; color:var(--faint); font-size:11px; }
.project-search-label { display:block; color:var(--muted); font-size:11px; margin-bottom:6px; }
#project-search { width:100%; }
.project-picker-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; color:var(--muted); font-size:11px; }
.project-kind-filter { margin:0 0 15px; font-size:11px; color:var(--muted); }
.project-kind-filter label { display:flex; align-items:center; gap:8px; }
.candidate-group { margin-bottom:17px; }
.candidate-group>h3 { display:flex; align-items:center; gap:8px; margin-bottom:9px; font-size:12px; color:#b3c7e0; }
.candidate-group>h3>span { font-size:10px; color:var(--faint); }
.project-option { display:flex; align-items:center; gap:10px; padding:10px; margin-bottom:7px; border:1px solid var(--line); border-radius:8px; cursor:pointer; }
.project-option:has(input:checked) { border-color:#3c6b59; background:#18352c; }
.project-option-body { min-width:0; flex:1; }
.project-option-body strong { display:block; font-size:12px; overflow-wrap:anywhere; }
.project-option-body small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:var(--muted); font-size:10px; margin-top:3px; overflow-wrap:anywhere; }
.project-candidate-label { color:var(--faint); font-size:9px; white-space:nowrap; }
.project-candidate-label.warning { color:var(--amber); }
.picker-empty { padding:22px 12px; color:var(--muted); text-align:center; background:#0f1a27; border:1px dashed var(--line); border-radius:8px; font-size:12px; }
.advanced-candidate-note { margin-top:12px; }

/* Detail drawers preserve node identity across refreshes. */
.detail-drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(650px,100%); height:100dvh; max-width:100%; max-height:none; overflow-y:auto; border-radius:0; border-width:0 0 0 1px; }
.detail-drawer .modal-header { position:sticky; top:0; z-index:2; background:#121f2ef5; backdrop-filter:blur(6px); }
.drawer-section { padding:18px 22px; border-bottom:1px solid var(--line); }
.drawer-section h3 { font-size:14px; margin-bottom:12px; color:#c2d3e8; }
.drawer-section .device-metrics { padding:0; border:0; background:transparent; }
.drawer-summary-line { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; color:#b0c5e0; font-size:12px; }
.drawer-summary-line>span { display:flex; align-items:center; gap:5px; }
.drawer-summary-line .icon { width:13px; height:13px; }
.drawer-device-summary>p { margin-top:9px; color:var(--faint); font-size:10px; }
.detail-list { display:grid; grid-template-columns:105px minmax(0,1fr); gap:10px 12px; margin:0; font-size:12px; }
.detail-list dt { color:#91a8c4; }
.detail-list dd { margin:0; color:#d0dff0; overflow-wrap:anywhere; white-space:pre-wrap; }
.detail-item-top { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; }
.project-detail { border:1px solid var(--line); border-radius:10px; padding:14px; margin-bottom:11px; background:#101b29; scroll-margin-top:104px; }
.project-detail:last-child { margin-bottom:0; }
.project-detail p { color:var(--muted); font-size:11px; margin-top:10px; overflow-wrap:anywhere; white-space:pre-wrap; }
.section-explainer { color:var(--muted); font-size:11px; margin-bottom:13px; }
.technical-details,.run-evidence,.backup-receipt { margin-top:13px; border-top:1px solid var(--line); padding-top:11px; }
.technical-details summary,.run-evidence summary,.backup-receipt summary { cursor:pointer; color:#a5cfbd; font-size:11px; }
.technical-details summary .icon { width:14px; height:14px; vertical-align:middle; }
.technical-details .detail-list,.run-evidence .detail-list,.backup-receipt .detail-list { margin-top:14px; font-size:11px; }
.technical-details p,.run-evidence p,.backup-receipt p { color:var(--muted); font-size:11px; margin-top:12px; overflow-wrap:anywhere; }
.run-evidence pre { background:#0b1520; padding:10px; border-radius:7px; max-height:180px; overflow-y:auto; white-space:pre-wrap; overflow-wrap:anywhere; font-size:10px; color:#a9c3b6; }
.run-events { margin-top:12px; }
.run-event { padding:8px 0; border-bottom:1px solid var(--line-soft); color:var(--muted); font-size:10px; }
.receipt-details { margin-top:12px; padding:12px; background:#152739; border:1px solid var(--line); border-radius:8px; }
.cpu-context { margin:13px 0; padding:11px; border:1px solid var(--line); border-radius:8px; background:#102030; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.cpu-context small { display:block; margin-top:7px; font-size:10px; }
.cpu-context.warning { color:var(--amber); background:#302a20; }
.disk-inventory { display:grid; gap:10px; }
.disk-item { padding:12px; border:1px solid var(--line); border-radius:8px; background:#101b29; min-width:0; }
.disk-item-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; }
.disk-item-heading strong { color:var(--teal); font-weight:550; }
.disk-item-heading strong.warning { color:var(--amber); } .disk-item-heading strong.danger { color:var(--red); }
.disk-path { overflow-wrap:anywhere; min-width:0; }
.disk-capacity { margin:6px 0 10px; font-size:10px; color:var(--muted); }
.disk-device { margin-top:7px; font-size:9px; color:var(--faint); }
.audit-links { display:grid; gap:8px; }
.audit-shortcut { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:#132234; color:var(--muted); font-size:12px; }
.audit-shortcut>strong { margin-left:auto; color:#d0dff0; font-weight:550; }
.audit-shortcut .icon { width:15px; height:15px; }
.certificate-hero { display:flex; align-items:center; justify-content:space-between; }
.certificate-hero .expiry-number { font-size:25px; }
.related-observation { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid var(--line-soft); font-size:12px; }
.related-observation:last-child { border:0; }
.related-observation small { margin-left:auto; color:var(--faint); font-size:10px; }
.job-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--line-soft); font-size:12px; }
.job-row small { display:block; color:var(--muted); font-size:10px; margin-top:5px; }
.toast-region { position:fixed; right:22px; bottom:22px; z-index:100; display:flex; flex-direction:column; gap:8px; width:min(370px,calc(100% - 32px)); pointer-events:none; }
.toast { padding:13px 15px; border:1px solid #4a725d; border-radius:9px; background:#1b3b2e; color:#c9f0dc; box-shadow:0 9px 35px #0006; font-size:12px; pointer-events:auto; }
.toast.danger { background:#3e2632; border-color:#8a4e61; color:#ffd0d9; }
::-webkit-scrollbar { width:7px; height:7px; }
::-webkit-scrollbar-thumb { border-radius:10px; background:#344961; }
::-webkit-scrollbar-track { background:transparent; }

@media(min-width:1360px) { .device-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1200px) { .device-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } main { padding:24px 22px; } .sidebar { width:190px; } main { margin-left:190px; } .brand { font-size:16px; } .brand small { font-size:6px; } .filters { justify-content:flex-end; flex:1; } .search-box input { width:150px; } }
@media(max-width:900px) {
  .sidebar { width:72px; padding:23px 9px; } .brand { justify-content:center; margin:0 0 30px; padding:0; } .brand>span:last-child,.nav-label,.nav-item>span,.sidebar-bottom { display:none; }
  .nav-item { justify-content:center; padding:13px 9px; margin-bottom:7px; } .nav-item .icon { width:20px; height:20px; }
  main { margin-left:72px; padding:22px 18px; } .page-header h1 { font-size:24px; } .summary-grid { gap:9px; } .summary-card { padding:12px; } .summary-value { font-size:25px; }
  .view-heading { width:100%; } .filters { width:100%; justify-content:flex-start; } .search-box { flex:1; } .search-box input { width:100%; }
}
@media(max-width:600px) {
  .sidebar { inset:auto 0 0; width:auto; height:calc(62px + env(safe-area-inset-bottom)); padding:5px 5px calc(5px + env(safe-area-inset-bottom)); border-right:0; border-top:1px solid #35465b; background:#0f1b29f5; backdrop-filter:blur(10px); }
  .brand { display:none; } .sidebar nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); } .nav-item { flex-direction:column; gap:4px; padding:5px 3px; margin:0; border:0; border-radius:6px; font-size:9px; }
  .nav-item>span:not(.nav-count) { display:block; } .nav-item .icon { width:18px; height:18px; } .nav-item .nav-count { display:none; }
  main { margin-left:0; padding:18px 14px calc(88px + env(safe-area-inset-bottom)); } .page-header { align-items:flex-start; gap:10px; margin-bottom:16px; } .page-header h1 { font-size:23px; } .page-header p { font-size:11px; max-width:185px; } .page-header .eyebrow { font-size:9px; }
  .header-actions { padding-top:23px; gap:6px; } .header-actions .button { padding:8px; font-size:11px; } #scan-button span { display:none; } .header-actions .icon { width:14px; height:14px; }
  .summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:18px; } .summary-card { padding:11px 13px; } .summary-top { font-size:10px; } .summary-top .icon { width:14px; height:14px; } .summary-main { margin-top:4px; } .summary-value { font-size:25px; } .summary-foot { font-size:9px; margin-top:4px; }
  body:not([data-view=overview]) .summary-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; } body:not([data-view=overview]) .summary-card { padding:8px; border-radius:8px; } body:not([data-view=overview]) .summary-top { font-size:9px; } body:not([data-view=overview]) .summary-top .icon,body:not([data-view=overview]) .summary-unit { display:none; } body:not([data-view=overview]) .summary-value { font-size:22px; }
  .workspace-toolbar { margin-bottom:11px; gap:10px; } .filters { gap:6px; } .search-box { flex-basis:100%; } .filters select { flex:1; min-width:0; max-width:none; } .filters #reboot-all { padding:7px 4px; font-size:10px; }
  .device-grid { grid-template-columns:1fr; gap:11px; } .card-header { padding:13px 14px 11px; } .card-name h3 { font-size:14px; } .card-name p { font-size:11px; } .device-avatar { width:34px; height:34px; }
  .device-metrics { padding:11px 14px; gap:13px; } .metric-value { font-size:24px; } .metric-description { font-size:10px; } .project-area { padding:11px 14px; } .project-chip { font-size:11px; } .compact .cleaner-cell { padding:8px 10px; } .compact .cleaner-cell strong { font-size:11px; } .card-footer { padding:8px 10px 8px 14px; } .card-actions .button { font-size:11px; } .card-warning { padding-left:14px; }
  .view-note { font-size:10px; } .view-note details { padding:8px 10px; } .view-note summary::after { font-size:9px; }
  .page-footer { font-size:9px; align-items:flex-start; } .page-footer>span:first-child { max-width:225px; } .page-footer>span:last-child { white-space:nowrap; } .pagination { font-size:9px; } .pagination-buttons { gap:4px; }
  .modal { width:calc(100% - 24px); max-height:calc(100dvh - 24px); } .modal form { max-height:calc(100dvh - 26px); } .modal-header { padding:16px 18px; } .modal-header h2 { font-size:17px; } .modal-body { padding:17px 18px; } .modal-footer { padding:13px 18px; } .modal-footer .button { font-size:11px; padding:8px 10px; }
  .form-grid { gap:14px 11px; } .form-grid label { font-size:11px; } .basic-connection>label:first-child,.basic-connection>label:nth-child(2) { grid-column:1/-1; } .credential-note { font-size:9px; max-width:80px; } .advanced-settings>summary span { display:block; margin:4px 0 0 14px; }
  .project-discovery-line { font-size:10px; } .project-option { gap:8px; } .project-candidate-label { font-size:9px; } .candidate-group>h3 { font-size:11px; }
  .drawer-section { padding:17px 18px; } .detail-list { grid-template-columns:92px minmax(0,1fr); font-size:11px; } .drawer-section .header-actions { padding-top:0; } .drawer-summary-line { font-size:11px; gap:8px; } .cleaner-cell strong { font-size:11px; }
  .scan-start { display:none; } .scan-progress { font-size:10px; padding:9px 11px; } .toast-region { bottom:calc(78px + env(safe-area-inset-bottom)); right:16px; }
}
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { animation-duration:.01ms!important; transition:none!important; scroll-behavior:auto!important; } }

.device-order-list { list-style:none; padding:0; margin:14px 0 0; }
.device-order-list>li { display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--line); }
.order-position { flex:0 0 21px; color:var(--faint); font-size:11px; font-variant-numeric:tabular-nums; }
.order-device-name { min-width:0; flex:1; }
.order-device-name strong,.order-device-name small { display:block; overflow-wrap:anywhere; }
.order-device-name strong { font-size:12px; font-weight:500; }
.order-device-name small { color:var(--faint); font-size:10px; margin-top:4px; }
.order-actions { display:flex; flex-shrink:0; gap:6px; }
.order-actions .button { padding:6px 8px; min-height:34px; }
.order-loading { color:var(--muted); font-size:12px; }
@media (max-width:600px) {
  .order-modal .modal-body { padding-left:16px; padding-right:16px; }
  .device-order-list>li { gap:7px; }
  .order-actions { gap:4px; }
  .order-actions .button { padding:7px 6px; font-size:10px; min-height:36px; }
  .order-device-name strong { font-size:11px; }
  .order-position { flex-basis:16px; }
  #reset-device-order { font-size:10px; padding-left:0; padding-right:0; }
}
