/* ==========================================================================
   REPTARCONVERT - ESTILOS OFICIALES Y REFINADOS (TEMA AZUL MARINO #000080 OFICIAL)
   ========================================================================== */

/* 1. VARIABLES DE COLOR Y SOMBRAS LIMPIAS (SIN GLOW EXAGERADO) */
:root,
[data-theme="light"] {
  --primary: #000080 !important;
  --primary-dark: #000056 !important;
  --primary-hover: #0000cd !important;
  --primary-gradient: linear-gradient(135deg, #0000cd 0%, #000080 100%) !important;
  --primary-glow: rgba(0, 0, 128, 0.15) !important;
  --primary-light: rgba(0, 0, 128, 0.06) !important;
  --border-highlight: rgba(0, 0, 128, 0.35) !important;
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.08);
}



/* 2. LOGO Y NAVBAR */
.brand-logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  font-weight: 800 !important;
  font-size: 1.35rem !important;
  color: var(--text) !important;
  text-decoration: none !important;
}

.brand-logo .logo-img {
  width: 38px !important;
  height: 38px !important;
  object-fit: contain !important;
  image-rendering: -webkit-optimize-contrast !important;
}

.brand-logo .logo-text {
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  font-size: 1.35rem !important;
  color: var(--text) !important;
}

.brand-logo .logo-accent {
  color: var(--primary) !important;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary) !important;
}

.nav-donate-link {
  color: var(--primary) !important;
  border: 1px solid rgba(0, 0, 128, 0.3) !important;
  background: rgba(0, 0, 128, 0.05) !important;
  border-radius: 9999px !important;
  padding: 5px 14px !important;
  transition: all 0.2s ease !important;
}

.nav-donate-link:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.2) !important;
}

.nav-dropdown-btn {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
}

.nav-dropdown-btn:hover,
.nav-dropdown.open .nav-dropdown-btn {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.2) !important;
}

.dropdown-item:hover {
  background: rgba(0, 0, 128, 0.06) !important;
  border-color: rgba(0, 0, 128, 0.25) !important;
}

.theme-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 128, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

/* 3. BOTONES (SOMBRAS SUTILES, SIN BRILLO ARTIFICIAL) */
.btn-primary,
.btn.btn-primary {
  background: var(--primary) !important;
  border: 1px solid var(--primary-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.2) !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 128, 0.25) !important;
}

.btn-secondary.btn-outline,
.btn.btn-outline {
  border: 1.5px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}

.btn-secondary.btn-outline:hover,
.btn.btn-outline:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.15) !important;
}

/* 4. HERO SECTION */
.hero-brand-presentation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.hero-main-logo {
  width: 320px !important;
  height: 320px !important;
  max-width: 90vw !important;
  object-fit: contain !important;
  image-rendering: -webkit-optimize-contrast !important;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.12)) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.hero-main-logo:hover {
  transform: scale(1.05) translateY(-4px) !important;
}

.hero-badge {
  border: 1px solid rgba(0, 0, 128, 0.3) !important;
  background: rgba(0, 0, 128, 0.06) !important;
}

.hero-badge span {
  color: var(--primary) !important;
  font-weight: 700 !important;
}

.hero-stats .stat-num {
  color: var(--primary) !important;
}

.hero-donate-banner {
  border-left: 3px solid var(--primary) !important;
  background: rgba(0, 0, 128, 0.04) !important;
  border-radius: 8px !important;
}

.hero-donate-icon {
  color: var(--primary) !important;
}

.btn-hero-donate {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.2) !important;
}

.btn-hero-donate:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px) !important;
}

/* 5. SELECTOR DE NIVELES (NÍTIDO Y LIMPIO, SIN NEÓN) */
.level-selector-section {
  margin: 20px auto 26px auto;
  width: 100%;
}

.level-selector-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.level-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.level-card:hover {
  border-color: rgba(0, 0, 128, 0.35);
  transform: translateY(-1px);
}

