.excel-procurement{min-width:0;color:var(--text,#eeedf4)}
.excel-source{display:flex;gap:6px;margin-bottom:14px}.excel-source .button{min-height:36px;padding:7px 14px}
.excel-period{display:flex;align-items:flex-end;gap:20px;flex-wrap:wrap;padding:16px;border:1px solid var(--border,#353640);border-radius:10px;background:var(--panel,#202127);max-width:100%;box-sizing:border-box}
.excel-period label{display:grid;gap:6px;font-size:12px;color:var(--muted);min-width:0}.excel-period input{box-sizing:border-box;width:100%;min-width:0;height:40px;padding:8px 10px}.excel-period .excel-date{flex:0 1 180px}.excel-period .excel-date input{width:100%}
.excel-months{display:grid;grid-template-columns:repeat(4,minmax(60px,90px));gap:10px;border:0;padding:0;margin:0;min-width:0;max-width:100%}.excel-months legend{font-size:12px;font-weight:600;color:var(--text);padding:0;margin-bottom:10px}.excel-period-actions{display:flex;align-items:center;gap:14px;min-height:40px;flex-wrap:wrap}.excel-period-actions .button{height:40px;white-space:nowrap}.excel-period-actions span{color:var(--muted);white-space:nowrap}
.excel-procurement input{background:var(--theme-surface,#1a1b22);color:var(--theme-ink,#eeedf4);border:1px solid var(--theme-border,#3b3c48);border-radius:7px;font:inherit;min-height:36px}.excel-procurement input:focus{outline:2px solid var(--theme-accent-border,#b8a0ef);outline-offset:1px}
.excel-data-info{font-size:12px;color:var(--muted);margin:10px 0 12px}.excel-data-info>summary,.excel-rules>summary,.excel-method>summary{cursor:pointer}
.excel-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:14px 0}.excel-meta-grid>div{display:grid;gap:5px}.excel-meta-grid b{font-size:12px;color:var(--text);font-weight:500}
.excel-rules{font-size:12px;color:var(--muted)}.excel-rules>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:10px 0}.excel-rules p{line-height:1.5;margin:6px 0}.excel-rules b{color:var(--text)}
.excel-calculation-status{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin:10px 0;padding:9px 12px;background:var(--theme-warning-bg,#d5b27809);border-left:2px solid var(--theme-warning-border,#d5b278);font-size:12px;border-radius:0 6px 6px 0}.excel-calculation-status>div:first-child{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.excel-calculation-status span{color:var(--muted)}.excel-calculation-status p{margin:2px 0}.excel-status-details>summary{cursor:pointer;color:var(--theme-accent,#ceb9fa)}.excel-status-reasons{display:flex;flex-wrap:wrap;gap:6px;padding:10px 0 2px}.excel-status-reasons .button{display:flex;gap:8px;font-size:11px;padding:6px 9px;min-height:30px}.excel-status-details[open]{width:100%}
.excel-calculation-status.is-loading strong:before{content:'';display:inline-block;width:11px;height:11px;border:2px solid var(--theme-accent-border,#bca5f455);border-top-color:var(--theme-accent-border,#bca5f4);border-radius:50%;margin-right:8px;vertical-align:-2px;animation:excel-progress 1s linear infinite}@keyframes excel-progress{to{transform:rotate(360deg)}}
.excel-summary{display:flex;gap:0;border:1px solid var(--border,#353640);border-radius:10px;margin:14px 0;background:var(--panel,#202127)}.excel-summary article{padding:13px 24px;display:grid;gap:4px;border-right:1px solid var(--border);min-width:190px}.excel-summary article:first-child{min-width:250px}.excel-summary article:last-child{border-right:0}.excel-summary span{font-size:12px;color:var(--muted)}.excel-summary strong{font-size:25px;line-height:1.3;font-variant-numeric:tabular-nums}.excel-summary strong small{font-size:14px;font-weight:400;color:var(--muted)}
.excel-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.excel-filters input{min-width:190px;flex:1;padding:8px 10px}.excel-filters select{max-width:200px;min-width:120px;min-height:36px}.excel-filters .button{min-height:36px}
.excel-table-scroll{max-width:100%;overflow:auto;border:1px solid var(--border,#353640);border-radius:10px;max-height:65vh;isolation:isolate}
.excel-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1000px;table-layout:fixed;font-size:12px}.excel-table th,.excel-table td{padding:12px 10px;border-bottom:1px solid var(--border,#353640);width:auto;vertical-align:middle}.excel-table td{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.excel-table th:first-child{width:265px;position:sticky;left:0;background:var(--theme-surface,#202127);text-align:left;z-index:1}.excel-table thead th{position:sticky;top:0;background:var(--theme-surface-raised,#292732);z-index:2;height:56px;font-size:11px}.excel-table thead th:first-child{z-index:3;background:var(--theme-surface-raised,#292732)}.excel-table tbody th{font-weight:400}.excel-table tbody tr:last-child>*{border-bottom:0}.excel-table tbody tr:hover td{background-color:var(--theme-neutral-tint,#ffffff04)}
.excel-table button{background:none;border:0;color:inherit;font:inherit;text-align:inherit;cursor:pointer}.excel-table .excel-product-link{font-weight:600;padding:0;text-align:left;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.excel-product-meta{display:block;color:var(--muted);font-size:11px;margin-top:5px;font-weight:400}.excel-table .excel-number{display:flex;width:100%;justify-content:flex-end;gap:7px;padding:8px 0}.excel-number span{font-size:11px;opacity:.35}.excel-number:hover span{opacity:1;color:var(--theme-accent,#c9b2ff)}.excel-result{color:var(--theme-good,#cef38a);background:var(--theme-surface-raised,#283024);font-weight:700}.excel-table .excel-tag{display:block;font-size:10px;text-align:left;color:var(--theme-warning,#dbb37a);padding:4px 0 0}.excel-table .purchase-help-button{min-width:22px;min-height:22px;flex-basis:22px;font-size:10px!important}.excel-column-heading{gap:3px}.excel-table [data-ex-sort]{padding:0;line-height:1.4}
.excel-table-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;margin:10px 0}.excel-method{font-size:12px;line-height:1.6;margin:16px 0;color:var(--muted)}.excel-method p{max-width:950px}.excel-method summary{font-weight:500}.excel-caution{color:var(--theme-warning,#d7b47e)}
.excel-detail-dialog{inset:0 0 0 auto;margin:0;width:min(660px,96vw);max-width:96vw;height:100dvh;max-height:100dvh;padding:0;border:0;border-left:1px solid var(--border,#353640);border-radius:0;background:var(--theme-surface,#1d1e25);color:var(--theme-ink,#eeedf4);box-shadow:-12px 0 60px var(--theme-shadow-color,#0006);overflow:hidden}
.excel-detail-dialog[open]{display:flex;flex-direction:column}.excel-detail-dialog::backdrop{background:var(--theme-overlay,#0007)}.excel-detail-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px 24px 18px;flex-shrink:0}.excel-detail-dialog h2{font-size:20px;line-height:1.35;margin:7px 0 0}.excel-detail-dialog small{display:block;color:var(--muted,#aba8b8);font-size:12px;overflow-wrap:anywhere}.excel-detail-dialog>header button{font-size:26px;flex-shrink:0;width:32px;height:32px}.excel-detail-dialog>nav{display:flex;gap:6px;padding:0 24px 18px;border-bottom:1px solid var(--border,#353640);flex-shrink:0;overflow-x:auto}.excel-detail-dialog>nav .button{padding:7px 12px;min-height:34px;font-size:12px;white-space:nowrap}.excel-detail-body{padding:20px 24px 32px;overflow:auto;font-size:13px;line-height:1.6;min-height:0}.excel-detail-body h3{font-size:14px;margin:22px 0 12px}.excel-detail-body p{margin:10px 0}.excel-detail-body .excel-detail-notice{margin:0 0 18px;font-size:12px;color:var(--theme-warning,#cfba88);padding:9px 12px;background:var(--theme-warning-bg,#d5b2780a);border-radius:6px}.excel-detail-kpis{padding:12px 16px;background:var(--theme-neutral-tint,#ffffff03);border:1px solid var(--border);border-radius:8px;margin-bottom:20px}.excel-detail-pair{display:flex;justify-content:space-between;gap:18px;padding:5px 0;align-items:baseline}.excel-detail-pair b{white-space:nowrap;font-variant-numeric:tabular-nums}.excel-source-detail{border-top:1px solid var(--border,#353640);padding:12px 0}.excel-source-detail>summary{display:flex;align-items:baseline;gap:9px;font-size:13px;cursor:pointer;list-style:none}.excel-source-detail>summary::-webkit-details-marker{display:none}.excel-source-detail>summary:before{content:'▸';color:var(--theme-accent,#bba1f7)}.excel-source-detail[open]>summary:before{content:'▾'}.excel-source-detail>summary span{flex:1}.excel-source-detail>summary b{white-space:nowrap}
.excel-daily-history{margin:14px 0}.excel-daily-history>summary{padding:9px 12px;cursor:pointer;color:var(--theme-accent,#ceb9fa);border:1px solid var(--border,#353640);border-radius:7px}.excel-day-audit{border-collapse:collapse;width:100%;font-size:12px;margin-top:12px}.excel-day-audit th,.excel-day-audit td{padding:8px 6px;border-bottom:1px solid var(--border,#353640);text-align:right}.excel-day-audit th:first-child,.excel-day-audit td:first-child{text-align:left}
.excel-season-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.excel-season-step{padding:14px;border:1px solid var(--border,#353640);border-radius:9px}.excel-season-step header{display:flex;justify-content:space-between;gap:8px;margin-bottom:10px}.excel-season-step header span{color:var(--muted)}.excel-season-step>strong{color:var(--theme-accent,#ceb9fa);font-size:12px;font-weight:500}.excel-season-step p{font-size:13px}.excel-season-step>div{padding-top:8px;font-size:12px}.excel-season-step small{font-size:11px}.excel-season-step b{font-variant-numeric:tabular-nums}
@media(max-width:1050px){.excel-summary article{padding:12px 16px;min-width:0;flex:1}.excel-summary article:first-child{min-width:0;flex:1.2}.excel-period{gap:10px}}
@media(max-width:700px){.excel-period{gap:8px}.excel-months{flex:1 1 100%;grid-template-columns:repeat(4,minmax(0,1fr))}.excel-period label{min-width:0}.excel-period input{width:100%}.excel-period .excel-date{flex:0 0 100%}.excel-period .excel-date input{width:100%}.excel-source{flex-wrap:wrap}.excel-source .button{flex:1}.excel-period-actions{width:100%;justify-content:space-between}.excel-summary strong{font-size:20px}.excel-summary article{padding:10px;gap:7px}.excel-summary span{font-size:10px}.excel-summary strong small{font-size:11px}.excel-filters select{flex:1;max-width:none}.excel-filters input{flex-basis:100%}.excel-meta-grid,.excel-rules>div{grid-template-columns:1fr}.excel-detail-dialog{width:100vw;max-width:100vw}.excel-detail-dialog>header{padding:18px}.excel-detail-dialog>nav{padding:0 18px 14px}.excel-detail-body{padding:16px 18px}.excel-season-steps{grid-template-columns:1fr}.excel-table th:first-child{width:220px}.excel-table{min-width:950px}}
@media(prefers-reduced-motion:reduce){.excel-calculation-status.is-loading strong:before{animation:none}}

.excel-calculation-status.is-ready{border-left-color:var(--theme-good-border,#7acbb7);background:var(--theme-good-bg,#7acbb707)}.excel-pace-chain{display:grid;gap:10px;margin:0 0 26px}.excel-pace-chain article,.excel-missing-item{padding:14px 16px;border:1px solid var(--border,#353640);border-radius:8px}.excel-pace-chain article>small:first-child{color:var(--theme-accent,#c7aff6);margin-bottom:8px}.excel-pace-chain article:last-child{background:var(--theme-accent-bg,#bca5f409)}.excel-pace-chain article:last-child strong{font-size:17px}.excel-missing-item{margin-bottom:12px}

.niche-import-dialog form{display:grid;gap:16px;margin:20px 0}.niche-import-dialog label{display:grid;gap:8px}.niche-import-dialog fieldset{display:flex;gap:16px;flex-wrap:wrap;border:1px solid var(--border);padding:16px}.niche-import-dialog input{max-width:100%;padding:10px}.niche-preview-table{max-height:40vh;overflow:auto;margin:16px 0}.niche-preview-table table{width:100%;border-collapse:collapse}.niche-preview-table td,.niche-preview-table th{padding:10px;text-align:left;border-bottom:1px solid var(--border)}.niche-import-dialog [role=status]{color:var(--accent);min-height:24px}

.excel-calculation-status{align-items:stretch;gap:8px;padding:12px 14px}.excel-calculation-status>div:first-child{width:100%}.excel-refresh-stamp{width:100%;color:var(--muted);font-size:11px}.excel-refresh-explanation{width:100%;display:grid;gap:3px}.excel-refresh-explanation p{line-height:1.5}.excel-refresh-cabinets{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}.excel-refresh-cabinets>div{display:grid;gap:4px;padding:10px 12px;background:var(--surface,#22232b);border:1px solid var(--border,#353640);border-radius:8px}.excel-refresh-cabinets small{color:var(--muted);line-height:1.4}.excel-refresh-issues{width:100%;line-height:1.5}.excel-refresh-issues summary{cursor:pointer;color:var(--theme-warning,#d5b278)}.excel-refresh-issues p{margin-top:6px}.excel-refresh-stamp+.excel-refresh-explanation{margin-top:0}

/* Three aligned rows: source, calculation settings, results. */
.page-heading:has(+.excel-procurement){margin-bottom:16px}.page-heading:has(+.excel-procurement) h1{font-size:28px}
.excel-toolbar{display:grid;gap:0;margin:0 0 4px;min-width:0}
.excel-toolbar .excel-source{display:flex;align-items:center;gap:8px;margin:0;padding:0 0 12px;border-bottom:1px solid var(--border);min-width:0;flex-wrap:wrap}
.excel-toolbar .excel-source .button{min-height:36px;padding:7px 14px}
.excel-toolbar [data-ex-niche]{margin-left:auto;border-color:transparent;background:transparent;color:var(--theme-accent,#bca5f4);font-weight:500}
.excel-toolbar .excel-period{display:grid;grid-template-columns:minmax(270px,368px) max-content;align-items:end;justify-content:start;gap:16px;width:100%;min-width:0;max-width:100%;padding:12px 0;margin:0;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;box-sizing:border-box}
.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:168px minmax(270px,368px) max-content}
.excel-toolbar .excel-date{min-width:0}.excel-toolbar .excel-period label{font-size:12px;gap:6px}
.excel-toolbar .excel-period input{width:100%;height:36px;min-height:36px;box-sizing:border-box;padding:7px 10px;font-size:13px}
.excel-toolbar .excel-months{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%;min-width:0}
.excel-toolbar .excel-months legend{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.excel-toolbar .excel-period-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:16px;width:max-content;min-width:max-content;min-height:36px}
.excel-toolbar .excel-period-actions .button{height:36px;min-height:36px;padding:7px 14px;font-size:13px;flex:none}
.excel-toolbar .excel-period-actions span{order:-1;font-size:13px;white-space:nowrap;color:var(--muted)}
.excel-overview{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;margin:0 0 10px;padding:12px 0;border-bottom:1px solid var(--border);min-width:0}
.excel-overview>[data-ex-summary]{flex:0 1 auto;min-width:0;max-width:100%}
.excel-overview .excel-summary{display:flex;width:auto;max-width:100%;margin:0;border:0;border-radius:0;background:transparent}
.excel-overview .excel-summary article,.excel-overview .excel-summary article:first-child{min-width:0;padding:0 24px;gap:4px;border-color:var(--border)}
.excel-overview .excel-summary article:first-child{padding-left:0}.excel-overview .excel-summary article:last-child{padding-right:0}
.excel-overview .excel-summary strong{font-size:24px;line-height:1.2}.excel-overview .excel-summary span{font-size:12px;line-height:1.4}
.excel-overview .excel-calculation-status{flex:1 1 300px;min-width:0;margin:0;padding:4px 0 4px 24px;display:block;background:transparent;border:0;border-left:1px solid var(--border);border-radius:0}
.excel-overview .excel-calculation-status>div:first-child{gap:8px;min-height:22px}.excel-overview .excel-calculation-status>div:first-child>span{display:block;font-size:11px}
.excel-overview .excel-status-details{margin-top:4px}.excel-status-details>summary{font-size:12px;font-weight:400}.excel-status-body{padding:12px 0 4px;display:grid;gap:8px}.excel-status-body .excel-data-info{margin:4px 0}.excel-status-body .excel-status-reasons{padding:0}.excel-overview .excel-refresh-stamp{margin:0}.excel-filters{margin:10px 0}
@media(max-width:1000px){.excel-overview .excel-summary article,.excel-overview .excel-summary article:first-child{padding-right:16px;padding-left:16px}.excel-overview .excel-summary article:first-child{padding-left:0}.excel-overview .excel-calculation-status{flex-basis:260px;padding-left:16px}}
@media(max-width:850px){.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:150px minmax(0,1fr)}.excel-toolbar .excel-period-actions{grid-column:1/-1}.excel-overview .excel-calculation-status{border:0;padding:0;flex-basis:100%}}
@media(max-width:550px){.excel-toolbar .excel-source .button{flex:0 1 auto;font-size:12px;padding:6px 10px}.excel-toolbar [data-ex-niche]{margin-left:0}.excel-toolbar .excel-period,.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:minmax(0,1fr);gap:10px}.excel-toolbar .excel-date{width:100%}.excel-toolbar .excel-period-actions{width:100%;justify-content:space-between;min-width:0}.excel-toolbar .excel-months{gap:8px}.excel-overview>[data-ex-summary]{width:100%}.excel-overview .excel-summary article,.excel-overview .excel-summary article:first-child{flex:1;padding:0 10px}.excel-overview .excel-summary article:first-child{padding-left:0}.excel-overview .excel-summary strong{font-size:21px}.excel-overview .excel-summary span{font-size:11px}}
.excel-procurement{container-type:inline-size;container-name:excel-procurement}
@container excel-procurement (max-width:760px){.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:150px minmax(0,1fr)}.excel-toolbar .excel-period-actions{grid-column:1/-1}.excel-overview .excel-calculation-status{border:0;padding:0;flex-basis:100%}}
@container excel-procurement (max-width:520px){.excel-toolbar .excel-period,.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:minmax(0,1fr);gap:10px}.excel-toolbar .excel-date{width:100%}.excel-toolbar .excel-period-actions{width:100%;justify-content:space-between;min-width:0}.excel-overview>[data-ex-summary]{width:100%}}

/* Six-month plan, including the year boundary. */
.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:168px minmax(450px,620px) max-content}.excel-toolbar .excel-period:has(.excel-date) .excel-months{grid-template-columns:repeat(6,minmax(0,1fr))}
@container excel-procurement (max-width:1000px){.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:168px minmax(0,1fr)}.excel-toolbar .excel-period-actions{grid-column:1/-1}}
@container excel-procurement (max-width:600px){.excel-toolbar .excel-period:has(.excel-date){grid-template-columns:minmax(0,1fr)}.excel-toolbar .excel-period:has(.excel-date) .excel-months{grid-template-columns:repeat(3,minmax(0,1fr))}}

.excel-table.excel-table-history{min-width:1330px}
.excel-column-month{display:block;margin-top:4px;color:var(--muted);font-size:10px;font-weight:400;white-space:nowrap}
