:root{--bg:#202224;--side:#191b1d;--surface:#292c2e;--surface2:#303336;--line:#3a3d3f;--text:#f0f0ec;--muted:#999f9f;--accent:#e2b773;--green:#9ac9b1;--red:#ec9a91;--blue:#9ebcd2;--font:Arial,"Segoe UI",sans-serif;color-scheme:dark}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:14px var(--font);-webkit-font-smoothing:antialiased}
button,input,select{font:inherit}
button{cursor:pointer}
button,a,input,select{outline-offset:4px}
button:focus-visible,a:focus-visible{outline:2px solid var(--accent)}
button:disabled{cursor:wait;opacity:.55}
a{color:inherit;text-decoration:none}
button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
[hidden]{display:none!important}
.shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:190px;background:var(--side);border-right:1px solid #303234;padding:32px 20px;display:flex;flex-direction:column;z-index:20}
.brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:700;line-height:1.1;letter-spacing:-.5px}
.brand-light{display:block;font-size:13px;font-weight:400;letter-spacing:1.05px;color:#a8aaa8;margin-top:5px}
.brandmark{font-size:37px;letter-spacing:-5px;line-height:1;color:var(--text);position:relative;padding-right:7px}
.brandmark span{color:var(--accent)}
.nav-caption{font-size:9px;letter-spacing:2px;color:#7e8485;margin:57px 13px 17px}
.nav-item{height:46px;border-radius:7px;display:flex;align-items:center;gap:12px;padding:0 12px;font-size:14px}
.nav-item.active{background:#35332e;color:var(--accent);border:1px solid #4c4538}
.nav-item svg{width:19px;height:19px}
.nav-count{font-size:10px;margin-left:auto;opacity:.6}
.sidebar-note{margin:auto 12px 36px;font-size:11px;line-height:1.8;color:#737b7b}
.tiny-line{display:block;width:23px;height:2px;background:#696354;margin-bottom:13px}
.side-bottom{display:flex;align-items:center;font-size:10px;color:#8d9291;gap:7px}
.local-dot,.source-dot{width:6px;height:6px;display:inline-block;background:var(--green);border-radius:50%}
.version{margin-left:auto;color:#686e6e;font-size:9px}
.workspace{margin-left:190px;min-width:0}
.topbar{height:68px;padding:0 34px;border-bottom:1px solid #36393a;display:flex;align-items:center;justify-content:space-between;font-size:11px}
.breadcrumb{color:var(--muted)}
.breadcrumb span{padding:0 12px;color:#73797a}
.breadcrumb strong{color:#dedfdb;font-weight:400}
.header-right{display:flex;align-items:center;gap:8px;color:#acb2af;font-size:10px}
.header-separator{height:12px;background:#515655;width:1px;margin:0 7px}
main{padding:29px 32px 20px;max-width:1900px;margin:auto}
.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px;gap:20px}
.eyebrow{font-size:9px;letter-spacing:1.9px;color:#8c9291;margin-bottom:8px}
h1{margin:0;font-size:37px;font-weight:500;letter-spacing:-1.3px;line-height:1.2}
.title-dot{color:var(--accent)}
.page-heading p{font-size:12px;color:#aaaead;margin:9px 0 0}
.heading-actions{display:flex;gap:9px;padding-top:6px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:37px;border-radius:6px;padding:0 13px;font-size:11px;font-weight:500;white-space:nowrap;border:1px solid transparent;transition:background .15s}
.button.primary{background:var(--accent);color:#252725;border-color:var(--accent)}
.button.primary:hover{background:#efc788}
.button.secondary{background:#2c2f31;border-color:#494d4d;color:#dddeda}
.button.secondary:hover{background:#393d3e}
.notice{font-size:11px;line-height:1.6;border:1px solid #4d483d;border-radius:6px;color:#c4b697;background:#2b2a26;padding:10px 13px;margin:-7px 0 16px}
.notice.error{color:#efb9b1;border-color:#704d47;background:#342a29}
.product-tabs{display:flex;gap:4px;padding:5px;background:#191c1e;border:1px solid #33383a;border-radius:8px;min-height:49px}
.product-tab{border:1px solid transparent;flex:1;background:transparent;color:#9aa3a1;border-radius:5px;font-size:11px;padding:10px 8px;display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;transition:all .15s}
.product-tab.selected{background:#393b39;border-color:#53554e;color:#f0eee7;box-shadow:0 1px 5px #0002}
.product-tab:not(.selected):hover{background:#272b2c;color:#e3e7e3}
.product-dot{width:6px;height:6px;border-radius:50%;display:inline-block}
.product-dot.oil{background:var(--accent)}
.product-dot.meal{background:var(--green)}
.product-dot.seed{background:var(--blue)}
.margin-icon{font-family:Georgia,serif;font-style:italic;color:var(--accent);font-size:18px;line-height:10px}
.controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:19px 0 21px;font-size:10px}
.controls-left{display:flex;gap:7px;align-items:center;white-space:nowrap}
.badge{padding:5px 8px;border:1px solid #4b5050;color:#d4d8d1;border-radius:4px;white-space:nowrap}

.quote-type{color:#929b97;margin-left:4px}
.controls-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.control-label{color:#929997}
.period-buttons{display:flex;gap:2px}
.period-btn{font-size:10px;border:0;background:none;color:#a9b0ac;border-radius:4px;padding:6px 8px}
.period-btn.selected{background:#43463f;color:#e4e6dd}
.date-fields{display:flex;align-items:center;gap:7px;color:#7d8780}
.date-fields input{border:1px solid #454b48;color:#c2cbc4;background:#282e2b;border-radius:4px;font-size:10px;min-height:27px;width:111px;padding:3px 5px}
.chart-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.chart-card{background:var(--surface);border:1px solid #41453f;border-radius:8px;min-width:0;overflow:hidden}
.chart-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 21px 0}
.chart-eyebrow{font-size:8px;letter-spacing:1.6px;color:#8d9890;margin-bottom:8px}
h2{font-size:16px;font-weight:500;margin:0;letter-spacing:-.15px}
.icon-button{background:none;color:#99a39b;border:1px solid #474e47;width:27px;height:27px;border-radius:4px;display:flex;align-items:center;justify-content:center}
.icon-button:hover{color:#eeefe7;background:#3c413b}
.icon-button svg{width:14px;height:14px}
.chart-legend{display:flex;gap:18px;align-items:center;padding:15px 21px 0;font-size:10px;color:#b7c0b8;min-height:26px}
.legend-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:7px}
.legend-bar{display:inline-block;width:7px;height:7px;background:var(--accent);margin-right:7px;border-radius:1px}
.legend-line{display:inline-block;width:13px;height:2px;background:var(--green);margin-right:7px;vertical-align:middle}
.chart-box{position:relative;height:302px}
.chart{height:100%;width:100%}
.chart-foot{border-top:1px solid #40463f;margin:0 20px;padding:12px 0 13px;display:flex;justify-content:space-between;align-items:center;gap:10px;color:#8a968b;font-size:9px}
.text-button{border:none;background:none;color:#b9c1b4;font-size:10px;padding:0;white-space:nowrap}
.text-button:hover{color:var(--accent)}
.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:20px;background:var(--surface);z-index:2}
.empty-visual{font-size:44px;line-height:1;color:#757e70}
.empty-state h3{font-weight:400;font-size:15px;color:#c6cec0;margin:12px 0 6px}
.empty-state p{font-size:11px;color:#969f91;max-width:330px;line-height:1.6;margin:0 0 18px}
footer{font-size:9px;color:#7f8e6d;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:25px 0 3px}
.footer-sep{padding:0 7px;color:#647951}
footer a{color:#a7b88e}
.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#daca9e;color:#262d20;max-width:650px;padding:13px 19px;border-radius:7px;box-shadow:0 10px 40px #0005;z-index:150;font-size:12px}
dialog{border:1px solid #59624c;color:var(--text);background:#292f25;border-radius:12px;padding:25px;width:min(580px,calc(100vw - 30px));max-height:88vh;box-shadow:0 25px 100px #0008}
dialog::backdrop{background:#12170fbf;backdrop-filter:blur(4px)}
.dialog-title{display:flex;align-items:center;justify-content:space-between;gap:20px}
.dialog-title h2{font-size:19px}
.dialog-title .icon-button{font-size:23px;border:0}
.dialog-subtitle{font-size:11px;color:#a5b094;line-height:1.7;margin:15px 0 20px}
label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#b8c4a6;margin:14px 0}
select,dialog input[type=date]{background:#20281c;border:1px solid #546047;color:#d4e1c0;border-radius:5px;padding:10px;min-height:36px}
select{width:100%}
.checkbox-label{flex-direction:row;align-items:center;gap:9px}
input[type=checkbox]{accent-color:var(--accent)}
.job-dates{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.inline-warning{color:#b5ad87;background:#343325;border:1px solid #59543a;padding:11px;border-radius:5px;font-size:10px;line-height:1.6;margin:15px 0}
.full-width{width:100%}
.job-status{font-size:11px;margin:17px 0 5px;line-height:1.6;color:#c6d2b6}
.job-log{background:#171e13;border:1px solid #455338;border-radius:5px;padding:13px;color:#a6b791;white-space:pre-wrap;overflow:auto;max-height:220px;font-size:10px;line-height:1.5}
.source-item{padding:12px;border:1px solid #46533a;background:#252f1f;border-radius:5px;margin:8px 0;font-size:11px;line-height:1.7}
.source-item small{display:block;color:#99aa85;font-size:9px;word-break:break-all}
.source-item strong{color:#d0dfba;font-weight:400}
.import-zone{border:1px dashed #687652;border-radius:6px;padding:17px;margin:20px 0;font-size:12px}
.import-zone p{font-size:10px;color:#b0bd98;line-height:1.6}
.import-zone input{width:100%;font-size:11px}
#import-status,#warnings-list{font-size:11px;color:#d5b68d;line-height:1.8;margin-top:12px}
.modebar{background:transparent!important}
.modebar-btn{opacity:.7}
.chart-card{border-color:#3e4243}
.date-fields input{background:#292d2e;border-color:#454a4b;color:#c9cecb}

.chart-foot{border-color:#414546;color:#939b98}
footer{color:#8f9991}
dialog{background:#292e2f;border-color:#56605d}
.dialog-subtitle{color:#b0bbb4}
.source-item{background:#272e2c;border-color:#46524c}
.job-log{background:#1d2221;border-color:#454d48}
.import-zone{border-color:#657365}
select,dialog input[type=date]{background:#222827;border-color:#4e5a55}
dialog::backdrop{background:#15191bc9}
@media(min-width:1650px){main{padding:34px 42px}
.chart-box{height:365px}
.product-tab{font-size:13px}
.page-heading{margin-bottom:30px}
.chart-heading{padding-top:24px}}
@media(max-width:1240px){.sidebar{width:158px;padding:28px 15px}
.workspace{margin-left:158px}
main{padding:26px 22px}
.topbar{padding:0 24px}
.brand{font-size:16px}
.brand-light{font-size:11px}
.brandmark{font-size:32px}
.product-tab{font-size:10px;gap:5px;padding:9px 5px}
.controls{align-items:flex-start}
.controls-right{gap:7px}
.controls-left{gap:4px}
.control-label,.quote-type{display:none}
.heading-actions .button{font-size:10px;padding:0 10px}
.chart-box{height:290px}
.chart-foot{font-size:8px}
.text-button{font-size:9px}}
@media(max-width:1050px){.sidebar{width:76px;padding:27px 12px}
.workspace{margin-left:76px}
.brand>span:last-child,.nav-caption,.nav-count,.nav-item>span,.sidebar-note,.side-bottom{display:none}
.brandmark{margin:auto}
.nav-item{margin-top:49px;justify-content:center;padding:0}
.nav-item svg{width:22px;height:22px}
.controls{flex-wrap:wrap}
.controls-right{margin-left:auto}
.product-tab{font-size:10px}
.header-right{font-size:9px}
.page-heading p{font-size:11px}
.chart-legend{font-size:9px;gap:12px;padding-left:18px}
.chart-heading{padding-left:18px;padding-right:18px}}
@media(max-width:760px){.sidebar{display:none}
.workspace{margin:0}
.topbar{padding:0 18px;height:54px}
.header-right #mode-label,.header-separator{display:none}
main{padding:22px 14px}
.page-heading{align-items:flex-start}
.heading-actions{flex-direction:column}
.heading-actions .button{min-height:30px;font-size:9px}
h1{font-size:31px}
.eyebrow{font-size:8px;letter-spacing:1px}
.page-heading p{font-size:10px;max-width:220px;line-height:1.6}
.product-tabs{display:grid;grid-template-columns:1fr 1fr}
.product-tab{min-height:34px;justify-content:flex-start;padding-left:12px;font-size:10px}
.controls-left{margin-bottom:2px}
.controls-right{width:100%;justify-content:space-between}
.date-fields input{width:106px}
.chart-grid{grid-template-columns:1fr}
.chart-box{height:300px}
footer{font-size:8px;flex-wrap:wrap}
footer #data-status{order:3;width:100%}
.toast{width:90%;font-size:11px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Chart-focused layout: use the space formerly occupied by KPI and data panels. */
.chart-box{height:clamp(310px,calc(100dvh - 520px),580px)}
@media(max-width:760px){.chart-box{height:320px}}

/* v1.2: independent chart periods, one chart palette. */
:root{--chart-line:#5eb8f2;--chart-bar:#e76068}
.product-dot.oil,.product-dot.meal,.product-dot.seed{background:var(--chart-line)}
.controls{margin:15px 0 16px;min-height:26px}
.chart-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:18px 20px 0;padding:0 0 14px;border-bottom:1px solid #3c4143;min-height:43px}
.chart-controls .period-buttons{flex-shrink:0}
.chart-controls .period-btn{font-size:10px;min-height:28px;padding:6px 7px}
.chart-controls .period-btn.selected{background:#3b434a;color:#d7e8f4}
#half-card .period-btn.selected{background:#483437;color:#f5c3c7}
.chart-controls .date-fields{gap:5px;min-width:0}
.chart-controls .date-fields input,.chart-controls .date-fields select{width:114px;font-size:10px;padding:4px 6px;min-height:29px;border:1px solid #454b4e;border-radius:4px;background:#24292c;color:#d1d8dc}
.chart-controls .date-fields select{width:106px}
.chart-controls input[aria-invalid=true],.chart-controls select[aria-invalid=true]{border-color:var(--chart-bar)}
.chart-kind{font-size:13px;letter-spacing:2px;opacity:.9}
.line-kind,.legend-line,.legend-dot{color:var(--chart-line)}
.line-kind{color:var(--chart-line)}
.bar-kind{color:var(--chart-bar)}
.legend-dot,.legend-line{background:var(--chart-line)}
.legend-bar{background:var(--chart-bar)}
.legend-note{font-size:9px;color:#a1a9ae}
.chart-legend{gap:13px;min-height:35px;padding-top:13px;flex-wrap:wrap}
.chart-box{height:clamp(320px,calc(100dvh - 505px),600px)}
@media(min-width:1250px) and (max-width:1550px){.chart-controls{align-items:flex-start;flex-direction:column;gap:8px}.chart-controls .date-fields{align-self:flex-end}}
@media(min-width:761px) and (max-width:1249px){.chart-controls{align-items:flex-start;flex-direction:column;gap:8px;margin-left:17px;margin-right:17px}.chart-controls .date-fields{align-self:flex-end}.chart-controls .date-fields input{width:110px}}
@media(max-width:760px){.controls{margin:13px 0}.chart-controls{margin:16px 16px 0;gap:8px;align-items:flex-start;flex-direction:column}.chart-controls .date-fields{align-self:flex-end}.chart-legend{min-height:40px}.chart-box{height:330px}.chart-controls .date-fields select{width:110px}}

.commodity-data-status { margin: .4rem .65rem .65rem; color: #ffbf73; font-size: .875rem; }