.level-card.active {
  border: 2px solid var(--primary) !important;
  background: rgba(0, 0, 128, 0.04) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.level-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.level-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.level-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.level-badge.rec {
  background: var(--primary) !important;
  color: #fff !important;
}

.level-badge.ext {
  background: #f59e0b;
  color: #000;
}

.level-badge.low {
  background: var(--accent-green);
  color: #fff;
}

.level-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 6. DROPZONE (LIMPIO Y ELEGANTE) */
.dropzone-container {
  width: 100%;
  margin: 0 auto 28px auto;
}

.dropzone {
  border: 2px dashed rgba(0, 0, 128, 0.35) !important;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary) !important;
  background: rgba(0, 0, 128, 0.03) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px auto;
  border-radius: 16px;
  background: rgba(0, 0, 128, 0.08) !important;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-2px);
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.dropzone-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.dropzone-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary) !important;
  color: #fff !important;
  padding: 12px 26px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 128, 0.25) !important;
  transition: transform 0.15s ease, background 0.15s ease;
}

.dropzone-btn:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
}

.dropzone-tags {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.format-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* 7. BARRA DE ESTADÍSTICAS */
.stats-summary-bar {
  width: 100%;
  margin: 0 auto 24px auto;
  background: var(--bg-card) !important;
  border: 1.5px solid rgba(0, 0, 128, 0.3) !important;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.stats-info {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text);
}

.stat-val.saving-highlight {
  color: var(--accent-green);
}

.btn-download-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-gradient) !important;
  color: #fff !important;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-download-all:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 128, 0.3) !important;
}

/* ETAPA 1: ARCHIVOS EN ESPERA (STAGED) */
.staged-section {
  width: 100%;
  margin: 0 auto 28px auto;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.staged-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.staged-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staged-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-text-action:hover {
  color: var(--primary);
  background: rgba(0, 0, 128, 0.05);
}

.staged-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.staged-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.staged-item-card:hover {
  border-color: rgba(0, 0, 128, 0.3);
}

.staged-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.staged-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staged-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.staged-badge-ready {
  background: rgba(0, 0, 128, 0.08);
  color: var(--primary);
  border: 1px solid rgba(0, 0, 128, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.staged-cta-wrap {
  display: flex;
  justify-content: center;
}

.btn-generate-compress {
  width: 100%;
  max-width: 440px;
  padding: 14px 28px !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 128, 0.25) !important;
  cursor: pointer !important;
}

.btn-generate-compress:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ETAPA 2: RESULTADOS */
.results-section {
  width: 100%;
  margin: 0 auto 36px auto;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.results-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

/* 8. LISTA DE ARCHIVOS */
.files-list-section {
  width: 100%;
  margin: 0 auto 36px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.file-card:hover {
  border-color: rgba(0, 0, 128, 0.3);
}

.file-card.completed {
  border-color: rgba(16, 185, 129, 0.35);
}

.file-main-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.file-icon-box.pdf {
  background: rgba(0, 0, 128, 0.1);
  color: #000080;
  border: 1px solid rgba(0, 0, 128, 0.25);
}

.file-icon-box.image {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.file-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.file-sizes {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.file-saving-badge {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.76rem;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-file-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 128, 0.2);
  transition: transform 0.15s ease;
}

.btn-file-download:hover {
  transform: translateY(-1px);
}

.btn-file-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-file-remove:hover {
  color: #000080;
  border-color: #000080;
}

.file-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary) !important;
  transition: width 0.2s ease;
}

/* 9. FORMATOS COMPATIBLES */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (max-width: 1200px) {
  .formats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .formats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .formats-grid {
    grid-template-columns: 1fr;
  }
}

.format-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.85rem 1.25rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
}

.format-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 0, 128, 0.08);
  border-color: rgba(0, 0, 128, 0.4) !important;
}

.format-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 0.85rem;
}

.format-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.1rem auto;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(0, 0, 128, 0.06) 0%, rgba(0, 0, 128, 0.13) 100%);
  color: var(--primary);
  border: 1.5px solid rgba(0, 0, 128, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 128, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.format-card-icon svg {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.format-card:hover .format-card-icon {
  transform: scale(1.1) translateY(-3px);
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 128, 0.3), 0 2px 6px rgba(0, 0, 128, 0.2);
}

.format-card:hover .format-card-icon svg {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

body.dark-mode .format-card-icon {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-color: rgba(255, 255, 255, 0.14);
  color: #8faaff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.dark-mode .format-card:hover .format-card-icon {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(0, 0, 128, 0.55);
}

.format-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  line-height: 1.35;
}

.format-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 1rem 0;
}

