:root{--page-bg:#f4f6f7;--page-gradient-start:#eef3f2;--surface:#fff;--surface-soft:#ffffffd1;--surface-muted:#eef3f2;--text:#202124;--text-strong:#111827;--muted:#60646c;--line:#d5dddc;--line-strong:#cfd9d7;--accent:#1f6b5f;--accent-soft:#e6f2ef;--accent-text:#1f554d;--danger-line:#e0a6a6;--danger-bg:#fff1f1;--danger-text:#9a2f2f;--warning-line:#e4b654;--warning-bg:#fff7e3;--warning-text:#6d4a00;--shadow:0 10px 28px #1f2c3012;--shadow-strong:0 18px 42px #1f2c3026;--glass-line:#fff9;color:var(--text);background:var(--page-bg);font-synthesis:none;text-rendering:optimizelegibility;font-family:Inter,Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif}*{box-sizing:border-box}html[data-theme=dark]{--page-bg:#080907;--page-gradient-start:#17120b;--surface:#111310;--surface-soft:#111310e0;--surface-muted:#1b1d18;--text:#eee8dc;--text-strong:#fffaf0;--muted:#b8ad9c;--line:#34352d;--line-strong:#4a4738;--accent:#c8a96a;--accent-soft:#2b2417;--accent-text:#f5d99a;--danger-line:#7d3c3c;--danger-bg:#2a1515;--danger-text:#ffb6aa;--warning-line:#9d7831;--warning-bg:#241b0d;--warning-text:#f0ca78;--shadow:0 18px 46px #0000006b;--shadow-strong:0 26px 70px #00000094;--glass-line:#ffffff14}body{background:linear-gradient(180deg, var(--page-gradient-start) 0, var(--page-bg) 260px), var(--page-bg);min-width:320px;min-height:100vh;margin:0}html[data-theme=dark] body{background:linear-gradient(#1c160d 0,#080907 340px),linear-gradient(135deg,#c8a96a24,#0000 42%),#080907}button,input,select{font:inherit}button{cursor:pointer}.shell{width:min(1480px,100% - 32px);margin:0 auto;padding:24px 0 40px}.loginShell{place-items:center;min-height:100vh;padding:24px;display:grid}.loginPanel{border:1px solid var(--line);background:var(--surface);width:min(420px,100%);box-shadow:var(--shadow-strong);border-radius:8px;gap:16px;padding:24px;display:grid}html[data-theme=dark] .loginPanel,html[data-theme=dark] .topbar,html[data-theme=dark] .searchBox,html[data-theme=dark] .tableScroll,html[data-theme=dark] .copyPanel,html[data-theme=dark] .results{border-color:var(--glass-line)}.loginPanelHeader{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.loginPanel h1{font-size:28px}.loginField{color:var(--muted);gap:6px;font-size:13px;font-weight:700;display:grid}.loginField input{border:1px solid var(--line);background:var(--surface);height:42px;color:var(--text);border-radius:8px;outline:0;padding:0 12px}.rememberField{color:var(--text);align-items:center;gap:9px;font-size:14px;font-weight:700;display:flex}.rememberField input{width:18px;height:18px;accent-color:var(--accent)}.loginError{border:1px solid var(--danger-line);background:var(--danger-bg);color:var(--danger-text);border-radius:8px;padding:9px 10px;font-size:13px}.topbar{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:8px;justify-content:space-between;align-items:center;gap:18px;margin-bottom:14px;padding:16px;display:flex}.eyebrow{color:var(--muted);margin:0 0 4px;font-size:13px}h1{color:var(--text-strong);margin:0;font-size:30px;line-height:1.15}.topbarControls,.actions,.statusBand,.orderTools{align-items:center;gap:10px;display:flex}.topbarControls,.actions{flex-wrap:wrap;justify-content:flex-end}.selectLabel{color:#5b5f66;gap:5px;font-size:13px;display:grid}.selectWrap{align-items:center;display:inline-flex;position:relative}.selectWrap select{appearance:none;background:#fff;border:1px solid #d7d2c8;border-radius:8px;min-width:170px;padding:10px 34px 10px 12px}.selectWrap svg{pointer-events:none;color:#60646c;position:absolute;right:11px}.restaurantBadge{border:1px solid var(--line-strong);background:var(--accent-soft);min-height:42px;color:var(--accent-text);white-space:nowrap;border-radius:8px;align-items:center;padding:0 12px;font-weight:700;display:inline-flex}.themeToggle{border:1px solid var(--line-strong);background:var(--surface);min-height:42px;color:var(--text);white-space:nowrap;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:0 12px;font-weight:800;display:inline-flex}.themeToggle.iconOnly{flex:0 0 42px;width:42px;padding:0}.themeToggle:hover{border-color:var(--accent);color:var(--accent-text)}.button,.iconButton,.message,.tab,.resultRow{border:1px solid var(--line);background:var(--surface);color:var(--text)}.button{white-space:nowrap;border-radius:8px;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:0 14px;display:inline-flex}.button.compact{min-height:34px;padding:0 10px}.button.primary{border-color:var(--accent);background:var(--accent);color:#fff;box-shadow:0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent)}html[data-theme=dark] .button.primary{color:#151008}.button:disabled{cursor:not-allowed;border-color:var(--line);background:var(--surface-muted);color:var(--muted)}.button.ghost:hover,.iconButton:hover,.tab:hover,.resultRow:hover{background:var(--surface-muted)}.button.supplierAlreadyUsed{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text);font-weight:700}.button.supplierAlreadyUsed:hover{background:var(--accent-soft)}.iconButton{border-radius:8px;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex}.iconButton.small{width:34px;height:34px}.hiddenInput{display:none}.workSections{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px;display:grid}.workSection{border:1px solid var(--line);background:var(--surface-soft);min-height:74px;color:var(--text);text-align:left;box-shadow:var(--shadow);border-radius:8px;gap:4px;padding:13px 14px;display:grid}.workSection span{color:var(--text-strong);font-size:18px;font-weight:850}.workSection small{color:var(--muted);font-size:13px;line-height:1.25}.workSection:hover{border-color:var(--accent)}.workSection.active{border-color:var(--accent);background:var(--accent);color:#fff}.workSection.active span,.workSection.active small{color:inherit}html[data-theme=dark] .workSection.active{color:#151008}.historyPanel{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:8px;gap:14px;margin-bottom:14px;padding:16px;display:grid}.historyHeader,.historyItemTop,.historyMeta,.historyRow,.historyActions{align-items:center;display:flex}.historyHeader{justify-content:space-between;gap:12px}.historyHeader h2{color:var(--text-strong);margin:0;font-size:22px}.historyActions{justify-content:flex-end;gap:8px}.historyList{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px;display:grid}.historyItem{border:1px solid var(--line);background:var(--surface-soft);border-radius:8px;gap:10px;padding:12px;display:grid}.historyItemTop{justify-content:space-between;gap:10px}.historyItemTop strong{color:var(--text-strong)}.historyItemTop span,.historyMeta,.historyEmpty{color:var(--muted);font-size:13px}.historyMeta{flex-wrap:wrap;gap:8px}.historyMeta span{border:1px solid var(--line);background:var(--surface-muted);border-radius:8px;padding:5px 8px}.historyRows{gap:4px;max-height:190px;display:grid;overflow:auto}.historyRow{border-top:1px solid var(--line);justify-content:space-between;gap:10px;padding-top:6px;font-size:14px}.historyRow span:first-child{overflow-wrap:anywhere;min-width:0}.historyRow span:last-child{color:var(--accent-text);flex:none;font-weight:750}.historyEmpty{border:1px dashed var(--line);background:var(--surface-muted);border-radius:8px;padding:14px}.comingSoonPanel{border:1px solid var(--line);background:var(--surface);min-height:260px;box-shadow:var(--shadow);border-radius:8px;align-content:center;gap:8px;padding:28px;display:grid}.comingSoonPanel h2{color:var(--text-strong);margin:0;font-size:28px}.comingSoonPanel p{max-width:680px;color:var(--muted);margin:0;line-height:1.5}.sectionMatrixInfo{border:1px solid var(--line);background:var(--surface-muted);width:fit-content;color:var(--accent-text);border-radius:8px;align-items:center;gap:9px;margin-top:8px;padding:10px 12px;font-weight:750;display:inline-flex}.sectionMatrixButton{width:fit-content;margin-top:4px}.statusBand{border:1px solid var(--line);background:var(--surface-muted);min-height:44px;color:var(--muted);box-shadow:none;border-radius:8px;justify-content:space-between;margin-bottom:16px;padding:7px 10px}.statusBand>div,.message{align-items:center;gap:8px;display:inline-flex}.syncStatus{color:var(--accent-text);white-space:nowrap;font-size:13px}.message{min-height:36px;color:var(--accent-text);border-radius:8px;padding:0 10px}.warningBand{border:1px solid var(--warning-line);background:var(--warning-bg);color:var(--warning-text);border-radius:8px;align-items:center;gap:10px;margin-bottom:12px;padding:10px 12px;font-weight:700;display:flex}.warningBand span{flex:1}.warningButton{border-color:var(--warning-line);background:var(--surface);color:var(--warning-text)}.searchPanel{margin-bottom:18px;position:relative}.searchHeader{justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:8px;display:flex}.searchHeader h2{color:var(--text-strong);margin:0;font-size:24px;line-height:1.1}.searchHeader span{color:var(--warning-text);text-align:right;font-size:13px;font-weight:800}.searchBox{border:2px solid var(--accent);background:var(--surface);height:66px;box-shadow:var(--shadow-strong);border-radius:8px;align-items:center;gap:12px;padding:0 18px;display:flex}.searchBox svg{color:var(--accent-text)}.searchBox input{width:100%;color:var(--text);background:0 0;border:0;outline:0;font-size:20px;font-weight:700}input::placeholder{color:color-mix(in srgb, var(--muted) 76%, transparent)}.results{z-index:20;border:1px solid var(--line-strong);background:var(--surface);width:100%;box-shadow:var(--shadow-strong);border-radius:8px;margin-top:6px;position:absolute;overflow:hidden}.resultsTitle,.noResults{border-bottom:1px solid var(--line);color:var(--muted);padding:9px 12px;font-size:13px}.resultsTitle{background:var(--surface-muted);font-weight:700}.noResults{border-bottom:0}.notFoundPanel{background:var(--danger-bg);color:var(--danger-text);justify-content:space-between;align-items:center;gap:12px;font-weight:800;display:flex}.notFoundPanel .button{border-color:var(--danger-line);color:var(--danger-text);flex:none}.groceryNotFound>span:first-child{display:none}.groceryManualFields{flex-wrap:wrap;flex:auto;align-items:center;gap:8px;display:flex}.groceryManualFields .unitInput{width:96px}.groceryManualFields .qtyInput{width:120px}.groceryManualFields .commentInput{flex:220px;min-width:180px}.resultRow{text-align:left;border-width:0 0 1px;grid-template-columns:minmax(220px,1fr) 70px minmax(150px,220px) 110px 28px;align-items:center;gap:12px;width:100%;min-height:48px;padding:8px 12px;display:grid}.resultRow:last-child{border-bottom:0}.resultName{font-weight:650}.orderTools{justify-content:space-between;margin-bottom:12px}.costSummary{color:var(--accent-text);flex-wrap:wrap;align-items:center;gap:8px;font-size:14px;font-weight:800;display:flex}.costSummary span{border:1px solid var(--line-strong);background:var(--accent-soft);white-space:nowrap;border-radius:8px;padding:8px 10px}.duplicatePanel{border:1px solid var(--line);background:var(--surface);border-radius:8px;justify-content:space-between;align-items:center;gap:12px;margin:-6px 0 14px;padding:10px 12px;display:flex}.duplicatePanel>div:first-child{gap:3px;display:grid}.duplicatePanel span{color:var(--muted);font-size:13px}.duplicateActions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.draftField{color:var(--muted);gap:4px;font-size:12px;font-weight:650;display:grid}.supplierDraftField{min-width:220px}.unitDraftField{width:110px}.commentDraftField{min-width:190px}.supplierAlreadyUsedSelect{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text);font-weight:700}.tabs{scrollbar-width:thin;gap:8px;padding-bottom:2px;display:flex;overflow-x:auto}.tab{white-space:nowrap;border-radius:8px;align-items:center;gap:7px;min-height:38px;padding:0 12px;font-weight:700;display:inline-flex}.tab.active{border-color:var(--accent);background:var(--accent);color:#fff}html[data-theme=dark] .tab.active{color:#151008}.tabCost{color:inherit;opacity:.82;font-size:12px}.tableSection{width:100%}.copyPanel{border:1px solid var(--line);background:var(--surface);border-radius:8px;margin-bottom:12px;overflow:hidden}.copyPanelHeader{border-bottom:1px solid var(--line);background:var(--surface-muted);min-height:46px;color:var(--text);justify-content:space-between;align-items:center;gap:12px;padding:6px 10px 6px 14px;font-weight:700;display:flex}.copyPanelActions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.copyImageScroll{background:var(--surface-muted);padding:12px;overflow-x:auto}.copyImage{background:#fff;width:max-content;max-width:none;height:auto;display:block;box-shadow:0 3px 10px #1e21262e}.tableScroll{overscroll-behavior-x:contain;border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:8px;overflow-x:auto}.orderTable{border-collapse:collapse;table-layout:auto;width:100%;min-width:1180px}.orderTable th{background:var(--surface-muted);height:44px;color:var(--text-strong);text-align:left;z-index:2;font-size:13px;font-weight:700;position:sticky;top:0}html[data-theme=dark] .orderTable th{background:#1c1a14}.orderTable th:nth-child(2),.orderTable td:nth-child(2){min-width:120px}.orderTable th:nth-child(3),.orderTable td:nth-child(3),.orderTable th:nth-child(4),.orderTable td:nth-child(4),.orderTable th:nth-child(5),.orderTable td:nth-child(5),.orderTable th:nth-child(6),.orderTable td:nth-child(6),.orderTable th:nth-child(7),.orderTable td:nth-child(7),.orderTable th:nth-child(8),.orderTable td:nth-child(8),.orderTable th:nth-child(9),.orderTable td:nth-child(9){min-width:112px}.orderTable th,.orderTable td{border-bottom:1px solid var(--line);vertical-align:middle;padding:8px 10px}.orderTable tbody tr:hover td{background:var(--surface-muted)}html[data-theme=dark] .orderTable tbody tr:hover td{background:#181a15}.orderTable tr:last-child td{border-bottom:0}.productCell{width:30%;min-width:260px;color:var(--text-strong);font-weight:620}.productCellContent{align-items:center;gap:8px;display:flex}.productCellContent>span{overflow-wrap:anywhere}.inlineAddButton{border:1px solid var(--accent);background:var(--accent-soft);width:28px;height:28px;color:var(--accent-text);border-radius:8px;flex:none;justify-content:center;align-items:center;display:inline-flex}.inlineAddButton:hover{background:var(--accent-soft)}.extraDraftRow td{background:var(--surface-muted)}.extraDraftPanel{border:1px solid var(--line);background:var(--surface);border-radius:8px;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;display:flex}.extraDraftPanel>div:first-child{gap:3px;display:grid}.extraDraftPanel span{color:var(--muted);font-size:13px}.qtyInput,.productInput,.unitInput,.commentInput,.supplierSelect{border:1px solid var(--line-strong);background:var(--surface);width:100%;height:36px;color:var(--text);border-radius:8px;outline:none;padding:0 9px}.supplierSelect option{background:var(--surface);color:var(--text)}.qtyInput:focus,.productInput:focus,.unitInput:focus,.commentInput:focus,.supplierSelect:focus,.searchBox:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent)}.qtyInput{text-align:center;min-width:96px;max-width:140px;font-size:16px;font-weight:700}.productInput{min-width:240px;font-weight:620}.unitInput{text-align:center;min-width:92px;max-width:130px}.supplierSelect{min-width:170px}.commentInput{min-width:190px}.totalCell{min-width:96px;color:var(--accent-text);text-align:center;font-weight:700}.moneyCell{min-width:90px;color:var(--accent-text);text-align:right;font-weight:700}.emptyCell{height:140px;color:var(--muted);text-align:center}.tableFooter{justify-content:flex-start;padding-top:12px;display:flex}@media (width<=1180px){.tableScroll{box-shadow:none;background:0 0;border:0;overflow-x:visible}.orderTable,.orderTable thead,.orderTable tbody,.orderTable tr,.orderTable th,.orderTable td{display:block}.orderTable{min-width:0}.orderTable thead{display:none}.orderTable tbody{gap:12px;display:grid}.orderTable tbody tr{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:8px;grid-template-columns:minmax(260px,1.35fr) minmax(92px,.45fr) repeat(4,minmax(96px,.5fr)) minmax(96px,.45fr) minmax(92px,.45fr) minmax(102px,.45fr) minmax(190px,.9fr) minmax(180px,.8fr) 42px;align-items:end;gap:10px;padding:12px;display:grid}.orderTable tbody tr:hover td{background:0 0}.orderTable td,.orderTable th,.orderTable tr:last-child td{border-bottom:0}.orderTable td{padding:0;min-width:0!important}.orderTable td:before{content:attr(data-label);min-height:16px;color:var(--muted);margin-bottom:4px;font-size:11px;font-weight:800;display:block}.productCell{width:auto;min-width:0}.qtyInput,.unitInput{min-width:0;max-width:none}.productInput,.supplierSelect,.commentInput{min-width:0}.totalCell,.moneyCell{text-align:center;align-content:center;min-width:0;height:36px;display:grid!important}.extraDraftRow{box-shadow:none!important;background:0 0!important;border:0!important;padding:0!important;display:block!important}.extraDraftRow td{background:0 0;display:block!important}.extraDraftRow td:before{content:"";display:none}}@media (width<=980px){.orderTable tbody tr{grid-template-columns:repeat(4,minmax(0,1fr))}.productCell,.orderTable td:nth-child(10),.orderTable td:nth-child(11){grid-column:1/-1}.orderTable td:nth-child(12){justify-self:end}}@media (width<=640px){.orderTable tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}.orderTable td:nth-child(12){grid-column:1/-1;justify-self:stretch}.orderTable td:nth-child(12) .iconButton{width:100%}}@media (width>=1680px){.shell{width:min(1680px,100% - 48px);padding-top:30px}.orderTable{min-width:1380px}.productCell{min-width:340px}.commentInput{min-width:260px}}@media (width<=1280px){.shell{width:min(100% - 24px,1480px)}.topbar{align-items:flex-start}h1{font-size:28px}.orderTools{grid-template-columns:minmax(0,1fr) auto;align-items:start;display:grid}.costSummary{order:3;grid-column:1/-1}.orderTable{min-width:1140px}}@media (width<=1024px){.topbar{flex-direction:column}.workSections{grid-template-columns:1fr}.topbarControls{justify-content:flex-start;width:100%}.statusBand{flex-wrap:wrap}.syncStatus{white-space:normal}.orderTools{grid-template-columns:1fr}.tabs,.actions,.costSummary{width:100%}.actions{justify-content:flex-start}.resultRow{grid-template-columns:minmax(180px,1fr) 64px minmax(130px,190px) 96px 28px}.copyPanelHeader{flex-direction:column;align-items:stretch}.orderTable{min-width:1080px}}@media (width<=780px){.shell{width:min(100% - 20px,1480px);padding-top:16px}.topbar,.orderTools,.statusBand{flex-direction:column;align-items:stretch}.topbarControls,.actions,.copyPanelActions,.historyActions,.duplicateActions{justify-content:flex-start;align-items:stretch;width:100%}.historyHeader,.historyItemTop,.duplicatePanel,.extraDraftPanel{flex-direction:column;align-items:stretch}.button{width:100%}.themeToggle,.restaurantBadge,.iconButton{flex:auto}.iconButton{min-width:42px}.selectWrap,.selectWrap select{width:100%}.resultRow{grid-template-columns:1fr 44px 28px;gap:8px}.resultRow span:nth-child(3),.resultRow span:nth-child(4){display:none}.searchBox{height:58px;padding:0 12px}.searchBox input{font-size:17px}.searchHeader{flex-direction:column;align-items:flex-start}.searchHeader span{text-align:left}h1{font-size:25px}.workSection{min-height:62px}.tabs{margin:0 -2px}.tab{min-height:42px}.costSummary span{width:100%}.orderTable{min-width:1000px}.orderTable th,.orderTable td{padding:7px 8px}.productCell{min-width:230px}.supplierSelect{min-width:150px}.commentInput{min-width:160px}}@media (width<=520px){.shell{width:calc(100% - 14px);padding-top:10px}.topbar,.statusBand,.warningBand,.searchBox,.tableScroll,.copyPanel{border-radius:8px}.topbar{padding:12px}.comingSoonPanel{min-height:220px;padding:20px}.comingSoonPanel h2{font-size:24px}.topbarControls{grid-template-columns:1fr 1fr;display:grid}.restaurantBadge,.topbarControls .button,.themeToggle{min-width:0}.topbarControls .button{grid-column:1/-1}.statusBand>div{align-items:flex-start}.warningBand{flex-direction:column;align-items:stretch}.results{max-height:62vh;overflow-y:auto}.orderTable{min-width:920px}.orderTable th{height:40px;font-size:12px}.qtyInput,.productInput,.unitInput,.commentInput,.supplierSelect{height:40px}.qtyInput{min-width:82px}.unitInput{min-width:84px}.productCell{min-width:210px}.extraDraftPanel{padding:9px}.supplierDraftField,.unitDraftField,.draftField,.duplicateActions .button{width:100%}}@media (height<=700px) and (width>=781px){.shell{padding-top:12px}.topbar{padding:12px}.searchBox{height:50px}.orderTable th{height:38px}.qtyInput,.productInput,.unitInput,.commentInput,.supplierSelect{height:34px}}@media (width<=1180px){.orderTable{min-width:0}.tableScroll{overflow-x:visible}}
