/* Mobile additions. The approved desktop stylesheet remains unchanged. */
.mobile-nav-toggle{display:none}
@media(max-width:760px){
 html{-webkit-text-size-adjust:100%}
 body{padding-bottom:env(safe-area-inset-bottom)}
 .sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 16px;overflow:visible}
 .side-brand .brand-text{display:block}.side-brand{min-width:0}.side-brand h1{font-size:18px}
 .mobile-nav-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid #ffffff55;border-radius:10px;background:#ffffff12;color:#fff;font-weight:700}
 .sidebar .nav{display:none;grid-column:1/-1;margin:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .sidebar.mobile-open .nav{display:grid}.nav .label{display:inline}.nav button{justify-content:flex-start;min-height:48px;padding:10px;font-size:14px}.nav .ico{flex:0 0 20px}
 .topbar{height:auto;min-height:72px;position:static;flex-wrap:wrap;gap:12px;padding:14px 16px}
 .topbar>div:first-child{flex:1 1 160px;min-width:0}.topbar h3{font-size:14px;line-height:1.4}.topbar .small{line-height:1.5;overflow-wrap:anywhere}
 .user{margin-left:auto;min-width:0}.avatar{display:none}.user>div:first-child{max-width:180px;overflow-wrap:anywhere}
 .content{padding:20px 14px 30px}.page-title{gap:14px;margin-bottom:18px}.page-title h2{font-size:24px;line-height:1.2}.page-title p{font-size:14px;line-height:1.5}
 .page-title>div,.page-title>.select,.page-title .actions{width:100%;min-width:0}
 .actions{gap:10px}.actions>.btn{flex:1 1 140px}.btn,.small-btn,.select{min-height:44px}.btn{font-size:14px;white-space:normal}.small-btn{font-size:13px}
 .select{width:100%;min-width:0;max-width:100%;font-size:16px}
 .grid,.portaria-grid,.client-grid,.form-grid,.filters,.reading-form,.qrbox,.credential-grid{min-width:0;gap:14px}
 .grid>* , .portaria-grid>*,.client-grid>*,.form-grid>*,.filters>*,.reading-form>*,.credential-grid>*{min-width:0}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{padding:14px}.stat .label{font-size:12px;line-height:1.35}.stat .value{font-size:25px;overflow-wrap:anywhere}.stat .hint{line-height:1.4}
 .card{min-width:0;padding:16px;border-radius:15px}.card h3{line-height:1.4}.small{line-height:1.5}
 .field{min-width:0}.field label{font-size:13px;line-height:1.4}.field input,.field select,.field textarea{width:100%;min-width:0;max-width:100%;font-size:16px;min-height:46px}
 .device{flex-wrap:wrap;align-items:flex-start}.device-left{min-width:0;flex:1 1 190px}.device-left>div:last-child{min-width:0;overflow-wrap:anywhere}.device-ico{flex-shrink:0}.device>b{overflow-wrap:anywhere;max-width:100%}
 .keyrow{align-items:flex-start;flex-wrap:wrap}.keyrow>span{font-size:13px}.keyrow code{max-width:100%;overflow-wrap:anywhere;font-size:13px}.keyrow b{overflow-wrap:anywhere}
 .credential-card{min-width:0;padding:14px}.notice,.warn-note,.bad-note{overflow-wrap:anywhere;font-size:13px}
 .table-wrap{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding-bottom:4px}.table-wrap:focus-visible{outline:2px solid var(--accent)}
 th,td{font-size:13px;padding:12px}.res-card{grid-template-columns:80px minmax(0,1fr);gap:12px}.tank{width:72px;height:118px}.big{font-size:26px}
 .chart{height:190px}.qrbox{grid-template-columns:1fr}.qrbox>div:first-child{display:none}.reading-form>.btn{width:100%}
 .modal-bg{padding:10px;align-items:center}.modal{width:100%!important;max-height:calc(100dvh - 20px);border-radius:17px}.modal-head{position:sticky;top:0;background:#fff;z-index:2;padding:14px;gap:10px}.modal-head b{min-width:0;overflow-wrap:anywhere}.close{min-width:44px;min-height:44px}.modal-body{padding:16px}.modal-foot{padding:14px;flex-wrap:wrap}.modal-foot .btn{flex:1 1 120px}
 .login-page{padding:20px 14px;min-height:100dvh}.login-card{padding:24px 20px;border-radius:20px}.login-card h2{font-size:22px}.brand h1{font-size:22px}
 .toast{left:14px;right:14px;bottom:calc(14px + env(safe-area-inset-bottom));font-size:14px;line-height:1.5}
}
@media(max-width:350px){.stats{grid-template-columns:1fr}.nav button{font-size:13px}.content{padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){.pulse{animation:none}}
