/* Ads module */
.ads-loading { padding: 60px 0; text-align: center; color: var(--muted); }
.ads-card { margin-bottom: 16px; }
.ads-card h3 { margin: 0 0 12px; font-size: 15px; }
.ads-range { width: auto; padding: 8px 10px; font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.ads-nm { display: inline-block; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--paper); border: 1px dashed #c3cce0; border-radius: 6px; padding: 2px 7px; cursor: help; white-space: nowrap; letter-spacing: 0; }
.stat b .ads-nm { font-size: 13px; vertical-align: middle; }
.stat b small, .ads-t small { font-size: .55em; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.ads-t small { font-size: .8em; }
.ads-cur { margin-bottom: 4px; }
.ads-cur-h { font-weight: 800; margin-bottom: 8px; color: var(--navy); }
.ads-cur .stat, .ads-stats .stat { cursor: default; }
.ads-stats { margin-bottom: 14px; }

.ads-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.ads-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ads-t th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ads-t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ads-t tr:last-child td { border-bottom: 0; }
.ads-t tbody tr { cursor: pointer; }
.ads-t tbody tr:hover { background: #fafcff; }
.ads-t tbody tr.plain { cursor: default; }
.ads-t .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ads-t .nw { white-space: nowrap; }
.ads-log td { font-size: 13px; }
.ads-raw summary { cursor: pointer; color: var(--danger); font-size: 12px; font-weight: 700; margin-top: 4px; }
.ads-raw pre { white-space: pre-wrap; word-break: break-all; background: #1b1e2e; color: #dfe6f5; padding: 10px 12px; border-radius: 8px; font-size: 11.5px; margin: 6px 0 0; max-width: 640px; }

.ads-conn-h { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.ads-warn { background: #fff8ec; border: 1px solid #f6d9a8; color: #7a4b00; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.ads-warn.bad { background: #fff3f3; border-color: #f5c6c6; color: #8a1c1c; }
.ads-steps { margin: 0 0 14px; padding-left: 20px; color: var(--ink); font-size: 13.5px; }
.ads-steps li { margin-bottom: 5px; }
.ads-bind { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.ads-bind > div { min-width: 170px; }
.ads-bind .btn { margin-left: auto; }

.ads-safety { display: flex; flex-wrap: wrap; gap: 6px 30px; align-items: flex-end; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 14px 20px; margin-bottom: 16px; }
.ads-safety span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .65; }
.ads-safety b { font-size: 18px; }
.ads-safety em { display: block; font-style: normal; font-size: 11px; opacity: .6; }
.ads-safety p { flex-basis: 100%; margin: 8px 0 0; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; opacity: .9; }
.btn.ads-go { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ads-go:hover { background: #00a383; }
.btn.ads-kill { background: var(--danger); border-color: var(--danger); color: #fff; padding: 8px 18px; }
.btn.ads-kill:hover { background: #b82525; }

.ads-check { list-style: none; margin: 0 0 6px; padding: 0; }
.ads-check li { padding: 5px 0 5px 26px; position: relative; font-size: 13.5px; }
.ads-check li::before { position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.ads-check .yes::before { content: '✓'; background: var(--ok); }
.ads-check .no::before { content: '!'; background: var(--danger); }
.ads-check .hm::before { content: 'i'; background: #e58e26; }

/* charts: one measure each, thin bars, 2px gaps, rounded data-ends on the baseline */
.ads-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.ads-chart { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 8px; min-width: 0; }
.ads-chart-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.ads-plot { display: flex; align-items: flex-end; gap: 2px; height: 110px; border-bottom: 1px solid #cfd6e6; }
.ads-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 3px; }
.ads-col i { display: block; width: 100%; max-width: 22px; background: #0089f7; border-radius: 4px 4px 0 0; }
.ads-col:hover { background: rgba(13, 15, 57, .05); }
.ads-col:hover i { background: #0d0f39; }
.ads-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding-top: 4px; }
.ads-tip { position: fixed; z-index: 900; background: #0d0f39; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 7px; pointer-events: none; white-space: nowrap; }
.ads-days summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--bright); padding: 6px 0; }

.ads-prop-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-left: 4px solid #0089f7; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; flex-wrap: wrap; }
.ads-prop-row.money { border-left-color: var(--orange); }
.ads-prop-main { flex: 1; min-width: 240px; }
.ads-prop-t { display: flex; gap: 6px; margin-bottom: 5px; }
.ads-copy { background: var(--paper); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; margin: 6px 0; white-space: normal; }
.ads-copy b { display: block; margin-bottom: 3px; }

.ads-set { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.ads-set-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.chip.ads-sug { border-style: dashed; color: var(--muted); }
.ads-crs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ads-cr { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.ads-cr-img { aspect-ratio: 1.6; background: var(--paper); display: grid; place-items: center; overflow: hidden; }
.ads-cr-img.big { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; }
.ads-cr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ads-noimg { text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; padding: 14px; }
.ads-noimg span { display: block; font-weight: 500; font-size: 12px; margin-top: 6px; }
.ads-cr-b { padding: 12px 14px 14px; }
.ads-cr-top { display: flex; gap: 6px; flex-wrap: wrap; }
.ads-adrow { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.ads-rej { color: #8a1c1c; background: #fff3f3; border-radius: 7px; padding: 6px 9px; font-size: 12.5px; margin-top: 5px; }
.ads-plan summary { cursor: pointer; }
.ads-ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.ads-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* new campaign */
.ads-obj { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.ads-objb { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: .12s; }
.ads-objb b { display: block; font-size: 13.5px; }
.ads-objb span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.ads-objb.on { border-color: var(--bright); background: #f1f8ff; box-shadow: 0 0 0 3px rgba(0, 137, 247, .12); }
.ads-prop-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ads-prop-h h3 { margin: 2px 0 0; font-size: 17px; }
.ads-prop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: var(--paper); border-radius: 10px; padding: 12px 14px; }
.ads-prop-grid b { font-size: 16px; }
.ads-prop-set, .ads-prop-cr { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.ads-prop-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; cursor: pointer; }
.ads-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 190px; overflow: auto; }
.ads-res { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.ads-res:hover { border-color: var(--bright); background: #f1f8ff; }
.ads-res span { color: var(--muted); font-size: 12px; }
.ads-toggle { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }

@media (max-width: 760px) {
  .ads-log thead { display: none; }
  .ads-log tbody tr { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .ads-log td { display: inline; border: 0; padding: 0 8px 0 0; }
  .ads-log td:last-child { display: block; padding-top: 4px; }
  .ads-charts, .ads-two, .ads-prop-grid { grid-template-columns: 1fr; }
  .ads-bind { gap: 14px; } .ads-bind .btn { margin-left: 0; }
  .ads-safety { gap: 10px 22px; } .ads-safety b { font-size: 16px; }
  .ads-crs { grid-template-columns: 1fr; }
}

/* ---------- live reporting ---------- */
.ads-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ads-bar .spacer { flex: 1; }
.ads-date { width: auto; padding: 7px 9px; }
.ads-busy { opacity: .55; pointer-events: none; transition: opacity .15s; }
.ads-out { color: #8a1c1c; background: #fff3f3; border-radius: 6px; padding: 2px 7px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.ads-rl { display: block; font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.ads-rephead { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.ads-crumbs { font-weight: 800; font-size: 14px; }
.ads-crumbs a { cursor: pointer; }
.ads-repctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ads-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ads-tabs button { border: 0; background: #fff; padding: 7px 13px; font-weight: 700; cursor: pointer; font-size: 13px; color: var(--muted); }
.ads-tabs button + button { border-left: 1px solid var(--line); }
.ads-tabs button.on { background: var(--navy); color: #fff; }
.ads-q { width: 170px; padding: 7px 10px; }
.ads-rep th.sortable { cursor: pointer; user-select: none; }
.ads-rep th.sorted { color: var(--navy); }
.ads-rep td.ads-name { min-width: 230px; max-width: 340px; position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.ads-rep thead th:first-child { position: sticky; left: 0; background: #fff; z-index: 2; }
.ads-rep td.ads-name a { color: inherit; cursor: pointer; display: block; }
.ads-rep td.ads-name a:hover b { color: var(--bright); text-decoration: underline; }
.ads-namein { display: flex; gap: 10px; align-items: flex-start; }
.ads-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: var(--paper); }
.ads-adtext { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.ads-total td { background: var(--paper); font-weight: 800; border-bottom: 0; }
.ads-rep tr.ads-total td.ads-name, .ads-total td:first-child { background: var(--paper); }
.ads-share { height: 8px; background: var(--paper); border-radius: 4px; overflow: hidden; min-width: 90px; }
.ads-share i { display: block; height: 100%; background: #0089f7; border-radius: 4px; }
.ads-safety em { max-width: 260px; }
@media (max-width: 760px) { .ads-rep td.ads-name { min-width: 170px; max-width: 220px; } .ads-q { width: 130px; } }
@media print {
  .side, .topbar, .ads-noprint, #netbar, .btn { display: none !important; }
  .app, .main, .content { display: block !important; padding: 0 !important; margin: 0 !important; overflow: visible !important; height: auto !important; }
  body { background: #fff; }
  .ads-scroll { overflow: visible; }
  .ads-rep td.ads-name, .ads-rep thead th:first-child { position: static; box-shadow: none; }
  .ads-t { font-size: 10.5px; } .ads-t td, .ads-t th { padding: 5px 6px; }
  .ads-safety { background: #fff; color: #000; border: 1px solid #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { break-inside: avoid; border-color: #bbb; } .ads-col i, .ads-share i, .badge.st { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- AI second opinion ---------- */
.ads-ai { border-color: #cdbff7; background: linear-gradient(180deg, #faf8ff 0, #fff 120px); }
.ads-ai-intro { margin: 0 0 12px; max-width: 860px; }
.ads-verdict { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.ads-verdict b { display: block; font-size: 15px; margin-bottom: 2px; }
.ads-verdict.ok { background: #effbf6; border-color: #b9ebd6; } .ads-verdict.ok b { color: #067a5b; }
.ads-verdict.warn { background: #fff8ec; border-color: #f6d9a8; } .ads-verdict.warn b { color: #8a5400; }
.ads-verdict.bad { background: #fff3f3; border-color: #f5c6c6; } .ads-verdict.bad b { color: #8a1c1c; }
.ads-verdict.idea { background: #f3f0ff; border-color: #d6ccfa; } .ads-verdict.idea b { color: #4b32b8; }
.ads-fc { display: flex; flex-wrap: wrap; gap: 6px 34px; background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.ads-fc span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ads-fc b { font-size: 18px; color: var(--navy); } .ads-fc em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.ads-fc p { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.ads-sevh { margin: 14px 0 6px; } .ads-sevh.bad { color: #b02525; } .ads-sevh.warn { color: #a86400; } .ads-sevh.idea { color: #4b32b8; }
.ads-pt { border: 1px solid var(--line); border-left: 4px solid #8395a7; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.ads-pt.bad { border-left-color: var(--danger); } .ads-pt.warn { border-left-color: #e58e26; } .ads-pt.idea { border-left-color: #6c5ce7; } .ads-pt.ok { border-left-color: var(--ok); }
.ads-pt-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.ads-n { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; flex: none; }
.ads-fix { margin-top: 6px; background: var(--paper); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; }
.ads-crv { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; margin-top: 6px; }
.ads-crvi { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
.ads-crvi > img, .ads-crvi > .ads-noimg { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; flex: none; background: var(--paper); padding: 0; display: grid; place-items: center; font-size: 11px; }
.ads-crvb { min-width: 0; flex: 1; } .ads-crvb .ads-copy { margin: 8px 0 6px; }
.ads-next { border: 1px dashed #b9a8f5; border-radius: 10px; padding: 12px 14px; background: #fbfaff; }
.ads-chat { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 10px; }
.ads-chat .ads-q, .ads-chat .ads-a { border-radius: 12px; padding: 9px 13px; max-width: 880px; font-size: 13.5px; }
.ads-chat .ads-q { background: var(--navy); color: #fff; align-self: flex-end; }
.ads-chat .ads-a { background: var(--paper); border: 1px solid var(--line); align-self: flex-start; }
.ads-chat b { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
.ads-ask { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.ads-ask textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; outline: 0; min-height: 44px; }
.ads-ask textarea:focus { border-color: #6c5ce7; box-shadow: 0 0 0 3px rgba(108, 92, 231, .15); }
@media (max-width: 760px) { .ads-crv { grid-template-columns: 1fr; } .ads-ask { flex-direction: column; align-items: stretch; } }

/* city picker */
.ads-cp .cp-row { display: flex; gap: 6px; margin-top: 8px; }
.ads-cp .cp-quick { margin-top: 8px; }
.ads-cp .chip small { opacity: .75; font-weight: 600; }
.ads-cp .cp-quick .chip { font-size: 12px; padding: 3px 9px; }

.ads-pick { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 6px; }
.ads-pick .lbl { min-width: 62px; }
.ads-pick .chip { font-size: 12px; padding: 3px 9px; }
.chip.ads-off { text-decoration: line-through; opacity: .5; }

/* saved audiences + recommendations */
.ads-from { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--paper); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }
.chip.ads-beh { background: #4b32b8; border-color: #4b32b8; }
.chip.ads-cus { background: #00856a; border-color: #00856a; }
.ads-aud { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 8px; background: #fff; }
.ads-aud-b { min-width: 0; flex: 1; }
.ads-aud-a { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; }
.ads-aud .chip { font-size: 12px; padding: 3px 9px; }
@media (max-width: 640px) { .ads-aud { flex-direction: column; } .ads-aud-a { flex-direction: row; flex-wrap: wrap; } }

/* the AI is working */
.ads-wait { display: flex; gap: 14px; align-items: flex-start; background: #f3f0ff; border: 1px solid #d6ccfa; border-radius: 12px; padding: 14px 16px; margin: 4px 0 12px; }
.ads-wait-b { flex: 1; min-width: 0; }
.ads-wait-b > b { display: block; color: #4b32b8; font-size: 14.5px; }
.ads-wait-s { font-size: 13.5px; margin-top: 2px; }
.ads-wait-bar { height: 8px; background: #e2dbfb; border-radius: 4px; overflow: hidden; margin: 9px 0 6px; }
.ads-wait-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6c5ce7, #0089f7); border-radius: 4px; transition: width .5s linear; }
.ads-wait-t { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ads-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #d6ccfa; border-top-color: #6c5ce7; animation: ads-spin .9s linear infinite; flex: none; margin-top: 2px; }
@keyframes ads-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ads-spin { animation-duration: 3s; } }

.ads-fb { border-color: #bcd5ff; background: linear-gradient(180deg, #f3f8ff 0, #fff 100px); }
.btn.ads-fbbtn { background: #1877f2; border-color: #1877f2; color: #fff; padding: 10px 18px; flex: none; }
.btn.ads-fbbtn:hover { background: #1464d6; }

/* publishing */
.pub-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pub-ctl .ads-range { width: auto; }
#dPublish .ads-check li { padding-top: 3px; padding-bottom: 3px; }

/* placements picker */
.ads-plc-modes { display: grid; gap: 6px; }
.ads-plc-mode { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.ads-plc-mode.on { border-color: var(--accent); background: #f1f5ff; }
.ads-plc-mode input { margin-top: 3px; }
.ads-plc-mode div { display: grid; gap: 2px; }
.ads-plc-mode span { color: var(--muted); font-size: 12.5px; }
.ads-plc-manual { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.ads-plc-presets { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 10px; }
.ads-plc-presets .lbl { min-width: 72px; }
.ads-plc-presets .chip { font-size: 12px; }
.ads-plc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.ads-plc-col { display: grid; gap: 3px; align-content: start; }
.ads-plc-plat { display: flex; gap: 6px; align-items: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 3px; cursor: pointer; }
.ads-plc-pos { display: flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; padding-left: 4px; }
.ads-plc-ai { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.chip.ads-plc-chip { background: #0a6b5c; border-color: #0a6b5c; }
.chip.ads-plc-auto { background: #5b6b7a; border-color: #5b6b7a; }
.ads-plc input[type="radio"], .ads-plc input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; accent-color: var(--accent, #2b5cff); }
.ads-plc-mode input { margin-top: 3px; }
.ads-plc-mode div { flex: 1; }

/* leads + instant forms */
.ads-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ads-kpi { background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ads-kpi .k { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ads-kpi b { font-size: 22px; }
.ads-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ads-acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ads-acc { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.ads-acc:hover { border-color: var(--accent, #2b5cff); }
.leads-t td { vertical-align: top; }
.leads-t .lead-st { font-size: 12px; padding: 3px 6px; border-width: 2px; min-width: 110px; }
.leads-t .lead-note { font-size: 12px; padding: 4px 6px; min-width: 140px; }
tr.lead-new td { background: #f3f8ff; }
.lead-wa { display: inline-block; font-size: 10px; font-weight: 900; color: #fff; background: #25d366; border-radius: 99px; padding: 1px 6px; text-decoration: none; vertical-align: middle; }
.lf-cur { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.lf-pick { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 12px; }
.lf-pick > div { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.lf-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.lf-prev { position: sticky; top: 0; }
.lf-q { display: grid; grid-template-columns: 150px 1fr 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.lf-q select, .lf-q input { font-size: 13px; padding: 6px 8px; }
.lf-phone { width: 100%; max-width: 320px; margin: 0 auto; background: #f3f4f6; border: 10px solid #111; border-radius: 28px; padding: 10px; font-size: 13px; color: #111; }
.lf-ph-h { display: flex; gap: 8px; align-items: center; padding: 4px 6px 10px; }
.lf-ph-av { width: 26px; height: 26px; border-radius: 50%; background: #1877f2; display: inline-block; }
.lf-ph-card { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.lf-ph-t { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.lf-ph-card ul { margin: 0 0 8px; padding-inline-start: 18px; }
.lf-ph-q { margin: 8px 0; }
.lf-ph-in { border: 1px solid #d1d5db; border-radius: 6px; height: 30px; margin-top: 3px; }
.lf-ph-in.pre { color: #9ca3af; font-size: 12px; padding: 6px 8px; height: auto; background: #f9fafb; }
.lf-ph-opts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.lf-ph-opts span { border: 1px solid #d1d5db; border-radius: 99px; padding: 2px 9px; font-size: 12px; }
.lf-ph-pp { color: #1877f2; font-size: 12px; margin: 8px 0; text-decoration: underline; }
.lf-ph-btn { background: #1877f2; color: #fff; text-align: center; border-radius: 8px; padding: 8px; font-weight: 700; margin-top: 8px; }
.lf-ph-btn.ghost { background: #e5e7eb; color: #111; }
@media (max-width: 860px) { .lf-wrap, .lf-pick { grid-template-columns: 1fr; } .lf-prev { position: static; } .lf-q { grid-template-columns: 1fr 1fr; } }

/* pixel card */
.px-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; }
.px-ev { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 4px 0; font-size: 13px; }
.px-code { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; position: relative; }
.px-code .btn { position: absolute; top: 6px; right: 6px; }
.px-live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; margin-right: 6px; }
.px-live.on { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }

/* ad score */
.ads-score { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0 12px; }
.ads-score-n { font-size: 40px; font-weight: 900; line-height: 1; display: grid; }
.ads-score-n span { font-size: 16px; color: var(--muted); font-weight: 700; }
.ads-score-n em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.ads-score-row { display: grid; grid-template-columns: 80px 1fr 42px; gap: 8px; align-items: center; font-size: 12.5px; margin: 3px 0; }
.ads-score-row i { display: block; height: 8px; border-radius: 99px; background: #e9edf5; overflow: hidden; }
.ads-score-row b { display: block; height: 100%; border-radius: 99px; }
.ads-score-row small { color: var(--muted); text-align: right; }
.badge.ads-scoreb { color: #fff; font-weight: 900; }
.ads-done { margin-top: 12px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.ads-done summary { cursor: pointer; font-weight: 700; font-size: 13px; color: #067a5b; }
.ads-pt.done { opacity: .75; border-left-color: #00b894; }
@media (max-width: 700px) { .ads-score { grid-template-columns: 1fr; } }

/* design library */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ds-card { background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ds-card.off { opacity: .55; }
.ds-img { position: relative; aspect-ratio: 1 / 1; background: #0f172a; display: grid; place-items: center; }
.ds-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-novid { color: #cbd5e1; font-weight: 800; font-size: 20px; }
.ds-score { position: absolute; top: 8px; left: 8px; color: #fff; font-weight: 900; font-size: 12px; border-radius: 99px; padding: 2px 8px; }
.ds-kind, .ds-used { position: absolute; bottom: 8px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 99px; padding: 2px 8px; }
.ds-kind { left: 8px; } .ds-used { right: 8px; }
.ds-b { padding: 10px 12px; display: grid; gap: 4px; }
.ds-name { font-weight: 800; border: none; background: transparent; padding: 0; width: 100%; font-size: 14px; }
.ds-name:focus { outline: none; border-bottom: 1px dashed var(--accent, #2b5cff); }
.ds-tags { font-size: 12px; padding: 5px 8px; margin-top: 4px; }
.ds-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); margin-bottom: 14px; font-size: 13px; }
.ds-drop.on { border-color: var(--accent, #2b5cff); background: #f1f5ff; color: var(--accent, #2b5cff); }
.ds-drop.hidden { display: none; }
.ds-pick { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.ds-pick-img { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #0f172a; }
.ds-pick-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ads-prop-cr.has-img { display: grid; grid-template-columns: 130px 1fr; gap: 14px; }
.ads-prop-img { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #0f172a; }
.ads-prop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) { .ds-pick, .ads-prop-cr.has-img { grid-template-columns: 1fr; } }

.ds-sel { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(255,255,255,.92); border-radius: 6px; padding: 3px; display: flex; }
.ds-sel input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, #2b5cff); }
.ds-card.selected { outline: 3px solid var(--accent, #2b5cff); outline-offset: -1px; }
.ds-bar { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; background: var(--paper, #fff); }

.ads-brief-h { margin-top: 8px; border: 1px solid #b9ebd6; background: #effbf6; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.ads-brief-h.warn { border-color: #f6d9a8; background: #fff8ec; }
.ads-brief-h .small { margin-top: 3px; }

.ads-swap { display: grid; grid-template-columns: 96px 1fr; gap: 10px; margin-top: 6px; align-items: start; }
.ads-swap img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }

/* boost an existing post: picker grid */
.ads-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ads-post { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; }
.ads-post:hover { border-color: var(--accent); transform: translateY(-1px); }
.ads-post.used { opacity: .55; cursor: default; }
.ads-post .im { aspect-ratio: 1; background: var(--paper); display: grid; place-items: center; }
.ads-post .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ads-post .tx { padding: 8px 8px 4px; font-size: 12px; line-height: 1.35; max-height: 54px; overflow: hidden; }
.ads-post .mt { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 0 8px 8px; }

.ads-boost { border-left: 4px solid #6c5ce7; }
.ads-boost .ads-ul li { margin: 4px 0; }

.ads-post.picked { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,.35); position: relative; }
.ads-post.picked::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* compact, no-wrap tables on laptop widths */
.ads-t .badge { white-space: nowrap; }
.ads-t td:first-child { min-width: 190px; }
.ads-t td .ads-out { white-space: nowrap; }
@media (max-width: 1500px) {
  .ads-t th, .ads-t td { padding-left: 7px; padding-right: 7px; }
  .ads-t th { letter-spacing: .04em; font-size: 10.5px; }
  .ads-t td { font-size: 13px; }
}
