html{overflow-x:hidden;color-scheme:dark}
.light{color-scheme:light}
/* Shared by every screen, sidebar, table and dialog; use each theme's tokens. */
*{scrollbar-color:var(--line) var(--bg)}
/* Fallback for engines without standard scrollbar-color support. */
@supports not (scrollbar-color:auto){
::-webkit-scrollbar{width:14px;height:14px}
::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:var(--bg)}
::-webkit-scrollbar-thumb{background:var(--line);border:3px solid var(--bg);border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:var(--muted)}
}
.shell>*,.main-col,.content{min-width:0}
.top{height:auto;min-height:73px;padding-top:10px;padding-bottom:10px;flex-wrap:wrap}
.top .label,.top .muted{flex:1 1 auto}
.inline-form{margin:0}
.panel-spaced{margin-bottom:16px}
.panel-body h3{margin:6px 0 12px}
.node-detail .summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.core-list span{font-size:11px}
select{background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:8px 12px}
.light .top{background:var(--panel)}
.light .core-list div{background:var(--surface)}
.nav button:focus-visible,.text-button:focus-visible,.detail-button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
dialog{overflow:auto}
.chart-box{position:relative;height:300px;margin:0 22px;min-width:0}
.chart-box canvas{max-width:100%}
@media(max-width:760px){.node-detail .summary{grid-template-columns:1fr}.top{gap:8px}.top button{min-width:44px}.chart-box{height:240px;margin:0 12px}}

.auth-body{min-height:100vh;display:block}
.auth-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth-card{width:min(440px,100%);background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:28px}
.auth-brand{margin-bottom:22px;text-align:center}
.auth-brand img{width:96px;max-height:72px;object-fit:contain;object-position:center;display:block;margin:0 auto 14px}
.auth-menu{display:flex;flex-wrap:wrap;gap:6px 16px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--line);font-size:12px}
.auth-menu a{display:inline-flex;align-items:center;min-height:44px}
.auth-content h1{font-size:28px;margin-bottom:16px;text-align:center}
.auth-content>p{text-align:center}
.auth-content p{color:var(--muted);margin:10px 0}
.auth-content form{display:block;text-align:left}
.auth-content label{display:block;font-size:12px;margin-top:14px}
.auth-content input[type=text],.auth-content input[type=password],.auth-content input[type=number],.auth-content input[type=email],.auth-content input:not([type]){width:100%;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:12px;margin-top:6px;min-height:44px}
.auth-content input[type=checkbox]{margin-right:8px}
.auth-content button,.auth-content input[type=submit]{display:block;min-width:160px;margin:22px auto 0;min-height:44px;background:var(--brand);color:#080c0b;border:1px solid var(--brand);border-radius:5px;padding:9px 15px;cursor:pointer}
.auth-content button:hover{background:#c7d7ba}
.auth-content ul{padding-left:18px}
.auth-content img,.auth-content svg{max-width:100%;height:auto;background:#fff;padding:8px;border-radius:4px}
.auth-content code{overflow-wrap:anywhere;color:var(--brand)}
.auth-content .errorlist,.auth-content .errorlist li{color:var(--danger);list-style:none;padding:0;margin:6px 0}
.auth-messages{list-style:none;margin:0 0 16px;padding:12px 14px;border:1px solid #596044;background:#1b2116;border-radius:5px;font-size:12px}

/* Dashboard navigation and layout (scoped to .portal-body so login/account pages keep normal page scroll) */
.side .brand{padding:0 12px 27px;text-align:center}
.side .brand img{display:block;margin:0 auto;object-position:center}
.side .brand small{text-align:center}
.nav .subnav{display:grid;gap:4px;padding:0 0 4px 33px}
.nav .subnav button{min-height:44px;padding:8px 10px;font-size:12px}
.nav .subnav button[aria-current=true]{background:#1b251c;border-color:#4a5a43;color:var(--ink)}
.subnav-note{font-size:12px;color:var(--muted);padding:6px 10px}
#vps-menu-toggle::after{content:'';margin-left:auto;width:6px;height:6px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}
#vps-menu-toggle[aria-expanded=true]::after{transform:rotate(-135deg)}
.sidebar-backdrop{display:none;position:fixed;inset:0;z-index:30;background:#000a}

.portal-body{height:100vh;height:100dvh;overflow:hidden}
.portal-body [hidden]{display:none!important}
.portal-body .shell{height:100vh;height:100dvh;min-height:0;overflow:hidden;grid-template-rows:minmax(0,1fr)}
.portal-body.sidebar-hidden .shell{grid-template-columns:minmax(0,1fr)}
.portal-body.sidebar-hidden .side{display:none}
.portal-body .side{position:relative;height:100%;min-height:0;overflow-y:auto}
.portal-body .main-col{display:flex;flex-direction:column;height:100%;min-height:0}
.portal-body .top{flex:none}
.portal-body .content{flex:1;min-height:0;width:100%;overflow:auto;display:flex;flex-direction:column;padding-bottom:16px}
.portal-body #banner{flex:none}
.portal-body .screen:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}
.portal-body .heading{flex:none}
.portal-body .bottom{flex:none;padding-top:12px}
.screen-scroll{flex:1;min-height:0;overflow:auto}
.screen-scroll:focus-visible{outline-offset:-3px}

.vps-hint{flex:none}
.vps-selected{flex:none}
.vps-selected h2{margin-bottom:14px;overflow-wrap:anywhere}
.tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line)}
.tabs button{flex:none;white-space:nowrap;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--muted)}
.tabs button:hover{background:var(--panel)}
.tabs button[aria-selected=true]{color:var(--ink);border-bottom-color:var(--brand)}
.tabs button:focus-visible{outline-offset:-3px}
#vps-tab-content{padding:22px;background:var(--panel);border:1px solid var(--line);border-top:0;border-radius:0 0 7px 7px}
.vps-meta{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-bottom:18px}
.vps-meta small{color:var(--muted)}

@media(max-width:760px){
.portal-body .shell{display:block}
.portal-body .side{position:fixed;top:0;left:0;bottom:0;z-index:40;width:min(280px,86vw);height:100vh;height:100dvh;padding:28px 16px;border-right:1px solid var(--line);border-bottom:0;box-shadow:4px 0 24px #0008}
.side .brand{display:block;padding:0 0 20px}
.side .brand img{width:93px;max-height:70px}
.side .brand small{margin-top:12px}
.portal-body .nav{display:grid;overflow:visible}
.portal-body .nav button{white-space:normal}
.portal-body .nav button span{display:inline-block}
.portal-body .side-note{display:block}
.portal-body:not(.sidebar-hidden) .sidebar-backdrop{display:block}
.portal-body .content{padding:18px 18px 12px}
#vps-tab-content{padding:14px}
}
