/* AK LEADS Connect — Menus step 4 · Admin (People & teams, Account access, Tracking & data).
   Loads after leads.css; reuses menus.css (fields, fbar, glist, picked-bar, steps, tiles), email.css (.emp panel, .chip, .fold-sec), leads.css. Tokens only. */

.ad-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.linkbtn.strong { font-weight: 650; font-size: var(--fs-md); text-decoration: none; }
.linkbtn.strong:hover { text-decoration: underline; }
.tools { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tools .tag { margin: 0; }
.tag.t-super { border-color: color-mix(in oklch, var(--accent) 55%, var(--line)); color: var(--text); }
/* mid-size panel (Add someone, Create ad accounts, Create team) */
.emp-mid { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 32px)); max-height: 92vh; }

/* person page */
.pp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.avatar.big { width: 48px; height: 48px; font-size: 18px; flex: none; }
.pp-id { flex: 1 1 260px; min-width: 0; display: grid; gap: 6px; }
.pp-id > b { overflow-wrap: anywhere; }
.pp-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-tog { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tog .chip { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.chip-tog .chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip-tog .chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-tog .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-tog .chip:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.pp-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.pp-two .pchips { max-height: none; }

/* teams */
.tm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; align-items: start; }
.tm-grid .sub-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-grid .row .select.w-mid { width: 130px; }
.small-rows .row { padding: 6px 0; }
.danger-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* access sharing tree */
.ax-ids { margin-bottom: 10px; }
.ax-tree { max-height: 520px; overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.ax-tree td:first-child, .ax-tree th:first-child { width: 40px; }
.ax-tree input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--text); }
.ax-tree tr.on td { background: color-mix(in oklch, var(--text) 6%, var(--bg-2)); }
.ax-bm { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text); padding: 0; font-size: var(--fs-sm); }
.ax-bm svg { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.ax-bm[aria-expanded="false"] svg { transform: rotate(-90deg); }
.rn-one { display: flex; align-items: center; gap: 6px; }
.rn-one .input { height: 32px; min-width: 220px; }

/* tracking domains */
.dl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.dl-top .small { flex: 1 1 260px; }

/* data refresh */
.dr-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); margin-bottom: 12px; }
.dr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dr-sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dr-sw.quick, .dr-cell.quick { background: color-mix(in oklch, var(--info) 22%, var(--bg-2)); }
.dr-sw.full, .dr-cell.full { background: color-mix(in oklch, var(--info) 48%, var(--bg-2)); }
.dr-sw.deep, .dr-cell.deep { background: var(--text); color: var(--bg); }
.dr-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin: 14px 0 10px; }
.dr-cell { display: grid; gap: 2px; justify-items: center; padding: 8px 2px; min-height: 52px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font-size: 11px; }
.dr-cell b { font-size: 11px; font-weight: 650; }
.dr-cell span { color: inherit; opacity: .8; }
.dr-cell.off b { color: var(--muted); font-weight: 500; }
.dr-cell:hover { border-color: var(--text); }
.dr-sum { margin: 0 0 4px; font-size: var(--fs-md); }
.live-run .spin-dot { vertical-align: -2px; }

