/* ==========================================================================
   GameBuddy prototype - ADS MANAGER styles (module owner: ads). Prefix: ad-
   Tokens only (var(--...)). Platform components (pd-*) are composed, never restyled.
   Sections: 1 layout - 2 board and cards - 3 tables - 4 ad previews - 5 gauge and help - 6 modals - 7 campaign page - 8 composer - 9 reports
   ========================================================================== */

/* ---------- 1. layout ---------- */
.ad-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ad-panel { min-width: 0; }
.ad-stack { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.ad-stack--sm { gap: var(--sp-2); }
.ad-mt { margin-top: 16px; }
.ad-grid { display: grid; gap: 16px; margin-top: 16px; align-items: start; }
.ad-grid--wide { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.ad-grid--wide2 { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.ad-share { display: flex; align-items: center; gap: 8px; min-width: 92px; }
.ad-share .pd-progress { flex: 1; }
.ad-share .pd-num { width: 32px; text-align: right; font-size: var(--fs-sm); color: var(--text-3); }
.ad-grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-grid--third { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.ad-err:empty { display: none; }
.ad-perf { display: flex; flex-direction: column; }
.ad-perf > .pd-card { margin-top: 16px; }
.ad-perf > .ad-grid:first-child { margin-top: 16px; }
.ad-minscale__l { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--fs-xs); color: var(--text-4); }
.ad-minscale { min-width: 0; }
@media (max-width: 1099px) {
  .ad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-grid--wide, .ad-grid--wide2, .ad-grid--third { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) { .ad-grid--half { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 719px) { .ad-kpis { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 2. board and cards ---------- */
.ad-hint { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: var(--fs-sm); color: var(--text-3); }
.ad-hint svg { flex: none; color: var(--text-4); }
.ad-boardwrap > .pd-kanban { margin-top: 10px; }
.ad-card__link { color: inherit; }
.ad-card__link:hover { text-decoration: none; color: var(--text); }
.ad-card__link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-inner); }
.ad-card__link:focus-visible { outline: none; }
.ad-card__right { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.ad-card__menu { position: relative; z-index: 2; margin: -3px -7px -3px 0; }
.ad-card:has(.ad-card__link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.ad-stats { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ad-stats svg { color: var(--text-3); flex: none; }
.ad-stats__sep { width: 3px; height: 3px; margin: 0 3px; border-radius: 50%; background: var(--text-4); flex: none; }.ad-card.is-dragged { opacity: .4; }
.ad-card[draggable="true"] { cursor: grab; }
.ad-newcard {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border: 1px dashed var(--border-strong); border-radius: var(--r-inner);
  color: var(--text-3); font-size: var(--fs-md); font-weight: 500; transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.ad-newcard:hover { color: var(--text); border-color: var(--text-4); background: var(--bg-hover); }
.pd-kanban.is-dragging .pd-kcol.is-drop-no { opacity: .55; }
.pd-kanban.is-dragging .pd-kcol.is-drop-ok { border-style: dashed; border-color: var(--accent-ring); }
.pd-kanban.is-dragging .pd-kcol.is-over { background: var(--accent-soft); border-color: var(--accent); }

/* ---------- 3. tables, toolbar, bulk actions ---------- */
.ad-camp { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ad-camp__name { color: var(--text); font-weight: 600; }
.ad-camp__name:hover { text-decoration: underline; text-underline-offset: 2px; }
.ad-camp__sub { font-size: var(--fs-sm); color: var(--text-3); }
.ad-budget { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.ad-budget span { white-space: nowrap; }
.ad-budget__sub { font-size: var(--fs-xs); color: var(--text-4); }
.ad-search { width: 210px; }
.ad-bulk-host:empty { display: none; }
.ad-bulk {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 8px 8px 8px 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: var(--r-inner);
}
.ad-bulk__n { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.ad-bulk__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-tablecard { margin-top: 14px; }
.ad-tablecard .pd-table th, .ad-tablecard .pd-table td { padding-left: 10px; padding-right: 10px; }
.ad-tablecard .pd-table th:first-child, .ad-tablecard .pd-table td:first-child { padding-left: 14px; padding-right: 4px; }
.ad-tablecard .pd-table th:last-child, .ad-tablecard .pd-table td:last-child { padding-right: 12px; }
.ad-tablecard .pd-table th abbr { text-decoration: none; cursor: inherit; }
.ad-col-camp { min-width: 170px; }
.ad-col-game { min-width: 150px; }
.ad-col-first { min-width: 150px; }
/* App.ads.fitColumns marks the table with ad-hide-<key> when the card is too narrow: the optional columns give way one by one instead of scrolling */
.pd-table.ad-hide-launches .ad-c-launches, .pd-table.ad-hide-impressions .ad-c-impressions, .pd-table.ad-hide-cpc .ad-c-cpc, .pd-table.ad-hide-ctr .ad-c-ctr,
.pd-table.ad-hide-game .ad-c-game, .pd-table.ad-hide-budget .ad-c-budget, .pd-table.ad-hide-share .ad-c-share, .pd-table.ad-hide-placement .ad-c-placement, .pd-table.ad-hide-rank .ad-c-rank { display: none; }
/* the row actions stay in reach when the table still has to scroll sideways (phones, long Russian labels) */
.ad-tablecard .pd-table .ad-c-menu { position: sticky; right: 0; z-index: 1; }
.ad-tablecard .pd-table td.ad-c-menu { background: var(--bg-surface); }
.ad-tablecard .pd-table tbody tr:hover td.ad-c-menu { background: var(--bg-hover); }
.ad-tablecard .pd-table-wrap.is-scrollable .ad-c-menu { box-shadow: inset 1px 0 0 var(--border-subtle); }
/* the sticky actions column is this table's hint on the right: the edge fade of the core table must not wash it out, only the left edge may fade */
.ad-tablecard .pd-table-wrap.has-more-right { -webkit-mask-image: none; mask-image: none; }
.ad-tablecard .pd-table-wrap.has-more-left.has-more-right { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - var(--pd-fade)), var(--pd-fade-end)); mask-image: linear-gradient(to left, #000 calc(100% - var(--pd-fade)), var(--pd-fade-end)); }
.ad-chartwrap svg { overflow: visible; }
.ad-chartwrap { padding-right: 6px; }
.ad-pill-cell { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 719px) {
  .ad-search { width: auto; flex: 1 1 0; min-width: 0; } .pd-section-bar__right > .ad-search ~ .pd-btn { flex: 0 0 auto; }
  .ad-col-camp { min-width: 150px; }
}

/* ---------- 4. ad previews (fixed 300 x 188 frame, layouts per placement) ---------- */
.ad-pv {
  position: relative; flex: none; width: 300px; max-width: 100%; height: 188px; overflow: hidden; border-radius: var(--r-inner); background: var(--bg-canvas); border: 1px solid var(--border);
  font-size: var(--fs-xs); line-height: 1.35; color: var(--text); text-align: left;
}
.ad-pv *, .ad-pv *::before, .ad-pv *::after { box-sizing: border-box; }
.ad-pv__ph { color: var(--text-4); font-weight: 400; }
.ad-pv__scene { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(165deg, var(--bg-active) 0%, var(--bg-sunken) 100%); }
.ad-pv__shape { position: absolute; border-radius: 50%; background: var(--bg-hover); }
.ad-pv__shape--a { width: 130px; height: 130px; left: -34px; top: -48px; }
.ad-pv__shape--b { width: 64px; height: 64px; right: 34px; top: 34px; background: var(--accent-soft); }
.ad-pv__shape--c { width: 38px; height: 38px; right: -10px; bottom: 50px; background: var(--bg-track); }
.ad-pv__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: var(--bg-track); }
.ad-pv__title { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.ad-pv__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-xs); line-height: 1.3; color: var(--text-3); }
.ad-pv__col { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ad-pv__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-pv__icon { width: 38px; flex: none; border-radius: 10px; }
.ad-pv__icon--sm { width: 30px; border-radius: 8px; }
.ad-pv__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none; height: 24px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--accent-edge);
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom)); color: var(--accent-fg); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.ad-pv__cta--block { display: flex; width: 100%; height: 28px; }
.ad-pv__cta--sm { height: 22px; padding: 0 8px; }
.ad-pv__cta--ghost { background: none; border-color: transparent; color: var(--accent-text); padding: 0 2px; }
.ad-pv__ad { flex: none; padding: 0 4px; height: 14px; line-height: 13px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: var(--fs-2xs); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.ad-pv__eyebrow { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); }
/* store slot: a sponsored tile between two catalog tiles */
.ad-pv--store { background: var(--bg-canvas); }
.ad-pv__ghost { position: absolute; top: 14px; width: 150px; height: 160px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-surface); opacity: .55; padding: 8px; display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; }
.ad-pv__ghost--l { left: -104px; } .ad-pv__ghost--r { right: -104px; }
.ad-pv__ghost span { display: block; height: 8px; border-radius: 4px; background: var(--bg-track); }
.ad-pv__ghost span:last-child { width: 60%; }
.ad-pv__tile { position: absolute; left: 50%; top: 8px; width: 156px; transform: translateX(-50%); overflow: hidden; border: 1px solid var(--amber-border); border-radius: 12px; background: var(--bg-surface); box-shadow: var(--shadow-md); }
.ad-pv__media { position: relative; }
.ad-pv__media .pd-gcard__chips { top: 6px; left: 6px; }
.ad-pv__cover { border-radius: 0; }
.ad-pv__body { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 8px 9px 9px; }
.ad-pv__body .ad-pv__cta { align-self: flex-start; margin-top: 2px; }
/* rewarded: a dialog over the game scene */
.ad-pv__scrim { position: absolute; inset: 0; background: var(--bg-overlay); }
.ad-pv__dialog { position: absolute; left: 50%; top: 50%; width: 240px; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-popover); box-shadow: var(--shadow-lg); }
.ad-pv__reward { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 20px; padding: 0 8px; border-radius: 6px; background: var(--purple-bg); color: var(--purple-text); font-size: var(--fs-xs); font-weight: 500; max-width: 100%; }
.ad-pv__reward span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-pv__link { align-self: center; font-size: var(--fs-xs); color: var(--text-3); }
/* interstitial: art on top, sheet below */
.ad-pv__hero { position: relative; height: 104px; overflow: hidden; }
.ad-pv__heroart { position: absolute; inset: 0; border-radius: 0; }
.ad-pv__hero .pd-gcard__chips { top: 8px; left: 8px; }
.ad-pv__skip { position: absolute; top: 8px; right: 8px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; display: inline-flex; align-items: center; }
.ad-pv__sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-surface); border-top: 1px solid var(--border); }
/* banner: a strip at the bottom of the game */
.ad-pv__strip { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
/* native card in the game menu */
.ad-pv__menu { position: absolute; left: 50%; top: 14px; width: 150px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; }
.ad-pv__menu span { display: block; height: 18px; border-radius: 9px; background: var(--bg-track); }
.ad-pv__ncard { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.ad-pv__nfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* labelled preview tiles */
.ad-pvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px 14px; justify-items: start; }
.ad-pvtile { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.ad-pvtile__head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 500; color: var(--text-2); }

/* ---------- 5. gauge, help popover ---------- */
.ad-gauge { position: relative; width: 210px; max-width: 100%; margin: 0 auto; }
.ad-gauge svg { display: block; width: 100%; height: auto; }
.ad-gauge__track { stroke: var(--bg-track); }
.ad-gauge__val { transition: stroke-dasharray var(--dur-3) var(--ease); }
.ad-gauge__center { position: absolute; left: 0; right: 0; top: 40%; text-align: center; }
.ad-gauge__v { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.ad-gauge__of { margin-top: 3px; font-size: var(--fs-xs); color: var(--text-3); }
.ad-gauge__ends { position: absolute; left: 3%; right: 3%; bottom: 0; display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-4); }
.ad-help-pop { padding: 0; }
.ad-help { display: flex; flex-direction: column; gap: 14px; padding: 16px; font-size: var(--fs-md); color: var(--text-2); }
.ad-help__intro { color: var(--text-3); line-height: 1.5; }
.ad-help__steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ad-help__step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.ad-help__n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-sm); font-weight: 600; }
.ad-help__t { color: var(--text); font-weight: 600; }
.ad-help__x { margin-top: 2px; color: var(--text-3); line-height: 1.45; }
.ad-help__ex { padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); }
.ad-help__exh { margin-bottom: 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); }
.ad-help__tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.ad-help__tbl th { padding: 3px 6px 5px 0; text-align: left; font-weight: 500; color: var(--text-4); }
.ad-help__tbl td { padding: 4px 6px 4px 0; color: var(--text-2); }
.ad-help__tbl tr.is-win td { color: var(--text); font-weight: 600; }
.ad-help__exn { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-3); }

