#mobile-header,.mobile-hint{display:none}
.table-scroll{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #1769aa;outline-offset:3px}
#app-sidebar{overflow-y:auto}
#mobile-menu{box-sizing:border-box;inset:0 auto 0 0;margin:0;width:min(340px,90vw);height:100dvh;max-height:100dvh;border:0;padding:22px;background:#10233f;color:white}
#mobile-menu::backdrop{background:rgba(16,35,63,.55)}
#mobile-menu nav button{min-height:48px;color:white;font-size:16px;padding:12px;margin:6px 0}
#mobile-menu-close{min-height:44px;margin-bottom:12px}
body.mobile-menu-open{overflow:hidden}
#account-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#account,#sync-status{overflow-wrap:anywhere}
form>label,form>.full{min-width:0}
.board{grid-template-columns:repeat(7,minmax(200px,1fr));overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:10px}
.board .col{min-width:0}
.job{overflow-wrap:anywhere;line-height:1.5}
@media screen and (max-width:900px){
  #app-sidebar{display:none}
  #mobile-header{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:10;background:#10233f;color:white;padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left))}
  #mobile-header strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere}
  main{margin-left:0;padding:16px;min-width:0}
  h1{font-size:26px;overflow-wrap:anywhere}
  h2,h3,h4,p{overflow-wrap:anywhere}
  .panel{padding:16px;box-sizing:border-box;min-width:0}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .card{min-width:0;padding:12px;overflow-wrap:anywhere}
  .num{font-size:24px;overflow-wrap:anywhere}
  form{grid-template-columns:repeat(2,minmax(0,1fr))}
  input,select,textarea{font-size:16px;min-height:44px;max-width:100%}
  button{min-height:44px;font-size:15px;line-height:1.35;max-width:100%}
  form .full>button{margin:4px 2px 4px 0}
  #auth{box-sizing:border-box;width:calc(100% - 24px);margin:24px auto!important}
  #auth form{grid-template-columns:minmax(0,1fr)}
  #account-toolbar{gap:8px;font-size:14px}
  #account-toolbar #account,#account-toolbar #sync-status{flex-basis:100%;min-width:0}
  .record-filters{gap:10px}
  .record-filters label{flex-basis:45%;min-width:0}
  .record-filters button{flex:1 1 140px}
  .mobile-hint{display:block;font-size:13px;color:#42546b;margin:0 0 8px}
  #ct table{min-width:720px}#lt table{min-width:900px}#bt table{min-width:620px}
  th,td{font-size:14px;vertical-align:top}
  td button{display:block;min-width:72px;margin:4px 0}
  #record-editor{box-sizing:border-box;width:calc(100vw - 24px)!important;max-width:700px;max-height:calc(100dvh - 24px);padding:18px!important}
  #record-editor::backdrop{background:rgba(16,35,63,.55)}
  #record-editor h2{margin-top:0}
  #uploaded-documents p,#invoice-list p{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
  #uploaded-documents p span,#invoice-list p span{flex-basis:100%;overflow-wrap:anywhere;min-width:0}
  #invoices .panel>button{margin:4px 4px 4px 0}
  #invoice-preview{padding:12px}
  .invoice-paper{padding:8px}
  .invoice-paper table{min-width:560px}
  #invoice-loads label{display:flex;align-items:center;min-height:44px;box-sizing:border-box;padding:10px 4px;line-height:1.5}
  #invoice-loads input[type=checkbox]{flex:0 0 24px;height:24px;min-height:24px;width:24px;margin-right:10px}
}
@media screen and (max-width:540px){
  main{padding:12px}
  form{grid-template-columns:minmax(0,1fr)}
  .record-filters label{flex-basis:100%}
  #mobile-header strong{font-size:15px}
}
@media print{
  .table-scroll{overflow:visible;max-width:none}
  .invoice-paper table{min-width:0}
  #mobile-header,#mobile-menu,.mobile-hint{display:none!important}
}

.schedule-actions{display:flex;flex-wrap:wrap;gap:10px}.schedule-actions button{min-height:44px}
