/* SlavcONET mobile layout. Desktop remains governed by the existing theme. */
@media screen and (max-width:760px){
 html{width:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{width:100%;min-width:0!important;margin:0}
 body main{margin-left:0!important;width:100%;max-width:100%!important;padding:0 12px 28px!important;min-width:0;overflow-wrap:anywhere}
 body header.sidebar{width:100%;max-width:100%;position:static!important}
 body .isp-masthead{display:flex;flex-wrap:wrap;padding:14px 12px!important;gap:10px!important;min-height:0}
 body header.sidebar .isp-masthead .brand{font-size:26px!important;border:0!important;padding:0!important;max-width:100%}
 body .isp-header-info{flex:1 1 200px;min-width:0;overflow-wrap:anywhere;font-size:10px!important;line-height:1.5}
 body .isp-header-tools{flex:1 0 100%;width:100%;gap:8px;justify-content:space-between;margin:2px 0 0!important}
 body .isp-header-tools .isp-dashboard-link,body .isp-header-tools button.logout{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px!important}
 body .isp-test-label{font-size:10px;padding:6px 8px;white-space:nowrap}
 body header.sidebar nav.primary-menu,body header.sidebar nav.secondary-menu,body header.sidebar nav.tertiary-menu{display:flex;flex-direction:row;flex-wrap:nowrap!important;width:100%;max-width:100%;overflow-x:auto!important;overscroll-behavior-x:contain;scrollbar-width:thin;padding:4px 8px!important;gap:4px!important}
 body header.sidebar nav a{min-width:0!important;flex:0 0 auto!important;min-height:44px;display:inline-flex;align-items:center;padding:10px 12px!important;font-size:13px!important;white-space:nowrap}
 body .topbar{height:auto!important;min-height:44px;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
 body .box,body #contact-form{width:100%;max-width:100%!important;min-width:0!important;padding:14px!important;margin:14px 0!important;border-radius:12px}
 body h1,body .client-heading h1{font-size:23px!important;line-height:1.3}
 body h2{font-size:18px}
 body .hero,body .client-heading{flex-wrap:wrap;gap:10px;margin:18px 0}
 body .hero h1,body .client-heading h1{width:100%;flex-basis:100%;margin:0!important}
 body button,body .button,body summary{min-height:44px;font-size:14px!important;line-height:1.35;padding:10px 14px}
 body .button,body button{white-space:normal;text-align:center}
 body input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body textarea,body select{box-sizing:border-box;width:100%!important;max-width:100%!important;min-width:0!important;min-height:44px;font-size:16px!important;line-height:1.35;padding:10px!important}
 body input[type=checkbox],body input[type=radio]{width:22px!important;height:22px;flex-shrink:0}
 body label{font-size:13px;margin:10px 0;min-width:0}
 body textarea{min-height:110px}
 body .grid-two,body .contact-columns,body .hardware-form,body .internet-form,body .general-form,body .iptv-form,body .warehouse-edit-fields,body .invoice-grid,body .locality-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px}
 body .contact-row{grid-template-columns:minmax(0,1fr)!important;gap:5px}
 body .contact-row:has(input[type=checkbox]){grid-template-columns:minmax(0,1fr) auto!important;align-items:center;min-height:44px}
 body .contact-panel{padding:12px!important;min-width:0}
 body .contact-actions,body .router-actions,body .outages-actions,body .wifi-client-actions,body .general-toolbar{display:flex;flex-wrap:wrap;gap:8px}
 body .cards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
 body .cards .box{min-width:0!important;padding:12px!important;margin:0!important}
 body .quick-list{grid-template-columns:minmax(0,1fr)!important}
 body .quick-link{display:block;min-height:44px}
 body .notice{font-size:12px;align-items:flex-start;overflow-wrap:anywhere}
 body .contact-filters,body .warehouse-filters:not(.invoice-shared),body .router-filters,body .switch-filters,body .internet-filters,body .general-filters,body .iptv-filters,body .router-status-filters,body .wifi-client-filters,body .wifi-status-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;min-width:0}
 body [class$="-filters"] label,body .warehouse-filters label{min-width:0!important;width:100%!important;margin:0!important}
 body .contact-filters button{margin:0!important;align-self:end}
 body .scroll,body .mobile-table-scroll,body .warehouse-entry-scroll,body .box:has(>table){max-width:100%!important;min-width:0;overflow-x:auto!important;overscroll-behavior-x:contain;scrollbar-width:thin}
 body .mobile-table-scroll{width:100%;margin:8px 0}
 body .mobile-table-hint{display:block;color:#687c91;font-size:12px;margin:4px 0 8px}
 body table{font-size:12px;min-width:560px!important;overflow-wrap:normal}
 body table td,body table th{padding:8px!important;vertical-align:middle}
 body table a{display:inline-block;padding:8px 3px;min-height:40px}
 body .router-info{display:flex;flex-wrap:wrap;gap:10px;min-width:0}
 body .router-card,body .router-card-bar,body .switch-wrap,body .iptv-wrap,body .outages-wrap{max-width:100%;min-width:0}
 body .router-card-bar{flex-wrap:wrap;gap:8px}
 body .router-counters{flex-wrap:wrap;gap:6px}
 body .warehouse-heading{text-align:left;margin:18px 0}
 body .warehouse-pagination{flex-wrap:wrap;gap:10px}
 body .warehouse-batch .invoice-shared{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
 body table.warehouse-entry{min-width:1400px!important;table-layout:fixed}
 body table.warehouse-entry input:not([type=hidden]){height:44px!important;min-height:44px!important;font-size:16px!important;padding:7px!important}
 body .invoice-scan .button{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%}
 body .invoice-scan input[type=file]{max-width:100%!important;font-size:14px!important;padding:4px!important;min-height:44px}
 body .invoice-scan #invoice-read{width:100%;margin:8px 0}
 body .stock-modal-backdrop{padding:10px!important;align-items:center}
 body .stock-modal{padding:20px 16px!important;max-height:calc(100dvh - 20px);width:100%!important}
 body .stock-modal-close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;top:4px;right:4px}
 body .login-layout,body.login-layout{width:100%}
 body.login-layout main{min-height:100dvh;padding:24px 14px!important;display:flex}
 body.login-layout .login-card{width:100%;max-width:440px!important;padding:22px!important}
 body.login-layout .login-brand{font-size:28px}
}
@media screen and (max-width:380px){
 body .cards,body .contact-filters,body .warehouse-filters:not(.invoice-shared){grid-template-columns:minmax(0,1fr)!important}
 body .isp-header-info{flex-basis:100%}
}

.mobile-table-hint[hidden]{display:none!important}
@media screen and (max-width:760px){body .invoice-scan label.button input[type=file]{width:100%!important;max-width:100%!important}body .stock-modal form{min-width:0}body .login-card form input{width:100%!important}}

/* Compact phone masthead, 2026-10-04. Keep 44px touch targets. */
@media screen and (max-width:760px){
 body header.sidebar .isp-masthead{display:grid;grid-template-columns:minmax(0,1fr) 44px auto;align-items:center;column-gap:6px!important;row-gap:2px!important;padding:6px 10px!important;min-height:0}
 body header.sidebar .isp-masthead .brand{grid-column:1;grid-row:1;min-width:0;max-width:100%;font-size:20px!important;line-height:1.1;letter-spacing:-.6px;padding:0!important;border:0!important}
 body header.sidebar .isp-masthead .brand small{display:block;font-size:9px;line-height:1.2;letter-spacing:.4px;margin-top:3px}
 body header.sidebar .isp-masthead .isp-header-tools{display:contents}
 body header.sidebar .isp-masthead .isp-dashboard-link{grid-column:2;grid-row:1;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px!important;border:0}
 body header.sidebar .isp-masthead .isp-header-tools form{grid-column:3;grid-row:1;margin:0;min-width:0}
 body header.sidebar .isp-masthead button.logout{min-height:44px;min-width:44px;padding:8px!important;font-size:12px!important;line-height:1.2;white-space:nowrap;border:0}
 body header.sidebar .isp-masthead .isp-header-info{grid-column:1;grid-row:2;min-width:0;font-size:10px!important;line-height:1.4;overflow:hidden}
 body header.sidebar .isp-masthead .isp-header-info>div:not(:last-child){display:none}
 body header.sidebar .isp-masthead .isp-header-info>div:last-child{font-size:0;line-height:1.4}
 body header.sidebar .isp-masthead .isp-header-info strong{display:block;font-size:10px;line-height:1.4;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body header.sidebar .isp-masthead .isp-test-label{grid-column:2/4;grid-row:2;justify-self:end;margin:0;padding:1px 5px;font-size:8px;line-height:1.4;letter-spacing:.2px;white-space:nowrap}
 body header.sidebar nav.primary-menu,body header.sidebar nav.secondary-menu,body header.sidebar nav.tertiary-menu{padding:2px 6px!important;gap:2px!important}
 body header.sidebar nav a{min-height:44px;padding:8px 10px!important;gap:6px;font-size:12px!important;line-height:1.35}
 body header.sidebar nav .ui-icon{width:18px;height:18px;flex-basis:18px}
}
