/* ==========================================================================
   ESTÚDIO CAPCUT CONTÁBIL - CSS DO EDITOR DE VÍDEO E MÍDIA
   Interface moderna estilo CapCut Web com suporte a 9:16, 1:1, 16:9 e 4:5.
   ========================================================================== */

:root {
  --capcut-bg: #121316;
  --capcut-surface: #1e2024;
  --capcut-surface-hover: #2a2d33;
  --capcut-surface-active: #32363d;
  --capcut-border: #2e323b;
  --capcut-text: #f3f4f6;
  --capcut-text-muted: #9ca3af;
  --capcut-primary: #00d287;
  --capcut-primary-hover: #00b875;
  --capcut-accent: #2563eb;
  --capcut-danger: #ef4444;
  --capcut-warning: #f59e0b;
}

.capcut-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 75px);
  min-height: 650px;
  background: var(--capcut-bg);
  color: var(--capcut-text);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  font-family: inherit;
}

/* Barra Superior */
.capcut-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: var(--capcut-surface);
  border-bottom: 1px solid var(--capcut-border);
  gap: 12px;
  z-index: 10;
}

.capcut-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.capcut-logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, #00d287, #2563eb);
  padding: 5px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.capcut-title-input {
  background: transparent;
  border: 1px solid transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  width: 220px;
}

.capcut-title-input:hover, .capcut-title-input:focus {
  background: var(--capcut-bg);
  border-color: var(--capcut-border);
  outline: none;
}

.capcut-aspect-selector {
  display: flex;
  background: var(--capcut-bg);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--capcut-border);
}

.capcut-aspect-btn {
  background: transparent;
  border: none;
  color: var(--capcut-text-muted);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.capcut-aspect-btn:hover {
  color: #fff;
}

.capcut-aspect-btn.active {
  background: var(--capcut-primary);
  color: #0b1e16;
  font-weight: 700;
}

.capcut-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.capcut-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.capcut-btn-primary {
  background: var(--capcut-primary);
  color: #0b1e16;
}
.capcut-btn-primary:hover {
  background: var(--capcut-primary-hover);
  transform: translateY(-1px);
}

.capcut-btn-sec {
  background: var(--capcut-surface-hover);
  color: #fff;
  border-color: var(--capcut-border);
}
.capcut-btn-sec:hover {
  background: var(--capcut-surface-active);
  color: #fff;
}

.capcut-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.capcut-btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Área de Trabalho Central (Split Vertical) */
.capcut-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Barra Lateral de Abas de Ferramentas */
.capcut-sidebar-nav {
  width: 72px;
  background: var(--capcut-surface);
  border-right: 1px solid var(--capcut-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 6px;
  overflow-y: auto;
}

.capcut-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 56px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--capcut-text-muted);
  font-size: 10px;
  font-weight: 600;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.capcut-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.capcut-nav-item:hover {
  color: #fff;
  background: var(--capcut-surface-hover);
}

.capcut-nav-item.active {
  color: var(--capcut-primary);
  background: var(--capcut-surface-active);
  font-weight: 700;
}

/* Painel de Conteúdo da Ferramenta */
.capcut-tool-panel {
  width: 320px;
  background: var(--capcut-surface);
  border-right: 1px solid var(--capcut-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px;
}

.capcut-panel-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.capcut-panel-section {
  margin-bottom: 16px;
}

.capcut-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.capcut-preset-card {
  background: var(--capcut-bg);
  border: 1px solid var(--capcut-border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  color: #fff;
}

.capcut-preset-card:hover {
  border-color: var(--capcut-primary);
  transform: translateY(-2px);
  background: var(--capcut-surface-hover);
}

.capcut-preset-card strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.capcut-preset-card p {
  font-size: 10px;
  color: var(--capcut-text-muted);
  margin: 0;
  line-height: 1.3;
}

/* Canvas / Player Central */
.capcut-preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #090a0c;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.capcut-canvas-wrapper {
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(100% - 60px);
}

#capcut-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Controles de Reprodução Flutuantes */
.capcut-player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 32, 36, 0.85);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.08);
  margin-top: 10px;
}

.capcut-ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.15s;
}

.capcut-ctrl-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}

.capcut-ctrl-btn.play-btn {
  background: var(--capcut-primary);
  color: #0b1e16;
  width: 38px;
  height: 38px;
}
.capcut-ctrl-btn.play-btn:hover {
  background: var(--capcut-primary-hover);
  transform: scale(1.1);
}

.capcut-timecode {
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
  min-width: 95px;
  text-align: center;
}

/* Painel de Propriedades à Direita */
.capcut-inspector-panel {
  width: 280px;
  background: var(--capcut-surface);
  border-left: 1px solid var(--capcut-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px;
}

.capcut-field-group {
  margin-bottom: 14px;
}

.capcut-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--capcut-text-muted);
  margin-bottom: 6px;
}

.capcut-input, .capcut-select, .capcut-textarea {
  width: 100%;
  background: var(--capcut-bg);
  border: 1px solid var(--capcut-border);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
}

.capcut-input:focus, .capcut-select:focus, .capcut-textarea:focus {
  border-color: var(--capcut-primary);
  outline: none;
}

/* Linha do Tempo (Timeline) Inferior */
.capcut-timeline-wrapper {
  height: 230px;
  background: var(--capcut-surface);
  border-top: 1px solid var(--capcut-border);
  display: flex;
  flex-direction: column;
  user-select: none;
}

.capcut-timeline-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: #18191d;
  border-bottom: 1px solid var(--capcut-border);
}

