:root {
  --fundo: #f6f4f1; --cartao: #fff; --linha: #e7e2dc; --texto: #1d1b19; --suave: #7a736b; --acento: #e4572e; --acento-2: #fdeee9;
  --ok: #1f9d55; --erro: #c62828; --raio: 14px; --sombra: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--texto);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fundo); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.topo { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 12px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linha); }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.marca img { width: 28px; height: 28px; }
.topo nav { display: flex; gap: 4px; flex: 1; }
.topo nav a { text-decoration: none; padding: 7px 14px; border-radius: 999px; color: var(--suave); font-size: 14px; }
.topo nav a.ativo { background: var(--acento-2); color: var(--acento); font-weight: 600; }
.pilula { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: #eee; color: var(--suave); white-space: nowrap; }
.pilula.ok { background: #e6f6ec; color: var(--ok); }
.pilula.erro { background: #fdecea; color: var(--erro); }
.pilula::before { content: "●"; margin-right: 6px; }
main { max-width: 1180px; margin: 0 auto; padding: 32px 28px 80px; }
h1 { font-size: 40px; line-height: 1.1; margin: 0 0 8px; letter-spacing: -.02em; }
h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
h3 { font-size: 17px; margin: 0 0 6px; }
.sub { color: var(--suave); margin: 0 0 22px; }
.cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); padding: 24px; }
.grade { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 860px) { .g3, .g4, .g5 { grid-template-columns: repeat(2, 1fr); } .g2 { grid-template-columns: 1fr; } h1 { font-size: 30px; } }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--linha); background: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: #cfc7bf; }
.btn.prim { background: var(--acento); border-color: var(--acento); color: #fff; }
.btn.prim:hover { filter: brightness(.95); }
.btn.peq { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--suave); text-decoration: underline; padding: 0; font-size: 13px; }
label.campo { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=url], input[type=password], input[type=number], select, textarea { width: 100%; border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; background: #fff; }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acento-2); border-color: var(--acento); }
.dica { font-size: 12px; color: var(--suave); margin-top: 6px; }
.linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entre { justify-content: space-between; }
.vazio { color: var(--suave); text-align: center; padding: 40px; }

/* Início */
.heroi { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; margin-bottom: 36px; }
.tipo { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.tipo .capa { height: 150px; border-radius: 10px; margin: -8px -8px 6px; }
.selo { position: absolute; top: 14px; left: 14px; font-size: 10px; font-weight: 800; letter-spacing: .08em; background: var(--acento); color: #fff; padding: 3px 8px; border-radius: 6px; }
.selo.cinza { background: #555; }
.lista-prod { display: flex; flex-direction: column; gap: 8px; }
.prod { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 12px; text-decoration: none; border: 1px solid transparent; }
.prod:hover { background: #fff; border-color: var(--linha); }
.prod .mini { width: 96px; aspect-ratio: 16/9; border-radius: 8px; background: #ddd center/cover; flex: none; }
.prod small { color: var(--suave); }

/* Assistente */
.passos { display: flex; gap: 0; margin: 10px 0 26px; }
.passo { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--suave); position: relative; }
.passo::after { content: ""; position: absolute; top: 15px; left: 60%; width: 80%; height: 2px; background: var(--linha); }
.passo:last-child::after { display: none; }
.passo b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--linha); background: #fff; z-index: 1; }
.passo.atual { color: var(--acento); font-weight: 700; } .passo.atual b { border-color: var(--acento); color: var(--acento); }
.passo.feito b { background: var(--acento); border-color: var(--acento); color: #fff; }
.rotulo-passo { font-size: 11px; letter-spacing: .1em; font-weight: 800; color: var(--acento); text-transform: uppercase; }
.opcao { border: 1.5px solid var(--linha); border-radius: 12px; padding: 16px; background: #fff; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.opcao:hover { border-color: #d6cdc4; }
.opcao.sel { border-color: var(--acento); background: var(--acento-2); }
.opcao .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f2eeea; font-size: 18px; }
.opcao.sel .ico { background: var(--acento); color: #fff; }
.opcao small { color: var(--suave); font-size: 12px; }
.estilo { padding: 0; overflow: hidden; }
.estilo .amostra { height: 84px; }
.estilo div.txt { padding: 10px 12px; }
.rodape-passo { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--linha); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f0ece8; border: 0; }
button.chip:hover { background: var(--acento-2); }
.assunto { cursor: pointer; }

/* Produção */
.cab-prod { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.secao { margin-top: 18px; }
.secao > h3 { display: flex; align-items: center; gap: 10px; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--acento); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.num.ok { background: var(--ok); }
.barra { height: 8px; border-radius: 99px; background: #eee; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--acento); transition: width .4s; }
.progresso-box { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: #fff7f4; border: 1px solid #f6d2c6; }
.giro { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #f3c2b3; border-top-color: var(--acento); animation: g 1s linear infinite; flex: none; }
@keyframes g { to { transform: rotate(360deg); } }
.trava { font-family: Consolas, monospace; font-size: 12px; background: #faf8f6; border: 1px solid var(--linha); border-radius: 10px; padding: 12px; white-space: pre-wrap; max-height: 130px; overflow: auto; }
.pers { display: flex; flex-direction: column; gap: 8px; }
.slot { aspect-ratio: 1; border: 2px dashed #d9d1c8; border-radius: 12px; display: grid; place-items: center; text-align: center; color: var(--suave); font-size: 12px; background: #fbfaf8 center/cover no-repeat; cursor: pointer; position: relative; }
.slot.cheio { border-style: solid; border-color: var(--linha); }
.slot.arrastando, .zona.arrastando { border-color: var(--acento); background-color: var(--acento-2); }
.zona { border: 2px dashed #d9d1c8; border-radius: 14px; padding: 22px; text-align: center; color: var(--suave); background: #fbfaf8; }
.cenas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cena { border: 1px solid var(--linha); border-radius: 12px; overflow: hidden; background: #fff; font-size: 12px; }
.cena .img { aspect-ratio: var(--prop, 16/9); max-height: 340px; margin: 0 auto; width: 100%; background: #eee center/cover; display: grid; place-items: center; color: #aaa; cursor: pointer; position: relative; }
.cena .img.arrastando { outline: 3px solid var(--acento); }
.cena .info { padding: 8px 10px; }
.cena .info p { margin: 4px 0 0; color: var(--suave); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cena .x { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 6px; font-size: 11px; padding: 2px 6px; display: none; }
.cena .img:hover .x { display: block; }
.lote { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--linha); border-radius: 10px; background: #fff; }
.lote .n { width: 26px; height: 26px; border-radius: 8px; background: #f0ece8; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.lote .meio { flex: 1; }
.lote small { color: var(--suave); }
.passos-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.passos-flow > div { background: #faf8f6; border: 1px solid var(--linha); border-radius: 12px; padding: 14px; font-size: 13px; }
.passos-flow b.n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--acento); color: #fff; font-size: 12px; margin-right: 6px; }
video.final { width: 100%; border-radius: 12px; background: #000; }
.aviso { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d1b19; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.aviso.erro { background: var(--erro); }
.modal-fundo { position: fixed; inset: 0; background: rgba(20,18,16,.55); display: grid; place-items: center; z-index: 40; }
.modal { width: min(520px, 92vw); max-height: 90vh; overflow: auto; }

/* Editor (escuro, como um editor de vídeo) */
body.modo-editor { background: #121214; color: #e9e9ec; }
body.modo-editor .topo { background: #18181b; border-color: #2a2a2f; }
body.modo-editor .topo nav a { color: #9a9aa2; }
body.modo-editor main { max-width: none; padding: 0; }
.ed { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: 48px 1fr 220px; height: calc(100vh - 57px); }
.ed-barra { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid #2a2a2f; background: #18181b; }
.ed-barra .titulo { flex: 1; font-weight: 600; font-size: 14px; color: #c9c9cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed .btn { background: #232328; border-color: #34343a; color: #e9e9ec; }
.ed .btn.prim { background: var(--acento); border-color: var(--acento); color: #fff; }
.ed-lado { border-right: 1px solid #2a2a2f; overflow: auto; background: #18181b; }
.abas { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #2a2a2f; }
.abas button { background: none; border: 0; color: #9a9aa2; padding: 10px 0; font-size: 12px; border-bottom: 2px solid transparent; }
.abas button.ativo { color: #fff; border-color: var(--acento); }
.painel { padding: 14px; font-size: 13px; }
.painel label.campo { color: #c9c9cf; }
.ed input[type=text], .ed select, .ed textarea { background: #232328; border-color: #34343a; color: #e9e9ec; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.preset { background: #232328; border: 1.5px solid #34343a; border-radius: 8px; height: 48px; display: grid; place-items: center; font-size: 13px; overflow: hidden; }
.preset.sel { border-color: var(--acento); }
.ed-palco { display: grid; place-items: center; padding: 16px; background: #0d0d0f; min-height: 0; }
.palco { position: relative; width: min(100%, calc((100vh - 57px - 48px - 220px - 70px) * 16 / 9)); aspect-ratio: 16/9; background: #000; overflow: hidden; border-radius: 6px; }
.palco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 0 0; }
.palco .leg { position: absolute; left: 8.3%; right: 8.3%; text-align: center; transform: translateY(-50%); line-height: 1.15; pointer-events: none; }
.palco .leg span.caixa { padding: .08em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.controles { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-variant-numeric: tabular-nums; color: #9a9aa2; font-size: 13px; }
.ed-tempo { grid-column: 1 / 3; border-top: 1px solid #2a2a2f; background: #18181b; display: flex; flex-direction: column; min-height: 0; }
.tl-ferr { display: flex; align-items: center; gap: 10px; padding: 6px 12px; font-size: 12px; color: #9a9aa2; }
.tl { position: relative; flex: 1; overflow-x: auto; overflow-y: hidden; }
.tl-dentro { position: relative; height: 100%; }
.trilha { position: absolute; left: 0; height: 56px; }
.tcena { position: absolute; top: 0; height: 56px; border-radius: 6px; background: #333 center/cover; border: 2px solid transparent; overflow: hidden; cursor: pointer; }
.tcena.sel { border-color: var(--acento); }
.tcena span { position: absolute; left: 4px; bottom: 2px; font-size: 10px; text-shadow: 0 1px 2px #000; }
.tleg { position: absolute; top: 0; height: 22px; border-radius: 4px; background: #6b4fd8; font-size: 10px; padding: 3px 5px; white-space: nowrap; overflow: hidden; color: #fff; cursor: pointer; }
.tleg:nth-child(even) { background: #5640b8; }
.cabeca { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--acento); pointer-events: none; z-index: 3; }
.cabeca::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--acento); }
canvas.onda { position: absolute; left: 0; height: 40px; }
.regua { position: absolute; top: 0; height: 18px; left: 0; font-size: 10px; color: #77777f; }
.regua span { position: absolute; top: 2px; }
.lista-leg { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.lista-leg input { font-size: 12px; padding: 6px 8px; }
.cena .img video.cena-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cena .selo-video { position: absolute; bottom: 6px; left: 6px; background: var(--acento, #ff5a1f); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.palco video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.palco.vertical { aspect-ratio: 9/16; width: auto; height: calc(100vh - 57px - 48px - 220px - 70px); max-width: 100%; }
.virais .opcao.viral { padding: 10px; gap: 6px; }
.virais .opcao.viral b { font-size: 13px; line-height: 1.3; }
.virais .capa { aspect-ratio: 16/9; border-radius: 8px; background: #222 center/cover; position: relative; }
.virais .capa span { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.virais .linha { margin-top: auto; }
