/* Creative Machine · BotConversa
   Casca: barra lateral escura com o símbolo da marca; à direita, a mesa de trabalho clara.
   Cores da marca: azul #3868C7 e verde #76C451 do símbolo. */

:root {
  --bg: #F3F5F8;
  --panel: #FFFFFF;
  --panel-2: #F8F9FB;
  --ink: #14171B;
  --muted: #5B636D;
  --faint: #8A939D;
  --line: #DDE2E8;
  --line-2: #E9EDF1;
  --chip: #EEF1F5;
  --brand: #3868C7;
  --brand-2: #2E58AC;
  --brand-soft: #E8EEFA;
  --green: #76C451;
  --green-ink: #2F7A12;
  --danger: #C8372B;
  --danger-soft: #FBEAE8;
  --hl: #FFD84A;
  --side: #12161C;
  --side-ink: #E6E9ED;
  --side-muted: #8E97A1;
  --side-line: #252B33;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
  --radius: 8px;
  --ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --display: "Archivo Narrow", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1216; --panel: #171B21; --panel-2: #1B2027; --ink: #E9ECEF; --muted: #A1A9B3; --faint: #7D8691;
    --line: #2A3038; --line-2: #232930; --chip: #222830; --brand: #6E95E8; --brand-2: #8AABF0; --brand-soft: #1D2A44;
    --green-ink: #8FD46D; --danger: #F0675B; --danger-soft: #3A1E1C; --side: #0A0C0F; --side-line: #1E232A;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- boot / login ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 500px at 15% 10%, rgba(56,104,199,.16), transparent 60%),
  radial-gradient(700px 400px at 90% 90%, rgba(118,196,81,.14), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.login-brand small { color: var(--muted); font-size: 13px; }
.login form { display: flex; flex-direction: column; gap: 10px; }
.login .divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.login .divider::before, .login .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login .note { font-size: 12.5px; color: var(--muted); }
.login .err { background: var(--danger-soft); color: var(--danger); padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 10px 14px; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn-google:hover { background: var(--panel-2); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; text-decoration: none; color: inherit; }
.brand img { width: 30px; height: 30px; }
.brand b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.brand small { display: block; font-size: 11px; color: var(--side-muted); letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--side-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover { background: var(--side-line); }
.nav a.on { background: #fff; color: #14171B; }
.nav a .ic { width: 18px; text-align: center; opacity: .85; }
.nav a .k { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--side-muted); }
.nav a.on .k { color: #5B636D; }
.side-h { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); margin: 0 10px 6px; font-weight: 600; }
.side .camp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--side-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me button { background: transparent; border: 1px solid var(--side-line); color: var(--side-muted); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.me button:hover { color: var(--side-ink); }
.devflag { font-size: 11px; color: #1A1E23; background: var(--hl); border-radius: 4px; padding: 3px 7px; font-weight: 600; align-self: flex-start; }
.menu-btn { display: none; }
main { min-width: 0; padding: 26px 30px 80px; }
.view { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-h .lede { color: var(--muted); margin-top: 6px; max-width: 72ch; }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; background: var(--brand); color: #fff; border-radius: 7px; padding: 8px 14px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--brand-2); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--panel); color: var(--danger); border-color: var(--line); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.rec { background: #D7372B; }
.btn.rec:hover { background: #B82E24; }
.btn.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { border: 0; background: transparent; color: var(--muted); padding: 4px 6px; border-radius: 5px; }
.iconbtn:hover { background: var(--chip); color: var(--ink); }
input[type=text], input[type=email], input[type=date], input[type=search], input[type=url], input:not([type]), select, textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 14px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 0; }
label.f > span { display: flex; justify-content: space-between; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input[type=search] { width: 240px; }
.toolbar select { width: auto; min-width: 140px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; background: var(--chip); color: var(--muted); padding: 2px 8px; border-radius: 999px; text-decoration: none; white-space: nowrap; font-weight: 500; }
.chip.code { font-family: var(--mono); border-radius: 4px; color: var(--ink); }
.chip.warn { background: #D7372B; color: #fff; }
.chip.prio { background: var(--hl); color: #14171B; }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
a.chip:hover { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12.5px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--chip); color: var(--ink); white-space: nowrap; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; overflow: hidden; background: var(--brand); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.avatar.empty { background: transparent; border: 1.5px dashed var(--faint); color: var(--faint); }

/* ---------- boxes ---------- */
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.box-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.kpi:hover { border-color: var(--faint); }
.kpi b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.empty { font-size: 13.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.progress { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--chip); }
.progress span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.legend .dot { margin-right: 5px; vertical-align: -1px; }

/* ---------- activity ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.feed-item:first-child { border-top: 0; }
.feed-item a { color: var(--ink); font-weight: 600; text-decoration: none; }
.feed-item a:hover { text-decoration: underline; }
.feed-item small { display: block; color: var(--faint); font-size: 12px; }
.feed-item q { color: var(--muted); }

/* ---------- creative cards / board ---------- */
.cards { display: flex; flex-direction: column; gap: 8px; }
.ccard { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 8px; text-decoration: none; color: inherit; position: relative; box-shadow: var(--shadow); }
.ccard:hover { border-color: var(--faint); }
.ccard.dragging { opacity: .45; }
.ccard.out { opacity: .6; }
.thumb { width: 46px; aspect-ratio: 9/16; border-radius: 4px; background: var(--chip) center/cover no-repeat; display: grid; place-items: center; color: var(--faint); font-size: 18px; }
.ccard .meta { font-family: var(--mono); font-size: 11px; color: var(--faint); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .t { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: block; margin: 1px 0 4px; }
.ccard .t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Cartão com um só desenho: código, título, linha de status e funil, rodapé numa linha (onde à esquerda, comentários e responsável à direita). */
.ccard .tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ccard .foot { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-height: 24px; }
.ccard .where { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.ccard .camp { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.ccard .camp .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ccard .camp .lbl { overflow: hidden; text-overflow: ellipsis; }
.ccard .cmt { flex: none; }
.ccard .owner-btn { flex: none; }
.board-wrap { overflow-x: auto; padding-bottom: 10px; margin: 0 -4px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; padding: 0 4px; min-width: min-content; align-items: start; }
.col { display: flex; flex-direction: column; gap: 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.col-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; padding: 2px 2px 6px; }
.col-h b { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.col .empty { padding: 10px; font-size: 12.5px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.code { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
td a.title { color: var(--ink); font-weight: 600; text-decoration: none; }
td a.title:hover { text-decoration: underline; }
td select { padding: 4px 26px 4px 8px; font-size: 13px; width: auto; }

/* ---------- creative detail ---------- */
.c-head { display: flex; flex-direction: column; gap: 10px; }
input.title-input[type=text] { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; border: 1px solid transparent; background: transparent; padding: 2px 6px; margin-left: -7px; border-radius: 6px; width: 100%; line-height: 1.2; }
input.title-input[type=text]:hover { border-color: var(--line); }
input.title-input[type=text]:focus { background: var(--panel); }
.status-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.status-bar button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px 5px 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.status-bar button:hover { color: var(--ink); border-color: var(--faint); }
.status-bar button[aria-pressed="true"] { color: #fff; border-color: transparent; }
.status-bar button[aria-pressed="true"] .dot { background: #fff !important; }
.c-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.c-main, .c-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields .full { grid-column: 1 / -1; }
.saved { font-size: 12px; color: var(--faint); font-weight: 500; }
.saved.on { color: var(--green-ink); }
.tabs { display: inline-flex; gap: 2px; background: var(--chip); padding: 3px; border-radius: 7px; }
.tabs button { border: 0; background: transparent; padding: 4px 12px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.script { display: flex; flex-direction: column; gap: 11px; }
.script .d { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line); }
.script .rh { font-family: var(--mono); font-size: 12px; color: #D7372B; }
.script .rh::before { content: "RE-HOOK · "; font-weight: 500; }
.script .f { font-size: 16px; line-height: 1.6; max-width: 68ch; }
.script-help { font-size: 12px; color: var(--muted); }
.script-help code { font-family: var(--mono); background: var(--chip); padding: 0 4px; border-radius: 3px; }
textarea.script-edit { min-height: 420px; font-size: 14.5px; }
.meter { display: flex; flex-direction: column; gap: 4px; }
.meter strong { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.meter .bar { height: 8px; background: var(--chip); border-radius: 4px; position: relative; }
.meter .bar span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--ink); }
.meter .bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #D7372B; }
.meter small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.changed { font-size: 13.5px; background: var(--panel-2); border-radius: 6px; padding: 10px 12px; border: 1px solid var(--line-2); }
.changed b { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.bul { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.bul .sub { margin-left: 14px; list-style: circle; color: var(--muted); }
.t03 table { min-width: 560px; font-size: 13px; }
.t03 td:first-child { font-family: var(--mono); white-space: nowrap; color: #D7372B; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.comment .body { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment small { color: var(--faint); font-size: 12px; display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
.comment small button { border: 0; background: none; color: var(--faint); font-size: 12px; padding: 0; }
.comment small button:hover { color: var(--danger); }
.links { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.banner { background: var(--hl); color: #14171B; border-radius: 7px; padding: 10px 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.danger-zone { border-color: var(--line); }

/* storyboard (mesma linguagem do painel Estúdio Black) */
.sgrid { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 18px; }
.refs { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ref { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: start; }
.ref.main { grid-template-columns: minmax(0, 1fr); }
.ref video { width: 100%; aspect-ratio: 9/16; object-fit: cover; background: #000; border-radius: 5px; display: block; }
.ref.main video { max-width: 210px; }
.ref p { font-size: 12.5px; line-height: 1.45; }
.ref p b { display: block; font-weight: 700; }
.ref p small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.fr { flex: 0 0 180px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.scr { position: relative; aspect-ratio: 9/16; border-radius: 5px; overflow: hidden; background: #000; container-type: inline-size; }
.scr > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scr.dim > img.bg { filter: brightness(.42); }
.scr.zoom > img.bg { transform: scale(1.12); }
.tc { position: absolute; left: 6px; top: 6px; font-family: var(--mono); font-size: 10.5px; background: rgba(0,0,0,.72); color: #fff; padding: 1px 5px; border-radius: 2px; z-index: 3; }
.tc.rh { background: #D7372B; }
.t-title { position: absolute; left: 7%; right: 7%; top: 13%; text-align: center; font-family: var(--display); font-weight: 700; color: #fff; font-size: 8.6cqi; line-height: 1.08; text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,.85); display: flex; flex-direction: column; gap: 2px; z-index: 2; }
.t-sub { position: absolute; left: 8%; right: 8%; bottom: 17%; text-align: center; font-weight: 600; color: #fff; font-size: 6.4cqi; line-height: 1.22; text-shadow: 0 1px 3px rgba(0,0,0,.9); z-index: 2; }
.y { color: var(--hl); }
.t-card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; font-family: var(--display); font-weight: 700; color: #fff; text-transform: uppercase; font-size: 11cqi; line-height: 1.02; text-align: center; padding: 0 8%; z-index: 2; }
.t-card span:first-child { font-size: 1.5em; }
.stamp { position: absolute; right: 6px; bottom: 7px; font-family: var(--mono); font-size: 6.5cqi; color: #fff; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 2px; z-index: 2; }
.timer { position: absolute; right: 7px; top: 30px; font-family: var(--mono); font-size: 7cqi; color: #fff; background: #D7372B; padding: 1px 6px; border-radius: 3px; z-index: 2; }
.big { position: absolute; inset: auto 0 22% 0; text-align: center; font-family: var(--display); font-weight: 700; font-size: 30cqi; color: var(--hl); text-shadow: 0 2px 8px rgba(0,0,0,.8); z-index: 2; line-height: 1; }
.inset { position: absolute; left: 28%; right: 28%; bottom: 9%; aspect-ratio: 9/16; border-radius: 7px; overflow: hidden; border: 2px solid #fff; z-index: 2; }
.inset img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.label { position: absolute; left: 8%; right: 8%; top: 30%; text-align: center; font-family: var(--display); font-weight: 700; font-size: 8cqi; color: #14171B; background: var(--hl); padding: 2px 4px; border-radius: 2px; z-index: 2; }
.demo { position: absolute; right: 6px; top: 6px; font-family: var(--mono); font-size: 6cqi; color: #fff; border: 1px solid #fff; padding: 0 4px; z-index: 3; }
.cap { font-size: 12px; line-height: 1.42; }
.snd { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.snd::before { content: "♪ "; }

/* ---------- campaigns ---------- */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.camp-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; border-top: 4px solid var(--c, var(--brand)); }
.camp-card:hover { border-color: var(--faint); border-top-color: var(--c, var(--brand)); }
.camp-card p { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- assets ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; box-shadow: var(--shadow); }
.acard:hover { border-color: var(--faint); }
.prev { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--panel-2); position: relative; overflow: hidden; }
.prev.checker { background-color: #fff; background-image: linear-gradient(45deg, #EEF1F5 25%, transparent 25%), linear-gradient(-45deg, #EEF1F5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EEF1F5 75%), linear-gradient(-45deg, transparent 75%, #EEF1F5 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.prev.dark { background: #1A1E23; }
.prev img { max-width: 80%; max-height: 70%; object-fit: contain; }
.prev img.cover, .prev video { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.prev .swatch { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.prev .font-sample { font-size: 42px; font-weight: 700; color: var(--ink); }
.prev .doc { font-size: 34px; color: var(--faint); }
.prev .kind { position: absolute; left: 8px; top: 8px; font-size: 11px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.prev .pin { position: absolute; right: 8px; top: 8px; font-size: 12px; }
.acard .info { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acard .info b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard .info small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); font-size: 13.5px; background: var(--panel); }
.dropzone.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.asset-modal .big-prev { border-radius: 8px; overflow: hidden; aspect-ratio: auto; min-height: 220px; max-height: 60vh; }
.asset-modal .big-prev img, .asset-modal .big-prev video { max-height: 58vh; max-width: 100%; object-fit: contain; }

/* ---------- library ---------- */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.fmt-top { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
.fmt-top video, .fmt-top .novid { width: 92px; aspect-ratio: 9/16; border-radius: 5px; background: #000; object-fit: cover; display: block; }
.fmt-top .novid { display: grid; place-items: center; text-align: center; font-family: var(--mono); font-size: 10px; color: #9AA3AD; padding: 6px; }
.kv { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.kv b { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: block; }
.three { background: var(--panel-2); border-left: 3px solid #D7372B; padding: 8px 10px; font-size: 13.5px; border-radius: 0 6px 6px 0; }
.three b { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #D7372B; font-weight: 600; display: block; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.rule ol, .rule ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.channels div { background: var(--panel-2); border-radius: 6px; padding: 10px; font-size: 13px; }
.channels b { display: block; font-size: 16px; font-weight: 800; }
.ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ba div { border-radius: 6px; padding: 10px 12px; font-size: 13.5px; background: var(--panel-2); }
.ba .bad { border-left: 3px solid var(--faint); }
.ba .good { border-left: 3px solid var(--green); }
.ba b { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.ba .bad p { color: var(--muted); }
.ba p { margin: 0 0 4px; }

/* ---------- team ---------- */
.people { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.person:first-child { border-top: 0; }
.person .avatar { width: 36px; height: 36px; font-size: 13px; }
.person .who b { display: block; font-weight: 600; }
.person .who small { color: var(--muted); font-size: 12.5px; }
.person .acts { display: flex; gap: 8px; align-items: center; }
.person .acts select { width: auto; padding: 5px 28px 5px 9px; font-size: 13px; }
.person.off { opacity: .55; }

/* ---------- modal / toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,12,15,.55); z-index: 60; display: grid; place-items: center; padding: 20px 16px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; display: flex; flex-direction: column; }
.modal.wide { width: min(860px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-b { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--panel); }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 13.5px; box-shadow: var(--shadow-lg); max-width: min(360px, calc(100vw - 32px)); animation: tin .18s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- teleprompter ---------- */
.tp { position: fixed; inset: 0; z-index: 90; background: var(--tp-bg, #000); color: var(--tp-fg, #F2F2F2); display: flex; flex-direction: column; }
.tp-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 16px; background: #111; font-family: var(--mono); font-size: 12px; color: #9AA3AD; }
.tp-bar button { background: #2A2F35; border: 0; color: #fff; border-radius: 4px; padding: 6px 12px; font-family: var(--mono); font-size: 12.5px; }
.tp-bar button.play { background: #D7372B; }
.tp-bar label { display: flex; align-items: center; gap: 6px; }
.tp-bar input[type=range] { width: 110px; accent-color: #D7372B; }
.tp-bar .sp { margin-left: auto; }
.tp-scroll { flex: 1; overflow-y: auto; padding: 38vh 24px 75vh; scrollbar-width: none; }
.tp-text { max-width: 24ch; margin: 0 auto; font-family: var(--ui); font-weight: 500; line-height: 1.38; transition: font-size .15s; }
.tp-text p { margin: 0 0 .9em; }
.tp-text .tpr { font-family: var(--mono); font-size: .38em; color: #F0574B; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 .8em; }
.tp.mirror .tp-text { transform: scaleX(-1); }
.tp-guide { position: fixed; left: 0; right: 0; top: 40vh; height: 2px; background: rgba(215,55,43,.55); pointer-events: none; z-index: 91; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .c-grid, .home-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(84vw, 290px); z-index: 50; transform: translateX(-102%); transition: transform .2s; }
  body.menu .side { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: var(--side); color: var(--side-ink); border: 0; width: 100%; padding: 10px 16px; font-weight: 700; font-size: 15px; }
  .menu-btn img { width: 22px; height: 22px; }
  main { padding: 18px 16px 64px; }
  .fields, .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .sgrid { grid-template-columns: minmax(0, 1fr); }
  .toolbar input[type=search] { width: 100%; }
  .link-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ba, .channels { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } .toast { animation: none; } }

/* quadro desenhado em HTML (tabela do anúncio 14) */
.scr .tbl { position: absolute; inset: 0; background: #0F1318; display: flex; flex-direction: column; justify-content: center; gap: 5%; padding: 0 7%; font-family: var(--mono); color: #E9ECEF; font-size: 5.6cqi; z-index: 1; }
.scr .tbl .row { display: grid; grid-template-columns: 3.2em 1fr auto; gap: 4%; border-bottom: 1px solid #2B3138; padding-bottom: 3%; flex-wrap: nowrap; }
.scr .tbl .row b { color: #FFD84A; font-weight: 500; }
.scr .tbl .tot { font-family: var(--display); font-weight: 700; font-size: 10cqi; color: #fff; text-align: center; line-height: 1.05; }
.scr .tbl .tot span { color: #FFD84A; }

.asset-modal { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.chip.warn, .fgrid .chips .chip { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .asset-modal { grid-template-columns: minmax(0, 1fr); }
  .side { visibility: hidden; }
  body.menu .side { visibility: visible; }
  body.menu::after { content: ""; position: fixed; inset: 0; background: rgba(10,12,15,.4); z-index: 45; }
}

/* ficha enxuta */
select.status-select { width: auto; font-weight: 700; font-size: 13.5px; padding: 6px 30px 6px 12px; border-radius: 999px; border: 0; color: #fff; background-color: var(--st); background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); }
select.status-select option { color: var(--ink); background: var(--panel); }
details.fold { gap: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2::before { content: "▸ "; color: var(--faint); font-size: 13px; }
details.fold[open] > summary h2::before { content: "▾ "; }
details.fold[open] > summary { margin-bottom: 14px; }
details.fold > :not(summary) + * { margin-top: 12px; }
.hook-line { position: relative; }
.hook-tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; background: var(--hl); color: #14171B; padding: 0 6px; border-radius: 3px; margin-right: 8px; vertical-align: 2px; }

/* ficha: referência primeiro */
.hero .sgrid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; }
.hero .ref.main video { max-width: 280px; }
.hero .fr { flex-basis: 200px; }
.dur { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dur b { color: var(--ink); font-size: 15px; }
.worktabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.worktabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.worktabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
@media (max-width: 860px) { .hero .sgrid { grid-template-columns: minmax(0, 1fr); } }

/* revisão e arquivos finais */
.review { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid #D0632B; }
.review.adjust { border-left-color: #B83280; }
.review.done { border-left-color: #178A6E; }
.finals { display: flex; flex-direction: column; gap: 12px; }
.final { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: start; border-top: 1px solid var(--line-2); padding-top: 12px; }
.final:first-child { border-top: 0; padding-top: 0; }
.final video { width: 110px; max-height: 190px; border-radius: 6px; background: #000; object-fit: contain; }

.head-note { font-size: 13.5px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #D0632B; border-radius: 6px; padding: 8px 12px; }
.head-note.adjust { border-left-color: #B83280; }
.head-note.done { border-left-color: #178A6E; }

/* responsável no cartão */
.owner-btn { border: 0; background: none; padding: 2px; border-radius: 50%; display: inline-flex; }
.owner-btn:hover { box-shadow: 0 0 0 2px var(--brand-soft); }
.avatar.add { background: var(--chip); color: var(--muted); border: 1px dashed var(--faint); font-size: 13px; font-weight: 600; line-height: 1; }
.owner-btn:hover .avatar.add { color: var(--brand); border-color: var(--brand); }
.owner-pop { position: fixed; z-index: 70; width: 220px; max-height: 250px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; display: flex; flex-direction: column; }
.owner-pop button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 8px; border-radius: 5px; font-size: 13.5px; text-align: left; }
.owner-pop button:hover, .owner-pop button.on { background: var(--chip); }
.head-note.v1 { border-left-color: #2F6FD6; }

/* ---------- Biblioteca › Referências ---------- */
.refwrap { display: flex; flex-direction: column; gap: 14px; }
.reftools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reftools input[type=search] { flex: 1 1 260px; min-width: 0; }
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.refcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.refcard:hover { border-color: var(--muted); box-shadow: var(--shadow); }
.refthumb { width: 96px; aspect-ratio: 9/16; border-radius: 6px; overflow: hidden; background: #000; display: grid; place-items: center; color: #9AA3AD; font-family: var(--mono); font-size: 11px; }
.refthumb img { width: 400%; max-width: none; height: auto; align-self: start; justify-self: start; display: block; }
.refbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.refbody h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.refmeta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; flex-wrap: wrap; }
.reffmt { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.reffrase { margin: 0; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.refnums { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: auto; }
.refview .page-h .refnums { margin-top: 6px; }
.refhero { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.refhero > figure { margin: 0; flex: 0 0 auto; width: min(100%, 260px); display: flex; flex-direction: column; gap: 6px; }
.refhero > figure img { width: 100%; border-radius: 6px; border: 1px solid var(--line); display: block; }
.refhero > figure figcaption { font-size: 12px; color: var(--muted); }
.refhero video { width: 100%; aspect-ratio: 9/16; background: #000; border-radius: var(--radius); display: block; }
.refintro { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.reftools select { width: auto; flex: 0 0 auto; }
.refshots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.refshots figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.refshots img { width: 100%; border-radius: 6px; border: 1px solid var(--line); display: block; }
.refshots figcaption { font-size: 12px; color: var(--muted); }
.refsections { display: flex; flex-direction: column; gap: 14px; }
.mdbox { font-size: 14px; line-height: 1.55; gap: 10px; }
.mdbox h2 { margin: 0; font-size: 17px; }
.mdbox h3 { margin: 10px 0 0; font-size: 15px; }
.mdbox h4, .mdbox h5 { margin: 6px 0 0; font-size: 14px; }
.mdbox p, .mdbox ul, .mdbox ol { margin: 0; }
.mdbox ul, .mdbox ol { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.mdbox blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }
.mdbox pre { margin: 0; padding: 10px; background: var(--chip); border-radius: 6px; white-space: pre-wrap; font-size: 12.5px; }
.mdbox code { font-family: var(--mono); font-size: 12.5px; background: var(--chip); padding: 1px 4px; border-radius: 4px; }
details.mdbox > summary { cursor: pointer; list-style: none; }
details.mdbox > summary::-webkit-details-marker { display: none; }
details.mdbox > summary h2::before { content: '▸ '; color: var(--muted); }
details.mdbox[open] > summary h2::before { content: '▾ '; }
.mdtable { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.mdtable table { border-collapse: collapse; width: 100%; font-size: 13px; }
.mdtable th, .mdtable td { text-align: left; vertical-align: top; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.mdtable th { background: var(--chip); font-weight: 600; white-space: nowrap; }
.mdtable tr:last-child td { border-bottom: 0; }
.mdtable td:first-child { white-space: nowrap; font-family: var(--mono); font-size: 12px; }
@media (max-width: 720px) {
  .refhero > figure { width: min(100%, 320px); }
}

.refthumb { position: relative; }
.refplay { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); pointer-events: none; }
.novideo { aspect-ratio: 9/16; width: 100%; border-radius: var(--radius); background: #111; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center; padding: 16px; }
.novideo .play { font-size: 36px; }
.novideo small { color: #9AA3AD; }
.refthumb.full img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Canais (uma ideia por tela) ---------- */
.ch { gap: 28px; max-width: 1080px; }
.ch-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ch-head h1, .ch-hero h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; }
.ch-sub { margin-top: 8px; color: var(--muted); font-size: 16px; }
.ch-av { --c: var(--brand); width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 auto;
  background: color-mix(in srgb, var(--c) 14%, var(--panel)); color: var(--c); font-weight: 800; font-size: 18px; }
.ch-av.sm { width: 28px; height: 28px; font-size: 13px; }
.ch-av.lg { width: 72px; height: 72px; font-size: 30px; }
.ch-id { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.ch-id h2 { font-size: 19px; }
.ch-id > div > span { color: var(--muted); font-size: 14px; }
.ch-id.lg { gap: 20px; align-items: flex-start; }
.ch-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.ch-mix { display: inline-flex; gap: 14px; font-variant-numeric: tabular-nums; font-weight: 700; }
.ch-mix span { display: inline-flex; align-items: center; gap: 6px; }
.ch-mix i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.ch-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 22px;
  color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; min-height: 220px; }
.ch-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.ch-tag { font-size: 17px; line-height: 1.45; color: var(--ink); }
.ch-card .ch-tag { flex: 1; }
.ch-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.ch-foot .ch-mix { color: var(--ink); }

.ch-cmp { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; overflow-x: auto; }
.ch-cmp table { width: 100%; border-collapse: collapse; min-width: 640px; }
.ch-cmp th, .ch-cmp td { text-align: left; vertical-align: top; padding: 18px 22px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; line-height: 1.5; }
.ch-cmp tr:last-child th, .ch-cmp tr:last-child td { border-bottom: 0; }
.ch-cmp tbody th { width: 150px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.ch-cmp tbody th .ch-dot { margin-right: 8px; }
.ch-cmp thead th { padding-top: 22px; }
.ch-cmp thead .ch-id b { font-size: 15px; }
.ch-stack { display: flex; flex-direction: column; gap: 4px; }

.ch-hero { display: flex; flex-direction: column; gap: 22px; }
.ch-back { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.ch-back:hover { color: var(--ink); }
.ch-hero-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.ch-handle { margin-top: 4px; color: var(--muted); }
.ch-handle a { color: var(--muted); text-decoration: none; }
.ch-handle a:hover { color: var(--brand); }
.ch-hero .ch-tag { margin-top: 10px; color: var(--muted); max-width: 52ch; }
.ch-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ch-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; }
.ch-stats > div { padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line-2); }
.ch-stats > div:last-child { border-right: 0; }
.ch-stats b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.ch-stats .ch-mix { font-size: 22px; line-height: 1.35; gap: 16px; }
.ch-stats span:not(.ch-mix):not(.ch-mix span) { color: var(--muted); font-size: 13px; }
.ch-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ch-tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ch-tabs a:hover { color: var(--ink); }
.ch-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.ch-body { display: flex; flex-direction: column; gap: 18px; }

.ch-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.ch-col { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; }
.ch-colh { width: 100%; display: flex; align-items: center; gap: 14px; padding: 22px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; text-align: left; }
.ch-colh:hover { background: var(--panel-2); }
.ch-colh > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.ch-colh b { font-size: 17px; }
.ch-colh small { color: var(--muted); font-size: 13px; }
.ch-pct { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 2.4ch; }
.ch-i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-style: italic; font-weight: 700; color: var(--muted); font-family: Georgia, serif; }
.ch-list { list-style: none; margin: 0; padding: 6px 0; }
.ch-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 22px; border: 0; background: transparent; text-align: left; font-size: 15px; }
.ch-list button:hover { background: var(--panel-2); }
.ch-chev { color: var(--faint); font-size: 20px; line-height: 1; }
.ch-empty { padding: 16px 22px; color: var(--muted); }

.ch-sheet { display: flex; flex-direction: column; gap: 16px; font-size: 15px; line-height: 1.55; }
.ch-sheet h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ch-sheet ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.ch-pillfun { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }

.ch-week-wrap { display: flex; flex-direction: column; gap: 16px; }
.ch-legend { display: flex; gap: 18px; color: var(--muted); font-size: 13.5px; }
.ch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ch-week { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; }
.ch-day { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.ch-day:last-child { border-bottom: 0; }
.ch-day h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ch-day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ch-day li { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); }
.ch-day li span::first-letter { text-transform: uppercase; }
.ch-note { color: var(--muted); font-size: 14px; max-width: 80ch; }

.ch-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; }
.ch-rules section { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; }
.ch-rules h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ch-rules ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ch-rules li { padding-left: 24px; position: relative; }
.ch-yes li::before { content: '✓'; position: absolute; left: 0; color: var(--green-ink); font-weight: 700; }
.ch-no li::before { content: '✕'; position: absolute; left: 0; color: var(--danger); font-weight: 700; }

.planform { display: flex; flex-direction: column; gap: 12px; }
.planform h3 { margin: 10px 0 0; }
.planform fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.planform legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.pilform { display: flex; flex-direction: column; gap: 10px; }
.pilrow { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.pilrow > .btn { align-self: flex-start; }
.ch-semform { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.fun { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; color: var(--fc); background: color-mix(in srgb, var(--fc) 14%, transparent); }

@media (max-width: 640px) {
  .ch-card { padding: 22px; min-height: 0; }
  .ch-stats > div { padding: 12px; }
  .ch-stats b { font-size: 20px; }
  .ch-stats .ch-mix { font-size: 15px; gap: 7px; }
  .ch-stats .ch-mix span { gap: 4px; }
  .ch-stats span:not(.ch-mix):not(.ch-mix span) { font-size: 11px; }
  .ch-av.lg { width: 56px; height: 56px; font-size: 24px; }
  .ch-hero .ch-actions { width: 100%; }
  .ch-hero .ch-actions .btn { flex: 1; }
  .ch-day { grid-template-columns: 1fr; gap: 8px; padding: 14px 18px; }
}

/* Vídeos do criativo: o que aparece primeiro muda com a etapa (gravação, versões para revisar, no ar). */
.vhero { gap: 16px; }
.vhero h2 { margin-top: 2px; }
.vhero.empty { align-items: flex-start; }
.vgroup { display: flex; flex-direction: column; gap: 8px; }
.vgroup + .vgroup { border-top: 1px solid var(--line); padding-top: 14px; }
.vgroup-h { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.vgrid { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.vcard { margin: 0; display: flex; flex-direction: column; gap: 6px; width: 128px; flex: none; }
.vcard.lg { width: 200px; }
.vcard video, .vcard .vtile { width: 100%; border-radius: 8px; background: #0F1318; object-fit: cover; }
.vcard video { display: block; }
.vcard .vtile { display: flex; }
.vcard figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.vcard figcaption .chip { align-self: flex-start; }
.vtile { position: relative; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff; background: linear-gradient(160deg, #1D232B, #0F1318); border: 1px solid var(--line); }
.vtile:hover .vplay { transform: scale(1.08); background: var(--brand); }
.vplay { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 16px; padding-left: 3px; transition: transform .15s, background .15s; }
.vwhere { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: 10.5px; color: #B8C0C8; }
.vtile.sm { width: 64px; border-radius: 6px; }
.vtile.sm .vplay { width: 28px; height: 28px; font-size: 11px; }
.planfold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.planfold > summary::before { content: "▸"; color: var(--muted); font-size: 12px; }
.planfold[open] > summary::before { content: "▾"; }
.planfold > summary::-webkit-details-marker { display: none; }
.planfold > .hero { border: 0; padding: 0; box-shadow: none; margin-top: 12px; background: none; }
@media (max-width: 560px) { .vcard { width: 112px; } .vcard.lg { width: calc(50% - 7px); } }

.vgrid.strip-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.vgrid.strip-x .vcard { scroll-snap-align: start; }
.vcard figcaption b { font-size: 13px; }
.planfold { padding: 14px 20px; } .planfold:not([open]) { gap: 0; }
.final video.sm { width: 110px; max-height: 196px; border-radius: 6px; background: #000; object-fit: cover; }
.vcard video { background: #0F1318 center / cover no-repeat; }
.vmodal { display: flex; justify-content: center; gap: 12px; } .vmodal video, .vmodal .vtile { width: min(320px, 100%); max-height: 70vh; border-radius: 8px; background: #000; }

/* Pendência: um aviso para alguém resolver; clicável no topo do criativo. */
button.chip.warn.pend { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #FDECEA; color: #B42318; box-shadow: inset 0 0 0 1px #F5C2BC; }
button.chip.warn.pend:hover { background: #FBD9D4; }
.ccard .chip.warn.pend { background: #FDECEA; color: #B42318; font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
/* "O que mudou da v1" com editar */
.changed { display: flex; flex-direction: column; gap: 6px; }
.changed-h { display: flex; align-items: center; justify-content: space-between; }
.changed-h b { margin: 0; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--brand); font-size: 12.5px; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
/* Tabela dos 3 primeiros segundos em edição */
.t03.edit table { min-width: 0; table-layout: fixed; width: 100%; }
.t03.edit th:last-child, .t03.edit td:last-child { width: 30px; padding: 6px 0; }
.t03.edit td { padding: 4px; vertical-align: top; }
.t03.edit th:first-child, .t03.edit td:first-child { width: 70px; }
.t03.edit textarea.cell { width: 100%; min-height: 0; resize: vertical; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; background: var(--panel); color: var(--ink); }
.t03.edit td:first-child textarea.cell { font-family: var(--mono); color: #D7372B; }
/* Comentários */
.comment { align-items: start; }
.comment > .avatar { margin-top: 1px; }
.comment small b { color: var(--ink); font-weight: 600; }
.comment.sys { grid-template-columns: 20px minmax(0, 1fr); }
.comment.sys .sys-ic { width: 20px; height: 20px; display: grid; place-items: center; color: var(--faint); font-size: 14px; }
.comment.sys .body { background: transparent; border: 0; border-left: 2px solid var(--line); border-radius: 0; padding: 2px 0 2px 10px; color: var(--muted); }
.comment.sys small b { color: var(--muted); }

/* Teleprompter: voz e ajustes */
.tp .w { cursor: pointer; border-radius: .12em; transition: opacity .25s, background .2s; }
.tp.dim-read .w.read { opacity: .32; }
.tp .w.now { background: rgba(215, 55, 43, .28); box-shadow: 0 0 0 .08em rgba(215, 55, 43, .28); }
.tp.no-rh .tpr { display: none; }
.tp-bar { position: relative; z-index: 93; }
.tp-bar button:disabled { opacity: .5; }
.tp-bar button[aria-expanded="true"] { background: #fff; color: #111; }
.tp-status { color: #F0574B; }
.tp-heard { color: #6B7480; font-style: italic; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-title { color: #6B7480; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30ch; }
.tp-panel { position: fixed; top: 54px; right: 12px; z-index: 94; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 70px); overflow-y: auto; background: #15181C; color: #E6E9ED; border: 1px solid #2C3239; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); font-family: var(--ui); font-size: 13.5px; }
.tp-ph { margin: 0; font-weight: 700; font-size: 15px; }
.tp-opt { display: flex; flex-direction: column; gap: 6px; }
.tp-opt > span:first-child { display: flex; flex-direction: column; gap: 2px; color: #C9CFD6; }
.tp-opt small { color: #7D8691; font-size: 12px; line-height: 1.35; }
.tp-opt:has(input[type=checkbox]) { flex-direction: row; align-items: center; justify-content: space-between; }
.tp-opt input[type=checkbox] { width: 18px; height: 18px; accent-color: #D7372B; }
.tp-range { display: flex; align-items: center; gap: 10px; }
.tp-range input { flex: 1; accent-color: #D7372B; }
.tp-range b { min-width: 46px; text-align: right; font-family: var(--mono); font-size: 12px; font-weight: 500; color: #fff; }
.tp-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-seg button { border: 1px solid #2C3239; background: transparent; color: #C9CFD6; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; }
.tp-seg button[aria-pressed="true"] { background: #fff; color: #111; border-color: #fff; }
.tp-reset { align-self: flex-start; border: 0; background: none; color: #7D8691; padding: 0; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.tp-count { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; font-family: var(--ui); font-weight: 700; font-size: 30vh; color: #D7372B; pointer-events: none; text-shadow: 0 0 40px rgba(0,0,0,.6); }
@media (max-width: 700px) { .tp-heard, .tp-title { display: none; } }
.meta-names { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; } .meta-names code { font-family: var(--mono); font-size: 12px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 8px; overflow-wrap: anywhere; }

/* Envio para a Meta: uma barra por versão */
.uploading { border-left: 3px solid var(--brand); gap: 12px; }
.up-list { display: flex; flex-direction: column; gap: 10px; }
.up-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 260px); gap: 12px; align-items: center; font-size: 13.5px; }
.up-bar { height: 8px; border-radius: 999px; background: var(--chip, #E1E5EA); overflow: hidden; }
.up-bar span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .6s ease; }
.up-processando .up-bar span { background: repeating-linear-gradient(-45deg, var(--brand) 0 10px, color-mix(in srgb, var(--brand) 60%, #fff) 10px 20px); background-size: 28px 28px; animation: upstripe 1s linear infinite; }
.up-pronto .up-bar span { background: #1E8A55; }
.up-erro .up-bar span { background: #D7372B; width: 100% !important; }
.up-st { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pronto .up-st { color: #1E8A55; }
.up-erro .up-st { color: #D7372B; white-space: normal; }
@keyframes upstripe { to { background-position: 28px 0; } }
@media (max-width: 640px) { .up-row { grid-template-columns: 1fr; gap: 4px; } }
@media (prefers-reduced-motion: reduce) { .up-processando .up-bar span { animation: none; } }

/* Cartão subindo para a Meta */
.ccard .cmeta { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; padding: 6px 8px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 9%, transparent); }
.ccard .cmeta-t { font-size: 11.5px; font-weight: 600; color: var(--brand); display: flex; align-items: center; gap: 6px; }
.ccard .cmeta-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: cmpulse 1.2s ease-in-out infinite; }
.ccard .cmeta-bar { height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 18%, transparent); overflow: hidden; }
.ccard .cmeta-bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .6s ease; }
.ccard .cmeta.err { background: #FDECEA; }
.ccard .cmeta.err .cmeta-t { color: #B42318; }
@keyframes cmpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ccard .cmeta-dot { animation: none; } }

/* Na Meta: cada versão com nome, ID e link */
.metahero { border-left: 3px solid #1E8A55; gap: 14px; }
.metahero h2 { margin-top: 2px; }
.meta-rows { display: flex; flex-direction: column; gap: 12px; }
.meta-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line-2, var(--line)); }
.meta-row:first-child { border-top: 0; padding-top: 0; }
.meta-row video.mini, .meta-row .vtile.mini { width: 64px; border-radius: 6px; background: #0F1318; object-fit: cover; display: block; }
.meta-row .vtile.mini .vplay { width: 26px; height: 26px; font-size: 10px; }
.meta-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13.5px; }
.meta-name { font-family: var(--mono); font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.mono { font-family: var(--mono); }
