:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,Segoe UI,Arial,sans-serif;color:#263238;background:#eef7f8}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(135deg,#e8f9fd,#fff6e5)}button,input,select,textarea{font:inherit}button{min-height:34px;border:0;border-radius:8px;padding:7px 11px;background:#2b8a3e;color:#fff;cursor:pointer;font-weight:800}button:hover{filter:brightness(1.06)}button:disabled{cursor:not-allowed;opacity:.55}input,select,textarea{width:100%;border:1px solid #b7c7cc;border-radius:8px;background:#fff;color:#24333a;outline:none}input,select{min-height:36px;padding:0 10px}textarea{min-height:88px;padding:10px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#007bff;box-shadow:0 0 0 3px #007bff29}h1,h2,h3,p{margin-top:0}h2{margin-bottom:12px;color:#d35400;font-size:22px;text-align:center}h3{margin:10px 0 8px;color:#004080;font-size:16px}label{display:grid;gap:5px;color:#31444c;font-size:12px;font-weight:800}.app-shell{min-height:100vh;padding-top:78px}.topbar{position:fixed;z-index:100;top:0;left:0;right:0;display:grid;grid-template-columns:130px 1fr auto;align-items:center;gap:16px;min-height:66px;padding:10px 18px;background:#004080;color:#fff353;box-shadow:0 4px 12px #00000038}.clock{width:max-content;border-radius:7px;padding:7px 10px;background:#00000047;color:#fff;font-weight:900}.brand{text-align:center}.brand h1{margin:0;font-size:20px;line-height:1.1}.brand p{margin:3px 0 0;font-size:13px;font-weight:800}.top-actions{display:flex;align-items:center;gap:9px}.top-actions button{background:#007bff}.top-actions .brown{background:#782a00}.version-label{color:#fff;font-size:12px;font-weight:800;white-space:nowrap}.status-bar{display:flex;justify-content:space-between;gap:12px;width:min(1520px,calc(100% - 28px));margin:14px auto 10px;border:1px solid #b3d4fc;border-radius:8px;padding:10px 12px;background:#eaf4ff;color:#004080}.workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;width:min(1520px,calc(100% - 28px));margin:0 auto;align-items:start}.sales-open .workspace{grid-template-columns:minmax(0,1fr) minmax(420px,48vw)}.inventory-panel,.sales-panel,.history-panel,.modal{border-radius:10px;background:#fff;box-shadow:0 4px 14px #0000001a}.inventory-panel,.history-panel{padding:16px}.sales-panel{position:sticky;top:82px;display:none;max-height:calc(100vh - 92px);padding:16px;overflow:auto}.sales-open .sales-panel{display:block}.stock-group{border-top:1px dashed #cad7dc;padding-top:8px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(124px,1fr));gap:10px}.product-card{position:relative;min-height:124px;border:1px solid #89c2d9;border-radius:8px;padding:9px;background:#f1f9ff;text-align:center}.product-card.reservado{border-color:#d99a36;background:#fff6e8}.product-card.assando{border-color:#f4a261;background:#fff3e0}.product-card.assado{border-color:#4caf50;background:#e8f5e9}.product-card.disponivel{border-color:#4caf50;background:#f2fbf3}.so-badge{position:absolute;top:0;left:0;border-bottom-right-radius:7px;padding:3px 7px;background:#d35400;color:#fff;font-size:11px;font-weight:900}.product-value{margin-top:8px;color:#004080;font-size:18px;font-weight:950}.reserved-client{max-width:100%;margin:6px auto 0;border-radius:6px;padding:4px 6px;overflow:hidden;background:#fff;color:#7a3d00;font-size:11px;font-weight:950;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.product-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;margin-top:9px}.product-actions button{min-height:27px;padding:3px 5px;font-size:10px;color:#fff;box-shadow:inset 0 -1px #00000029}.product-actions .reserve{border:1px solid #d1841e;background:#f59f00;color:#241400}.product-actions .roasting{border:1px solid #d9480f;background:#e8590c}.product-actions .roasted{border:1px solid #2b8a3e;background:#37b24d}.product-actions .sell{border:1px solid #0b7285;background:#1098ad;color:#fff}.product-actions .so-action{border:1px solid #f1c40f;background:#fff3bf;color:#5f3b00}.ghost{border:1px solid #b7c7cc;background:#fff;color:#1d3557}.cyan{background:#17a2b8}.purple{background:#6f42c1}.blue{background:#1976d2}.green{background:#4caf50}.dark{background:#343a40}.yellow{background:#ffb300}.orange{background:#e09f3e}.pink{background:#ff6b6b}.danger{background:#c62828}.side-item{display:grid;place-items:center;min-height:66px;border:1px solid #89c2d9;background:#f1f9ff;color:#004080}.cart-panel{margin-top:16px;border-top:1px dashed #cad7dc;padding-top:14px}.cart-panel ul{display:grid;gap:7px;margin:0;padding:0;list-style:none}.cart-panel li{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px dashed #d8e1e4;padding:7px 0;color:#264653;font-weight:800}.cart-panel li button{min-height:28px;background:#d32f2f;font-size:11px}.totals{display:flex;justify-content:space-between;gap:12px;margin-top:11px;color:#004080;font-size:17px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.wide{grid-column:1 / -1}.client-results{display:grid;max-height:170px;overflow:auto;border:1px solid #c9d5d9;border-radius:8px}.client-results button{display:grid;justify-items:start;min-height:52px;border-radius:0;border-bottom:1px solid #e8eef0;background:#fff;color:#263238;text-align:left;box-shadow:none}.client-results span{color:#607d8b;font-size:12px}.client-note{margin:0;border-left:4px solid #004080;border-radius:8px;padding:8px 10px;background:#eaf4ff;color:#264653;font-weight:800}.finish{width:100%;min-height:46px;margin:12px 0;background:#2b8a3e;font-size:16px;text-transform:uppercase}.preview-label{gap:8px}.preview{min-height:270px;background:#f8fbfc;font-family:Consolas,Courier New,monospace;font-size:13px;white-space:pre-wrap}.history-panel{width:min(1520px,calc(100% - 28px));margin:16px auto 26px}.history-filters{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr);gap:12px;margin-bottom:12px;border-left:5px solid #004080;border-radius:8px;padding:10px;background:#eaf4ff}.delivery-summary{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:14px;border-left:5px solid #f4a261;border-radius:8px;padding:10px;background:#fff3e0;color:#1d3557}.history-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:12px;max-height:520px;overflow:auto;padding-right:4px}.history-card{border:1px solid #d1d9e0;border-left:5px solid #1d3557;border-radius:8px;padding:10px;background:#fff}.history-card pre{margin:0 0 10px;color:#0040cc;white-space:pre-wrap;word-break:break-word;font-family:Consolas,Courier New,monospace;font-size:13px;font-weight:800}.history-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.history-actions button{min-height:30px;padding:5px 9px;font-size:12px}.history-actions strong{margin-left:auto;color:#2b8a3e}.modal-backdrop{position:fixed;z-index:300;inset:0;display:grid;place-items:center;padding:18px;background:#00000094}.modal{position:relative;display:grid;gap:10px;width:min(460px,100%);max-height:90vh;padding:20px;overflow:auto}.modal-close{position:absolute;top:8px;right:8px;width:32px;min-height:32px;padding:0;background:#d32f2f;font-size:20px;line-height:1}.file-button{display:grid;place-items:center;min-height:38px;border-radius:8px;background:#007bff;color:#fff;cursor:pointer;font-size:14px}.file-button input{display:none}.admin-modal{width:min(1120px,100%);align-content:start;gap:14px}.clients-modal{width:min(1320px,100%);align-content:start;gap:14px}.admin-section{display:grid;gap:10px;border:1px solid #e0e7ea;border-radius:8px;padding:14px;background:#fbfdfe}.admin-section h3{margin:0;text-align:left}.admin-section p{margin:0;color:#52656d}.admin-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.check-row{display:flex;align-items:center;gap:8px;width:max-content}.check-row input{width:18px;min-height:18px}.table-wrap{max-height:320px;overflow:auto;border:1px solid #e1e7ea;border-radius:8px;background:#fff}.admin-table{width:100%;border-collapse:collapse;font-size:13px}.admin-table th,.admin-table td{border-bottom:1px solid #e7ecef;padding:8px;text-align:left;vertical-align:middle}.admin-table th{position:sticky;top:0;background:#eef6f8;color:#004080;z-index:1}.admin-table td:last-child{display:flex;flex-wrap:wrap;gap:6px}.compact{min-height:28px;padding:4px 8px;font-size:12px}.active-text{color:#1b7f3a;font-weight:900}.inactive-text{color:#c62828;font-weight:900}.publish-feedback{color:#176b5b}.admin-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.client-tools{display:flex;flex-wrap:wrap;gap:9px}.client-tools button{min-height:36px}.inline-file{width:auto;min-height:36px;padding:0 14px;font-size:14px}.muted-inline{color:#607d8b;font-size:13px;font-weight:800}.clients-table-wrap{max-height:430px}.clients-table input{min-width:150px}.clients-table th:nth-child(1),.clients-table td:nth-child(1){width:70px}.clients-table th:nth-child(6),.clients-table td:nth-child(6){min-width:220px}.edit-modal{width:min(860px,100%)}.add-items-modal,.log-modal{width:min(900px,100%)}.edit-modal textarea{min-height:420px;font-family:Consolas,Courier New,monospace}.edit-items-list{display:grid;gap:6px;max-height:170px;overflow:auto;border:1px solid #e1e7ea;border-radius:8px;padding:8px;background:#f9fbfc}.edit-item-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #e7ecef;padding:6px;color:#264653;font-weight:800}.edit-item-row:last-child{border-bottom:0}.modal-actions{display:flex;justify-content:flex-end;gap:8px}.summary-line{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #edf1f3;padding:6px 0;margin:0}.summary-total{margin:0;text-align:right;color:#004080;font-size:18px}.log-modal pre{max-width:520px;margin:0;white-space:pre-wrap;word-break:break-word;font-family:Consolas,Courier New,monospace;font-size:12px}.app-footer{display:flex;align-items:center;justify-content:center;gap:14px;margin:18px 0 28px;padding:10px;background:#f8f8f8;color:#52656d}.app-footer p{margin:0}@media(max-width:1020px){.app-shell{padding-top:126px}.topbar{grid-template-columns:1fr;justify-items:center}.workspace,.sales-open .workspace{grid-template-columns:1fr}.sales-panel{position:static;max-height:none}}@media(max-width:620px){.status-bar,.totals,.history-filters{grid-template-columns:1fr;flex-direction:column}.form-grid{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(auto-fill,minmax(108px,1fr))}.history-grid,.admin-grid{grid-template-columns:1fr}.admin-section-title{align-items:stretch;flex-direction:column}}