/* Flujo visual De ➔ A en las tarjetas */
.format-flow-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.format-flow-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.format-flow-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.format-flow-label.in-label {
  color: #64748b;
}

.format-flow-label.out-label {
  color: var(--primary);
}

.format-flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.format-tag {
  background: rgba(0, 0, 128, 0.04);
  border: 1px solid rgba(0, 0, 128, 0.16);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.format-tag-in {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-muted);
}

.format-tag-out {
  background: rgba(0, 0, 128, 0.08);
  border-color: rgba(0, 0, 128, 0.28);
  color: var(--primary);
  font-weight: 800;
}

.format-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(0, 0, 128, 0.05);
  border-radius: 20px;
  padding: 3px 10px;
  margin: 2px 0;
  border: 1px solid rgba(0, 0, 128, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

body.dark-mode .format-tag {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .format-tag-in {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

body.dark-mode .format-tag-out {
  border-color: rgba(143, 170, 255, 0.4);
  color: #93b5ff;
  background: rgba(0, 0, 128, 0.35);
}

body.dark-mode .format-flow-arrow {
  color: #93b5ff;
  background: rgba(0, 0, 128, 0.25);
  border-color: rgba(143, 170, 255, 0.25);
}

/* ==========================================================
   MATRIZ / DIRECTORIO COMPLETO DE CONVERSIONES (DE ➔ A)
   ========================================================== */
.matrix-section-wrap {
  margin-top: 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.matrix-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 1.8rem auto;
}

.matrix-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.matrix-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.matrix-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 1.8rem;
}

.matrix-search-box {
  position: relative;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.matrix-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  font-size: 0.92rem;
  font-family: inherit;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.matrix-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 128, 0.12);
}

.matrix-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.matrix-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.matrix-pill-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.matrix-pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.matrix-pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.25);
}

/* Tabla / Grid de Rutas */
.matrix-routes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .matrix-routes-grid {
    grid-template-columns: 1fr;
  }
}

.matrix-route-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.matrix-route-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 128, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 128, 0.06);
}

.matrix-route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.matrix-route-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.matrix-route-badge-tech {
  font-size: 0.68rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

.matrix-route-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.matrix-badge-source {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 800;
  font-size: 0.84rem;
  padding: 4px 10px;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.matrix-arrow {
  color: var(--primary);
  font-weight: 900;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
}

.matrix-targets-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.matrix-target-chip {
  background: rgba(0, 0, 128, 0.07);
  border: 1px solid rgba(0, 0, 128, 0.25);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .matrix-target-chip {
  background: rgba(0, 0, 128, 0.35);
  border-color: rgba(143, 170, 255, 0.4);
  color: #93b5ff;
}

.matrix-route-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* 9.5. SECCIÓN DE VENTAJAS (¿POR QUÉ ELEGIR REPTARCONVERT?) */
.features-section {
  margin: 3.5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1.6rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 0, 128, 0.08);
  border-color: rgba(0, 0, 128, 0.4) !important;
}

.feature-box-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(0, 0, 128, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(0, 0, 128, 0.2);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover .feature-box-icon {
  transform: scale(1.1);
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 128, 0.25);
  border-color: transparent;
}

.feature-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 128, 0.06);
  color: var(--primary);
  border: 1px solid rgba(0, 0, 128, 0.2);
  margin-bottom: 0.75rem;
}

.feature-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--text);
  line-height: 1.3;
}

.feature-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* 10. SEGURIDAD Y PRIVACIDAD */
.security-banner-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.security-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 128, 0.08) !important;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 128, 0.2);
}

/* 11. FAQ ACCORDIONS (LIMPIO, SIN NEÓN) */
.faq-container {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  padding: 1.25rem 1.4rem !important;
  cursor: pointer;
  border: 1px solid var(--border) !important;
  background: var(--bg-card) !important;
  border-radius: var(--radius) !important;
  transition: all 0.25s ease !important;
}

