@media(max-width:1400px){.kill-banner{align-items:flex-start;flex-direction:column}.kill-form{width:100%;margin-left:0}.kill-form label{flex:1}.kill-form .btn{white-space:nowrap}}
.dashboard-identity{display:grid;grid-template-columns:40px minmax(150px,210px) auto;align-items:center;column-gap:12px;position:relative;z-index:2;max-width:520px;min-width:0;background:rgba(255,255,255,.84);border:1px solid #e1defa;border-radius:14px;padding:11px 12px}.dashboard-avatar{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#7c6ff2,#5549cf);color:#fff;font-weight:800}.dashboard-identity>div:nth-child(2){min-width:0;overflow:hidden}.dashboard-identity small,.dashboard-identity strong,.dashboard-identity span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-identity small{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.09em}.dashboard-identity strong{font-size:13px;line-height:1.25;margin:2px 0}.dashboard-identity span{font-size:10px;line-height:1.3;color:var(--muted);text-transform:capitalize}.dashboard-identity .btn{margin:0;white-space:nowrap;align-self:center}
@media(max-width:1180px){.hero{align-items:flex-start;flex-direction:column}.dashboard-identity{width:100%;max-width:none;grid-template-columns:40px minmax(0,1fr) auto}}
@media(max-width:560px){.dashboard-identity{grid-template-columns:40px minmax(0,1fr)}.dashboard-identity .btn{grid-column:1/-1;width:100%;margin-top:4px;text-align:center}}

/* Device- and resolution-aware layout enhancements. JavaScript updates the
   data attributes whenever the window, browser zoom or orientation changes. */
html,body{min-height:calc(var(--app-vh,1vh)*100);max-width:100%;overflow-x:clip}
.sidebar{height:calc(var(--app-vh,1vh)*100);overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(18px,env(safe-area-inset-bottom))}
.app-shell>main{max-width:100%;padding-right:max(36px,env(safe-area-inset-right));padding-left:max(36px,env(safe-area-inset-left))}
dialog{max-height:calc(var(--app-vh,1vh)*90);overflow-y:auto}
img,video,canvas,svg{max-width:100%}
.panel,.hero,.admin-banner,.stat,.content-card,.connection-card{min-width:0}.panel-head,.list-row,.connection-card,.security-note{min-width:0}.panel-head>div,.list-row>div,.connection-card>div,.security-note>div{min-width:0}h1,h2,h3,h4,p,li,td,th,small,strong,a{overflow-wrap:anywhere}.table-wrap{max-width:100%}textarea{max-width:100%}

html[data-device="tablet"] .app-shell>main{padding-right:24px;padding-left:24px}
html[data-device="tablet"] .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-device="tablet"] .card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

@media(min-width:1600px){html[data-device="desktop"] .app-shell>main{padding-right:clamp(44px,4vw,76px);padding-left:clamp(44px,4vw,76px)}html[data-device="desktop"] .stat-grid{gap:20px}html[data-device="desktop"] .two-col{gap:24px}}

html[data-device="phone"] .app-shell>main{padding-right:max(12px,env(safe-area-inset-right));padding-left:max(12px,env(safe-area-inset-left))}
html[data-device="phone"] .topbar{height:auto;min-height:68px;padding:12px 0}
html[data-device="phone"] .topbar h1{font-size:20px}
html[data-device="phone"] .hero,html[data-device="phone"] .admin-banner{padding:18px;border-radius:14px}
html[data-device="phone"] .panel-head{padding:15px}
html[data-device="phone"] .page-actions{flex-wrap:wrap}
html[data-device="phone"] .page-actions .btn{width:100%;text-align:center}
html[data-device="phone"] .modal-form{padding:18px}
html[data-device="phone"] dialog{width:calc(100vw - 20px);margin:10px auto}
html[data-device="phone"] .table-wrap{-webkit-overflow-scrolling:touch}

html[data-orientation="landscape"][data-device="phone"] .sidebar{width:min(280px,72vw)}
html[data-orientation="landscape"][data-device="phone"] .topbar{min-height:58px}
html[data-orientation="landscape"][data-device="phone"] .hero{padding-top:14px;padding-bottom:14px}

html[data-compact-height="true"] .sidebar{padding-top:14px}
html[data-compact-height="true"] .sidebar nav{margin-top:15px}
html[data-compact-height="true"] .nav-label{margin-top:10px}
html[data-compact-height="true"] .nav-item{padding-top:7px;padding-bottom:7px}
html[data-compact-height="true"] .topbar{height:72px}
html[data-compact-height="true"] .hero,html[data-compact-height="true"] .admin-banner{padding-top:20px;padding-bottom:20px}

@media(pointer:coarse){button,.btn,.nav-item,input,select{min-height:44px}.icon-btn,.logout{min-width:44px}.sidebar{overscroll-behavior-y:contain}}
@media(max-width:760px){.panel-head{gap:12px;align-items:flex-start;flex-wrap:wrap}.inline-form,.reset-form{flex-wrap:wrap}.inline-form select,.inline-form .btn{flex:1 1 120px}.security-note{align-items:flex-start}.app-footer{padding-inline:8px}.footer-branding{line-height:1.5}}
@media(max-width:420px){.app-shell>main{padding-inline:max(10px,env(safe-area-inset-left))}.topbar{gap:8px}.topbar>div{min-width:0}.topbar h1{font-size:18px}.hero h2,.admin-banner h2{font-size:20px}.panel{border-radius:12px}.stat{padding:15px}.modal-form{padding:15px}.modal-actions{flex-direction:column-reverse}.modal-actions .btn{width:100%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
