/* Device layout: no page-wide horizontal scrolling. */
body{min-width:0}main{box-sizing:border-box;min-width:0}header>div,.stats>div{min-width:0}.stat strong{overflow-wrap:anywhere;font-size:clamp(20px,2vw,27px)}
button,input,select{min-height:44px}input,select,textarea{font-size:16px}.line>*{min-width:0}.line label{min-width:0}td{overflow-wrap:anywhere}td select{min-width:140px}button:focus-visible{outline:3px solid #8eb563;outline-offset:3px}
#menuToggle{display:none}.brand{overflow-wrap:anywhere}.account-controls{margin-left:auto;flex-wrap:wrap}.account-controls>span{overflow-wrap:anywhere;max-width:200px}
aside nav button{height:auto;min-height:44px;padding:10px 16px;line-height:1.2;white-space:normal;overflow:visible;overflow-wrap:anywhere}
/* Keep the full-height desktop sidebar usable when zoom reduces the visible height. */
@media screen and (min-width:901px){aside{height:100vh;min-height:0;display:flex;flex-direction:column;overflow-y:auto}aside nav{flex:1;min-height:0;align-content:start;overflow-y:auto;overscroll-behavior:contain}.local{position:static;flex:none;margin-top:14px}}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overscroll-behavior:contain}dialog form>p:last-child{display:flex;flex-wrap:wrap;gap:10px}dialog fieldset{min-width:0}
.harvest-toggle{width:150px;min-width:150px;max-width:150px;gap:10px}.harvest-toggle>span{width:80px;min-width:80px}.harvest-switch{width:60px;height:44px;min-height:44px;border-radius:24px}.harvest-switch .switch-knob{width:30px;height:30px;left:5px;top:7px}.harvest-switch[aria-checked=true] .switch-knob{transform:translateX(20px)}
@media screen and (max-width:1100px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.row label{min-width:180px}}
@media screen and (max-width:900px){
 aside{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:16px 20px;width:100%;max-width:100vw;min-height:0}aside .brand{margin:0}.local{display:none}#menuToggle{display:block;margin-left:auto;background:#dcebbf;color:#173e2d}aside nav{display:none;width:100%;max-height:calc(100dvh - 110px);margin:0;grid-template-columns:repeat(2,minmax(0,1fr));overflow-y:auto;overscroll-behavior:contain}#menuToggle[aria-expanded=true]+nav{display:grid}aside nav button{white-space:normal;margin:0;min-width:0}
 main{padding:24px 20px;width:100%;max-width:none}.account-controls{width:100%;margin-left:0;justify-content:space-between}header{align-items:start}.row label{min-width:160px}
}
@media screen and (max-width:600px){
 main{padding:20px 12px}h1{font-size:28px}.card{padding:16px}.row{display:grid;grid-template-columns:minmax(0,1fr);width:100%}.row label{min-width:0}label{min-width:0}.stats{gap:10px}.stat{padding:16px}.client-toolbar{align-items:stretch}.client-toolbar>button{width:100%}
 .table-wrap{overflow:visible}.table-wrap table,.table-wrap tbody,.table-wrap tr,.table-wrap td{display:block;width:100%}.table-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.table-wrap tr{border:1px solid #dce2d7;border-radius:12px;margin:0 0 14px;padding:8px;background:#fff}.table-wrap td{display:grid;grid-template-columns:minmax(90px,34%) minmax(0,1fr);gap:10px;padding:10px 6px;border-bottom:1px solid #edf1e8;align-items:center;min-width:0}.table-wrap td:last-child{border-bottom:0}.table-wrap td::before{content:attr(data-label);font-size:12px;font-weight:600;color:#647765}.table-wrap td>*{min-width:0;max-width:100%}.table-wrap td button:not(.harvest-switch){margin:3px 0}.table-wrap td select{min-width:0}.table-wrap td:has(>button,>select){display:flex;flex-wrap:wrap}.table-wrap td:has(>button,>select)::before{flex-basis:100%}
 .harvest-toggle{width:150px;min-width:0;max-width:100%}.harvest-toggle>span{width:auto;min-width:0;font-size:13px}.line{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:14px;background:#f5f7f1;border-radius:10px}.line>label:first-child{grid-column:1/-1}.line>button{grid-column:1/-1}#editDialog .card,#productDialog .card,.access-dialog .card{padding:18px}.client-form-footer{padding:16px;flex-wrap:wrap}.client-form-footer>button{flex:1}.login-screen main{padding:28px 12px}.login-card{padding:22px}.login-card input{width:100%}
}
@media print{#menuToggle,.account-controls{display:none!important}.table-wrap{overflow:visible}button.harvest-switch{display:none!important}}
@media screen and (max-width:600px){.toolbar{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch}.toolbar label{min-width:0}.toolbar button{width:100%}.address-same input{min-height:18px}.table-wrap td[colspan]{display:block}.table-wrap td[colspan]::before{content:none}}
.packing-controls{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:34px;white-space:nowrap;flex-wrap:wrap}.packing-controls>span{display:block;flex:0 0 58px;width:58px;min-width:58px;margin:0;line-height:1.2}.packing-switch.harvest-switch{box-sizing:border-box;position:relative;display:inline-block;flex:0 0 36px;width:36px;height:22px;min-height:22px;padding:0;border:0;border-radius:12px;vertical-align:middle;cursor:pointer}.packing-switch.harvest-switch .switch-knob{position:absolute;width:16px;height:16px;left:3px;top:3px;transform:translateX(0)}.packing-switch.harvest-switch[aria-checked=true] .switch-knob{transform:translateX(14px)}button.packing-print{flex:none;margin:0;padding:6px 10px;line-height:1.2;font-size:12px}
.table-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}.table-actions>button{flex:none;margin:0}
.status-select{width:auto;min-width:145px}
.harvest-toggle{display:flex;align-items:center;gap:10px;width:auto;min-width:128px;max-width:none;white-space:nowrap}.harvest-toggle>span{width:68px;min-width:68px;flex:none}.harvest-toggle .harvest-switch{box-sizing:border-box;position:relative;display:inline-block;flex:0 0 36px;width:36px;height:22px;min-height:22px;padding:0;border:0;border-radius:12px}.harvest-toggle .harvest-switch .switch-knob{position:absolute;width:16px;height:16px;left:3px;top:3px;transform:translateX(0)}.harvest-toggle .harvest-switch[aria-checked=true] .switch-knob{transform:translateX(14px)}
.harvest-table-actions{display:flex;justify-content:flex-end;margin-top:12px}
@media screen and (max-width:600px){.harvest-table-actions{justify-content:stretch}.harvest-table-actions>button{width:100%}.table-actions{gap:5px}}
.app-message-dialog{width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px);padding:0;border:0;border-radius:18px;background:transparent;color:#203a2d;overflow:visible}
.app-message-dialog::backdrop{background:#10291eb3;backdrop-filter:blur(2px)}
.app-message-dialog .card{margin:0;padding:28px;border-radius:18px;box-shadow:0 24px 70px #10291e40}
.app-message-dialog h2{margin:10px 0}.app-message-dialog #appMessageText{color:#4e6052;line-height:1.6}.app-message-dialog #appMessageAction{width:100%;margin-top:8px}
.app-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.app-confirm-actions button{min-width:120px}
@media screen and (max-width:420px){.app-confirm-actions{flex-direction:column-reverse}.app-confirm-actions button{width:100%}}
.orders-stat-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:10px}.orders-stat-cards>.stat{min-height:0;padding:18px 22px}.orders-stat-cards>.stat>strong{font-size:32px;margin-top:8px}.orders-stat-cards>.stat>small{margin-top:4px}.daily-orders-stat label{min-width:0;width:100%;margin-top:6px}.daily-orders-stat select{min-width:0;width:100%}.client-toolbar #newOrder{display:block;width:max-content;max-width:100%;margin-top:12px}header #print{margin-left:auto}
.page-description{margin:-2px 0 0;color:#677666;font-size:15px}.orders-toolbar{justify-content:flex-end;margin:0 0 10px}.orders-list-title{text-align:center;margin:0 0 20px}
.harvest-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.harvest-heading h2{margin:0}
.nav-report-group{display:grid;gap:4px}.nav-report-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;background:transparent;color:#dce8d9;border:0}.nav-report-submenu{display:grid;gap:4px;padding-left:14px}.nav-report-submenu[hidden]{display:none}.nav-report-submenu button{font-size:13px;padding:10px 12px;line-height:1.25}.nav-report-group.expanded .nav-report-toggle span{transform:rotate(180deg)}.orders-show-all{margin:10px 0}.report-screen>label{max-width:420px}.report-total{margin-top:22px;max-width:420px}.report-total strong{font-size:clamp(32px,5vw,48px)}
.report-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.report-heading h2{margin:0}.report-controls{display:flex;align-items:end;flex-wrap:wrap;gap:14px;margin-top:20px}.report-controls label{max-width:420px}.report-screen h3{margin-top:28px}
@media screen and (max-width:900px){.nav-report-group{grid-column:1/-1}.nav-report-submenu{grid-template-columns:1fr}.nav-report-submenu button{white-space:normal}}
@media screen and (max-width:600px){.orders-stat-cards{grid-template-columns:minmax(0,1fr);gap:10px}.orders-stat-cards>.stat{min-height:0;padding:16px}.client-toolbar #newOrder{width:100%}.report-screen>label,.report-total,.report-controls label{max-width:none}.report-heading{align-items:flex-start;flex-direction:column}.report-heading button{width:100%}.report-controls{display:grid;grid-template-columns:minmax(0,1fr)}.report-controls button{width:100%}.harvest-heading{align-items:flex-start;flex-direction:column}.harvest-heading button{width:100%}}
