/* The working day: big targets for busy hands, one decision per screen. */
.wk-days{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px;margin:0 -2px;scrollbar-width:none}
.wk-days button{flex:none;min-height:48px;padding:6px 14px;border:1px solid #cfd6c4;border-radius:14px;background:#fffefa;color:#253c19;font:inherit;text-align:left;line-height:1.2}
.wk-days button[aria-pressed=true]{background:#4a5d23;border-color:#4a5d23;color:#fff}
.wk-days small{display:block;font-size:12px;opacity:.85}
.wk-stages{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:8px 0 18px}
.wk-stage{background:#fffefa;border:1px solid #e1e5d8;border-radius:16px;padding:14px}
.wk-stage strong{display:block;font:600 30px/1 Fraunces,Georgia,serif;color:#253c19}
.wk-stage span{font-size:13px;color:#4c5547}
.wk-stage.alert{background:#fff6ec;border-color:#e6c9a4}
.wk-money{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0 0 18px}
.wk-money div{background:#eef1e6;border-radius:16px;padding:14px}
.wk-money strong{display:block;font:600 24px/1.1 Fraunces,Georgia,serif}
.wk-money small{color:#4c5547}
.wk-group{margin:18px 0 8px;font:600 15px/1.3 system-ui,sans-serif;color:#253c19;display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.wk-group small{font-weight:400;color:#5d6657}
.wk-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #e7eadf}
.wk-row:first-of-type{border-top:0}
.wk-row .who{flex:1;min-width:0}
.wk-row .who strong{display:block;overflow-wrap:anywhere}
.wk-row .who small{color:#5d6657}
.wk-row .amount{font-weight:650;white-space:nowrap}
.wk-done{color:#4a5d23;font-weight:600}
.wk-pay{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.wk-pay button,.wk-chip{min-height:44px;padding:8px 12px;border:1px solid #cfd6c4;border-radius:12px;background:#fffefa;color:#253c19;font:600 14px/1 system-ui,sans-serif}
.wk-pay button:first-child{background:#4a5d23;border-color:#4a5d23;color:#fff}
.wk-big{display:block;width:100%;min-height:58px;margin:10px 0 0;border:0;border-radius:16px;background:#4a5d23;color:#fff;font:650 17px/1.2 system-ui,sans-serif}
.wk-big.alt{background:#fffefa;color:#253c19;border:1px solid #cfd6c4}
.wk-big.warn{background:#fffefa;color:#8a3b12;border:1px solid #e6c9a4}
.wk-big:disabled,.wk-pay button:disabled{opacity:.5}
.wk-search{position:sticky;top:0;z-index:2;background:#faf8f1;padding:8px 0}
.wk-search input{width:100%;min-height:52px;border:1px solid #cfd6c4;border-radius:14px;padding:0 14px;font:inherit;background:#fffefa}
.wk-pick{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid #e7eadf}
.wk-pick:first-of-type{border-top:0}
.wk-lines{margin:10px 0;padding:0;list-style:none}
.wk-lines li{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-top:1px solid #e7eadf;align-items:center}
.wk-lines li.inbox{padding-left:16px;color:#4c5547;font-size:14px}
.wk-lines input{width:120px;min-height:48px;border:1px solid #cfd6c4;border-radius:12px;padding:0 10px;font:inherit;text-align:right}
.wk-stepper{display:flex;align-items:center;gap:14px;justify-content:center;margin:14px 0 4px}
.wk-stepper button{width:54px;height:54px;border-radius:50%;border:1px solid #cfd6c4;background:#fffefa;font-size:24px;color:#253c19}
.wk-stepper output{font:600 22px/1 Fraunces,Georgia,serif;min-width:150px;text-align:center}
.wk-next{background:#eef1e6;border-radius:20px;padding:18px;margin:6px 0 16px}
.wk-next h2{margin:4px 0 6px}
.wk-next a.call{display:inline-block;margin:6px 0;font-weight:600;color:#253c19}
.wk-stopdone{opacity:.62}
.wk-tools{margin-top:26px}
.wk-tools summary{cursor:pointer;color:#4c5547}
@media (min-width:900px){.wk-cols{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}}
@media (max-width:360px){.wk-big{font-size:15.5px}.wk-pay button,.wk-chip{padding:8px 10px;font-size:13px}}
/* Phone: the name keeps its line, the payment buttons take the next one at full width. */
@media (max-width:700px){.wk-row{flex-wrap:wrap}.wk-row .who{flex:1 1 60%}.wk-row .wk-pay{flex:1 1 100%;justify-content:stretch}.wk-row .wk-pay button{flex:1 1 0;padding:8px 6px;overflow-wrap:normal}}
.wk-warn{display:block;color:#8a3b12;font-weight:600}
/* Packing sheet: tick what is in, weigh, correct a price, read the final total. */
.wk-lines li{display:grid;grid-template-columns:48px 1fr auto auto;gap:8px;align-items:center}
.wk-lines li.inbox{grid-template-columns:48px 1fr;padding-left:0}
.wk-tick{width:44px;height:44px;border-radius:50%;border:2px solid #cfd6c4;background:#fffefa;color:transparent;font:700 20px/1 system-ui,sans-serif}
.wk-tick[aria-pressed=true]{background:#4a5d23;border-color:#4a5d23;color:#fff}
.wk-lines li.inbox .wk-tick{width:34px;height:34px;font-size:15px;justify-self:center}
.wk-price{min-height:44px;padding:6px 10px;border:1px dashed #cfd6c4;border-radius:12px;background:#fffefa;color:#253c19;font:650 15px/1 system-ui,sans-serif;white-space:nowrap}
span.wk-price{border:0;display:inline-grid;place-items:center}
.wk-lines input.wk-priceinput{width:88px}
.wk-total{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin:12px 0 0;padding-top:12px;border-top:2px solid #253c19;font-size:15px}
.wk-total strong{font:600 26px/1 Fraunces,Georgia,serif}
@media (max-width:420px){.wk-lines li{grid-template-columns:44px 1fr auto}.wk-lines li input[name^="w-"]{grid-column:2/3;width:100%}.wk-lines li .wk-price,.wk-lines li .wk-priceinput{grid-column:3/4}}
/* A question of the sheet with its answers: the answers take their own line under the question, thumb-sized; one column on a
   phone, side by side where there is room. The sentence that arms «rifai» spans the whole line above the buttons. */
.wk-row.wk-ask{flex-wrap:wrap}
.wk-answers{flex:1 1 100%;min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:8px;margin-top:4px}
.wk-answers .wk-big{margin:0;padding:8px 12px;text-align:center;overflow-wrap:anywhere}
.wk-answers>p{grid-column:1/-1;margin:0}
.wk-row .who small.wk-line{display:block}
/* The same question at the top of the order sheet: a breath before the lines of the purchase. */
[data-sheet-ask]{margin:0 0 16px}

/* The packing table thought again: products tappable with shared progress, crates grouped by portion, the round final price. */
button.wk-pick.wk-prod{width:100%;min-height:58px;background:none;border:0;border-top:1px solid #e7eadf;font:inherit;color:inherit;text-align:left;align-items:center;cursor:pointer;padding:10px 0}
.wk-class+button.wk-pick.wk-prod{border-top:0}
.wk-prod .wk-prog{text-align:right;white-space:nowrap}
.wk-prod .wk-prog small{display:block;color:#5d6657;font-size:13px}
.wk-prod.done{color:#5d6657}.wk-prod.done .wk-prog small{color:#4a5d23;font-weight:600}
.wk-class{margin:18px 0 2px;font:600 12px/1.3 system-ui,sans-serif;letter-spacing:.05em;text-transform:uppercase;color:#5d6657}
.wk-chip.go{background:#4a5d23;border-color:#4a5d23;color:#fff}
.wk-modes{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 6px}
.wk-modes button{flex:1;min-height:48px;border:1px solid #cfd6c4;border-radius:12px;background:#fffefa;color:#253c19;font:600 14px/1.1 system-ui,sans-serif}
.wk-modes button[aria-pressed=true]{background:#253c19;border-color:#253c19;color:#fff}
.wk-portion{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:20px 0 8px;min-height:44px}
.wk-portion strong{font:600 22px/1 Fraunces,Georgia,serif}.wk-portion strong small{font:500 14px/1 system-ui,sans-serif;color:#5d6657}
.wk-crates{display:flex;flex-wrap:wrap;gap:8px}
.wk-where{flex:1 1 100%;font:600 12px/1.2 system-ui,sans-serif;color:#5d6657;margin-top:2px}
.wk-crate{flex:1 1 calc(50% - 4px);min-width:0;min-height:54px;padding:6px 10px;border:2px solid #cfd6c4;border-radius:14px;background:#fffefa;color:#253c19;font:600 15px/1.15 system-ui,sans-serif;text-align:left;overflow-wrap:anywhere}
.wk-crate small{display:block;font-weight:500;font-size:12px}
.wk-crate.done{background:#4a5d23;border-color:#4a5d23;color:#fff}
.wk-crate.missing{background:#fbf1e6;border-color:#e6c9a4;color:#8a3b12}.wk-crate.missing span{text-decoration:line-through}
.wk-crate.changed{border-color:#d9a441;background:#fff8e6}
@media (min-width:700px){.wk-crate{flex:0 1 200px}}
.wk-weigh{margin:10px 0;padding:12px;border:1px solid #cfd6c4;border-radius:16px;background:#fffefa}
.wk-weigh input{width:100%;min-height:56px;border:1px solid #cfd6c4;border-radius:12px;padding:0 12px;font:600 22px/1 system-ui,sans-serif;text-align:right}
.wk-miss{display:block;border:0;background:none;color:#8a3b12;text-decoration:underline;font:500 13px/1.2 system-ui,sans-serif;padding:8px 0 2px;min-height:44px;min-width:44px;text-align:left}
.wk-lines li.missing .what strong{text-decoration:line-through;color:#8a3b12}
.wk-lines li .what small.wk-warn{display:block}
.wk-final{display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:center;margin:14px 0 4px;padding:14px;border-radius:16px;background:#eef1e6}
.wk-final>span{font-weight:650}.wk-final>span small{display:block;font-weight:400;color:#5d6657;font-size:13px}
.wk-final-step{display:flex;align-items:center;gap:10px}
.wk-final-step button{width:54px;height:54px;border-radius:50%;border:1px solid #cfd6c4;background:#fffefa;font-size:24px;color:#253c19}
.wk-final-step output{font:600 26px/1 Fraunces,Georgia,serif;min-width:104px;text-align:center}
.wk-final .wk-miss{grid-column:1/-1;color:#253c19;padding:2px 0}
@media (max-width:420px){.wk-final{grid-template-columns:1fr}.wk-final-step{justify-content:space-between}}
.wk-lines li.missing input{display:none}
.wk-lines li .what small.wk-warn:empty,#wkFinalNote:empty{display:none}
#wkFinalNote{grid-column:1/-1}

/* Shared preparation views: stable crate identity and assignment remain legible on a phone. */
.wk-assignment{display:block;margin-top:8px;font-size:12px;color:#5d6657}
/* contain:paint: WebKit counts the chosen name as overflow of the label, and a long one pushed a 320px page sideways. */
.wk-assignment select{display:block;max-width:100%;min-height:44px;margin-top:3px;padding:6px;border:1px solid #cfd6c4;border-radius:8px;background:#fffefa;font:inherit;color:#253c19;contain:paint}
[data-wk-products] [hidden]{display:none!important}
.wk-lines:not(:has(.wk-tick)) li{grid-template-columns:minmax(0,1fr) auto}
.wk-lines:not(:has(.wk-tick)) li>span{overflow-wrap:anywhere}
.wk-final>output{font-weight:700;font-size:24px}

.wk-weight-conflict{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;background:#fff0df;padding:10px;border-radius:10px;color:#7c3315;font-size:14px}

.wk-crate.wk-fixed-portion:disabled{opacity:1;color:#5d6657;border-style:dashed;background:#f0f1e9;cursor:default}

/* Only the site's orders are here while WhatsApp stays on the sheet: one short line, read at a glance. */
.app-note.wk-site{font-size:15px;font-weight:600;color:#253c19;background:#fff6ec;border-color:#e6c9a4}

/* Risposte di Gabriele, 11/10/2026: notes read before closing, products awaited from the supplier, the crate's size. */
.wk-notes{margin:12px 0;padding:12px 14px;border:1px solid #d9b77a;border-radius:16px;background:#fff8ea}
.wk-notes h3{margin:0 0 8px;font:650 16px/1.3 system-ui,sans-serif;color:#6b4a12}
.wk-note{display:grid;grid-template-columns:1fr auto;gap:2px 12px;align-items:center;padding:8px 0;border-top:1px solid #efdcb6}
.wk-note:first-of-type{border-top:0}
.wk-note strong{grid-column:1/-1;font-size:13px;color:#6b4a12}
.wk-note p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.wk-note small{color:#253c19;font-weight:600}
.wk-note.read{opacity:.75}
.wk-lines li.waiting .what strong{color:#6b4a12}
.wk-lines li.waiting .wk-tick{border-style:dashed}
.wk-wait{color:#6b4a12}
.wk-close-why{margin:6px 0 0;color:#6b4a12;font-size:14px}
.wk-close-why:empty{display:none}
#wkClose:disabled{opacity:.55;cursor:not-allowed}
[data-wk-crate-size] .wk-warn{display:inline;color:#8a3b12}

/* Search must override the row flex display, including every cash list. */
.wk-row[hidden],[data-wk-cash-group][hidden],[data-wk-due-group][hidden],[data-wk-cash-empty][hidden],[data-wk-search-empty][hidden],[data-wk-overdue-found][hidden]{display:none!important}
[data-wk-cash-group] .wk-group,[data-wk-due-group] .wk-group{flex-wrap:wrap}

/* Cash: tick the rows that were paid, one bar at the bottom records them all. */
.wk-check{flex:none;display:block;position:relative;width:44px;height:44px;margin:-4px 0 -4px -6px}
.wk-check input{-webkit-appearance:none;appearance:none;display:block;position:relative;width:44px;height:44px;margin:0;border:0;border-radius:12px;background:transparent;cursor:pointer}
.wk-check input::before{content:"";position:absolute;top:8px;right:8px;bottom:8px;left:8px;border:2px solid #7d8a6a;border-radius:8px;background:#fffefa}
.wk-check input:checked::before{border-color:#4a5d23;background:#4a5d23 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/78% no-repeat}
.wk-check input:focus-visible{outline:3px solid #4a5d23;outline-offset:1px}
.wk-dock{position:sticky;bottom:0;z-index:4;margin-top:14px;padding:10px 12px max(10px,env(safe-area-inset-bottom));background:#fffefa;border:1px solid #cfd6c4;border-bottom:0;border-radius:16px 16px 0 0;box-shadow:0 -8px 20px rgba(37,60,25,.14)}
.wk-dock[hidden]{display:none}
.wk-bar{display:grid;gap:8px}
.wk-bar-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px}
.wk-bar-top p{margin:0;min-width:0;flex:1 1 150px}
.wk-bar-top strong{display:block;font:650 17px/1.25 system-ui,sans-serif;color:#253c19}
.wk-bar-top small{display:block;color:#5d6657}
.wk-bulk-methods{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.wk-bulk-methods button{min-height:48px;padding:8px 10px;border:0;border-radius:12px;background:#4a5d23;color:#fff;font:650 15px/1.15 system-ui,sans-serif}
.wk-said{margin:0 0 8px;padding:10px 12px;border:1px solid #cfd6c4;border-radius:12px;background:#eef1e6;max-height:40vh;overflow:auto;overflow-wrap:anywhere}
.wk-said.bad{background:#fff6ec;border-color:#e6c9a4}
.wk-said ul{margin:6px 0;padding-left:18px}
.wk-said .wk-chip{display:block;margin-top:8px}
#wkBulkPay .wk-pick span{min-width:0;overflow-wrap:anywhere}
#wkBulkPay .wk-pick small{color:#5d6657}

/* The courier must see their current work before date/history controls on a small screen. */
.wk-driver-summary{display:grid;gap:.3rem;padding:.8rem 1rem;border:1px solid #d7dfc8;border-radius:14px;background:#eef2e6;margin:.6rem 0 1rem}
.wk-driver-summary strong{font-size:1.2rem;line-height:1.3}.wk-driver-summary span{font-size:.9rem}
.wk-driver-dates{margin:.7rem 0}.wk-driver-dates summary{cursor:pointer}.wk-driver-dates p{font-size:.9rem}
.wk-driver-page [data-driver-date-controls]{align-items:end;gap:.5rem}.wk-driver-page [data-driver-date-controls] button{min-height:44px;height:44px}
@media(max-width:600px){.wk-driver-page h1{font-size:1.8rem;margin:.35rem 0}.wk-driver-page .wk-driver-summary{margin:.4rem 0 .8rem}.wk-driver-page [data-driver-grid-assignments]{padding:1rem}.wk-driver-page [data-driver-grid-assignments]>h2{font-size:1.25rem}}
/* 7/11/2026 (Pedro, after Silvio): the delivery line under the total and «Modifica prezzo definitivo» with its reason. */
.wk-delivery{margin:8px 0 0;color:#40513a;font-size:14px;line-height:1.4}
.wk-final .wk-override{grid-column:1/-1;margin-top:10px}
.wk-override .quiet-note{margin:8px 0 0;font-size:13px}
.wk-override .form-field{display:grid;gap:6px;margin:12px 0 0;font-weight:600;color:#253c19}
.wk-override input,.wk-override textarea{width:100%;max-width:100%;box-sizing:border-box;font:16px/1.35 system-ui,sans-serif;padding:10px 12px;border:1px solid #cfd6c4;border-radius:12px;background:#fffefa;color:#1f2a1a}
.wk-override input{max-width:11em;min-height:44px}
.wk-override textarea{resize:vertical;min-height:64px}
.wk-final-step button:disabled,.wk-final .wk-miss:disabled{opacity:.4;cursor:not-allowed}
.wk-adjustments{margin:8px 0 0;padding-left:20px;color:#40513a;font-size:14px;line-height:1.45}
/* The general error box opens at the top of a window whose title stays fixed: it is scrolled to just under that title. */
#modalContent #pilotError{scroll-margin-top:96px}