.capcut-tl-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.capcut-tl-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--capcut-text-muted);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.capcut-tl-btn:hover {
  background: var(--capcut-surface-hover);
  color: #fff;
}

.capcut-timeline-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  background: #111215;
}

.capcut-track-headers {
  width: 110px;
  background: var(--capcut-surface);
  border-right: 1px solid var(--capcut-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.capcut-ruler-header {
  height: 24px;
  border-bottom: 1px solid var(--capcut-border);
  background: #18191d;
}

.capcut-track-header {
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--capcut-text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 6px;
}

.capcut-tracks-content {
  flex: 1;
  position: relative;
  min-width: 800px;
}

/* Régua de Tempo */
.capcut-ruler {
  height: 24px;
  background: #18191d;
  border-bottom: 1px solid var(--capcut-border);
  position: relative;
  cursor: pointer;
}

.capcut-ruler-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 4px;
  font-size: 9px;
  color: var(--capcut-text-muted);
  font-family: monospace;
}

/* Faixas */
.capcut-track {
  height: 38px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.015);
}

.capcut-clip {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: move;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  border: 1px solid transparent;
  transition: border-color 0.15s;
}

.capcut-clip.active {
  border-color: #fff;
  box-shadow: 0 0 0 1px var(--capcut-primary);
}

.capcut-clip-video { background: linear-gradient(90deg, #1d4ed8, #2563eb); color: #fff; }
.capcut-clip-text { background: linear-gradient(90deg, #b45309, #d97706); color: #fff; }
.capcut-clip-captions { background: linear-gradient(90deg, #047857, #059669); color: #fff; }
.capcut-clip-audio { background: linear-gradient(90deg, #6d28d9, #7c3aed); color: #fff; }
.capcut-clip-sticker { background: linear-gradient(90deg, #be123c, #e11d48); color: #fff; }

/* Agulha de Tempo (Playhead) */
.capcut-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff3b30;
  pointer-events: none;
  z-index: 50;
  transform: translateX(-50%);
}

.capcut-playhead-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 14px;
  background: #ff3b30;
  clip-path: polygon(0% 0%, 100% 0%, 100% 60%, 50% 100%, 0% 60%);
}

/* Teleprompter Flutuante */
.capcut-teleprompter-overlay {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 520px;
  max-height: 220px;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 14px 18px;
  z-index: 80;
  box-shadow: 0 12px 36px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
}

.capcut-tp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}

.capcut-tp-content {
  overflow-y: auto;
  flex: 1;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  color: #fff;
  text-align: center;
  scroll-behavior: smooth;
}

.capcut-tp-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

/* Modal de Gravação de Câmera e Tela */
.capcut-recorder-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.capcut-rec-card {
  width: 90%;
  max-width: 720px;
  background: var(--capcut-surface);
  border: 1px solid var(--capcut-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
}

.capcut-rec-preview {
  background: #000;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.capcut-rec-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.capcut-rec-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Selos Fiscais e Badges */
.capcut-badge-item {
  background: var(--capcut-bg);
  border: 1px solid var(--capcut-border);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 11px;
  transition: all 0.15s;
}

.capcut-badge-item:hover {
  border-color: var(--capcut-primary);
  transform: scale(1.04);
}

.capcut-badge-urgente { background: #dc2626; color: #fff; }
.capcut-badge-prazo { background: #d97706; color: #fff; }
.capcut-badge-simples { background: #059669; color: #fff; }
.capcut-badge-receita { background: #1e3a8a; color: #fff; }
.capcut-badge-economia { background: #00d287; color: #0b1e16; }

/* Botão AutoCut com efeito Shimmer */
.capcut-btn-autocut {
  background: linear-gradient(135deg, #00d287, #2563eb, #9333ea);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 700;
  animation: shimmerGradient 3s ease infinite;
  box-shadow: 0 4px 15px rgba(0, 210, 135, 0.35);
  border: none;
}
.capcut-btn-autocut:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 210, 135, 0.5);
}

@keyframes shimmerGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Modal de Processamento Inteligente AutoCut */
.capcut-autocut-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.capcut-autocut-card {
  width: 90%;
  max-width: 600px;
  background: var(--capcut-surface);
  border: 1px solid var(--capcut-border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.85);
  text-align: center;
}

.capcut-autocut-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 20px 0;
}

.capcut-autocut-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--capcut-bg);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--capcut-text-muted);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.25s;
}

.capcut-autocut-step.concluido {
  color: #fff;
  border-color: rgba(0, 210, 135, 0.4);
  background: rgba(0, 210, 135, 0.08);
}

.capcut-autocut-step.ativo {
  color: #00d287;
  border-color: #00d287;
  background: rgba(0, 210, 135, 0.15);
  animation: pulseStep 1.2s infinite;
}

@keyframes pulseStep {
  0% { transform: scale(1); }
  50% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.capcut-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #2a2d33;
  color: #fff;
}

.capcut-autocut-step.concluido .capcut-step-icon {
  background: #00d287;
  color: #0b1e16;
}

.capcut-autocut-step.ativo .capcut-step-icon {
  background: #2563eb;
  color: #fff;
}

/* Painel de Diagnóstico de IA */
.capcut-diagnostico-card {
  background: linear-gradient(135deg, rgba(0,210,135,0.1), rgba(37,99,235,0.1));
  border: 1px solid rgba(0,210,135,0.3);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
}

.capcut-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #00d287;
  background: rgba(0,210,135,0.18);
  padding: 4px 12px;
  border-radius: 20px;
}

.capcut-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
  color: #d1d5db;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.capcut-toggle-row input[type="checkbox"] {
  accent-color: var(--capcut-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

