/* PHOENIX_V4_WEBMGMT_MOBILE_V2
   Phone-first navigation, readable hierarchy and consistent sheets. */
@media (max-width:780px),((pointer:coarse) and (max-width:920px)){
html,body{background:var(--bg)!important;color:var(--text);font-size:16px}body{overflow-x:hidden}
.sidebar{width:min(88vw,340px)!important;left:min(-92vw,-360px);padding:calc(16px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left))!important;background:linear-gradient(180deg,#07111f,#0b1b31)!important;border-right:1px solid rgba(255,255,255,.10);box-shadow:18px 0 60px rgba(0,0,0,.42)!important}
.sidebar.open{left:0}.sidebar-brand{padding:2px 8px 14px!important}.sidebar-brand strong{color:#fff;font-size:1.04rem}.sidebar-brand div span{color:#b5c4d8!important}
.scope-card{margin:2px 3px 12px!important;padding:11px 12px!important;background:#10243d!important;border-color:#294564!important}.scope-card strong{color:#fff}.scope-card span{color:#bfd0e4!important;font-size:.75rem!important}
.role-nav{gap:5px!important;padding:2px 0 10px!important}.nav-button{min-height:48px!important;padding:10px 12px!important;border-radius:12px!important;color:#d8e5f3!important;background:transparent!important;border:1px solid transparent!important;font-size:.88rem!important;font-weight:650!important}
.nav-button:hover,.nav-button:active{background:#122b48!important;color:#fff!important}.nav-button.active{background:linear-gradient(90deg,#174ea6,#1f6fd1)!important;color:#fff!important;border-color:#4c89d2!important;box-shadow:inset 3px 0 #a7ceff,0 5px 18px rgba(0,0,0,.20)!important}
.nav-icon{width:24px!important;height:24px!important;flex-basis:24px!important}.sidebar-foot{color:#b4c4d7!important;border-top-color:rgba(255,255,255,.12)!important}.sidebar-scrim{background:rgba(1,7,14,.68)!important;backdrop-filter:blur(3px)}
.topbar{min-height:64px!important;height:auto!important;padding:calc(6px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 6px calc(10px + env(safe-area-inset-left))!important;background:color-mix(in srgb,var(--surface) 98%,transparent)!important;box-shadow:0 5px 18px rgba(16,24,40,.06)}
.topbar-left{gap:9px!important;min-width:0}#menuButton{display:grid!important;width:44px!important;height:44px!important;min-width:44px!important;background:var(--surface3)!important;color:var(--accent)!important;border-color:var(--accent-border)!important}
#pageTitle{max-width:48vw!important;font-size:1.02rem!important;color:var(--text-strong)!important;font-weight:720!important}#pageEyebrow{font-size:.56rem!important;color:var(--accent)!important}.topbar-actions{gap:7px!important}
.notification-button{width:42px!important;height:42px!important;min-width:42px!important}.account-button{width:44px!important;height:44px!important;min-width:44px!important;padding:4px!important;justify-content:center}.account-button .avatar{width:34px;height:34px}.account-copy,.chevron{display:none!important}
.account-menu{position:fixed!important;left:10px!important;right:10px!important;top:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:auto!important;padding:8px!important;border-radius:16px!important;box-shadow:0 24px 70px rgba(0,0,0,.30)!important}.account-menu button{min-height:48px!important;font-size:.9rem!important}
.main{padding:12px calc(10px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left))!important}.content{width:100%;max-width:none}
.page-head{gap:8px!important;margin-bottom:12px!important}.page-head h1{font-size:1.42rem!important;line-height:1.15!important;color:var(--text-strong)!important}.page-head p{font-size:.82rem!important;line-height:1.5!important;color:var(--muted)!important}
.head-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;width:100%}.head-actions>*{width:100%!important;min-width:0!important;min-height:44px!important}
.metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}.metric,.panel,.device-card,.account-card,.contact-list,.chat-panel,.placeholder{border-radius:13px!important;border-color:var(--line)!important;box-shadow:0 2px 10px rgba(16,24,40,.06)!important}
.metric{min-height:94px!important;padding:13px!important}.metric-label{font-size:.69rem!important;color:var(--muted)!important}.metric-value{font-size:1.7rem!important;color:var(--text-strong)!important}.metric-foot{font-size:.68rem!important;color:var(--muted)!important}
.panel{padding:13px!important}.panel h3{font-size:.94rem!important;color:var(--text-strong)!important}.device-cards,.account-grid,.two-col{grid-template-columns:1fr!important;gap:10px!important}
.device-card{padding:13px!important}.device-head h3{font-size:.94rem!important;color:var(--text-strong)!important}.device-meta{grid-template-columns:1fr 1fr!important;gap:9px!important}.device-meta span{color:var(--muted)!important}
.row-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important}.row-actions button{width:100%;min-height:42px}.toolbar{gap:8px!important}.search{min-height:46px!important;font-size:16px!important}
.table-wrap{border-radius:12px!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}.table-wrap table{min-width:640px!important}th{font-size:.65rem!important}td{font-size:.78rem!important;padding:10px 11px!important}
.contact-layout,.contact-layout.contact-v1{display:flex!important;flex-direction:column!important;gap:9px!important;min-height:0!important}.contact-list{max-height:34dvh!important}.contact-person{min-height:54px!important;padding:10px 11px!important}.contact-person b{color:var(--text-strong)!important}.contact-person span{color:var(--muted)!important}
.chat-panel{min-height:58dvh!important}.chat-head{padding:11px!important}.chat-head-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:6px!important}.chat-head-actions button{min-height:42px}.message-list{min-height:32dvh!important;padding:11px!important}
.bubble{max-width:90%!important;font-size:.82rem!important;line-height:1.45}.composer{gap:7px!important;padding:9px!important;background:var(--surface)!important}.composer input{min-height:46px!important;font-size:16px!important}
.settings-row{gap:8px!important;padding:11px 0!important}.settings-row b{color:var(--text-strong)!important}.settings-row .subtle,.subtle,.muted{color:var(--muted)!important}.settings-row>button,.settings-row>select,.settings-row>.segmented{width:100%!important;min-height:44px!important}
.form-grid{grid-template-columns:1fr!important;gap:10px!important}.form-field{font-size:.76rem!important;color:var(--muted)!important}.form-field input,.form-field select,.form-field textarea{min-height:46px!important;font-size:16px!important}
.modal{inset:0!important;width:100vw!important;height:var(--phoenix-mobile-vh,100dvh)!important;max-width:none!important;max-height:none!important}.modal-card{position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;max-width:none!important;max-height:calc(var(--phoenix-mobile-vh,100dvh) - env(safe-area-inset-top))!important;margin:0!important;padding:0 14px calc(14px + env(safe-area-inset-bottom))!important;border-radius:22px 22px 0 0!important;background:var(--surface)!important;color:var(--text)!important;box-shadow:0 -18px 60px rgba(0,0,0,.24)!important}
.modal-head{position:sticky!important;top:0!important;z-index:4;margin:0 -14px 10px!important;padding:14px!important;background:var(--surface)!important}.modal-head h3{color:var(--text-strong)!important}.modal-actions{grid-template-columns:1fr 1fr!important}.toast{left:10px!important;right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:auto!important;font-size:.8rem!important}
}
@media (max-width:420px){.metrics{grid-template-columns:1fr!important}.head-actions,.row-actions{grid-template-columns:1fr!important}.device-meta{grid-template-columns:1fr!important}}

/* PHOENIX_V4_WEBMGMT_MOBILE_V2_1_IPHONE_FULLWIDTH */
@media (max-width:600px),((pointer:coarse) and (max-width:700px)){
html,body,#appView,.app-shell,.workspace{width:100vw!important;width:100dvw!important;min-width:0!important;max-width:100vw!important;max-width:100dvw!important;margin:0!important;box-sizing:border-box!important}
html,body{overflow-x:hidden!important}.app-shell{display:block!important}.workspace{display:block!important}
.topbar{left:0!important;right:0!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important}
.topbar-left{min-width:0!important;width:100%!important}.topbar-left>div{min-width:0!important}
#pageTitle{max-width:none!important;width:auto!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.05!important;font-size:.94rem!important}
#pageEyebrow{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:48vw!important}
.topbar-actions{flex:0 0 auto!important;justify-self:end!important}.main,.content{width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;margin:0!important}
.page-head{width:100%!important;min-width:0!important}.page-head>div:first-child{width:100%!important;min-width:0!important}.page-head h1{overflow-wrap:anywhere}.page-head p{width:100%!important;max-width:none!important;overflow-wrap:anywhere!important}
.head-actions{grid-template-columns:1fr!important;width:100%!important}.head-actions>*{width:100%!important;max-width:none!important;justify-content:center!important;text-align:center!important;box-sizing:border-box!important}
.metrics{grid-template-columns:1fr!important;width:100%!important}.metric{width:100%!important;min-width:0!important;box-sizing:border-box!important;padding:15px 16px!important}.metric-value{font-size:1.55rem!important;line-height:1.08!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;max-width:100%!important}.metric-label,.metric-foot{white-space:normal!important;overflow-wrap:anywhere!important}
.two-col{grid-template-columns:1fr!important;width:100%!important}.panel{width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box!important;overflow:hidden}.settings-row{min-width:0!important;flex-wrap:wrap!important}.settings-row>div,.settings-row>span,.settings-row>b{min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
.table-wrap{width:100%!important;max-width:100%!important}.row-actions{grid-template-columns:1fr!important}.toast{max-width:calc(100vw - 20px)!important}
}
