/* ═══════════════════════════════════════════════════════════════════════════
   LegacyClipper — Estilo DORADO (Gold Theme)
   ═══════════════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  background: #0a0908;
  color: #e8e6e0;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Sidebar
   ═══════════════════════════════════════════════════════════════════════════ */
#sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 200px;
  background: #111320;
  border-right: 1px solid #1d1f2e;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid #1d1f2e;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  text-decoration: none;
}
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #d4a574, #b8860b);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(212,165,116,.5);
  flex-shrink: 0;
}

.nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.nav-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  color: #3d4060;
  padding: 10px 10px 4px;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: #7a7d98;
  font-size: 13px;
  font-weight: 580;
  text-decoration: none;
  border: 1px solid transparent;
  transition: .15s;
  cursor: pointer;
}
.nav-link:hover {
  color: #f4e4c1;
  background: rgba(212,165,116,.12);
  border-color: rgba(212,165,116,.25);
}
.nav-link.active {
  color: #f4e4c1;
  background: linear-gradient(90deg, rgba(212,165,116,.2), rgba(212,165,116,.06));
  border-color: rgba(212,165,116,.35);
}
.nav-icon {
  width: 15px;
  text-align: center;
  flex-shrink: 0;
  font-size: 13px;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid #1d1f2e;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #d4a574, #b8860b);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: 12px; color: #c4c0d8; font-weight: 600; }
.user-role { font-size: 10px; color: #464868; }

/* ═══════════════════════════════════════════════════════════════════════════
   Main layout
   ═══════════════════════════════════════════════════════════════════════════ */
#main {
  margin-left: 200px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Topbar
   ═══════════════════════════════════════════════════════════════════════════ */
#topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(12,13,19,.92);
  border-bottom: 1px solid #191b28;
  backdrop-filter: blur(18px);
}

.search-box {
  flex: 1;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #13152060;
  border: 1px solid #252740;
  border-radius: 9px;
  padding: 7px 12px;
  color: #595c78;
  font-size: 12px;
}
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: #d0cce8;
  outline: none;
  font-size: 13px;
}
.search-box input::placeholder { color: #595c78; }

/* ═══════════════════════════════════════════════════════════════════════════
   Content
   ═══════════════════════════════════════════════════════════════════════════ */
#content {
  flex: 1;
  padding: 24px 24px 56px;
  max-width: 1300px;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════════════════════ */
.hero {
  border-radius: 18px;
  border: 1px solid #3a2f1c;
  background:
    radial-gradient(ellipse at 65% -5%, rgba(212,165,116,.5) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 100%, rgba(184,134,11,.2) 0%, transparent 50%),
    linear-gradient(160deg, #1a1612, #0f0d0a);
  padding: 36px 32px;
  margin-bottom: 24px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin: 0 0 8px;
  line-height: 1.18;
}
.hero-sub {
  color: #8e90aa;
  font-size: 14px;
  margin: 0 0 22px;
}

.url-row {
  display: flex;
  gap: 10px;
  max-width: 660px;
  margin: 0 auto 14px;
}
.url-input {
  flex: 1;
  min-height: 50px;
  border: 1px solid #3a2f1c;
  border-radius: 12px;
  background: #1a1612;
  color: #e8e6e0;
  font-size: 14px;
  padding: 0 16px;
  outline: none;
}
.url-input:focus {
  border-color: #d4a574;
  box-shadow: 0 0 0 3px rgba(212,165,116,.18);
}
.main-btn {
  min-height: 50px;
  min-width: 190px;
  border-radius: 12px;
  background: linear-gradient(110deg, #d4a574, #b8860b);
  border: none;
  color: #0a0908;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(212,165,116,.5);
  white-space: nowrap;
  cursor: pointer;
  transition: .2s;
}
.main-btn:hover { filter: brightness(1.1); }

.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 6px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #272944;
  border-radius: 999px;
  color: #7a7d94;
  font-size: 11px;
  font-weight: 600;
  background: #121420;
  transition: all .3s ease;
}
.step.activo {
  border-color: #d4a574;
  background: rgba(212,165,116,.15);
  color: #f4e4c1;
  animation: pulse 1.5s ease-in-out infinite;
}
.step.completado {
  border-color: #10b981;
  background: rgba(16,185,129,.12);
  color: #34d399;
}
.step.error {
  border-color: #ef4444;
  background: rgba(239,68,68,.12);
  color: #f87171;
}
.dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(212,165,116,.2);
  color: #d4a574;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s ease;
}
.step.activo .dot {
  background: rgba(212,165,116,.4);
  animation: spin 2s linear infinite;
}
.step.completado .dot {
  background: rgba(16,185,129,.3);
  color: #34d399;
}
.step.error .dot {
  background: rgba(239,68,68,.3);
  color: #f87171;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212,165,116,.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(212,165,116,.2); }
}

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

.line { width: 18px; height: 1px; background: #2a2d44; }
.status-hint { color: #565874; font-size: 12px; margin: 4px 0 0; }

.opts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 660px;
  margin: 18px auto 10px;
}
.opts-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.opts-grid label {
  color: #7a7d94;
  font-size: 11px;
  font-weight: 600;
}
.opts-grid select, .opts-grid input[type=checkbox] {
  background: #0f1120;
  border: 1px solid #262840;
  border-radius: 8px;
  padding: 8px;
  color: #ccc8e8;
  font-size: 13px;
  outline: none;
}
.opts-grid select:focus {
  border-color: #d4a574;
  box-shadow: 0 0 0 2px rgba(212,165,116,.15);
}
.cb-line {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #7a7d94;
  cursor: pointer;
}
.cb-line input[type=checkbox] {
  margin-right: 6px;
  cursor: pointer;
}

#info-box {
  margin: 16px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #131520;
  border: 1px solid #1d2030;
  color: #9fa3bb;
  font-size: 13px;
  display: none;
}
#info-box:not(:empty) { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   Stats
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat {
  padding: 15px 16px;
  border: 1px solid #1d2030;
  border-radius: 13px;
  background: linear-gradient(155deg, #161828, #101320);
  transition: .2s;
  cursor: default;
}
.stat:hover {
  border-color: rgba(212,165,116,.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.stat-label {
  font-size: 11px;
  color: #525570;
  font-weight: 650;
  margin-bottom: 5px;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.2px;
  transition: transform 0.3s ease, color 0.3s ease;
}
.stat small {
  font-size: 10px;
  color: #3a3d58;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════════════════ */
.seccion {
  display: block;
  animation: fadeIn 0.3s ease;
}
.seccion.oculta {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  color: #e0dcf5;
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -.4px;
  margin: 0 0 4px;
}
.section-lead {
  color: #565874;
  font-size: 13px;
  margin: 0 0 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Clips grid
   ═══════════════════════════════════════════════════════════════════════════ */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.card {
  border: 1px solid #1d2030;
  border-radius: 15px;
  background: linear-gradient(160deg, #161828, #101320);
  padding: 13px;
  transition: .18s;
}
.card:hover {
  border-color: rgba(212,165,116,.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.card video {
  border-radius: 9px;
  max-height: 160px;
  width: 100%;
  background: #000;
}
.card button {
  width: 100%;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════════════════════════ */
.form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.form-row select, .form-row input {
  background: #0f1120;
  border: 1px solid #262840;
  border-radius: 8px;
  padding: 10px;
  color: #ccc8e8;
  font-size: 13px;
  outline: none;
}
.form-row select:focus, .form-row input:focus {
  border-color: #d4a574;
  box-shadow: 0 0 0 2px rgba(212,165,116,.15);
}

button {
  padding: 10px 16px;
  border-radius: 9px;
  font-weight: 640;
  font-size: 13px;
  border: 1px solid #262840;
  background: #161828;
  color: #ccc8e8;
  cursor: pointer;
  transition: .15s;
}
button:hover { filter: brightness(1.08); }
.btn-secondary {
  background: linear-gradient(110deg, #d4a574, #b8860b);
  border: none;
  color: #0a0908;
  box-shadow: 0 4px 14px rgba(212,165,116,.4);
}
.btn-danger {
  background: #1c0d0d;
  border-color: #7f1d1d50;
  color: #f87171;
}
.btn-danger:hover { border-color: #ef444480; }

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  #sidebar { display: none; }
  #main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  #content { padding: 14px 12px 40px; }
  .hero { padding: 20px 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .opts-grid { grid-template-columns: 1fr; }
}
