:root {
  --bg: #f6f6f3; --card: #fff; --ink: #1c1c1a; --mut: #6e6d67; --line: #e3e2da; --soft: #f0efe9;
  --acc: #111111; --acc-ink: #fff; --acc-soft: #ecebe6; --info: #2d5bff; --info-soft: #e9eeff; --ok: #188a4a; --ok-soft: #e3f5ea; --bad: #cf3a3a;
  --tiktok: #111; --instagram: #c13584; --facebook: #1877f2; --youtube: #e62117;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211; --card: #1b1b1a; --ink: #ecebe6; --mut: #9b9a93; --line: #2d2d2a; --soft: #232321;
    --acc: #f2f1ec; --acc-ink: #111; --acc-soft: #2c2c2a; --info: #6286ff; --info-soft: #1f2744; --ok: #3ec07a; --ok-soft: #173326; --bad: #ff6b6b; --tiktok: #444;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--acc); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: .4em 0; }

/* layout */
header { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); }
.bar { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bar.wide, main.wide { max-width: none; }
nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
nav a { padding: 6px 10px; border-radius: 8px; color: var(--mut); text-decoration: none; font-weight: 500; }
nav a.on { background: var(--acc-soft); color: var(--acc); }
main { max-width: 760px; margin: 0 auto; padding: 20px 16px 80px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand .mark { display: inline-flex; width: 34px; height: 24px; }
.brand .mark svg { width: 100%; height: 100%; }
.brand .word { font-size: 1.05rem; font-weight: 500; letter-spacing: -.02em; }
.brand .word b { font-weight: 800; }
.brand.big { display: flex; flex-direction: column; gap: 12px; margin: 0 auto 4px; }
.brand.big .mark { width: 92px; height: 64px; }
.brand.big .word { font-size: 1.6rem; }
.tagline { text-align: center; color: var(--mut); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 22px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.inset { background: var(--soft); border-radius: 10px; padding: 12px; margin: 8px 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--mut); }
.small { font-size: .82rem; }
.center { display: block; text-align: center; margin-top: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.err { color: var(--bad); }
.empty { text-align: center; padding: 32px 16px; }

/* forms */
label { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; font-weight: 500; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
label.check input { width: 18px; height: 18px; margin-top: 1px; flex: none; }
input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: transparent; }
input:disabled { color: var(--mut); background: var(--soft); }
textarea { resize: vertical; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }

/* auth */
.auth { max-width: 380px; margin: 9vh auto; padding: 0 16px; }
.seg { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; font: inherit; font-weight: 600; padding: 8px; border-radius: 8px; color: var(--mut); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* creator: posts */
.post video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; margin: 10px 0; display: block; }
.post.done { opacity: .6; }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { background: var(--acc-soft); color: var(--acc); padding: 3px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); margin-top: 12px; }
.field { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.field-top { display: flex; justify-content: space-between; align-items: center; }
.field-top .label { margin: 0; }
.field-text { white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { font: inherit; font-weight: 600; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.chip.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* personas / accounts */
.acct { border-top: 1px solid var(--line); padding: 10px 0; }
.acct-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { color: #fff; font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.pill.tiktok { background: var(--tiktok); } .pill.instagram { background: var(--instagram); }
.pill.facebook { background: var(--facebook); } .pill.youtube { background: var(--youtube); }
.secret { background: var(--soft); border-radius: 10px; padding: 4px 12px 12px; margin-top: 8px; }
details.add { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
details summary { cursor: pointer; font-weight: 600; color: var(--acc); padding: 4px 0; }
details.add[open] summary { margin-bottom: 10px; }
details.hist { margin-top: 8px; }
details.hist summary { font-weight: 500; font-size: .88rem; }
.agree { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.agree-text { white-space: pre-wrap; font-size: .82rem; color: var(--mut); max-height: 160px; overflow: auto; }

/* admin: schedule */
.sched { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.lib { position: sticky; top: 70px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; gap: 8px; margin: 0; }
.lib-list { overflow: auto; display: flex; flex-direction: column; gap: 6px; margin: 0 -6px; padding: 0 6px; }
.vid { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 10px; border: 1px solid var(--line); cursor: grab; background: var(--card); }
.vid:hover { background: var(--soft); }
.vid.picked { outline: 2px solid var(--acc); background: var(--acc-soft); }
.vid img, .vid .nothumb { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.nothumb { background: var(--soft); color: var(--mut); display: grid; place-items: center; font-size: .8rem; }
.vt { font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal { min-width: 0; }
.cal-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.gridwrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); max-height: calc(100vh - 140px); }
.grid { display: grid; grid-template-columns: 170px repeat(7, minmax(128px, 1fr)); min-width: 1070px; }
.gh { position: sticky; top: 0; z-index: 2; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px; font-weight: 700; font-size: .84rem; text-align: center; }
.gh.today { color: var(--acc); }
.gh.corner, .rh { position: sticky; left: 0; z-index: 1; background: var(--card); border-right: 1px solid var(--line); text-align: left; }
.gh.corner { z-index: 3; }
.rh { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; justify-content: center; min-width: 0; }
.rh b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.day.past { background: var(--soft); }
.day.today { background: var(--acc-soft); }
.day.all { background: repeating-linear-gradient(45deg, transparent, transparent 6px, var(--soft) 6px, var(--soft) 12px); }
.slot { position: relative; min-height: 34px; border: 1px dashed var(--line); border-radius: 8px; padding: 2px 4px 2px 28px; display: flex; align-items: center; }
.slot.armed:not(.filled) { border-color: var(--acc); cursor: pointer; }
.slot.over { border: 2px solid var(--acc); background: var(--acc-soft); }
.slot.filled { border-style: solid; }
.sl { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-size: .7rem; font-weight: 700; color: var(--mut); white-space: nowrap; }
.chipv { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; cursor: grab; font-size: .76rem; }
.chipv img, .chipv .nothumb { width: 20px; height: 28px; border-radius: 4px; object-fit: cover; flex: none; }
.chipv .ct { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chipv .ok { font-size: .66rem; font-weight: 700; color: var(--mut); }
.chipv.alldone .ok { color: var(--ok); }
.chipv .x { border: 0; background: none; color: var(--mut); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.chipv .x:hover { color: var(--bad); }

/* admin: videos */
.vedit { display: flex; gap: 16px; flex-wrap: wrap; }
.vmedia { width: 220px; flex: none; }
.vmedia video { width: 100%; max-height: 380px; background: #000; border-radius: 10px; display: block; margin-bottom: 6px; }
.music { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }

/* admin: tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.off td { opacity: .5; }
.pay-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-form > * { flex: 1 1 130px; width: auto; }
.pay-form .btn { flex: 0 0 auto; }
.detail { scroll-margin-top: 70px; }

/* uploads + toast */
#uploads { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; gap: 8px; width: 280px; max-width: calc(100vw - 32px); }
#uploads .up { margin: 0; padding: 10px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
#uploads progress { width: 100%; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 500; z-index: 40; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 860px) {
  .sched { grid-template-columns: 1fr; }
  .lib { position: static; max-height: 300px; }
  .vmedia { width: 100%; }
}

/* warm-up */
.btn.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); }
.warm-sum { margin-top: 6px; }
.ready { color: var(--ok); font-weight: 600; }
.notready { color: #b7791f; font-weight: 600; }
.warm { display: flex; flex-direction: column; gap: 8px; }
.warm .label { margin-top: 4px; }
.warm-form { display: flex; gap: 8px; flex-wrap: wrap; }
.warm-form input[name=minutes] { flex: 0 0 110px; }
.warm-form input[name=searched] { flex: 1 1 200px; }
.warm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.warm-list li { display: flex; gap: 10px; align-items: baseline; background: var(--card); border-radius: 8px; padding: 6px 10px; }
.warm-list .x { border: 0; background: none; color: var(--mut); cursor: pointer; font-size: 1.05rem; }
.warm-list .x:hover { color: var(--bad); }
label.btn.upload { display: inline-flex; flex-direction: row; align-self: flex-start; font-weight: 600; }
.shots { display: flex; gap: 10px; flex-wrap: wrap; }
.shots a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.shots img { width: 90px; height: 160px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .notready { color: #f0b354; } }
.acct-top b.grow { flex: 1 1 55%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* pay, proof links, overdue */
.pay ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.stat b { font-size: 1.6rem; }
.links { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.linkrow { display: flex; gap: 8px; align-items: center; }
.linkrow input { padding: 8px 10px; }
.ellip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge.bad { background: #fde8e8; color: var(--bad); }
.badge.okb { background: var(--ok-soft); color: var(--ok); }
.warn { color: var(--bad); font-weight: 600; margin: 6px 0 0; }
.post.overdue { border-color: var(--bad); }
.chipv.overdue .ct { color: var(--bad); }
.chipv.overdue::after { content: '!'; color: var(--bad); font-weight: 800; }
.paybar { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.paybar input { flex: 1 1 220px; width: auto; }
@media (prefers-color-scheme: dark) { .badge.bad { background: #3a1c1c; } }

/* payment bubbles + review */
.bubs { display: inline-flex; gap: 6px; flex-wrap: wrap; vertical-align: middle; }
.bub { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.bub.pending { background: #fdf1dc; color: #9a5b00; }
.bub.approved { background: var(--info-soft); color: var(--info); }
.bub.approved.ready { background: var(--ok); color: #fff; }
.bub.paid { background: var(--ok-soft); color: var(--ok); }
@media (prefers-color-scheme: dark) { .bub.pending { background: #3a2c12; color: #f0b354; } }
.stats { grid-template-columns: repeat(3, 1fr); }
.stat.pending b { color: #9a5b00; } .stat.approved b { color: var(--info); } .stat.paid b { color: var(--ok); }
@media (max-width: 480px) { .stat b { font-size: 1.15rem; } .stat { padding: 12px; } }
progress.goal { width: 100%; height: 10px; accent-color: var(--ok); }
input.search { margin-bottom: 12px; }
tr.sel td { background: var(--acc-soft); }
tr.ready td { background: var(--ok-soft); }
.nowrap { white-space: nowrap; }
.duebox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
.duebox.ready { border-color: var(--ok); background: var(--ok-soft); }
.duebox input { flex: 1 1 200px; width: auto; }
details.persona-review { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin-bottom: 10px; background: var(--card); }
details.persona-review > summary { color: var(--ink); padding: 10px 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
details.persona-review[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.review { margin-bottom: 12px; }

/* brands, sign-up chooser, locked posts */
.row.between { justify-content: space-between; }
.row.tight { gap: 10px; flex-wrap: nowrap; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; cursor: pointer; transition: border-color .15s, transform .15s; }
.choice:hover { border-color: var(--ink); transform: translateY(-1px); }
.choice b { font-size: 1.05rem; }
.choice span { color: var(--mut); font-size: .9rem; }
h3.center { text-align: center; margin: 4px 0 2px; }
.invite-card { display: flex; align-items: center; gap: 14px; }
.invite-card b { font-size: 1.15rem; }
.blogo { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex: none; background: var(--soft); border: 1px solid var(--line); }
.blogo.sm { width: 24px; height: 24px; border-radius: 7px; }
.blogo.lg { width: 44px; height: 44px; border-radius: 12px; }
.blogo.xl { width: 72px; height: 72px; border-radius: 16px; }
.blogo.init { display: inline-grid; place-items: center; font-weight: 800; color: var(--ink); font-size: .85rem; }
.blogo.lg.init { font-size: 1.2rem; } .blogo.xl.init { font-size: 1.8rem; }
.bchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; }
.bchip:hover { background: var(--soft); }
.brand-sec { margin: 0 0 26px; }
.brand-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand-head h3 { margin: 0 0 2px; font-size: 1.15rem; }
h3.section { margin: 26px 0 4px; }
.card.locked { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 8px; background: var(--soft); }
.lock { font-size: 1.1rem; opacity: .7; }
.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.paylist { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
details.paydetails > summary { color: var(--ink); }
.joinform { display: flex; flex-direction: column; gap: 8px; }
.invite input { font-size: .85rem; }
.post-head .row.tight { min-width: 0; }
details.add-persona > summary { padding: 2px 0; }
details.add-persona[open] > form { border: 0; padding: 12px 0 0; margin: 0; }
.ss { display: inline-flex; align-items: center; gap: 6px; }
.how ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.how li { padding-left: 2px; }

/* brand analytics */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpis .stat { margin: 0; padding: 12px 14px; }
.kpis .stat b { font-size: 1.35rem; }
.stats-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.stats-table th.sortable:hover { color: var(--ink); }
.stats-table td { white-space: nowrap; }
.stats-table td:first-child { white-space: normal; min-width: 160px; }
.minis { display: flex; flex-wrap: wrap; gap: 8px 18px; background: var(--soft); border-radius: 12px; padding: 10px 14px; margin: 6px 0 10px; }
.minis > div { display: flex; flex-direction: column; }
.minis .label { margin: 0; font-size: .68rem; }

/* persona details + brand profile */
.pdetails { margin: -4px 0 8px; }
.pprofile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.pprofile.todo { border-color: #e8b04a; background: #fdf8ee; }
.pprofile.applied { background: var(--soft); }
@media (prefers-color-scheme: dark) { .pprofile.todo { background: #2c2414; border-color: #8a6420; } }
.pprofile .field:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.row.top { align-items: flex-start; }
.pavatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: none; background: var(--soft); }
details.pedit { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; margin: 6px 0 10px; }
details.pedit > summary { color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.pedit[open] > summary { margin-bottom: 10px; }
/* warm-up */
button.warm-sum { all: unset; cursor: pointer; display: block; margin-top: 6px; font-size: .82rem; }
button.warm-sum:focus-visible { outline: 2px solid var(--acc); border-radius: 4px; }
.linkish { text-decoration: underline; color: var(--ink); }
.warm-done { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.warm-done.yes { border-color: var(--ok); background: var(--ok-soft); }

/* approvals sheet */
.sheettools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.sheettools select, .sheettools input { width: auto; padding: 7px 10px; font-size: .86rem; }
.sheettools input { flex: 1 1 200px; }
.seg.inline { margin: 0; display: inline-flex; }
.seg.inline button { padding: 6px 12px; font-size: .85rem; }
.seg .count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--ink); font-size: .72rem; line-height: 18px; }
.seg .count.bad { background: var(--bad); color: #fff; }
.sheetbar { position: sticky; top: 56px; z-index: 5; display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px 10px 0 0; border-bottom: 0; padding: 8px 12px; font-size: .88rem; }
.sheetwrap { overflow: auto; border: 1px solid var(--line); border-radius: 0 0 10px 10px; background: var(--card); }
table.sheet { font-size: .84rem; border-collapse: collapse; width: 100%; }
table.sheet th { position: sticky; top: 0; background: var(--soft); z-index: 1; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: .7rem; }
table.sheet td { padding: 5px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.sheet tbody tr { cursor: pointer; }
table.sheet tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--soft) 45%, transparent); }
table.sheet tbody tr:hover td { background: var(--soft); }
table.sheet tbody tr.on td { background: var(--info-soft); }
table.sheet .cb { width: 28px; padding-right: 0; }
table.sheet .cb input { width: 15px; height: 15px; margin: 0; vertical-align: middle; pointer-events: none; }
table.sheet th.cb input { pointer-events: auto; }
table.sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
table.sheet .bub { font-size: .7rem; padding: 1px 8px; }
.empty-cell { text-align: center; padding: 28px !important; }

/* creator post stages */
.seg.tabs { overflow-x: auto; }
.seg.tabs button { white-space: nowrap; flex: 1 0 auto; }
.done-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px; }
.linkchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: .78rem; color: var(--ink); text-decoration: none; }
.vnote { border-left: 3px solid var(--ink); background: var(--soft); border-radius: 0 10px 10px 0; padding: 8px 12px; margin-top: 10px; }
.vnote .label { margin: 0 0 2px; }

/* video details popup + file drop */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; margin: 0; }
.modal-card .head { margin-bottom: 0; }
.modal-card .x { border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--mut); }
.lib.over { outline: 2px dashed var(--ink); outline-offset: -6px; }
.vid .x.edit { border: 0; background: none; cursor: pointer; color: var(--mut); font-size: 1rem; padding: 4px; }
.vid .x.edit:hover { color: var(--ink); }
.chipv { cursor: pointer; }

/* persona avatars + platform badges */
.grid { grid-template-columns: 200px repeat(7, minmax(128px, 1fr)); min-width: 1100px; }
.rh .row.tight { gap: 8px; min-width: 0; }
.rh .grow { min-width: 0; display: flex; flex-direction: column; }
.ppic { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--soft); border: 1px solid var(--line); }
.ppic.init { display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--mut); }
.ppic.sm { width: 22px; height: 22px; font-size: .7rem; vertical-align: middle; margin-right: 6px; }
.pchips { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
summary .pchips { margin-left: 8px; }
.pchips.full { display: flex; gap: 6px; margin-top: 4px; }
.pc { display: inline-flex; align-items: center; gap: 4px; font-size: .64rem; font-weight: 800; letter-spacing: .02em; padding: 2px 5px; border-radius: 5px; color: #fff; text-decoration: none; line-height: 1.3; }
.pc .u { font-weight: 600; font-size: .78rem; letter-spacing: 0; }
.pchips.full .pc { padding: 3px 8px; }
.pc.tiktok { background: #111; }
.pc.instagram { background: #c13584; }
.pc.facebook { background: #1877f2; }
.pc.youtube { background: #e00; }
.pc.off { background: var(--soft); color: var(--mut); border: 1px dashed var(--line); }
a.pc:hover { opacity: .85; }
.howto p { margin: 0 0 6px; }
.lib input[type=search] { padding: 7px 10px; font-size: .86rem; }

/* persona duplicates */
.warnbox { background: #fff7e6; border: 1px solid #f3c56b; color: #6b4a00; border-radius: 10px; padding: 10px 12px; font-size: .86rem; }
.rh .btn.dupe { align-self: flex-start; margin-top: 4px; padding: 3px 8px; font-size: .74rem; color: var(--bad); border-color: var(--bad); }
select.mergesel { width: auto; padding: 5px 8px; font-size: .82rem; }
@media (prefers-color-scheme: dark) { .warnbox { background: #2c2414; border-color: #8a6420; color: #f0b354; } }
