:root{--bg:#f6f7f4;--card:#fff;--surface:#f2f4ef;--surface-strong:#e9ede4;--foreground:#18210f;--muted:#6f786b;--line:#dde3d7;--green:#1d8b57;--red:#b43d2b;--amber:#a76e12;--shadow:0 1px 2px #18210f09;--shadow-soft:0 1px 1px #18210f06;--sidebar-width:220px;--page-gutter:1.5rem;--page-section-gap:.95rem;--card-padding:.9rem;--toolbar-gap:.7rem;--control-height:2.75rem;--button-height:2.75rem;--radius-card:12px;--radius-control:9px;--radius-chip:999px;--table-cell-y:.7rem;--table-cell-x:.75rem}html,body{max-width:100vw;min-height:100%;overflow-x:hidden}body{background:var(--bg);color:var(--foreground);font-family:var(--font-sans), sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box;margin:0;padding:0}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{grid-template-columns:var(--sidebar-width) 1fr;min-height:100vh;display:grid}.sidebar{border-right:1px solid var(--line);background:#fffffff0;flex-direction:column;justify-content:flex-start;gap:.9rem;padding:1.15rem .9rem;display:flex}.sidebar h1{margin-top:.4rem;font-size:1.5rem;line-height:1.2}.eyebrow{color:var(--amber);letter-spacing:.14em;text-transform:uppercase;font-size:.74rem;font-weight:700}.nav{gap:.2rem;display:grid}.nav a{color:var(--foreground);background:0 0;border:1px solid #0000;border-radius:9px;padding:.6rem .72rem;font-size:.94rem;font-weight:600;display:block}.nav a:hover{background:#e9ede4b8}.logout-form{margin-top:auto}.content{padding:var(--page-gutter)}.page-header{justify-content:space-between;align-items:flex-start;gap:.75rem;margin-bottom:.95rem;display:flex}.page-title-group{gap:.22rem;max-width:36rem;display:grid}.page-title-group .eyebrow{letter-spacing:.14em;font-size:.72rem}.page-header h2{letter-spacing:-.03em;font-size:1.7rem;line-height:1.1}.page-title-group .muted{max-width:32rem;font-size:.9rem;line-height:1.45}.muted{color:var(--muted)}.page-actions,.toolbar{flex-wrap:wrap;gap:.5rem;display:flex}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-card);padding:var(--card-padding);box-shadow:var(--shadow-soft)}.grid{gap:var(--page-section-gap);display:grid}.grid.metrics{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.split{gap:var(--page-section-gap);margin-top:var(--page-section-gap);grid-template-columns:1.8fr 1fr;display:grid}.page-stack{gap:var(--page-section-gap);display:grid}.page-section{margin-top:var(--page-section-gap)}.page-grid-main{gap:var(--page-section-gap);grid-template-columns:minmax(0,1fr);display:grid}.page-grid-main.aside{grid-template-columns:minmax(0,1.7fr) minmax(280px,.9fr)}.page-grid-main.compact-aside{grid-template-columns:minmax(0,1.35fr) minmax(280px,.95fr)}.summary-card-grid{gap:var(--page-section-gap);grid-template-columns:repeat(auto-fit,minmax(200px,1fr));display:grid}.summary-card{gap:.3rem;display:grid}.summary-card strong{font-size:.98rem}.summary-pairs{gap:.6rem;display:grid}.summary-pair{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:1rem;padding-bottom:.65rem;display:flex}.summary-pair:last-child{border-bottom:none;padding-bottom:0}.summary-pair-label{color:var(--muted)}.section-card-list{gap:.75rem;display:grid}.section-divider{border-top:1px solid var(--line);padding-top:.9rem}.toolbar-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.metric-card .label{color:var(--muted);font-size:.8rem}.metric-card .value{letter-spacing:-.03em;margin-top:.2rem;font-size:1.38rem;font-weight:700}.metric-card .muted{margin-top:.2rem;font-size:.82rem}.positive{color:var(--green)}.negative{color:var(--red)}.error-inline{color:var(--red);background:#b43d2b0d;border-color:#b43d2b2e}.filters,.stack{gap:var(--page-section-gap);display:grid}.filters{margin-bottom:var(--page-section-gap);align-items:end;gap:var(--toolbar-gap);flex-wrap:wrap;padding:.75rem .85rem;display:flex}.filters label{flex:160px;min-width:140px}.filters>.button,.filters>.button-link,.filters>button{flex:none}label{color:var(--muted);gap:.3rem;font-size:.84rem;display:grid}input,select,textarea{width:100%;min-height:var(--control-height);border:1px solid var(--line);border-radius:var(--radius-control);color:var(--foreground);background:#fcfcfb;padding:.65rem .8rem}.button,.button-link,button{min-height:var(--button-height);border-radius:var(--radius-control);background:var(--foreground);color:#fff;border:1px solid #0000;justify-content:center;align-items:center;padding:.58rem .88rem;font-size:.92rem;font-weight:700;line-height:1;transition:background-color .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.button-link{text-decoration:none}.button-primary{background:var(--foreground);color:#fff}.secondary-button,.button-secondary{background:var(--surface);color:var(--foreground);border:1px solid var(--line)}.button-ghost{width:100%;color:var(--foreground);background:0 0;border-color:#0000;justify-content:flex-start}.button-ghost:hover{background:#e9ede4b8}.danger-button,.button-danger{color:var(--red);background:#b43d2b14;border-color:#b43d2b2e}button:disabled,.button-link:disabled{opacity:.66;cursor:not-allowed}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%}th,td{padding:var(--table-cell-y) var(--table-cell-x);border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}th{color:var(--muted);letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;font-size:.74rem}tbody tr:hover{background:#f2f4ef6b}.table-align-right{text-align:right}.table-align-center{text-align:center}.table-primary-cell{min-width:0}.sku-primary-cell{align-items:center;gap:.75rem;min-width:0;display:flex}.sku-thumb{object-fit:cover;border:1px solid var(--line);background:var(--surface);border-radius:10px;flex-shrink:0;width:44px;height:44px}.sku-thumb-placeholder{display:inline-block}.sku-secondary-text{white-space:nowrap;text-overflow:ellipsis;max-width:22rem;overflow:hidden}.sku-image-field-preview{justify-content:flex-start;display:flex}.sku-image-preview{object-fit:cover;border:1px solid var(--line);background:var(--surface);border-radius:12px;width:72px;height:72px}.sku-detail-image{aspect-ratio:1;object-fit:cover;border:1px solid var(--line);background:var(--surface);border-radius:14px;width:100%;max-width:180px}.sku-detail-image-placeholder{display:block}.table-number{font-variant-numeric:tabular-nums;white-space:nowrap}.table-status,.table-actions{white-space:nowrap;width:1%}.table-actions .inline-actions,.table-actions form{justify-content:flex-end;display:flex}.table-actions .button,.table-actions .button-link,.table-actions button{width:max-content}.table-row-actions{justify-items:end;gap:.32rem;display:grid}.table-edit-cell{min-width:180px}.table-code-cell{white-space:nowrap}.table-code{color:var(--muted);font-family:var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;font-size:.84rem}.table-number-text{font-variant-numeric:tabular-nums}.table-row-error{max-width:18rem;color:var(--red);text-align:right;font-size:.77rem;line-height:1.35}.button-small{min-height:2.25rem;padding:.42rem .68rem;font-size:.84rem}.empty-state{border:1px dashed var(--line);border-radius:var(--radius-card);color:var(--muted);background:#ffffffb8;padding:1rem}.empty-state-content{gap:.35rem;display:grid}.empty-state-content strong{color:var(--foreground);font-size:.98rem}.empty-state-content p{line-height:1.45}.empty-state-actions{flex-wrap:wrap;gap:.5rem;margin-top:.75rem;display:flex}.trend-chart{grid-template-columns:repeat(auto-fit,minmax(32px,1fr));align-items:end;gap:.6rem;min-height:260px;display:grid}.trend-column{justify-items:center;gap:.45rem;display:grid}.trend-column span{color:var(--muted);font-size:.75rem}.trend-bars{align-items:end;gap:.3rem;width:100%;min-height:220px;display:flex}.bar{border-radius:999px 999px 6px 6px;width:100%}.bar.sales{background:linear-gradient(#accd75 0%,#729a28 100%)}.bar.profit{background:linear-gradient(#57d190 0%,#1d8b57 100%)}.bar.profit.negative{background:linear-gradient(#f1a494 0%,#b43d2b 100%)}.login-shell{background:var(--bg);place-items:center;min-height:100vh;padding:1.5rem;display:grid}.login-card{gap:var(--page-section-gap);width:min(440px,100%);display:grid}.form-grid{gap:var(--page-section-gap);display:grid}.two-column{grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem;display:grid}.two-column-span{grid-column:1/-1}.inline-actions{flex-wrap:wrap;gap:.5rem;display:flex}.field-hint{color:var(--muted);font-size:.78rem;line-height:1.45}.section-heading{gap:.15rem;display:grid}.section-heading h3{font-size:1rem}.summary-list{gap:.75rem;display:grid}.summary-row{border-bottom:1px solid var(--line);justify-content:space-between;align-items:flex-start;gap:1rem;padding-bottom:.6rem;display:flex}.summary-row:last-child{border-bottom:none;padding-bottom:0}.summary-row strong{white-space:nowrap}.plain-list{gap:.55rem;display:grid}.plain-list li{list-style:none}.cell-stack{gap:.18rem;min-width:0;display:grid}.cell-stack-end{text-align:right;justify-items:end}.cell-title{color:var(--foreground);font-weight:600}.cell-subtitle{color:var(--muted);font-size:.8rem;line-height:1.4}.status-chip{border-radius:var(--radius-chip);background:var(--surface);color:var(--foreground);align-items:center;padding:.2rem .52rem;font-size:.78rem;font-weight:700;display:inline-flex}.status-chip.negative{background:#b43d2b1a}.status-chip.muted{color:var(--muted);background:#6f786b1a}.status-chip.positive{background:#1d8b571a}.secondary-metrics{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.line-editor{border-radius:var(--radius-card);background:#fffffff5}.line-editor-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.availability-card{border:1px solid var(--line);border-radius:var(--radius-control);color:var(--muted);background:#f2f4efcc;flex-wrap:wrap;gap:.75rem 1rem;padding:.75rem .9rem;font-size:.9rem;display:flex}.availability-card-warning{color:var(--red);background:#f1a49417;border-color:#b43d2b40}.consumption-group{border:1px solid var(--line);border-radius:var(--radius-card);background:#fbfcfaeb;gap:.75rem;padding:.9rem;display:grid}.consumption-group-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.consumption-list{gap:.65rem;display:grid}.consumption-item{border-radius:var(--radius-control);background:#f2f4ef8c;border:1px solid #dde3d7e6;gap:.45rem;padding:.75rem .85rem;display:grid}.consumption-item-main{gap:.2rem;display:grid}.consumption-item-metrics{color:var(--muted);flex-wrap:wrap;gap:.75rem 1rem;font-size:.92rem;display:flex}.modal-backdrop{z-index:50;background:#18210f4d;place-items:center;padding:1.5rem;display:grid;position:fixed;inset:0}.modal-card{border:1px solid var(--line);border-radius:var(--radius-card);background:var(--card);width:min(760px,100%);max-height:calc(100vh - 3rem);padding:.95rem;overflow:auto;box-shadow:0 14px 32px #18210f1a}.modal-card-large{width:min(980px,100%)}.modal-header{justify-content:space-between;align-items:flex-start;gap:.75rem;margin-bottom:.8rem;display:flex}.modal-footer{border-top:1px solid var(--line);justify-content:flex-end;gap:.5rem;padding-top:.8rem;display:flex}.cost-item-list{gap:.75rem;display:grid}.cost-item-row{border:1px solid var(--line);border-radius:var(--radius-control);background:#fbfcfaf0;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;gap:.75rem;padding:.72rem;display:grid}.cost-item-row.readonly{grid-template-columns:minmax(0,2fr) auto}.cost-item-template{gap:.2rem;display:grid}.pill{border-radius:var(--radius-chip);background:var(--surface);color:var(--foreground);align-items:center;gap:.35rem;padding:.2rem .52rem;font-size:.8rem;font-weight:700;display:inline-flex}.app-loading-shell{grid-template-columns:var(--sidebar-width) 1fr;background:var(--bg);min-height:100vh;display:grid}.app-loading-sidebar{border-right:1px solid var(--line);background:#fffffff0}.page-loading{gap:var(--page-section-gap);display:grid}.loading-block,.loading-card,.loading-panel{border-radius:var(--radius-card);background:#edf0e8}.loading-title{width:min(22rem,60%);height:1.7rem}.loading-subtitle{width:min(34rem,80%);height:.9rem}.loading-card{min-height:5.5rem}.loading-panel{min-height:12rem}pre{white-space:pre-wrap}@media (max-width:960px){.app-shell,.app-loading-shell{grid-template-columns:1fr}.sidebar{border-right:none;border-bottom:1px solid var(--line)}.split,.page-grid-main,.two-column,.cost-item-row{grid-template-columns:1fr}.content{padding:1rem}.page-header{flex-direction:column}}
