/* Add by MHY, 暖白与青绿色的清晰运维界面，适配桌面和手机 */
:root{--bg:#f5f7f5;--card:#fff;--ink:#182d2a;--muted:#78837f;--accent:#087f6d;--border:#e3e9e5;--soft:#e6f3ee;--red:#b94c42}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:0.875rem/1.6 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}a{color:inherit;text-decoration:none}h1,h2,p{margin-top:0}h1{font-size:2rem;letter-spacing:-1px;margin-bottom:0.3125rem;font-weight:650}h2{font-size:1rem;font-weight:650;margin-bottom:0.875rem}small{font-size:0.625rem}.muted{color:var(--muted)}.accent{color:var(--accent)}.eyebrow{font-size:0.625rem;letter-spacing:2px;font-weight:600;color:var(--accent);margin-bottom:0.5625rem}.sidebar{position:fixed;inset:0 auto 0 0;width:15.25rem;background:#fbfcfa;border-right:1px solid var(--border);padding:2.25rem 1.375rem;display:flex;flex-direction:column}.brand{display:flex;gap:0.75rem;align-items:center;font-size:1.125rem;font-weight:700;line-height:1.4}.brand small{display:block;font-weight:500;font-size:0.5rem;letter-spacing:1.3px;color:var(--muted);margin-top:0.1875rem}.brandIcon{display:grid;place-items:center;width:2.375rem;height:2.375rem;background:var(--accent);border-radius:0.6875rem;color:#fff;font-size:1.5rem;font-weight:600}.navLabel{margin:3rem 0.875rem 0.75rem;color:#929a95;font-size:0.6875rem;letter-spacing:1px}.navItem{display:flex;align-items:center;gap:0.8125rem;border:0;background:transparent;color:#77837b;width:100%;padding:0.75rem 1rem;text-align:left;border-radius:0.5rem;margin:0.25rem 0;font-weight:550}.navItem span{font-size:1.3125rem;line-height:1}.navItem.active{background:var(--soft);color:var(--accent)}.navItem:hover{background:#edf2ef}.sidebarBottom{margin-top:auto;font-size:0.75rem;color:var(--ink);padding:1.125rem 0.75rem 0}.sidebarBottom p{color:var(--muted);font-size:0.625rem;margin:0.4375rem 0 1.25rem}.statusDot{display:inline-block;width:0.4375rem;height:0.4375rem;border-radius:50%;background:#159773;margin-right:0.3125rem}.statusDot.offline{background:#9ba5a0}main{margin-left:15.25rem;max-width:105rem;padding:2.375rem 2.625rem 1.125rem}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem}.headerRight{display:flex;gap:1.125rem;align-items:center;color:var(--muted);font-size:0.75rem}.primary,.secondary{padding:0.5625rem 1rem;border-radius:0.4375rem;font-weight:600}.primary{background:var(--accent);color:white;border:1px solid var(--accent)}.primary:hover{background:#076b5c}.secondary{border:1px solid var(--border);background:#fff;color:var(--ink)}.textButton{border:0;background:transparent;color:var(--muted);padding:0.3125rem}.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:1.125rem;margin-bottom:2rem}.summaryItem{padding:1.3125rem 1.5rem;border:1px solid var(--border);border-radius:0.6875rem;background:var(--card)}.summaryItem .label{font-size:0.75rem;color:var(--muted)}.summaryItem .number{font-size:1.875rem;font-weight:600;letter-spacing:-1px;margin:0.4375rem 0 2px;line-height:1.3}.summaryItem .number span{font-size:0.875rem;letter-spacing:0;margin-left:0.3125rem;color:var(--muted)}.summaryItem .caption{font-size:0.6875rem;color:var(--muted)}.sectionHeading{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;margin-bottom:0.9375rem}.sectionHeading h2{margin:0}.sectionHeading>span{font-size:0.6875rem}#hostCount{display:inline-block;margin-left:0.375rem;font-size:0.6875rem;color:var(--muted);font-weight:400}.hostGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.125rem}.card,.hostCard{background:var(--card);border:1px solid var(--border);border-radius:0.6875rem;padding:1.4375rem;margin-bottom:1.25rem}.hostCard{margin-bottom:0}.hostTop{display:flex;gap:0.625rem;align-items:center;margin-bottom:1.25rem}.hostIcon{width:2.375rem;height:2.375rem;display:grid;place-items:center;font-size:1.25rem;background:#f0f4f1;border-radius:0.5625rem;color:#617a6f}.hostName{font-weight:650;font-size:0.875rem}.hostKind{color:var(--muted);font-size:0.625rem}.pill{font-size:0.625rem;color:var(--accent);background:var(--soft);border-radius:0.25rem;padding:0.1875rem 0.4375rem;white-space:nowrap}.pill.offline{color:#8a9290;background:#edf0ee}.hostTop .pill{margin-left:auto}.resource{margin-bottom:0.6875rem}.resourceLine{display:flex;justify-content:space-between;margin-bottom:0.3125rem;font-size:0.6875rem;color:var(--muted)}.resourceLine strong{font-weight:550;color:var(--ink)}.meter{height:0.3125rem;background:#eef2ee;border-radius:0.375rem;overflow:hidden}.meter span{display:block;height:100%;width:0;background:#1d917d;border-radius:0.375rem}.meter.mem span{background:#9cc2a8}.meter.disk span{background:#bac8bf}.hostBottom{display:flex;justify-content:space-between;align-items:center;font-size:0.625rem;margin-top:1.0625rem;color:var(--muted);padding-top:0.8125rem;border-top:1px solid #f0f2ef}.bottomGrid{display:grid;grid-template-columns:1fr 1fr;gap:1.125rem;margin-top:1.625rem}.bottomGrid .card{margin-bottom:0}.bigValue{font-size:1.5625rem;font-weight:600;margin:0.625rem 0}.detailLine{display:flex;justify-content:space-between;color:var(--muted);font-size:0.75rem;margin:0.5rem 0}.detailLine strong{color:var(--ink);font-weight:500}.tableWrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:0.6875rem;font-weight:500;color:var(--muted);padding:0.625rem 0.75rem;border-bottom:1px solid var(--border)}td{padding:1.0625rem 0.75rem;border-bottom:1px solid #f0f2ef;font-size:0.75rem}td button{margin-right:0.5rem;border:0;background:transparent;font-size:0.6875rem;color:var(--accent);padding:0.1875rem}.danger{color:var(--red)!important}.historyFilters{display:flex;gap:1.25rem;margin-bottom:1.875rem}.historyFilters label{min-width:12.5rem}.chartTitle{display:flex;justify-content:space-between;margin:1.25rem 0 0.625rem}.chartTitle span{font-size:0.6875rem}canvas{display:block;width:100%;height:16.25rem}#networkChart{height:14.375rem}.historyStats{display:flex;gap:2.1875rem;margin:1.375rem 0}.historyStats strong{display:block;font-size:1.375rem;font-weight:550}.event{display:flex;gap:1rem;justify-content:space-between;padding:0.75rem 0;border-bottom:1px solid #edf1ed;font-size:0.75rem}.event .muted{font-size:0.6875rem}footer{display:flex;justify-content:space-between;color:#929a95;font-size:0.625rem;margin-top:2rem;border-top:1px solid var(--border);padding-top:1.125rem}.notice{padding:0.75rem 1rem;color:#53695d;background:#e7f0e8;border-radius:0.5rem}.empty{padding:2rem 0;color:var(--muted);text-align:center}.login{min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 30% 15%,#e1efe6,transparent 60%),var(--bg);padding:1.875rem}.loginCard{width:100%;max-width:26.5625rem;padding:2.375rem;background:#ffffffd9;border:1px solid var(--border);border-radius:1rem}.loginCard .brandIcon{margin-bottom:2.375rem}.loginCard h1{font-size:1.8125rem}.loginCard .muted{font-size:0.75rem}.loginCard form{margin-top:1.875rem}label{display:block;font-size:0.75rem;color:#617268}input,select{display:block;width:100%;padding:0.625rem 0.75rem;margin:0.375rem 0 1.125rem;border:1px solid #dce5de;border-radius:0.375rem;color:var(--ink);background:white}input:focus,select:focus{outline:2px solid #acd8c8;outline-offset:1px}button:focus-visible{outline:2px solid #60b9a4;outline-offset:2px}.loginCard button{width:100%;display:flex;justify-content:space-between}.loginFoot{border-top:1px solid var(--border);margin-top:2rem;padding-top:1.125rem;color:var(--muted);font-size:0.625rem}#loginError,#deviceError{font-size:0.75rem;color:var(--red)}dialog{border:1px solid var(--border);border-radius:0.75rem;padding:1.75rem;max-width:33.75rem;width:calc(100% - 2.5rem);color:var(--ink)}dialog::backdrop{background:#132c2466;backdrop-filter:blur(0.1875rem)}.dialogActions{display:flex;justify-content:flex-end;gap:0.625rem;margin-top:1.5rem}.sensorRow{display:flex;justify-content:space-between;padding:0.5rem 0;border-bottom:1px solid var(--border);gap:1rem;font-size:0.75rem}.sensorRow span:first-child{overflow-wrap:anywhere}[hidden]{display:none!important}@media(min-width:1600px){.hostGrid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1150px){.sidebar{width:12.8125rem;padding:1.875rem 0.9375rem}main{margin-left:12.8125rem;padding:1.875rem 1.5625rem}.hostGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary{gap:0.625rem}.summaryItem{padding:1.125rem 0.9375rem}.brand{font-size:1rem}.headerRight>span{display:none}}@media(max-width:720px){.sidebar{position:static;width:100%;padding:1rem 1.25rem;border-right:0;border-bottom:1px solid var(--border)}.brand small,.navLabel,.sidebarBottom{display:none}nav{display:flex;margin-top:0.9375rem;gap:0.25rem}.navItem{padding:0.5625rem 0.4375rem;justify-content:center;font-size:0.6875rem;gap:0.375rem}.navItem span{font-size:1rem}main{margin-left:0;padding:1.5625rem 1.125rem}h1{font-size:1.625rem}.summary{grid-template-columns:repeat(2,1fr)}.hostGrid{grid-template-columns:1fr}.bottomGrid{grid-template-columns:1fr}.historyFilters{gap:0.625rem}.historyFilters label{min-width:0;flex:1}.sectionHeading>.muted{display:none}.historyStats{gap:1.25rem}.historyStats strong{font-size:1.0625rem}.loginCard{padding:1.75rem}.event{flex-direction:column;gap:0.1875rem}footer{gap:0.75rem}}

#trafficChart{height:10rem}#qrContent{text-align:center}#qrContent img{max-width:100%;height:auto}

#sensorChart{height:14.375rem}

/* Add by MHY, 规则文本编辑与生效预览，适配长列表和手机 */
.ruleToolbar{display:flex;justify-content:space-between;gap:0.75rem;align-items:center;margin:1.375rem 0 0.875rem}.ruleTabs{display:flex;gap:0.3125rem;flex-wrap:wrap}.ruleTabs button{border:1px solid var(--border);background:#fff;padding:0.4375rem 0.75rem;border-radius:0.375rem;color:var(--muted);font-size:0.75rem}.ruleTabs button.active{background:var(--soft);color:var(--accent);border-color:#c2dfd3}.rulePreview{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f8f5;border:1px solid var(--border);border-radius:0.4375rem;padding:1.125rem;font:0.75rem/1.8 ui-monospace,Consolas,monospace;max-height:26.875rem;overflow:auto}.editorShell{display:flex;border:1px solid #ccd8d0;border-radius:0.4375rem;overflow:hidden;background:#fdfefd;height:22.5rem}.editorShell pre{width:2.625rem;flex-shrink:0;margin:0;padding:0.875rem 0.5625rem;text-align:right;overflow:hidden;color:#a1aca4;background:#f0f4f0;font:0.75rem/1.8 ui-monospace,Consolas,monospace}.editorShell textarea{width:100%;resize:none;border:0;outline:0;padding:0.875rem;margin:0;background:transparent;color:#264438;font:0.75rem/1.8 ui-monospace,Consolas,monospace;white-space:pre;overflow:auto;tab-size:2}.ruleActions{display:flex;gap:0.625rem;justify-content:flex-end;margin:1.125rem 0;flex-wrap:wrap}#ruleValidation{font-size:0.75rem;color:var(--accent)}#ruleHelp{font-size:0.6875rem;margin-top:0.5625rem}#usageDialog{max-width:48.75rem;max-height:85dvh;overflow:auto}#usageChart{height:14.375rem}td .muted{font-size:0.625rem}@media(max-width:720px){.ruleToolbar{align-items:flex-start;flex-direction:column}.ruleActions{justify-content:flex-start}}

/* Add by MHY, 分类策略与分页规则集预览 */
.ruleCatalogue{margin:1.125rem 0;border-top:1px solid var(--border,#293448);padding-top:0.875rem}.ruleCatalogue summary{cursor:pointer;font-weight:600}.providerFilters{display:flex;gap:0.75rem;align-items:end;flex-wrap:wrap;margin:1rem 0}.providerFilters label{flex:1;min-width:12.5rem}.providerFilters select,.providerFilters input{width:100%}.groupGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(12.5rem,1fr));gap:0.75rem;margin-top:0.875rem}.groupGrid label{display:grid;gap:0.375rem}.ruleCatalogue .rulePreview{max-height:22.5rem;overflow:auto}

/* Add by MHY, 主机卡片整块导航与资源环图，保持原有暖白青绿风格 */
.hostCard{position:relative;transition:box-shadow .18s,border-color .18s,transform .18s}.hostCard:hover{border-color:#b8d8ca;box-shadow:0 0.5rem 1.375rem rgba(22,72,52,.07);transform:translateY(-2px)}.hostCardLink::after{content:"";position:absolute;inset:0;border-radius:inherit}.hostCardLink:focus-visible{outline:none}.hostCard:has(.hostCardLink:focus-visible){outline:2px solid var(--accent);outline-offset:0.25rem}.hostCard [data-sensors]{position:relative;z-index:1}.hostTrendHint{display:flex;justify-content:space-between;margin-top:1rem;padding-top:0.75rem;border-top:1px solid var(--border);font-size:0.6875rem;color:var(--accent)}
.historyNavigation{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;flex-wrap:wrap;margin-bottom:1.375rem}.historyNavigation .historyFilters{margin:0;gap:0.875rem}.historyNavigation label{font-size:0.6875rem;color:var(--muted);min-width:11.875rem}.historyNavigation select{margin-top:0.3125rem;background:var(--card)}.hostDetail{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;margin:0.75rem 0 1.375rem;padding:1.5rem 0.25rem}.hostDetail h2{font-size:1.6875rem;font-weight:600;letter-spacing:-.6px;margin-bottom:0.4375rem}.hostDetail .eyebrow{margin-bottom:0.625rem}.hostDetail p{margin-bottom:0}.hostDetailStatus{display:flex;flex-direction:column;align-items:flex-end;gap:0.375rem;font-size:0.6875rem}.hostDetailStatus .pill{margin-bottom:0.25rem}
.resourceGauges{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1.5rem}.gaugeCard{min-width:0;padding:1.375rem;display:flex;flex-direction:column;align-items:flex-start;margin:0;justify-content:space-between;gap:1.125rem}.metricLabel{font-size:0.75rem;font-weight:600;color:var(--ink);margin-bottom:0.5rem;letter-spacing:.2px}.metricDetail{font-size:0.6875rem;line-height:1.7;color:var(--muted);margin-bottom:0}.gauge{position:relative;width:7.25rem;height:7.25rem;align-self:center;flex-shrink:0}.gauge svg{width:100%;height:100%;overflow:visible}.gaugeTrack,.gaugeFill{fill:none;stroke-width:8}.gaugeTrack{stroke:#edf2ef}.gaugeFill{stroke:var(--accent);stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%;transform-box:view-box}.memGauge .gaugeFill{stroke:#638cb2}.diskGauge .gaugeFill{stroke:#c49b67}.gaugeCritical .gaugeFill{stroke:#bd6e54}.gaugeValue{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:1.6875rem;font-weight:550;letter-spacing:-1px}.gaugeValue small{font-size:0.75rem;align-self:center;margin-top:0.375rem;margin-left:1px;color:var(--muted);letter-spacing:0}
.networkGauge{background:linear-gradient(145deg,#fff 20%,#f1f8f5)}.liveNetwork{display:grid;gap:1.125rem;align-self:stretch;margin-top:2px}.liveNetwork>div{display:flex;gap:0.75rem;align-items:center}.networkArrow{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:#e6f3ee;color:var(--accent);font-size:1.1875rem}.uploadArrow{background:#eaf0f8;color:#6e86ba}.liveNetwork small{font-size:0.625rem;color:var(--muted);display:block}.liveNetwork strong{font-size:1.3125rem;font-weight:550;letter-spacing:-.5px;white-space:nowrap}.liveNetwork strong small{display:inline;font-size:0.625rem;margin-left:0.1875rem;letter-spacing:0}
.historyChartGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem}.chartCard{min-width:0;margin-bottom:1.25rem;padding:1.5rem}.chartCard h2{font-size:0.875rem;margin-bottom:0}.chartCard canvas{display:block;width:100%;margin:0.375rem 0 0}.chartCard>.muted{font-size:0.6875rem;margin:0.625rem 0}.chartTitle{gap:0.75rem;align-items:center}.chartTitle p{margin:0.375rem 0 0;font-size:0.6875rem}.chartLegend{display:flex;align-items:center;gap:0.375rem;white-space:nowrap;font-size:0.6875rem;color:var(--muted)}.legendDot{display:inline-block;flex-shrink:0;width:0.4375rem;height:0.4375rem;border-radius:50%;background:var(--accent)}.memoryDot{background:#638cb2}.uploadDot{background:#6e86ba;margin-left:0.625rem}.historyStats{display:flex;gap:2.25rem;margin:1.5rem 0 0.875rem}.historyStats>div{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:0.4375rem;row-gap:0.25rem;font-size:0.6875rem;color:var(--muted)}.historyStats strong{grid-column:2;font-size:1.4375rem;color:var(--ink);font-weight:550;letter-spacing:-.6px;margin:0}.historyStats .uploadDot{margin-left:0}.sensorSelect{max-width:27.5rem;font-size:0.6875rem;color:var(--muted);margin:1.25rem 0 0.5rem}.historyFootnote{font-size:0.6875rem;text-align:center;line-height:1.8;margin-top:0}
@media(min-width:1450px){.gaugeCard:not(.networkGauge){flex-direction:row;align-items:center}.gaugeCard{padding:1.5rem}.gauge{width:6.5rem;height:6.5rem}.gaugeValue{font-size:1.5rem}}
@media(max-width:1150px){.resourceGauges{grid-template-columns:repeat(2,minmax(0,1fr))}.gaugeCard:not(.networkGauge){flex-direction:row;align-items:center}.networkGauge{display:block}.liveNetwork{display:flex;flex-wrap:wrap;gap:1.25rem;margin:1rem 0}.historyChartGrid{grid-template-columns:1fr}}
@media(max-width:600px){.historyNavigation{gap:0.875rem}.historyNavigation .historyFilters{width:100%;flex-wrap:wrap}.historyNavigation label{min-width:0;flex:1}.hostDetail{align-items:flex-start;padding:0.625rem 0;gap:0.75rem}.hostDetail h2{font-size:1.3125rem}.hostDetailStatus{font-size:0.625rem;max-width:9.0625rem}.resourceGauges{gap:0.625rem}.gaugeCard{padding:1rem;gap:0.875rem}.gaugeCard:not(.networkGauge){flex-direction:column;align-items:flex-start}.gauge{width:6.125rem;height:6.125rem;align-self:center}.gaugeValue{font-size:1.4375rem}.metricLabel{font-size:0.6875rem}.metricDetail{font-size:0.625rem}.liveNetwork{display:grid;gap:0.625rem;margin:0.75rem 0}.liveNetwork strong{font-size:1rem}.networkArrow{width:1.625rem;height:1.625rem;font-size:1rem}.chartCard{padding:1.125rem}.chartLegend{font-size:0.625rem}.historyStats{gap:1.625rem}.historyStats strong{font-size:1.25rem}.hostDetailStatus .pill{font-size:0.625rem}.historyNavigation select{font-size:0.75rem;padding:0.5625rem}.historyFootnote{text-align:left}}
@media(prefers-reduced-motion:reduce){.hostCard{transition:none}.hostCard:hover{transform:none}}
/* Add by MHY, 曲线读数支持指针悬停与键盘左右查看 */
.chartFrame{position:relative}.chartTooltip{position:absolute;top:0.25rem;z-index:2;pointer-events:none;padding:0.625rem 0.8125rem;min-width:9.375rem;border:1px solid var(--border);border-radius:0.625rem;background:rgba(255,255,255,.97);box-shadow:0 0.3125rem 1.125rem rgba(30,66,51,.1);font-size:0.6875rem;color:var(--muted)}.chartTooltip strong{display:block;font-weight:500;color:var(--ink);margin-bottom:0.3125rem}.chartTooltip span{display:flex;justify-content:space-between;gap:1.125rem}.chartTooltip b{color:var(--ink);font-weight:500}.chartFrame canvas:focus-visible{outline:2px solid #aad3c2;outline-offset:0.1875rem;border-radius:0.375rem}header h1{overflow-wrap:anywhere}

.hostGridHint{font-size:0.6875rem;margin:0.875rem 0 1.5rem;line-height:1.8}
/* Add by MHY, 账户设置和一次性恢复码适配窄屏，密钥不被长字符串撑破布局 */
.securitySummary{display:flex;justify-content:space-between;gap:1.5rem;align-items:center;background:linear-gradient(115deg,#fff,#eff8f3)}.securitySummary h2{font-size:1.4375rem;margin-bottom:0.5rem}.securitySummary p{margin-bottom:0}.securitySummary>.pill{flex-shrink:0}.securityGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem}.securityGrid .card{min-width:0}.securityGrid form{margin-top:1.25rem}.securityCredentialRow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.125rem}.securitySession{display:flex;justify-content:space-between;gap:1.375rem;border-bottom:1px solid var(--border);padding:1rem 0}.securitySession>div{min-width:0}.securitySession p{font-size:0.625rem;overflow-wrap:anywhere;margin:0.3125rem 0 0}.securitySession>div:last-child{font-size:0.6875rem;flex-shrink:0}.totpQr{display:flex;justify-content:center;background:#fff;margin:1.125rem 0}.totpQr img{max-width:100%;height:auto}.securityGrid details{margin-bottom:1.125rem}.securityGrid code{display:block;font-size:0.75rem;overflow-wrap:anywhere;margin-top:0.625rem;padding:0.75rem;background:var(--soft);border-radius:0.375rem}.recoveryCodes{font-size:0.75rem;overflow-wrap:anywhere;white-space:pre-wrap;background:var(--soft);padding:1rem;border-radius:0.625rem}#recoveryDialog .serviceCheck{margin:1.125rem 0}#toggleRecovery{font-size:0.6875rem;margin:-0.3125rem 0 0.75rem}
@media(max-width:700px){.securityGrid{grid-template-columns:1fr;gap:0}.securitySummary{align-items:flex-start;gap:0.75rem;padding:1.25rem}.securitySummary h2{font-size:1.125rem}.securitySummary p{font-size:0.6875rem}.securityCredentialRow{grid-template-columns:1fr;gap:0}.securitySession{flex-direction:column;gap:0.375rem}.recoveryCodes{font-size:0.625rem;padding:0.75rem}}
/* Add by MHY, 服务管理延续主机卡片的色彩，控制台与高影响确认适配移动屏幕 */
.serviceProvider{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;background:linear-gradient(115deg,#fff,#eff8f3)}.serviceProvider h2{font-size:1.4375rem;margin-bottom:0.5rem}.serviceProvider p{margin-bottom:0}.serviceProviderSummary{display:flex;flex-direction:column;align-items:flex-end;gap:0.5rem;flex-shrink:0}.serviceProviderSummary strong{font-size:1.8125rem;font-weight:550}.serviceProviderSummary small{font-size:0.75rem;color:var(--muted);font-weight:400}.serviceToolbar{display:flex;justify-content:space-between;align-items:center;gap:1.125rem;margin:1.5625rem 0}.serviceToolbar label{margin:0;max-width:14.375rem}.serviceTabs{display:flex;gap:0.375rem;flex-wrap:wrap}.serviceTabs button{border:1px solid transparent;background:transparent;color:var(--muted);border-radius:0.5rem;padding:0.5625rem 0.8125rem}.serviceTabs button.active{background:var(--soft);border-color:#cce6dc;color:var(--accent)}.serviceGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(18.125rem,1fr));gap:1.125rem}.serviceCard{margin:0;padding:1.375rem;min-width:0}.serviceCardTop{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem}.serviceIcon{display:grid;place-items:center;width:2.375rem;height:2.375rem;border-radius:0.6875rem;font-size:1.5rem;color:#638cb2;background:#edf2f8}.serviceIcon.network{color:var(--accent);background:var(--soft)}.serviceIcon.script{color:#a78249;background:#f7f2e8;font-size:1.125rem}.serviceName{font-size:1.125rem;font-weight:550;text-align:left;overflow-wrap:anywhere;color:var(--ink);padding:0}.serviceCard h2{margin-bottom:0.625rem}.serviceCard .eyebrow{font-size:0.5625rem;margin-bottom:0.5rem}.servicePolicyText{font-size:0.6875rem}.serviceMeta{display:flex;justify-content:space-between;color:var(--muted);font-size:0.625rem;margin:1.125rem 0 1rem}.serviceCardActions{display:flex;align-items:center;gap:0.4375rem;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:1rem}.serviceCardActions .secondary{padding:0.375rem 0.75rem;font-size:0.6875rem}.serviceCardActions .textButton{margin-left:auto;font-size:0.6875rem}.serviceFootnote{font-size:0.6875rem;margin-top:1.125rem}.serviceDialog{width:min(53.75rem,calc(100vw - 1.75rem));max-height:calc(100vh - 2.25rem);overflow:auto}.serviceDialog h2{margin:0}.serviceDetailMetrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1.125rem}.serviceDetailMetrics small{display:block;color:var(--muted);font-size:0.625rem;margin-bottom:0.3125rem}.serviceDetailMetrics strong{font-size:1.1875rem;font-weight:550;overflow-wrap:anywhere}.servicePolicy{margin:1.125rem 0 1.5rem;border:1px solid var(--border);border-radius:0.625rem;padding:0.875rem 1.125rem}.servicePolicy legend{font-size:0.75rem;color:var(--muted);padding:0 0.4375rem}.servicePolicy label,.serviceCheck{display:flex;align-items:center;gap:0.5625rem;font-size:0.75rem}.servicePolicy input,.serviceCheck input{width:1rem;flex-shrink:0;margin:0;accent-color:var(--accent)}.servicePolicy button{margin-top:0.375rem}.serviceLog{padding:1.125rem;background:#122c27;color:#d3e6dc;border-radius:0.625rem;max-height:18.75rem;min-height:7.5rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:0.75rem/1.7 ui-monospace,Consolas,monospace}.serviceDialog form{display:flex;align-items:flex-end;gap:0.75rem}.serviceDialog form label{flex:1;margin:0}.serviceDialog form button{flex-shrink:0}.hostServices{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;border-top:1px solid var(--border);padding:0.875rem 0;margin-bottom:1.125rem;font-size:0.75rem;color:var(--muted)}
@media(max-width:600px){.sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.1875rem}.sidebar .navItem{justify-content:center;padding:0.5rem 0.25rem;margin:0;font-size:0.6875rem}.serviceProvider{align-items:flex-start;padding:1.25rem;gap:0.75rem}.serviceProvider h2{font-size:1.125rem}.serviceProvider p.muted{font-size:0.625rem}.serviceProviderSummary strong{font-size:1.375rem}.serviceProviderSummary small{font-size:0.625rem}.serviceProviderSummary .textButton{font-size:0.625rem}.serviceToolbar{display:block}.serviceToolbar label{max-width:none;margin-top:0.875rem}.serviceTabs{gap:2px}.serviceTabs button{font-size:0.6875rem;padding:0.5rem 0.625rem}.serviceGrid{grid-template-columns:1fr}.serviceDetailMetrics{grid-template-columns:repeat(2,minmax(0,1fr))}.serviceDialog{padding:1.25rem}.serviceDialog form{flex-wrap:wrap}.serviceDialog form label{flex-basis:100%}.serviceLog{font-size:0.6875rem;padding:0.75rem}.hostServices{align-items:flex-start;flex-direction:column}}

/* Add by MHY, 手机侧栏收起后仍保留即时退出入口 */
.mobileLogout{display:none}@media(max-width:600px){.mobileLogout{display:inline-flex;font-size:0.6875rem;white-space:nowrap}.headerRight{gap:0.625rem}}

/* Add by MHY, 策略卡片与规则路径可读展示，保持手机布局不溢出 */
.routingSummary{display:flex;gap:3rem;align-items:center;padding:1.25rem 0 1.5rem;border-bottom:1px solid var(--border)}.routingNode{display:flex;gap:1rem;align-items:center}.routingNode img{width:3.375rem;height:3.375rem;border-radius:0.8125rem}.routingSummary small,.routingSummary span{display:block;color:var(--muted);font-size:0.6875rem}.routingSummary strong{display:block;font-size:1.3125rem;font-weight:550;margin:2px 0}.routingScope{font-size:0.6875rem;margin:1.125rem 0 1.5rem}.routingGroups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.75rem}.routingGroup{background:#fff;border:1px solid var(--border);border-radius:0.625rem;text-align:left;padding:1rem;min-width:0;transition:border-color .15s,background .15s}.routingGroup:hover,.routingGroup.selected{border-color:#80bcac;background:#f5fbf8}.routingGroupHead{display:flex;align-items:center;gap:0.5625rem}.routingGroupHead img{width:1.6875rem;height:1.6875rem;border-radius:0.4375rem;flex-shrink:0}.routingGroupHead strong{font-size:0.8125rem;font-weight:600}.routePolicy{margin-left:auto;color:var(--accent);font-size:0.625rem;white-space:nowrap}.routePolicy.direct{color:#638cb2}.routePolicy.reject{color:var(--red)}.routingGroupChain{display:block;font-size:0.625rem;color:var(--muted);margin:0.875rem 0;overflow-wrap:anywhere}.routingGroupFoot{display:flex;justify-content:space-between;font-size:0.625rem;color:var(--muted);gap:0.5rem}.routingGroupFoot>span{color:var(--accent)}.inspectDomainForm{display:flex;align-items:flex-end;gap:0.75rem;margin:1.625rem 0 1.125rem;padding:1.375rem;background:#f5f8f6;border-radius:0.625rem}.inspectDomainForm label{flex:1;margin:0}.inspectDomainForm button{flex-shrink:0}.domainResult{display:grid;gap:0.5rem;border:1px solid #cce4d9;background:#f4fbf7;padding:1.125rem;border-radius:0.625rem;margin:1rem 0 1.5rem;overflow-wrap:anywhere}.domainResult small{font-size:0.625rem;color:var(--muted)}.domainResult strong{font-size:1.0625rem;font-weight:550}.domainResult p{font-size:0.6875rem;margin:0}.domainResult code,.routingRaw code{font-size:0.6875rem;overflow-wrap:anywhere;white-space:normal}.domainResult span{font-size:0.6875rem}.routingRuleHeading{display:flex;align-items:center;justify-content:space-between;margin:2rem 0 0.75rem;gap:1rem}.routingRuleHeading h2{margin-bottom:0.25rem}.routingRuleHeading p{font-size:0.6875rem;margin:0}.routingRuleHeading label{margin:0;max-width:13.75rem}.routingTable{width:100%;border-collapse:collapse}.routingTable th,.routingTable td{text-align:left;padding:0.9375rem 0.625rem;border-bottom:1px solid var(--border);vertical-align:top}.routingTable th{font-size:0.625rem;color:var(--muted);font-weight:500}.routingTable td{font-size:0.75rem}.routingTable td:first-child{width:3.75rem}.routingTable td:nth-child(2){width:48%}.routingTable td strong{font-weight:550}.ruleOrder{color:var(--muted);font-size:0.75rem}.routingRuleDetail{display:block;font-size:0.625rem;color:var(--muted);margin-top:0.3125rem;overflow-wrap:anywhere}.routingRaw{font-size:0.625rem;color:var(--muted);margin-top:0.375rem}.routingRaw summary{cursor:pointer}.routingRaw code{display:block;margin-top:0.5rem;color:var(--ink)}.domainResult[hidden]{display:none}
@media(max-width:1150px){.routingGroups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.routingCard{padding:1.125rem}.routingSummary{gap:1.25rem;align-items:flex-start;flex-direction:column}.routingSummary strong{font-size:1.1875rem}.routingMode{padding-left:4.375rem}.routingGroups{grid-template-columns:1fr}.routingGroup{padding:0.875rem}.routingGroupChain{margin:0.625rem 0}.inspectDomainForm{padding:1rem;align-items:stretch;flex-direction:column}.routingRuleHeading{align-items:flex-start;flex-direction:column}.routingRuleHeading label{max-width:none;width:100%}.routingTable th,.routingTable td{padding:0.75rem 0.3125rem}.routingTable td:first-child{width:2.1875rem}.routingTable td:nth-child(2){width:48%}.routingTable td{font-size:0.6875rem;overflow-wrap:anywhere}.routingTable .pill{white-space:normal}.routingRuleDetail{font-size:0.5625rem}.routingRaw code{font-size:0.625rem}.routingGroupFoot{font-size:0.625rem}}

@media(max-width:600px){#devices>.card:not(.routingCard)>.sectionHeading{flex-direction:column;align-items:stretch;gap:0.875rem}#devices>.card:not(.routingCard)>.sectionHeading .ruleActions{display:flex;gap:0.5rem}#devices>.card:not(.routingCard)>.sectionHeading .ruleActions button{flex:1;padding:0.5625rem 0.4375rem;font-size:0.6875rem}}
