.mobile-nav,.mobile-backdrop,.mobile-brand,.drawer-close,.mobile-order-list,.mobile-work-list{display:none}
.home-screen-button{display:flex;gap:.6rem;align-items:center;justify-content:center;min-height:44px;margin:.8rem 0 0;width:100%;border:1px solid #c3d2e2;border-radius:10px;background:transparent;color:inherit;font-size:.85rem}
.sidebar .home-screen-button{border-color:#ffffff50;color:white}
.home-screen-mode .home-screen-button{display:none}
.connection-status{margin:0;padding:.8rem 1rem;color:#764f06;background:#fff1cc;font-size:.9rem;line-height:1.5}
.connection-status[hidden]{display:none}
.install-instructions{line-height:1.65;max-width:540px;margin:auto}
.install-instructions>img{display:block;border-radius:18px;margin:0 auto 1rem}
.install-instructions h3{margin-top:1.4rem}
.delivery-health{margin-bottom:1.5rem}
.delivery-health .stats{margin-bottom:1rem}
.sidebar{overflow-y:auto;overscroll-behavior:contain}
@media(max-width:760px){
 html{scroll-padding-top:100px;background:#102c50}
 body{background:#f3f6fa;-webkit-tap-highlight-color:transparent}
 button,a,input,select,textarea{touch-action:manipulation}
 input,select,textarea{font-size:16px!important}
 button,.button,.icon-button{min-height:44px}
 .small{min-height:44px}
 .app-shell{min-height:100dvh;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
 .topbar{position:sticky;top:0;z-index:12;min-height:64px;padding:calc(.65rem + env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) .65rem max(1rem,env(safe-area-inset-left));background:#102c50;color:white;border:0;gap:.5rem}
 .topbar .mobile-toggle{display:none}
 .topbar .avatar{display:none}
 .topbar .ghost{color:white;padding:.55rem;min-width:44px}
 .mobile-brand{display:flex;align-items:center;gap:.65rem;min-width:0}
 .mobile-brand img{width:38px;height:38px;border-radius:9px;flex-shrink:0}
 .mobile-brand>div{min-width:0}
 .mobile-brand small{display:block;font-size:.65rem;letter-spacing:.06em;color:#b9cde5;margin-bottom:.15rem}
 .mobile-page-name{display:block;max-width:49vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650;font-size:.9rem}
 .content{padding:1.4rem max(1rem,env(safe-area-inset-right)) 1.5rem max(1rem,env(safe-area-inset-left));min-width:0}
 .page-head h1{font-size:1.65rem;letter-spacing:-.025em}
 .page-head .eyebrow{font-size:.65rem}
 .page-head>div{min-width:0;max-width:100%}
 .page-head h1,.page-head p{overflow-wrap:anywhere}
 .page-head>.row{width:100%}
 .page-head>.row>button,.page-head>button{flex:1;border-radius:12px}
 .stats{gap:.65rem}
 .stat{border-radius:16px;padding:1rem;box-shadow:0 2px 4px #102c5003}
 .stat-label{font-size:.78rem;line-height:1.45}
 .orders-stats{grid-template-columns:repeat(4,minmax(136px,1fr));overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:.3rem}
 .orders-stats .stat{scroll-snap-align:start;padding:.85rem}
 .orders-stats .stat-label{min-height:2.9em;margin-bottom:.25rem}
 .orders-stats .stat-hint{display:none}
 .stat-hint{font-size:.72rem;line-height:1.4}
 .panel{border-radius:16px;min-width:0}
 .toolbar{gap:.7rem}
 .toolbar .search-wrap{min-width:0;flex:1 0 100%;max-width:none}
 .toolbar .search-wrap input{border-radius:12px}
 .mobile-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:14;background:#fff;border-top:1px solid #dbe4ef;padding:.35rem max(.45rem,env(safe-area-inset-right)) calc(.35rem + env(safe-area-inset-bottom)) max(.45rem,env(safe-area-inset-left));box-shadow:0 -5px 25px #102c5006}
 .mobile-nav a,.mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;color:#60738a;background:transparent;border:0;border-radius:12px;min-height:57px;font-size:.7rem;font-weight:550;text-decoration:none;padding:.35rem .2rem;min-width:0}
 .mobile-nav .icon{width:22px;height:22px}
 .mobile-nav .active{color:#123d64;background:#edf4fc;font-weight:750}
 .sidebar{width:min(330px,calc(100vw - 40px));z-index:30;padding:calc(1rem + env(safe-area-inset-top)) 1.1rem calc(1.3rem + env(safe-area-inset-bottom));height:100dvh;box-shadow:none}
 .sidebar.open{box-shadow:10px 0 50px #102c5040}
 .drawer-close{display:flex;align-self:flex-end;color:white;margin-bottom:.5rem;flex-shrink:0}
 .sidebar .brand-logo{flex-shrink:0}
 .sidebar .nav-label{margin-top:1.4rem}
 .sidebar .nav-item{min-height:46px;padding:.65rem .8rem}
 .sidebar-foot{margin-top:1rem}
 .mobile-menu-open{overflow:hidden}
 .mobile-menu-open .mobile-backdrop{display:block;position:fixed;inset:0;z-index:29;width:100%;height:100dvh;border:0;border-radius:0;background:#081d39a6;backdrop-filter:blur(2px)}
 .desktop-order-table,.desktop-work-table{display:none}
 .mobile-order-list{display:grid;gap:.9rem;padding:1rem;background:#f3f6fa}
 .mobile-order-card{padding:1rem;background:white;border:1px solid #e0e8f1;border-radius:16px;min-width:0;box-shadow:0 3px 12px #102c5004}
 .mobile-order-card .badge{font-size:.7rem;max-width:65%;white-space:normal;text-align:center}
 .mobile-order-title{display:block;font-weight:750;font-size:1.05rem;color:#143858;line-height:1.45;padding:.6rem 0 .2rem;overflow-wrap:anywhere;min-height:44px}
 .mobile-order-person{font-size:.85rem;color:#394f69;line-height:1.5;margin:.2rem 0 1rem;overflow-wrap:anywhere}
 .mobile-order-person span{display:block;color:#738297;font-size:.75rem}
 .mobile-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-radius:12px;background:#f3f7fb;padding:.85rem .3rem;margin:0;gap:0}
 .mobile-counts>div{text-align:center;padding:0 .3rem;min-width:0;border-right:1px solid #dbe5ef}
 .mobile-counts>div:last-child{border-right:0}
 .mobile-counts dt{font-size:.67rem;color:#63758a;line-height:1.35;min-height:2.7em}
 .mobile-counts dd{margin:.35rem 0 0;font-size:1rem;font-weight:750;color:#153c63;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .counts-pending{font-size:.68rem;font-weight:500;line-height:1.3;display:block;color:#6a7e95}
 .mobile-order-footer{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding-top:.65rem;font-size:.7rem;color:#6b7c90;flex-wrap:wrap}
 .mobile-order-footer>a{display:inline-flex;align-items:center;gap:.35rem;font-size:.73rem;min-height:44px;color:#235979}
 .mobile-order-footer .count-badge{margin:0}
 .mobile-work-list{display:grid;gap:.8rem;margin-top:1rem}
 .mobile-work-card{display:flex;position:relative;flex-direction:column;gap:.35rem;background:#f7f9fc;border:1px solid #dce5ef;border-radius:12px;padding:1rem;text-decoration:none;color:#183650;overflow-wrap:anywhere}
 .mobile-work-card>strong{font-size:.95rem}
 .mobile-work-card>.icon{position:absolute;right:1rem;bottom:1rem;color:#4b7d9f}
 .mobile-work-card .work-action{font-size:.86rem;line-height:1.5;padding:.4rem 1.5rem .2rem 0}
 .tabs{flex-wrap:nowrap;overflow-x:auto;gap:.75rem;scrollbar-width:none;margin-left:-1rem;margin-right:-1rem;padding:0 1rem}
 .tab{flex:0 0 auto;white-space:nowrap;min-height:48px}
 .pipeline{flex-wrap:nowrap;overflow-x:auto;scroll-snap-type:x proximity;padding:1rem;gap:.7rem}
 .pipeline .step{flex:0 0 115px;scroll-snap-align:center}
 dialog,dialog.proof-dialog,dialog.counts-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0;overscroll-behavior:contain}
 .modal-head{padding:calc(.85rem + env(safe-area-inset-top)) 1rem .85rem;background:#fff}
 .modal-head h2{font-size:1.1rem}
 .modal-body{padding:1.2rem 1rem calc(1.5rem + env(safe-area-inset-bottom))}
 .modal-footer{gap:.6rem}
 .modal-footer button{min-height:48px;border-radius:12px}
 .message-list{max-height:55dvh}
 .message .body{padding:.85rem .9rem;border-radius:14px}
 .composer textarea{min-height:100px}
 .file-actions{width:100%}
 .file-actions .button,.file-actions button{flex:1}
 .detail-meta{grid-template-columns:1fr 1fr}
 #toast{bottom:calc(84px + env(safe-area-inset-bottom));font-size:.875rem}
 .loading{padding:3rem 1rem}
 .auth-wrap{min-height:100dvh;padding:calc(1.5rem + env(safe-area-inset-top)) 1.2rem calc(1.5rem + env(safe-area-inset-bottom))}
 .auth-card{border-radius:24px;padding:1.8rem 1.4rem}
 .auth-card .brand-logo{margin-bottom:1.4rem}
 .auth-card h1{font-size:1.7rem}
}
@media print{.mobile-nav,.mobile-brand,.mobile-backdrop,.mobile-order-list,.mobile-work-list,.home-screen-button,.connection-status,.drawer-close{display:none!important}.desktop-order-table,.desktop-work-table{display:block!important}}