@media (max-width: 1024px) {
  .tm-grid, .pp-two { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .emp-mid { inset: 0; top: 0; left: 0; width: auto; max-height: none; transform: none; border-radius: 0; border: 0; }
  .dr-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dr-cell { min-height: 56px; }
  .rn-one .input { min-width: 160px; }
  .pp-acts .btn, .ad-top .btn { min-height: 44px; }
  .chip-tog .chip { height: 44px; }
}

/* ── Feedback round · shared tree picker (source → Business Manager / Center → account) ── */
.emp-wide { width: min(980px, calc(100vw - 32px)); }
.tp-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 12px; padding: 0; font-size: var(--fs-xs); }
.tp-steps li { padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); }
.tp-steps li[aria-current] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 650; }
.tp-f .search-wrap { flex: 1 1 240px; }
.tp-f .select { width: auto; max-width: 240px; }
.tp-tree { max-height: 520px; overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--bg); }
.emp .tp-tree { max-height: none; }
.tp-h { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 4px; }
.tp-h1 { position: sticky; top: 0; z-index: 2; background: var(--bg-3); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-md); }
.tp-h2 { padding-left: 24px; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.tp-fold { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); }
.tp-fold:hover { background: var(--bg-4); color: var(--text); }
.tp-fold svg { width: 14px; height: 14px; transition: transform .15s; }
.tp-fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.tp-ck { display: inline-flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.tp-ck b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp input[type="checkbox"] { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--text); }
.tp-kind { margin: 0 0 0 4px; font-size: 10px; }
.tp-n { margin-left: auto; font-size: var(--fs-xs); white-space: nowrap; }
.tp-accs { list-style: none; margin: 0; padding: 0; }
.tp-acc { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px 6px 62px; border-bottom: 1px solid var(--line-soft); cursor: pointer; font-size: var(--fs-sm); }
.tp-acc:hover { background: var(--bg-2); }
.tp-acc.on { background: color-mix(in oklch, var(--text) 6%, var(--bg)); }
.tp-acc.rem { background: color-mix(in oklch, var(--warn-c) 8%, var(--bg)); }
.tp-m { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.tp-m b { font-weight: 550; overflow-wrap: anywhere; }
.tp-m small { color: var(--muted); font-size: var(--fs-xs); }
.tp-acc .pill { flex: none; }
.tp-bar .pb-l { flex: 1 1 260px; }
.tp-bar .pb-a { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.tp-rv-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.tp-rv { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.tp-rv h4 { margin: 0 0 8px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.tp-rv.add h4 { color: var(--pos); } .tp-rv.rem h4 { color: var(--warn-c); }
.tp-rv-g { margin-bottom: 10px; font-size: var(--fs-sm); }
.tp-rv-g ul { margin: 4px 0 0; padding-left: 18px; }
.tp-rv-g li { margin: 2px 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .emp-wide { width: auto; }
  .tp-f .select { max-width: none; flex: 1 1 100%; height: 44px; }
  .tp-h, .tp-acc { min-height: 44px; }
  .tp-fold { width: 40px; height: 40px; }
  .tp-h2 { padding-left: 8px; }
  .tp-acc { padding-left: 16px; flex-wrap: wrap; }
  .tp-kind { display: none; }
  .tp-tree { max-height: 60vh; }
  .tp-rv-wrap { grid-template-columns: 1fr; }
}
.tp-bar .pb-l { white-space: normal; }

/* ── Feedback round · Pixels v2 ── */
.px-g { margin-bottom: 12px; }
.px-g .sub-h { display: flex; align-items: center; gap: 8px; }
.px-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.px-chips .tag { margin: 0; }

/* ── Feedback round · Dead-link guard card ── */
.gd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.gd-sw { display: inline-flex; align-items: center; gap: 10px; }
.gd-sw span { display: grid; line-height: 1.25; }
.gd-sw small { color: var(--muted); font-size: var(--fs-xs); }
.gd-stat { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.gd-flow { list-style: none; counter-reset: gd; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; padding: 0; }
.gd-flow li { counter-increment: gd; display: grid; gap: 4px; align-content: start; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--bg); font-size: var(--fs-sm); line-height: 1.45; }
.gd-flow li b::before { content: counter(gd) " · "; color: var(--muted); font-weight: 500; }
.gd-flow li span { color: var(--muted); }
.gd-plat { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gd-t tr.off td:not(:first-child) { color: var(--muted); }
.gd-log .gd-k { flex: none; min-width: 72px; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: var(--fs-xs); text-align: center; }
.gd-k.pause { border-color: color-mix(in oklch, var(--neg) 50%, var(--line)); color: var(--neg); }
.gd-k.resume { border-color: color-mix(in oklch, var(--pos) 50%, var(--line)); color: var(--pos); }

/* ── Feedback round · Alerts ── */
.al-chs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; align-items: start; }
.al-c { padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--bg); min-width: 0; }
.al-ch { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.al-ch .muted { margin-left: auto; }
.al-c .btn-row { flex-wrap: wrap; align-items: center; }
.al-m td, .al-m th { vertical-align: middle; }
.al-m th:not(.l), .al-m td:not(.l) { text-align: center; }
.al-ck { display: inline-grid; place-items: center; width: 36px; height: 36px; cursor: pointer; }
.al-ck input { width: 18px; height: 18px; accent-color: var(--text); margin: 0; }
.al-ck input:disabled { opacity: .35; }
.al-pct { display: inline-block; width: auto; height: 26px; padding: 0 24px 0 8px; font-size: var(--fs-xs); }
.al-q { display: grid; gap: 12px; }
/* People & teams (live) */
.tm-row { flex-wrap: wrap; align-items: center; }
.tm-row .select, .tm-row .input { width: auto; flex: 1 1 200px; max-width: 340px; }
.tbl .select { width: auto; min-width: 120px; }
details > .tp-tree { margin: 8px 0; max-height: 360px; }
/* Alerts (live, read-only) */
.al-src { align-items: center; gap: 12px; }
.al-src .row-m small { display: block; }
.al-st { display: grid; justify-items: end; gap: 2px; flex: none; min-width: 130px; text-align: right; }
.al-st small { color: var(--muted); font-size: var(--fs-xs); }
.al-off { opacity: .6; pointer-events: none; margin-top: 12px; }
.al-hist { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

@media (max-width: 1024px) {
  .gd-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al-chs { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .al-src { flex-wrap: wrap; }
  .al-st { justify-items: start; text-align: left; min-width: 0; }
  .gd-flow { grid-template-columns: 1fr; }
  .gd-stat { margin-left: 0; }
  .gd-top .seg { width: 100%; }
  .gd-top .seg button { flex: 1; min-height: 44px; }
  .al-ck { width: 44px; height: 44px; }
  .px-chips .tag { font-size: 10px; }
}
