/* Social Fisio. Sistema visual: preto violeta, branco, um único roxo de destaque.
   Raios: controles 10px, painéis 16px, pílulas e status 999px. Tema escuro fixo (identidade da marca). */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist/geist-sans/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Accent';
  src: url('/fonts/app/PlayfairDisplay-wght.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: 'Accent';
  src: url('/fonts/app/PlayfairDisplay-Italic-wght.ttf') format('truetype');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist/geist-mono/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #08070b;
  --bg-raised: #0c0b11;
  --surface: #111017;
  --surface-2: #17151f;
  --surface-3: #1f1c2a;
  --line: rgba(236, 232, 255, 0.07);
  --line-2: rgba(236, 232, 255, 0.12);
  --line-3: rgba(236, 232, 255, 0.22);
  --text: #f4f2fa;
  --text-2: #cdc8dc;
  --muted: #918ca3;
  --faint: #5f5b6e;
  --accent: #7c3aed;
  --accent-hover: #8a4cf6;
  --accent-text: #b89dff;
  --accent-soft: rgba(124, 58, 237, 0.14);
  --accent-line: rgba(167, 139, 250, 0.38);
  --danger: #f2848e;
  --danger-soft: rgba(242, 132, 142, 0.1);
  --r-control: 10px;
  --r-panel: 16px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar: 252px;
  --shadow: 0 24px 60px -24px rgba(10, 4, 30, 0.8);
  /* camadas */
  --z-sidebar: 20;
  --z-topbar: 25;
  --z-drawer: 40;
  --z-modal: 50;
  --z-toast: 60;
  --z-grain: 70;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 620;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mono {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.01em;
}
.muted {
  color: var(--muted);
}
.text-2 {
  color: var(--text-2);
}
.accent {
  color: var(--accent-text);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.wrap {
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 12px;
}
.stack-lg {
  display: grid;
  gap: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* ---------------------------------- botões ---------------------------------- */

.btn {
  --h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 16px;
  border-radius: var(--r-control);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 550;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.12s var(--ease), opacity 0.2s;
}
.btn:hover {
  background: var(--surface-3);
  border-color: var(--line-3);
}
.btn:active {
  transform: scale(0.98);
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn i {
  font-size: 17px;
}
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn.primary:hover {
  background: var(--accent-hover);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn.danger {
  background: transparent;
  border-color: rgba(242, 132, 142, 0.35);
  color: var(--danger);
}
.btn.danger:hover {
  background: var(--danger-soft);
}
.btn.sm {
  --h: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.btn.lg {
  --h: 48px;
  padding: 0 22px;
  font-size: 15px;
}
.btn.icon {
  width: var(--h);
  padding: 0;
}
.btn.block {
  width: 100%;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

/* ---------------------------------- formulários ---------------------------------- */

.field {
  display: grid;
  gap: 7px;
}
.field > label,
.label {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
}
.field .help {
  font-size: 12.5px;
  color: var(--muted);
}
.field .error {
  font-size: 12.5px;
  color: var(--danger);
}
.input,
.textarea,
.select {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: var(--r-control);
  border: 1px solid var(--line-2);
  background: var(--bg-raised);
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}
.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--line-3);
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent-text);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23918ca3' viewBox='0 0 256 256'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}
.select option {
  background: var(--surface);
}
.input.mono {
  font-family: var(--mono);
}

.toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle .track {
  flex: none;
  width: 38px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  position: relative;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.toggle .track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform 0.3s var(--ease), background 0.25s;
}
.toggle input:checked + .track {
  background: var(--accent);
  border-color: transparent;
}
.toggle input:checked + .track::after {
  transform: translateX(16px);
  background: #fff;
}
.toggle input:focus-visible + .track {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
.toggle input:disabled + .track {
  opacity: 0.4;
}
.toggle .t-title {
  font-weight: 550;
  font-size: 14px;
}
.toggle .t-desc {
  font-size: 13px;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}
.segmented button {
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 520;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.segmented button:hover {
  color: var(--text);
}
.segmented button[aria-pressed='true'] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chip:hover {
  border-color: var(--line-3);
  color: var(--text);
}
.chip[aria-pressed='true'] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------------------------------- superfícies ---------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.panel-pad {
  padding: 22px;
}
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 560;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  white-space: nowrap;
}
.pill.processing,
.pill.queued {
  border-color: var(--accent-line);
  color: var(--accent-text);
  background: var(--accent-soft);
}
.pill.done {
  color: var(--text);
  border-color: var(--line-3);
}
.pill.failed {
  color: var(--danger);
  border-color: rgba(242, 132, 142, 0.35);
}
.pill i {
  font-size: 13px;
}
.pill .live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s var(--ease) infinite;
}

.kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-control);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-2);
}
.banner i {
  font-size: 18px;
  color: var(--accent-text);
  flex: none;
}
.banner.danger {
  border-color: rgba(242, 132, 142, 0.3);
  background: var(--danger-soft);
}
.banner.danger i {
  color: var(--danger);
}

.progress {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.6s var(--ease);
}

.skeleton {
  border-radius: var(--r-control);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

/* ---------------------------------- shell ---------------------------------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--line);
  background: var(--bg-raised);
  z-index: var(--z-sidebar);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
  font-weight: 640;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.brand b {
  font-weight: 640;
  color: var(--accent-text);
}
.nav {
  display: grid;
  gap: 2px;
}
.nav-title {
  padding: 14px 10px 6px;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r-control);
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a i {
  font-size: 18px;
}
.nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 2px 0 0 var(--accent);
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.quota {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.quota-row {
  display: grid;
  gap: 5px;
}
.quota-row .row {
  font-size: 12.5px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.user-chip:hover {
  background: var(--surface);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--accent-text);
  font-weight: 650;
  font-size: 13px;
  flex: none;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: none;
}
.page {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 36px 72px;
  animation: page-in 0.5s var(--ease) both;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-head p {
  margin-top: 6px;
  color: var(--muted);
}
.global-banner {
  padding: 10px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  gap: 10px;
  align-items: center;
}
.global-banner i {
  color: var(--accent-text);
  font-size: 16px;
}
.global-banner a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------- auth ---------------------------------- */

.auth {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100dvh;
}
.auth-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(124, 58, 237, 0.18), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}
.auth-art h1 {
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 640;
  max-width: 14ch;
}
.auth-art h1 em {
  font-style: normal;
  color: var(--accent-text);
}
.auth-art p {
  margin-top: 18px;
  max-width: 44ch;
  color: var(--text-2);
  font-size: 16px;
}
.auth-form {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-card {
  width: min(400px, 100%);
  display: grid;
  gap: 22px;
}
.auth-card h2 {
  font-size: 24px;
  letter-spacing: -0.025em;
}

/* linha do tempo ilustrativa da tela de entrada */
.reel {
  display: grid;
  gap: 10px;
  margin-top: 40px;
  position: relative;
  padding: 18px 0;
}
.reel-track {
  position: relative;
  height: 34px;
  display: flex;
  gap: 4px;
}
.reel-track span {
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  transform-origin: left center;
  animation: reel-cut 7s var(--ease) infinite;
}
.reel-track span.keep {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.55), rgba(124, 58, 237, 0.35));
  border-color: var(--accent-line);
  animation: none;
}
.reel-track.audio span {
  height: 18px;
  align-self: center;
  background: repeating-linear-gradient(90deg, rgba(184, 157, 255, 0.5) 0 2px, transparent 2px 5px);
  border-color: transparent;
}
.reel-track.captions span {
  height: 14px;
  align-self: center;
  background: rgba(244, 242, 250, 0.85);
  border: 0;
  animation: none;
}
.reel-head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text);
  box-shadow: 0 0 0 1px rgba(8, 7, 11, 0.6);
  animation: playhead 7s linear infinite;
}
.reel-head::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -5px;
  width: 12px;
  height: 8px;
  border-radius: 3px;
  background: var(--text);
}
.reel-legend {
  display: flex;
  gap: 20px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------------------------------- projetos ---------------------------------- */

.grid-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.project-card {
  display: grid;
  gap: 12px;
  padding: 10px 10px 14px;
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.3s var(--ease), background 0.25s var(--ease);
}
.project-card:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-raised);
  display: grid;
  place-items: center;
  color: var(--faint);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb .thumb-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.55);
  transform: scale(1.2);
}
.thumb img.contain {
  position: relative;
  object-fit: contain;
}
.thumb > i {
  font-size: 30px;
}
.thumb .badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 7, 11, 0.78);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
}
.project-card .meta {
  padding: 0 4px;
  display: grid;
  gap: 6px;
}
.project-card .title {
  font-weight: 580;
  font-size: 15px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 14px;
  padding: 72px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-panel);
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
}
.empty .empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  font-size: 26px;
  color: var(--accent-text);
}
.empty p {
  color: var(--muted);
  max-width: 42ch;
}