.faq-item:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

.faq-item.open {
  border-color: rgba(0, 0, 128, 0.35) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.faq-question {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-weight: 700 !important;
  font-size: 1.02rem !important;
  color: var(--text) !important;
  gap: 12px !important;
  user-select: none !important;
}

.faq-question:hover {
  color: var(--primary) !important;
}

.faq-arrow {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease !important;
  flex-shrink: 0 !important;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg) !important;
  color: var(--primary) !important;
}

.faq-answer {
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.25s ease !important;
  color: var(--text-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.65 !important;
  margin-top: 0 !important;
}

.faq-item.open .faq-answer {
  max-height: 800px !important;
  opacity: 1 !important;
  margin-top: 0.85rem !important;
  padding-top: 0.5rem !important;
  border-top: 1px dashed var(--border) !important;
}

/* 12. SECCIÓN DE DONACIONES PAYPAL (ESTILO LIMPIO Y CENTRADO) */
.donate-badge {
  background: rgba(0, 0, 128, 0.08) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(0, 0, 128, 0.25) !important;
}

.donate-chip.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 128, 0.2) !important;
}

.donate-chip:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.donate-custom-input-wrap:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 128, 0.15) !important;
}

.currency-prefix,
.currency-suffix {
  color: var(--primary) !important;
}

/* 13. PUBLICIDAD */
.ad-label {
  color: var(--primary) !important;
}

.ad-placeholder:hover {
  border-color: rgba(0, 0, 128, 0.25) !important;
}

.ad-anchor-close:hover {
  color: var(--primary) !important;
}

/* 14. MODAL INTERSTICIAL Y COOKIES */
.ad-popup-container {
  border-color: var(--border-highlight) !important;
}

.cookie-banner {
  border-top: 1px solid var(--border-highlight) !important;
}

#cookie-accept-btn {
  background: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 128, 0.2) !important;
}

/* 15. BOTÓN FLOTANTE DE CONTACTO */
.floating-contact-btn {
  background: var(--primary) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 128, 0.3) !important;
}

.floating-contact-btn:hover {
  background: var(--primary-hover) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 128, 0.35) !important;
}

.floating-contact-card {
  border-color: var(--border-highlight) !important;
}

.btn-copy-email:hover {
  color: var(--primary) !important;
}

.contact-mailto-btn {
  background: var(--primary) !important;
}

/* 16. FOOTER */
.footer-logo-img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
}

.footer-links a:hover {
  color: var(--primary) !important;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .formats-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  .nav-links {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 100;
  }
  .nav-links.active,
  .nav-links.open {
    display: flex !important;
  }
  .level-grid {
    grid-template-columns: 1fr;
  }
  .formats-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
  .dropzone {
    padding: 34px 16px;
  }
  .stats-summary-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-download-all {
    justify-content: center;
  }
  .file-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .file-actions {
    justify-content: flex-end;
  }
  .security-banner-box {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   CARACTERÍSTICAS PREMIUM: MINIATURAS, COMPARADOR, HISTORIAL Y PURGA RAM
   ========================================================================== */

/* 1. MINIATURAS REALES EN LAS LISTAS */
.file-thumbnail-wrap {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
}

/* 2. BOTONES DE ACCIÓN EN TARJETA Y COMPARADOR */
.btn-compare-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent !important;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-compare-action:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

.btn-file-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 128, 0.08) !important;
  color: var(--primary) !important;
  border: 1.5px solid rgba(0, 0, 128, 0.3) !important;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-file-copy:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--primary-glow) !important;
}

.dropzone-paste-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dropzone-paste-hint kbd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
}

/* 3. MODAL COMPARADOR VISUAL ANTES VS DESPUÉS (SPLIT-SLIDER) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.compare-modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

.compare-modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compare-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.compare-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.compare-meta-badges .tag-meta {
  font-weight: 700;
}

.compare-meta-badges .tag-comp {
  color: var(--text);
}

.compare-meta-badges .tag-saving {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.74rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 128, 0.08);
  color: var(--primary);
}

/* VISOR INTERACTIVO DEL SLIDER */
.compare-viewport-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d13;
  padding: 16px;
  min-height: 320px;
  max-height: 65vh;
}

