.delivery-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:14px;margin-bottom:14px}.delivery-filters label{display:grid;gap:5px;color:var(--muted);font-size:12px}.delivery-filters input{background:var(--surface-subtle);border:1px solid var(--border);border-radius:9px;color:var(--ink);padding:8px 10px;min-width:0;width:155px;height:40px}.delivery-filters input[type=number]{width:110px}.delivery-filters .monitor-scope{flex:1 0 100%;min-width:0}.delivery-status,.delivery-note{color:var(--muted);font-size:12px;line-height:1.6;margin:10px 0}.delivery-metrics{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin:12px 0 18px}.delivery-metric{padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface, #202127);display:flex;flex-direction:column;gap:9px;min-width:0}.delivery-metric>span{font-size:12px;color:var(--muted)}.delivery-metric strong{font-size:25px;font-variant-numeric:tabular-nums}.delivery-metric small{font-size:11px;color:var(--muted);line-height:1.4}.delivery-warn strong{color:var(--theme-warning,#f3bd82)}.delivery-chart{overflow:visible;position:relative;z-index:2}.delivery-chart,.delivery-list,.delivery-method{padding:18px;margin-bottom:16px;min-width:0}.delivery-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.delivery-section-head h2{margin:0;font-size:17px}.delivery-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px}.delivery-legend span{display:flex;gap:6px;align-items:center}.delivery-legend i{width:12px;height:12px;border-radius:3px;background:var(--theme-accent-bg,#bca5fa)}.delivery-legend span:nth-child(2) i{background:var(--theme-good-bg,#83d6bb)}.delivery-legend span:nth-child(3) i{background:var(--theme-good-bg,#83d6bb);opacity:.4}[data-delivery-plot]{position:relative;margin-top:12px}[data-delivery-plot] svg text{font-size:11px;fill:var(--muted)}.delivery-grid{stroke:var(--border);stroke-dasharray:3 5}.delivery-hit{fill:transparent;cursor:crosshair}.delivery-hit:hover,.delivery-hit:focus{fill:var(--theme-accent,#bca5fa12);outline:none}.delivery-tooltip{position:absolute;z-index:1000;padding:14px 18px;border:1px solid var(--theme-border,#756585);border-radius:12px;background:var(--theme-surface-raised,#30283b);box-shadow:0 8px 30px var(--theme-shadow-color,#0005);pointer-events:none;max-width:calc(100vw - 24px);font-size:13px}.delivery-tooltip p{margin:8px 0 0;line-height:1.7}.delivery-tabs{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:2px}.delivery-tabs button{white-space:nowrap}.delivery-tabs .active{background:var(--theme-accent-bg,#bca5fa30);border-color:var(--theme-accent-border,#bca5fa)}.delivery-section-head input{width:245px;min-width:0}.delivery-table-scroll{overflow:auto;max-width:100%;margin-top:16px}.delivery-table{width:100%;border-collapse:collapse;font-size:12px}.delivery-table th,.delivery-table td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--border);vertical-align:top;min-width:100px;font-variant-numeric:tabular-nums}.delivery-table th:first-child{min-width:220px;max-width:360px}.delivery-table thead th{font-weight:500;color:var(--muted);white-space:nowrap}.delivery-table small{display:block;color:var(--muted);font-weight:400;line-height:1.5;margin-top:5px}.delivery-table summary{font-weight:400;cursor:pointer;line-height:1.5}.delivery-table details{margin-top:6px}.delivery-table details p{font-weight:400;margin:8px 0}.delivery-problem{background:var(--theme-warning-bg,#f3bd8208)}.delivery-table .delivery-alert,.delivery-alert{color:var(--theme-warning,#f3bd82)}.delivery-method{font-size:13px;line-height:1.6;color:var(--muted)}.delivery-method summary{cursor:pointer;color:var(--ink)}.delivery-source-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}.delivery-source-grid>div{padding:12px;background:var(--theme-neutral-tint,#ffffff04);border-radius:10px}.delivery-source-grid small{display:block}.delivery-empty{padding:32px;color:var(--muted)}
@media(max-width:1400px){.delivery-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:700px){.delivery-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.delivery-metric{padding:12px}.delivery-metric strong{font-size:24px}.delivery-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.delivery-filters input,.delivery-filters input[type=number]{width:100%}.delivery-filters .monitor-scope{grid-column:1/-1;min-width:0}.delivery-chart{overflow:visible;position:relative;z-index:2}.delivery-chart,.delivery-list,.delivery-method{padding:12px}.delivery-section-head{display:block}.delivery-legend{margin-top:12px;gap:12px}.delivery-section-head input{margin-top:12px;width:100%}.delivery-tabs{gap:4px}.delivery-tabs button{font-size:12px}}
.delivery-filters select,.delivery-view-controls select,.delivery-section-head input{background:var(--surface-subtle);color:var(--ink);border:1px solid var(--border);border-radius:9px;padding:8px 12px;min-width:0;height:40px}.delivery-view-controls{margin:14px 0}.delivery-view-controls label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px}.delivery-chart-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.delivery-chart-grid .delivery-chart{margin:0}.delivery-chart h2{font-size:18px;margin:0 0 16px}.delivery-group-title{font-size:20px;margin:26px 0 14px}.delivery-card-totals{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:16px}.delivery-card-totals span{font-size:12px;color:var(--muted);display:grid;gap:5px}.delivery-card-totals b{font-size:21px;color:var(--ink);font-variant-numeric:tabular-nums}.delivery-card-totals small{font-size:10px}.delivery-legend{gap:12px}.delivery-legend i{height:3px;width:15px;opacity:1!important}.delivery-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.delivery-chart-grid+.delivery-method{margin-top:16px}
@media(max-width:1450px){.delivery-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.delivery-chart-grid{grid-template-columns:1fr}.delivery-card-totals{gap:16px}.delivery-view-controls label{display:grid;margin-top:12px}.delivery-filters select{width:100%}}@media(max-width:700px){.delivery-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.delivery-card-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.delivery-card-totals b{font-size:17px}.delivery-card-totals span{font-size:11px}}

