/* Operational filter hierarchy: performance range stays global; posting/account filters stay local. */
.affiliate-section-bar{align-items:flex-start}
.affiliate-filters{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.affiliate-filters>select{min-width:190px}
.post-date-filter{display:flex;align-items:flex-end;gap:7px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;background:#fff}
.post-date-filter>span{align-self:center;min-width:116px}
.post-date-filter>span small,.post-date-filter>span b{display:block}
.post-date-filter>span small{font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.post-date-filter>span b{font-size:10px;margin-top:2px}
.post-date-filter label,.compact-field{margin:0;gap:3px;font-size:8px}
.post-date-filter input{width:126px;padding:6px 8px;font-size:10px}
.btn.subtle{background:#f5f7f5;color:var(--muted)}
.live-filters{display:flex;align-items:flex-end;gap:8px}
.compact-field select{min-width:270px}
.section-actions{display:flex;align-items:center;gap:8px}
.date-range-button span small{font-size:8px}
.date-range-button span b{font-size:10px}
@media(max-width:1100px){.affiliate-section-bar{display:block}.affiliate-filters{justify-content:flex-start;margin-top:10px}.post-date-filter{width:100%;flex-wrap:wrap}.post-date-filter>span{margin-right:auto}}
@media(max-width:760px){.live-filters,.compact-field,.compact-field select{width:100%}.post-date-filter input{width:100%}.post-date-filter label{flex:1;min-width:120px}}
.ads-performance-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:16px;padding:20px 22px;border:1px solid #eadfe0;border-top:3px solid #ff1f2d;border-radius:16px;background:linear-gradient(135deg,#fff 70%,#fff3f3)}
.ads-performance-head h3{font-size:22px;margin:3px 0 2px}.ads-performance-head p{margin:0;color:#6d6570}.section-kicker{font-size:11px;letter-spacing:.12em;font-weight:800;color:#e31522}.ads-performance-head .data-toolbar{margin:0;padding:0;border:0;background:transparent;justify-content:flex-end}.ads-performance-head select{min-width:150px}
.ads-intelligence-grid{align-items:stretch;grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}.ads-intelligence-grid>article.panel{height:100%;display:flex;flex-direction:column}.ads-intelligence-grid>article.panel #adsProductSummary{flex:1;display:flex}.ads-intelligence-grid>article.panel #adsProductSummary>.table{height:100%}.ads-funnel{display:grid;gap:9px;max-width:360px;margin:10px auto}.ads-funnel div{display:flex;justify-content:space-between;align-items:center;margin:auto;padding:14px 18px;border-radius:12px;background:#fff4f4;border:1px solid #f4d8da}.ads-funnel div:nth-of-type(1){width:100%}.ads-funnel div:nth-of-type(2){width:78%}.ads-funnel div:nth-of-type(3){width:56%}.ads-funnel small{color:#6c6268}.ads-funnel b{font-size:18px}.ads-funnel i{text-align:center;color:#d71927;font-size:12px;font-style:normal;font-weight:750}
@media(max-width:1000px){.ads-performance-head{align-items:stretch;flex-direction:column}.ads-performance-head .data-toolbar{justify-content:flex-start}.ads-performance-head select{flex:1;min-width:180px}}
.ads-right-stack{display:grid;gap:14px}.ads-right-stack .panel{margin:0}.metric-delta{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.metric-delta b{font-size:11px;font-weight:700}.delta{display:inline-flex;white-space:nowrap;font-size:8px;font-weight:800}.delta.up{color:#16834c}.delta.down{color:#df3340}.delta.neutral{color:#9aa0a8}.source-bars{display:grid;gap:14px;padding:8px 4px}.source-bars div{display:grid;grid-template-columns:1fr auto;gap:5px}.source-bars span{font-size:10px;color:var(--muted)}.source-bars b{font-size:11px}.source-bars i{grid-column:1/-1;height:12px;border-radius:3px;background:linear-gradient(90deg,#ff202d,#ff7a36);min-width:2px}.trend-wrap{height:190px;padding:8px 12px;background:linear-gradient(180deg,#fff,#fff8f8);border-radius:12px}.trend-wrap svg{width:100%;height:100%}.heat{background:linear-gradient(90deg,rgba(255,236,236,.45),rgba(228,249,237,.45))}.ads-performance-head+.ads-intelligence-grid{margin-top:0}#advAdsPerformance>.panel,#advAdsPerformance>.layout-1-1,#advAdsPerformance>.layout-2-1{margin-bottom:14px}#advAdsPerformance .panel{border-radius:10px}#advAdsPerformance .panel-head{padding-bottom:9px}#advAdsPerformance .panel-head h3{font-size:12px}#advAdsPerformance .panel-head p{font-size:9px}#advAdsPerformance .table th{font-size:8px}#advAdsPerformance .table td{font-size:9px;padding-top:7px;padding-bottom:7px}#advAdsPerformance .pager{font-size:9px}
#adsProductSummary{overflow:visible}#adsProductSummary .table{width:100%;min-width:0!important;table-layout:fixed}#adsProductSummary .table th,#adsProductSummary .table td{padding-left:6px;padding-right:6px;overflow:hidden;text-overflow:ellipsis}#adsProductSummary .table th:first-child,#adsProductSummary .table td:first-child{white-space:normal;overflow-wrap:anywhere;text-overflow:clip}.ads-pager .pager-actions{display:flex;align-items:center;gap:8px}.ads-pager .pager-btn{width:28px;height:28px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);cursor:pointer}.ads-pager .pager-btn:disabled{opacity:.35;cursor:not-allowed}
#advAdsPerformance .table-wrap{overflow-x:hidden}#advAdsPerformance .table{width:100%;min-width:0!important;table-layout:fixed}#advAdsPerformance .table th,#advAdsPerformance .table td{min-width:0;overflow:hidden;text-overflow:ellipsis}#advAdsPerformance .table th.wrap,#advAdsPerformance .table td.wrap{white-space:normal;overflow-wrap:anywhere;text-overflow:clip}#advAdsPerformance .table th.num,#advAdsPerformance .table td.num{white-space:nowrap;padding-left:5px;padding-right:5px}#advAdsPerformance .layout-1-1 .table th,#advAdsPerformance .layout-1-1 .table td{font-size:8px;padding-left:5px;padding-right:5px}#advAdsPerformance .layout-1-1 .metric-delta b{font-size:9px}
@media(max-width:1250px){#adsProductSummary .table th,#adsProductSummary .table td{font-size:8px;padding-left:4px;padding-right:4px}#adsProductSummary .table th{letter-spacing:0}.ads-intelligence-grid{grid-template-columns:minmax(0,1.75fr) minmax(270px,1fr)}}
.creative-status-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:12px}.creative-status-cards>div{display:grid;gap:3px;padding:12px 14px;border:1px solid #ece3e4;border-radius:10px;background:#fffafa}.creative-status-cards span{font-size:9px;color:var(--muted)}.creative-status-cards b{font-size:18px}.creative-status-cards small{font-size:8px;color:#8b7f83}@media(max-width:760px){.creative-status-cards{grid-template-columns:repeat(2,1fr)}}
.ads-product-panel{min-height:620px}.ads-product-detail-panel{min-height:590px}#adsProductSummary,#adsProductDetail{min-height:500px;align-items:flex-start!important}#adsProductSummary>.table{height:auto!important}.pic-trend{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}.pic-trend svg{display:block;width:100%;height:230px}.pic-trend-legend{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:6px;font-size:9px;color:var(--muted)}.pic-trend-legend span{display:flex;align-items:center;gap:5px}.pic-trend-legend i{width:18px;height:3px;border-radius:3px}.pic-trend-empty{min-height:180px;display:grid;place-items:center;color:var(--muted);font-size:10px}@media(max-width:1000px){.ads-product-panel,.ads-product-detail-panel{min-height:0}#adsProductSummary,#adsProductDetail{min-height:0}}

/* Stable Ads Performance composition and readable compact tables. */
.ads-operations-grid{align-items:stretch}.ads-left-stack{display:grid;grid-template-rows:auto auto;gap:14px;min-width:0}.ads-left-stack>.panel{margin:0}.ads-campaign-panel{height:100%;min-width:0;display:flex;flex-direction:column}.ads-campaign-panel .table-wrap{flex:1}.ads-creator-panel{width:100%;min-width:0}#advAdsPerformance .table th{white-space:normal!important;overflow-wrap:anywhere;text-align:center;vertical-align:middle;text-overflow:clip!important}#advAdsPerformance .table td{text-align:center;vertical-align:middle}#advAdsPerformance .table .name-cell,#advAdsPerformance .metric-delta{align-items:center;text-align:center}#advAdsPerformance .table .sub{text-align:center}
#advSettings .layout-2-1{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}#advSettings .panel,#advSettings .form-panel,#advSettings label,#advSettings input,#advSettings select{min-width:0;max-width:100%;width:100%;box-sizing:border-box}#advSettings .form-panel .btn{width:auto;max-width:100%}
@media(max-width:1000px){#advSettings .layout-2-1{grid-template-columns:1fr}.ads-operations-grid{grid-template-columns:1fr}}

/* Proportional operational controls. */
.affiliate-filters{align-items:center}.affiliate-filters>select,.affiliate-date-range-control{width:220px;min-width:220px}.affiliate-filters>select{height:42px}.affiliate-date-range-control{display:block}.affiliate-date-range-control .date-trigger{min-width:0;height:42px}.affiliate-date-popover{right:0;left:auto}.affiliate-calendar-footer{align-items:center}.live-campaign-create{margin-bottom:14px}.live-campaign-form{display:grid;grid-template-columns:minmax(180px,1.25fr) 135px 135px minmax(140px,.8fr) minmax(220px,1.4fr) auto;gap:10px;align-items:end}.live-campaign-form label{margin:0;min-width:0}.live-campaign-form input{width:100%;height:40px}.live-campaign-form .btn{height:40px;white-space:nowrap}.ads-account-mapping{margin-top:14px}
@media(max-width:1180px){.live-campaign-form{grid-template-columns:repeat(2,minmax(0,1fr))}.live-campaign-notes{grid-column:1/-1}.live-campaign-form .btn{justify-self:start}.affiliate-filters>select,.affiliate-date-range-control{width:min(100%,220px)}}
@media(max-width:700px){.live-campaign-form{grid-template-columns:1fr}.live-campaign-notes{grid-column:auto}.affiliate-filters>select,.affiliate-date-range-control{width:100%;min-width:0}.affiliate-date-popover{position:fixed;left:80px!important;right:8px!important}}

/* Ads filters stay inside the panel and share the available width evenly. */
#advAdsPerformance .ads-performance-head{min-width:0;overflow:hidden}#advAdsPerformance .ads-performance-head>.data-toolbar{display:grid;grid-template-columns:repeat(4,minmax(130px,175px));gap:8px;width:auto;max-width:100%;flex:0 1 auto}#advAdsPerformance .ads-performance-head>.data-toolbar select{width:100%;min-width:0!important;max-width:175px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#advAdsPerformance .recommendation-column{white-space:normal!important;overflow-wrap:anywhere;text-align:left!important}.recommendation-pill{display:grid;gap:2px;min-width:0;padding:6px 7px;border-radius:8px;background:#f4f6f8;color:#3f4855;text-align:left}.recommendation-pill b{font-size:8.5px;line-height:1.25}.recommendation-pill small{display:block;font-size:7.5px;line-height:1.3;color:#76808d}.recommendation-pill.ads{background:#fff0ef;color:#b4231d}.recommendation-pill.budget{background:#eef8f1;color:#167444}.recommendation-pill.impressions{background:#fff7df;color:#816212}.recommendation-pill.materials{background:#eef3ff;color:#365fb8}.recommendation-pill.healthy{background:#f1f4f5;color:#53606a}
@media(max-width:1180px){#advAdsPerformance .ads-performance-head{align-items:stretch;flex-direction:column}#advAdsPerformance .ads-performance-head>.data-toolbar{width:100%;grid-template-columns:repeat(4,minmax(0,1fr))}#advAdsPerformance .ads-performance-head>.data-toolbar select{max-width:none}}
@media(max-width:680px){#advAdsPerformance .ads-performance-head>.data-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}}