/* ---------- 6. modals: edit bid, top up ---------- */
.ad-bidmodal__game { display: flex; align-items: center; gap: 12px; }
.ad-bidmodal__cover { width: 44px; flex: none; border-radius: 10px; }
.ad-bidmodal__name { font-size: var(--fs-base); font-weight: 600; }
.ad-marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ad-mark {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-inner); background: var(--bg-surface); text-align: left;
  transition: border-color var(--dur-1), background var(--dur-1);
}
.ad-mark:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.ad-mark__l { font-size: var(--fs-xs); color: var(--text-3); }
.ad-mark__v { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.ad-bidins { display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); }
.ad-bidins__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ad-bidins__pct { font-size: var(--fs-md); color: var(--text-3); }
.ad-bidins__text { margin: 0; font-size: var(--fs-md); color: var(--text-2); line-height: 1.45; }
.ad-topup__after:empty { display: none; }
@media (max-width: 479px) { .ad-marks { grid-template-columns: minmax(0, 1fr); } }




/* ---------- 7. campaign page ---------- */
.ad-inline { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-tools__l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ad-tools__l:empty { display: none; }
.ad-title { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ad-title .pd-chip { transform: translateY(1px); }
.ad-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 2 * var(--page-pad)); }
.ad-notice, .ad-modcard { margin-bottom: 12px; }
.ad-perfbody { display: flex; flex-direction: column; }
.ad-minis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); }
.ad-mini { min-width: 0; }
.ad-mini__l { font-size: var(--fs-xs); color: var(--text-3); }
.ad-mini__v { margin-top: 2px; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.ad-subhead { margin: 16px 0 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); }
.ad-rank { display: flex; align-items: baseline; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; font-size: var(--fs-md); color: var(--text-3); }
.ad-rank strong { color: var(--text); font-size: var(--fs-lg); }
.ad-rank__l { font-weight: 600; color: var(--text-2); }
.ad-subs { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.ad-sub__top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-md); }
.ad-sub__l { color: var(--text-2); font-weight: 500; }
.ad-sub__v { color: var(--text); font-weight: 600; }
.ad-sub .pd-progress { margin-top: 6px; }
.ad-sub__h { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.ad-pos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); font-size: var(--fs-md); color: var(--text-2); }
.ad-advs { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ad-adv { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.ad-adv__t { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.ad-adv__x { margin-top: 2px; font-size: var(--fs-md); color: var(--text-3); line-height: 1.45; }
.ad-adv__btn { margin-top: 8px; }
.ad-plc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-plc > :first-child { flex: none; }
/* the name may wrap and the chip sits under it, so this column gives way when the card is narrow */
.ad-plc__t { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; line-height: 1.25; font-weight: 600; color: var(--text); }
.pd-statrow + .ad-invalid { margin-top: 20px; }
.ad-invalid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; align-items: start; }
.ad-invalid .ad-subhead:first-child { margin-top: 0; }
.ad-reasons { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ad-reason__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-reason__name { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.ad-camp .ad-reason__code { align-self: flex-start; }
.ad-when { white-space: nowrap; }
.ad-reason__code { padding: 1px 6px; border-radius: 4px; background: var(--bg-active); color: var(--text-3); font-family: var(--font-mono); font-size: var(--fs-xs); }
.ad-reason__n { margin-left: auto; font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.ad-reason .pd-progress { margin-top: 6px; }
.ad-reason__h { margin-top: 5px; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.4; }
.ad-note { margin: 0; font-size: var(--fs-md); color: var(--text-3); }
/* account-level reviews, kept apart from the filtered clicks */
.ad-acct { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--border-subtle); }
.ad-acct__list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.ad-acct__i { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.ad-acct__i .ad-camp { flex: 1 1 220px; }
@media (max-width: 1099px) { .ad-invalid { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
@media (max-width: 719px) { .ad-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-actions { justify-content: flex-start; } }


/* ---------- 8. composer ---------- */
.ad-wiz { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 16px; align-items: start; margin-top: 18px; }
.ad-wiz__steps { padding: 4px 0 0; }
.ad-wiz__main { min-width: 0; }
.ad-wiz__aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ad-wiz__pv { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12px; min-height: 188px; }
.ad-wiz__pv .pd-empty { width: 100%; }
.ad-wiz__cap { margin: 0; font-size: var(--fs-sm); color: var(--text-3); line-height: 1.45; }
.ad-wiz__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ad-wiz__foot-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-est { display: flex; flex-direction: column; gap: 0; }
.ad-est__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-md); color: var(--text-3); }
.ad-est__row strong { color: var(--text); font-weight: 600; }
.ad-wiz__est .ad-wiz__cap { margin-top: 10px; }
.ad-stack--lg { gap: var(--sp-6); }
.ad-sec { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.ad-sec__sub { font-size: var(--fs-sm); font-weight: 400; color: var(--text-3); }
.ad-lbl { font-size: var(--fs-md); font-weight: 500; color: var(--text-2); }
.ad-block { min-width: 0; }
.ad-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-checks { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.ad-ckl { display: inline-flex; align-items: center; gap: 8px; }
.ad-mt0 { margin-top: 0; }
/* selectable cards (games, placements, icons) */
.ad-picks { display: grid; gap: 10px; }
.ad-picks--games { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.ad-picks--formats { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.ad-pick {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 40px 12px 12px; border: 1px solid var(--border); border-radius: var(--r-inner); background: var(--bg-surface); cursor: pointer;
  transition: border-color var(--dur-1), background var(--dur-1);
}
.ad-pick:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.ad-pick.is-on { border-color: var(--accent); background: var(--accent-soft); }
.ad-pick:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.ad-pick:focus-within:not(:has(:focus-visible)) { outline: none; }
.ad-pick.is-disabled { opacity: .5; cursor: not-allowed; }
.ad-pick__in { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ad-pick__mark { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 50%; color: transparent; background: var(--bg-input); transition: background var(--dur-1), border-color var(--dur-1); }
.ad-pick__mark--checkbox { border-radius: 5px; }
.ad-pick.is-on .ad-pick__mark { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.ad-pick__cover { width: 44px; flex: none; border-radius: 10px; }
.ad-pick__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ad-pick__t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.ad-pick__s { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-3); line-height: 1.4; }
.ad-pick__m { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-4); }
.ad-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ad-ic { flex-direction: column; justify-content: center; gap: 4px; min-height: 68px; padding: 8px 6px; }
.ad-ic .ad-pick__mark { display: none; }
.ad-ic__art { width: 40px; border-radius: 10px; }
.ad-ic__l { font-size: var(--fs-2xs); color: var(--text-3); }
/* creative */
.ad-lint { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); }
.ad-lint__t { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); }
.ad-lint__i { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); color: var(--text-2); }
.ad-lint__i.is-ok svg { color: var(--green-text); }
.ad-lint__i.is-bad svg { color: var(--amber-text); }
.ad-lint__i.is-bad { color: var(--amber-text); }
/* bid step */
.ad-slider { position: relative; }
.ad-slidermarks { position: relative; height: 40px; margin-top: -2px; }
.ad-slidermarks span { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.ad-slidermarks i { width: 1px; height: 6px; background: var(--border-strong); }
.ad-slidermarks span.is-first { transform: none; align-items: flex-start; left: 0 !important; }
.ad-slidermarks span.is-first i { margin-left: 8px; }
.ad-slidermarks b { font-weight: 500; }
.ad-slidermarks em { font-style: normal; color: var(--text-4); }
/* on a phone the Min / Median / Top labels would sit on top of each other: the three buttons under the slider carry the same values */
@media (max-width: 479px) { .ad-slidermarks { display: none; } }
.ad-bidband { display: flex; flex-direction: column; gap: 8px; min-height: 82px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); }
.ad-bidband:empty { min-height: 82px; }
.ad-est2 { display: flex; flex-direction: column; gap: 14px; }
.ad-est2__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); overflow: hidden; }
.ad-est2__s { padding: 10px 14px; border-right: 1px solid var(--border-subtle); min-width: 0; }
.ad-est2__s:last-child { border-right: 0; }
.ad-est2__l { font-size: var(--fs-xs); color: var(--text-3); }
.ad-est2__v { margin-top: 2px; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.ad-est2__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-md); color: var(--text-2); }
.ad-est2__cap span { font-size: var(--fs-sm); color: var(--text-3); }
.ad-est2__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--fs-sm); color: var(--text-3); }
.ad-legend { display: inline-flex; align-items: center; gap: 6px; }
.ad-dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; flex: none; }
.ad-dot--main { background: var(--accent); }
.ad-dot--demand { background: var(--text-4); }
.ad-dot--budget { background: var(--amber-solid); }
.ad-dot--above { background: var(--gray-solid); opacity: .5; }
.ad-curve { position: relative; width: 100%; }
.ad-curve__plot { position: absolute; left: 40px; right: 10px; top: 8px; bottom: 28px; }
.ad-curve.is-pick .ad-curve__plot { cursor: crosshair; }
.ad-curve svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ad-curve__gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--chart-grid); pointer-events: none; }
.ad-curve__gl span { position: absolute; left: -40px; top: -8px; width: 33px; text-align: right; font-size: var(--fs-xs); color: var(--chart-axis); }
.ad-curve__line { stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; }
.ad-curve__line--main { stroke: var(--accent); stroke-width: 2.5px; }
.ad-curve__line--demand { stroke: var(--text-4); stroke-dasharray: 4 4; }
.ad-curve__line--budget { stroke: var(--amber-solid); stroke-dasharray: 4 4; }
.ad-curve__area { fill: var(--accent-soft); stroke: none; }
.ad-curve__ref { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--border-strong); pointer-events: none; }
.ad-curve__ref span { position: absolute; top: 0; left: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.ad-curve__guide { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--text-4); pointer-events: none; }
.ad-curve__dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 3px solid var(--accent); background: var(--bg-surface); box-shadow: 0 0 0 4px var(--accent-soft); pointer-events: none; }
.ad-curve__xt { position: absolute; top: 100%; margin-top: 7px; transform: translateX(-50%); font-size: var(--fs-xs); color: var(--chart-axis); pointer-events: none; }
.ad-note { margin: 0; font-size: var(--fs-sm); color: var(--text-3); line-height: 1.45; }
/* audience, compliance, review */
.ad-meter { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); background: var(--bg-sunken); }
.ad-meter__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--fs-md); color: var(--text-2); }
.ad-meter__top strong { font-size: var(--fs-lg); color: var(--text); }
.ad-comp.is-off .pd-card__body > .ad-stack > .ad-two, .ad-comp.is-off .pd-card__body > .ad-stack > .pd-field { opacity: .55; }
.ad-check { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ad-check__i { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); color: var(--text-2); }
.ad-check__i svg { flex: none; }
.ad-check__i.is-ok svg { color: var(--green-text); }
.ad-check__i.is-bad svg { color: var(--red-text); }
.ad-check__i.is-warn svg { color: var(--amber-text); }
.ad-check__i.is-info svg { color: var(--blue-text); }
/* success */
.ad-done__top { display: flex; align-items: flex-start; gap: 16px; }
.ad-done__ico { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border: 1px solid var(--green-border); border-radius: 16px; background: var(--green-bg); color: var(--green-text); }
.ad-done__t { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
.ad-done__s { margin: 4px 0 0; font-size: var(--fs-base); color: var(--text-3); line-height: 1.5; }
.ad-done__tl, .ad-done__kv { margin-top: 24px; }
.ad-done__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
@media (max-width: 1099px) {
  .ad-wiz { grid-template-columns: minmax(0, 1fr); }
  .ad-wiz__aside { position: static; }
}
@media (max-width: 719px) {
  .ad-two { grid-template-columns: minmax(0, 1fr); }
  .ad-est2__s { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .ad-est2__s:last-child { border-bottom: 0; }
  .ad-wiz__foot .pd-btn { flex: 1; }
  .ad-wiz__foot-r { flex: 1; }
}
/* ---------- 9. reports ---------- */
.ad-rbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-bottom: 4px; }
.ad-rbar__l { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ad-rbar__r { display: flex; align-items: center; gap: 8px; flex: none; }
.ad-rbar__t { font-size: var(--fs-md); font-weight: 500; color: var(--text-3); }
.ad-rbar .pd-chip { height: 30px; padding: 0 12px; font-size: var(--fs-md); border-radius: var(--r-btn); }
.ad-tablecard--report { margin-top: 0; }
.ad-insights { scroll-margin-top: 16px; }
.ad-insights:focus { outline: none; }
.ad-insights:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ad-statrow .pd-stat__value { font-size: 22px; white-space: nowrap; }
.ad-hist { position: relative; }
.ad-hist__plot { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 214px; padding-top: 48px; border-bottom: 1px solid var(--border); }
.ad-hist__col { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; border-radius: 4px 4px 0 0; }
.ad-hist__col:hover { background: var(--bg-hover); }
.ad-hist__bar { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--gray-solid); opacity: .5; }
.ad-hist__col.is-below .ad-hist__bar { background: var(--accent); opacity: .42; }
.ad-hist__col.is-you .ad-hist__bar { background: var(--accent); opacity: 1; }
.ad-hist__ref { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--border-strong); pointer-events: none; }
.ad-hist__ref span { position: absolute; top: 0; left: 5px; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.ad-hist__you { position: absolute; top: 24px; bottom: 0; width: 0; border-left: 2px solid var(--accent); pointer-events: none; }
.ad-hist__you span { position: absolute; top: 0; left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-fg); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.ad-hist__axis { position: relative; height: 22px; margin-top: 4px; }
.ad-hist__axis span { position: absolute; top: 3px; transform: translateX(-50%); font-size: var(--fs-xs); color: var(--chart-axis); }
.ad-auction { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ad-auction__main { min-width: 0; }
.ad-auction__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ad-auction__tbl { grid-column: 1 / -1; border: 1px solid var(--border-subtle); border-radius: var(--r-inner); overflow: hidden; }
.ad-auction__bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-auction__bar .pd-select { width: 230px; max-width: 100%; }
.ad-auction__lbl { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.ad-auction__lbl span { font-size: var(--fs-sm); font-weight: 400; color: var(--text-3); }
.ad-pickrow { color: var(--text-2); }
.ad-pickrow.is-on { color: var(--text); font-weight: 600; }
.ad-auction__tbl tr.is-clickable { cursor: pointer; }
@media (max-width: 1099px) { .ad-auction { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 719px) { .ad-rbar__r { width: 100%; } .ad-rbar__r .pd-btn { flex: 1; } .ad-hist__ref span { display: none; } }