/* Loaded last: mobile must not inherit desktop table and fixed-height layouts. */
@media(max-width:700px){
 html,body,#app{width:100%;min-width:0;height:auto;margin:0;overflow:visible}
 body .sentinel-shell{width:100%;min-width:0;min-height:100dvh}
 body .sentinel-shell>main{display:block;height:auto;min-width:0}
 body .sentinel-shell #view{display:block!important;width:100%;box-sizing:border-box;height:auto!important;max-height:none;overflow:visible!important;padding-bottom:calc(24px + env(safe-area-inset-bottom))!important}
 body .sentinel-shell #view>*{min-width:0;max-width:100%;box-sizing:border-box}
 body .sentinel-shell .topbar .mobile-brand{display:flex!important;flex-shrink:0}
 body .sentinel-shell .top-actions{min-width:44px;width:auto;flex-shrink:0}
 .mobile-menu{box-sizing:border-box;overflow-y:auto}
 .hero{height:auto!important;min-height:70px;padding:12px!important;flex-wrap:wrap;gap:8px}
 .hero h1{font-size:22px!important;overflow-wrap:anywhere}.hero p{font-size:13px!important;white-space:normal}
 .view-tabs,.dd-tabs{display:flex!important;max-width:100%;overflow-x:auto;flex-wrap:nowrap!important;gap:6px}
 .view-tabs button,.dd-tabs button{flex:none!important;min-height:44px;white-space:nowrap;font-size:14px!important}
 .workspace-filters,.workspace-title,.dd-toolbar,.dd-device-controls{height:auto!important;flex-wrap:wrap;gap:8px}
 .workspace-filters input,.workspace-filters select{min-width:0;max-width:100%;flex:1 1 150px}
 .page-kpis,.sv-reference>.sv-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .clients-columns,.incidents-columns,.notifications-layout,.reports-layout,.users-columns{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 .clients-columns>div,.incidents-columns>div{min-width:0}
 .clients-workspace .client-list,.incidents-workspace .figma-table{height:auto;max-height:60dvh;overflow:auto}
 .clients-workspace .client-list button{grid-template-columns:32px minmax(0,1fr) auto;font-size:14px;gap:8px;padding:12px 8px}
 .client-list button>*{min-width:0;white-space:normal;overflow-wrap:anywhere}
 .clients-workspace .client-list .status-badge{font-size:12px}
 .incidents-workspace .figma-row{grid-template-columns:10px minmax(0,1fr) minmax(0,1fr);font-size:14px;gap:8px;padding:12px 8px;height:auto;white-space:normal}
 .incidents-workspace .figma-row>*{min-width:0;white-space:normal;overflow-wrap:anywhere}
 #view>.sv-reference{display:block;height:auto}.sv-reference>.sv-list-panel{height:auto;overflow:visible}
 .sv-reference .sv-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .sv-reference .sv-toolbar input{grid-column:1/-1;width:100%;min-width:0;box-sizing:border-box}
 .sv-reference .sv-toolbar select,.sv-reference .sv-toolbar button{width:100%;max-width:100%;min-height:44px;height:auto;font-size:14px}
 .sv-reference .sv-table-scroll{max-height:65dvh;overflow:auto}
 .sv-reference .sv-table,.sv-reference .sv-table tbody{display:block;width:100%;min-width:0}
 .sv-reference .sv-table thead{display:none}
 .sv-reference .sv-table td{display:block;overflow-wrap:anywhere;white-space:normal;font-size:14px}
 .sv-reference .sv-table td:first-child{grid-row:1;z-index:1;justify-self:end}
 .sv-reference .sv-table td:nth-child(2){padding-right:28px}
 .sv-reference .sv-table td:last-child{grid-column:1/-1}
 .sv-reference .sv-table tr[data-sv-row] td:before{content:none;display:block;font-size:12px;color:#92b8cf;margin-bottom:4px}
 .sv-reference .sv-table tr[data-sv-row] td:nth-child(3):before{content:'Client / Site'}
 .sv-reference .sv-table tr[data-sv-row] td:nth-child(4):before{content:'Connexion'}
 .sv-reference .sv-table tr[data-sv-row] td:nth-child(5):before{content:'Numéro de série'}
 .sv-reference .sv-table tr[data-sv-row] td:nth-child(6):before{content:'Caméras connectées / total'}
 .sv-reference .sv-table tr[data-sv-row] td:nth-child(7):before{content:'Statut'}
 .sv-reference .sv-table tr[data-sv-row] td:nth-child(8):before{content:'Dernière remontée'}
 .sv-device-name>div{min-width:0}.sv-device-name b{overflow-wrap:anywhere}
 .sv-reference .sv-selection{display:grid;grid-template-columns:minmax(0,1fr);padding:12px;position:static}
 .sv-reference .sv-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .sv-reference .sv-actions>*{min-width:0;white-space:normal;overflow-wrap:anywhere;margin:0!important;padding:10px!important}
 .sv-reference .sv-actions .sv-action-warning{grid-column:1/-1;max-width:none}
 #view .dd-page,#view .dd-content{display:block!important;height:auto;min-height:0;overflow:visible!important}
 .dd-device-hero{height:auto!important;min-height:80px;flex-wrap:wrap;padding:12px;gap:8px}.dd-device-hero h1{font-size:21px}
 .dd-page .dd-device-hero>img{display:none!important}
 .dd-identity{display:flex;flex-wrap:wrap;height:auto!important;gap:10px;padding:12px}.dd-identity>*{min-width:0;max-width:100%}
 .dd-device-controls{display:flex;width:100%}.dd-device-controls button{flex:1 1 130px;min-height:44px;white-space:normal}
 .dd-middle,.dd-lower,.dd-bottom,.dd-camera-panels,.dd-disk-middle,.dd-disk-bottom,.dd-network-layout,.dd-network-bottom,.dd-system-layout,.dd-recording-layout,.dd-recording-bottom,.dd-events-layout,.dd-events-bottom{display:flex!important;flex-direction:column;height:auto!important;gap:12px}
 .dd-panel{min-width:0;max-width:100%;box-sizing:border-box}.dd-panel header{height:auto;min-height:40px;flex-wrap:wrap;gap:8px}
 .dd-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .dd-table-scroll{max-width:100%;overflow:auto!important}.dd-panel table{min-width:560px}
 .dd-camera-list{display:block!important;max-height:none!important}.dd-camera-list #ddCameraRows{max-height:65dvh;overflow:auto}.dd-camera-list #ddCameraRows .dd-table-scroll{overflow:visible!important}
 .syn-middle .dd-panel:has(table){overflow:auto}.syn-middle table{min-width:520px}
 .history-master-detail{grid-template-columns:minmax(0,1fr)}
 .nvr-add-top,.nvr-credentials,.nvr-assignment,.nvr-location-info,.nvr-info-fields,.nvr-notification-grid{grid-template-columns:minmax(0,1fr)!important}
 .nvr-add-page{width:100%;padding:0}.nvr-card,.nvr-card-body{min-width:0}.nvr-add-heading{flex-wrap:wrap}.nvr-add-heading img{max-width:130px}
 .nvr-device-info{flex-wrap:wrap}.nvr-add-footer{position:static;flex-wrap:wrap}.nvr-add-footer button{min-height:44px;flex:1}
 .sites-full-map{height:calc(100dvh - 180px);min-height:380px}.sites-full-map .map-main,.sites-full-map .sites-map{height:100%}
 #opsModal>section{box-sizing:border-box;max-width:calc(100vw - 20px)!important;max-height:90dvh;overflow:auto}
 .home-incident-row{grid-template-columns:9px minmax(0,1fr) auto;font-size:14px;padding:12px 4px}.home-incident-message{grid-column:2/-1}.home-incident-row .status-badge{grid-column:3;grid-row:1}.home-incident-device{grid-column:2/-1}
}