.compare-viewport {
  position: relative;
  max-width: 100%;
  max-height: 60vh;
  user-select: none;
  -webkit-user-select: none;
  cursor: col-resize;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  line-height: 0;
}

.compare-layer {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  pointer-events: none;
}

.compare-before-clip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  will-change: clip-path;
}

.compare-before-clip .compare-layer {
  width: 100%;
  height: 100%;
}

.compare-floating-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  z-index: 5;
  pointer-events: none;
}

.compare-floating-label.label-left {
  left: 12px;
}

.compare-floating-label.label-right {
  right: 12px;
}

/* LÍNEA Y MANIJA CENTRAL DEL COMPARADOR */
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.handle-line {
  flex: 1;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.handle-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border: 2px solid #ffffff;
  flex-shrink: 0;
}

.compare-modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg);
}

.compare-instructions {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* 4. HISTORIAL ACUMULATIVO DE AHORRO (LOCALSTORAGE) */
.historical-stats-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.historical-stats-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.historical-icon {
  font-size: 1.5rem;
}

.historical-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}

.hist-number {
  color: var(--accent-green);
  font-weight: 800;
}

.btn-reset-hist {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-hist:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 5. PURGA DE MEMORIA RAM */
.stats-actions-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-purge-ram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-purge-ram:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: rgba(0, 0, 128, 0.04) !important;
}

.btn-purge-ram-sec {
  margin-top: 14px;
}



/* ==========================================================================
   CONVERTIO-STYLE WORKSPACE & QUEUE COMPONENT STYLES
   ========================================================================== */

.converter-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.converter-banner {
  background: rgba(0, 0, 128, 0.06);
  border-bottom: 1px solid rgba(0, 0, 128, 0.2);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--primary);
}

.dropzone-area {
  padding: 3.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(0, 0, 128, 0.35);
  border-radius: var(--radius);
  margin: 1.5rem;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone-area:hover,
.dropzone-area.drag-active {
  border-color: var(--primary);
  background: rgba(0, 0, 128, 0.04);
  transform: translateY(-2px);
}

.dropzone-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-select-files {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--primary-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
  cursor: pointer;
  border: none;
}

.btn-select-files:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
  opacity: 0.95;
}

.dropzone-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.queue-section {
  padding: 1.5rem;
  display: none;
  position: relative;
  border: 2px dashed rgba(0, 0, 128, 0.25);
  border-radius: var(--radius);
  margin: 1.5rem;
  background: var(--bg-surface);
}

/* DROP OVERLAY EN COLA ACTIVA (ARRASTRAR Y SOLTAR ARCHIVOS) */
.queue-drop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 128, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 3px dashed var(--primary);
  border-radius: var(--radius, 14px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
  animation: overlayFadeIn 0.2s ease forwards;
}

.queue-drop-overlay-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 3rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  max-width: 440px;
}

.queue-drop-overlay-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 0, 128, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceMini 1s infinite alternate ease-in-out;
}

.queue-drop-overlay-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.queue-drop-overlay-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceMini {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.queue-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.queue-top-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-add-more {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-add-more:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* SWITCH / TOGGLE UNIR IMÁGENES EN 1 SOLO PDF */
.merge-pdf-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 128, 0.05);
  border: 1.5px solid rgba(0, 0, 128, 0.25);
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  user-select: none;
  transition: all 0.2s ease;
}

.merge-pdf-toggle:hover {
  border-color: var(--primary);
  background: rgba(0, 0, 128, 0.08);
}

.merge-pdf-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-slider {
  width: 32px;
  height: 18px;
  background: var(--border);
  border-radius: 9999px;
  position: relative;
  transition: background 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.merge-pdf-toggle input[type="checkbox"]:checked + .toggle-slider {
  background: var(--primary);
}

.merge-pdf-toggle input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(14px);
}

/* BANNER MODO UNIÓN PDF */
.merge-pdf-banner {
  background: rgba(0, 0, 128, 0.05);
  border: 1.5px solid rgba(0, 0, 128, 0.25);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text);
  animation: fadeIn 0.25s ease;
}

