:root {
  --bg-main: #07090e;
  --bg-card: rgba(17, 22, 34, 0.78);
  --bg-card-hover: rgba(24, 30, 48, 0.9);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 5px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text h1, .stat-value {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Glow Orbs de Fundo ─────────────────────────────────────── */
.bg-glow-1, .bg-glow-2 {
  position: fixed;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
}
.bg-glow-1 {
  width: 550px;
  height: 550px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, #6366f1, #06b6d4);
}
.bg-glow-2 {
  width: 650px;
  height: 650px;
  bottom: -150px;
  right: -120px;
  background: radial-gradient(circle, #8b5cf6, #ec4899);
}

/* ── Auth Gate / Bloqueio por Senha ────────────────────────── */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.88);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--primary-glow);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 36px 32px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.auth-icon {
  width: 64px;
  height: 64px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-glow);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: 0 0 24px var(--primary-glow);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.45;
}

.auth-error-msg {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 14px;
}

.auth-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 18px;
}

.auth-hint code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: #cbd5e1;
}

/* ── Layout & Containers ───────────────────────────────────── */
.dashboard-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  background: rgba(14, 18, 29, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-size: 26px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.2));
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: inline-block;
  vertical-align: middle;
}

.brand-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid var(--border-glow);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ── Botões ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

.btn-danger-sm {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-danger-sm:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* ── Stats Grid (Métricas) ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

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

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-icon {
  font-size: 1.2rem;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.stat-value.highlight-accent {
  font-size: 1.25rem;
  font-weight: 700;
  color: #a5b4fc;
}

.stat-footer {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ── Navigation Tabs ───────────────────────────────────────── */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}
.tab-btn.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--border-glow);
}

/* ── Tab Content ───────────────────────────────────────────── */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease;
}
.tab-content.active {
  display: block;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Card Genérico ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ── Formulários ───────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  background: rgba(10, 13, 20, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.textarea-field {
  resize: vertical;
}

.form-help {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 6px;
  display: block;
}

.form-actions {
  margin-top: 24px;
}

/* ── Galeria de Vídeos ─────────────────────────────────────── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.video-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

.video-thumb-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090c14;
  position: relative;
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .video-thumb {
  transform: scale(1.04);
}

.video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.video-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #818cf8;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.video-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-hook {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Canais Grid ───────────────────────────────────────────── */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.channel-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.channel-niche {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ref-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 11, 18, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.ref-url {
  color: #38bdf8;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.ref-url:hover {
  text-decoration: underline;
}

/* ── Sistema & VPS Grid ────────────────────────────────────── */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.system-list {
  list-style: none;
}

.system-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.command-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-pills code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.82rem;
}

/* ── Modal Video Player ────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(14px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: #0f131f;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  max-width: 860px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

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

.modal-close {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.format-switcher {
  display: flex;
  gap: 8px;
}

.format-switcher .btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #ffffff;
}

.video-wrapper {
  width: 100%;
  max-height: 480px;
  background: #000;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.3s ease;
}

.video-wrapper.shorts {
  width: 270px;
  height: 480px;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  max-height: 480px;
  background: #000;
}

/* ── Feedback Banner & Loading ─────────────────────────────── */
.feedback-banner {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-card);
  padding: 24px 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

.footer-content code {
  color: var(--text-muted);
}

/* ── Interações do Agendador & Toggle Switch ────────────────── */
.stat-card-interactive {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.stat-card-interactive:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.stat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.stat-badge.paused {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* Toggle Switch estilizado */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
input:checked + .slider {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.5);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* Botões de Perigo (Exclusão) */
.btn-danger-sm {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fda4af;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-danger-sm:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #be123c, #9f1239);
  transform: translateY(-1px);
}

.btn-edit-sm {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-edit-sm:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #fff;
  transform: translateY(-1px);
}

/* Channel Header & Actions */
.channel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.channel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.channel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.channel-autopublish-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.channel-autopublish-tag.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.channel-autopublish-tag.inactive {
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
}

/* ── Live Production Tracker & Stepper ──────────────────────── */
.tracker-container {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.tracker-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #10b981);
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.tracker-title-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.tracker-title-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.tracker-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}
.tracker-status-badge.completed {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.tracker-status-badge.error {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

/* Barra de Progresso */
.progress-box {
  margin-bottom: 24px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #cbd5e1;
}
.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #10b981);
  border-radius: 10px;
  transition: width 0.4s ease;
  position: relative;
}
.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Stepper de 5 Etapas */
.tracker-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .tracker-stepper {
    grid-template-columns: repeat(2, 1fr);
  }
}

.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.step-card.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}
.step-card.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.step-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}
.step-card.active .step-icon-badge {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent);
}
.step-card.completed .step-icon-badge {
  background: #10b981;
  color: #fff;
}

.step-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}
.step-card.active .step-title {
  color: #ffffff;
}
.step-card.completed .step-title {
  color: #34d399;
}

/* Log de Detalhes em Tempo Real */
.tracker-terminal {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.terminal-text {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #6366f1;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.terminal-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: inherit;
}

/* Ações ao concluir */
.tracker-success-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* Pílula Global de Produção no Topo */
.global-pipeline-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.global-pipeline-pill:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}
.global-pipeline-pill.active {
  display: inline-flex;
}

