/* Shared cockpit presentation. Existing business handlers and permissions remain in place. */
.cockpit{--ui-primary:#235be8;--ui-line:#e1e7f0;--ui-sub:#617187;background:#f4f6fa;font-family:'Segoe UI','Microsoft YaHei',sans-serif;color:#192c43}.cockpit-side{background:#fff!important;color:#506078!important;border-right:1px solid #e1e7f0}.cockpit-brand{color:#192c43!important}.cockpit-brand b{background:#235be8!important;color:white!important}.cockpit-side nav button{color:#506078!important;border-radius:7px;margin:3px 10px;width:calc(100% - 20px)}.cockpit-side nav button.selected{background:#edf3ff!important;color:#235be8!important}.cockpit-side .cockpit-links a{color:#526784}.cockpit-side .feature-icon.icon-nav{--icon-ink:white}.cockpit-content{padding:16px 24px!important}.cockpit-heading{margin-bottom:14px!important}.cockpit-heading h1{font-size:24px;margin:0!important}.cockpit-heading p{display:none}.cockpit-top{background:#fff!important;border-bottom:1px solid #e1e7f0;box-shadow:none!important}.cockpit .panel{border:1px solid #e1e7f0;box-shadow:none!important;border-radius:10px}.cockpit .button{border-radius:6px}.cockpit .button.primary{background:#235be8}.cockpit .panel-body{padding:18px}.cockpit .cost-maintenance>h2{display:none}.cockpit .cost-maintenance>p{margin:6px 0;font-size:12px}.cockpit .cost-maintenance .cockpit-actions{margin:10px 0}.cockpit .analysis-filters{padding:12px 16px;gap:8px}.cockpit .analysis-toolbar{padding:12px}.cockpit .after-summary{gap:10px!important;margin:0 0 16px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important}.cockpit .after-summary>div{padding:12px!important}.cockpit .after-summary strong{font-size:23px}.cockpit .after-summary>div:nth-child(n+5){background:#f8faff}.cockpit .calculation-files .file-card-actions{display:flex;flex-wrap:wrap;gap:6px}.cockpit .calculation-files .file-card-actions .button{white-space:normal}
.cockpit #calc-result .profit-cards{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}.cockpit #calc-result .profit-cards>div{--tone:#245bd1;--tint:#edf4ff;background:var(--tint)!important;border:1px solid color-mix(in srgb,var(--tone) 20%,white);border-top:4px solid var(--tone);color:var(--tone);padding:20px!important}.cockpit #calc-result .profit-cards strong,.cockpit #calc-result .profit-cards small{color:var(--tone)!important}.cockpit #calc-result .profit-cards strong{font-size:25px}.cockpit #calc-result .profit-cards .profit-core{min-height:152px;grid-column:auto!important}.cockpit #calc-result .profit-cards .profit-core strong{font-size:34px}.cockpit #calc-result .result-green{--tone:#12754f!important;--tint:#eaf7f0!important}.cockpit #calc-result .result-purple{--tone:#7142ae!important;--tint:#f4effb!important}.cockpit #calc-result .result-cyan{--tone:#0b7183!important;--tint:#eaf7fa!important}.cockpit #calc-result .result-orange{--tone:#99510b!important;--tint:#fff4e8!important}.cockpit #calc-result .result-red{--tone:#b13e4a!important;--tint:#fff0f2!important}
.promotion-analysis .promotion-collect{position:relative;margin-left:auto}.promotion-collect>div{position:absolute;right:0;top:100%;z-index:15;background:white;padding:14px;width:280px;border:1px solid #d6e0ee;box-shadow:0 8px 28px #1232;border-radius:8px;display:grid;gap:10px}.promotion-collect small{color:#617187;font-size:12px}.promotion-analysis .helper-toolbar{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:12px}.promotion-analysis [data-task]:empty,.promotion-analysis [data-message]:empty{display:none}.promotion-analysis [data-task]:not(:empty){font-size:12px;background:#f4f8ff;padding:10px;border-radius:6px}.promotion-analysis [data-count]{font-size:12px;color:#617187;margin:12px 0}.promotion-analysis .promotion-main{width:100%;table-layout:fixed}.promotion-analysis .promotion-main>thead>tr>th,.promotion-analysis .promotion-main>tbody>tr>td{min-width:0;padding:10px 5px;font-size:12px;text-align:right;white-space:normal;overflow-wrap:anywhere}.promotion-analysis .promotion-main>thead>tr>th:first-child,.promotion-analysis .promotion-main>tbody>tr>td:first-child:not([colspan]){width:210px;min-width:210px;text-align:left}.promotion-analysis .promotion-main>thead>tr>th:nth-child(2){width:100px}.promotion-analysis .promotion-main th .button{white-space:normal;font-size:12px;padding:3px;border:0;background:none;min-height:30px}.promotion-analysis .promotion-main th details{font-size:11px;font-weight:400}.promotion-analysis .promotion-main th details input{width:100%;min-width:0;font-size:12px}.promotion-analysis .promotion-product{display:flex;align-items:center;gap:5px}.promotion-product>div{min-width:0}.promotion-product b{display:block;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.promotion-product small{display:block;font-size:11px;color:#617187;overflow-wrap:anywhere}.promotion-analysis .promotion-product .button{width:24px;flex-shrink:0;padding:0;font-size:15px;min-height:38px}.promotion-analysis .promotion-product img{width:34px;height:34px;margin:0;flex-shrink:0}.promotion-analysis .promotion-detail>td{position:static!important;padding:12px!important;background:#f3f7fe!important;text-align:left!important}.promotion-detail [data-history]{border:1px solid #d7e2f4;border-radius:8px;background:white;overflow:hidden}.ph-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #e1e7f0}.ph-head b{font-size:13px}.ph-head small{display:block;color:#617187}.ph-head label{white-space:nowrap}.ph-controls{display:flex;gap:14px;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid #e1e7f0}.ph-controls label{display:flex;align-items:center;gap:6px}.ph-controls input[type=checkbox]{margin:0}.ph-plot{padding:12px;overflow:auto}.ph-plot svg{width:100%;height:290px;min-width:600px}.ph-plot svg text{font-size:12px;fill:#617187}.ph-read{display:flex;gap:14px;flex-wrap:wrap;align-items:center;padding:10px 16px;border-top:1px solid #e1e7f0}.ph-read [data-readout]{display:flex;gap:16px;flex-wrap:wrap}.ph-read [data-readout]>span{padding-left:8px}.ph-read b{font-weight:500;margin-right:6px}.ph-note{font-size:12px;color:#617187;padding:0 16px 10px}.ph-scroll{overflow:auto;max-height:420px}.promotion-analysis .ph-daily{table-layout:auto;width:max-content;min-width:100%}.promotion-analysis .ph-daily td,.promotion-analysis .ph-daily th{min-width:100px;padding:10px;font-size:12px;text-align:right;white-space:nowrap}.promotion-analysis .ph-daily td:first-child,.promotion-analysis .ph-daily th:first-child{min-width:110px;max-width:none;text-align:left}.promotion-analysis [data-table]{max-height:75vh}.cockpit button:focus-visible,.cockpit summary:focus-visible{outline:3px solid #94b4ff;outline-offset:2px}
.promotion-analysis .helper-toolbar>label,.ph-controls label,.ph-head label{white-space:nowrap}.promotion-analysis .helper-toolbar input[type=date],.promotion-analysis .helper-toolbar input[data-start],.promotion-analysis .helper-toolbar input[data-end]{width:150px;flex:none}.ph-controls select,.ph-head select{width:auto;min-width:120px}.ph-controls input[type=checkbox]{width:auto;flex:none}
@media(max-width:1250px){.promotion-analysis .promotion-main{min-width:1050px}}@media(max-width:900px){.cockpit #calc-result .profit-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.cockpit-content{padding:12px!important}.ph-head{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){.cockpit *{scroll-behavior:auto!important;transition:none!important}}
.shop-picker{position:relative;min-width:240px;max-width:360px}.shop-picker>summary{list-style:none;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:44px;display:flex;align-items:center}.shop-picker-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:1000;width:340px;max-width:85vw;padding:12px;background:white;border:1px solid #d7e2f4;border-radius:10px;box-shadow:0 8px 28px #1232}.shop-picker-panel input{width:100%;box-sizing:border-box}.shop-picker-list{display:grid;gap:5px;max-height:320px;overflow:auto;margin-top:8px}.shop-picker-list .button{text-align:left;white-space:normal;min-height:44px}.shop-picker-list [aria-pressed=true]{background:#edf3ff;color:#235be8}.cockpit #cockpit-shop[hidden]{display:none!important}
.promotion-analysis .promotion-main{min-width:calc(310px + var(--metric-count)*140px);border-collapse:collapse}.promotion-analysis .promotion-detail>td{padding:0!important}.promotion-detail [data-history]{border:0;border-radius:0}.promotion-analysis .ph-daily{width:100%;min-width:100%;table-layout:fixed;border-collapse:collapse}.promotion-analysis .ph-daily td,.promotion-analysis .ph-daily th{min-width:0;padding:10px 5px;white-space:normal;overflow-wrap:anywhere}.promotion-analysis .ph-daily td:first-child,.promotion-analysis .ph-daily th:first-child{min-width:0;width:210px}.promotion-analysis .ph-scroll{overflow:visible;max-height:none}.promotion-analysis .promotion-main>thead>tr>th,.promotion-analysis .ph-daily th{vertical-align:middle;text-align:right}.promotion-analysis .ph-daily th:nth-child(2),.promotion-analysis .ph-daily td:nth-child(2){text-align:right}

/* Product-local promotion annotations; no global form/table overrides. */
.promotion-analysis .pa-toolbar,.promotion-analysis .pa-settings{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.promotion-analysis .pa-toolbar{padding:10px 0}
.promotion-analysis .ph-head{justify-content:flex-start;flex-wrap:wrap}
.promotion-analysis .pa-settings{padding:12px;border:1px solid #dce4ef;border-radius:8px;background:#f6f8fc;margin-top:8px}
.promotion-analysis .pa-settings small{flex-basis:100%;color:#526176}
.promotion-analysis .pa-settings{max-width:900px}
.promotion-analysis .pa-settings label,.promotion-analysis .pa-toolbar>label{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.promotion-analysis .pa-settings input[type=color]{width:44px;height:36px;padding:2px}
.promotion-analysis .pa-status{margin:0 0 8px;color:#34465d;min-height:1.5em}
.promotion-analysis .ph-daily td:first-child,.promotion-analysis .ph-daily th:first-child{min-width:220px;width:220px}
.promotion-analysis .ph-daily td:nth-child(2),.promotion-analysis .ph-daily th:nth-child(2){min-width:150px;white-space:nowrap}
.promotion-analysis .ph-daily textarea{min-width:180px;width:100%;resize:vertical;background:transparent;color:inherit;border:1px solid #cbd5e1;border-radius:4px;padding:6px;font:inherit}
.promotion-analysis .ph-daily .pa-dirty{border-color:#b47c00;outline:1px solid #b47c00}
.promotion-analysis .ph-daily .pa-marked{box-shadow:inset 0 -2px 0 rgba(0,0,0,.15)}
.promotion-analysis .pa-settings :focus-visible,.promotion-analysis .ph-daily textarea:focus-visible{outline:2px solid #245be8;outline-offset:2px}
.promotion-analysis .pa-settings [hidden],.promotion-analysis .pa-toolbar [hidden]{display:none!important}

/* Product tools share the history heading; expanded settings float below it. */
.promotion-analysis [data-table]{container-type:inline-size}
.promotion-analysis .ph-head{position:relative;gap:8px 12px;padding:10px 12px;align-items:center;box-sizing:border-box;max-width:100cqi}
.promotion-analysis .ph-product-heading{flex:1 1 240px;min-width:180px;max-width:400px;overflow-wrap:anywhere}
.promotion-analysis .ph-head>[data-annotations]{display:contents}
.promotion-analysis .ph-head>label,.promotion-analysis .ph-head .pa-toolbar>label{display:flex;align-items:center;gap:6px;margin:0}
.promotion-analysis .ph-head .pa-toolbar{margin-left:auto;padding:0;gap:8px;flex-wrap:wrap;max-width:100%}
.promotion-analysis .ph-head .pa-toolbar>.button,.promotion-analysis .ph-head .pa-toolbar summary,.promotion-analysis .ph-head select{min-height:40px;margin:0;padding:7px 10px;font-size:13px;white-space:nowrap}
.promotion-analysis .ph-head .pa-toolbar>label{font-size:12px;white-space:nowrap;flex-wrap:nowrap}
.promotion-analysis .ph-head .pa-status{flex-basis:100%;margin:0;font-size:12px;min-height:0;line-height:1.4}
.promotion-analysis .ph-head .pa-settings{position:absolute;right:12px;top:100%;z-index:30;width:min(720px,calc(100% - 24px));box-sizing:border-box;max-height:320px;overflow:auto;margin:0;box-shadow:0 8px 24px #172b4d22;background:#fff}
.promotion-analysis .promotion-detail [data-history]{overflow:visible}
@media(max-width:900px){.promotion-analysis .ph-head .pa-toolbar{flex:1 1 100%;margin-left:0}.promotion-analysis .ph-product-heading{max-width:none}.promotion-analysis .ph-head .pa-toolbar>label{flex-wrap:wrap}}

/* Compact product history. Selection outline is not a saved color layer. */
.promotion-analysis .ph-daily tbody td,.promotion-analysis .ph-daily tbody th{height:32px;box-sizing:border-box;padding:2px 6px;line-height:20px;position:relative;white-space:nowrap}
.promotion-analysis .ph-daily .pa-index{width:42px!important;min-width:42px!important;max-width:42px!important;text-align:center;position:static;background:#f0f3f8}
.promotion-analysis .ph-daily td:nth-child(2),.promotion-analysis .ph-daily th:nth-child(2){width:220px;min-width:220px;text-align:left}
.promotion-analysis .ph-daily td:nth-child(3),.promotion-analysis .ph-daily th:nth-child(3){width:150px;min-width:150px}
.promotion-analysis .ph-daily th button{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;min-height:28px;padding:2px 5px}
.promotion-analysis .ph-daily th button b{color:#60738f;margin-right:4px}
.promotion-analysis .ph-daily textarea{display:block;box-sizing:border-box;height:26px;min-height:26px;max-height:26px;min-width:0;width:100%;margin:0;resize:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 4px;border:1px solid transparent;border-radius:3px;line-height:20px}
.promotion-analysis .ph-daily textarea:focus{position:absolute;z-index:6;left:2px;top:1px;width:calc(100% - 4px);height:100px;max-height:100px;white-space:pre-wrap;overflow:auto;background:#fff;color:#172b4d;border-color:#245be8;box-shadow:0 4px 16px #172b4d22}
.promotion-analysis .ph-daily .pa-selected{outline:2px solid #245be8;outline-offset:-2px}
.promotion-analysis .ph-daily .pa-dirty{border-color:#b47c00;outline:none}
.promotion-analysis .pa-near{position:fixed;z-index:40;width:44px;height:26px;padding:0;border:1px solid #245be8;background:#fff;color:#245be8;border-radius:4px;cursor:pointer;font-size:12px}
.promotion-analysis .pa-palette{position:fixed;margin:0;width:264px;box-sizing:border-box;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#172b4d;box-shadow:0 8px 30px #172b4d33;font-size:12px}
.promotion-analysis .pa-palette-head,.promotion-analysis .pa-modes{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px}
.promotion-analysis .pa-palette button{font:inherit;cursor:pointer;border:1px solid #dce4ef;border-radius:4px;min-height:28px;background:#fff;color:#172b4d;padding:3px 8px}
.promotion-analysis .pa-palette button[aria-pressed=true]{border-color:#245be8;color:#245be8;background:#edf3ff}
.promotion-analysis .pa-swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin:8px 0}
.promotion-analysis .pa-swatches button{width:34px;height:28px;padding:0;border-color:#a9b5c7}
.promotion-analysis .pa-palette small{display:block;margin-top:8px;color:#526176}.promotion-analysis .pa-palette details{margin-top:8px}.promotion-analysis .pa-palette input[type=color]{width:48px;height:30px;padding:0}
.promotion-analysis .pa-palette :focus-visible,.promotion-analysis .pa-near:focus-visible{outline:2px solid #245be8;outline-offset:2px}