/* ---------------------------------- editor de projeto ---------------------------------- */

.setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.setup-aside {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 16px;
}
.section {
  display: grid;
  gap: 18px;
  padding: 26px;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.section-head .ico {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--accent-text);
  font-size: 18px;
}
.section-head p {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 62ch;
}
.title-input {
  font-size: 28px;
  font-weight: 620;
  letter-spacing: -0.025em;
  background: transparent;
  border: 0;
  padding: 2px 0;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.title-input:hover {
  border-bottom-color: var(--line-2);
}
.title-input:focus {
  outline: none;
  border-bottom-color: var(--accent-text);
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px 20px;
  text-align: center;
  border-radius: 14px;
  border: 1.5px dashed var(--line-3);
  background: var(--bg-raised);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.dropzone:hover,
.dropzone.over {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.dropzone i.big {
  font-size: 28px;
  color: var(--accent-text);
}
.dropzone .dz-title {
  font-weight: 560;
}
.dropzone .dz-sub {
  font-size: 13px;
  color: var(--muted);
}
.dropzone.compact {
  padding: 16px;
  grid-auto-flow: column;
  justify-content: center;
}
.dropzone input {
  display: none;
}

.clip-list {
  display: grid;
  gap: 8px;
}
.clip {
  display: grid;
  grid-template-columns: auto 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 8px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.clip .label-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-text);
  width: 28px;
  text-align: center;
}
.clip .clip-thumb {
  width: 92px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}
.clip .clip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.clip .name {
  font-weight: 540;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clip .specs {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.clip .actions {
  display: flex;
  gap: 2px;
}
.upload-row {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: 13px;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.platform {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg-raised);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.platform:hover {
  border-color: var(--line-3);
}
.platform[aria-pressed='true'] {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.platform .frame {
  height: 38px;
  display: flex;
  align-items: flex-end;
}
.platform .frame span {
  display: block;
  border: 1.5px solid var(--text-2);
  border-radius: 4px;
}
.platform[aria-pressed='true'] .frame span {
  border-color: var(--accent-text);
  background: rgba(124, 58, 237, 0.25);
}
.platform .p-name {
  font-size: 13.5px;
  font-weight: 560;
}
.platform .p-sub {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.caption-styles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.caption-style {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg-raised);
  cursor: pointer;
  text-align: left;
}
.caption-style[aria-pressed='true'] {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.caption-style .preview {
  height: 64px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2a2340, #141119);
  overflow: hidden;
  padding: 0 8px;
  text-align: center;
}
.caption-style .c-name {
  font-size: 12.5px;
  font-weight: 560;
  color: var(--text-2);
}
.cap-bold_pop {
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 0.6px #000;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 #000;
}
.cap-bold_pop b {
  color: var(--accent-text);
  font-size: 16px;
}
.cap-karaoke {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.cap-karaoke b {
  color: var(--accent-text);
}
.cap-clean span {
  font-weight: 600;
  font-size: 12.5px;
  background: rgba(8, 7, 11, 0.75);
  padding: 4px 8px;
  border-radius: 4px;
}
.cap-minimal {
  font-weight: 500;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.cap-word_by_word {
  font-weight: 900;
  font-size: 24px;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 1px #000;
  paint-order: stroke fill;
}
.cap-neon {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 0 6px var(--accent), 0 0 14px var(--accent);
}

.swatches {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.swatch[aria-pressed='true'] {
  border-color: #fff;
}
.color-input {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  cursor: pointer;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}
.option {
  display: grid;
  gap: 10px;
  align-content: start;
}
.locked {
  opacity: 0.55;
}
.locked-note {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.summary {
  display: grid;
  gap: 16px;
  padding: 20px;
}
.summary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 16px;
  margin: 0;
  font-size: 13.5px;
}
.summary dt {
  color: var(--muted);
}
.summary dd {
  margin: 0;
  text-align: right;
  font-weight: 520;
}
.estimate {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.estimate .big {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.02em;
}
.checks {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.checks li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--danger);
}
.checks ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.save-state {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* ---------------------------------- processamento ---------------------------------- */

.processing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.pct {
  font-family: var(--mono);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}
.pct small {
  font-size: 22px;
  color: var(--muted);
  margin-left: 2px;
}
.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.stage {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--faint);
  overflow: hidden;
}
.stage .s-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  font-size: 15px;
}
.stage .s-name {
  font-weight: 540;
}
.stage .s-detail {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}
.stage.done {
  color: var(--text-2);
}
.stage.done .s-ico {
  background: var(--surface-3);
  color: var(--text);
}
.stage.skipped {
  color: var(--faint);
}
.stage.active {
  color: var(--text);
  background: var(--surface-2);
}
.stage.active .s-ico {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.stage.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.1), transparent);
  transform: translateX(-100%);
  animation: scan 2.2s var(--ease) infinite;
  pointer-events: none;
}
.logs {
  display: grid;
  gap: 2px;
  max-height: 520px;
  overflow: auto;
  padding: 8px;
  font-size: 13px;
  scrollbar-width: thin;
}
.log {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  animation: log-in 0.4s var(--ease) both;
}
.log time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  padding-top: 1px;
}
.log.warn {
  color: var(--text-2);
}
.log.error {
  color: var(--danger);
}
.clip-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.clip-strip img {
  height: 54px;
  width: 86px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: none;
}

/* ---------------------------------- resultado ---------------------------------- */

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
.viewer {
  position: relative;
  display: grid;
  place-items: center;
  padding: 28px;
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(124, 58, 237, 0.1), transparent 70%),
    var(--bg-raised);
}
.viewer video {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  border-radius: 10px;
  background: #000;
  box-shadow: var(--shadow);
}
.viewer .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--line-3);
  border-style: solid;
  border-width: 0;
}
.viewer .c1 {
  top: 12px;
  left: 12px;
  border-top-width: 1.5px;
  border-left-width: 1.5px;
}
.viewer .c2 {
  top: 12px;
  right: 12px;
  border-top-width: 1.5px;
  border-right-width: 1.5px;
}
.viewer .c3 {
  bottom: 12px;
  left: 12px;
  border-bottom-width: 1.5px;
  border-left-width: 1.5px;
}
.viewer .c4 {
  bottom: 12px;
  right: 12px;
  border-bottom-width: 1.5px;
  border-right-width: 1.5px;
}
.viewer-meta {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.versions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.version-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
}
.version-btn[aria-pressed='true'] {
  color: var(--text);
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.result-aside {
  display: grid;
  gap: 16px;
}
.result-aside .panel-pad {
  display: grid;
  gap: 12px;
}
.notes {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--text-2);
  font-size: 13.5px;
}
.score {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 520;
  letter-spacing: -0.04em;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 36px 0 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  height: 42px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 540;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button:hover {
  color: var(--text);
}
.tabs button[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* linha do tempo da edição */
.timeline {
  display: grid;
  gap: 10px;
  padding: 20px;
}
.tl-ruler {
  position: relative;
  height: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
.tl-ruler span {
  position: absolute;
  transform: translateX(-50%);
}
.tl-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}
.tl-row > .tl-label {
  font-size: 12px;
  color: var(--muted);
}
.tl-lane {
  position: relative;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
}
.tl-lane.thin {
  height: 26px;
}
.tl-block {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.tl-block.motion {
  background: rgba(244, 242, 250, 0.12);
  color: var(--text);
}
.tl-block.broll {
  background: rgba(184, 157, 255, 0.3);
}
.tl-mark {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--accent-text);
  border-radius: 2px;
}
.tl-mark.sfx {
  background: var(--text-2);
}
.tl-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.tl-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tl-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.decup {
  display: grid;
  gap: 16px;
}
.decup-clip {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px;
}
.decup-clip img {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-raised);
}
.seg-list {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}
.seg {
  display: grid;
  grid-template-columns: 112px 92px 1fr 54px;
  gap: 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.seg:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}
.seg.drop {
  color: var(--faint);
}
.seg.drop .seg-text {
  text-decoration: line-through;
  text-decoration-color: rgba(242, 132, 142, 0.5);
}
.seg .kind {
  font-size: 11.5px;
  font-weight: 560;
  color: var(--text-2);
}
.seg.keep .kind {
  color: var(--accent-text);
}
.dots {
  display: inline-flex;
  gap: 3px;
}
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--surface-3);
}
.dots i.on {
  background: var(--accent-text);
}
.tech {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tech div {
  font-size: 12.5px;
  color: var(--text-2);
}
.tech b {
  display: block;
  font-size: 11.5px;
  font-weight: 560;
  color: var(--muted);
  margin-bottom: 2px;
}

.style-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.style-guide .panel-pad {
  display: grid;
  gap: 8px;
  align-content: start;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  padding: 6px 0;
}
.kv + .kv {
  border-top: 1px solid var(--line);
}
.kv span:first-child {
  color: var(--muted);
}

/* ---------------------------------- admin ---------------------------------- */

.kpis {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.kpi .k-label {
  font-size: 12.5px;
  color: var(--muted);
}
.kpi .k-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 520;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.kpi.hero {
  background:
    radial-gradient(400px 200px at 0% 0%, rgba(124, 58, 237, 0.22), transparent 70%),
    var(--surface);
  border-color: var(--accent-line);
}
.kpi.hero .k-value {
  font-size: 38px;
}
.kpi .k-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.charts {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.chart-panel {
  padding: 20px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.chart {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
}
.chart-y {
  position: relative;
  height: 170px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.chart-y span {
  position: absolute;
  right: 0;
  transform: translateY(50%);
}
.chart-plot {
  position: relative;
  height: 170px;
}
.chart-grid {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 2px;
}
.bars .slot {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: default;
}
.bars .bar {
  width: 100%;
  max-width: 24px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
  transition: background 0.15s;
}
.bars .slot.zero .bar {
  background: var(--surface-3);
  border-radius: 0;
}
.bars .slot:hover .bar,
.bars .slot:focus-visible .bar {
  background: var(--accent-text);
}
.bars-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.chart-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--surface-3);
  box-shadow: var(--shadow);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}
.hbars {
  display: grid;
  gap: 12px;
}
.hbar {
  display: grid;
  gap: 5px;
}
.hbar .row {
  font-size: 13px;
}
.hbar .fill {
  height: 8px;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}

.table-wrap {
  overflow-x: auto;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-weight: 540;
  font-size: 12.5px;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  transition: background 0.15s;
}
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
.table .num {
  text-align: right;
  font-family: var(--mono);
  white-space: nowrap;
}
.meter {
  display: grid;
  gap: 4px;
  min-width: 110px;
}
.meter .m-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.meter .m-bar span {
  display: block;
  height: 100%;
  background: var(--accent-text);
}
.meter .m-bar span.full {
  background: var(--danger);
}
.meter .m-text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}

.settings-grid {
  display: grid;
  gap: 18px;
}
.settings-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
}
.settings-section .s-intro p {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.price-table input {
  width: 92px;
  min-height: 34px;
  padding: 6px 9px;
  text-align: right;
}
.limit-field {
  display: grid;
  gap: 7px;
}
.limit-field .row {
  gap: 8px;
}
.limit-field .unl {
  font-size: 12.5px;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
}

.music-row audio {
  display: none;
}
.play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 15px;
}
.play.on {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.energy {
  display: inline-flex;
  gap: 3px;
}
.energy button {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 0;
  background: var(--surface-3);
  cursor: pointer;
  padding: 0;
}
.energy button.on {
  background: var(--accent-text);
}
.inline-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 8px;
  width: 100%;
  min-width: 120px;
}
.inline-input:hover {
  border-color: var(--line-2);
}
.inline-input:focus {
  outline: none;
  border-color: var(--accent-text);
  background: var(--bg-raised);
}

/* ---------------------------------- modal, drawer, toast ---------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(4, 3, 8, 0.66);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade-in 0.25s var(--ease);
}
.modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: modal-in 0.35s var(--ease);
}
.modal.wide {
  width: min(760px, 100%);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px 0;
}
.modal-body {
  padding: 18px 22px;
  display: grid;
  gap: 16px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
}

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-toast);
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  animation: toast-in 0.35s var(--ease);
}
.toast i {
  font-size: 18px;
  color: var(--accent-text);
}
.toast.error i {
  color: var(--danger);
}

.menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  animation: fade-in 0.2s var(--ease);
}
.menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
}
.menu button:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* ---------------------------------- animações ---------------------------------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes log-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
@keyframes scan {
  to {
    transform: translateX(100%);
  }
}
@keyframes playhead {
  from {
    left: 0%;
  }
  to {
    left: 100%;
  }
}
@keyframes reel-cut {
  0%,
  35% {
    opacity: 1;
    transform: scaleX(1);
  }
  48%,
  88% {
    opacity: 0.15;
    transform: scaleX(0.92);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reel-head {
    display: none;
  }
}

/* ---------------------------------- responsivo ---------------------------------- */

@media (max-width: 1180px) {
  .setup,
  .result {
    grid-template-columns: 1fr;
  }
  .setup-aside {
    position: static;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .charts {
    grid-template-columns: 1fr;
  }
  .settings-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.35s var(--ease);
    z-index: var(--z-drawer);
    box-shadow: var(--shadow);
  }
  .shell.nav-open .sidebar {
    transform: none;
  }
  .scrim {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-drawer) - 1);
    background: rgba(4, 3, 8, 0.6);
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-topbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 58px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 7, 11, 0.86);
    backdrop-filter: blur(12px);
  }
  .page {
    padding: 22px 16px 56px;
  }
  .global-banner {
    padding: 10px 16px;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-art {
    padding: 28px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .reel {
    margin-top: 24px;
  }
  .processing-layout {
    grid-template-columns: 1fr;
  }
  .platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .caption-styles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .option-grid,
  .form-grid,
  .style-guide {
    grid-template-columns: 1fr;
  }
  .decup-clip {
    grid-template-columns: 1fr;
  }
  .decup-clip img {
    max-width: 240px;
  }
  .tech {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .seg {
    grid-template-columns: 1fr auto;
  }
  .seg .seg-text {
    grid-column: 1 / -1;
  }
  .clip {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }
  .clip .label-tag {
    display: none;
  }
  .clip .clip-thumb {
    width: 72px;
    height: 46px;
  }
  .section {
    padding: 20px 16px;
  }
  .tl-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .kpi.hero {
    grid-column: 1 / -1;
  }
  h1,
  .title-input {
    font-size: 24px;
  }
}

/* material de apoio: arquivo + instrução de uso */
.media-list {
  display: grid;
  gap: 10px;
}
.media-item {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.media-thumb {
  position: relative;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 26px;
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-tag {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(8, 7, 11, 0.8);
  color: var(--accent-text);
  font-size: 11.5px;
}
.media-body {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}
.media-body .name {
  font-weight: 540;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-body .specs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.media-body .textarea {
  min-height: 62px;
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .media-item {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }
  .media-thumb {
    height: 76px;
  }
}

/* marca */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { display: grid; gap: 1px; min-width: 0; }
.brand-name { font-weight: 640; font-size: 16px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-name b { font-weight: 640; color: var(--accent-text); }
.brand-tag { font-size: 12px; font-weight: 450; color: var(--muted); letter-spacing: 0; line-height: 1.3; }
.auth-art .brand-name { font-size: 18px; }


/* ---------------------------------- editor em camadas ---------------------------------- */

.editor { display: grid; grid-template-rows: 56px minmax(0, 1fr) 300px; height: 100dvh; background: var(--bg); overflow: hidden; }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.ed-title { display: grid; min-width: 0; }
.ed-title strong { font-size: 14px; font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.ed-tools { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.ed-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; }
.ed-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ed-menu { position: relative; }
.ed-menu-list {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; max-height: 360px; overflow: auto; padding: 6px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); box-shadow: var(--shadow); z-index: 30; display: grid; gap: 2px;
}
.ed-menu-list button {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); cursor: pointer; text-align: left; font-size: 13px; white-space: nowrap;
}
.ed-menu-list button:hover { background: var(--surface-3); color: var(--text); }
.ed-menu-list img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.ed-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.ed-stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; padding: 14px; }
.pv-wrap { display: grid; place-items: center; min-height: 0; overflow: hidden; }
.pv-stage { position: relative; overflow: hidden; border-radius: 10px; background: #000; box-shadow: var(--shadow); }
.pv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-overlay { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; color: #fff; font-family: var(--font); }
.pv-cap { position: absolute; text-align: center; line-height: 1.15; letter-spacing: -0.01em; }
.pv-center { position: absolute; left: 7%; right: 7%; text-align: center; }
.ed-transport { display: flex; align-items: center; gap: 12px; justify-content: center; padding-top: 10px; flex-wrap: wrap; }
.ed-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.ed-play:active { transform: scale(0.96); }
.ed-side { border-left: 1px solid var(--line); background: var(--bg-raised); overflow: auto; min-height: 0; }
.ins { display: grid; gap: 14px; padding: 16px; }
.ins-head { display: grid; gap: 2px; }
.ins-field { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.ins-field > span b { float: right; font-weight: 500; color: var(--text); }
.ins-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ins-num { display: flex; align-items: center; gap: 6px; }
.ins-num input { min-height: 36px; padding: 6px 9px; }
.ins-num em { font-style: normal; color: var(--muted); font-size: 12px; }
.ins-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ins-thumb { width: 100%; max-height: 160px; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.ins-tip { display: flex; gap: 6px; align-items: flex-start; }
.ed-bottom { display: grid; grid-template-rows: 34px minmax(0, 1fr); border-top: 1px solid var(--line); background: var(--bg-raised); min-height: 0; }
.ed-zoom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.ed-zoom input[type="range"] { width: 140px; accent-color: var(--accent); }
.ed-loading { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; padding: 20px; }

.tl { overflow: auto; position: relative; min-height: 0; user-select: none; scrollbar-width: thin; }
.tl-inner { position: relative; min-height: 100%; }
.tl-ruler { display: flex; height: 24px; position: sticky; top: 0; z-index: 5; background: var(--bg-raised); border-bottom: 1px solid var(--line); cursor: text; }
.tl-head {
  flex: none; width: 104px; position: sticky; left: 0; z-index: 4; background: var(--bg-raised); display: flex; align-items: center;
  gap: 7px; padding: 0 12px; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line);
}
.tl-ticks { position: relative; height: 100%; }
.tl-ticks span { position: absolute; top: 5px; height: 19px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); padding-left: 4px; border-left: 1px solid var(--line-2); }
.tl-track { display: flex; height: 38px; border-bottom: 1px solid var(--line); }
.tl-track.t-video { height: 52px; }
.tl-track.t-legenda { height: 30px; }
.tl-track.t-sons, .tl-track.t-musica { height: 32px; }
.tl-lane { position: relative; height: 100%; }
.tlb {
  position: absolute; top: 5px; bottom: 5px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.14); background: var(--surface-3);
  display: flex; align-items: center; overflow: hidden; cursor: grab; color: #fff; font-size: 11.5px; touch-action: none;
  background-size: cover; background-position: center;
}
.tlb:active { cursor: grabbing; }
.tlb.sel { outline: 2px solid #fff; outline-offset: 1px; z-index: 2; }
.tlb.texto { background: rgba(244, 242, 250, 0.14); color: var(--text); }
.tlb.apoio { background-color: rgba(184, 157, 255, 0.32); }
.tlb.som { border-color: var(--accent-line); }
.tlb.musica { background: linear-gradient(90deg, rgba(124, 58, 237, 0.35), rgba(124, 58, 237, 0.18)); cursor: pointer; }
.tlb-label { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; font-family: var(--mono); }
.tl-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 1; }
.tl-h.l { left: 0; }
.tl-h.r { right: 0; }
.tlb:hover .tl-h { background: rgba(255, 255, 255, 0.22); }
.tl-tr { position: absolute; top: 2px; height: 6px; background: var(--accent-text); border-radius: 3px; pointer-events: none; z-index: 3; }
.tl-drop { position: absolute; top: 2px; bottom: 2px; width: 3px; margin-left: -1px; background: #fff; border-radius: 2px; z-index: 3; }
.tlw {
  position: absolute; top: 5px; bottom: 5px; border-radius: 4px; background: rgba(244, 242, 250, 0.12); font-size: 10.5px; color: var(--text-2);
  overflow: hidden; white-space: nowrap; padding: 0 3px; line-height: 20px; cursor: pointer;
}
.tlw.off { background: transparent; border: 1px dashed var(--line-2); color: var(--faint); text-decoration: line-through; }
.tlw.edited { background: rgba(167, 139, 250, 0.28); color: var(--text); }
.tlw.sel { outline: 2px solid #fff; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; z-index: 6; box-shadow: 0 0 0 1px rgba(8, 7, 11, 0.6); }
.tl-playhead::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 10px; border-radius: 3px; background: #fff; }

.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .editor { grid-template-rows: auto minmax(0, 1fr) 240px; }
  .ed-top { flex-wrap: wrap; padding: 8px; gap: 6px; }
  .ed-tools { margin-left: 0; flex-wrap: wrap; }
  .ed-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 38vh); }
  .ed-side { border-left: 0; border-top: 1px solid var(--line); }
  .ed-approx { display: none; }
}


/* ---------------------------------- artes para Instagram ---------------------------------- */

.grid-arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 18px; }
.art-card {
  display: grid; gap: 10px; justify-items: center; padding: 10px 10px 14px; border-radius: var(--r-panel);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.3s var(--ease), background 0.25s var(--ease);
}
.art-card:hover { border-color: var(--line-3); background: var(--surface-2); transform: translateY(-2px); }
.art-card .meta { justify-self: stretch; padding: 0 4px; display: grid; gap: 6px; }
.art-card .title { font-weight: 580; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-thumb { position: relative; overflow: hidden; border-radius: 8px; background: var(--bg-raised); flex: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 14px; }
.tpl-card {
  display: grid; gap: 10px; justify-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--bg-raised); cursor: pointer; text-align: left; color: var(--text); transition: border-color 0.2s var(--ease);
}
.tpl-card:hover { border-color: var(--accent-text); }
.tpl-meta { justify-self: stretch; display: grid; gap: 6px; }
.art-layout { display: grid; grid-template-columns: 146px minmax(0, 1fr) 360px; gap: 20px; align-items: stretch; height: calc(100dvh - 200px); min-height: 540px; }
.art-slides { display: grid; gap: 10px; align-content: start; overflow: auto; padding-right: 4px; scrollbar-width: thin; }
.art-slide-btn {
  display: grid; gap: 6px; justify-items: start; padding: 6px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); cursor: pointer;
}
.art-slide-btn.on { border-color: var(--accent-text); background: var(--accent-soft); color: var(--text); }
.art-add { display: grid; gap: 2px; }
.art-add .btn { justify-content: flex-start; }
.art-stage {
  min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-panel); border: 1px solid var(--line);
  background: radial-gradient(600px 300px at 50% 0%, rgba(124, 58, 237, 0.1), transparent 70%), var(--bg-raised);
}
.art-canvas { position: relative; overflow: hidden; border-radius: 6px; box-shadow: var(--shadow); }
.art-side { padding: 18px; display: grid; gap: 14px; align-content: start; overflow: auto; min-height: 0; }

@media (max-width: 1180px) {
  .art-layout { grid-template-columns: 128px minmax(0, 1fr); height: auto; }
  .art-stage { height: 72vh; }
  .art-side { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .art-layout { grid-template-columns: 1fr; }
  .art-slides { grid-auto-flow: column; grid-auto-columns: 132px; overflow-x: auto; }
  .art-stage { height: 62vh; }
}
.tpl-meta .pill { white-space: nowrap; }
