/* =========================================================
   hub.css — campaign hub (campaigns.js), coaching pages (coach.js), ready-to-post + version actions (team.js),
   grouped accounts in the post form. Uses lab.css tokens.
   ========================================================= */
/* campaign hub */
.cmp-head { align-items: flex-end; }
.cmp-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cmp-logo { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--accent); color: #14120E; font-size: 26px; font-weight: 800; object-fit: cover; flex: none; }
.cmp-terms { margin: 6px 0 0; color: var(--lab-sub); font-size: 14.5px; }
.cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-top: 16px; }
.cmp-grid > main, .cmp-grid > aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cmp-sec { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.cmp-sec h2 { margin: 0; font-size: 15px; font-weight: 800; } .cmp-sec h2 small { color: var(--lab-dim); font-weight: 600; margin-left: 6px; }
.cmp-sec-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cmp-sec-hd > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cmp-sub { margin: 8px 0 0; font-size: 13px; font-weight: 800; color: var(--lab-sub); }
.cmp-date { font-size: 12px; font-weight: 700; color: var(--lab-dim); width: 52px; flex: none; }
/* accounts grid: one column per platform, like a brand profile */
.cmp-accts { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cmp-acct { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-height: 96px; border-right: 1px solid var(--border); background: var(--lab-inner); }
.cmp-acct:last-child { border-right: 0; }
.cmp-acct-hd { font-size: 12.5px; font-weight: 800; color: var(--text); }
.cmp-acct-on { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.cmp-acct-on span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
/* account remove (×), reuse and "different account" controls: Zernio bills per connected account */
.acct-x { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 2px; cursor: pointer; flex: none; }
.acct-x:hover { color: var(--accent); }
body.lab .cmp-acct .cmp-reuse { font-size: 12px; padding: 5px 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-other { align-self: flex-start; border: 0; background: none; padding: 0; font-size: 11.5px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cmp-other:hover { color: var(--text); }
.acct-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; }
.acct-tag small { opacity: .7; }
.acct-tag.warn { border-color: #d9a441; }
.acct-bill { display: block; margin-top: 6px; }
.cmp-acct-on .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex: none; }
body.lab .cmp-acct .lab-ghost { align-self: flex-start; }
.cmp-tk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--lab-inner); border: 1px solid var(--border); }
.cmp-tk a, .cmp-tk > span:first-child { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.cmp-tk b { font-size: 13.5px; } .cmp-tk small { font-size: 12px; color: var(--lab-dim); }
.cmp-assets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cmp-assets figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cmp-assets video, .cmp-txt { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 9px; background: #000; }
.cmp-txt { display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12px; font-weight: 800; background: var(--lab-inner); border: 1px solid var(--border); }
.cmp-assets figcaption { font-size: 11px; color: var(--lab-dim); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
/* campaigns you can join */
.cmp-avail { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; border-color: rgba(255,216,77,.45) !important; }
.cmp-avail-hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cmp-avail-hd h2 { margin: 2px 0 0; font-size: 17px; font-weight: 800; }
.cmp-avail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cmp-avail-grid article { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--lab-inner); border: 1px solid var(--border); }
.cmp-avail-grid article b { font-size: 15px; } .cmp-avail-grid article p { margin: 0; font-size: 13.5px; color: var(--lab-sub); } .cmp-avail-grid article small { font-size: 12px; color: var(--lab-dim); }
body.lab .cmp-avail-grid .lab-btn { align-self: flex-start; margin-top: 4px; }
.cmp-type { align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: rgba(255,216,77,.14); color: var(--accent); font-size: 11.5px; font-weight: 800; }

/* coaching */
.co-av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #14120E; font-size: 16px; font-weight: 800; object-fit: cover; vertical-align: middle; flex: none; }
h1 .co-av { width: 44px; height: 44px; margin-right: 6px; }
.co-add { display: flex; align-items: flex-end; gap: 12px; padding: 16px 20px; margin: 16px 0; flex-wrap: wrap; }
.co-add .lab-f { flex: 1 1 280px; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.co-card { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; color: inherit; text-decoration: none; transition: border-color .15s; }
.co-card:hover { border-color: var(--accent) !important; }
.co-card header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.co-card header > span:not(.co-av) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.co-card header b { font-size: 15px; } .co-card header small { font-size: 12px; color: var(--lab-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-card header em { font-style: normal; font-size: 11.5px; color: var(--lab-faint); white-space: nowrap; }
.co-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.co-nums span { display: flex; flex-direction: column; gap: 2px; } .co-nums small { font-size: 11px; color: var(--lab-dim); font-weight: 600; } .co-nums b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.co-goal { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--lab-dim); } .co-goal .lab-bar { flex: 1; margin: 0; } .co-goal em { font-style: normal; font-weight: 800; color: var(--text); }
.co-goal.muted { color: var(--lab-faint); }
.co-card footer { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--lab-dim); border-top: 1px solid var(--border); padding-top: 10px; }
.co-card footer .hot { color: var(--accent); font-weight: 700; }
.co-table { display: flex; flex-direction: column; font-size: 13px; }
.co-table > div { display: grid; grid-template-columns: 1.4fr 1.6fr .6fr .6fr .7fr .8fr; gap: 10px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--border); }
.co-table > div.th { border-top: 0; font-size: 11.5px; font-weight: 700; color: var(--lab-dim); text-transform: uppercase; letter-spacing: .05em; }
.co-table > div > span:first-child { display: flex; flex-direction: column; gap: 1px; } .co-table small { font-size: 11.5px; color: var(--lab-dim); } .co-table a { color: var(--accent); text-decoration: none; }
.cmp-sec .co-table > div:not(.th):has(> span:nth-child(5):last-child), .cmp-sec .co-table > .th:has(> span:nth-child(5):last-child) { grid-template-columns: 1.4fr 2fr .6fr .7fr .8fr; }
.co-chip { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(255,216,77,.14); color: var(--accent); }
.co-post { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.co-post:first-of-type { border-top: 0; }
.co-post video, .co-ph { width: 54px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 7px; background: repeating-linear-gradient(135deg, #1D1B18 0 7px, #181613 7px 14px); display: block; }
.co-post > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .co-post b { font-size: 13.5px; } .co-post small { font-size: 12px; color: var(--lab-dim); }
.co-post-n { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.co-lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-lib figure { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co-lib video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 9px; background: #000; }
.co-lib figcaption { font-size: 11px; color: var(--lab-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-prog { margin: 16px 0; }
.co-prog-row { grid-template-columns: 1.6fr 1fr 1fr auto !important; }
.co-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.co-prog textarea { width: 100%; resize: vertical; font: inherit; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--lab-inner); border: 1px solid var(--lab-line); color: var(--text); }
.co-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 8px; }
.co-pcard { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.co-pcard header { display: flex; justify-content: space-between; gap: 10px; } .co-pcard header > span:first-child { display: flex; flex-direction: column; gap: 2px; } .co-pcard header b { font-size: 15.5px; } .co-pcard header small { font-size: 12px; color: var(--lab-dim); }
.co-pcard header > span:last-child { display: flex; gap: 6px; align-items: flex-start; }
.co-mini { display: flex; flex-direction: column; } .co-mini a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12.5px; color: inherit; text-decoration: none; } .co-mini a:hover span:first-child { color: var(--accent); }

/* ticket page: ready to post, version actions */
.tk-ready { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 20px; border-color: rgba(123,216,159,.5) !important; }
.tk-ready.slim { grid-template-columns: 1fr; }
.tk-ready video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #000; }
.tk-ready h2 { margin: 2px 0 4px; font-size: 18px; font-weight: 800; } .tk-ready p { margin: 0 0 10px; }
.tk-ready .eyebrow { color: var(--green); }
.tk-vact { display: flex; flex-wrap: wrap; gap: 6px; }
body.lab .tk-vact .lab-ghost { font-size: 11.5px !important; padding: 5px 9px !important; }

/* post form: accounts grouped by campaign */
.acct-group { display: block; margin: 8px 0 2px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--lab-dim); }
.acct-group:first-child { margin-top: 0; }
.cf-grid label[hidden] { display: none; }

@media (max-width: 1100px) { .cmp-grid { grid-template-columns: minmax(0, 1fr); } .cmp-accts { grid-template-columns: repeat(3, 1fr); } .cmp-acct:nth-child(3) { border-right: 0; } .cmp-acct:nth-child(-n+3) { border-bottom: 1px solid var(--border); } }
@media (max-width: 700px) { .co-table > div { grid-template-columns: 1.2fr 1fr .8fr !important; } .co-table > div > span:nth-child(n+4):not(:last-child) { display: none; } .co-prog-row { grid-template-columns: 1fr !important; } .tk-ready { grid-template-columns: 1fr; } .cmp-accts { grid-template-columns: repeat(2, 1fr); } }

/* ---------- apply a campaign to past videos (apply.js) ---------- */
.ap-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(6,5,4,.72); backdrop-filter: blur(3px); }
.ap { width: min(980px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--lab-line); background: #12110F; color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; }
.ap-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 12px; }
.ap-h h2 { margin: 4px 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.ap-h p { margin: 0; max-width: 640px; color: var(--lab-dim); font-size: 13.5px; line-height: 1.45; }
.ap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 22px 12px; }
.ap-bar .lab-seg small { color: var(--lab-faint); font-weight: 600; margin-left: 2px; }
.ap-q { flex: 1 1 160px; min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--lab-inner); color: var(--text); font: inherit; font-size: 13.5px; }
.ap-q:focus { outline: none; border-color: rgba(255,216,77,.55); }
.ap-all { display: flex; gap: 6px; }
body.lab .ap-all .lab-ghost { min-height: 34px !important; padding: 0 11px !important; font-size: 12.5px !important; }
.ap-list { flex: 1; overflow-y: auto; padding: 6px 14px 14px; border-top: 1px solid var(--lab-row); }
.ap-row { display: grid; grid-template-columns: 20px 34px minmax(0, 1fr) auto 66px 76px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.ap-row:hover { background: var(--lab-hover); }
.ap-row.on { background: rgba(255,216,77,.05); }
.ap-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.ap-th { position: relative; width: 34px; height: 52px; border-radius: 6px; overflow: hidden; background: #201D1A; }
.ap-th img, .ap-th video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ap-t b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-t small { color: var(--lab-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-t em { font-style: normal; color: var(--lab-sub); }
.ap-t em.hint { color: var(--accent); }
.ap-cur { justify-self: end; }
.ap-none { color: var(--lab-faint); font-size: 12px; }
.ap-v { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.ap-v small { color: var(--lab-faint); font-size: 11px; font-weight: 500; }
.ap-e { text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--lab-dim); }
.ap-more { padding: 10px; text-align: center; color: var(--lab-faint); font-size: 12.5px; }
.ap-f { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--lab-row); background: #100F0D; }
.ap-f small { flex: 1; color: var(--lab-dim); font-size: 12.5px; }
.ap-f small b { color: var(--text); }
@media (max-width: 760px) { .ap-row { grid-template-columns: 20px 34px minmax(0, 1fr) 70px; } .ap-row .ap-cur, .ap-row .ap-v { display: none; } }
body.lab .ap-bar .lab-seg button { white-space: nowrap; }
body.lab .cmp-acct .cmp-reuse { justify-content: flex-start; text-align: left; display: block; }
body.lab .cmp-other { border: 0 !important; background: none !important; padding: 0 !important; min-height: 0 !important; }
.cmp-sec .lab-prow { grid-template-columns: 52px minmax(0, 1fr) auto; }

/* milestone editor (campaign form + coach program form) */
.ms-ed { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.ms-h { font-size: 13px; font-weight: 600; color: var(--text); }
.ms-h small { color: var(--lab-dim); font-weight: 500; margin-left: 6px; }
.ms-rows { display: flex; flex-direction: column; gap: 6px; }
.ms-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--lab-sub); }
.ms-row > span:first-child { width: 38px; font-weight: 700; color: var(--lab-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.ms-row label { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; margin: 0 !important; }
.ms-row input { width: 110px !important; min-height: 36px; }
body.lab .ms-del, body.lab .ms-add { border: 0 !important; background: none !important; color: var(--lab-dim) !important; padding: 2px 6px !important; min-height: 0 !important; }
body.lab .ms-add { align-self: flex-start; color: var(--accent) !important; font-weight: 600; }
body.lab .ms-del:hover { color: var(--red) !important; }
.cf-ms { grid-column: 1 / -1; }
.co-ms { grid-column: 1 / -1; }

/* campaign hub: jump to this campaign everywhere */
.cmp-jumps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.cmp-jump { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); color: var(--text); transition: border-color .12s, transform .12s; }
.cmp-jump:hover { border-color: rgba(255,216,77,.5); transform: translateY(-1px); color: var(--text); }
.cmp-jump .i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--lab-inner); font-size: 15px; flex: none; }
.cmp-jump > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cmp-jump b { font-size: 13.5px; }
.cmp-jump small { color: var(--lab-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-jump em { font-style: normal; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .cmp-jumps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Coach pay history and past deals */
.co-pay-history .co-pay-months > div { grid-template-columns: 1.6fr .6fr .8fr .9fr !important; }
.co-pay-days summary { cursor: pointer; margin-top: 14px; font-size: 13.5px; font-weight: 600; }
.co-pay-days summary small { color: var(--lab-dim); font-weight: 500; margin-left: 6px; }
.co-pay-days .co-table > div { grid-template-columns: 1.1fr .5fr 2fr .7fr .9fr !important; }
.co-campaign-card small + small, .co-campaign-card span > small:last-child:not(:first-child) { display: block; color: var(--lab-faint); font-size: 11px; }
.co-past-head { margin-top: 8px; }
.co-past .co-campaign-card { opacity: .82; }
@media (max-width: 700px) { .co-pay-days .co-table > div { grid-template-columns: 1fr .4fr .8fr !important; } .co-pay-days .co-table > div > span:nth-child(3), .co-pay-days .co-table > div > span:nth-child(4) { display: none; } }
