/* TikTok launcher: the campaigns grid (lg-), accounts (la-), the Smart+ launch
   form (ln-), launches (lb-, lh-). Uses the panel tokens from app.css. */

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.lg-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.lg-linkbtn:hover { text-decoration: underline; }

/* ── Grid ─────────────────────────────────────────────────────────────── */
.lg { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lg-headacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-toolbar input[type=search] { width: 260px; max-width: 100%; margin-left: auto; }
.lg-acc { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; max-width: 320px; }
.lg-acc:hover { background: var(--surface-2); }
.lg-acc svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.lg-acc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-accpop { position: absolute; z-index: 60; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14); display: flex; flex-direction: column; }
.lg-accpop__q { margin: 8px; width: calc(100% - 16px) !important; }
.lg-accpop__list { max-height: 320px; overflow-y: auto; padding: 0 4px; }
.lg-accpop__item { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.lg-accpop__item:hover { background: var(--surface-2); }
.lg-accpop__item input { margin-top: 3px; }
.lg-accpop__item small { display: block; color: var(--muted); font-size: 11.5px; }
.lg-accpop__foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }

.lg-levels { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lg-level { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.lg-level:hover { color: var(--text); }
.lg-level.is-on { color: var(--text); border-bottom-color: var(--accent); }
.lg-level__chip { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.lg-scope { margin-left: auto; padding: 0 4px 9px; }

.lg-selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); }
.lg-selbar b { margin-right: 6px; font-size: 13.5px; }
.lg-banner { padding: 7px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; text-align: center; }

.lg-wrap { overflow: auto; max-height: calc(100vh - 300px); min-height: 240px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.lg-table { table-layout: fixed; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.lg-table th, .lg-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
  overflow: hidden; text-overflow: ellipsis; }
.lg-table thead th { position: sticky; top: 0; z-index: 3; color: var(--muted); font-weight: 500; font-size: 12px; }
.lg-table thead tr.lg-total th { top: 33px; color: var(--text); font-weight: 600; font-size: 12.5px; background: var(--surface-2); }
.lg-table td.num, .lg-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lg-table .lg-stick1, .lg-table .lg-stick2, .lg-table .lg-stick3 { position: sticky; z-index: 2; }
.lg-table thead .lg-stick1, .lg-table thead .lg-stick2, .lg-table thead .lg-stick3 { z-index: 4; }
.lg-stick1 { left: 0; width: 36px; min-width: 36px; }
.lg-stick2 { left: 36px; width: 46px; min-width: 46px; }
.lg-stick3 { left: 82px; box-shadow: 1px 0 0 var(--line); }
.lg-pick input { width: 15px; height: 15px; cursor: pointer; }
.lg-sw { text-align: center !important; }
.lg-namebox { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lg-nm { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; font: inherit; font-weight: 500; color: var(--text);
  border: 0; background: none; padding: 0; white-space: nowrap; }
button.lg-drill { cursor: pointer; }
button.lg-drill:hover { color: var(--accent); text-decoration: underline; }
.lg-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.lg-tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 10.5px; }
.lg-dlv { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.lg-dlv::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.lg-dlv.is-off::before { background: var(--axis); }
.lg-dlv.is-off { color: var(--muted); }
.lg-dlv.is-warn::before { background: var(--orange); }
.lg-dlv.is-bad::before { background: var(--red); }
.lg-dlv.is-bad { color: var(--red); }
.lg-zero { color: var(--muted); opacity: .7; }
.lg-date { color: var(--muted); font-size: 12px; }
.lg-edit { border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; padding: 0; border-bottom: 1px dashed var(--muted); font-variant-numeric: tabular-nums; }
.lg-edit:hover { color: var(--accent); border-color: var(--accent); }
/* Row tints are layered over an opaque base: the sticky left columns must never let
   the scrolled cells show through (accent-soft is translucent in the dark theme). */
.lg-table tbody tr:hover td { background: var(--surface-2); }
.lg-table tbody tr.is-picked td { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.lg-table tbody tr.is-picked:hover td { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface-2); }
.lg-table tbody tr.is-off .lg-nm { color: var(--muted); }
.lg-table thead th { position: sticky; }
.lg-rz { position: absolute; top: 0; right: 0; width: 9px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
.lg-rz::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: 3px; width: 2px; border-radius: 1px; background: var(--line); }
.lg-rz:hover::after, .lg-rz:focus-visible::after, .lg-resizing .lg-rz.is-on::after { background: var(--accent); }
.lg-rz:focus-visible { outline: none; }
.lg-resizing, .lg-resizing * { cursor: col-resize !important; user-select: none !important; }
.lg-sortable button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-sortable button:hover, .lg-sortable.is-sorted button { color: var(--text); }
.lg-sortable i { font-style: normal; color: var(--accent); }
.lg-table.is-loading tbody { opacity: .45; transition: opacity .15s; }
.lg-loading { text-align: center !important; color: var(--muted); padding: 36px 12px !important; white-space: normal !important; }
.lg-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.lg-pager { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.lg-pg { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.lg-pg:hover:not(:disabled) { background: var(--surface-2); }
.lg-pg.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lg-pg:disabled { opacity: .4; cursor: default; }
.lg-gap { color: var(--muted); padding: 0 2px; }
.lg-size { display: inline-flex; align-items: center; gap: 6px; }
.lg-size select { width: auto; padding: 4px 8px; }

/* ── Accounts ─────────────────────────────────────────────────────────── */
.la-intro p { margin: 0 0 6px; font-size: 13.5px; max-width: 900px; }
.la-task { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.la-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0 10px; }
.la-toolbar input[type=search] { width: 320px; max-width: 100%; }
.la-selbar { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.la-conn { margin-bottom: 14px; }
.la-table td { vertical-align: middle; }
.la-swcol { width: 90px; text-align: center !important; }
.la-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--axis); margin-right: 6px; vertical-align: middle; }
.la-dot.is-ok { background: var(--green); }
.la-dot.is-err { background: var(--red); }
.la-dot.is-run { background: var(--accent); animation: la-pulse 1s infinite alternate; }
@keyframes la-pulse { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .la-dot.is-run { animation: none; } }

/* ── Launch form ──────────────────────────────────────────────────────── */
.ln { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-top: 14px; }
.ln-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ln-step h2 { font-size: 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ln-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 12px; }
.ln-row .lc-field { min-width: 180px; }
.ln-narrow { max-width: 150px; min-width: 120px !important; }
.ln-chips-row { align-items: flex-start; }
.ln-checks { gap: 18px; }
.ln-copied { padding: 10px 14px; border-radius: 8px; background: var(--info-bg); color: var(--info-ink); font-size: 13.5px; }
.ln-demo { font-size: 13px; color: var(--orange); margin: 0; }
.ln-step__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ln-step__head h2 { margin-bottom: 6px; }
.ln-lead { margin: 0 0 10px; }
/* Account picker: a dense list, the whole row toggles; ★ — the person's favourites first */
.ln-accbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ln-accbar input[type=search] { flex: 1 1 240px; min-width: 0; }
.ln-accbar select { width: auto; }
.ln-accbar .seg b { font-weight: 600; font-size: 11.5px; color: var(--muted); margin-left: 3px; }
.ln-acchead { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line);
  border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface-2); font-size: 13px; }
.ln-acchead select { width: auto; height: 30px; padding: 0 8px; margin-left: auto; font-size: 12.5px; }
.ln-acchead__note { flex: 1 1 100%; }
.ln-acchead__note:empty { display: none; }
.ln-acclist { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-bottom: 10px; background: var(--surface); }
.ln-acc { display: grid; grid-template-columns: 16px 20px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 6px 10px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.ln-acc:last-child { border-bottom: 0; }
.ln-acc:hover { background: var(--surface-2); }
.ln-acc.is-on { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.ln-acc.is-dim .ln-acc__name { color: var(--muted); font-weight: 500; }
.ln-acc__pick { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.ln-acc__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* The whole name, always: it says where the launch goes */
.ln-acc__name { font-weight: 600; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.ln-acc__meta { color: var(--muted); font-size: 11.5px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ln-acc__state { font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.ln-acc__state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--axis); flex: none; }
.ln-acc__state.is-ok { color: var(--green); } .ln-acc__state.is-ok::before { background: var(--green); }
.ln-acc__state.is-bad { color: var(--red); } .ln-acc__state.is-bad::before { background: var(--red); }
.ln-acc__state.is-warn { color: var(--orange); } .ln-acc__state.is-warn::before { background: var(--orange); }
.ln-acc__state.is-wait { color: var(--muted); }
.ln-acc__empty { padding: 18px 12px; text-align: center; }
.ln-fav { width: 22px; height: 22px; border: 0; background: none; padding: 0; border-radius: 4px; cursor: pointer; color: var(--axis); font-size: 15px; line-height: 1; }
.ln-fav:hover { color: var(--orange); background: var(--surface-3); }
.ln-fav.is-on { color: var(--orange); }
.ln-more { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.ln-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.ln-pchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 500; max-width: 260px; }
.ln-pchip.is-bad { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.ln-pchip button { border: 0; background: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; flex: none; }
.ln-pchip button:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
@media (max-width: 760px) {
  .ln-acc__state { font-size: 11.5px; }
  .ln-acchead select { margin-left: 0; }
}
.ln-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ln-seg label { display: flex; cursor: pointer; }
.ln-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ln-seg span { padding: 6px 12px; font-size: 13px; color: var(--muted); border-right: 1px solid var(--line); }
.ln-seg label:last-child span { border-right: 0; }
.ln-seg input:checked + span { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ln-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
#lnStartAt { margin-top: 6px; width: auto; }

.ln-groups-wrap { overflow-x: auto; margin-bottom: 8px; }
.ln-groups { width: 100%; font-size: 13px; }
.ln-groups th { padding: 4px 6px; }
.ln-groups td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.ln-groups input, .ln-groups select { padding: 5px 8px; }
.ln-gnum { width: 28px; color: var(--muted); text-align: center !important; }
.ln-gnum-col { width: 110px; }
.ln-gnum-in { text-align: right; font-variant-numeric: tabular-nums; }
.ln-groups.no-bid .ln-bidcol { display: none; }
.ln-groups select { min-width: 120px; }
.ln-gvid { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; color: var(--text); }
.ln-gvid:hover { border-color: var(--accent); color: var(--accent); }
.ln-gvid.is-empty { border-color: var(--red); color: var(--red); }
.ln-x { width: 26px; height: 26px; border: 0; background: none; color: var(--muted); border-radius: 6px; cursor: pointer; }
.ln-x:hover:not(:disabled) { background: var(--surface-2); color: var(--red); }
.ln-x:disabled { opacity: .3; cursor: default; }
.ln-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ln-tools__sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.ln-gpop { position: absolute; z-index: 60; width: 330px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .14); padding: 8px; }
.ln-gpop__head { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 2px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ln-gpop__head b { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-gpop__list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ln-gpop__list label { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.ln-gpop__list label:hover { background: var(--surface-2); }
.ln-gpop__list img { width: 24px; height: 42px; object-fit: cover; border-radius: 4px; flex: none; }
.ln-gpop__list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ln-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.ln-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 16px; padding: 4px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.ln-chip small { color: var(--muted); }
.ln-chip:hover { border-color: var(--accent); }
.ln-chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.ln-idents { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 2px 0 14px; }
.ln-ident { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.ln-ident:hover:not(:disabled) { background: var(--surface-2); }
.ln-ident.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.ln-ident:disabled { opacity: .45; cursor: not-allowed; }
.ln-ident img, .ln-ident__ph { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; }
.ln-ident__ph { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); font-weight: 700; }
.ln-ident__txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.ln-ident__txt b, .ln-ident__txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-ident__txt small { color: var(--muted); font-size: 11.5px; }

.ln-lib { border-top: 1px solid var(--line); padding-top: 12px; }
.ln-lib__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ln-lib__head input[type=search] { width: 280px; max-width: 100%; margin-left: auto; }
.ln-lib p { margin: 4px 0 10px; }
.ln-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 520px; overflow-y: auto; padding: 2px; }
.ln-video__cover { position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.ln-video__cover img { width: 100%; height: 100%; object-fit: cover; }
.ln-video__n { position: absolute; top: 5px; left: 5px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.ln-video__dur { position: absolute; bottom: 4px; right: 4px; padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-style: normal; font-size: 10.5px; }
.ln-video__name { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-lib__more { margin-top: 8px; text-align: center; }
.ln-spread { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

.ln-texts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.ln-text { display: flex; align-items: center; gap: 6px; }
.ln-text__cnt { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.ln-text__cnt.is-near { color: var(--orange); }
.ln-urltools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.ln-step .lc-field { margin-bottom: 10px; }
.ln-step .lc-field small { font-size: 11.5px; }

.ln-ready { overflow-x: auto; }
.ln-readyt { font-size: 13px; }
.ln-readyt td { vertical-align: top; }
.ln-readyt tr.is-bad td { background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.ln-readyt select { width: auto; max-width: 220px; padding: 4px 6px; }
.ln-mark { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; margin-right: 6px; }
.ln-mark.is-ok { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.ln-mark.is-bad { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.ln-stale { padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); font-size: 13px; margin-bottom: 8px; }

.ln-side { position: sticky; top: 16px; }
.ln-sum h3 { font-size: 15px; margin-bottom: 10px; }
.ln-sum__grid { display: grid; grid-template-columns: auto auto; gap: 6px 10px; margin: 0 0 12px; font-size: 13.5px; }
.ln-sum__grid dt { color: var(--muted); }
.ln-sum__grid dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ln-sum__errors ul { margin: 0 0 12px; padding-left: 16px; color: var(--red); font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.ln-sum__note { margin: 8px 0 0; }
@media (max-width: 1100px) {
  .ln { grid-template-columns: 1fr; }
  .ln-side { position: static; order: 2; }
}

/* ── Launches ─────────────────────────────────────────────────────────── */
.lb { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.lb-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.lb-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.lb-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lb-bar span { display: block; height: 100%; width: 4%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.lb-spec summary { cursor: pointer; }
.lb-dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; margin: 12px 0 0; font-size: 13.5px; }
.lb-dl dt { color: var(--muted); }
.lb-dl dd { margin: 0; min-width: 0; }
.lb-url { overflow-wrap: anywhere; }
.lb-groups { font-size: 12.5px; width: auto; }
.lb-groups th, .lb-groups td { padding: 3px 10px 3px 0; }
.lb-job__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.lb-job__head h3 { font-size: 15px; margin: 0; }
.lb-steps summary { cursor: pointer; color: var(--muted); margin: 6px 0; }
/* History: a cell must stay a table cell (a flex <td> drops out of the row: borders and hover go astray) */
.lh-table td { vertical-align: middle; }
.lh-table td.lh-name { min-width: 240px; }
.lh-name small { display: block; margin-top: 3px; font-size: 12px; }
.lh-accs { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.lh-res { display: flex; gap: 4px; flex-wrap: wrap; }
.lh-table .lc-acts { white-space: nowrap; }

/* Range / sum shown on a campaign row (Smart+ keeps bids and budgets on ad groups) */
.lg-range { font-variant-numeric: tabular-nums; }
.lg-sumbtn { border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.lg-sumbtn:hover { color: var(--accent); }
.lg-sumbtn small { color: var(--muted); font-size: 11px; margin-left: 3px; }

/* Ads: creative thumbnail + preview window */
.lg-adname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lg-thumb { position: relative; flex: none; width: 28px; height: 50px; border-radius: 5px; border: 1px solid var(--line); padding: 0; cursor: pointer;
  background: var(--surface-3) center / cover no-repeat; overflow: hidden; }
.lg-thumb span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px;
  background: rgba(0, 0, 0, .25); opacity: 0; transition: opacity .15s; }
.lg-thumb:hover span, .lg-thumb:focus-visible span { opacity: 1; }
.lg-thumb.is-empty span { opacity: 1; color: var(--muted); background: none; }
.modal.lp-modal { width: min(920px, calc(100vw - 32px)); max-width: none; }
.lp { display: grid; grid-template-columns: 360px minmax(200px, 1fr); gap: 20px; align-items: start; }
.lp-phone { display: flex; flex-direction: column; gap: 8px; }
.lp-tabs { display: flex; gap: 4px; }
.lp-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.lp-tabs button.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lp-stage { position: relative; width: 360px; height: 640px; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.lp-stage iframe, .lp-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.lp-stage video { object-fit: contain; }
.lp-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; text-align: center; padding: 20px; }
.lp-info { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13.5px; min-width: 0; }
.lp-info dt { color: var(--muted); font-size: 11.5px; margin-top: 8px; }
.lp-info dt:first-child { margin-top: 0; }
.lp-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lp-info dd div + div { margin-top: 4px; }
.lp-note { font-size: 12px; color: var(--muted); margin: 0; }
@media (max-width: 700px) {
  .lp { grid-template-columns: 1fr; }
  .lp-stage { width: 100%; height: 560px; }
}

/* A bid above the danger line */
.ln-gnum-in.is-high { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); color: var(--orange); font-weight: 600; }

/* Accounts: tiers and worker health */
.la-health { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.la-tier { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.la-tier::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--axis); }
.la-tier.is-hot { color: var(--red); } .la-tier.is-hot::before { background: var(--red); }
.la-tier.is-warm { color: var(--orange); } .la-tier.is-warm::before { background: var(--orange); }
.la-tier.is-cold { color: var(--muted); }
.la-worker { font-size: 13px; margin: 6px 0 0; }
.la-worker.is-off { color: var(--orange); }
.la-health .stat small { display: block; font-size: 11.5px; margin-top: 2px; }
.la-health .stat span i { font-style: normal; }
.lg-table td.lg-sw, .lg-table th.lg-sw { padding-left: 4px; padding-right: 4px; overflow: visible; text-align: center; }
.lg-table td.lg-pick, .lg-table th.lg-pick { padding-left: 10px; padding-right: 6px; overflow: visible; }
.lg-link { color: var(--accent); font-size: 12px; text-decoration: none; }
.lg-link:hover { text-decoration: underline; }

/* Launch form: geo / language — search, several at once */
.ln-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.ln-ms { position: relative; }
.ln-ms__box { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 38px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); cursor: text; }
.ln-ms__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ln-ms__chips { display: contents; }
.ln-ms__q { flex: 1 1 120px; min-width: 100px; border: 0 !important; box-shadow: none !important; padding: 4px !important; background: none !important; outline: none; }
.ln-mchip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 3px 2px 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; }
.ln-mchip b { font-weight: 700; }
.ln-mchip button { border: 0; background: none; color: inherit; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; }
.ln-mchip button:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ln-ms__pop { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .14); padding: 4px; }
.ln-ms__opt { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ln-ms__opt b { min-width: 30px; color: var(--muted); font-size: 12px; }
.ln-ms__opt:hover, .ln-ms__opt.is-act { background: var(--accent-soft); color: var(--accent); }
.ln-ms__none { padding: 8px 10px; }
.ln-fixed { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; font-weight: 500; }
.ln-fixed svg { width: 15px; height: 15px; color: var(--green); }

/* Identity shared by the chosen accounts */
.ln-idents-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.ln-idents-box .ln-idents { margin: 0; }
.ln-nocommon { padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--orange) 12%, transparent); font-size: 13.5px; }
.ln-partial { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ln-partial li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.ln-partial__who { display: inline-flex; align-items: center; gap: 8px; }
.ln-partial__who img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.ln-partial li .btn { margin-left: auto; }
.ln-warn { color: var(--orange); margin: 0; }
.ln-warn-dot { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
  background: color-mix(in srgb, var(--orange) 20%, transparent); color: var(--orange); cursor: help; }
.ln-readyt__v { white-space: nowrap; }

/* Video upload right on the form */
.ln-drop { display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; margin-bottom: 10px;
  transition: border-color .15s, background .15s; }
.ln-drop:hover, .ln-drop:focus-visible, .ln-drop.is-over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.ln-drop > svg { width: 28px; height: 28px; color: var(--accent); flex: none; }
.ln-drop small { display: block; margin-top: 2px; font-size: 12px; }
.ln-drop__pick { color: var(--accent); text-decoration: underline; }
.ln-uploads { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ln-uploads:empty { display: none; }
.ln-up { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; align-items: center; gap: 10px; font-size: 12.5px; }
.ln-up__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-up__bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ln-up__bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.ln-up.is-done .ln-up__bar span { background: var(--green); }
.ln-up.is-err .ln-up__st { color: var(--red); }
.ln-up.is-err .ln-up__bar span { background: var(--red); width: 100% !important; }
.ln-up__st { color: var(--muted); white-space: nowrap; }
.ln-lib__head .seg b { font-weight: 600; font-size: 11.5px; color: var(--muted); margin-left: 3px; }
.ln-video { position: relative; display: flex; }
.ln-video__btn { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.ln-video__btn:hover { border-color: var(--accent); }
.ln-video.is-on .ln-video__btn { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.ln-video__cover img { position: absolute; inset: 0; }
.ln-video__ph { color: var(--muted); }
.ln-video__have { position: absolute; bottom: 4px; left: 4px; padding: 0 5px; border-radius: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-style: normal; font-size: 10.5px; }
.ln-video__del { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ln-video:hover .ln-video__del, .ln-video__del:focus-visible { opacity: 1; }
.ln-video__del:hover { background: var(--red); }
@media (hover: none) { .ln-video__del { opacity: 1; } }

/* Grid: whose accounts (a lead / head) */
.lg-owner { width: auto; max-width: 220px; height: 32px; padding: 0 8px; }
@media (max-width: 760px) {
  /* A phone: nothing is pinned on the left — on a narrow screen the name column would cover the numbers
     (a computer keeps the checkbox, the switch and the name pinned). The header still stays on top. */
  .lg-table .lg-stick1, .lg-table .lg-stick2, .lg-table .lg-stick3 { left: auto; box-shadow: none; }
  .lg-table tbody .lg-stick1, .lg-table tbody .lg-stick2, .lg-table tbody .lg-stick3 { position: static; }
  /* The controls take as little height as they can, so the table gets the screen */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .lg-headacts { gap: 6px; }
  .lg-headacts .btn { height: 30px; }
  .lg { margin-top: 10px; gap: 8px; }
  .lg-toolbar { gap: 6px; }
  .lg-owner { order: 0; flex: 1 1 100%; max-width: none; }
  .lg-acc { order: 1; max-width: none; flex: 1 1 100%; min-width: 0; }
  .lg-toolbar .seg { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .lg-toolbar .seg a { white-space: nowrap; padding: 5px 9px; }
  #lgStatus { order: 4; }
  .lg-toolbar input[type=search] { width: 100%; margin-left: 0; order: 10; }
  .lg-levels { flex-wrap: nowrap; overflow-x: auto; }
  .lg-level { padding: 9px 10px; white-space: nowrap; }
  .lg-scope { display: none; }
  .lg-wrap { max-height: calc(100vh - 230px); }
  .lg-table th, .lg-table td { padding: 7px 8px; }
  .lg-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .lg-foot { justify-content: center; }
  .lg-accpop { width: calc(100vw - 24px); left: 12px !important; }
}

/* Launch form: location search shows what a place is; pixels as cards; uploads show when they go */
.ln-ms__opt { justify-content: space-between; }
.ln-ms__opt small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ln-ms__opt:hover small, .ln-ms__opt.is-act small { color: inherit; opacity: .8; }
.ln-mchip small { color: inherit; opacity: .75; font-size: 11px; }
.ln-pixel .ln-ident__ph { font-size: 11px; letter-spacing: .02em; border-radius: 8px; }
.ln-video__have.is-exp { background: rgba(160, 90, 0, .78); }
.ln-lib__head > b { margin-right: auto; font-size: 14px; }
.ln-showall { font-size: 13px; margin-top: 4px; }
.ln-idents-box .ln-idents { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.ln-idents-box .ln-ident { padding: 6px 8px; }
.ln-idents-box .ln-ident img, .ln-idents-box .ln-ident__ph { width: 28px; height: 28px; }

/* Ad accounts of the login's BCs that TikTok doesn't share with it */
.la-unlisted { margin: 0 16px 14px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  background: color-mix(in srgb, var(--orange) 9%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); }
.la-unlisted p { margin: 0 0 6px; }
.la-unlisted details { margin-top: 2px; }
.la-unlisted summary { cursor: pointer; color: var(--muted); }
.la-unlisted .mono { word-break: break-all; margin: 6px 0 0; }
.lg-unlisted { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; line-height: 1.45;
  background: color-mix(in srgb, var(--orange) 9%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); }
/* Deleted in TikTok: kept while its spend shows, read-only */
.lg-table tr.is-deleted .lg-nm { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.lg-hidden { color: var(--muted); margin: 0 0 8px; }
.lg-hidden a { color: var(--accent, inherit); }

.lg-hidden:empty { display: none; }

/* A TikTok login that stopped (or will soon stop) refreshing the numbers */
.lc-login-alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  background: color-mix(in srgb, var(--orange) 9%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--line)); }
.lc-login-alert.is-bad { background: color-mix(in srgb, var(--red) 9%, transparent); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.lc-login-alert p { margin: 0; flex: 1 1 320px; }

