/* ============================================================
   Paid Ads Performance Dashboard (work/ads-dashboard.html)
   Builds on styles.css tokens: white + green + gold.
   ============================================================ */

.adb {
  /* chart + status roles (validated categorical order, light surface) */
  --s1: #0E8A5F;  /* green  */
  --s2: #2F6FC4;  /* blue   */
  --s3: #B98200;  /* gold   */
  --s4: #7A5BC7;  /* violet */
  --s5: #C8502E;  /* terracotta */
  --meta: #2F6FC4;
  --google: #B98200;
  --good: #0E7A50;
  --good-bg: #E3F3EA;
  --bad: #B42318;
  --bad-bg: #FDECEA;
  --warn: #9A5B00;
  --warn-bg: #FFF4DB;
  --muted-bg: #F2F4EF;
  --card: #FFFFFF;

  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-1);
  padding: 40px 0 96px;
}
.adb *:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.adb-wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.adb-page { font-size: 15px; }
.adb [hidden] { display: none !important; }
.num, .adb-table td.n, .adb-kpi__value { font-variant-numeric: tabular-nums; }

/* ---------- Hero ---------- */
.adb .article__back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg-3); margin-bottom: 22px; }
.adb-hero { margin-bottom: 26px; }
.adb-hero__text { max-width: 900px; }
.adb-demo-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-bg);
  border: 1px solid #F1D9A0; border-radius: 999px; padding: 6px 12px;
}
.adb-demo-badge svg { width: 14px; height: 14px; }
.adb-hero__title {
  font-family: 'Montserrat', var(--sans); font-weight: 800;
  font-size: clamp(28px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -.02em;
  margin: 16px 0 14px; color: var(--ink);
}
.adb-hero__title em {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.adb-hero__lead { font-size: 16.5px; color: var(--fg-2); max-width: 820px; }
.adb-hero__meta { margin-top: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--fg-3); letter-spacing: .02em; }

/* ---------- Section tabs ---------- */
.adb-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 4px; margin: 0 0 14px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 999px;
  width: max-content; max-width: 100%;
}
.adb-tabs::-webkit-scrollbar { display: none; }
.adb-tabs a {
  flex: none; font-size: 13.5px; font-weight: 500; color: var(--fg-2);
  padding: 7px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.adb-tabs a:hover { background: var(--accent-tint); color: var(--accent-d); }
.adb-tabs a.is-active { background: var(--ink); color: #fff; }

/* ---------- Filters (sticky) ---------- */
.adb-filters {
  position: sticky; top: 84px; z-index: 40;
  background: rgba(251,252,249,.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 30px;
  box-shadow: var(--sh-1);
}
.adb-filters__toggle { display: none; }
.adb-filters__body { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.adb-field { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.adb-field > span { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.adb-field--wide { flex: 1 1 260px; min-width: 200px; }
.adb-field select, .adb-search input, .adb-input {
  appearance: none; -webkit-appearance: none;
  height: 38px; padding: 0 34px 0 12px; font-size: 14px; color: var(--fg-1);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236E756F' stroke-width='1.5' stroke-linecap='round'/></svg>") no-repeat right 12px center;
  border: 1px solid var(--line-2); border-radius: 10px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.adb-field select:hover, .adb-search input:hover { border-color: var(--accent-l); }
.adb-field select:focus, .adb-search input:focus, .adb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,122,92,.15); }
.adb-field--inline { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
.adb-field--inline select { width: auto; min-width: 150px; }
.adb-filters__period { margin-top: 8px; font-size: 13px; color: var(--fg-3); }
.adb-filters__period strong { color: var(--fg-1); font-weight: 600; }

/* ---------- Buttons ---------- */
.adb-btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(122deg, #155C45 0%, #1F7A5C 52%, #2E8B5E 100%);
  box-shadow: 0 6px 16px rgba(31,122,92,.22);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  white-space: nowrap;
}
.adb-btn svg { width: 16px; height: 16px; flex: none; }
.adb-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(31,122,92,.28); }
.adb-btn--ghost { color: var(--fg-1); background: #fff; border: 1px solid var(--line-2); box-shadow: none; }
.adb-btn--ghost:hover { border-color: var(--accent); color: var(--accent-d); box-shadow: var(--sh-1); }
.adb-btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; }
.adb-icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; flex: none; }
.adb-icon-btn svg { width: 16px; height: 16px; }
.adb-icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections & cards ---------- */
.adb-section { margin-top: 56px; scroll-margin-top: 190px; }
.adb-section:first-of-type { margin-top: 0; }
.adb-section__head { margin-bottom: 16px; }
.adb-section__head h2 {
  font-family: 'Montserrat', var(--sans); font-weight: 700; font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -.01em; color: var(--ink);
}
.adb-section__head h3 { font-family: 'Montserrat', var(--sans); font-weight: 700; font-size: 17px; color: var(--ink); }
.adb-section__head p { color: var(--fg-3); font-size: 14px; margin-top: 4px; max-width: 820px; }
.adb-section__head--sub { margin-top: 26px; }
.adb-section__head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.adb-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--sh-1); padding: 18px 18px 16px; min-width: 0;
  transition: box-shadow .25s var(--ease), border-color .25s;
}
.adb-card:hover { box-shadow: var(--sh-2); }
.adb-card h3 { font-family: 'Montserrat', var(--sans); font-weight: 700; font-size: 15.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adb-card p { font-size: 13px; color: var(--fg-3); }
.adb-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.adb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adb-grid--uneven { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.adb-grid--uneven-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }

/* ---------- KPI cards ---------- */
.adb-kpis { display: grid; gap: 12px; }
.adb-kpis--primary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adb-kpis--secondary { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.adb-kpis--budget { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.adb-kpi {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px 13px; box-shadow: var(--sh-1); min-width: 0;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  animation: adb-rise .45s var(--ease) both;
}
.adb-kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.adb-kpi--hero::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--grad);
}
.adb-kpi__label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.adb-kpi__label .adb-tag { margin-left: auto; }
.adb-kpi__value { font-family: 'Montserrat', var(--sans); font-weight: 700; font-size: 26px; letter-spacing: -.01em; color: var(--ink); margin: 6px 0 6px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adb-kpis--secondary .adb-kpi { padding: 12px 12px 11px; }
.adb-kpis--secondary .adb-kpi__value { font-size: 19px; }
.adb-kpis--secondary .adb-kpi__label { font-size: 12px; }
.adb-kpi__def { font-size: 11.5px; color: var(--fg-3); margin-top: 6px; line-height: 1.35; }
.adb-kpi__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--fg-3); }
.adb-kpi--na .adb-kpi__value { color: var(--fg-3); font-size: 17px; font-weight: 600; }
.adb-info { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 10px; font-weight: 700; color: var(--fg-3); cursor: help; flex: none; }
.adb-info:hover, .adb-info:focus { color: var(--accent); border-color: var(--accent); }
.adb-info__tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: 220px; padding: 9px 11px; border-radius: 10px; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left; z-index: 20;
  display: none; pointer-events: none;
}
.adb-info:hover .adb-info__tip, .adb-info:focus .adb-info__tip { display: block; }
.adb-kpis--primary .adb-kpi:nth-child(4n) .adb-info__tip, .adb-kpis--secondary .adb-kpi:nth-child(4n) .adb-info__tip, .adb-kpis--budget .adb-kpi:last-child .adb-info__tip { left: auto; right: -10px; transform: none; }

.adb-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.adb-delta svg { width: 9px; height: 9px; }
.adb-delta--good { color: var(--good); background: var(--good-bg); }
.adb-delta--bad { color: var(--bad); background: var(--bad-bg); }
.adb-delta--flat, .adb-delta--na { color: var(--fg-3); background: var(--muted-bg); }

.adb-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); background: var(--muted-bg); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.adb-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--muted-bg); color: var(--fg-2); white-space: nowrap; }
.adb-chip--warn { background: var(--warn-bg); color: var(--warn); }
.adb-chip--good { background: var(--good-bg); color: var(--good); }
.adb-chip--bad { background: var(--bad-bg); color: var(--bad); }
.adb-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }

