/* Project performance dashboard */
.pd-module-tabs{display:flex;gap:8px;margin-bottom:20px;border-bottom:1px solid #dfe7e1;padding-bottom:12px}
.pd-module-tabs button{border:0;background:transparent;color:#7b8982;padding:11px 22px;border-radius:8px;font-size:14px}
.pd-module-tabs button.active{background:#20574b;color:white;font-weight:650}
.pd-brand-field{display:flex;align-items:center;gap:8px;font-size:12px;color:#60766b}
.pd-brand-field select:disabled{opacity:.65;cursor:not-allowed}
.pd-budget-cards,.pd-effect-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.pd-effect-cards .pd-card:first-child{background:#fff;border-color:var(--pd-border);color:#234d3f}
.pd-effect-cards .pd-card:first-child strong{color:#234d3f}
.pd-effect-cards .pd-card:first-child .pd-card-label,.pd-effect-cards .pd-card:first-child .pd-change{color:#7e8a84}
.pd-budget-cards .pd-card strong{font-size:25px}
.pd-budget-cards .pd-card:first-child .pd-card-context{color:#c1d6ce}
.pd-progress-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;margin:18px 0 10px}
.pd-progress-label span{color:#718478}.pd-time-meter{width:100%;height:14px;appearance:none;display:block}
.pd-pending-track{height:10px;border-radius:5px;background:repeating-linear-gradient(135deg,#eef2ef,#eef2ef 7px,#f8faf8 7px,#f8faf8 14px)}
.pd-section-note,.pd-data-date{font-size:12px;line-height:1.8;color:#829087;margin:12px 0}
.pd-data-date{margin:0 0 18px}.pd-placeholder-title{font-size:16px;color:#486657;margin:30px 0 12px}
#pd-view-spend[hidden],#pd-view-video[hidden],#pd-brand-field[hidden]{display:none!important}
@media(max-width:600px){.pd-budget-cards,.pd-effect-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.pd-budget-cards .pd-card strong{font-size:21px}.pd-module-tabs button{flex:1;padding:11px}.pd-brand-field{width:100%}}
.pd-dashboard{--pd-green:#286f5d;--pd-blue:#658ab0;--pd-border:#e1e8e3;--pd-muted:#82908a}
.pd-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}
.pd-kicker{display:block;font-size:10px;font-weight:700;letter-spacing:2.4px;color:var(--pd-green);margin-bottom:9px}
.pd-heading h1{font-size:30px;letter-spacing:-.8px;margin:0}.pd-heading-right{display:flex;gap:16px;align-items:center}.pd-heading-right span{font-size:12px;color:var(--pd-muted)}
.pd-heading-right button{font-size:12px;padding:9px 14px}
.pd-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 16px;background:white;border:1px solid var(--pd-border);border-radius:12px;margin-bottom:22px}
.pd-presets,.pd-tabs{display:flex;background:#f1f5f2;border-radius:7px;padding:3px;gap:2px}
.pd-presets button,.pd-tabs button{background:transparent;border:0;color:#7b8982;font-size:12px;padding:8px 12px;border-radius:5px;font-weight:500}
.pd-presets button.active,.pd-tabs button.active{background:#fff;color:var(--pd-green);box-shadow:0 1px 4px #163c2b12;font-weight:700}
.pd-date-range{display:flex;align-items:center;gap:8px;border:1px solid var(--pd-border);border-radius:7px;padding:0 9px;min-height:36px;color:var(--pd-muted);font-size:12px}
.pd-date-range input{border:0!important;background:none!important;box-shadow:none!important;width:125px;padding:7px 0!important;font-size:12px!important;min-height:0!important;color:#40574b}
.pd-toolbar select,.pd-panel-heading select{border:1px solid var(--pd-border);border-radius:7px;background:#fff;color:#40574b;padding:8px;font-size:12px;min-height:36px;max-width:150px}
.pd-toolbar>button{margin-left:auto;padding:9px 15px;font-size:12px}
.pd-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:18px}
.pd-card{display:flex;flex-direction:column;gap:15px;min-width:0;background:#fff;border:1px solid var(--pd-border);border-radius:12px;padding:19px 16px;transition:box-shadow .18s ease,transform .18s ease}
.pd-card:hover{box-shadow:0 6px 18px #163c2b14;transform:translateY(-2px)}
.pd-card:first-child{background:#20574b;border-color:#20574b;color:#fff}.pd-card-label{font-size:12px;color:#7e8a84}.pd-card:first-child .pd-card-label{color:#c1d6ce}
.pd-card strong{font-size:25px;letter-spacing:-.8px;font-weight:650;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:#234d3f}
.pd-card:first-child strong{color:#fff}.pd-card strong i{font-size:14px;letter-spacing:0;font-style:normal;margin-right:4px;font-weight:400;opacity:.7}
.pd-change,.pd-card-context{font-size:11px;color:#8a968f;min-height:16px}.pd-change.positive{color:#29845b}.pd-change.negative{color:#bd6555}.pd-card:first-child .pd-change{color:#c1d6ce}
.pd-coverage-tag{font-size:11px;color:#a7753d}.pd-efficiency{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:16px 0;margin-bottom:23px;border-bottom:1px solid var(--pd-border);gap:10px}
.pd-efficiency>div{display:flex;gap:10px;align-items:center;padding-left:16px;border-right:1px solid var(--pd-border);min-width:0}.pd-efficiency>div:first-child{padding-left:0}.pd-efficiency>div:last-child{border:0}
.pd-efficiency span{color:var(--pd-muted);font-size:11px;white-space:nowrap}.pd-efficiency b{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.pd-panel{min-width:0;border:1px solid var(--pd-border);border-radius:12px;background:#fff;padding:22px;margin-bottom:20px}
.pd-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.pd-panel-heading h2{font-size:15px;font-weight:650;letter-spacing:.1px;margin:0}.pd-tag{font-size:11px;background:#f2f6f3;color:#819087;border-radius:5px;padding:5px 8px}
.pd-primary-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(270px,1fr);gap:20px}.pd-secondary-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.pd-chart-legend{display:flex;gap:20px;margin:6px 0 14px;font-size:11px;color:var(--pd-muted)}.pd-chart-legend span:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;background:var(--pd-green)}.pd-chart-legend .pd-legend-1:before{background:var(--pd-blue)}
.pd-primary-grid svg{width:100%;display:block;min-height:230px}.pd-chart-grid{stroke:#edf1ee;stroke-width:1}.pd-axis{fill:#93a097;font-size:11px}.pd-series-0,.pd-series-1{fill:none;stroke:var(--pd-green);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.pd-series-1{stroke:var(--pd-blue)}.pd-dot-0{fill:var(--pd-green)}.pd-dot-1{fill:var(--pd-blue)}
.pd-trend-detail{margin-top:12px;border-top:1px solid #edf1ee;padding-top:12px}.pd-trend-detail summary{cursor:pointer;font-size:11px;color:#89978e}.pd-trend-detail .pd-table-wrap{margin-top:10px;max-height:240px}
.pd-funnel-row{position:relative;margin-bottom:13px;padding-bottom:3px}.pd-funnel-row:last-child{margin-bottom:0}.pd-funnel-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:5px}.pd-funnel-label span{color:#7f8d84}.pd-funnel-label b{font-weight:600;font-variant-numeric:tabular-nums}.pd-funnel-bar meter{display:block;width:100%;height:9px;appearance:none}.pd-funnel-rate{display:block;text-align:right;color:#96a297;font-size:10px;margin-top:3px}
.pd-dashboard meter::-webkit-meter-bar{background:#f0f4f1;border:0;border-radius:3px;box-shadow:none}.pd-dashboard meter::-webkit-meter-optimum-value{background:#70a58b;border-radius:3px}.pd-dashboard meter::-moz-meter-bar{background:#70a58b;border-radius:3px}
.pd-dashboard .pd-spend-meter::-webkit-meter-optimum-value{background:#4a7fb5;border-radius:3px}.pd-dashboard .pd-spend-meter::-moz-meter-bar{background:#4a7fb5;border-radius:3px}
.pd-gap-note{color:#e0523a;font-weight:500}
.pd-rank{display:block;width:100%;background:transparent;border:0;color:#385346;text-align:left;padding:8px 0;margin-bottom:8px;border-radius:0}.pd-rank:hover{background:#fafcf9;filter:none}.pd-rank-label{display:flex;gap:12px;align-items:center;font-size:12px}.pd-rank-label i{font-style:normal;color:#a3afa5;font-size:10px;width:18px}.pd-rank-label b{font-weight:500;flex:1}.pd-rank-label strong{font-weight:600;font-variant-numeric:tabular-nums}.pd-rank meter{display:block;width:calc(100% - 30px);margin:7px 0 0 30px;height:7px;appearance:none}
.pd-video-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:5px 0 24px}.pd-video-stats>div{display:grid;gap:10px}.pd-video-stats span{font-size:12px;color:var(--pd-muted)}.pd-video-stats strong{font-size:27px;font-weight:600;letter-spacing:-.7px;color:#2d604d;font-variant-numeric:tabular-nums}.pd-engagement{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #edf1ee;padding-top:20px;gap:12px}.pd-engagement>div{display:grid;gap:8px}.pd-engagement span{font-size:11px;color:var(--pd-muted)}.pd-engagement b{font-size:13px;font-weight:600}
.pd-table-wrap{overflow:auto;max-height:560px}.pd-table-wrap table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}.pd-table-wrap th{position:sticky;top:0;background:#f5f8f5;padding:12px;text-align:right;font-weight:500;color:#8a978d;border:0}.pd-table-wrap td{padding:16px 12px;text-align:right;border-bottom:1px solid #edf1ee;color:#45604f;font-variant-numeric:tabular-nums}.pd-table-wrap th:first-child,.pd-table-wrap td:first-child{text-align:left}.pd-table-wrap tbody tr:hover{background:#fafcf9}.pd-table-wrap .pd-table-empty{text-align:center;padding:30px;color:var(--pd-muted)}
.pd-company-name{display:flex;align-items:center;gap:14px}.pd-company-name i{font-style:normal;font-size:10px;color:#a2afa4}.pd-company-name b{font-weight:500;max-width:300px;overflow:hidden;text-overflow:ellipsis}.pd-pager{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px}.pd-pager>span,.pd-count{font-size:11px;color:var(--pd-muted)}.pd-pager>div{display:flex;gap:8px}.pd-pager button{font-size:11px;padding:6px 11px}
.pd-quality{border:1px dashed #dbe3dc;border-radius:10px;background:#f7f9f6;padding:15px 18px;margin:0 0 16px}.pd-quality summary{display:flex;gap:20px;align-items:center;cursor:pointer;font-size:11px;color:#8b988e;flex-wrap:wrap}.pd-quality summary>span:first-child{font-weight:600;color:#5e7764}.pd-quality summary b{font-weight:400;margin-left:auto}.pd-warning{color:#ac8952}.pd-healthy{color:#75977b}.pd-quality-items{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:16px;font-size:11px;color:#8c977e}
.pd-empty,.pd-no-data{padding:20px;text-align:center;color:#8c998e;font-size:13px}.pd-empty{background:#fff;border:1px dashed var(--pd-border);border-radius:10px;margin-bottom:18px}
@media(min-width:1600px){.pd-card strong{font-size:29px}}
@media(max-width:1250px){.pd-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.pd-efficiency{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:16px}.pd-efficiency>div:nth-child(4){padding-left:0}.pd-primary-grid{grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr)}.pd-panel{padding:18px}.pd-tabs button{padding:7px 8px;font-size:11px}}
@media(max-width:1000px){.pd-primary-grid{grid-template-columns:1fr}.pd-primary-grid svg{min-height:180px}.pd-heading-right span{display:none}.pd-secondary-grid{grid-template-columns:1fr 1fr}.pd-panel-heading{flex-wrap:wrap}.pd-toolbar>button{margin-left:0}}
@media(max-width:600px){.pd-heading h1{font-size:25px}.pd-heading{margin-bottom:18px}.pd-kicker{font-size:9px}.pd-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pd-card{padding:16px 13px;gap:12px}.pd-card strong{font-size:24px}.pd-efficiency{grid-template-columns:repeat(2,minmax(0,1fr))}.pd-efficiency>div{padding-left:0;border:0;justify-content:space-between;padding-right:12px}.pd-secondary-grid{grid-template-columns:1fr}.pd-toolbar{padding:12px;gap:10px}.pd-date-range{width:100%;justify-content:space-between}.pd-date-range input{width:44%}.pd-toolbar select{flex:1;min-width:0;max-width:none;width:27%}.pd-toolbar>button{width:100%}.pd-presets{width:100%}.pd-presets button{flex:1}.pd-panel{padding:17px 14px}.pd-primary-grid,.pd-secondary-grid{gap:0}.pd-quality summary{gap:10px}.pd-quality summary b{margin-left:0}.pd-company-name b{max-width:190px}.pd-tabs button{font-size:10px;padding:7px}.pd-heading-right button{padding:8px 10px}.pd-primary-grid svg{min-height:160px}.pd-pager button{padding:6px 8px}}
.pd-table-wrap td,.pd-table-wrap th{min-width:0}.pd-table-wrap td{vertical-align:middle}

/* Spending is the primary reading path; outcomes follow the full-width trend. */
.pd-subheading{font-size:15px;font-weight:650;margin:8px 0 16px;color:#385346}
.pd-chart-wrap{position:relative}.pd-chart-wrap svg{width:100%;display:block;max-height:350px}
.pd-spend-bar{fill:#508d78}.pd-chart-wrap rect[tabindex]:hover,.pd-chart-wrap rect[tabindex]:focus{fill:#286f5d0c;outline:none}
.pd-chart-tooltip{display:flex;align-items:center;flex-wrap:wrap;gap:8px 28px;padding:12px 18px;background:#f5f8f5;border:1px solid #e1e8e3;border-radius:8px;font-size:12px;margin-bottom:16px}
.pd-chart-tooltip>strong{color:#315b48}.pd-chart-tooltip>div{display:flex;align-items:center;gap:8px}.pd-chart-tooltip span{color:#829087}.pd-chart-tooltip b{font-weight:600;color:#315b48;font-variant-numeric:tabular-nums}
.pd-chart-tooltip span.pd-legend-0:before,.pd-chart-tooltip span.pd-legend-1:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:1px}
.pd-chart-tooltip span.pd-legend-0:before{background:var(--pd-green)}.pd-chart-tooltip span.pd-legend-1:before{background:var(--pd-blue)}
.pd-brand-row{display:block;width:100%;background:transparent;border:0;text-align:left;padding:0 0 14px;margin:0 0 8px;color:#375a46;border-bottom:1px solid #f0f3ef;border-radius:0}
.pd-brand-row:hover{background:#f6faf7;filter:none}.pd-brand-row meter{display:block;width:100%;height:12px;appearance:none;margin-bottom:8px}.pd-brand-row .pd-progress-label{margin:9px 0 10px}.pd-brand-row .pd-progress-label span{color:#375a46;font-weight:600}.pd-brand-row .pd-card-context{display:block;text-align:right;font-size:11px}
.pd-time-meter[hidden]{display:none}.pd-freshness-warning{padding:10px 14px;background:#fff8ec;border:1px solid #f0e3c8;color:#997334;font-size:12px;border-radius:8px;margin:0 0 18px}
.pd-budget-cards .pd-card:nth-child(2) strong{color:#20574b;font-size:30px}.pd-budget-cards .pd-card-context{line-height:1.6}
#pd-view-video .pd-video-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:800px){#pd-view-video .pd-video-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.pd-chart-tooltip{grid-template-columns:1fr 1fr;font-size:11px;padding:12px;gap:14px}.pd-budget-cards .pd-card:nth-child(2) strong{font-size:24px}.pd-chart-wrap svg{min-height:170px}.pd-chart-wrap .pd-axis{font-size:13px}}

.pd-effect-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.pd-efficiency{grid-template-columns:repeat(5,minmax(0,1fr))}
.pd-budget-edit{align-self:flex-start;background:#ffffff18;color:white;border:1px solid #ffffff66;border-radius:6px;padding:7px 12px;font-size:12px}.pd-budget-fields{display:grid;gap:14px}.pd-budget-fields input,.pd-budget-fields select{width:100%;border:1px solid #dfe7e1;border-radius:7px;padding:11px;font-size:13px}.pd-budget-error{font-size:12px;color:#b05a44}.pd-budget-cards .pd-card:last-child strong{font-size:21px}
.pd-calendar-anchor{position:relative;min-width:0}.pd-date-range #pd-calendar-toggle{padding:5px 8px;background:transparent;color:#60786a;font-size:21px;border:0;line-height:1}
.pd-calendar{position:absolute;left:0;top:calc(100% + 10px);width:680px;max-width:calc(100vw - 40px);background:#fff;border:1px solid #dfe7e1;border-radius:12px;box-shadow:0 12px 40px #173b2524;padding:16px;z-index:30}
.pd-calendar[hidden]{display:none}.pd-calendar-months{display:grid;grid-template-columns:1fr 1fr;gap:20px}.pd-calendar-heading{display:flex;align-items:center;gap:6px;margin-bottom:15px}.pd-calendar-heading strong{flex:1;text-align:center;font-size:14px;color:#365946}.pd-calendar button{border:0;background:transparent;color:#5d7566;padding:7px;font-size:13px;border-radius:5px}.pd-calendar-heading button{min-width:25px}.pd-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.pd-calendar-weekday{text-align:center;font-size:12px;color:#93a094;padding:5px 0 10px}.pd-calendar-grid button{position:relative;min-height:33px;padding:7px 3px}.pd-calendar-grid button.outside{color:#b5c0b8}.pd-calendar-grid button.in-range{background:#d3e7db;color:#1b4b39;font-weight:600}.pd-calendar-grid button.selected{background:#1f5d4c;color:#fff;font-weight:700}.pd-calendar button:hover{background:transparent;color:#1b4b39;box-shadow:inset 0 0 0 1px #cfe0d6;filter:none}.pd-calendar-grid button.selected:hover{background:#17493b;color:#fff;box-shadow:none}.pd-calendar-footer button:last-child:hover{background:#20574b;color:#fff;box-shadow:none}
.pd-calendar-shortcuts{display:flex;gap:5px;flex-wrap:wrap;border-top:1px solid #edf1ee;margin-top:16px;padding-top:14px}.pd-calendar-shortcuts button{background:#f3f7f3;color:#286f5d;font-size:12px}.pd-calendar-footer{display:flex;align-items:center;gap:10px;margin-top:14px}.pd-calendar-footer span{flex:1;font-size:11px;color:#829087}.pd-calendar-footer button:last-child{background:#286f5d;color:#fff;padding:8px 14px}.pd-calendar-footer button:disabled{opacity:.4;cursor:not-allowed}
/* 底色只表示「选没选」：区间内=绿底、起止=深绿；「有没有数据」用一道斜杠单独标，
   两者互不抢占，看一眼就知道选的是哪几天、其中哪几天缺数据。 */
.pd-calendar-grid button.no-data{color:#9aa6a0}
.pd-calendar-grid button.no-data::after{content:'';position:absolute;left:50%;top:50%;width:19px;height:2px;margin:-1px 0 0 -9.5px;border-radius:1px;background:#b4c0ba;transform:rotate(-34deg)}
.pd-calendar button.no-data:hover::after{background:#7d8f86}
.pd-calendar-grid button.no-data.in-range,.pd-calendar-grid button.no-data.in-range:hover{background:#d3e7db;color:#6d8378}
.pd-calendar-grid button.no-data.in-range::after{background:#7f9d8c}
.pd-calendar-grid button.no-data.selected,.pd-calendar-grid button.no-data.selected:hover{background:#1f5d4c;color:#fff}
.pd-calendar-grid button.no-data.selected::after{background:#a9cbbb}
.pd-calendar-grid button.outside-data{color:#b9c3bd}
.pd-calendar-grid button.outside-data::after{content:'';position:absolute;left:50%;top:50%;width:19px;height:2px;margin:-1px 0 0 -9.5px;border-radius:1px;background:#e3e8e4;transform:rotate(-34deg)}
.pd-calendar-grid button.outside-data.in-range,.pd-calendar-grid button.outside-data.in-range:hover{background:#d3e7db;color:#9dafa4}
.pd-calendar-grid button.outside-data.in-range::after{background:#c2d6c9}
.pd-calendar-grid button.outside-data.selected,.pd-calendar-grid button.outside-data.selected:hover{background:#1f5d4c;color:#c7d9d0}
.pd-calendar-grid button.outside-data.selected::after{background:#5c8773}
/* 今天及以后：数据 T+1 还没产出，不打斜杠（避免把「还没到」当成「缺数据」），只把数字淡化。 */
.pd-calendar-grid button.future{color:#b0bbb4}
.pd-calendar-grid button.future.in-range{color:#5f7568}
.pd-calendar-grid button.future.selected,.pd-calendar-grid button.future.selected:hover{color:#fff}
.pd-calendar-grid button.today::before{content:'';position:absolute;left:50%;bottom:3px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#5f8f76}
.pd-calendar-grid button.today.in-range::before{background:#3f6f59}
.pd-calendar-grid button.today.selected::before{background:#a9cbbb}
.pd-calendar-legend{display:flex;align-items:center;gap:7px;border-top:1px solid #edf1ee;margin-top:14px;padding-top:12px;font-size:11px;color:#829087}
.pd-calendar-swatch{position:relative;width:15px;height:15px;border-radius:4px;flex:none;background:#d3e7db;box-shadow:inset 0 0 0 1px #c2d8c9}.pd-calendar-swatch::after{content:'';position:absolute;left:50%;top:50%;width:11px;height:1.5px;margin:-1px 0 0 -5.5px;border-radius:1px;background:#7f9d8c;transform:rotate(-34deg)}
.pd-company-tools{display:flex;gap:10px;align-items:center;margin-bottom:16px;flex-wrap:wrap}.pd-company-tools input{max-width:360px;flex:1;min-width:170px;border:1px solid #dfe7e1;border-radius:7px;padding:9px 12px;font-size:12px}.pd-company-tools button{font-size:12px;padding:9px 15px}.pd-company-tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.pd-company-tags button{background:#eef5ef;color:#286f5d;border:1px solid #d5e4d8;font-size:11px;padding:5px 9px;border-radius:5px}
.pd-company-table th button{background:transparent;border:0;color:#708779;font-size:12px;padding:4px;white-space:nowrap}.pd-company-table th button:hover,.pd-company-table th button.active{color:#20574b;background:#e4eee6;filter:none}.pd-company-table th[aria-sort=ascending] .pd-column-sort,.pd-company-table th[aria-sort=descending] .pd-column-sort{color:#20574b;font-weight:650}
.pd-number-dialog{border:1px solid #dfe7e1;border-radius:12px;padding:24px;width:430px;max-width:calc(100vw - 40px);color:#365946;box-shadow:0 12px 40px #173b2524}.pd-number-dialog::backdrop{background:#18352338}.pd-number-dialog h2{margin:0 0 20px;font-size:17px}.pd-number-inputs{display:flex;gap:12px}.pd-number-inputs select,.pd-number-inputs input{min-width:0;flex:1;border:1px solid #dfe7e1;border-radius:7px;padding:10px;font-size:13px;width:50%}.pd-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.pd-dialog-actions button{font-size:12px;padding:8px 13px}.pd-dialog-actions button:not(:last-child){background:#f1f5f1;color:#55715e;border-color:#e1e8e3}
@media(max-width:1050px){.pd-calendar{left:auto;right:0}.pd-chart-tooltip{gap:12px}.pd-chart-tooltip>div{flex-wrap:wrap}}
@media(max-width:700px){.pd-calendar-anchor{width:100%}.pd-calendar{position:fixed;left:20px;right:20px;top:50%;transform:translateY(-50%);width:auto;padding:12px;max-height:85dvh;overflow:auto}.pd-calendar-months{grid-template-columns:1fr;gap:20px}.pd-calendar-month:nth-child(2){display:none}.pd-calendar-grid button{min-height:32px}.pd-calendar-footer{flex-wrap:wrap}.pd-calendar-footer span{flex-basis:100%}.pd-company-tools input{max-width:none;flex-basis:100%}.pd-efficiency{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 看板页改为整页滚动：内容区不再自带滚动条（去掉页面内部那条“滑块”）。
   侧栏本就 position:fixed，顶栏改 sticky 吸顶，滚动体验与普通网页一致。 */
body:has(.workspace:not(.hidden) #page-overview:not(.hidden)){height:auto;overflow:visible}
.workspace:has(#page-overview:not(.hidden)){height:auto;min-height:100vh}
.workspace:has(#page-overview:not(.hidden)) main{display:flex;flex-direction:column;height:auto;min-height:0;overflow:visible}
.workspace:has(#page-overview:not(.hidden)) .topbar{position:sticky;top:0;z-index:40;flex-shrink:0}
.workspace:has(#page-overview:not(.hidden)) .main-content{width:100%;overflow:visible;scrollbar-gutter:auto}
@media(max-width:700px){
  .workspace:has(#page-overview:not(.hidden)){display:flex;flex-direction:column}
  .workspace:has(#page-overview:not(.hidden)) .sidebar{flex-shrink:0}
  .workspace:has(#page-overview:not(.hidden)) main{flex:1;height:auto}
}

/* Dashboard polish: table readability, chart focus, card number fade, loading state */
.pd-table-wrap tbody tr:nth-child(even){background:#f7faf8}
.pd-table-wrap tbody tr:hover{background:#eef4f0}
.pd-chart-wrap rect[tabindex]:focus-visible{stroke:#286f5d;stroke-width:2}
.pd-chart-wrap .pd-spend-bar,.pd-chart-wrap .pd-series-0,.pd-chart-wrap .pd-series-1{transition:opacity .18s ease}
@keyframes pd-fade-in{from{opacity:0}to{opacity:1}}
.pd-card strong{animation:pd-fade-in .35s ease}
.pd-loading{opacity:.55;pointer-events:none;transition:opacity .15s ease}

/* 品牌多选与生效范围 */
.pd-brand-field{position:relative}
.pd-brand-button{display:flex;align-items:center;gap:8px;border:1px solid var(--pd-border);border-radius:7px;background:#fff;color:#40574b;padding:8px 10px;font-size:12px;min-height:36px;max-width:230px}
.pd-brand-button:hover{filter:none;background:#f7fbf8}
.pd-brand-button.active{border-color:#286f5d;color:#20574b;font-weight:600}
.pd-brand-button b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}
.pd-brand-button i{font-style:normal;color:#829087;margin-left:auto}
.pd-brand-key{color:#7b8982}
.pd-brand-panel{position:absolute;left:0;top:calc(100% + 8px);width:280px;background:#fff;border:1px solid #dfe7e1;border-radius:10px;box-shadow:0 12px 40px #173b2524;padding:12px;z-index:35}
.pd-brand-panel[hidden]{display:none}
.pd-brand-panel input{width:100%;border:1px solid #dfe7e1;border-radius:7px;padding:8px 10px;font-size:12px;margin-bottom:8px}
.pd-brand-list{max-height:260px;overflow:auto;display:grid;gap:2px}
.pd-brand-option{display:flex;align-items:center;gap:8px;padding:7px 6px;border-radius:6px;font-size:12px;color:#3f5d48;cursor:pointer}
.pd-brand-all{font-weight:700;border-bottom:1px solid #e0e8e2}
.pd-brand-option:hover{background:#f2f8f4}
.pd-brand-option input{width:14px;height:14px;margin:0;accent-color:#286f5d}
.pd-brand-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #edf1ee;margin-top:8px;padding-top:10px}
.pd-brand-actions button{font-size:12px;padding:7px 12px}
.pd-brand-empty{font-size:12px;color:#829087;padding:10px 4px}
#pd-reset{margin-left:0!important}
.pd-scope{display:flex;flex-wrap:wrap;gap:6px 18px;padding:10px 14px;background:#f7faf6;border:1px dashed #dbe3dc;border-radius:9px;margin:0 0 16px;font-size:12px;color:#60766b}
.pd-scope-item{display:flex;gap:6px;align-items:baseline}
.pd-scope-item i{font-style:normal;color:#8b988e}
.pd-scope-item b{font-weight:600;color:#2f4f40}

/* 指标分组 */
.pd-kpi-groups{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px}
.pd-kpi-group{border:1px solid var(--pd-border);border-radius:12px;background:#fff;padding:16px}
.pd-kpi-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.pd-kpi-head h2{font-size:14px;font-weight:650;margin:0;color:#254c3b}
.pd-kpi-note{font-size:11px;color:#8b988e;line-height:1.6}
.pd-cards-2{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-bottom:0!important}
.pd-kpi-group .pd-card{min-height:118px;gap:8px;padding:15px 14px}
.pd-kpi-group .pd-card strong{font-size:clamp(19px,1.7vw,25px)}
.pd-kpi-group .pd-card:first-child{background:#fff;color:#234d3f}
.pd-kpi-group .pd-card:first-child strong{color:#234d3f}
.pd-kpi-group .pd-card:first-child .pd-card-label,.pd-kpi-group .pd-card:first-child .pd-card-context{color:#6b8071}
.pd-more{margin-bottom:18px}
.pd-more .pd-more-grid{margin-bottom:0}

/* 预警分区 */
.pd-alert-summary{font-size:12px;color:#315b48;background:#f4f8f4;border-radius:7px;padding:9px 12px;margin:0 0 14px}
.pd-alert-group+.pd-alert-group{border-top:1px dashed #e1e8e3;margin-top:6px;padding-top:12px}
.pd-alert-group h3{font-size:13px;margin:0;color:#2f4f40}
.pd-alert-group-note{font-size:11px;color:#8b988e;margin:5px 0 8px;line-height:1.7}
.pd-alert-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pd-alert-head b{font-size:12px}
.pd-alert-detail{margin:4px 0 0!important;color:#7c8f83!important;font-size:11px!important;line-height:1.7}
.pd-scope-tag{font-size:10px;color:#3f6b56;background:#eef5ef;border:1px solid #d8e7db;border-radius:4px;padding:2px 6px}
.pd-alert-tag.handled{color:#6f8479;background:#eef2ef}
.pd-alert-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.pd-alert-tabs button,.pd-alert-kind-summary button{border:1px solid #dfe7e1;background:#fff;color:#5d7566;border-radius:7px;padding:6px 10px;font-size:11px}
.pd-alert-tabs button.active{background:#235f52;border-color:#235f52;color:#fff;font-weight:600}
.pd-alert-list{max-height:calc(100dvh - 260px);overflow:auto;padding-right:4px}
.pd-alert-meta{font-size:11px;color:#7c8f83;margin:4px 0 0}

/* 明细表 */
.pd-company{min-width:0}
.pd-company-tools select{max-width:130px}
.pd-quick{border-color:#cfe0d6!important;color:#286f5d!important;background:#f2f8f4!important}
.pd-range-sep{font-size:12px;color:#829087}
.pd-number-inputs input{width:45%}
.pd-brand-view{min-width:0}
.pd-crumb{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:#60766b;margin-bottom:12px}
.pd-crumb b{color:#20574b}
.pd-crumb-sep{color:#b1bdb5}
.pd-crumb button{margin-left:auto;font-size:11px;padding:6px 10px}
.pd-drill{border:1px solid #cfe0d6;background:#f2f8f4;color:#286f5d;border-radius:6px;padding:6px 10px;font-size:11px}
.pd-drill:hover{background:#e6f1ea;filter:none}
.pd-brand-table td:first-child b{font-weight:600}
.pd-engagement{margin-bottom:14px}
@media(max-width:1050px){
  .pd-kpi-groups{grid-template-columns:1fr}
}
@media(max-width:700px){
  .pd-brand-field{width:100%}
  .pd-brand-button{width:100%;max-width:none;justify-content:flex-start}
  .pd-brand-panel{position:fixed;left:16px;right:16px;top:auto;bottom:16px;width:auto;max-height:70dvh;overflow:auto}
  .pd-cards-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .pd-kpi-group{padding:13px 12px}
  .pd-scope{gap:4px 12px;font-size:11px}
  .pd-company-tools select{max-width:none;flex:1}
  .pd-alert-list{max-height:calc(100dvh - 300px)}
}
@media(max-width:420px){
  .pd-cards-2{grid-template-columns:1fr!important}
}

/* 数据源切换：一式两份，同一页只算一个来源 */
.pd-source-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:8px 10px;
  border:1px solid #e0e8e2;border-radius:10px;background:#f8faf9}
.pd-source-key{font-size:12px;color:#60766b;font-weight:600}
.pd-source-switch{display:flex;gap:4px;padding:3px;border:1px solid #dfe7e1;border-radius:9px;background:#fff}
.pd-source-switch button{border:0;background:transparent;color:#5d7566;border-radius:6px;padding:6px 12px;font-size:12px}
.pd-source-switch button:hover{background:#f1f6f3}
.pd-source-switch button.active{background:#235f52;color:#fff;font-weight:600}
.pd-source-switch button.pd-source-missing{color:#8a9a91}
.pd-source-switch button.pd-source-missing::after{content:'未导入';margin-left:6px;font-size:10px;
  color:#8a6d3b;background:#fdf5e6;border-radius:3px;padding:1px 4px}
.pd-source-switch button.active.pd-source-missing{color:#e8efe9}
.pd-source-switch button.active.pd-source-missing::after{color:#fff;background:rgba(255,255,255,.18)}
/* 文件选择框只作为按钮的隐藏入口，原生控件不能出现在工具栏里 */
.pd-source-bar input[type=file]{display:none!important}
/* 全局 button 样式会盖掉 hidden 属性，这里显式收回 */
.pd-source-bar [hidden]{display:none!important}
.pd-source-state{font-size:11px;color:#7c8f83}
@media(max-width:700px){
  .pd-source-bar{gap:8px}
  .pd-source-switch{width:100%}
  .pd-source-switch button{flex:1;padding:7px 6px;font-size:11px}
  }

/* 服务商系统数据导入：切到该来源即出现选择文件入口 */
.pd-import-panel{margin:0 0 12px;padding:10px 12px;border:1px dashed #cfdfd6;border-radius:10px;background:#f8fbf9;
  transition:border-color .15s,background .15s}
.pd-import-panel[hidden]{display:none!important}
/* 原生文件控件只作为隐藏入口：全局 input 样式会盖掉 hidden 属性 */
.pd-import-panel input[type=file]{display:none!important}
.pd-import-panel [hidden]{display:none!important}
.pd-import-panel.pd-import-dragging{border-color:#235f52;background:#edf6f0}
.pd-import-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pd-import-badge{width:22px;height:22px;border-radius:50%;background:#e2f0e8;color:#235f52;
  display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;flex:none}
.pd-import-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:220px}
.pd-import-text b{font-size:13px;color:#24352c;font-weight:600}
.pd-import-text span{font-size:11px;line-height:1.5;color:#7c8f83}
.pd-import-row button{flex:none}
.pd-import-row #pd-import-pick{padding:7px 14px;font-size:12px}
.pd-import-feedback{margin:8px 0 0;padding:7px 10px;border-radius:8px;font-size:12px;background:#eef4f0;color:#3d5347}
.pd-import-feedback[hidden]{display:none!important}
.pd-import-feedback.ok{background:#e8f5ec;color:#1f6b48}
.pd-import-feedback.error{background:#fdeeee;color:#b23b3b}
.pd-empty-action{margin-top:10px;padding:6px 14px;font-size:12px;background:#fff;border:1px solid #cfdfd6;
  color:#235f52;border-radius:8px}
.pd-empty-action:hover{background:#f2f8f4;border-color:#a9c8b7}
@media(max-width:700px){
  .pd-import-panel{padding:10px}
  .pd-import-text{min-width:0;flex:1 1 100%}
  .pd-import-row #pd-import-pick{width:100%}
}

/* ---------- 展示优化：首屏层级、指标卡空态、预警可读性 ---------- */
/* 顶部标题区收紧，把首屏让给数据 */
.pd-dashboard .pd-heading{margin-bottom:18px;align-items:flex-start}
.pd-dashboard .pd-kicker{margin-bottom:6px}
.pd-dashboard .pd-heading h1{font-size:26px}
.pd-dashboard .pd-heading-right{gap:10px}
/* 数据源条与导入面板：同一条视觉带，不做两套底色 */
.pd-source-bar{margin-bottom:10px;padding:7px 10px;background:#f4f8f5}
.pd-source-state{margin-left:auto}
.pd-import-panel{margin-bottom:10px;padding:9px 12px}
.pd-import-badge{width:20px;height:20px;font-size:13px}
.pd-import-text b{font-size:12.5px}
.pd-import-text span{font-size:11px;color:#7f9187}
/* 指标卡：内容上下撑满，缺数据时不留大片空洞 */
.pd-kpi-group .pd-card{min-height:124px;justify-content:space-between}
.pd-kpi-group .pd-pending-track{height:12px;border-radius:6px;flex:none}
.pd-kpi-group .pd-card-context{margin-top:auto}
/* 预警条目：行间分隔，避免多条挤在一起 */
.pd-dashboard .pd-panel-heading{flex-wrap:wrap;row-gap:8px}
.pd-dashboard .pd-panel-heading h2{white-space:nowrap;flex:0 0 auto}
.pd-dashboard .pd-panel-heading .pd-tag{white-space:nowrap}
.pd-alert-link{white-space:nowrap}
.pd-dashboard .pd-alert-row{display:block;padding:12px 0;border-top:0;border-bottom:1px dashed #edf2ec}
.pd-attention{display:flex;flex-direction:column;gap:10px}
.pd-dashboard .pd-attention .pd-panel-heading,.pd-attention .pd-alert-summary{margin:0}
.pd-attention-list{display:grid;align-content:start;gap:8px}
.pd-attention-list .pd-no-data{margin:0;padding:8px 0}
.pd-attention>.pd-alert-link{align-self:flex-start}
.pd-dashboard .pd-attention-list .pd-alert-row{min-width:0;padding:9px 10px;border:1px solid #e0e8e2;border-radius:8px;background:#f8faf8;overflow-wrap:anywhere}
.pd-dashboard .pd-attention-list .pd-alert-row:hover,.pd-dashboard .pd-attention-list .pd-alert-row:focus-visible{border-color:#43816c;background:#f2f8f4}
.pd-attention-list .pd-alert-head{gap:4px 6px;line-height:12px}
.pd-attention-list .pd-alert-head b{flex-basis:100%;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pd-attention-list .pd-alert-detail{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:17px;overflow:hidden}
.pd-attention-list .pd-alert-row .pd-alert-meta{margin:4px 0 0;line-height:16px}
@media(min-width:1051px){
  .pd-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.85fr);gap:16px}
}
.pd-alert-row:first-of-type{padding-top:4px}
.pd-alert-row:last-child{border-bottom:0;padding-bottom:2px}
.pd-alert-head b{color:#2b4a3b}
/* 滞后公司：标签化，只展开前三家 */
.pd-stale{margin-top:8px;padding:8px 10px;border:1px solid #eef2ec;border-radius:8px;background:#fafcfa}
.pd-stale-title{display:block;font-size:10px;letter-spacing:.2px;color:#8b988e}
.pd-stale-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:7px}
.pd-stale-chip{display:inline-flex;align-items:baseline;justify-content:space-between;gap:6px;width:100%;min-width:0;background:#fff;border:1px solid #e5ece6;
  border-radius:6px;padding:3px 7px;font-size:11px;color:#526b5c}
.pd-stale-chip b{font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pd-stale-chip i{font-style:normal;font-size:10px;color:#98a69c;font-variant-numeric:tabular-nums}
.pd-stale-more{margin-top:8px;padding:3px 8px;font-size:11px;background:transparent;border:0;color:#286f5d;border-radius:6px}
.pd-stale-more:hover{background:#eef4f0;filter:none}
/* 校验状态条 */
.pd-checks-title{margin:16px 0 0;font-size:11px;color:#8b988e}
.pd-checks{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.pd-check{display:inline-flex;align-items:baseline;gap:6px;border:1px solid #e6ece6;background:#fafbf9;
  border-radius:6px;padding:4px 8px;font-size:11px;color:#6b8071;line-height:1.5}
.pd-check i{font-style:normal;color:#8b988e}
.pd-check b{font-weight:600;color:#55705f}
.pd-check em{font-style:normal;font-size:10px;color:#98a69c}
.pd-check.is-clear b{color:#3f7a5a}
.pd-check.is-triggered b{color:#b0703c}
.pd-check.is-unknown b{color:#8b988e}
/* 空态文案：更轻，不再占一整块 */
.pd-alert-group .pd-no-data{padding:10px 0;text-align:left;font-size:12px;color:#93a099}
@media(max-width:700px){
  .pd-dashboard .pd-heading h1{font-size:22px}
  .pd-source-state{margin-left:0;width:100%}
  .pd-stale-list{grid-template-columns:1fr}
}

/* ---------- 展示优化 v1.0 第一轮：口径保护与基础排版 ---------- */
/* 弱化英文装饰；标题与刷新状态分清层级 */
.pd-dashboard .pd-kicker{display:none}
.pd-dashboard .pd-heading h1{font-size:24px}
.pd-dashboard .pd-heading-right #pd-status{font-size:12.5px;color:#54685c}
/* 四张主卡：数字更醒目，标签与辅助说明保证可读对比 */
.pd-dashboard .pd-kpi-group .pd-card-label{font-size:13px;color:#61726a}
.pd-dashboard .pd-kpi-group .pd-card strong{font-size:clamp(21px,1.9vw,28px)}
.pd-dashboard .pd-kpi-group .pd-card strong i{font-size:13px;font-weight:500;letter-spacing:0;color:#78907f}
.pd-dashboard .pd-kpi-group .pd-card-context,.pd-dashboard .pd-kpi-group .pd-change{font-size:12px;color:#6f8377}
.pd-time-progress{color:#315b48;font-weight:600;font-variant-numeric:tabular-nums}
.pd-progress-behind{color:#b34743;font-weight:600}
.pd-dashboard .pd-kpi-group .pd-change.positive{color:#29845b}
.pd-dashboard .pd-kpi-group .pd-change.negative{color:#a34141}
.pd-dashboard .pd-kpi-head .pd-kpi-note{font-size:12px}
/* 已生效条件条：结果口径用更深文字，避免辅助信息看不清 */
.pd-dashboard .pd-scope{font-size:12.5px}
.pd-dashboard .pd-scope-item i{color:#5f6f66}
.pd-dashboard .pd-scope-item b{color:#234d3f}
/* 品牌管理入口放在品牌下拉底部：文字链样式，不抢「完成选择」的主按钮位 */
.pd-brand-manage-row{display:flex;justify-content:flex-start;margin-top:6px}
.pd-brand-manage-link{border:0;background:none;padding:2px 0;font-size:12px;color:#286f5d;text-decoration:underline;cursor:pointer;min-height:0}
.pd-brand-manage-link:hover{background:none;color:#1c5445}
.pd-brand-manage-link[hidden]{display:none}
/* 查询区控件统一高度；移动端保留足够触控面积 */
.pd-dashboard .pd-toolbar>button,.pd-dashboard .pd-brand-button,
.pd-dashboard .pd-presets button,.pd-dashboard .pd-date-range{min-height:38px}
@media(max-width:700px){
  .pd-dashboard .pd-toolbar>button,.pd-dashboard .pd-brand-button,
  .pd-dashboard .pd-presets button,.pd-dashboard .pd-date-range,
  .pd-dashboard .pd-source-switch button{min-height:44px}
  .pd-dashboard .pd-scope{font-size:12px}
}

/* ---------- 展示优化 v1.0 第二轮：趋势、预警摘要与明细可读性 ---------- */
/* 趋势：三个常用指标直出，其余收进「更多指标」，保持单指标切换 */
.pd-dashboard .pd-tabs{flex-wrap:wrap;align-items:center}
.pd-tabs-extra{display:flex;gap:2px;padding:0 2px}
.pd-tabs-extra[hidden]{display:none!important}
.pd-trend-more{font-size:11px;color:#4f6f5e;background:transparent;border:1px dashed #c6d8cb;border-radius:6px;padding:6px 10px}
.pd-trend-more:hover{background:#eef4f0;filter:none}
/* 预警摘要：截短后的「查看全部」入口 */
.pd-alert-more{margin-top:8px;font-size:12px}
/* 公司明细：冻结名称列、长名两行截断并保留完整名称可读入口 */
.pd-company-table th:first-child,.pd-company-table td:first-child{position:sticky;left:0;z-index:1;background:#fff}
.pd-company-table th:first-child{background:#f5f8f5;z-index:2}
.pd-company-table tbody tr:nth-child(even) td:first-child{background:#f7faf8}
.pd-company-table tbody tr:hover td:first-child{background:#eef4f0}
.pd-company-name b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-all}

/* ---------- 更新等待期：已由「顶部细进度条」取代半透明蒙纱 ---------- */
/* 早期用 opacity 遮蔽整块结果，观感像蒙了一层纱，已废弃；此处仅保留定位上下文。
   蒙纱类 pd-updating 不再由脚本添加，见 project_dashboard.js 的 load()。 */
#pd-result{position:relative}

/* ---------- 展示优化第二轮反馈：进度条、轻提示、表头与明细修正 ---------- */
/* 轻提示：右下淡入淡出，自动消失；放右下角避免遮挡页头的预警中心与刷新按钮 */
.pd-toast-host{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column-reverse;gap:8px;z-index:1300;
  max-width:min(420px,calc(100vw - 32px));pointer-events:none}
.pd-toast{opacity:0;transform:translateY(8px);transition:opacity .25s ease,transform .25s ease;
  background:#fff;border:1px solid #d5e4d8;border-radius:10px;padding:10px 14px;font-size:12.5px;
  color:#33503f;box-shadow:0 8px 24px #173b2520;pointer-events:auto;word-break:break-all}
.pd-toast.show{opacity:1;transform:none}
.pd-toast-ok{border-color:#bfdcc8;background:#f0f8f2;color:#1f6b48}
.pd-toast-error{border-color:#eec9c9;background:#fdf1f1;color:#a33c3c}
/* 更新等待：顶部细进度条替代整页蒙纱，内容保持可读 */
.pd-dashboard.pd-progressing::before{content:'';position:sticky;top:0;display:block;height:3px;margin-bottom:-3px;
  border-radius:2px;background:linear-gradient(90deg,#286f5d,#7fc0a0,#286f5d);background-size:200% 100%;
  animation:pd-progress-move 1.1s linear infinite;z-index:6}
@keyframes pd-progress-move{from{background-position:0 0}to{background-position:-200% 0}}
/* 预算入口固定在「月度执行」组标题右侧。
   ui_refresh.css 里有 .pd-dashboard .pd-budget-edit{position:absolute;right:16px;top:16px} 且后加载，
   会把按钮甩到整个看板容器右上角；此处用更高优先级在组标题内还原为常规流式按钮。 */
.pd-dashboard .pd-kpi-head .pd-budget-edit{position:static;right:auto;top:auto;margin:0;
  background:#eef5ef;color:#286f5d;border:1px solid #cfe0d6;border-radius:7px;
  padding:7px 12px;font-size:12px;line-height:1.4;white-space:nowrap}
.pd-dashboard .pd-kpi-head .pd-budget-edit:hover{background:#e2efe6;filter:none}
.pd-kpi-head-actions{margin-left:auto;display:flex;gap:8px;flex:none;align-self:center}
.pd-alert-dialog-head{display:flex;align-items:center;gap:10px}
/* 明细表：去掉页面内部的竖向滚动条，高度交给页面；保留必要的横向滚动。
   注：.pd-trend-detail .pd-table-wrap 的 240px 优先级更高，需一并放开。 */
.pd-dashboard .pd-table-wrap,
.pd-dashboard .pd-trend-detail .pd-table-wrap{max-height:none;overflow-x:auto;overflow-y:hidden}
/* 宽屏下表格不溢出，容器放开 overflow，表头才能吸附在吸顶页头下方（窄屏仍保留横向滚动） */
@media(min-width:1280px){.pd-dashboard .pd-table-wrap{overflow:visible}}
.pd-dashboard .pd-company-table th{top:70px}
@media(max-width:700px){.pd-dashboard .pd-company-table th{top:39px}}
/* 表头控制：排序方向只在当前列显示；筛选按钮做成常驻可见的小标签，不再靠极淡的三角形 */
.pd-company-table th .pd-column-sort{color:#5f7668}
.pd-company-table th[aria-sort=none] .pd-column-sort{color:#7b8a80}
.pd-column-filter{opacity:.8;border-radius:4px;font-size:10px;line-height:1;padding:3px 4px;margin-left:2px;
  border:1px solid transparent;color:#6c8577}
.pd-column-filter:hover,.pd-column-filter.active{opacity:1;color:#20574b;background:#e4eee6;border-color:#c8ded0}
/* 数值筛选弹窗：明确最低/最高两个字段 */
.pd-range-grid{display:grid;grid-template-columns:minmax(105px,2fr) minmax(0,3fr);gap:12px}
.pd-range-grid select,.pd-range-grid input,.pd-alert-filters select,.pd-alert-filters input{min-width:0;width:100%;padding:9px;border:1px solid #cdd9d0;border-radius:7px;background:#fff;color:inherit}
.pd-range-grid select,.pd-range-grid input{box-sizing:border-box;height:42px;margin:0;font:inherit}
.pd-filter-values{display:flex;gap:6px}
.pd-filter-values input{flex:1}
.pd-filter-values input[hidden]{display:none}
.pd-alert-kind-summary{display:flex;gap:6px;flex-wrap:wrap}
.pd-alert-kind-summary button:disabled{opacity:.65;cursor:default}
.pd-alert-filters{display:flex;gap:8px;margin-bottom:8px}
.pd-alert-filters select,.pd-alert-filters input{width:auto;max-width:50%}
.pd-range-field{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.pd-range-field span{font-size:12px;color:#5f7566}
/* 卡片右上角的低频配置入口（线索成本阈值）：绝对定位，不挤占数值排版 */
.pd-dashboard .pd-card.pd-card-actions-host{position:relative}
.pd-card-actions{position:absolute;top:12px;right:12px;display:flex;gap:8px;z-index:1}
.pd-card-action{background:#eef5ef;color:#286f5d;border:1px solid #cfe0d6;border-radius:7px;
  padding:5px 10px;font-size:11.5px;line-height:1.35;white-space:nowrap;cursor:pointer}
.pd-card-action:hover{background:#e2efe6}
.pd-card-action:focus-visible{outline:2px solid #7fb69b;outline-offset:2px}
/* 未归属品牌消耗的口径提示：低调但必须可读，不能做成灰字 */
.pd-card-warn{font-size:12px;line-height:1.5;color:#8a5a22;background:#fdf6ea;
  border:1px solid #f0dcbb;border-radius:8px;padding:7px 9px}
@media(max-width:700px){
  /* 窄屏卡片放不下「标题 + 右上角按钮」，改回流式排在卡片末尾 */
  .pd-card-actions{position:static;align-self:flex-start;margin-top:2px}
}
/* 首页摘要条目可点，进入预警中心 */
.pd-alert-row-click{cursor:pointer;border-radius:8px;transition:background .15s}
.pd-alert-row-click:hover,.pd-alert-row-click:focus-visible{background:#f4f9f5;outline:none}
/* 轮询重绘不再整组淡入，避免每分钟“闪一下” */
.pd-dashboard .pd-card strong{animation:none}
@media(prefers-reduced-motion:reduce){
  .pd-toast{transition:none}
  .pd-dashboard.pd-progressing::before{animation:none;background:#9dbfab}
}

/* 效域通导入：投放 / 短视频两个入口并排；窄屏各占半行 */
.pd-import-xyt .pd-import-row{gap:8px}
.pd-import-xyt .pd-import-row button{padding:7px 14px;font-size:12px}
@media(max-width:700px){
  .pd-import-xyt .pd-import-row button{flex:1 1 45%}
}

/* 品牌管理弹窗：一行 = 品牌名 + 文件名关键字 + 保存/删除
   注意别用 .pd-brand-row / .pd-brand-list：那是品牌进度卡与品牌多选组件的类名。 */
.pd-brand-rows{display:flex;flex-direction:column;gap:8px;margin:6px 0 4px}
/* 列头放在滚动区外：列表滚动时两列的含义依然可见 */
.pd-brand-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto;gap:8px;padding:2px 2px 3px;font-size:11.5px;color:#5f7368}
.pd-brand-head span:nth-child(3){grid-column:3/5;text-align:center}
.pd-brand-head.is-new{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;margin-top:4px}
.pd-brand-head.is-new span:nth-child(3){grid-column:auto}
.pd-brand-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto;gap:8px;align-items:center}
.pd-brand-item input{min-width:0}
.pd-brand-new{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:center;margin:6px 0 2px}
.pd-danger{color:#a63b2f;border-color:#e2c4bf}
.pd-danger:hover{background:#fbeeec}
@media(max-width:700px){
  .pd-brand-item,.pd-brand-new,.pd-brand-head,.pd-brand-head.is-new{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .pd-brand-head span:nth-child(n+3){display:none}
}

/* 品牌管理弹窗：品牌 / 品牌归属 两个页签（归属页按公司或门店逐行指定品牌） */
.pd-brand-dialog{width:680px;max-height:calc(100dvh - 24px);overflow:hidden}
.pd-brand-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 74px);min-height:0}
.pd-brand-dialog form > :not(.pd-brand-pane){flex-shrink:0}
.pd-brand-tabs{display:flex;gap:6px;border-bottom:1px solid #e7ede9;margin:0 0 12px}
.pd-brand-tab{border:0;background:none;padding:8px 10px;font-size:13px;color:#5f7368;border-bottom:2px solid transparent;cursor:pointer;min-height:0}
.pd-brand-tab.is-active{color:#20574b;font-weight:600;border-bottom-color:#286f5d}
.pd-brand-tab-note{margin-left:6px;font-size:11px;padding:1px 6px;border-radius:9px;background:#fbeceb;color:#a63b2f;font-weight:600}
.pd-brand-tab-note:empty{display:none}
.pd-brand-pane{min-height:0;overflow:auto;padding-right:2px}
.pd-brand-pane[hidden]{display:none}
.pd-assign-scopebar.is-provider{grid-template-columns:minmax(0,1fr) auto}
.pd-assign-scopebar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;margin:8px 0 10px}
.pd-assign-scopes{display:flex;gap:4px;background:#f3f7f3;border:1px solid #e2eae4;border-radius:8px;padding:3px}
.pd-assign-scope{border:0;background:none;padding:5px 10px;font-size:12px;color:#5f7368;border-radius:6px;cursor:pointer;min-height:0}
.pd-assign-scope.is-active{background:#fff;color:#20574b;font-weight:600;box-shadow:0 1px 3px #173b2514}
.pd-assign-hint{font-size:11.5px;color:#7b8982;white-space:nowrap}
/* 批量归属：只看未归属 / 全选本页 / 范围 + 品牌 + 应用 */
.pd-assign-filterbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 8px;font-size:12px;color:#5f7368}
.pd-assign-filterbar label{display:flex;align-items:center;gap:5px;cursor:pointer}
.pd-assign-check,.pd-assign-pick{width:15px;height:15px;accent-color:#286f5d;cursor:pointer}
.pd-assign-row .pd-assign-pick{align-self:start;margin-top:3px}
.pd-assign-mini{font-size:11.5px;padding:4px 9px}
.pd-assign-selected{font-size:11.5px;color:#20574b;font-weight:600}
.pd-assign-pager{display:flex;align-items:center;gap:8px;margin-left:auto;white-space:nowrap}
.pd-assign-bulkbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#f6faf7;border:1px solid #e2eae4;border-radius:8px;padding:8px 10px;margin:0 0 10px}
.pd-assign-bulk-label{font-size:12px;font-weight:600;color:#20574b;white-space:nowrap}
.pd-assign-bulkbar select{font-size:12px;padding:5px 6px;border:1px solid #dfe7e1;border-radius:6px;background:#fff;max-width:200px;min-width:0}
.pd-assign-bulkbar button{font-size:12px;padding:5px 12px;white-space:nowrap}
.pd-assign-bulk-hint{flex-basis:100%;font-size:11.5px;color:#7b8982;line-height:1.5}
.pd-assign-rows{display:flex;flex-direction:column;gap:6px}
.pd-assign-row{display:grid;grid-template-columns:15px minmax(0,1fr) auto 132px auto;gap:8px;align-items:center;border:1px solid #eef3ef;border-radius:8px;padding:7px 9px}
.pd-assign-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.pd-assign-name{font-size:12.5px;color:#2f4f40;overflow-wrap:anywhere}
.pd-assign-company{min-width:0;width:100%;padding:4px 6px;font-size:12px}
.pd-assign-meta{font-size:11.5px;color:#7b8982}
.pd-assign-warn{font-size:11.5px;color:#a0682f}
.pd-assign-auto-note{font-style:normal;font-size:11.5px;color:#7b8982}
.pd-assign-source{font-size:11px;padding:2px 7px;border-radius:9px;white-space:nowrap;background:#f1f5f1;color:#6d7f74}
.pd-assign-source.is-manual{background:#e8f5ee;color:#226b52}
.pd-assign-source.is-derived{background:#eef3fb;color:#3f5f8a}
.pd-assign-source.is-file{background:#f4f1e6;color:#7a6633}
.pd-assign-source.is-multi,.pd-assign-source.is-none{background:#fbeceb;color:#a63b2f}
.pd-assign-row select{width:100%;min-width:0;font-size:12px;padding:5px 6px;border:1px solid #dfe7e1;border-radius:6px}
.pd-assign-row button{font-size:12px;padding:5px 10px}
@media(max-width:700px){
  .pd-brand-dialog{width:calc(100vw - 24px)}
  .pd-brand-tabs,.pd-assign-scopes{flex-wrap:wrap}
  .pd-assign-scopebar.is-provider{grid-template-columns:minmax(0,1fr)}
  .pd-assign-scopebar{grid-template-columns:minmax(0,1fr);gap:6px}
  .pd-assign-row{grid-template-columns:15px minmax(0,1fr) auto;row-gap:6px}
  .pd-assign-row .pd-assign-pick{grid-column:1;grid-row:1/3}
  .pd-assign-row .pd-assign-main{grid-column:2/4;grid-row:1}
  .pd-assign-row .pd-assign-source{grid-column:2;grid-row:2;justify-self:start}
  .pd-assign-row select{grid-column:1/3;grid-row:3}
  .pd-assign-row button{grid-column:3;grid-row:3}
  .pd-assign-bulkbar select{max-width:100%;flex:1 1 140px}
}
.pd-assign-source.is-split{background:#f0ecfb;color:#5b4696}
