:root {
  --fundo: #120f1c; --painel: #1c1729; --painel2: #241d35; --borda: #352b4f; --texto: #ece8f6; --suave: #a79fbd;
  --roxo: #b794ff; --roxo-forte: #8b5cf6; --verde: #4ade80; --amarelo: #facc15; --vermelho: #f87171; --azul: #7cc4ff;
  --raio: 12px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--roxo); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { width: 100%; background: #0f0c18; border: 1px solid var(--borda); border-radius: 9px; padding: 10px 12px; }
input[type="checkbox"] { width: 18px !important; height: 18px; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--roxo-forte); }
label:has(> input[type="checkbox"]) { display: flex !important; flex-direction: row; align-items: center; gap: 8px; }
input[type="file"] { padding: 8px; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--roxo); outline-offset: 2px; }
label { display: block; font-size: 13px; color: var(--suave); margin: 12px 0 5px; }
h1 { font-size: 26px; margin: 4px 0 6px; letter-spacing: -.5px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--suave); margin: 0 0 18px; font-size: 14px; }
.erro { color: var(--vermelho); font-size: 14px; min-height: 1em; }
.erro-bloqueio { background: #4a0d12; border: 2px solid #ef4444; color: #fecaca; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 10px 0; }
.erro-bloqueio b { color: #fff; }
.erro-bloqueio ul { margin: 6px 0 0 18px; padding: 0; }
.aviso { background: #3a2f0e; border: 1px solid #6b5716; color: #fde68a; padding: 10px 12px; border-radius: 9px; font-size: 14px; margin: 10px 0; }
.ok { color: var(--verde); }
.escondido { display: none !important; }

.botao { border: 1px solid var(--borda); background: var(--painel2); padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.botao:hover { border-color: var(--roxo); }
.botao:disabled { opacity: .5; cursor: not-allowed; }
.botao.primario { background: linear-gradient(120deg, #7c3aed, #a855f7); border-color: #a855f7; font-weight: 600; }
.botao.perigo { border-color: #7f2d2d; color: #fecaca; }
.botao.pequeno { padding: 5px 10px; font-size: 13px; }
.botao.largo { width: 100%; margin-top: 16px; }

/* Login */
.tela-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-caixa { width: 100%; max-width: 380px; background: var(--painel); border: 1px solid var(--borda); border-radius: 16px; padding: 28px; }
.marca { font-weight: 700; font-size: 20px; letter-spacing: -.5px; display: flex; gap: 8px; align-items: center; }
.marca b { color: var(--roxo); }
.marca-icone { color: var(--roxo); }

/* Layout */
.app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.lateral { background: #0d0a16; border-right: 1px solid var(--borda); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.lateral .marca { padding: 0 8px 14px; }
.nav { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 9px; cursor: pointer; color: var(--suave); }
.nav:hover { background: var(--painel); color: var(--texto); }
.nav.ativa { background: var(--painel2); color: var(--texto); }
.lateral .rodape { margin-top: auto; font-size: 13px; color: var(--suave); padding: 8px; }
.principal { padding: 22px 28px 60px; max-width: 1300px; width: 100%; }
.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.chave { display: inline-flex; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; }
.chave button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; color: var(--suave); }
.chave button.ativa { background: var(--roxo-forte); color: #fff; }

.painel { background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; margin-bottom: 16px; }
.grade { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linha.fim { justify-content: flex-end; }
.cartoes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.cartao { background: var(--painel2); border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px; }
.cartao .cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.miniatura { width: 100%; max-height: 340px; object-fit: contain; background: #0b0912; border-radius: 9px; border: 1px dashed var(--borda); min-height: 120px; display: block; }
.solta { outline: 2px dashed var(--roxo); }
.selo { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #2f2547; color: var(--roxo); border: 1px solid var(--borda); }
.selo.pc { color: var(--azul); }
.selo.mac { color: #f0abfc; }
.selo.verde { color: var(--verde); }
.selo.vermelho { color: var(--vermelho); }
.selo.amarelo { color: var(--amarelo); }
details summary { cursor: pointer; color: var(--suave); font-size: 13px; margin: 8px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { color: var(--suave); font-weight: 500; }

.lote { background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); margin-bottom: 14px; }
.lote > .cab { padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--borda); }
.receita { padding: 12px 16px; border-bottom: 1px solid #2a2240; }
.receita:last-child { border-bottom: 0; }
.barra { height: 6px; background: #2b2340; border-radius: 99px; overflow: hidden; margin: 6px 0; }
.barra > i { display: block; height: 100%; background: var(--verde); }
.revisao { background: #241a10; border: 1px solid #6b4a16; border-radius: 10px; padding: 12px; margin-top: 8px; }
.revisao video { width: 100%; max-height: 420px; background: #000; border-radius: 8px; }
.pequeno { font-size: 12px; color: var(--suave); }

/* Linha do tempo (estilo CapCut) */
.lt { outline: none; user-select: none; }
.lt:focus-visible { outline: 2px solid var(--roxo); outline-offset: 4px; border-radius: 8px; }
.lt-barra { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.lt-tempo { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 56px; }
.lt-area { position: relative; padding: 10px 0 4px; }
.lt-trilha { position: relative; height: 64px; background: #0b0912; border-radius: 8px; cursor: pointer; touch-action: none; overflow: visible; }
.lt-trecho { position: absolute; top: 0; bottom: 0; background: #3b2f5c center / cover no-repeat; border: 2px solid #1a1428; border-radius: 6px; box-sizing: border-box; }
.lt-trecho.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--roxo); z-index: 1; }
.lt-trecho.fora { background: repeating-linear-gradient(-45deg, #3b0d10 0 8px, #24080a 8px 16px); opacity: .85; }
.lt-x { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fecaca; font-weight: 700; text-transform: uppercase; }
.lt-aparado { position: absolute; top: 0; bottom: 0; background: #000b; pointer-events: none; z-index: 2; }
.lt-ponto { position: absolute; top: -4px; bottom: -4px; width: 12px; margin-left: -6px; cursor: ew-resize; z-index: 3; }
.lt-ponto::after { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: #fff; border-radius: 2px; }
.lt-ponta { position: absolute; top: -6px; bottom: -6px; width: 14px; margin-left: -7px; background: var(--amarelo); border-radius: 4px; cursor: ew-resize; z-index: 4; box-shadow: 0 0 0 2px #000; }
.lt-ponta::after { content: '⋮'; position: absolute; inset: 0; display: grid; place-items: center; color: #000; font-weight: 900; font-size: 12px; }
.lt-cursor { position: absolute; top: 2px; bottom: 0; width: 14px; margin-left: -7px; background: linear-gradient(90deg, transparent 6px, #ef4444 6px, #ef4444 8px, transparent 8px); z-index: 7; cursor: ew-resize; touch-action: none; }
.lt-cursor span { position: absolute; top: -10px; left: -2px; width: 18px; height: 18px; background: #ef4444; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 0 0 2px #0008; }
.lt-cursor:hover span { background: #f87171; }
.lt-trilha .lt-trecho { cursor: pointer; }
.lt-num { position: absolute; left: 4px; top: 3px; font-size: 10px; font-weight: 700; color: #fff; background: #1f5f63; border-radius: 3px; padding: 1px 6px; pointer-events: none; white-space: pre; max-width: calc(100% - 10px); overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.lt-tira { position: absolute; inset: 0; display: flex; overflow: hidden; border-radius: 4px; pointer-events: none; }
.lt-quadro { flex: 1 1 0; min-width: 0; background: #3b2f5c center / cover no-repeat; border-right: 1px solid #0004; }
.lt-trecho.sel { border: 3px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px #000; }
.lt-alca { position: absolute; top: -3px; bottom: -3px; width: 12px; background: #fff; cursor: ew-resize; z-index: 6; border-radius: 4px; }
.lt-alca.esq { left: -7px; }
.lt-alca.dir { right: -7px; }
.lt-alca::after { content: ''; position: absolute; left: 4px; top: 30%; bottom: 30%; width: 4px; border-left: 2px solid #555; border-right: 2px solid #555; }
.lt-ima { font-size: 12px; padding: 4px 8px; border-radius: 6px; background: #2f2547; color: var(--roxo); border: 1px solid var(--borda); }
/* Emendas (transicao entre dois pedacos) */
.lt-junta { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 8; width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 15px; line-height: 1; color: #fff; background: #1a1428; border: 2px solid #fff; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px #0008; }
.lt-junta:hover { background: #3b2f5c; }
.lt-junta.com { background: var(--roxo-forte); border-color: #fde68a; color: #fde68a; }
.lt-junta.sel { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.lt-junta-nome { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 700; color: #fde68a; background: #2f2547; border: 1px solid #8b5cf6; border-radius: 6px; padding: 1px 6px; }
.lt-junta-barra { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 8px 10px; border: 1px solid var(--roxo); border-radius: 10px; background: #1f1933; }
.lt-rolagem { overflow-x: auto; overflow-y: hidden; padding: 6px 10px 8px; margin: 0 -10px; }
.lt-conteudo { width: 100%; min-width: 100%; }
.lt-zoom-barra { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.lt-zoom { width: 160px; max-width: 40vw; }
.lt-regua { position: relative; height: 16px; font-size: 10px; color: var(--suave); }
.lt-regua span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

.lote.fila-espera { border: 2px dashed var(--amarelo); background: #241f10; }

/* Receita terminou: faixa grande verde (sucesso) ou vermelha (erro) */
.final-receita { display: flex; gap: 14px; align-items: center; margin: 10px 0 4px; padding: 14px 18px; border-radius: 12px; font-size: 14px; }
.final-receita b { display: block; font-size: 20px; letter-spacing: .5px; }
.final-receita span { display: block; }
.final-icone { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.final-receita.ok { background: #14532d; border: 2px solid #22c55e; color: #dcfce7; }
.final-receita.erro { background: #7f1d1d; border: 2px solid #ef4444; color: #fee2e2; }
.final-receita.erro .final-icone { width: 40px; height: 40px; display: grid; place-items: center; background: #ef4444; color: #fff; border-radius: 50%; font-weight: 900; font-size: 22px; }

/* Quadros das etapas no Monitor */
.etapas { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 10px 0 4px; }
.etapa { background: var(--painel2); border: 1px solid var(--borda); border-radius: 10px; padding: 8px 10px; font-size: 13px; min-height: 64px; }
.etapa-cab { display: flex; gap: 6px; align-items: center; }
.etapa-icone { font-size: 16px; }
.etapa-estado { font-size: 12px; margin-top: 2px; color: var(--suave); }
.etapa-detalhe { font-size: 12px; margin-top: 4px; color: var(--texto); overflow-wrap: anywhere; }
.etapa details summary { margin: 4px 0 0; font-size: 12px; }
.etapa-prompt { font-size: 12px; white-space: pre-wrap; max-height: 220px; overflow: auto; background: #0f0c18; border-radius: 6px; padding: 6px; margin: 4px 0 0; }
.etapa-midia { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #000; border-radius: 7px; margin-top: 6px; }
.etapa-audio { width: 100%; height: 32px; margin-top: 6px; }
.etapa-tentativas { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.etapa-tentativas .botao { padding: 2px 8px; font-size: 11px; }
.etapas.unica { grid-template-columns: minmax(0, 420px); }
.etapas-trilha { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.etapa-bolinha { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; background: var(--painel2); border: 1px solid var(--borda); opacity: .5; }
.etapa-bolinha.feito { background: #13261c; border-color: #1f5f3a; color: var(--verde); opacity: 1; font-weight: 700; }
.etapa-bolinha.atual { border: 2px solid var(--amarelo); opacity: 1; animation: etapa-pulsa 1.6s ease-in-out infinite; }
.etapa-bolinha.erro, .etapa-bolinha.revisar { border: 2px solid #ef4444; background: #3b0d10; opacity: 1; }
.etapa.espera { opacity: .5; }
.etapa.feito { border-color: #1f5f3a; }
.etapa.feito .etapa-estado { color: var(--verde); }
.etapa.atual { border-color: var(--amarelo); animation: etapa-pulsa 1.6s ease-in-out infinite; }
.etapa.atual .etapa-estado { color: var(--amarelo); font-weight: 600; }
.etapa.erro { border: 2px solid #ef4444; background: #2a0f12; }
.etapa.erro .etapa-estado { color: #fecaca; font-weight: 700; }
.etapa.revisar { border: 2px solid #ef4444; background: repeating-linear-gradient(-45deg, #3b0d10 0 14px, #2a0f12 14px 28px); animation: borda-pulsa 1.2s infinite; }
.etapa.revisar .etapa-estado { color: #fff; font-weight: 900; }
@keyframes etapa-pulsa { 0%, 100% { box-shadow: 0 0 0 0 #facc1555; } 50% { box-shadow: 0 0 0 5px #facc1500; } }

/* Titulos das 3 caixas (roteiros, acoes, prompts) bem visiveis */
.rotulo-caixa { font-size: 16px; font-weight: 700; color: var(--texto); margin: 14px 0 8px; letter-spacing: .1px; }
.rotulo-caixa .obrigatorio { color: #f87171; }
.rotulo-caixa .opcional-txt { font-weight: 400; font-size: 13px; color: var(--suave); }

.ref-bloco { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--borda); border-radius: 12px; background: var(--painel2); }

/* Voz da narracao (gerar x subir) */
.voz-opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.voz-opcao { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: 12px; border: 2px solid var(--borda); background: var(--painel2); cursor: pointer; color: var(--texto); }
.voz-opcao b { font-size: 16px; }
.voz-opcao:hover { border-color: var(--roxo); }
.voz-opcao.ativa { border-color: var(--roxo-forte); background: #2f2547; box-shadow: 0 0 0 3px #8b5cf633; }
.voz-icone { font-size: 26px; }
.voz-zona { margin-top: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed var(--roxo); border-radius: 14px; background: #1f1933; cursor: pointer; color: var(--texto); }
.voz-zona:hover, .voz-zona.solta { background: #2a2145; border-color: #c4b5fd; }
.voz-zona b { font-size: 17px; }
.voz-zona-icone { font-size: 34px; }
.voz-linha { font-size: 13px; margin: 8px 0 4px; padding: 6px 10px; border-radius: 8px; background: #241d35; color: var(--suave); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.voz-linha.ok { color: var(--verde); background: #13261c; }
.voz-linha.falta { color: #fecaca; background: #2a0f12; border: 1px solid #7f2d2d; }

/* Campos opcionais: fechados, abrem ao clicar */
details.opcional { margin-top: 12px; }
details.opcional > summary { cursor: pointer; color: var(--texto); font-size: 14px; padding: 10px 12px; border: 1px dashed var(--borda); border-radius: 9px; list-style-position: inside; }
details.opcional > summary:hover { border-color: var(--roxo); }
details.opcional[open] > summary { margin-bottom: 8px; }
details.painel.opcional { padding: 12px 18px; }
details.painel.opcional > summary { border: 0; padding: 4px 0; }

/* ===== Produções e editor ===== */
@font-face { font-family: 'LegendaBlack'; src: url('/fontes/Montserrat-Black.ttf') format('truetype'); font-style: normal; font-display: swap; }
@font-face { font-family: 'LegendaBlack'; src: url('/fontes/Montserrat-BlackItalic.ttf') format('truetype'); font-style: italic; font-display: swap; }
.grade-videos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cartao-video { background: var(--painel); border: 1px solid var(--borda); border-radius: var(--raio); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cartao-video video { width: 100%; aspect-ratio: 9/16; object-fit: contain; background: #000; border-radius: 9px; }
.cv-info b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.baixar { border: 0; border-radius: 10px; padding: 12px; font-weight: 800; font-size: 16px; letter-spacing: .5px; cursor: pointer; color: #fff; background: #dc2626; width: 100%; }
.baixar:hover { background: #b91c1c; }
.baixar.feito { background: #16a34a; }
.baixar.feito:hover { background: #15803d; }
.botao.largo-meio { width: 100%; }

.editor { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 20px; align-items: start; }
.editor-prev { position: sticky; top: 12px; }
.prev-quadro { position: relative; width: 100%; max-height: 78vh; margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; container-type: inline-size; }
.prev-quadro video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer; }
.prev-headline, .prev-legenda { position: absolute; left: 6.5cqw; right: 6.5cqw; text-align: center; font-family: 'LegendaBlack', 'Arial Black', sans-serif; pointer-events: none; line-height: 1.15; z-index: 10; }
/* Safari (Mac): o video com zoom/transform era desenhado POR CIMA da legenda. Camada propria resolve. */
.prev-legenda { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
.prev-quadro video { position: relative; z-index: 1; }
.prev-headline { left: 50%; right: auto; top: 14%; transform: translate(-50%, -50%); width: max-content; max-width: 87cqw; margin: 0; padding: .18em .3em; pointer-events: auto; cursor: move; touch-action: none; user-select: none; font-size: calc(62 / 1080 * 100cqw * var(--esc, 1)); white-space: pre-line; color: #fff; --c: #e11d2a; background: var(--c); }
.prev-headline[data-cor="preto"] { --c: #000; }
.prev-headline[data-cor="amarelo"] { --c: #f5c518; color: #000; }
.prev-headline[data-cor="branco"] { --c: #fff; color: #000; }
.prev-legenda.pos-baixo { bottom: 20%; }
.prev-legenda.pos-cima { top: 24%; }
.prev-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
/* Zoom no editor: camada por cima do video com alcas nos cantos */
.prev-quadro video { transition: transform .05s linear; }
.zoom-camada { position: absolute; inset: 0; z-index: 20; cursor: move; border: 2px dashed #fff; box-shadow: inset 0 0 0 2px #0006; touch-action: none; }
.zoom-alca { position: absolute; width: 22px; height: 22px; background: #fff; border: 3px solid var(--roxo-forte); border-radius: 50%; }
.zoom-alca.no { left: 3px; top: 3px; cursor: nwse-resize; }
.zoom-alca.ne { right: 3px; top: 3px; cursor: nesw-resize; }
.zoom-alca.so { left: 3px; bottom: 3px; cursor: nesw-resize; }
.zoom-alca.se { right: 3px; bottom: 3px; cursor: nwse-resize; }
.prev-legenda.pos-meio { top: 50%; -webkit-transform: translate3d(0, -50%, 0); transform: translate3d(0, -50%, 0); }
.prev-legenda span, .amostra span { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.est1 { font-size: calc(70 / 1080 * 100cqw * var(--esc, 1)); text-transform: uppercase; color: #fff; letter-spacing: .02em; }
.est1 > span { background: #000; padding: .1em .25em; }
.est1[data-cor="amarelo"] > span { background: #f5c518; color: #000; }
.est1[data-cor="vermelho"] > span { background: #e11d2a; }
.est2 { font-size: calc(80 / 1080 * 100cqw * var(--esc, 1)); color: #fff; -webkit-text-stroke: .05em #000; paint-order: stroke fill; }
.est2 > span { background: #e6c21a; padding: .08em .25em; border-radius: .18em; }
.est3 { font-size: calc(76 / 1080 * 100cqw * var(--esc, 1)); font-style: italic; color: #fff; -webkit-text-stroke: .08em #000; paint-order: stroke fill; text-shadow: 0 .04em 0 #000; }
.est3 .falada { color: #ffd60a; }
.est4 { font-size: calc(118 / 1080 * 100cqw * var(--esc, 1)); text-transform: uppercase; color: #fff; text-shadow: 0 .06em .08em #000c; -webkit-text-stroke: .015em #000; }
.cenas-editor { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cena-ed { background: var(--painel2); border: 1px solid var(--borda); border-radius: 10px; padding: 8px; }
.cena-ed img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 7px; cursor: pointer; background: #000; display: block; }
.cena-ed label { margin: 6px 0 4px; color: var(--texto); font-size: 13px; }
.cena-ed.fora { opacity: .45; }
.cena-ed.fora img { filter: grayscale(1); }
.cena-ed .cortes { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; align-items: center; }
.cena-ed .cortes input { padding: 4px 6px; font-size: 13px; }
.estilos-leg { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 6px; }
.estilo-btn { background: #3a3a40; border: 2px solid transparent; border-radius: 10px; padding: 14px 6px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 92px; justify-content: space-between; container-type: inline-size; }
.estilo-btn.ativa { border-color: var(--roxo); background: #2f2547; }
.estilo-btn small { color: var(--suave); font-size: 11px; }
.amostra { font-family: 'LegendaBlack', 'Arial Black', sans-serif; font-size: 17px !important; line-height: 1.1; }
.amostra.est4 { font-size: 22px !important; }
.video-pronto { width: 100%; max-height: 420px; background: #000; border-radius: 9px; margin: 6px 0; }
@media (max-width: 960px) { .editor { grid-template-columns: 1fr; } .editor-prev { position: static; max-width: 380px; margin: 0 auto; } }

/* ===== Alerta de revisao (bem visivel) ===== */
.faixa-revisar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; cursor: pointer;
  padding: 14px 22px; color: #fff; font-size: 15px; border-bottom: 3px solid #fff;
  background: repeating-linear-gradient(-45deg, #dc2626 0 28px, #991b1b 28px 56px); animation: faixa-pulsa 1.2s ease-in-out infinite; }
.faixa-revisar b { font-size: 20px; letter-spacing: .5px; text-shadow: 0 2px 0 #00000066; }
.faixa-revisar span { font-weight: 600; }
.faixa-revisar .faixa-botao { margin-left: auto; background: #fff; color: #b91c1c; padding: 8px 18px; border-radius: 999px; font-weight: 800; font-size: 15px; }
@keyframes faixa-pulsa { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.selo-revisar { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 8px; border-radius: 999px;
  background: #dc2626; color: #fff; font-weight: 800; font-size: 12px; animation: faixa-pulsa 1.2s infinite; }
.nav[data-aba="monitor"]:has(.selo-revisar) { color: #fecaca; font-weight: 700; }
/* Produções com video novo: piscando em vermelho com sirene */
.nav.nav-alerta { color: #fff; font-weight: 800; background: #7f1d1d; animation: nav-pisca 1s steps(2, start) infinite; }
.nav.nav-alerta.ativa { background: #991b1b; }
@keyframes nav-pisca { 0% { background: #b91c1c; box-shadow: 0 0 0 2px #fca5a5; } 50% { background: #450a0a; box-shadow: none; } 100% { background: #b91c1c; } }
.selo-novos { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #fff; color: #b91c1c; font-weight: 900; font-size: 12px; }

.lote.lote-revisar { border: 2px solid #dc2626; box-shadow: 0 0 0 4px #dc262633; }
.receita.precisa-revisar { position: relative; overflow: hidden; background: #2a0f12; border: 3px solid #ef4444; border-radius: 10px; margin: 8px;
  padding-top: 18px; scroll-margin-top: 90px; animation: borda-pulsa 1.2s ease-in-out infinite; }
@keyframes borda-pulsa { 0%, 100% { box-shadow: 0 0 0 0 #ef444499; } 50% { box-shadow: 0 0 0 8px #ef444400; } }
.tarja-revisar { position: absolute; top: 34px; right: -78px; width: 300px; transform: rotate(35deg); text-align: center; z-index: 2; pointer-events: none;
  background: #dc2626; color: #fff; font-weight: 900; font-size: 22px; letter-spacing: 6px; padding: 8px 0;
  border-top: 3px solid #fff; border-bottom: 3px solid #fff; box-shadow: 0 4px 14px #000a; }
.receita.precisa-revisar > .tarja-revisar + .linha { padding-right: 150px; }
/* Sugestoes da IA (headline e titulo do Facebook) */
.sugestoes { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.sugestao { background: #2f2547; color: #fff; border: 1px solid #8b5cf6; border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 13px; cursor: pointer; text-align: left; }
.sugestao:hover { background: #4c1d95; }
.titulo-fb-item { display: flex; gap: 8px; align-items: flex-start; width: 100%; }
.titulo-fb-item .titulo-fb { flex: 1; min-height: 64px; }
/* Caixa "ja baixou, quer apagar?" */
.caixa-apagar { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 1000; padding: 16px; }
.caixa-apagar-card { background: #1f1933; border: 2px solid #8b5cf6; border-radius: 14px; padding: 18px 20px; max-width: 440px; width: 100%; box-shadow: 0 10px 40px #000c; }
.caixa-apagar-card h3 { margin: 0 0 8px; color: #86efac; }
/* Receita pronta: tarja verde na diagonal */
.receita.concluida { position: relative; overflow: hidden; border: 2px solid #16a34a; border-radius: 10px; margin: 8px; padding-top: 18px; background: #0d1f14; }
.tarja-ok { position: absolute; top: 58px; right: -112px; width: 420px; transform: rotate(32deg); text-align: center; z-index: 2; pointer-events: none;
  background: #16a34a; color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 1.5px; padding: 7px 0;
  border-top: 3px solid #fff; border-bottom: 3px solid #fff; box-shadow: 0 4px 14px #000a; }
.receita.concluida > .tarja-ok + .linha { padding-right: 190px; }
@media (max-width: 600px) { .tarja-ok { font-size: 11px; right: -120px; top: 30px; } .receita.concluida > .tarja-ok + .linha { padding-right: 110px; } }
.receita.precisa-revisar .revisao { background: #3b0d10; border: 2px solid #ef4444; }
.receita.precisa-revisar .revisao h3 { color: #fecaca; font-size: 18px; }
.receita.destaque { outline: 4px solid #fff; outline-offset: 2px; }
.prazo-revisao { font-weight: 800; font-size: 18px; color: #fde68a; }
.prazo-revisao.urgente { color: #fff; background: #dc2626; padding: 0 8px; border-radius: 6px; }
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--painel2); border: 1px solid var(--roxo); padding: 12px 16px; border-radius: 10px; max-width: 380px; z-index: 50; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 16px; }
  .lateral .marca { width: 100%; padding-bottom: 6px; }
  .lateral .rodape { width: 100%; margin-top: 4px; }
  .principal { padding: 16px; }
  .cartoes { grid-template-columns: 1fr; }
}
