* { box-sizing: border-box; }
body {
  margin: 0;
  background: #111318;
  color: #e8e8ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #24262d;
}
.brand { font-weight: 700; font-size: 18px; }
.logout { color: #9a9ca3; text-decoration: none; font-size: 14px; }
.logout:hover { color: #fff; }

.container { max-width: 1000px; margin: 0 auto; padding: 32px 20px; }

.upload-box {
  border: 2px dashed #2e3138;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 40px;
}
.upload-title { font-size: 16px; margin-bottom: 16px; color: #cfd0d4; }
.upload-hint { color: #6c6f78; font-size: 13px; margin-top: 12px; }

.btn-primary, .btn-secondary, .btn-danger {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #24262d; color: #e8e8ea; }
.btn-secondary:hover { background: #2e3138; }
.btn-danger { background: #3a1f1f; color: #f87171; }
.btn-danger:hover { background: #4a2626; }

.progress-wrap {
  height: 6px;
  background: #24262d;
  border-radius: 4px;
  margin-top: 20px;
  overflow: hidden;
}
.progress-bar { height: 100%; width: 0; background: #3b82f6; transition: width 0.2s; }
.upload-status { margin-top: 10px; font-size: 13px; color: #9a9ca3; }

.video-list h2 { font-size: 16px; color: #cfd0d4; margin-bottom: 16px; }
.empty { color: #6c6f78; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: #1a1c22;
  border: 1px solid #24262d;
  border-radius: 10px;
  overflow: hidden;
}
.card-thumb { aspect-ratio: 16/9; background: #000; }
.card-thumb video, .card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-thumb { aspect-ratio: 9/16; max-height: 320px; margin: 0 auto; }
.clip-thumb video { object-fit: contain; }
.card-body { padding: 12px; }
.card-name { font-size: 14px; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 12px; color: #6c6f78; margin: 0 0 4px; }
.card-tech { font-size: 12px; color: #6c6f78; margin: 0 0 12px; }
.card-error { font-size: 11px; color: #f87171; margin: 0 0 12px; background: #2a1616; padding: 6px 8px; border-radius: 6px; word-break: break-word; }
.status-label { color: #9a9ca3; }

.segments-box {
  background: #111318;
  border: 1px solid #24262d;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.segments-title { font-size: 12px; color: #cfd0d4; margin: 0 0 6px; }
.segments-list { list-style: none; margin: 0; padding: 0; max-height: 100px; overflow-y: auto; }
.segments-list li { font-size: 12px; color: #9a9ca3; padding: 2px 0; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.card-actions .btn-primary, .card-actions .btn-secondary, .card-actions .btn-danger { flex: 1; text-align: center; font-size: 12px; padding: 8px 6px; white-space: nowrap; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box {
  background: #1a1c22;
  border: 1px solid #24262d;
  border-radius: 12px;
  padding: 32px;
  width: 280px;
  text-align: center;
}
.login-box h1 { font-size: 18px; margin-bottom: 20px; }
.login-box input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2e3138;
  background: #111318;
  color: #e8e8ea;
  margin-bottom: 12px;
}
.login-box button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: white;
  cursor: pointer;
}
.error { color: #f87171; font-size: 13px; margin-bottom: 12px; }

/* Página de clips */
.breadcrumb { color: #6c6f78; font-size: 13px; margin-bottom: 16px; }
.breadcrumb a { color: #9a9ca3; }

.preview-row { display: flex; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.preview-video { max-width: 420px; width: 100%; border-radius: 10px; background: #000; }
.preview-meta { color: #9a9ca3; font-size: 13px; }
.preview-meta p { margin: 0 0 6px; }

.new-clip-box {
  background: #1a1c22;
  border: 1px solid #24262d;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 32px;
}
.new-clip-box h2 { font-size: 15px; margin: 0 0 16px; }

.chip-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  background: #24262d;
  border: 1px solid #2e3138;
  color: #cfd0d4;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover { background: #2e3138; }

.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form input {
  background: #111318;
  border: 1px solid #2e3138;
  color: #e8e8ea;
  border-radius: 6px;
  padding: 8px 10px;
  width: 100px;
}
.inline-form span { color: #6c6f78; }

.clip-list h2 { font-size: 15px; color: #cfd0d4; margin-bottom: 16px; }