.merge-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.merge-banner-content svg {
  color: var(--primary);
  flex-shrink: 0;
}

.merge-badge-pill {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.global-convert-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.global-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  outline: none;
}

.global-select:focus {
  border-color: var(--primary);
}

.queue-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.queue-table {
  width: 100%;
  border-collapse: collapse;
}

.queue-table tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
}

.queue-table tr:hover {
  background-color: var(--bg-secondary);
}

.queue-table td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

.col-file-info {
  width: 40%;
}

.file-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-icon {
  font-size: 1.4rem;
}

.file-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.file-size {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.col-arrow {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

.convert-arrow {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.col-target-select {
  width: 25%;
}

.form-select {
  width: 100%;
  max-width: 200px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.target-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid var(--border-highlight);
}

.col-status {
  width: 25%;
}

.pending-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-convert-row {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px var(--primary-glow);
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-convert-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--primary-glow);
  opacity: 0.95;
}

.btn-sm-action {
  padding: 7px 16px !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
}

.done-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-download-row {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px var(--primary-glow) !important;
  cursor: pointer;
  border: none;
}

.btn-download-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3) !important;
  opacity: 0.95;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-pending {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-success {
  background: rgba(0, 0, 128, 0.08) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(0, 0, 128, 0.25) !important;
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ESTADO DE CONVERSIÓN Y BARRA DE PROGRESO NÍTIDA */
.converting-state-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  min-width: 130px;
}

.converting-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.converting-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: 0.8rem;
}

.converting-pct {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-container {
  width: 100%;
  background: var(--bg);
  border-radius: 9999px;
  height: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
  border-radius: 9999px;
}

.col-delete {
  width: 5%;
  text-align: right;
}

.btn-remove {
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  transition: color 0.15s ease;
  cursor: pointer;
}

.btn-remove:hover {
  color: #ef4444;
}

.queue-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-cancel-action {
  background: var(--bg-card);
  color: #dc2626 !important;
  border: 1.5px solid rgba(220, 38, 38, 0.4);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.72rem 1.6rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-action:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
  transform: translateY(-1px);
}

.btn-cancel-action.btn-sm-action {
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
}

.btn-cancel-item {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.btn-cancel-item:hover {
  background: #dc2626;
  color: #ffffff !important;
  border-color: #dc2626;
}

.btn-cancel-row {
  color: #dc2626;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-cancel-row:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

.btn-primary-action {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 14px var(--primary-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--primary-glow);
  opacity: 0.95;
}

.btn-primary-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-success-action {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 14px var(--primary-glow) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-success-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 128, 0.35) !important;
  opacity: 0.95;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   CARACTERÍSTICAS PRO: THUMBNAILS, REORDENAMIENTO, AJUSTES, TOAST & HISTORIAL
   ========================================================================== */

/* 1. TECLAS DE ACCESO RÁPIDO DROPZONE */
.dropzone-paste-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dropzone-paste-hint kbd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.74rem;
  color: var(--text);
}

/* 2. MINIATURAS REALES EN LA COLA */
.file-thumbnail-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  line-height: 1;
  text-transform: uppercase;
}

.file-cat-badge {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  gap: 2px;
}

.file-cat-badge.cat-pdf { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.file-cat-badge.cat-data { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.file-cat-badge.cat-doc { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.file-cat-badge.cat-audio { background: rgba(147, 51, 234, 0.1); color: #9333ea; }
.file-cat-badge.cat-model3d { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.file-cat-badge.cat-image { background: rgba(0, 0, 128, 0.08); color: var(--primary); }

/* 3. REORDENAMIENTO DE FILAS (▲ / ▼) */
.reorder-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 6px;
  flex-shrink: 0;
}

.btn-reorder {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 22px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-reorder:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 0, 128, 0.06);
}

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

/* 4. BOTÓN DE AJUSTES EN FILA */
.btn-item-settings {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 6px;
}

.btn-item-settings:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 0, 128, 0.06);
}

/* 5. MODAL DE AJUSTES AVANZADOS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.settings-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 530px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 128, 0.03);
  flex-shrink: 0;
}

.settings-modal-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.settings-modal-close:hover {
  color: #ef4444;
}

.settings-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* MICRO-EDITOR DE IMAGEN PRE-CONVERSIÓN */
.settings-editor-box {
  background: rgba(0, 0, 128, 0.03);
  border: 1px solid rgba(0, 0, 128, 0.16);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.editor-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

  color: #8faaff;
}

.editor-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(0, 0, 128, 0.08);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 128, 0.2);
}

  background: rgba(143, 170, 255, 0.15);
  color: #8faaff;
  border-color: rgba(143, 170, 255, 0.3);
}

