@font-face { font-family: "Raleway"; src: url("../assets/Raleway-Variable.ttf"); font-weight: 100 900; }

/* Paleta do Adobe Premiere Pro: cinzas neutros, azul Spectrum de destaque, clipes nas cores de rótulo padrão */
:root {
  --bg: #1a1a1a;
  --panel: #232323;
  --panel-2: #1d1d1d;
  --panel-3: #323232;
  --line: #3a3a3a;
  --text: #d9d9d9;
  --muted: #9b9b9b;
  --accent: #2680eb;
  --accent-2: #4b9cf5;
  --lilac: #8fc1ff;
  --ok: #2d9d78;
  --warn: #e68619;
  --err: #e34850;
  --playhead: #2680eb;
  --tc: #4b9cf5;
  --c-main: #9d8fd9;      /* Violeta: vídeo */
  --c-broll: #7fb4de;     /* Cerúleo: b-roll */
  --c-anim: #e090b8;      /* Rosa: gráficos */
  --c-text: #d9a0d0;      /* Magenta: textos */
  --c-caption: #e8b45a;   /* Manga: legendas */
  --c-bg: #b8a6de;        /* Lavanda: fundos */
  --c-trans: #6fc7bd;     /* Caribe: transições */
  --c-audio: #6cbb7c;     /* Floresta: áudio */
  --c-music: #5aa9a0;     /* Azul-petróleo: música */
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow: hidden;
  font: 13px/1.4 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  display: flex; flex-direction: column; user-select: none;
}
.hidden { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
kbd { font: 11px Consolas, monospace; color: var(--muted); margin-left: auto; padding-left: 24px; }

/* ---------- menu ---------- */
.menubar { height: 38px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 10px; background: #16151a; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.brand img { width: 20px; height: 20px; }
.brand b { color: var(--lilac); }
.menus { display: flex; gap: 2px; }
.menu { position: relative; padding: 5px 10px; border-radius: 5px; cursor: default; }
.menu:hover, .menu.open { background: var(--panel-3); }
.menu .drop { display: none; position: absolute; top: 100%; left: 0; z-index: 50; min-width: 260px; margin-top: 4px; padding: 5px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.menu.open .drop { display: block; }
.drop button { display: flex; width: 100%; padding: 6px 10px; background: none; border: 0; border-radius: 5px; text-align: left; cursor: pointer; }
.drop button:hover { background: var(--accent); }
.drop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.menubar .title { flex: 1; text-align: center; color: var(--muted); font-size: 12px; }
.menubar .right { display: flex; gap: 8px; align-items: center; }
.badge { font-size: 11.5px; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); color: var(--muted); cursor: pointer; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }

button { background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 6px 11px; cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border: 0; font-weight: 600; color: #fff; }
button.primary:hover { filter: brightness(1.12); }
button.small { padding: 4px 12px; }
button.ghost { background: transparent; }
button.icon { padding: 6px 9px; color: var(--muted); }
input, select, textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; outline: none; user-select: text; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=range] { padding: 0; accent-color: var(--accent); }
textarea { resize: vertical; }
label { display: block; color: var(--muted); font-size: 12px; margin-top: 8px; }
label > input, label > select, label > textarea, label > .row { margin-top: 3px; }
.check { display: flex; gap: 7px; align-items: center; color: var(--text); }
.hint { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 6px; align-items: center; }
.row.wrap { flex-wrap: wrap; margin-top: 10px; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grow { flex: 1; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--lilac); }

/* ---------- tela inicial ---------- */
/* ---------- tela inicial ----------
   Sala de edição: fundo quase preto com luz fria vindo de cima, faixas de cinema nas
   pontas, grão fino e tipografia de ficha técnica (rótulos pequenos em caixa alta e
   timecode em monoespaçada). Nada de cartão colorido ou canto redondo demais. */
.home { position: relative; flex: 1; display: flex; flex-direction: column; overflow: auto;
  background: #0e0e11; }
.home-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.home-bg i { position: absolute; display: block; border-radius: 50%; filter: blur(90px); }
.home-bg i:nth-child(1) { width: 820px; height: 460px; left: 50%; top: -260px; margin-left: -410px;
  background: radial-gradient(closest-side, rgba(38,128,235,.30), transparent); }
.home-bg i:nth-child(2) { width: 560px; height: 380px; right: -140px; bottom: -160px;
  background: radial-gradient(closest-side, rgba(143,193,255,.12), transparent); }
/* faixas de cinema, bem discretas, em cima e embaixo */
.home-bg .bars::before, .home-bg .bars::after { content: ""; position: absolute; left: 0; right: 0;
  height: 54px; background: #08080a; }
.home-bg .bars::before { top: 0; box-shadow: 0 1px 0 rgba(255,255,255,.04); }
.home-bg .bars::after { bottom: 0; box-shadow: 0 -1px 0 rgba(255,255,255,.04); }
.home::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }
.home > *:not(.home-bg) { position: relative; z-index: 1; }

.micro { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #6e6e78; }

/* topo: marca de um lado, ficha técnica do outro */
.home-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 76px clamp(28px, 6vw, 72px) 0; }
.home-brand { display: flex; align-items: center; gap: 16px; }
.home-brand img { width: 62px; height: 62px; }
.home h1 { margin: 0; font: 200 clamp(38px, 3.6vw, 52px)/1 "Raleway", "Segoe UI", sans-serif; letter-spacing: -.02em; color: #f2f2f4; }
.home h1 b { font-weight: 800; color: #fff; }
.tagline { display: block; margin-top: 4px; font-size: 12.5px; letter-spacing: .04em; color: #8a8a94; }
.home-meta { display: flex; align-items: center; gap: 14px; }
.tcbox { font: 12px/1 Consolas, ui-monospace, monospace; letter-spacing: .06em; color: #7fb4de;
  padding: 6px 10px; border: 1px solid #26262c; background: #141418; }
.home-meta .ver { font-size: 11.5px; color: #5f5f68; }

.home-rule { height: 1px; margin: 26px clamp(28px, 6vw, 72px) 0;
  background: linear-gradient(90deg, #2a2a32, #2a2a32 38%, transparent); }
.home-foot { display: flex; justify-content: space-between; gap: 16px; padding: 0 clamp(28px, 6vw, 72px) 22px;
  font: 11px Consolas, ui-monospace, monospace; letter-spacing: .04em; color: #55555e; }
.home-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* corpo: ações à esquerda, recentes à direita */
.home-grid { flex: 1 0 auto; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.15fr);
  gap: clamp(28px, 5vw, 64px); padding: 34px clamp(28px, 6vw, 72px) 76px; align-content: start; }
@media (max-width: 1000px) { .home-grid { grid-template-columns: 1fr; } }

.home-actions { display: grid; gap: 10px; align-content: start; min-width: 0; }
.home-actions .micro { margin-bottom: 4px; }
.act { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px; text-align: left; white-space: normal; cursor: pointer;
  background: #16161a; border: 1px solid #26262c; border-radius: 2px;
  transition: border-color .15s, background .15s, transform .15s; }
.act:hover { background: #1b1b21; border-color: #3a3a44; transform: translateX(2px); }
.act .act-ico { display: grid; place-items: center; width: 44px; height: 44px; font-size: 19px;
  color: #7fb4de; background: #101015; border: 1px solid #26262c; }
.act b { display: block; font-size: 15px; font-weight: 600; color: #ececf0; margin-bottom: 2px; }
.act .act-txt span { display: block; font-size: 12px; line-height: 1.45; color: #8a8a94; }
.act .act-go { font-size: 14px; color: #4a4a54; }
.act.main { background: linear-gradient(100deg, #15263a, #16161a 65%); border-color: #2f5680; }
.act.main:hover { border-color: var(--accent); background: linear-gradient(100deg, #183050, #17171d 65%); }
.act.main .act-ico { color: #fff; background: var(--accent); border-color: var(--accent); }
.act.main .act-go { color: #7fb4de; }

.home-help { display: flex; gap: 8px; margin-top: 14px; }
.home-help button { flex: 1; justify-content: center; display: flex; align-items: center; gap: 8px;
  padding: 9px; font-size: 12px; color: #8a8a94; background: transparent; border: 1px solid #26262c; border-radius: 2px; }
.home-help button:hover { color: #d9d9d9; border-color: #3a3a44; }
.home-help kbd { margin: 0; padding: 0; }

/* recentes: ficha de cada projeto, como num gerenciador de projetos */
.home-recent { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rec-head input { width: 190px; padding: 6px 9px; font-size: 12px; background: #141418;
  border: 1px solid #26262c; border-radius: 2px; color: var(--text); }
.rec-head input:focus { outline: none; border-color: #3a7fc4; }
.recent { display: grid; gap: 6px; align-content: start; max-height: min(52vh, 460px); overflow-y: auto; padding-right: 4px; }
.recent::-webkit-scrollbar { width: 10px; }
.recent::-webkit-scrollbar-thumb { background: #2c2c34; }
.rec-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto 22px; align-items: center; gap: 12px;
  padding: 10px 12px; text-align: left; cursor: pointer; background: #141418; border: 1px solid #22222a;
  border-radius: 2px; transition: border-color .15s, background .15s; }
.rec-item:hover { background: #1a1a20; border-color: #3a3a44; }
.rec-thumb { height: 34px; display: grid; place-items: center; font-size: 13px; color: #5f5f68;
  background: #0d0d11; border: 1px solid #22222a; }
.rec-item:hover .rec-thumb { color: #7fb4de; border-color: #2f5680; }
.rec-info { min-width: 0; }
.rec-info b { display: block; font-size: 13.5px; font-weight: 600; color: #e4e4e8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-info span { display: block; font-size: 11px; color: #71717b; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; direction: rtl; text-align: left; }
.rec-when { font: 11px Consolas, ui-monospace, monospace; color: #5f5f68; white-space: nowrap; }
.rec-x { width: 22px; height: 22px; padding: 0; display: grid; place-items: center; font-size: 11px;
  color: #6e6e78; background: transparent; border: 0; opacity: 0; transition: opacity .15s, color .15s; }
.rec-item:hover .rec-x { opacity: 1; }
.rec-x:hover { color: var(--err); }
.rec-empty { padding: 26px 16px; text-align: center; font-size: 12.5px; color: #71717b;
  border: 1px dashed #26262c; }

/* ---------- área de trabalho ---------- */
.workspace { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 6px; gap: 0; }
.top { display: flex; min-height: 160px; height: 58%; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.panel-head { padding: 7px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); flex: none; }
.vsplit { width: 6px; cursor: col-resize; flex: none; }
.hsplit { height: 6px; cursor: row-resize; flex: none; }
.vsplit:hover, .hsplit:hover { background: rgba(38,128,235,.45); border-radius: 3px; }

.library { width: 330px; flex: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); flex: none; }
.tabs button { background: none; border: 0; padding: 5px 8px; color: var(--muted); border-radius: 5px; font-size: 12px; }
.tabs button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.lib-tools { padding: 6px; display: flex; gap: 6px; flex: none; }
.lib-tools:empty { display: none; }
.lib-body { flex: 1; overflow: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; }
.lib-item { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; cursor: grab; }
.lib-item:hover { border-color: var(--accent); }
.lib-item .thumb { position: relative; aspect-ratio: 4/5; background: #0c0b10 center/cover no-repeat; overflow: hidden; }
.lib-item .thumb.wide { aspect-ratio: 16/9; }
.lib-item .thumb video, .lib-item .thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.lib-item .name { padding: 4px 6px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-item .meta { position: absolute; right: 4px; bottom: 4px; font-size: 10px; background: rgba(0,0,0,.65); padding: 1px 5px; border-radius: 4px; }
.lib-item .mini { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.lib-item.fx .thumb { display: grid; place-items: center; font-size: 30px; aspect-ratio: 16/10; background: #2b2b2b; }
.lib-item.snd .thumb { display: grid; place-items: center; font-size: 26px; aspect-ratio: 16/9; background: #263329; }
.lib-sec { grid-column: 1 / -1; display: grid; gap: 1px; margin: 6px 2px 0; }
.lib-sec b { font-size: 12px; }
.lib-item.capst { grid-column: span 2; }
.lib-empty { grid-column: 1/-1; color: var(--muted); text-align: center; padding: 30px 10px; }

.monitor { flex: 1; min-width: 260px; }
.rulers-wrap { position: relative; flex: 1; display: flex; min-height: 0; }
.rulers-wrap.with-rulers { padding: 18px 0 0 18px; }
.ruler-h { position: absolute; left: 18px; top: 0; z-index: 5; }
.ruler-v { position: absolute; left: 0; top: 18px; z-index: 5; }
/* fundo cinza ao redor do quadro + borda clara: dá para ver onde o vídeo termina (como no Premiere) */
.viewer { position: relative; flex: 1; background: #2b2b2b; overflow: auto; }
.viewer .stage { box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 4px 24px rgba(0,0,0,.6); }
.viewer .sizer { position: absolute; left: 0; top: 0; pointer-events: none; }
.mon-bar { flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.mon-bar select { width: auto; padding: 2px 6px; font-size: 12px; }
.mon-bar .tg { padding: 2px 8px; font-size: 11.5px; background: none; }
.mon-bar .tg.on { background: #1f3550; border-color: var(--accent); color: #fff; }
.stage .guides { position: absolute; inset: 0; z-index: 9999; pointer-events: none; }
.stage .guides i { position: absolute; background: rgba(255,255,255,.55); }
.stage .guides .v1, .stage .guides .v2, .stage .guides .cx { top: 0; bottom: 0; width: 2px; }
.stage .guides .h1, .stage .guides .h2, .stage .guides .cy { left: 0; right: 0; height: 2px; }
.stage .guides .v1 { left: 33.33%; } .stage .guides .v2 { left: 66.66%; }
.stage .guides .h1 { top: 33.33%; } .stage .guides .h2 { top: 66.66%; }
.stage .guides .cx { left: 50%; background: rgba(38,128,235,.7); } .stage .guides .cy { top: 50%; background: rgba(38,128,235,.7); }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #000; overflow: hidden; box-shadow: 0 0 0 1px #2a2833; }
.stage .layer { position: absolute; left: 0; top: 0; overflow: hidden; }
.stage video, .stage img { position: absolute; left: 0; top: 0; }
.tbox { position: absolute; border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6); cursor: move; z-index: 20; }
.tbox i { position: absolute; width: 10px; height: 10px; background: #fff; border: 1px solid #000; }
.tbox .nw { left: -6px; top: -6px; cursor: nwse-resize; }
.tbox .ne { right: -6px; top: -6px; cursor: nesw-resize; }
.tbox .sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.tbox .se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.safe { position: absolute; border: 1px dashed rgba(255,255,255,.35); pointer-events: none; }
.transport { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-top: 1px solid var(--line); }
.tbtns { display: flex; gap: 4px; }
.tbtns button { background: none; border: 0; font-size: 15px; padding: 4px 9px; }
.tbtns button:hover { background: var(--panel-3); }
.tbtns .play { width: 34px; height: 30px; padding: 0; font-size: 17px; }
.tc { font: 600 14px Consolas, "SF Mono", monospace; color: var(--tc); min-width: 100px; }
/* sequência vertical: o Monitor de programa vai para a coluna da direita, alto e estreito */
.workspace { flex-direction: row; }
.ws-left { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ws-right { display: flex; flex-direction: column; width: 32%; min-width: 260px; flex: none; }
.ws-right > .monitor { flex: 1; }
.workspace.layout-vertical .top { height: 50%; }
.workspace.layout-vertical #inspectorPanel { flex: 1; width: auto; }
.tc.dim { color: var(--muted); text-align: right; }

.inspector { width: 340px; flex: none; }
.panel-head.row { display: flex; align-items: center; gap: 4px; }
.insp-body { flex: 1; overflow: auto; padding: 8px 12px 20px; user-select: text; }
.insp-body h3 { margin: 6px 0 2px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.insp-body h4 { margin: 16px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.insp-body .chip { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: var(--panel-3); color: var(--muted); font-weight: 400; }
.field { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.field.col { grid-template-columns: 1fr; }
.field .inline { display: flex; gap: 6px; align-items: center; }
.field .inline input[type=range] { flex: 1; }
.field .inline input[type=number] { width: 70px; }
.field input[type=color] { width: 44px; height: 26px; padding: 0 2px; }

/* ---------- controles de efeito (minimalista, como no Premiere) ---------- */
.fx-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; margin-bottom: 2px; }
.fx-head b { font-size: 12px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-ruler, .kfrow { display: grid; grid-template-columns: 18px minmax(60px, 1fr) minmax(52px, auto) 42px minmax(64px, 36%); align-items: center; column-gap: 6px; }
.fx-ruler { grid-template-columns: 1fr minmax(64px, 36%); margin: 0 0 2px; }
.fx-ruler .kf-lane { height: 16px; display: flex; justify-content: space-between; align-items: center; padding: 0 3px; font: 10px Consolas, monospace; color: #6f7278; background: #1c1c1e; }
.fx-ruler em { font-style: normal; }
.fx-sec { border: 0; margin: 0; padding: 0; }
.fx-sec > summary { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 2px; color: #c9c9c9; font-weight: 500; font-size: 11.5px; list-style: none; cursor: default; border-top: 1px solid #2b2b2b; }
.fx-sec > summary::-webkit-details-marker { display: none; }
.fx-sec > summary::before { content: ""; width: 0; height: 0; border-left: 4px solid #8a8a8a; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; margin: 0 3px 0 2px; transition: transform .1s; }
.fx-sec[open] > summary::before { transform: rotate(90deg); }
.fx-badge { font: italic 600 10px Georgia, serif; color: #8a8a8a; width: 14px; text-align: center; }
.fx-sec > summary .fx-t { flex: 1; }
.fx-reset { padding: 0 4px; height: 18px; background: none; border: 0; color: #7c7c7c; font-size: 13px; }
.fx-reset:hover { color: #fff; }
.fx-sec[open] { padding-bottom: 4px; }
.kfrow { min-height: 22px; font-size: 11.5px; color: #a8a8a8; padding-left: 14px; }
.kfrow .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfrow .sw { padding: 0; width: 18px; height: 18px; background: none; border: 0; color: #6f6f6f; display: grid; place-items: center; }
.kfrow .sw svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.kfrow .sw.on { color: #4b9cf5; }
.scrub { color: #4b9cf5; font: 11.5px Consolas, "Segoe UI", monospace; cursor: ew-resize; user-select: none; text-decoration: underline dotted rgba(75,156,245,.45); text-underline-offset: 3px; white-space: nowrap; }
.scrub:hover { color: #7db8ff; }
.scrub-in { width: 70px; padding: 1px 4px; font: 11.5px Consolas, monospace; background: #111; border: 1px solid #4b9cf5; color: #fff; }
.kfnav { display: flex; justify-content: center; }
.kfnav.off { visibility: hidden; }
.kfnav button { padding: 0 2px; height: 18px; background: none; border: 0; color: #8a8a8a; font-size: 10px; }
.kfnav button:disabled { opacity: .25; }
.kfnav .key { font-size: 9px; }
.kfnav .key.on { color: #4b9cf5; }
.kf-lane { position: relative; height: 18px; background: #1a1a1b; border-left: 1px solid #2c2c2c; }
.kf-ph { position: absolute; top: 0; bottom: 0; width: 1px; background: #4b9cf5; pointer-events: none; }
.kf-dia { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; transform: rotate(45deg); background: #9a9a9a; cursor: ew-resize; }
.kf-dia.on, .kf-dia:hover { background: #4b9cf5; }
.field { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(0, 1.4fr); align-items: center; gap: 6px; min-height: 22px; margin: 0; padding-left: 32px; color: #a8a8a8; font-size: 11.5px; }
.field.col { grid-template-columns: 1fr; }
.field select, .field input[type=text], .field input:not([type]) { padding: 2px 4px; font-size: 11.5px; height: 22px; }
.field input[type=color] { width: 36px; height: 20px; padding: 0 1px; }
.mask-bar { display: flex; align-items: center; gap: 4px; min-height: 22px; padding-left: 32px; font-size: 11.5px; color: #a8a8a8; }
.mask-bar .lbl { flex: 1; }
.mask-bar button { width: 22px; height: 20px; padding: 0; display: grid; place-items: center; background: none; border: 1px solid transparent; color: #9a9a9a; }
.mask-bar button:hover { border-color: #3a3a3a; color: #fff; }
.mask-bar svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.mask { margin: 2px 0 4px 32px; border-left: 1px solid #333; }
.mask .field { padding-left: 12px; }
.mask-h { display: flex; align-items: center; gap: 8px; min-height: 22px; padding-left: 8px; font-size: 11.5px; color: #c9c9c9; }
.mask-h span { flex: 1; }
.mask-h label { display: flex; align-items: center; gap: 4px; color: #a8a8a8; }
.mask-h button { background: none; border: 0; color: #777; padding: 0 4px; }
.warnline { background: rgba(230,134,25,.12); border-left: 3px solid var(--warn); padding: 6px 8px; border-radius: 4px; }
.warnline a { color: var(--accent-2); }
.seqinfo { font: 13px Consolas, monospace; color: var(--tc); margin: 4px 0 8px; }
.path { margin-top: 12px; word-break: break-all; }

/* ---------- abas do painel direito / chat ---------- */
/* ---------- barra de etapas ---------- */
.steps-bar { flex: none; display: flex; align-items: center; gap: 4px; padding: 5px 8px; margin-bottom: 6px; background: var(--panel-2, #1e1e1e); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; white-space: nowrap; }
.steps-t { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.steps-bar button { padding: 4px 10px; font-size: 12px; border-radius: 6px; background: none; border: 1px solid transparent; color: var(--text); }
.steps-bar button:hover { background: var(--panel-3, #2a2a2a); border-color: var(--line); }
.steps-bar button.all { background: var(--accent); color: #fff; font-weight: 600; margin-left: auto; }
.steps-bar button.gear { font-size: 13px; }
.step-grp { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; }
.step-grp select { border: 0; border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; padding: 3px 4px; font-size: 11.5px; background: transparent; }

/* ---------- biblioteca: animações da IA e efeitos sonoros ---------- */
.lib-motion { display: grid; gap: 6px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; }
.lib-motion textarea { width: 100%; resize: vertical; }
.lib-motion .row { display: flex; gap: 6px; }
.lib-motion .row button { flex: 1; }
.lib-item.trans.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lib-item.motion .thumb { background: repeating-conic-gradient(#2a2b30 0 25%, #202125 0 50%) 0 0 / 12px 12px; }
.sfx-cat { border-bottom: 1px solid var(--line); }
.sfx-cat summary { cursor: pointer; padding: 7px 4px; display: flex; justify-content: space-between; font-size: 12px; }
.sfx-cat summary i { font-style: normal; color: var(--muted); }
.sfx-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; font-size: 12px; cursor: grab; border-radius: 5px; }
.sfx-row:hover { background: rgba(255,255,255,.05); }
.sfx-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfx-row em { font-style: normal; color: var(--muted); font-size: 11px; }
.sfx-row .play { padding: 0 7px; font-size: 10px; }

/* ---------- músicas do Jamendo ---------- */
.jam-list { max-height: 300px; }
.mus-row { display: grid !important; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; }
.mus-row em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.mus-row button { padding: 1px 7px; font-size: 10px; }
.jam-row { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 8px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; }
.jam-row img { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; background: #222; }
.jam-row div { min-width: 0; display: grid; }
.jam-row b { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-row span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jam-row button { padding: 3px 8px; font-size: 11px; }
.jam-key summary { cursor: pointer; font-size: 11.5px; color: var(--muted); }

/* ---------- uso da IA ---------- */
.ai-usage { display: inline-grid; gap: 3px; padding: 4px 10px; margin-right: 8px; background: none; border: 1px solid var(--line); border-radius: 7px; font-size: 11.5px; color: var(--muted); text-align: left; }
.ai-usage b { font-weight: 500; white-space: nowrap; }
.ai-usage .bar { height: 3px; border-radius: 9px; background: var(--line); overflow: hidden; }
.ai-usage .bar i { display: block; height: 100%; width: 0; background: #3ccf91; }
.ai-usage.warn .bar i { background: #ffc93c; } .ai-usage.over .bar i { background: #ff5d5d; } .ai-usage.over b { color: #ff8a8a; }
table.usage { width: 100%; border-collapse: collapse; font-size: 12px; }
table.usage th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.usage td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
table.usage tr.cur td { background: rgba(38,128,235,.08); }
table.usage input { width: 100%; min-width: 70px; }
#usageSec details { margin-top: 6px; }
#usageSec .row input { width: 50%; }

/* ---------- edição rápida ---------- */
.quick { padding: 10px; }
.q-home { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.q-card { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 10px; border-radius: 9px; background: #2a2a2a; min-height: 76px; }
.q-card i { font-style: normal; font-size: 18px; line-height: 1; }
.q-card b { font-size: 12.5px; color: #fff; }
.q-card span { color: var(--muted); font-size: 11px; line-height: 1.3; }
.q-card.main { grid-column: 1 / -1; min-height: 0; background: linear-gradient(135deg, #1d3a5f, #2a2a2a); border-color: #2d5a8e; }
.q-back { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.q-back b { font-size: 13px; color: #fff; }
.q-sec { display: grid; gap: 8px; }
.q-sec label:not(.check) { display: grid; gap: 3px; color: var(--muted); font-size: 11.5px; }
.q-box { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.q-row { display: flex; gap: 6px; align-items: center; }
.q-row input { flex: 1; min-width: 0; }
.q-list { display: grid; gap: 4px; max-height: 200px; overflow: auto; }
.q-item { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.q-go { padding: 10px; font-size: 13px; }
.q-ghost { background: none; }
.q-status { display: grid; gap: 6px; text-align: center; margin-top: 12px; padding: 12px; border: 1px solid var(--accent); border-radius: 8px; background: #1f2a38; }
.q-status .bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.q-status .bar div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
#qStop { margin: 4px auto 0; min-width: 110px; }
.q-status .spin { width: 22px; height: 22px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: qsp 1s linear infinite; }
@keyframes qsp { to { transform: rotate(360deg); } }
.rtabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.rtabs button { flex: 1; background: none; border: 0; border-radius: 0; padding: 8px; color: var(--muted); font-size: 12.5px; }
.rtabs button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; user-select: text; }
.msg { max-width: 92%; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: #1f3550; border: 1px solid #2a4a70; }
.msg.ai { align-self: flex-start; background: var(--panel-3); }
.msg.sys { align-self: stretch; background: none; color: var(--muted); font-size: 11.5px; padding: 2px 4px; }
.msg .ops { margin-top: 6px; display: grid; gap: 3px; }
.msg .ops button { text-align: left; font-size: 11.5px; padding: 3px 7px; background: rgba(0,0,0,.2); }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 10px 6px; }
.chat-sugg button { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; }
.chat-in { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-in textarea { flex: 1; resize: none; height: 54px; }
.typing { display: inline-flex; gap: 3px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pulse .8s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }

/* ---------- edição ao vivo ---------- */
.live { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 30; background: rgba(20,20,20,.92); border: 1px solid var(--accent);
  border-radius: 8px; padding: 8px 12px; display: grid; gap: 5px; }
.live .row1 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.live .row1 b { flex: 1; }
.live .bar { margin: 0; height: 5px; }
.live .bar div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.clip.appear { animation: appear .45s ease-out; }
@keyframes appear { from { transform: scaleY(0.2); opacity: 0; filter: brightness(2); } }
.seqbtn { margin-left: auto; background: none; border: 0; color: var(--tc); font: 12px Consolas, monospace; padding: 0 4px; }

/* ---------- assistente em etapas ---------- */
.steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 8px 0 14px; }
.steps li { flex: 1; padding: 7px 10px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 12.5px; border: 1px solid var(--line); }
.steps li.on { background: #1f3550; border-color: var(--accent); color: #fff; }
.steps li.done { color: var(--ok); }
.wstep h3 { margin: 14px 0 4px; font-size: 14px; }
.wstep h3:first-child { margin-top: 0; }
.drop-zone { border: 2px dashed var(--line); border-radius: 12px; padding: 26px; text-align: center; display: grid; gap: 6px; margin: 10px 0; background: var(--panel-2); }
.drop-zone.over { border-color: var(--accent); background: #1f3550; }
.drop-zone.has { border-style: solid; border-color: var(--ok); }
.drop-zone .dz-ico { font-size: 34px; }
.row.center { justify-content: center; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; margin: 8px 0 4px; padding: 10px; background: var(--panel-2); border-radius: 8px; border: 1px solid var(--line); }
.feats .check { margin: 2px 0; font-size: 12.5px; }
.spinner-s { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }

/* ---------- aba Legendas ---------- */
.cp-top { display: grid; gap: 6px; padding: 4px 0 10px; }
.cp-top .row button { flex: 1; }
.cp-top select { width: 120px; }
h4.cp-h { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.cp-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.cp-st { position: relative; aspect-ratio: 1080 / 560; overflow: hidden; border-radius: 6px; cursor: pointer; border: 1px solid var(--line);
  background: linear-gradient(160deg, #3a4a5c, #8c6f55 60%, #2b3440); }
.cp-st:hover { border-color: var(--accent); }
.cp-st .mini { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.cp-st > span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; padding: 2px 5px; background: rgba(0,0,0,.65); }
.cp-pos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.cp-pos button { padding: 4px 2px; font-size: 11.5px; }
.cp-pos button.on { background: #1f3550; border-color: var(--accent); }
.field .val { color: var(--tc); font: 12px Consolas, monospace; min-width: 30px; text-align: right; }

/* ---------- painéis soltos / trocar de lugar ---------- */
.dock-ctl { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding-left: 6px; }
.dock-ctl .grip { cursor: grab; color: var(--muted); padding: 0 4px; font-size: 14px; user-select: none; }
.dock-ctl .undock { background: none; border: 0; color: var(--muted); padding: 2px 6px; font-size: 13px; }
.dock-ctl .undock:hover { color: var(--text); background: var(--panel-3); }
.rtabs .dock-ctl, .tabs .dock-ctl { margin-left: auto; }
.panel.swap-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
.dock-ph { flex: 1; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; min-height: 80px; }
body.undocked { display: flex; height: 100vh; padding: 0; }
.panel.floating { flex: 1; width: auto !important; height: 100vh !important; border-radius: 0; border: 0; }

/* ---------- ferramentas ---------- */
.tools { display: flex; gap: 2px; padding-right: 8px; border-right: 1px solid var(--line); margin-right: 4px; }
.tools button { padding: 3px 8px; font-size: 12px; background: none; border: 1px solid transparent; }
.tools button.on { background: #1f3550; border-color: var(--accent); color: #fff; }
.tl-tracks.razor, .tl-tracks.razor .clip { cursor: crosshair; }
.tl-tracks.texttool, .tl-tracks.texttool .clip { cursor: text; }
.razorline { position: absolute; top: 26px; bottom: 0; width: 1px; background: #ff5a5a; z-index: 9; pointer-events: none; }
.kfdot { position: absolute; bottom: 3px; width: 7px; height: 7px; background: #fff; transform: translateX(-3.5px) rotate(45deg); border: 1px solid #000; pointer-events: none; z-index: 2; }

/* ---------- timeline ---------- */
.timeline { flex: 1; min-height: 140px; }
.tl-toolbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.tl-toolbar button { padding: 3px 9px; font-size: 12px; }
.tl-toolbar input[type=range] { width: 130px; }
.tl-main { flex: 1; display: flex; min-height: 0; }
.tl-heads { width: 150px; flex: none; border-right: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.tl-ruler-spacer { height: 26px; border-bottom: 1px solid var(--line); }
.tl-head { display: flex; align-items: center; gap: 4px; padding: 0 6px; border-bottom: 1px solid #25242b; font-size: 11.5px; }
.tl-head .tid { font-weight: 700; width: 24px; color: var(--text); }
.tl-head .tname { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.tl-head button { background: none; border: 0; padding: 2px 4px; font-size: 12px; opacity: .55; }
.tl-head button.on { opacity: 1; color: var(--warn); }
.tl-head.audio .tid { color: #7be3a3; }
.tl-scroll { flex: 1; overflow: auto; position: relative; }
.tl-content { position: relative; min-height: 100%; }
.tl-ruler { position: sticky; top: 0; z-index: 5; height: 26px; background: #1d1c22; border-bottom: 1px solid var(--line); cursor: text; }
.tl-ruler .tick { position: absolute; bottom: 0; width: 1px; background: #4a4756; }
.tl-ruler .lbl { position: absolute; top: 3px; font: 10px Consolas, monospace; color: var(--muted); transform: translateX(3px); }
.tl-track { position: relative; border-bottom: 1px solid #25242b; }
.tl-track.audio { background: rgba(47,154,85,.04); }
.tl-track.drop { background: rgba(38,128,235,.18); }
.tl-track.hiddenTrack .clip, .tl-track.mutedTrack .clip { opacity: .35; }
.clip { position: absolute; top: 1px; bottom: 1px; border-radius: 0; overflow: hidden; cursor: default; font-size: 11px; color: #141414;
  border: 1px solid rgba(0,0,0,.45); border-top-width: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.clip .lbl { position: absolute; left: 5px; right: 5px; top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.clip .sub { position: absolute; left: 7px; right: 7px; bottom: 2px; font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; pointer-events: none; display: none; }
.clip.tall .sub { display: block; }
.clip .lbl .t2 { opacity: .75; font-weight: 400; }
.clip .h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; }
.clip .h.l { left: 0; }
.clip .h.r { right: 0; }
.clip .h { cursor: ew-resize; }
.clip .h:hover { background: rgba(255,255,255,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.clip.sel { border-color: #fff; outline: 1px solid #fff; outline-offset: -1px; z-index: 3; }
.clip.dragging { opacity: .8; cursor: grabbing; z-index: 4; }
.clip.k-main { background: var(--c-main); }
.clip.k-broll { background: var(--c-broll); }
.clip.k-animacao { background: var(--c-anim); }
.clip.k-texto { background: var(--c-text); }
.clip.k-caption { background: var(--c-caption); }
.clip.k-fundo { background: var(--c-bg); }
.clip.k-transicao { background: var(--c-trans); }
.clip.k-audio { background: var(--c-audio); }
.clip.k-voice { background: var(--c-audio); }
.clip.linked .lbl::before { content: "🔗 "; font-size: 9px; opacity: .8; }
.clip.k-music { background: var(--c-music); }
/* onda de áudio: desenhada a partir dos picos do arquivo, ocupando o corpo do clipe */
.clip canvas.wave { position: absolute; left: 0; right: 0; top: 14px; bottom: 2px; width: 100%;
  height: calc(100% - 16px); pointer-events: none; }
.clip.k-voice, .clip.k-audio { --onda: rgba(255,255,255,.8); }
.clip.k-music { --onda: rgba(255,255,255,.72); }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--playhead); z-index: 8; pointer-events: none; }
.tl-playhead .knob { position: absolute; top: 0; left: -6px; width: 13px; height: 14px; background: var(--playhead); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); pointer-events: auto; cursor: ew-resize; }
.tl-menu { position: fixed; z-index: 60; display: grid; min-width: 180px; padding: 4px; background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.tl-menu button { text-align: left; background: none; border: 0; padding: 6px 10px; font-size: 12px; }
.tl-menu button:hover { background: var(--accent); color: #fff; }
.tl-marquee { position: fixed; z-index: 50; border: 1px solid #4b9cf5; background: rgba(75,156,245,.12); pointer-events: none; }
.tl-snapline { position: absolute; top: 26px; bottom: 0; width: 1px; background: #ffd84a; z-index: 7; pointer-events: none; }

/* ---------- diálogos ---------- */
.modal { position: fixed; inset: 0; background: rgba(5,3,9,.72); display: grid; place-items: center; z-index: 100; }
.dialog { width: min(560px, 94vw); max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; user-select: text; }
.dialog.wide { width: min(980px, 96vw); }
.dialog.center { text-align: center; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dlg-head h2 { margin: 0; font-size: 17px; }
.dlg-head .x { background: none; border: 0; color: var(--muted); font-size: 16px; }
.wiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.wiz-grid h4 { margin: 14px 0 4px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); font-size: 11px; }
.modes, .providers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.three-modes, .providers { grid-template-columns: repeat(3, 1fr); }
.mode { margin: 0; cursor: pointer; }
.mode input { display: none; }
.mode div { border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: var(--panel-2); height: 100%; }
.mode b { display: block; color: var(--text); font-size: 13px; }
.mode span { font-size: 11.5px; color: var(--muted); }
.mode input:checked + div { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #1f3550; }
.stages { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; }
.stages li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.stages li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.stages li.active { color: var(--text); }
.stages li.active::before { border-color: var(--accent); background: var(--accent); }
.stages li.done { color: var(--lilac); }
.stages li.done::before { border-color: var(--ok); background: var(--ok); }
.bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 6px 0; }
#barFill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
#log { max-height: 160px; overflow: auto; margin: 10px 0 0; font: 11.5px/1.5 Consolas, monospace; color: #bdb7cc; white-space: pre-wrap; background: #121116; border-radius: 6px; padding: 8px; }
#log .err { color: var(--err); }
.prov div { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; text-align: center; }
.prov img { width: 34px; height: 34px; margin-bottom: 4px; }
.prov b { font-size: 14px; }
h4.sec { margin: 18px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#advanced { margin-top: 12px; }
.login-box { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); display: grid; gap: 8px; }
.acct { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--err); flex: none; }
.dot.on { background: var(--ok); }
.dot.wait { background: var(--warn); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
.env { margin-top: 12px; display: grid; gap: 4px; }
.env .ok { color: var(--ok); }
.env .bad { color: var(--err); }
body.packaged .devonly { display: none !important; }
.spinner { width: 42px; height: 42px; margin: 6px auto 14px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.keys { width: 100%; border-collapse: collapse; }
.keys td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.keys td:first-child { font: 12px Consolas, monospace; color: var(--lilac); width: 42%; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--panel-3); border: 1px solid var(--accent); padding: 9px 16px; border-radius: 8px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a3845; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* barra de consumo do limite da IA (tabela de uso) */
.ubar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; margin-right: 6px;
  background: var(--line); border-radius: 4px; overflow: hidden; }
.ubar i { display: block; height: 100%; width: 0; background: #2680eb; transition: width .25s; }
.ubar.warn i { background: #e8a33d; }
.ubar.over i { background: #e8503d; }
table.usage td b { font-variant-numeric: tabular-nums; }

/* ---------- lista de legendas (aba Legendas) ---------- */
/* Editar o texto direto na lista, sem precisar clicar clipe por clipe na timeline. */
.cap-edit { display: grid; gap: 6px; }
.cap-search { width: 100%; }
.cap-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.cap-row { display: grid; grid-template-columns: 24px 74px 1fr; gap: 8px; align-items: start;
  padding: 7px 8px; border-bottom: 1px solid var(--line); }
.cap-row:last-child { border-bottom: 0; }
.cap-row.now { background: color-mix(in srgb, #2680eb 16%, transparent); }
.cap-row.sel { background: color-mix(in srgb, #2680eb 26%, transparent); }
.cap-row.hidden { display: none; }
.cap-n { font-size: 11px; color: var(--muted); text-align: right; padding-top: 4px; font-variant-numeric: tabular-nums; }
.cap-tc { display: grid; cursor: pointer; font-size: 10.5px; line-height: 1.35; color: var(--muted);
  font-variant-numeric: tabular-nums; padding-top: 3px; }
.cap-tc b { font-weight: 600; color: var(--text); }
.cap-tc i { font-style: normal; }
.cap-tc:hover b, .cap-tc:hover i { color: #6aa9ff; }
.cap-tx { width: 100%; min-height: 26px; resize: none; overflow: hidden; font: inherit; font-size: 13px;
  line-height: 1.35; padding: 4px 6px; color: var(--text); background: var(--card); border: 1px solid transparent; border-radius: 4px; }
.cap-tx:hover { border-color: var(--line); }
.cap-tx:focus { border-color: #2680eb; outline: none; background: var(--bg); }

/* biblioteca: botão de remover do projeto, aparece ao passar o mouse */
.lib-item { position: relative; }
.lib-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0; z-index: 2;
  display: grid; place-items: center; opacity: 0; transition: opacity .15s, background .15s;
  font-size: 11px; line-height: 1; color: #fff; background: rgba(0,0,0,.65); border: 0; border-radius: 4px; }
.lib-item:hover .lib-x { opacity: 1; }
.lib-x:hover { background: #c0392b; }

/* ---------- timeline no formato do Premiere ---------- */
/* Nada arredondado, trilhas coladas, cabeçotes com a mesma régua de altura. */
.tl-track { border-bottom: 1px solid #1a1a1a; }
.tl-head { border-bottom: 1px solid #1a1a1a; }
.tl-ruler { cursor: default; }
.tl-scroll { scrollbar-width: thin; scrollbar-color: #4a4a4a transparent; }
.tl-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.tl-scroll::-webkit-scrollbar-track { background: #141318; }
.tl-scroll::-webkit-scrollbar-thumb { background: #4a4a52; border: 3px solid #141318; border-radius: 0; }
.tl-scroll::-webkit-scrollbar-thumb:hover { background: #5e5e68; }
.tl-scroll::-webkit-scrollbar-corner { background: #141318; }
/* arrastar: o clipe segue o cursor sem transição, para não dar sensação de atraso */
.clip, .clip.dragging { transition: none; }
.clip.dragging { opacity: .9; }

/* ---------- lista de atalhos ---------- */
#shortcutsDlg .dialog.wide { width: min(780px, 94vw); }
.key-search { width: 100%; margin: 4px 0 12px; }
.keys-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; align-items: start; }
.keys-cols h4 { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.keys-cols section > h4:first-child { margin-top: 0; }
.keys-cols table.keys { width: 100%; }
table.keys td:first-child { white-space: nowrap; width: 1%; padding-right: 14px; font-weight: 600;
  font-family: Consolas, ui-monospace, monospace; font-size: 11.5px; color: var(--text); }
table.keys td { padding: 3px 0; font-size: 12.5px; color: var(--muted); vertical-align: top; }
@media (max-width: 720px) { .keys-cols { grid-template-columns: 1fr; } }