.delivery-chart{background:var(--surface,#202127);border:1px solid var(--border);border-radius:16px}.delivery-chart-grid{margin-bottom:20px}
/* The delivery overview is centered on the current queue. */
.delivery-now{grid-template-columns:repeat(3,minmax(0,1fr))}.delivery-now .delivery-metric{text-align:left;color:var(--ink);cursor:pointer;font:inherit}.delivery-now .delivery-metric:hover{border-color:var(--accent,#bca5fa)}.delivery-now .delivery-metric:focus-visible{outline:2px solid var(--theme-accent-border,#bca5fa);outline-offset:3px}.delivery-simple-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.delivery-simple-charts h2{margin:0;font-size:17px}.delivery-simple-charts select{max-width:180px;background:var(--surface-subtle);color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:7px 10px}.delivery-simple-charts label{font-size:12px;color:var(--muted)}.delivery-main-tabs{margin-bottom:12px}.delivery-list>.delivery-tabs{margin-top:12px}.delivery-queue-table th:first-child{min-width:200px;width:40%}.delivery-queue-table td{white-space:nowrap}.delivery-queue-table th b{font-weight:600}#delivery-queue{scroll-margin-top:20px}
@media(max-width:1050px){.delivery-simple-charts{grid-template-columns:1fr}}
@media(max-width:700px){.delivery-now{grid-template-columns:repeat(3,minmax(0,1fr))}.delivery-now .delivery-metric{padding:10px;gap:7px}.delivery-now .delivery-metric strong{font-size:18px}.delivery-now .delivery-metric>span{font-size:11px}.delivery-now .delivery-metric small{font-size:10px}.delivery-simple-charts .delivery-section-head{display:flex}.delivery-simple-charts select{max-width:155px}.delivery-filters .button[type=submit]{grid-column:1/-1}.delivery-queue-table td,.delivery-queue-table th{padding:10px 8px}.delivery-main-tabs button{font-size:13px}}

/* Operational queue: current work first, historical charts on separate tabs. */
.delivery-scope{padding:10px 12px;margin-bottom:14px}.delivery-period{padding:0;margin:14px 0 10px}.delivery-period .delivery-note{margin:0 0 8px}.delivery-now .selected{border-color:var(--theme-accent-border,#bca5fa);background:var(--theme-accent-bg,#bca5fa0e)}.delivery-waiting{padding:16px 18px;border:1px solid var(--border);border-radius:14px;margin-bottom:18px;background:var(--surface,#202127)}.delivery-waiting h2{font-size:14px}.delivery-waiting .delivery-note{margin:0}.delivery-age-bands{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:14px}.delivery-age-bands button{color:var(--ink);font:inherit;display:grid;gap:8px;text-align:left;padding:10px 12px;border:1px solid transparent;border-radius:8px;background:transparent;cursor:pointer}.delivery-age-bands button>span:first-child{color:var(--muted);font-size:12px}.delivery-age-bands strong{font-size:23px;font-variant-numeric:tabular-nums}.delivery-age-bands button:hover:not(:disabled),.delivery-age-bands button.active{background:var(--theme-accent-bg,#bca5fa12);border-color:var(--theme-accent-border,#bca5fa80)}.delivery-age-bands button:disabled{opacity:.5;cursor:default}.delivery-age-bands button:focus-visible{outline:2px solid var(--theme-accent-border,#bca5fa)}.delivery-age-track{height:4px;background:var(--theme-accent-bg,#bca5fa14);border-radius:4px;overflow:hidden}.delivery-age-track i{display:block;height:100%;background:var(--theme-accent-bg,#bca5fa);border-radius:4px}.delivery-queue-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0 0;font-size:12px;color:var(--muted)}.delivery-queue-tools label{display:flex;align-items:center;gap:8px}.delivery-queue-tools select{background:var(--surface-subtle);color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:7px}.delivery-count{font-size:13px;font-weight:400;color:var(--muted);margin-left:5px}.delivery-single-chart{grid-template-columns:1fr}.delivery-single-chart .delivery-chart{margin-bottom:0}.delivery-queue-notice{padding:0 2px}.delivery-queue-notice .button{padding:0 4px;min-height:0}.delivery-list{padding:0 2px}.delivery-queue-table{font-size:13px}.delivery-queue-table th,.delivery-queue-table td{padding:14px 10px}.delivery-status{font-size:11px;margin:8px 0}.delivery-main-tabs{margin-bottom:8px}.delivery-now{margin-top:10px}
@media(max-width:700px){.delivery-period .button[type=submit]{grid-column:auto}.delivery-period .delivery-note{grid-column:1/-1}.delivery-period{display:flex;flex-wrap:wrap}.delivery-period label{flex:1;min-width:100px}.delivery-period input{width:100%}.delivery-waiting{padding:12px}.delivery-waiting .delivery-section-head{display:flex;gap:6px}.delivery-waiting .delivery-note{font-size:11px}.delivery-age-bands{gap:3px;margin-top:8px}.delivery-age-bands button{padding:8px 3px;gap:7px}.delivery-age-bands strong{font-size:20px}.delivery-age-bands button>span:first-child{font-size:10px;white-space:nowrap}.delivery-now .delivery-metric strong{font-size:19px}.delivery-now .delivery-metric small{font-size:10px}.delivery-queue-tools{align-items:flex-start;gap:8px}.delivery-main-tabs .button{padding:9px 12px}.delivery-queue-table th,.delivery-queue-table td{padding:10px 8px}}
@media(max-width:600px){.delivery-queue-table th,.delivery-queue-table td{padding:0}.delivery-queue-table td{font-size:13px}.delivery-queue-table th b{font-size:14px}.delivery-queue-table tr{padding:14px 2px}.delivery-now{gap:6px}.delivery-now .delivery-metric{padding:10px 8px}.delivery-now .delivery-metric strong{font-size:17px}}
/* Marketplace-specific shipping costs, separate from the working queue. */
.delivery-terms-intro{max-width:850px;margin:22px 0 18px}.delivery-terms-intro h2{font-size:22px;margin:0 0 8px}.delivery-terms-intro p{color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 6px}.delivery-terms-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}.delivery-term-card{padding:20px;min-width:0}.delivery-term-card header{display:flex;align-items:center;gap:12px}.delivery-term-card h3{margin:0;font-size:19px}.delivery-term-card header p{margin:5px 0 0;color:var(--muted);font-size:12px}.delivery-market-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;flex-shrink:0;font-size:12px;font-weight:700;color:white}.delivery-market-mark.wb{background:#9842ab}.delivery-market-mark.ozon{background:#245edb}.delivery-market-mark.yandex{background:#f4d340;color:#292626}.delivery-term-target{display:grid;gap:5px;margin:18px 0 12px;padding:12px 14px;border-radius:10px;background:var(--theme-accent-bg,#bca5fa0c);font-size:12px;color:var(--muted);line-height:1.45}.delivery-term-target strong{font-size:16px;color:var(--ink)}.delivery-term-target small{font-size:11px}.delivery-term-card h4{font-size:13px;margin:18px 0 4px}.delivery-term-card h4+.delivery-note{margin:0 0 10px}.delivery-term-steps{list-style:none;padding:0;margin:12px 0 20px}.delivery-term-step{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--border);--term-color:#83d6bb}.delivery-term-step:last-child{border-bottom:0}.delivery-term-step.caution{--term-color:#d0ef83}.delivery-term-step.warning{--term-color:#f3bd82}.delivery-term-step.danger{--term-color:#ff9da8}.delivery-term-dot{width:7px;height:7px;flex-shrink:0;border-radius:50%;background:var(--term-color);margin-top:5px}.delivery-term-step>div{display:grid;gap:5px;min-width:0}.delivery-term-step b{font-size:13px;color:var(--term-color);font-weight:600}.delivery-term-step span:not(.delivery-term-dot){font-size:13px;color:var(--ink)}.delivery-term-step small{font-size:11px;color:var(--muted);line-height:1.5}.delivery-term-steps.compact{margin:0 0 14px}.delivery-term-steps.compact .delivery-term-step{padding:8px 0}.delivery-term-steps.compact .delivery-term-step>div{display:flex;justify-content:space-between;gap:12px;width:100%;flex-wrap:wrap}.delivery-term-card details{border-top:1px solid var(--border);padding:12px 0;font-size:12px;line-height:1.6;color:var(--muted)}.delivery-term-card details:last-child{padding-bottom:0}.delivery-term-card summary{color:var(--ink);cursor:pointer;font-size:12px}.delivery-term-card a{color:var(--theme-accent,#bca5fa)}.delivery-term-notice{padding:12px;border-radius:10px;background:var(--theme-warning-bg,#f3bd820a);border-left:2px solid var(--theme-warning-border,#f3bd82);color:var(--muted);font-size:12px;line-height:1.6}.delivery-term-table-scroll{overflow:auto;margin-top:12px}.delivery-term-table{width:100%;border-collapse:collapse;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}.delivery-term-table th,.delivery-term-table td{text-align:right;padding:8px 4px;border-bottom:1px solid var(--border)}.delivery-term-table th:first-child{text-align:left}.delivery-term-table caption{text-align:left;margin-bottom:6px;color:var(--muted)}
@media(max-width:1200px){.delivery-terms-grid{grid-template-columns:1fr}.delivery-term-card{padding:18px}.delivery-term-steps.compact .delivery-term-step>div{justify-content:flex-start}.delivery-term-table{max-width:550px}}
@media(max-width:600px){.delivery-terms-intro{margin-top:16px}.delivery-terms-intro h2{font-size:20px}.delivery-terms-intro p{font-size:13px}.delivery-terms-grid{gap:12px}.delivery-term-card{padding:16px}.delivery-term-target strong{font-size:15px}.delivery-term-steps.compact .delivery-term-step>div{display:grid;gap:4px}.delivery-term-table th,.delivery-term-table td{padding:8px 3px;font-size:10px}}
/* Main delivery dashboard: current work and marketplace rules in one card. */
.delivery-dashboard{margin:18px 0 24px}.delivery-dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.delivery-dashboard-heading h2{font-size:20px;margin:0 0 7px}.delivery-dashboard-heading p{font-size:13px;color:var(--muted);margin:0}.delivery-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.delivery-dashboard-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--border);border-radius:16px;background:var(--surface,#202127);padding:18px}.delivery-dashboard-card.selected{border-color:var(--theme-accent-border,#bca5fa)}.delivery-dashboard-card header{display:flex;align-items:center;gap:10px}.delivery-dashboard-card h3{font-size:18px;margin:0}.delivery-market-total{display:flex;align-items:center;gap:12px;color:var(--ink);text-align:left;border:0;background:transparent;padding:18px 0 12px;font:inherit;cursor:pointer;width:100%}.delivery-market-total:disabled{cursor:default;opacity:1}.delivery-market-total>strong{font-size:34px;letter-spacing:-1px;font-variant-numeric:tabular-nums}.delivery-market-total>span{font-size:12px;line-height:1.5}.delivery-market-total small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.delivery-market-total:hover:not(:disabled)>strong{color:var(--theme-accent,#bca5fa)}.delivery-market-total:focus-visible,.delivery-stage:focus-visible{outline:2px solid var(--theme-accent-border,#bca5fa);outline-offset:2px;border-radius:8px}.delivery-market-goal{color:var(--muted);font-size:12px;line-height:1.5;min-height:36px;margin:0 0 12px}.delivery-stage-list{display:grid;gap:5px;margin-bottom:14px}.delivery-stage{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;border:1px solid transparent;border-radius:9px;background:var(--theme-neutral-tint,#ffffff03);padding:10px;color:var(--ink);font:inherit;cursor:pointer;--stage:#83d6bb}.delivery-stage:disabled{cursor:default;opacity:.65}.delivery-stage.caution{--stage:#d0ef83}.delivery-stage.warning{--stage:#f3bd82}.delivery-stage.danger{--stage:#ff9da8}.delivery-stage.muted{--stage:var(--muted)}.delivery-stage b{font-size:12px;font-weight:600;color:var(--stage)}.delivery-stage b:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--stage);margin-right:7px;vertical-align:1px}.delivery-stage small{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin-top:4px}.delivery-stage>strong{font-size:23px;color:var(--stage);font-variant-numeric:tabular-nums;flex-shrink:0}.delivery-stage:hover:not(:disabled),.delivery-stage.active{border-color:var(--theme-accent-border,#bca5fa80);background:var(--theme-accent-bg,#bca5fa0a)}.delivery-market-rules{padding-top:12px;border-top:1px solid var(--border);font-size:11px;line-height:1.55}.delivery-market-rules>b{font-size:12px}.delivery-market-rules p{color:var(--muted);margin:6px 0 8px}.delivery-market-rules .delivery-dashboard-caveat{border-left:2px solid var(--theme-warning-border,#f3bd8260);padding-left:9px}.delivery-dashboard-card footer{margin-top:auto;padding-top:10px;font-size:10px;line-height:1.5;color:var(--muted)}.delivery-dashboard-card footer span{display:block;margin-top:3px}.delivery-queue-selection{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;margin-top:12px;color:var(--theme-accent,#bca5fa)}.delivery-order-stage{display:block;font-size:11px;color:var(--theme-accent,#bca5fa);margin-bottom:5px}
@media(max-width:1150px){.delivery-dashboard-grid{grid-template-columns:1fr}.delivery-dashboard-card{padding:16px}.delivery-market-goal{min-height:0}.delivery-market-total{padding-top:12px}.delivery-stage-list{grid-template-columns:repeat(2,minmax(0,1fr))}.delivery-market-rules{max-width:750px}}
@media(max-width:600px){.delivery-dashboard{margin-top:14px}.delivery-dashboard-heading h2{font-size:18px}.delivery-dashboard-heading{gap:8px}.delivery-dashboard-grid{gap:12px}.delivery-dashboard-card h3{font-size:18px}.delivery-market-total>strong{font-size:32px}.delivery-stage-list{grid-template-columns:1fr}.delivery-stage{padding:9px 10px}.delivery-stage b{font-size:12px}.delivery-stage small{font-size:11px}.delivery-market-rules{font-size:12px}.delivery-dashboard-card footer{font-size:11px}}

/* A pending request must look different from an empty queue. */
.delivery-loading-notice,.delivery-loading-error{display:flex;align-items:center;gap:14px;margin:16px 0 20px;padding:16px 18px;border:1px solid var(--theme-accent-border,#bca5fa65);border-radius:12px;background:var(--theme-accent-bg,#bca5fa12);color:var(--ink)}
.delivery-loading-notice strong,.delivery-loading-error strong{font-size:15px}.delivery-loading-notice p,.delivery-loading-error p{margin:5px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.delivery-loading-spinner{width:24px;height:24px;flex:0 0 24px;border:3px solid var(--theme-accent-border,#bca5fa30);border-top-color:var(--theme-accent-border,#bca5fa);border-radius:50%;animation:delivery-loading-spin .85s linear infinite}
.delivery-loading-number{display:inline-block;width:44px;height:24px;border-radius:6px;background:linear-gradient(100deg,var(--theme-accent-bg,#bca5fa16) 20%,var(--theme-accent-bg,#bca5fa45) 50%,var(--theme-accent-bg,#bca5fa16) 80%);background-size:240% 100%;animation:delivery-loading-shimmer 1.6s ease-in-out infinite;vertical-align:middle}
.delivery-market-total .delivery-loading-number{width:64px;height:38px}.delivery-dashboard-card.is-loading .delivery-stage:disabled{opacity:1}.delivery-dashboard-card.is-loading .delivery-market-total>span{color:var(--theme-accent,#cdbbff)}.delivery-loading-error{border-color:var(--theme-bad-border,#ff9da860);background:var(--theme-bad-bg,#ff9da80a);justify-content:space-between}.delivery-loading-error .button{flex-shrink:0}
@keyframes delivery-loading-spin{to{transform:rotate(360deg)}}
@keyframes delivery-loading-shimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media(prefers-reduced-motion:reduce){.delivery-loading-spinner,.delivery-loading-number{animation:none}}
@media(max-width:600px){.delivery-loading-notice,.delivery-loading-error{padding:14px;gap:12px}.delivery-loading-error{flex-wrap:wrap}}

.delivery-dashboard-card{position:relative}.delivery-slot-panel{border-top:1px solid var(--border);padding:16px 0;margin-top:4px;min-width:0}.delivery-slot-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.delivery-slot-heading h4{font-size:14px;margin:0}.delivery-slot-heading>span{font-size:12px;color:var(--muted);white-space:nowrap}.delivery-slot-panel>.delivery-note{font-size:11px;line-height:1.5;margin:6px 0 10px}.delivery-slot-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;font-size:11px;margin:14px 0 8px}.delivery-slot-legend>span{display:flex;align-items:center;gap:6px;min-width:0}.delivery-slot-legend i{height:3px;width:12px;flex-shrink:0}.delivery-slot-legend b{margin-left:auto;font-variant-numeric:tabular-nums}.delivery-slot-panel [data-delivery-plot]{position:relative;min-width:0}.delivery-slot-panel svg text{font-size:10px;fill:var(--muted)}.delivery-slot-empty{padding:22px 8px;text-align:center;font-size:12px;color:var(--muted);line-height:1.5}.delivery-slot-panel .delivery-tooltip{z-index:100}

/* Semantic shipment scale, matching delivery_slots.js. Zero values stay readable. */
.delivery-stage{--stage:#22c55e;border-left:3px solid var(--stage)}
.delivery-stage.caution{--stage:#facc15}.delivery-stage.warning{--stage:#fb923c}.delivery-stage.danger{--stage:#ff4055}.delivery-stage.muted{--stage:#94a3b8}
.delivery-stage[data-delivery-stage="late_growing"]{--stage:#ff8a80}
.delivery-stage:disabled{opacity:1;background:transparent}.delivery-stage:disabled small{opacity:.8}
.delivery-slot-legend i{width:20px;height:4px;border-radius:2px}

.delivery-slot-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0;font-size:11px;color:var(--muted)}
.delivery-slot-controls label{display:flex;align-items:center;gap:8px}.delivery-slot-controls select{font:inherit;color:var(--ink);background:var(--surface);border:1px solid var(--border);border-radius:7px;padding:5px 8px;min-height:30px}

.delivery-balance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.delivery-balance-card{min-width:0;padding:18px}.delivery-balance-card h2{margin:0;font-size:18px}.delivery-balance-card .delivery-note{font-size:12px;line-height:1.5}.delivery-balance-card [data-delivery-plot]{position:relative}.delivery-balance-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0}.delivery-balance-controls select{background:var(--surface);color:var(--ink);padding:7px;border:1px solid var(--border);border-radius:8px}.delivery-age-detail{margin-top:12px;border-top:1px solid var(--border);padding-top:12px}.delivery-age-detail h3{font-size:13px;margin:0 0 8px}.delivery-age-detail .scroll{max-height:260px;overflow:auto}.delivery-age-detail table{width:100%;border-collapse:collapse;font-size:12px}.delivery-age-detail th,.delivery-age-detail td{padding:7px;text-align:right;border-bottom:1px solid var(--border)}.delivery-age-detail th:first-child,.delivery-age-detail td:first-child{text-align:left}.delivery-age-detail thead{position:sticky;top:0;background:var(--surface)}.delivery-age-detail tfoot{font-weight:700}.delivery-balance-card .delivery-grid{stroke:var(--border)}.delivery-balance-card svg text{fill:var(--muted);font-size:10px}.delivery-shipment-marker{fill:var(--theme-accent,#bca5fa);pointer-events:none}
@media(max-width:1150px){.delivery-balance-grid{grid-template-columns:1fr}}

.delivery-stacked-grid{grid-template-columns:1fr}.delivery-stacked-grid .delivery-section-head h2{margin:0}.delivery-stacked-grid .delivery-section-head>span{font-size:13px;color:var(--muted)}.delivery-age-counts{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:10px}.delivery-age-counts>span{display:flex;align-items:center;gap:7px;font-size:12px;white-space:nowrap}.delivery-age-counts i{width:9px;height:9px;border-radius:2px}.delivery-age-counts b{min-width:20px;text-align:right}.delivery-stacked-grid .delivery-tooltip{max-width:420px}.delivery-stacked-grid .delivery-tooltip .delivery-age-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.delivery-age-scale{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;width:340px;max-width:100%;margin-top:12px;font-size:11px;color:var(--muted)}.delivery-age-scale>span:first-child{grid-column:1/-1}.delivery-age-scale>i{grid-column:1/-1;height:7px;border-radius:3px;background:linear-gradient(to right,var(--theme-good-bg,rgb(34,197,94)),var(--theme-good-bg,rgb(132,204,22)),var(--theme-warning-bg,rgb(250,204,21)),var(--theme-warning-bg,rgb(249,115,22)),var(--theme-bad-bg,rgb(248,75,65)),var(--theme-bad-bg,rgb(225,29,72)))}.delivery-age-scale>span:last-child{text-align:right}

/* Readable age breakdown: aligned rows, shared bar scale, no hidden tail. */
.delivery-stacked-grid .delivery-tooltip{width:350px;box-sizing:border-box;padding:16px;pointer-events:auto;overflow:auto;overscroll-behavior:contain;background:var(--theme-surface,#25232e)}
.delivery-age-readable{font-variant-numeric:tabular-nums}.delivery-age-readable .delivery-age-total{margin:5px 0 10px;font-size:13px}.delivery-age-warning{font-size:11px;color:var(--theme-warning,#f3bd82);margin:0 0 10px;line-height:1.4}
.delivery-age-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.delivery-age-summary>div{background:var(--theme-neutral-tint,#ffffff05);border:1px solid var(--theme-border,#ffffff12);border-radius:8px;padding:9px 12px;display:grid;gap:3px}.delivery-age-summary span{font-size:12px;color:var(--muted)}.delivery-age-summary strong{font-size:23px;line-height:1.2;color:var(--theme-good,#4ade80)}.delivery-age-summary>div+div strong{color:var(--theme-warning,#fb923c)}.delivery-age-summary small{font-size:11px;color:var(--muted)}
.delivery-age-list-head{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;padding:0 0 6px;border-bottom:1px solid var(--border)}.delivery-age-list-body{max-height:232px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.delivery-age-row{display:grid;grid-template-columns:72px minmax(50px,1fr) 38px;gap:10px;align-items:center;min-height:29px;border-bottom:1px solid var(--theme-border,#ffffff07);font-size:12px;padding-right:3px}.delivery-age-row>span{white-space:nowrap}.delivery-age-row>b{text-align:right}.delivery-age-bar{height:7px;background:var(--theme-neutral-tint,#ffffff08);border-radius:2px;overflow:hidden}.delivery-age-bar i{display:block;height:100%;border-radius:2px;min-width:2px}.delivery-age-hint{font-size:11px;color:var(--muted);line-height:1.4;border-top:1px solid var(--border);padding-top:9px;margin-top:6px}.delivery-age-detail.delivery-age-readable{max-width:540px}.delivery-age-detail .delivery-age-list-body{max-height:320px}

/* Show every age immediately, reading down each aligned column. */
.delivery-age-columns{display:grid;grid-template-columns:repeat(var(--age-columns),minmax(0,1fr));gap:20px}.delivery-age-columns .delivery-age-list-body{max-height:none;overflow:visible;scrollbar-gutter:auto}.delivery-age-columns .delivery-age-row{grid-template-columns:64px minmax(20px,1fr) 34px;gap:8px;min-height:26px}.delivery-age-columns .delivery-age-list:not(:first-child){border-left:1px solid var(--border);padding-left:16px}.delivery-stacked-grid .delivery-tooltip:has(.delivery-age-columns){overflow:visible;max-height:none!important;width:350px;max-width:calc(100vw - 20px)}.delivery-stacked-grid .delivery-tooltip:has([data-columns="2"]){width:540px}.delivery-stacked-grid .delivery-tooltip:has([data-columns="3"]){width:770px}.delivery-stacked-grid .delivery-tooltip:has([data-columns="4"]){width:1000px}.delivery-age-detail.delivery-age-readable{max-width:none}.delivery-age-detail .delivery-age-summary{max-width:500px}.delivery-age-columns .delivery-age-list-head{font-size:10px}.delivery-age-columns .delivery-age-list{min-width:0}
@media(max-width:480px){.delivery-age-detail .delivery-age-columns{grid-template-columns:1fr}.delivery-age-detail .delivery-age-list:not(:first-child){border-left:0;padding-left:0}}

/* Keep native date inputs inside their tracks, including iOS date controls. */
.delivery-period-picker{margin:8px 0 10px;border-bottom:1px solid var(--border)}
.delivery-period-picker>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;cursor:pointer;font-size:12px;color:var(--muted);list-style:none}
.delivery-period-picker>summary::-webkit-details-marker{display:none}
.delivery-period-picker>summary:after{content:'⌄';color:var(--ink)}
.delivery-period-picker>summary>span{margin-left:auto;color:var(--ink);font-variant-numeric:tabular-nums}
.delivery-period-picker[open]>summary:after{content:'⌃'}
.delivery-period.delivery-filters{display:grid;grid-template-columns:minmax(0,180px) minmax(0,180px) auto;justify-content:start;align-items:end;gap:8px}
.delivery-period.delivery-filters label{display:grid;min-width:0;max-width:100%}
.delivery-period.delivery-filters input{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-inline-size:0;appearance:none;-webkit-appearance:none}
.delivery-period input::-webkit-date-and-time-value{min-width:0;text-align:left}
.delivery-period.delivery-filters .delivery-note{grid-column:1/-1}
.delivery-refresh-icon{display:none}
@media(max-width:720px){
 .delivery-page-heading .page-heading{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;margin-bottom:10px}
 .delivery-page-heading .page-heading>div:first-child{min-width:0;flex:1}
 .delivery-page-heading .page-heading h1{font-size:23px;margin:0;gap:8px}
 .delivery-page-heading .page-heading p{display:none}
 .delivery-page-heading .heading-actions{width:auto;margin:0;flex:0 0 auto;flex-wrap:nowrap;gap:6px}
 .delivery-page-heading .heading-actions>.button{width:44px;min-width:44px;height:44px;padding:0;display:grid;place-items:center}
 .delivery-refresh-icon{display:block;font-size:25px;line-height:1}
 .delivery-refresh-label{display:none}
 .delivery-scope.delivery-filters{padding:0;border:0;background:none;margin:0 0 8px;display:block}
 .delivery-scope .monitor-scope{width:100%}
 .delivery-period.delivery-filters{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .delivery-period.delivery-filters .button[type=submit]{grid-column:1/-1;width:100%;min-height:44px}
 .delivery-period.delivery-filters input{height:44px;font-size:16px;padding:8px;overflow:hidden}
 .delivery-period-picker>summary{font-size:11px;gap:6px}
 .delivery-status{font-size:11px;line-height:1.4;margin:8px 0}
 .delivery-dashboard-heading h2{font-size:17px}
 .delivery-dashboard-heading p{font-size:12px}
 .delivery-dashboard-heading .button{min-height:36px;padding:4px 0}
 .delivery-dashboard{margin-top:12px}
 .delivery-dashboard-card{padding:12px}
}

@media(max-width:720px){
 .delivery-dashboard-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start;margin-bottom:12px}
 .delivery-dashboard-heading .button{font-size:12px;min-height:44px}
}
@media(max-width:380px){
 .delivery-period.delivery-filters{grid-template-columns:minmax(0,1fr)}
 .delivery-period.delivery-filters label{grid-template-columns:28px minmax(0,1fr);align-items:center}
}

/* Status uses the existing heading; background fetches never add a content row. */
.delivery-refresh-summary{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;font-size:11px;text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}
.delivery-refresh-summary small{font-size:10px;min-height:14px}
.delivery-refresh-state{display:flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}
.delivery-refresh-state i{width:10px;height:10px;flex:0 0 10px;border:1.5px solid transparent;border-radius:50%}
.delivery-refresh-state.is-running{color:var(--accent,#bca5fa)}
.delivery-refresh-state.is-running i{border-color:currentColor;border-right-color:transparent;animation:delivery-status-spin 1s linear infinite}
.delivery-refresh-state.has-error{color:var(--negative,#ff9da7)}
@keyframes delivery-status-spin{to{transform:rotate(360deg)}}
@media(max-width:600px){.delivery-refresh-summary{font-size:10px;max-width:145px}.delivery-refresh-summary small{font-size:9px}}
@media(prefers-reduced-motion:reduce){.delivery-refresh-state.is-running i{animation:none}}