.editor-preview-canvas-wrap {
  width: 100%;
  height: 190px;
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.04) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 16px 16px;
}

#editor-preview-canvas {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.editor-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-btn-group {
  display: flex;
  gap: 4px;
}

.btn-editor-action {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-editor-action:hover {
  background: rgba(0, 0, 128, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

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

.btn-editor-reset {
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 6px 8px;
}

.editor-chips-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.editor-section-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.editor-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-filter-chip,
.btn-crop-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filter-chip:hover,
.btn-crop-chip:hover {
  border-color: rgba(0, 0, 128, 0.3);
  color: var(--primary);
}

.btn-filter-chip.active,
.btn-crop-chip.active {
  background: rgba(0, 0, 128, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 800;
}

  background: rgba(143, 170, 255, 0.15);
  border-color: #8faaff;
  color: #8faaff;
}

.btn-item-edit {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-item-edit:hover {
  background: rgba(0, 0, 128, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
}

.settings-field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.settings-field select,
.settings-field input[type="color"] {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.settings-field select:focus {
  border-color: var(--primary);
}

.settings-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.settings-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.settings-checkbox-item input {
  accent-color: var(--primary);
}

.settings-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
}

/* 6. NOTIFICACIONES TOAST FLOTANTES */
.app-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 10000;
  transform: translateY(140%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 90vw;
  pointer-events: none;
}

.app-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.app-toast.success { border-left-color: #10b981; }
.app-toast.warning { border-left-color: #f59e0b; }
.app-toast.error { border-left-color: #ef4444; }

/* 7. TARJETA DE ESTADÍSTICAS HISTÓRICAS */
.historical-stats-card {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px dashed rgba(0, 0, 128, 0.3);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.historical-stats-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.historical-icon {
  font-size: 1.5rem;
}

.historical-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.hist-number {
  color: var(--primary);
  font-weight: 800;
}

.btn-reset-hist {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-hist:hover {
  border-color: var(--primary);
  color: var(--primary);
}


@media (max-width: 640px) {
  .converter-container.card {
    padding: 1.25rem 0.75rem;
    border-radius: 18px;
  }
  .queue-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .queue-top-left {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .global-convert-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .global-select {
    flex: 1;
    max-width: none;
  }
  #btn-convert-top,
  #btn-download-all-top {
    width: 100%;
    justify-content: center;
  }
  .queue-footer-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .queue-footer-bar .btn-primary-action,
  .queue-footer-bar .btn-success-action {
    width: 100%;
    justify-content: center;
  }
  .queue-table {
    min-width: 520px;
  }
  .queue-drop-overlay-content {
    padding: 1.5rem 1rem;
    max-width: 90%;
  }
  .queue-drop-overlay-icon {
    width: 54px;
    height: 54px;
  }
  .queue-drop-overlay-title {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   CONVERTIO PRO UI - PRESETS BAR, FORMAT PILL Y MODAL SELECTOR CATEGORIZADO
   ========================================================================== */

/* 1. Barra de Presets Rápidos Convertio debajo del Dropzone */
.convertio-presets-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 128, 0.03);
  border: 1px dashed rgba(0, 0, 128, 0.2);
  border-radius: 12px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

[data-theme="dark"] .convertio-presets-bar,
body.dark-theme .convertio-presets-bar {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}

.convertio-presets-title {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--primary, #000080);
  margin-right: 4px;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .convertio-presets-title,
body.dark-theme .convertio-presets-title {
  color: #93c5fd;
}

.convertio-presets-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.preset-pill {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  color: var(--text, #1e293b);
  font-size: 0.74rem;
  font-weight: 650;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preset-pill:hover {
  background: var(--primary, #000080);
  border-color: var(--primary, #000080);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 128, 0.25);
}

[data-theme="dark"] .preset-pill,
body.dark-theme .preset-pill {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .preset-pill:hover,
body.dark-theme .preset-pill:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* 2. Botón Pill Interactivo de Formato por Fila (Estilo Convertio) */
.btn-format-pill {
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-highlight, rgba(0, 0, 128, 0.35));
  color: var(--primary, #000080);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease;
}

.btn-format-pill:hover {
  background: rgba(0, 0, 128, 0.06);
  border-color: var(--primary, #000080);
  transform: translateY(-1px);
}

.btn-format-pill svg {
  transition: transform 0.2s ease;
}

.btn-format-pill:hover svg {
  transform: translateY(1px);
}

[data-theme="dark"] .btn-format-pill,
body.dark-theme .btn-format-pill {
  background: #1e293b;
  border-color: #3b82f6;
  color: #60a5fa;
}

[data-theme="dark"] .btn-format-pill:hover,
body.dark-theme .btn-format-pill:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #60a5fa;
}

/* 3. Modal Selector de Formatos Convertio Pro */
.format-modal-card {
  background: var(--bg-card, #ffffff);
  border-radius: 18px;
  max-width: 620px;
  width: 92%;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border, #e2e8f0);
  padding: 22px;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

[data-theme="dark"] .format-modal-card,
body.dark-theme .format-modal-card {
  background: #0f172a;
  border-color: #334155;
}

.format-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.format-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.format-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 128, 0.08);
  color: var(--primary, #000080);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

[data-theme="dark"] .format-modal-icon-badge,
body.dark-theme .format-modal-icon-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.format-modal-h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: var(--text, #0f172a);
}

.format-modal-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  margin: 2px 0 0 0;
}

/* Buscador en tiempo real */
.format-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.format-search-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted, #94a3b8);
}

.format-search-wrap input {
  width: 100%;
  padding: 10px 36px 10px 38px;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: var(--bg, #f8fafc);
  color: var(--text, #1e293b);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  transition: all 0.18s ease;
}

.format-search-wrap input:focus {
  border-color: var(--primary, #000080);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 0, 128, 0.12);
}

[data-theme="dark"] .format-search-wrap input,
body.dark-theme .format-search-wrap input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .format-search-wrap input:focus,
body.dark-theme .format-search-wrap input:focus {
  border-color: #3b82f6;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.format-search-wrap button {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
}

/* Tabs de categorías Convertio */
.format-cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

[data-theme="dark"] .format-cat-tabs,
body.dark-theme .format-cat-tabs {
  border-color: #334155;
}

.format-cat-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.format-cat-tab:hover {
  background: rgba(0, 0, 128, 0.05);
  color: var(--text, #1e293b);
}

.format-cat-tab.active {
  background: var(--primary, #000080);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 128, 0.25);
}

[data-theme="dark"] .format-cat-tab.active,
body.dark-theme .format-cat-tab.active {
  background: #2563eb;
  color: #ffffff;
}

/* Grid de Formatos */
.format-grid-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  overflow-y: auto;
  max-height: 340px;
  padding-right: 4px;
}

.format-option-card {
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.format-option-card:hover {
  background: #ffffff;
  border-color: var(--primary, #000080);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 128, 0.12);
}

.format-option-card.selected {
  background: rgba(0, 0, 128, 0.06);
  border-color: var(--primary, #000080);
  border-width: 1.5px;
}

[data-theme="dark"] .format-option-card,
body.dark-theme .format-option-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .format-option-card:hover,
body.dark-theme .format-option-card:hover {
  background: #0f172a;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .format-option-card.selected,
body.dark-theme .format-option-card.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: #60a5fa;
}

.format-opt-ext {
  font-size: 0.92rem;
  font-weight: 850;
  color: var(--primary, #000080);
  letter-spacing: 0.02em;
}

[data-theme="dark"] .format-opt-ext,
body.dark-theme .format-opt-ext {
  color: #93c5fd;
}

.format-opt-desc {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-clear-queue-red:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

