/* Navigation shell. Domain controls retain their established styles and IDs. */
:root{--bg:#f5f7fb;--txt:#243047;--line:#e5eaf2;--blue:#4064ee}
[hidden]{display:none!important}
body{padding-left:238px}
.app-sidebar{position:fixed;inset:0 auto 0 0;width:238px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:20}
.app-brand{display:flex;align-items:center;gap:11px;height:97px;flex-shrink:0;padding:0 22px;color:var(--txt);text-decoration:none;font-size:22px;font-weight:700}
.app-brand>.app-logo{width:38px;height:38px;display:block;flex-shrink:0;object-fit:contain;border-radius:6px;transform:scale(1.5);transform-origin:left center;margin-right:19px}
.app-brand small{display:block;font-size:12px;color:var(--muted);font-weight:400;margin-top:2px}
nav.module-nav{display:block;padding:0 12px 20px;overflow:auto;flex:1;font-family:"Microsoft YaHei UI","PingFang SC","Microsoft YaHei","Segoe UI",sans-serif}
.nav-group+.nav-group{margin-top:20px}
.nav-group h2{font-size:14px;line-height:22px;letter-spacing:.5px;color:#334761;margin:0 0 8px;padding:7px 12px;font-weight:700;background:#f0f3f8;border-radius:6px}
.module-nav button{display:flex;align-items:center;gap:10px;text-align:left;width:100%;min-height:40px;color:#536176;padding:9px 12px;font-family:inherit;font-size:14px;line-height:22px;font-weight:400;margin:3px 0;border-radius:8px;transition:background-color .15s,color .15s,box-shadow .15s}
.module-nav .nav-icon{width:18px;height:18px;flex:0 0 18px;color:#7b8799}
.module-nav .nav-label{min-width:0}
.module-nav .nav-group h2{padding:0}
.module-nav .nav-group-toggle{margin:0;padding:7px 12px;min-height:36px;font-size:14px;font-weight:700;line-height:22px;color:#334761;background:transparent;border-radius:6px;justify-content:space-between;width:100%}
.module-nav .nav-group-toggle:hover{background:#e5ebf4;color:#234a80}
.nav-chevron{width:16px;height:16px;flex-shrink:0;transition:transform .15s}
.nav-group-toggle[aria-expanded="false"] .nav-chevron{transform:rotate(-90deg)}
@media(prefers-reduced-motion:reduce){.nav-chevron{transition:none}}
.module-nav button:hover{background:#f4f6fa;color:#253b5b}
.module-nav button:hover .nav-icon{color:#526786}
.module-nav button.active{background:#edf3ff;color:#2563eb;font-weight:600;box-shadow:inset 3px 0 0 #2563eb}
.module-nav button.active .nav-icon{color:#2563eb}
.module-nav button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.module-nav small{flex-shrink:0;margin-left:auto;font-size:10px;line-height:16px;font-weight:400;background:#f1f3f7;padding:1px 5px;border:1px solid #e5e9f0;border-radius:4px;color:#7d8899}
@media(prefers-reduced-motion:reduce){.module-nav button{transition:none}}
.sidebar-footer{display:block;padding:12px;border-top:1px solid var(--line);flex-shrink:0}
.sidebar-footer .sidebar-profile{display:flex;align-items:center;gap:10px;width:100%;padding:10px 8px;text-align:left;color:#334155;border-radius:9px;font-family:inherit}
.sidebar-profile:hover,.sidebar-profile.active{background:#edf3ff;color:#2563eb}
.profile-avatar{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;border-radius:11px;background:#e7efff;color:#2563eb;font-size:16px;font-weight:600}
.profile-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
.profile-info strong{font-size:14px;font-weight:600;line-height:20px}
.profile-info>span,.sidebar-footer .profile-info small{font-size:11px;line-height:16px;color:#77859b}
.profile-info>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-footer #authIdentity{max-width:none}
.profile-arrow{width:16px;height:16px;flex-shrink:0;color:#94a3b8}
.account-session{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.account-session .tip{margin:0}
header{min-height:84px;height:auto;background:white;color:var(--txt);border-bottom:1px solid var(--line);padding:14px 30px;gap:14px}header h1{display:none}.header-actions{gap:12px}.header-account{border-color:var(--line)}#authIdentity{color:#77859b}.header-action{color:#62728d;border-color:var(--line)}.header-action:hover{background:#f4f6fc;color:var(--blue);border-color:#becbf1}.account-nav button{color:#62728d;font-size:12px}.account-nav button.active{background:#edf1ff;color:var(--blue)}
main{max-width:1700px;padding:28px 30px;margin:0 auto}.page-heading{min-width:0;margin:0}.page-heading h2{font-size:22px;line-height:1.3;margin:0 0 4px}.page-heading p{color:#8490a4;font-size:12px;line-height:1.5;margin:0}.card{border-radius:11px;padding:21px}.stat{border-radius:10px}.asset-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.asset-toolbar h3{margin:0}.table-scroll{overflow:auto}.workspace-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.workspace-grid .card{margin:0}.workspace-grid h3{font-size:16px}.workspace-grid p{font-size:13px;color:var(--muted);margin:12px 0 20px}.workspace-count{font-size:28px;font-weight:650;margin:10px 0}.workspace-links{display:flex;gap:10px;flex-wrap:wrap}.module-note{background:#edf2ff;padding:16px 20px;border:1px solid #dfe7fc;border-radius:9px;color:#627599;font-size:13px;margin-bottom:22px}.module-note a{color:#365de0}.asset-dialog{width:min(650px,95vw);margin:auto}.asset-dialog form{padding:22px}.asset-dialog label{display:flex;flex-direction:column;gap:7px}.asset-dialog .form2{gap:16px}.asset-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.service-status{display:inline-block;background:#fff4de;color:#a27625;border-radius:4px;padding:3px 8px;font-size:12px;margin-bottom:14px}button:focus-visible,a:focus-visible{outline:3px solid #aac0ff;outline-offset:3px}
body.needs-login .app-sidebar{display:none}body.needs-login{padding-left:0}
@media(max-width:1100px){body{padding-left:205px}.app-sidebar{width:205px}.app-brand{height:88px;padding:0 15px;font-size:20px}header{flex-wrap:wrap;padding:14px 20px}header nav{order:initial;width:auto}.workspace-grid{grid-template-columns:1fr 1fr}main{padding:22px 20px}}
@media(max-width:760px){body{padding-left:0}.app-sidebar{position:static;width:100%;height:auto;border-right:0;border-bottom:1px solid var(--line)}.app-brand{height:72px;padding:0 18px}.sidebar-footer{display:none}nav.module-nav{display:flex;gap:16px;overflow-x:auto;padding:0 15px 12px;flex:none}.nav-group{flex:none}.nav-group h2{margin:0 8px 6px}.module-nav button{width:auto;display:inline-block;padding:6px 9px;margin:0;font-size:12px}.nav-group{max-width:280px;white-space:normal}header{height:auto;min-height:60px;flex-wrap:wrap;padding:12px 16px}.header-actions{flex-wrap:wrap}.page-heading{width:100%}.workspace-grid{grid-template-columns:1fr}main{padding:20px 14px}.page-heading h2{font-size:22px}.table-scroll{max-width:100%}#tab-servers>.card{overflow-x:auto}}

@media(max-width:1100px){.module-nav button{gap:8px;padding:9px 10px;font-size:13px}}
@media(max-width:760px){.nav-group+.nav-group{margin-top:0}.module-nav button{display:inline-flex;width:auto;min-height:38px;padding:8px 10px;vertical-align:middle;white-space:nowrap}.module-nav .nav-icon{width:17px;height:17px;flex-basis:17px}.module-nav small{margin-left:2px}}

@media(max-width:760px){nav.sidebar-footer{display:block;padding:8px 14px}.sidebar-footer .sidebar-profile{padding:8px}.profile-info{gap:0}}

/* Page titles live in the shared header; body toolbars contain actions only. */
.asset-toolbar{justify-content:flex-end}

/* Shared spacing scale across pages, cards, toolbars and dialogs. */
:root{--page-padding:24px;--card-padding:20px;--section-gap:16px;--control-gap:8px}
header{padding:14px var(--page-padding);align-items:center}
main{padding:var(--page-padding)}
main .card{padding:var(--card-padding);margin-bottom:var(--section-gap)}
.tab>.card:last-child{margin-bottom:0}
.row,.ovwrap{gap:var(--section-gap)}
.row>.card{margin-bottom:0;min-width:0}
.workspace-grid{gap:var(--section-gap)}
.workspace-grid .card{margin:0}
.asset-toolbar,.company-toolbar{gap:var(--control-gap);margin-bottom:var(--section-gap)}
.asset-toolbar h3,.company-toolbar h3{margin:0}
.company-footer{display:flex;justify-content:flex-end;margin-top:16px}
.company-toolbar:has(>.btn:only-child){justify-content:flex-end}
.card h3{margin-bottom:12px;line-height:1.5}
.card>.tip:first-child{margin-top:0}
.card>.tip:last-child{margin-bottom:0}
.company-tabs{margin-bottom:12px}
.company-form,.ops-form,.asset-dialog .form2{gap:16px}
.company-form label,.ops-form label,.asset-dialog label{gap:6px}
.asset-dialog form,dialog .dbody{padding:20px}
dialog .dhead{padding:16px 20px;align-items:center}
.asset-dialog .dialog-actions{margin-top:20px;gap:8px}
.pager{margin-top:16px;gap:8px;flex-wrap:wrap}
.ovside.card{padding:8px 0}
@media(max-width:1100px){:root{--page-padding:20px}}
@media(max-width:760px){:root{--page-padding:16px;--card-padding:16px}.row{flex-direction:column}.row>.card{width:100%}.grid4{grid-template-columns:repeat(2,minmax(0,1fr))}dialog .dbody,.asset-dialog form{padding:16px}.form2{grid-template-columns:1fr}header{padding:12px 16px}}
.collection-dialog .form2{gap:16px}
.collection-footer{display:flex;align-items:center;gap:16px;margin-top:12px}
.collection-footer .tip{flex:1;min-width:0;margin:0}
.collection-footer>.btn{flex-shrink:0;white-space:nowrap}
@media(max-width:600px){.collection-footer{flex-wrap:wrap;justify-content:flex-end}.collection-footer .tip{flex-basis:100%}}
.collection-dialog .form2 label{gap:6px}
.collection-dialog .dbody{max-height:calc(90vh - 64px)}
.collection-dialog #sIntervalHint{font-size:11px;min-height:16px}
.collection-dialog input:disabled{background:#f3f5f9;color:#8893a3}
.resource-summary,.resource-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.resource-summary{background:#edf3ff;border:1px solid #e0e8fb;border-radius:10px;padding:14px 18px}
.resource-summary-text{font-size:13px;color:#52647e;margin-left:10px}
.resource-timestamp,.resource-subtle{font-size:12px;color:#8090a6}
.resource-status{font-size:11px;border-radius:5px;padding:3px 7px;white-space:nowrap;background:#edf2ff;color:#4c70b2}
.resource-status.normal{background:#e8f6ef;color:#228468}.resource-status.warning{background:#fff3dc;color:#a76b17}.resource-status.critical{background:#ffeded;color:#bc4141}
.resource-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:16px}
.resource-stat{background:#fff;border:1px solid var(--line);border-radius:11px;padding:20px;min-width:0}
.resource-stat-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.resource-stat-head h3{font-size:14px;margin:0;color:#53617b}
.resource-value{font-size:30px;font-weight:650;margin:14px 0 10px;letter-spacing:-.7px}
.resource-stat p{color:#8894a6;font-size:11px;line-height:1.7;margin:10px 0 0}
.resource-meter{height:6px;overflow:hidden;border-radius:5px;background:#edf1f7;margin:8px 0 0}.resource-meter i{display:block;height:100%;border-radius:5px;background:var(--blue)}
.resource-meter.warning i{background:#e5a039}.resource-meter.critical i{background:#d95858}
.resource-network{display:grid;gap:10px;margin-top:16px}.resource-network>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.resource-network span{font-size:12px;color:#8290a4}.resource-network strong{font-size:21px;font-weight:600}
.resource-toolbar h3{margin:0}.resource-ranges,.resource-series{display:flex;gap:8px;flex-wrap:wrap}
.resource-ranges .selected,.resource-series .selected{background:var(--blue);border-color:var(--blue);color:#fff}
.resource-legend{display:flex;align-items:center;flex-wrap:wrap;gap:20px;padding:10px 14px;background:#f5f7fb;border:1px solid #e0e6ef;border-radius:8px;color:#26364f;font-size:14px;font-weight:600}
.resource-legend>span{display:inline-flex;align-items:center;gap:9px;white-space:nowrap}
.resource-legend i{position:relative;display:inline-block;width:26px;height:4px;border-radius:2px;background:currentColor}
.resource-legend i::after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:currentColor;left:9px;top:-2px}
.legend-cpu{color:#4064ee}.legend-memory{color:#159b82}.legend-disk{color:#e5a039}
.resource-monitor .ops-chart{height:auto;min-height:220px;width:100%;max-height:360px}
.resource-monitor #opsMetricChart{min-height:220px;color:#8290a4;font-size:13px;display:grid;align-items:center}
.resource-chart-footer{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;margin-top:12px}.resource-chart-footer p{font-size:12px;color:#8b96a7}
.resource-details{display:grid;grid-template-columns:1fr 1fr;gap:16px}.resource-details .ops-table table{min-width:360px!important}.resource-details .card{min-width:0;margin-bottom:0}
.resource-monitor table td{padding:12px}.resource-empty{text-align:center;color:#8b96a7;padding:24px!important}
@media(max-width:1200px){.resource-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.resource-details{grid-template-columns:1fr}}
@media(max-width:600px){.resource-stat{padding:16px}.resource-stat-head{align-items:flex-start;flex-direction:column}.resource-value{font-size:26px}.resource-network strong{font-size:16px}.resource-summary-text{display:block;margin:8px 0 0}.resource-monitor .ops-chart{min-height:160px}.resource-monitor #opsMetricChart{min-height:160px}}

.asset-remark{max-width:260px;white-space:pre-wrap;overflow-wrap:anywhere}
