/**
 * Estilos principales - Subtitulador automático de vídeo
 * Fijate Tools • Oscuro por defecto + Tema claro completo + Responsive
 */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-app: #070b14;
  --bg-card: #111827;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #273449;
  --bg-input: #0b1220;

  --border-color: rgba(148, 163, 184, 0.18);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.32);

  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.16);

  --accent: #06b6d4;
  --accent-light: rgba(6, 182, 212, 0.15);

  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);

  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.16);

  --danger: #f43f5e;
  --danger-light: rgba(244, 63, 94, 0.15);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-card: 0 12px 30px -6px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-app: #f1f5f9;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #f8fafc;

  --border-color: #cbd5e1;
  --border-subtle: #e2e8f0;
  --border-strong: #94a3b8;

  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.12);

  --accent: #0284c7;
  --accent-light: rgba(2, 132, 199, 0.12);

  --success: #059669;
  --success-light: rgba(5, 150, 105, 0.12);

  --warning: #d97706;
  --warning-light: rgba(217, 119, 6, 0.12);

  --danger: #e11d48;
  --danger-light: rgba(225, 29, 72, 0.12);

  --shadow-card: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.hero-title,
.faq-section-title {
  font-family: var(--font-heading);
}

.mono,
code {
  font-family: var(--font-mono);
}

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

/* Badges de barra rápida */
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--text-main);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Controles de formulario y botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.form-control,
.form-select,
.studio-card select,
.studio-card input[type="text"],
.studio-card input[type="number"],
.studio-card textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  font-family: var(--font-main);
  font-size: 0.88rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.studio-card select,
.form-select {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

[data-theme="light"] .studio-card select,
[data-theme="light"] .form-select {
  background-color: var(--bg-input);
  color: var(--text-main);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.studio-card select option,
.form-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

[data-theme="light"] .studio-card select option,
[data-theme="light"] .form-select option {
  background-color: #ffffff;
  color: #0f172a;
}

.studio-card textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
  white-space: pre-wrap;
}

.studio-card input:focus,
.studio-card select:focus,
.studio-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Tarjeta principal del estudio */
.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 2.2vw, 1.5rem);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
  max-width: 100%;
}

/* Zona de carga de vídeo */
.video-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.video-dropzone:hover,
.video-dropzone.is-dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dropzone-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  flex: 1 1 260px;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.dropzone-meta strong {
  font-size: 0.95rem;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.dropzone-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.demo-notice-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  border: 1px solid rgba(6, 182, 212, 0.28);
  color: var(--text-main);
  font-size: 0.84rem;
}

/* Barra superior de fuentes de subtítulos */
.source-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tabs-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.source-tab-btn,
.editor-tab-btn {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.source-tab-btn.is-active,
.editor-tab-btn.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.source-panel,
.editor-panel {
  display: none;
}

.source-panel.is-active,
.editor-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.inline-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Barra de progreso */
.progress-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.2s ease;
}

/* Rejilla principal: visor a la izquierda + editor/estilos a la derecha */
.workspace-split-grid {
  display: grid;
  grid-template-columns: minmax(290px, 420px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.preview-stage-card,
.editor-stage-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.preview-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.aspect-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.aspect-btn {
  min-height: 40px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.aspect-btn.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.canvas-frame-wrap {
  position: relative;
  width: 100%;
  background: #050811;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.4rem;
}

#preview-canvas {
  display: block;
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
}

.preview-options-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

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

/* Barra de transporte */
.transport-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-transport {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-transport-ghost {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
}

.time-readout {
  flex: 1 1 auto;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

.scrubber-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

#timeline-scrubber {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  min-height: 24px;
}

.timeline-markers {
  position: relative;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  overflow: hidden;
}

.timeline-cue-dot {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--accent);
  opacity: 0.85;
  border-radius: 2px;
}

/* Panel derecho: bloques y palabras */
.editor-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.counter-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
}

.blocks-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem;
}

.blocks-toolbar select {
  width: auto;
  min-width: 130px;
  flex: 1 1 130px;
}

.subtitle-blocks-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.sub-block-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.sub-block-card.is-playing {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.sub-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.sub-block-index {
  min-height: 32px;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.sub-block-times {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.time-mini-input {
  width: 74px !important;
  min-height: 34px !important;
  padding: 0.2rem 0.4rem !important;
  font-size: 0.78rem !important;
  text-align: center;
}

.time-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.sub-block-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-mini-action {
  min-height: 32px;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-mini-action:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.btn-mini-action.is-danger:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.sub-words-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.word-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
  padding: 0.15rem 0.25rem 0.15rem 0.4rem;
  gap: 0.2rem;
}

.word-pill.is-highlighted {
  border-color: var(--warning);
  background: var(--warning-light);
}

.word-pill.is-speaking {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.word-pill-input {
  width: auto !important;
  min-height: 30px !important;
  padding: 0.1rem 0.2rem !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-main) !important;
  font-size: 0.84rem !important;
  font-weight: 600;
  box-shadow: none !important;
}

.word-star-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.word-pill.is-highlighted .word-star-btn {
  color: var(--warning);
}

.empty-blocks-state {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Estilos virales */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
}

.preset-style-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.12s ease;
}

.preset-style-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.preset-style-card strong {
  font-size: 0.86rem;
}

.preset-style-card small {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.preset-preview-badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.preset-badge-hormozi { background: #000000; color: #facc15; border: 1px solid #facc15; }
.preset-badge-karaoke { background: #0f172a; color: #22d3ee; text-shadow: 0 0 8px #22d3ee; }
.preset-badge-tiktok-pill { background: #7c3aed; color: #ffffff; }
.preset-badge-minimal { background: rgba(15, 23, 42, 0.85); color: #f8fafc; }
.preset-badge-elastic-pop { background: #064e3b; color: #34d399; }
.preset-badge-cinema { background: #090d16; color: #fef9c3; }

.style-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.75rem;
}

.color-input-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.25rem 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.color-input-box input[type="color"] {
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

/* Panel de exportación */
.export-card-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.export-card-box h3 {
  margin: 0;
  font-size: 0.98rem;
}

.export-result-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Modales accesibles y notificaciones toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  margin: 0;
  font-size: 1.05rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.15rem 1.25rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.modal-body ol,
.modal-body ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1100;
  max-width: calc(100vw - 2rem);
}

.toast-item {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-success { border-color: var(--success); }
.toast-item.is-leaving { opacity: 0; transform: translateY(8px); }

/* Responsive tablet y móvil */
@media (max-width: 1024px) {
  .workspace-split-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .studio-card {
    padding: 0.85rem;
  }

  .video-dropzone {
    flex-direction: column;
    align-items: stretch;
  }

  .dropzone-left {
    flex: 0 0 auto;
    width: 100%;
  }

  .video-dropzone .btn {
    width: 100%;
  }

  .preview-options-row {
    grid-template-columns: 1fr;
  }

  .source-tab-btn,
  .editor-tab-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .inline-action-row .btn {
    width: 100%;
  }
}
