
.tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:760px;margin:auto}.tool-card{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:16px 13px;text-align:left;background:var(--card,#fff);border:1px solid var(--line);border-radius:17px;color:var(--ink);min-height:122px}.tool-card:hover{border-color:var(--accent)}.tool-icon{color:var(--accent);display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--soft)}.tool-card strong{font-size:15px;line-height:1.25}.tool-card small{font-size:11px;color:var(--muted);white-space:nowrap;letter-spacing:-.15px}.tool-page{max-width:760px;margin:auto;min-width:0}.tool-back,.tool-link{border:0;color:var(--accent);background:transparent;font-size:13px;font-weight:650;padding:8px 0;text-align:left;cursor:pointer}.tool-back{margin-bottom:8px}.tool-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}.tool-heading h2,.tool-heading h3{margin:0}.tool-heading h2{font-size:22px}.tool-heading button{font-size:13px;min-height:36px}.tool-section{background:var(--card,#fff);border:1px solid var(--line);border-radius:16px;padding:14px;margin:10px 0}.tool-section h3{font-size:16px;margin:0 0 10px}.tool-section .tool-heading h3{margin:0}.tool-page label,#ingredientDialog label{display:block;font-size:12px;color:var(--muted);font-weight:650;margin:7px 0}.tool-page input,.tool-page select,#ingredientDialog input,#ingredientDialog select{width:100%;min-width:0;border:1px solid var(--line);border-radius:10px;background:white;color:var(--ink);padding:9px;font:16px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.tool-page label>input,#ingredientDialog label>input,#ingredientDialog label>select{margin-top:5px}.tool-page [hidden],#ingredientDialog [hidden]{display:none!important}.product-price-row{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:12px;margin:8px 0;min-width:0}.product-price-info{display:flex;flex-direction:column;gap:4px;min-width:0;overflow-wrap:anywhere}.product-price-info small{color:var(--muted);font-size:12px}.product-unit-price{color:var(--accent);font-size:13px;font-weight:650}.product-price-row button{flex-shrink:0;font-size:12px;padding:8px}.cost-item{display:grid;grid-template-columns:minmax(0,1fr) 65px 22px minmax(48px,auto) 27px;gap:5px;align-items:center;margin:8px 0}.cost-picker{position:relative;min-width:0}.cost-suggestions{position:absolute;left:0;top:100%;width:max(100%,220px);max-width:calc(100vw - 58px);max-height:220px;overflow:auto;background:white;border:1px solid var(--line);box-shadow:0 8px 20px #0002;border-radius:10px;z-index:5;padding:4px}.cost-suggestion{display:block;width:100%;text-align:left;background:white;border:0;border-bottom:1px solid var(--line);padding:10px;font-size:13px;color:var(--ink)}.cost-unit{font-size:12px;color:var(--muted)}.cost-line-price{font-size:12px;white-space:nowrap;text-align:right}.tool-remove{border:0;border-radius:8px;background:var(--bg);font-size:20px;padding:4px;color:var(--muted);min-height:32px}.cost-extra{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,110px) 28px;gap:6px;align-items:center;margin:7px 0}.cost-chips{display:flex;gap:8px;margin:12px 0}.cost-chips button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:20px;padding:8px 18px;font-weight:650}.cost-chips button[aria-pressed=true]{background:var(--accent);color:white;border-color:var(--accent)}.cost-price-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cost-total-line{display:flex;justify-content:space-between;gap:8px;align-items:baseline;padding:8px 0;font-size:14px}.cost-emphasis{font-size:17px;border-top:1px solid var(--line);margin-top:3px;padding-top:12px}.cost-emphasis strong{font-size:20px}.cost-total-line strong{font-variant-numeric:tabular-nums;text-align:right}.cost-summary{background:#fff}.cost-summary #costSave{width:100%;margin-top:10px}.tool-negative,.tool-error{color:#b23a47;font-size:13px}.tool-error:empty{display:none}#ingredientDialog{width:min(100% - 24px,440px);padding:18px}#ingredientDialog .primary{width:100%;margin-top:10px}#ingredientDialog h2{font-size:20px}#ingredientDialog .icon-btn{font-size:23px}.tool-page button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:440px){.tools-grid{gap:8px}.tool-card{padding:12px 9px;min-height:110px}.tool-card strong{font-size:14px}.tool-card small{font-size:10px;letter-spacing:-.3px}.tool-section{padding:10px}.cost-item{grid-template-columns:minmax(0,1fr) 56px 19px minmax(42px,auto) 23px;gap:4px}.cost-item input{padding:7px 4px}.cost-line-price{font-size:11px}.tool-heading h2{font-size:20px}}
.tool-actions{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}.tool-danger{color:#b23a47!important}.cost-set-price{font-size:11px;min-height:25px;padding:3px 0}.cost-picker [hidden]{display:none!important}.orders-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:10px 0}.orders-summary>div{display:flex;flex-direction:column;gap:5px;background:var(--card,#fff);border:1px solid var(--line);border-radius:14px;padding:13px}.orders-summary small,.orders-summary span{font-size:12px;color:var(--muted)}.orders-summary strong{font-size:22px;overflow-wrap:anywhere}.orders-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:12px 0}.orders-filters button{border:1px solid var(--line);border-radius:20px;background:white;color:var(--ink);padding:8px 4px;font-size:12px;font-weight:650}.orders-filters button[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent)}.order-card{border:1px solid var(--line);border-radius:15px;background:white;padding:13px;margin:9px 0;overflow-wrap:anywhere}.order-card h3{margin:0;font-size:17px}.order-card .hint{margin:4px 0}.order-card select{width:auto;max-width:145px;font-size:14px}.order-card .tool-actions{margin-top:9px}.order-card .tool-actions button{font-size:12px;padding:8px}.order-amounts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:10px 0}.order-amounts div{display:flex;flex-direction:column;gap:4px;font-size:14px}.order-amounts small{font-size:11px;color:var(--muted)}.order-notes{white-space:pre-wrap}#orderDialog{width:min(100% - 24px,440px);padding:17px;max-height:90dvh;overflow:auto}#orderDialog label{display:block;font-size:12px;font-weight:650;color:var(--muted);margin:7px 0}#orderDialog input,#orderDialog select,#orderDialog textarea{display:block;width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:9px;font-size:16px;margin-top:5px;color:var(--ink);background:white}#orderDialog .primary{width:100%}#orderDialog h2{font-size:20px}

.cost-unit-mismatch{display:block;font-size:11px;color:#986022;margin-top:3px}.cost-fix-unit{font-size:11px;line-height:1.2;padding:3px 0}#recipeBook [hidden]{display:none!important}#recipeBookForm label{display:block;font-size:13px;color:var(--muted);margin:8px 0}#recipeBookForm input,#recipeBookForm select,#recipeBookForm textarea{width:100%;min-width:0;padding:8px;border:1px solid var(--line);border-radius:9px;font-size:16px;box-sizing:border-box}#recipeBookForm label>input,#recipeBookForm textarea{margin-top:4px}#bookIngredientRows .recipe-row{display:grid;grid-template-columns:minmax(0,1fr) 62px 104px 25px;gap:4px;margin:5px 0}#bookIngredientRows input,#bookIngredientRows select{padding:6px 3px;font-size:13px}.book-detail-actions{display:grid;gap:8px;margin:14px 0}.book-detail-photo{width:100%;max-height:240px;object-fit:contain;border-radius:12px}.book-notes{white-space:pre-wrap;overflow-wrap:anywhere}#recipeBookDetail .recipe-result-row{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}

#dessertDialog,#dessertPublishDialog{width:min(100% - 24px,480px);max-height:90dvh;overflow:auto;padding:16px}#dessertDialog [hidden],#dessertPublishDialog [hidden]{display:none!important}#dessertDialog .primary,#dessertPublishDialog .primary{width:100%;margin-top:8px}.dessert-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.dessert-photo-option{position:relative;display:flex;flex-direction:column;gap:4px;border:1px solid var(--line);border-radius:10px;padding:4px;background:white;min-width:0;color:var(--ink)}.dessert-photo-option[aria-pressed=true]{border:2px solid var(--accent)}.dessert-photo-option img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:7px}.dessert-photo-option small{font-size:10px}.dessert-photo-option .tool-remove{position:absolute;right:5px;top:5px;min-height:24px;padding:0 5px}.dessert-thumb{width:68px;height:68px;object-fit:cover;border-radius:10px;flex:none}.dessert-card{flex-wrap:wrap}.dessert-card .product-price-info{flex:1}.dessert-card .tool-actions{width:100%}.dessert-processed{width:100%;max-height:230px;object-fit:contain;margin-top:12px;background:var(--bg);border-radius:12px}

/* Dessert form and compact order workspace */
#dessertForm{display:grid;gap:10px;min-width:0}#dessertForm label{display:grid;gap:5px;min-width:0;font-size:13px;font-weight:600;color:var(--muted);margin:0}#dessertForm input:not([type=hidden]),#dessertForm textarea,#dessertForm select{width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:9px;background:var(--card,#fff);color:var(--ink);font:16px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}#dessertForm textarea{resize:vertical;min-height:88px}#dessertForm .shop-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#dessertForm label:has(#dessertPhotos){margin-top:8px}#dessertForm .hint{margin:0}
#ordersPanel{max-width:1120px}#orderList{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}#orderList>.hint{grid-column:1/-1}@media(min-width:720px){#orderList{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1100px){#orderList{grid-template-columns:repeat(3,minmax(0,1fr))}}
.order-card{margin:0;padding:12px;min-width:0;display:grid;gap:7px}.order-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.order-head h3{font-size:15px;min-width:0;line-height:1.3}.order-status{position:relative;flex:none}.order-badge{display:inline-block;border:0;border-radius:20px;padding:5px 9px;font-size:12px;font-weight:650;white-space:nowrap;cursor:pointer;list-style:none}.order-badge::-webkit-details-marker{display:none}.order-status summary:after{content:" ▾"}.order-badge[data-state=new]{background:#e0edff;color:#215db0}.order-badge[data-state=in_progress]{background:#fff0ce;color:#885700}.order-badge[data-state=ready]{background:#dcf4e5;color:#226b41}.order-badge[data-state=done]{background:#eceef0;color:#58616b}.order-badge[data-state=cancelled]{background:#fce1e2;color:#a33443}.order-status-menu{position:absolute;right:0;top:100%;z-index:5;background:white;border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:0 4px 14px #0002;display:grid;gap:4px;min-width:105px}.order-status:not([open]) .order-status-menu{display:none}.order-meta{display:flex;flex-wrap:wrap;align-items:center;gap:3px 8px;font-size:12px;color:var(--muted)}.order-source{background:var(--bg);padding:2px 6px;border-radius:6px}.order-amounts{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 7px;margin:0}.order-amounts>strong{font-size:15px;white-space:nowrap}.order-amounts>small{font-size:11px}.order-notes{margin:0;font-size:12px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.order-card .tool-actions{margin:0}.order-card .tool-actions button{padding:5px 9px;min-height:30px}.order-picker{position:relative;min-width:0}#orderSuggestions{width:100%;max-width:100%}#orderSuggestions[hidden]{display:none}#orderDialog input[type=date],#orderDialog input[type=time]{min-width:0;appearance:none;-webkit-appearance:none;min-height:42px}

/* Workspace surfaces and compact status cards */
body[data-access=member][data-view=orders],body[data-access=member][data-view=book],body[data-access=member][data-view=ingredients],body[data-access=member][data-view=desserts],body[data-access=member][data-view=cost],body[data-access=member][data-view=tools],body[data-access=member][data-view=recipe]{background:#F7F7F8}.order-card,.product-price-row,.tool-card,.tool-section,.orders-summary>div,#recipeBook .book-card,.recipe-card{background:#fff;border-color:#e5e7eb;box-shadow:0 1px 3px #0000000b}.order-card{border-left:4px solid #9ca3af}.order-card[data-state=new]{border-left-color:#60a5fa}.order-card[data-state=in_progress]{border-left-color:#fbbf24}.order-card[data-state=ready]{border-left-color:#4ade80}.order-card[data-state=done]{border-left-color:#9ca3af}.order-card[data-state=cancelled]{border-left-color:#f87171}.order-head{align-items:center;flex-wrap:nowrap}.order-head h3{flex:1;min-width:0;overflow-wrap:anywhere}.order-status{flex-shrink:0}.order-source{background:#f3f4f6;color:#6b7280;font-size:11px;padding:2px 7px;border-radius:6px}.order-card .tool-actions{border-top:1px solid #f1f2f4;padding-top:7px}.dessert-card .product-price-info .dessert-live-badge{align-self:flex-start;background:#dcf4e5;color:#226b41;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:650}.cost-item.cost-empty{grid-template-columns:minmax(0,1fr) minmax(60px,86px) 27px}.cost-item.cost-empty .cost-unit,.cost-item.cost-empty .cost-line-price{display:none}#recipeBook .tool-heading{flex-wrap:nowrap}#recipeBook .tool-heading h2{min-width:0}#recipeBook .tool-heading button{flex:none;white-space:nowrap}#recipeBookForm,#recipeBookDetail{background:white;border:1px solid #e5e7eb;border-radius:16px;padding:14px;box-shadow:0 1px 3px #0000000b}#ordersPanel .tool-heading{flex-wrap:nowrap}#orderNew{flex:none}#recipeNew[hidden],#ordersBack[hidden]{display:none!important}

/* Compact order dialog: two-column rows, without nested scrolling on normal phones. */
#orderDialog{box-sizing:border-box;width:min(calc(100% - 24px),440px);max-width:calc(100% - 24px);padding:16px;max-height:92dvh;overflow-y:auto;overflow-x:hidden}
#orderForm{display:grid;gap:10px;margin:0;min-width:0}
#orderDialog .tool-heading{margin:0;flex-wrap:nowrap;gap:6px}
#orderDialog h2{margin:0;line-height:1.2}
#orderDialog #orderClose{width:32px;height:32px;min-height:32px;padding:0;font-size:24px;line-height:1;flex:none}
#orderDialog .cost-price-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#orderDialog label{margin:0;min-width:0;font-size:12px;line-height:1.25}
#orderDialog input,#orderDialog select{height:40px;min-height:40px;max-width:100%;margin-top:4px;padding:6px 8px;font-size:16px;line-height:1.25}
#orderDialog input[type=date],#orderDialog input[type=time]{height:40px;min-height:40px}
#orderDialog input[type=date]::-webkit-date-and-time-value,#orderDialog input[type=time]::-webkit-date-and-time-value{text-align:left;min-height:1em}
#orderDialog textarea{height:58px;min-height:58px;max-width:100%;margin-top:4px;padding:7px 8px;line-height:20px;font-size:16px;resize:vertical}
#orderDialog #orderRemaining,#orderDialog #orderFormStatus{margin:0;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
#orderDialog #orderRemaining:empty,#orderDialog #orderFormStatus:empty{display:none}
#orderDialog #orderSave{width:100%;min-height:44px;margin:0;padding:10px 12px}