/* ---------- Charts ---------- */
.adb-chart { margin: 0; display: flex; flex-direction: column; }
.adb-chart figcaption { margin-bottom: 10px; }
.adb-chart__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.adb-chart__box { position: relative; height: 260px; width: 100%; }
.adb-chart__box--tall { height: 340px; }
.adb-chart__box--donut { height: 210px; }
.adb-chart__note { margin-top: 8px; }
.adb-donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.adb-donut-center b { font-family: 'Montserrat', var(--sans); font-size: 20px; color: var(--ink); display: block; }
.adb-donut-center span { font-size: 11.5px; color: var(--fg-3); }
.adb-legend-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.adb-legend-list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; font-size: 13.5px; }
.adb-legend-list li .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.adb-legend-list li .p { color: var(--fg-3); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.adb-seg { display: inline-flex; padding: 3px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; }
.adb-seg button { font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; color: var(--fg-2); }
.adb-seg button.is-on { background: var(--ink); color: #fff; }

/* Funnel */
.adb-funnel { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.adb-funnel__row { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; }
.adb-funnel__label { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.adb-funnel__label small { display: block; font-weight: 400; color: var(--fg-3); font-size: 11.5px; }
.adb-funnel__track { position: relative; height: 34px; background: var(--muted-bg); border-radius: 8px; overflow: hidden; }
.adb-funnel__bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: linear-gradient(90deg, #0E8A5F, #3E9A72); transition: width .6s var(--ease); min-width: 4px; }
.adb-funnel__bar--split { display: flex; background: none; gap: 2px; }
.adb-funnel__bar--split i { display: block; height: 100%; }
.adb-funnel__val { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.adb-funnel__rate { font-size: 11.5px; color: var(--fg-3); margin: -4px 0 0 140px; }
.adb-funnel__note { font-size: 12px; color: var(--fg-3); margin-top: 6px; }

/* ---------- Tables ---------- */
.adb-table-card { padding: 0; overflow: hidden; }
.adb-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.adb-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.adb-table th, .adb-table td { padding: 10px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.adb-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #F7F9F4; font-size: 11.5px; font-weight: 600; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: .04em;
}
.adb-table thead th.sortable { cursor: pointer; user-select: none; }
.adb-table thead th.sortable:hover { color: var(--accent-d); }
.adb-table thead th .arr { display: inline-block; width: 10px; margin-left: 3px; opacity: .35; }
.adb-table thead th[aria-sort="ascending"] .arr, .adb-table thead th[aria-sort="descending"] .arr { opacity: 1; color: var(--accent); }
.adb-table th.n, .adb-table td.n { text-align: right; }
.adb-table tbody tr { transition: background .15s; }
.adb-table tbody tr:hover { background: #FAFCF7; }
.adb-table tbody tr.is-click { cursor: pointer; }
.adb-table tfoot td { font-weight: 700; background: #F7F9F4; border-bottom: none; }
.adb-table td.name { max-width: 270px; overflow: hidden; text-overflow: ellipsis; }
.adb-table td.name button { font-weight: 600; color: var(--ink); text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: block; }
.adb-table td.name button:hover { color: var(--accent); text-decoration: underline; }
.adb-table td.name small { display: block; font-size: 11.5px; color: var(--fg-3); }
.adb-table .first { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.adb-table thead .first, .adb-table tfoot .first { background: #F7F9F4; z-index: 2; }
.adb-table tbody tr:hover .first { background: #FAFCF7; }
.adb-table--compact th, .adb-table--compact td { padding: 9px 10px; }
.adb-table .good { color: var(--good); font-weight: 600; }
.adb-table .bad { color: var(--bad); font-weight: 600; }
.adb-table .muted { color: var(--fg-3); }
.adb-plat { display: inline-flex; align-items: center; gap: 6px; }
.adb-status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.adb-status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.adb-status-pill--Active { background: var(--good-bg); color: var(--good); }
.adb-status-pill--Paused { background: var(--warn-bg); color: var(--warn); }
.adb-status-pill--Completed { background: var(--muted-bg); color: var(--fg-3); }
.adb-empty { padding: 26px; text-align: center; color: var(--fg-3); font-size: 14px; }
.adb-footnote { font-size: 12.5px; color: var(--fg-3); margin-top: 10px; max-width: 980px; }
.adb-spark { display: block; }
.adb-search { position: relative; display: flex; align-items: center; min-width: 240px; }
.adb-search svg { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--fg-3); }
.adb-search input { padding: 0 12px 0 34px; background-image: none; }

/* ---------- Insights ---------- */
.adb-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.adb-ins-group { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); overflow: hidden; display: flex; flex-direction: column; }
.adb-ins-group > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #FAFCF7; }
.adb-ins-group > header h3 { font-family: 'Montserrat', var(--sans); font-size: 15px; font-weight: 700; color: var(--ink); }
.adb-ins-group > header .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.adb-ins-group > header .ico svg { width: 16px; height: 16px; }
.adb-ins-group > header .count { margin-left: auto; }
.adb-ins { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.adb-ins:last-child { border-bottom: none; }
.adb-ins h4 { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
.adb-ins h4 .adb-chip { flex: none; margin-top: -1px; }
.adb-ins__evidence { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.adb-ins__evidence span { font-size: 12px; background: var(--muted-bg); border-radius: 6px; padding: 3px 8px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.adb-ins p { font-size: 13.5px; color: var(--fg-2); }
.adb-ins p + p { margin-top: 6px; }
.adb-ins p b { color: var(--ink); }
.adb-ins--empty p { color: var(--fg-3); }

/* ---------- Budget ---------- */
.adb-pacing h3 { margin-bottom: 14px; }
.adb-pacing__bar { position: relative; height: 18px; background: var(--muted-bg); border-radius: 999px; overflow: visible; margin: 30px 0 30px; }
.adb-pacing__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--grad); transition: width .6s var(--ease); }
.adb-pacing__mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); }
.adb-pacing__mark span { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--fg-2); white-space: nowrap; font-weight: 600; }
.adb-pacing__mark--end span { left: auto; right: 0; transform: none; top: auto; bottom: calc(100% + 4px); }
.adb-pacing__rows { display: grid; gap: 8px; }
.adb-pacing__rows li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.adb-pacing__rows li:last-child { border-bottom: none; }
.adb-pacing__rows li span { color: var(--fg-3); }
.adb-pacing__rows li b { font-variant-numeric: tabular-nums; text-align: right; }
.adb-platbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 6px 0 14px; }
.adb-platbar i { display: block; height: 100%; }
.adb-realloc { margin-bottom: 16px; }
.adb-realloc td.why { white-space: normal; min-width: 280px; max-width: 420px; font-size: 12.5px; color: var(--fg-2); }
.adb-change { font-weight: 700; font-variant-numeric: tabular-nums; }
.adb-change--up { color: var(--good); }
.adb-change--down { color: var(--bad); }
.adb-impact h3 { margin-bottom: 12px; }
.adb-impact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adb-impact__cell { background: #FAFCF7; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.adb-impact__cell span { display: block; font-size: 11.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .04em; font-family: var(--mono); }
.adb-impact__cell b { display: block; font-family: 'Montserrat', var(--sans); font-size: 18px; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.adb-impact__cell small { font-size: 12px; color: var(--fg-3); }
.adb-impact__note { font-size: 12.5px; color: var(--fg-3); margin-top: 12px; }
.adb-reconcile { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--good-bg); color: var(--good); font-weight: 600; }
.adb-reconcile--bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- Report ---------- */
.adb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.adb-status { font-size: 13px; color: var(--fg-3); min-height: 20px; margin-bottom: 8px; }
.adb-report { padding: clamp(18px, 3vw, 40px); }
.adb-report__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 22px; }
.adb-report__head h3 { font-size: clamp(18px, 2.2vw, 24px); font-weight: 800; }
.adb-report__head p { font-size: 13.5px; }
.adb-report__sec { margin-top: 24px; }
.adb-report__sec h4 { font-family: 'Montserrat', var(--sans); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-d); margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.adb-report__sec h4 i { font-style: normal; font-family: var(--mono); color: var(--fg-3); font-weight: 500; }
.adb-report__sec p, .adb-report__sec li { font-size: 14.5px; color: var(--fg-2); line-height: 1.6; }
.adb-report__sec ul, .adb-report__sec ol { padding-left: 20px; display: grid; gap: 6px; }
.adb-report__sec ul { list-style: disc; }
.adb-report__sec ol { list-style: decimal; }
.adb-report__sec li b, .adb-report__sec p b { color: var(--ink); }
.adb-report__kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.adb-report__kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #FAFCF7; min-width: 0; }
.adb-report__kpi > span:first-child { font-size: 11.5px; color: var(--fg-3); display: block; }
.adb-report__kpi b { font-family: 'Montserrat', var(--sans); font-size: 19px; color: var(--ink); display: block; margin: 2px 0; font-variant-numeric: tabular-nums; }
.adb-report__foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); }

/* ---------- Drawer & modal ---------- */
.adb-drawer, .adb-modal { position: fixed; inset: 0; z-index: 200; }
.adb-drawer__scrim, .adb-modal__scrim { position: absolute; inset: 0; background: rgba(20,24,20,.42); animation: adb-fade .2s ease both; }
.adb-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 100%);
  background: var(--paper); box-shadow: -20px 0 60px rgba(0,0,0,.18);
  display: flex; flex-direction: column; animation: adb-slide .3s var(--ease) both;
  font-size: 15px;
}
.adb-drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.adb-drawer__head h2 { font-family: 'Montserrat', var(--sans); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.3; word-break: break-word; }
.adb-drawer__eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.adb-drawer__body { overflow-y: auto; padding: 18px 20px 30px; display: grid; gap: 16px; align-content: start; }
.adb-drawer__body h3 { font-family: 'Montserrat', var(--sans); font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.adb-mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.adb-mini-kpis div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.adb-mini-kpis span { font-size: 11px; color: var(--fg-3); display: block; }
.adb-mini-kpis b { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.adb-modal__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(760px, calc(100% - 24px)); max-height: calc(100% - 40px);
  background: var(--paper); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: adb-pop .25s var(--ease) both; font-size: 15px;
}
.adb-modal__body { overflow-y: auto; padding: 18px 20px 22px; }
.adb-email { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.adb-email__row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.adb-email__row span { color: var(--fg-3); }
.adb-email__row b { font-weight: 600; word-break: break-word; }
.adb-email__body { padding: 16px 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--fg-1); font-family: var(--sans); margin: 0; }
.adb-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.adb-modal__note { font-size: 12.5px; color: var(--fg-3); margin-top: 10px; }
.adb-input { padding: 0 12px; background-image: none; }
.adb-form-row { display: grid; gap: 6px; margin-bottom: 12px; }
.adb-form-row label { font-size: 13px; font-weight: 600; }
.adb-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--fg-2); margin: 10px 0 4px; }
.adb-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.adb-btn[disabled] { opacity: .45; pointer-events: none; }

/* Creative preview (mock ad units, no real brand) */
.adb-adprev { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 380px; }
.adb-adprev__top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12.5px; }
.adb-adprev__top i { width: 28px; height: 28px; border-radius: 50%; background: var(--grad-soft); flex: none; }
.adb-adprev__top b { display: block; font-size: 13px; }
.adb-adprev__top small { color: var(--fg-3); font-size: 11px; }
.adb-adprev__text { padding: 0 12px 10px; font-size: 13px; color: var(--fg-1); }
.adb-adprev__media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; text-align: center; padding: 20px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 25% 20%, rgba(255,255,255,.28), transparent 45%), linear-gradient(140deg, #155C45, #3E9A72 55%, #E6B23E); }
.adb-adprev__media--video { aspect-ratio: 4 / 5; }
.adb-adprev__media strong { font-family: 'Montserrat', var(--sans); font-size: 20px; font-weight: 800; line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.adb-adprev__media .fmt { position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 10.5px; background: rgba(0,0,0,.35); padding: 3px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.adb-adprev__media .play { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.88); display: grid; place-items: center; bottom: 14px; right: 14px; }
.adb-adprev__media .play svg { width: 16px; height: 16px; color: var(--ink); margin-left: 3px; }
.adb-adprev__cta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #F4F5F2; font-size: 12.5px; }
.adb-adprev__cta b { font-size: 13.5px; display: block; }
.adb-adprev__cta span.btn-mock { background: #E4E6E1; border-radius: 6px; padding: 6px 10px; font-weight: 600; white-space: nowrap; }
.adb-serp { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-width: 520px; font-family: Arial, sans-serif; }
.adb-serp small { font-size: 12px; color: #202124; }
.adb-serp small b { font-weight: 700; margin-right: 6px; }
.adb-serp h5 { font-size: 18px; color: #1a0dab; font-weight: 400; margin: 4px 0; line-height: 1.3; }
.adb-serp p { font-size: 13.5px; color: #4d5156; line-height: 1.5; }

/* ---------- Toast ---------- */
.adb-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--sh-3); animation: adb-pop .2s var(--ease) both; max-width: calc(100% - 32px); }

.adb-disclaimer { margin-top: 56px; padding: 16px 18px; border-radius: 14px; background: var(--warn-bg); border: 1px solid #F1D9A0; font-size: 13.5px; color: #5E4300; }

@keyframes adb-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes adb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes adb-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes adb-pop { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.adb-toast { animation-name: adb-fade; }
@media (prefers-reduced-motion: reduce) {
  .adb *, .adb-drawer *, .adb-modal * { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .adb-kpis--secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .adb-kpis--budget { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .adb-grid--2, .adb-grid--uneven, .adb-grid--uneven-r { grid-template-columns: minmax(0, 1fr); }
  .adb-insights { grid-template-columns: minmax(0, 1fr); }
  .adb-kpis--primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adb-report__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .adb-filters { top: 76px; }
}
@media (max-width: 720px) {
  .adb { padding-top: 22px; }
  .adb-filters { padding: 8px 10px; margin-bottom: 22px; }
  .adb-filters__toggle { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 14px; font-weight: 600; padding: 6px 4px; }
  .adb-filters__toggle svg { width: 16px; height: 16px; }
  .adb-filters__summary { margin-left: auto; font-weight: 400; font-size: 12.5px; color: var(--fg-3); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }
  .adb-filters__body { display: none; padding-top: 10px; }
  .adb-filters.is-open .adb-filters__body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .adb-filters.is-open .adb-field--wide, .adb-filters.is-open #f-reset { grid-column: 1 / -1; }
  .adb-filters__period { display: none; }
  .adb-filters.is-open .adb-filters__period { display: block; }
  .adb-field { min-width: 0; }
  .adb-kpis--secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adb-kpis--budget { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adb-kpi__value { font-size: 22px; }
  .adb-chart__box { height: 230px; }
  .adb-chart__box--tall { height: 320px; }
  .adb-section { margin-top: 44px; scroll-margin-top: 140px; }
  .adb-search { min-width: 0; width: 100%; }
  .adb-section__head--row > .adb-field--inline { width: 100%; }
  .adb-section__head--row > .adb-field--inline select { flex: 1; }
  .adb-actions .adb-btn { flex: 1 1 calc(50% - 10px); }
  .adb-actions .adb-btn:first-child { flex-basis: 100%; }
  .adb-mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adb-impact__grid { grid-template-columns: 1fr; }
  .adb-funnel__row { grid-template-columns: 96px 1fr; gap: 8px; }
  .adb-funnel__rate { margin-left: 104px; }
  .adb-info__tip { left: auto; right: -10px; transform: none; }
  .adb-email__row { grid-template-columns: 58px 1fr; }
  .adb-table td.name { max-width: 170px; }
  .adb-table td.name small { white-space: normal; }
}
@media (max-width: 400px) {
  .adb-kpi { padding: 12px 12px 11px; }
  .adb-kpi__value { font-size: 19px; }
  .adb-kpis--secondary .adb-kpi__value { font-size: 17px; }
  .adb-actions .adb-btn { flex-basis: 100%; }
  .adb-filters.is-open .adb-filters__body { grid-template-columns: 1fr; }
}

/* ---------- Print: the report only ---------- */
@media print {
  body.adb-printing > *:not(main), body.adb-printing .adb-wrap > *:not(#report), body.adb-printing #report > *:not(.adb-report) { display: none !important; }
}
