/* The installed phone app is a management console. Kronos policies only target enrolled Windows clients. */
.remote-viewer canvas{touch-action:none;-webkit-user-select:none;user-select:none}

@media(max-width:800px){
  html,body{min-height:100%;overscroll-behavior-y:none}
  body{padding-top:env(safe-area-inset-top);background:#07111f}
  .shell{min-height:100dvh;padding-bottom:calc(66px + env(safe-area-inset-bottom));background:var(--bg)}
  .nav{position:fixed;left:0;right:0;bottom:0;z-index:100;margin:0;padding:0 7px env(safe-area-inset-bottom);border-top:1px solid #18303d;background:rgba(7,17,31,.98);box-shadow:0 -10px 28px rgba(5,17,29,.2);backdrop-filter:blur(16px)}
  .nav .brand-lockup,.nav .org-badge{display:none}
  .nav nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}
  .nav-item{height:64px;padding:7px 2px 6px;display:flex;flex-direction:column;justify-content:center;gap:4px;border-radius:7px;color:#79909e;text-align:center}
  .nav-item b{font-size:8px}.nav-item span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
  .nav-item.active{box-shadow:inset 0 2px #18b99b;background:rgba(24,185,155,.11)}
  .main{min-width:0;overflow:visible}
  .top{top:0;height:70px;padding:10px 14px;background:rgba(255,255,255,.97)}
  .top p{margin-bottom:2px;font-size:7px}.top h1{font-size:19px}
  .session-copy{display:none}.session-user{padding:5px}.session-avatar{width:34px;height:34px}
  .session-menu{position:fixed;top:calc(62px + env(safe-area-inset-top));right:10px;left:10px;width:auto;max-height:calc(100dvh - 150px);overflow:auto}
  .view{padding:14px 10px 22px}
  .metrics,.server-health-grid,.deployment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .metrics article{min-height:100px;padding:14px}.metrics strong{font-size:26px}
  .server-stat{min-height:118px;padding:14px;border-bottom:1px solid var(--line)}
  .panel-head{height:auto;min-height:64px;padding:12px;gap:9px;flex-wrap:wrap}
  .dashboard-devices .panel-head input{width:100%}
  .dashboard-devices .table-wrap,.policy-catalog .table-wrap,.deployment-table .table-wrap{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}
  .device-grid{min-width:0}.device-grid thead{display:none}.device-grid,.device-grid tbody{display:block}.device-grid tbody{padding:9px;display:grid;gap:9px}
  .device-grid tbody tr{display:grid;grid-template-columns:1fr 1fr;overflow:visible;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:0 4px 13px rgba(12,38,48,.05)}
  .device-grid tbody td{min-width:0;padding:9px 10px;display:grid;align-content:center;border:0;border-bottom:1px solid #edf1f2;background:transparent!important}
  .device-grid tbody td::before{display:block;margin-bottom:3px;color:#7a8b94;font-size:8px;font-weight:750;letter-spacing:.08em;text-transform:uppercase}
  .device-grid tbody td:nth-child(1){grid-column:1/-1}.device-grid tbody td:nth-child(1)::before{content:'Kullanan / PC'}
  .device-grid tbody td:nth-child(2)::before{content:'Agent'}.device-grid tbody td:nth-child(3)::before{content:'Durum'}.device-grid tbody td:nth-child(4)::before{content:'Kural'}.device-grid tbody td:nth-child(5)::before{content:'Sağlık'}.device-grid tbody td:nth-child(6)::before{content:'PC kaynakları'}.device-grid tbody td:nth-child(7)::before{content:'Son bağlantı'}
  .device-grid tbody td:last-child{grid-column:1/-1;width:auto;padding:10px;border-bottom:0;text-align:left}.device-grid tbody td:last-child::before{content:'PC işlemleri'}
  .device-grid .device-actions{display:block}.device-grid .device-actions summary{width:100%;height:38px;background:#edf7f5;color:#087467}.device-grid .device-actions>div{right:0;bottom:43px;width:min(280px,calc(100vw - 42px))}
  .device-actions .device-menu-tree>div{position:static;width:auto;max-height:240px;margin:3px 0 5px 8px;box-shadow:none;border-left:2px solid #cfe5df}.device-actions .device-menu-tree>summary{height:36px;background:transparent}
  .rules-grid{min-width:680px}.deployment-table table{min-width:980px}
  .policy-toolbar,.deploy-toolbar{margin-top:0}.policy-meta{grid-template-columns:1fr auto auto;align-items:end}.policy-meta>label:first-child{grid-column:1/-1}
  .policy-edit-dialog{width:100%;height:100dvh;max-height:none;border-radius:0}.policy-edit-dialog .policy-layout{grid-template-columns:1fr}.policy-edit-dialog .subnav{display:flex;overflow-x:auto}.policy-edit-dialog .subnav button{flex:none}
  dialog:not(.remote-dialog):not(.policy-edit-dialog){width:calc(100% - 16px);max-width:none;max-height:calc(100dvh - 24px);overflow:auto}
  dialog form{padding:17px;gap:14px}.form-grid,.domain-columns,.network-rule-grid,.schedule-controls{grid-template-columns:1fr}
  .dialog-actions{position:sticky;bottom:0;margin:0 -17px -17px;padding:12px 17px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);flex-wrap:wrap}
  .dialog-actions .btn{flex:1}
  .remote-dialog,.remote-dialog:has(.remote-auth:not(.hidden)){width:100%;height:100dvh;max-height:none;border-radius:0}
  .remote-dialog>.dialog-head{padding:calc(10px + env(safe-area-inset-top)) 12px 10px}
  .remote-viewer{height:calc(100dvh - 72px);display:grid;grid-template-rows:minmax(0,1fr) auto}
  .remote-screen{min-height:0;overflow:hidden}.remote-viewer canvas{width:100%;height:100%;min-height:0;max-height:none;object-fit:contain}
  .remote-toolbar{display:grid;gap:8px;padding:8px 9px calc(8px + env(safe-area-inset-bottom));overflow-x:auto}
  .remote-controls{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.remote-controls>*{flex:none}
  .toast{right:10px;bottom:calc(76px + env(safe-area-inset-bottom));left:10px;text-align:center}
}

@media(max-width:390px){
  .metrics,.server-health-grid,.deployment-grid{grid-template-columns:1fr}
  .nav-item span{font-size:9px}
}
