/* ==============================================================================
   pub_rs Studio — Design System & Folha de Estilos Avançada
   Cores personalizadas, Glassmorphism, Micro-animações e Tipografia Editorial
   ============================================================================== */

:root {
  /* Paleta Base Escura */
  --bg-main: #070913;
  --bg-secondary: #0d1222;
  --bg-card: rgba(18, 24, 43, 0.75);
  --bg-card-hover: rgba(28, 38, 66, 0.85);
  --bg-input: rgba(13, 18, 34, 0.8);

  /* Bordas e Divisores */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --border-glow: rgba(56, 189, 248, 0.35);

  /* Tipografia & Cores de Texto */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* Cores de Acento */
  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Redes Sociais */
  --color-linkedin: #0a66c2;
  --color-instagram: #e1306c;
  --color-twitter: #1d9bf0;
  --color-threads: #ffffff;
  --color-facebook: #1877f2;

  /* Sombras e Efeitos */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --glow-cyan: 0 0 25px rgba(56, 189, 248, 0.25);
  --glow-indigo: 0 0 30px rgba(99, 102, 241, 0.25);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Aliases de Superfície & Bordas */
  --surface-secondary: #0d1222;
  --surface-card: rgba(18, 24, 43, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --text-heading: #f8fafc;
}

/* Reset Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==============================================================================
   TEMA CLARO (FUNDO BRANCO & HIGH CONTRAST)
   ============================================================================== */
body.light-theme {
  --bg-main: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-focus: #0284c7;
  --border-glow: rgba(2, 132, 199, 0.18);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #0284c7;

  --glass-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  --glow-cyan: 0 0 20px rgba(2, 132, 199, 0.12);
  --glow-indigo: 0 0 25px rgba(99, 102, 241, 0.12);

  /* Aliases de Superfície & Bordas no Tema Claro */
  --surface-secondary: #f1f5f9;
  --surface-card: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --text-heading: #0f172a;

  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(99, 102, 241, 0.06) 0%, transparent 45%);
  color: var(--text-primary);
}

/* Scrollbars estilizadas */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(13, 18, 34, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

/* ==============================================================================
   PAINÉIS GLASSMORPHISM & UTILITÁRIOS
   ============================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==============================================================================
   APP LAYOUT & SIDEBAR (MENU LATERAL ESQUERDO)
   ============================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Sidebar Fixa à Esquerda */
.app-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: rgba(10, 14, 26, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

/* Header da Sidebar */
.sidebar-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  margin-left: 4px;
  letter-spacing: 1px;
}

.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.sidebar-toggle-btn .icon-toggle {
  transition: transform 0.28s ease;
}

/* Seletor de Cliente Ativo */
.sidebar-client-box {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-section-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sidebar-client-box .client-selector-wrap {
  width: 100%;
}

.client-dropdown {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.client-dropdown:focus {
  border-color: var(--border-focus);
  background: rgba(13, 18, 34, 0.95);
}

/* Navegação Principal */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
  position: relative;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.1);
}

.sidebar-nav-item.active .nav-icon {
  color: var(--accent-cyan);
}

.sidebar-nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.sidebar-nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.sidebar-nav-item .nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Pill */
.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Rodapé da Sidebar */
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(7, 9, 19, 0.4);
}

.sidebar-info-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: var(--radius-sm);
}

.sidebar-info-link:hover {
  color: var(--text-secondary);
}

/* ==============================================================================
   ESTADO RECOLHIDO (COLLAPSED SIDEBAR)
   ============================================================================== */
.app-sidebar.collapsed {
  width: 74px;
}

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-client-box,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .user-meta,
.app-sidebar.collapsed .info-label,
.app-sidebar.collapsed .pill-label {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-toggle-btn .icon-toggle {
  transform: rotate(180deg);
}

.app-sidebar.collapsed .sidebar-header {
  padding: 16px 12px;
  justify-content: center;
}

.app-sidebar.collapsed .brand {
  display: none;
}

.app-sidebar.collapsed .sidebar-nav {
  padding: 16px 8px;
  align-items: center;
}

.app-sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 10px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.app-sidebar.collapsed .sidebar-footer {
  padding: 12px 8px;
  align-items: center;
}

.app-sidebar.collapsed .status-pill {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.app-sidebar.collapsed .user-profile-badge {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.app-sidebar.collapsed .btn-logout {
  display: none;
}

.app-sidebar.collapsed .sidebar-info-link {
  justify-content: center;
  padding: 8px;
}

/* ==============================================================================
   WORKSPACE PRINCIPAL & HEADER
   ============================================================================== */
.app-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  position: relative;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 36px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 9, 19, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.workspace-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}

.workspace-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Botões Reutilizáveis */
.btn-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* ==============================================================================
   MAIN WORKSPACE & STUDIO CANVAS (AMPLO, EXPANDIDO E SEM CAIXA RESTRITIVA)
   ============================================================================== */
.main-content {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 40px 80px;
}

.studio-canvas {
  width: 100%;
  margin-bottom: 32px;
}

/* Page Views (Studio vs Management) */
.page-view {
  width: 100%;
  animation: fadeInView 0.25s ease-out;
}

.page-view.hidden {
  display: none !important;
}

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

/* Management Canvas (Fila & Background de Canais / Clientes) */
.management-canvas {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.management-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.management-titles {
  flex: 1;
  min-width: 320px;
  text-align: left;
}

.management-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.management-client-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.management-picker-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Sub-Páginas / Abas Navegacionais Fluidas */
.management-subtabs-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}

.management-subtabs-wrap .cl-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-display);
}

.management-subtabs-wrap .cl-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.management-subtabs-wrap .cl-tab.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.18);
}

.cl-tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.cl-tab-label {
  font-size: 0.92rem;
  font-weight: 600;
}

/* Card Expansivo de Conteúdo da Gestão */
.management-card {
  padding: 32px 36px;
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.management-card .queue-jobs-list {
  max-height: 600px;
}

.management-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.management-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========================================================================== */
/* HISTÓRICO CANVAS & GRID EXPANSIVA (PÁGINA DEDICADA)                         */
/* ========================================================================== */
.history-canvas {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.history-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.history-titles {
  flex: 1;
  min-width: 320px;
  text-align: left;
}

.history-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  min-width: 250px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.history-search-box:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.history-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.88rem;
  font-family: var(--font-body);
  width: 100%;
}

.history-search-input::placeholder {
  color: var(--text-muted);
}

.history-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.history-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition-fast);
}

.history-stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.history-stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

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

.history-content-card {
  padding: 32px 36px;
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.history-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.history-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.history-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.history-card:hover::before {
  opacity: 1;
}

.history-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin: 0;
}

.history-card-client-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.history-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.history-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.history-card-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.history-empty-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.history-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.history-empty-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
  .history-content-card {
    padding: 20px 16px;
  }
  .history-search-box {
    min-width: 100%;
  }
}

.studio-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.studio-titles {
  flex: 1;
  min-width: 320px;
  text-align: left;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.18;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
  max-width: 820px;
}

.generator-card {
  padding: 24px 30px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.generator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
}

/* Mode Switcher Tabs */
.mode-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0;
  width: fit-content;
  flex-shrink: 0;
}

.mode-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.mode-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
}

.tab-badge-new {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #0b0f19;
  letter-spacing: 0.5px;
}

/* Topic Mode Specific Styles */
.topic-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-ai-brainstorm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.btn-ai-brainstorm:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(236, 72, 153, 0.25));
  border-color: #f59e0b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.pillars-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pillar-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pillar-chip:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.pillar-chip.selected {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.25));
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

/* AI Suggestions Container */
.ai-suggestions-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
  animation: fadeIn 0.3s ease;
}

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

.suggestions-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fcd34d;
}

.suggestions-subtitle {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.btn-close-suggestions {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
}

.btn-close-suggestions:hover {
  color: #fff;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.suggestion-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.suggestion-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.suggestion-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.suggestion-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.suggestion-hook {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
}

/* Topic Textarea */
.topic-textarea-wrap {
  margin-bottom: 16px;
}

.topic-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  transition: var(--transition-normal);
}

.topic-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  background: rgba(13, 18, 34, 0.95);
}

.topic-meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* URL Input */
.url-input-container {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 6px 10px 6px 16px;
  gap: 12px;
  transition: var(--transition-normal);
  margin-bottom: 24px;
}

.url-input-container:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  background: rgba(13, 18, 34, 0.95);
}

.input-icon {
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
}

.url-input::placeholder {
  color: var(--text-muted);
}

.btn-paste {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-paste:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
  width: 100%;
}

.control-input:focus {
  border-color: var(--border-focus);
}

/* Options Bar & Action Button */
.options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  transition: var(--transition-fast);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-cyan);
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.toggle-label strong {
  color: #fff;
}

/* Primary Action Button */
.btn-primary-action {
  position: relative;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 32px;
  cursor: pointer;
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.5);
  transition: var(--transition-normal);
  overflow: hidden;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(2, 132, 199, 0.65);
}

.btn-primary-action:active {
  transform: translateY(0);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

/* ==============================================================================
   MONITOR DE PROGRESSO DO PIPELINE
   ============================================================================== */
.pipeline-section {
  margin: 40px auto 50px;
  max-width: 1100px;
  animation: fadeIn 0.4s ease;
}

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

.pipeline-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.pipeline-status-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

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

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: var(--transition-normal);
}

.step-card.active {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: var(--glow-cyan);
}

.step-card.completed {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.04);
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.step-card.active .step-icon {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.step-card.completed .step-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.step-info {
  flex: 1;
}

.step-num {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.step-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 2px 0 4px;
}

.step-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.step-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}

.step-card.active .step-indicator {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  animation: loading-bar 1.5s infinite;
}

.step-card.completed .step-indicator {
  background: var(--accent-emerald);
}

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

/* ==============================================================================
   RESULTS STUDIO
   ============================================================================== */
.results-section {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.5s ease;
}

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

/* Article Summary Banner */
.article-banner {
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.article-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.article-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.article-submeta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-link {
  color: var(--accent-cyan);
  text-decoration: none;
}

.meta-link:hover {
  text-decoration: underline;
}

.article-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Studio Tabs Nav */
.studio-tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.studio-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.studio-tab:hover {
  color: #fff;
}

.studio-tab.active {
  color: var(--accent-cyan);
}

.studio-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==============================================================================
   TAB 1: COPIES POR REDE
   ============================================================================== */
.network-tabs-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .network-tabs-wrapper {
    grid-template-columns: 1fr;
  }
}

.network-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.net-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.net-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.net-btn.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-cyan);
  color: #fff;
}

.net-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-linkedin { background: var(--color-linkedin); box-shadow: 0 0 8px var(--color-linkedin); }
.dot-instagram { background: var(--color-instagram); box-shadow: 0 0 8px var(--color-instagram); }
.dot-stories { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.dot-twitter { background: var(--color-twitter); box-shadow: 0 0 8px var(--color-twitter); }
.dot-threads { background: #fff; box-shadow: 0 0 8px #fff; }
.dot-facebook { background: var(--color-facebook); box-shadow: 0 0 8px var(--color-facebook); }

.network-content {
  padding: 28px;
}

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

.net-current-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.format-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.net-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.btn-copy-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy-action:hover {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: var(--glow-cyan);
}

.copy-box {
  background: rgba(7, 9, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.copy-pre {
  font-family: var(--font-body);
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e2e8f0;
  line-height: 1.65;
}

/* First Comment Box */
.first-comment-card {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.first-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-amber);
  color: #000;
}

.fc-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.btn-copy-comment {
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-amber);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy-comment:hover {
  background: rgba(245, 158, 11, 0.15);
}

.first-comment-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fde68a;
  word-break: break-all;
}

/* ==============================================================================
   TAB 2: ESTÚDIO DE MÍDIAS (SHARP)
   ============================================================================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.media-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
}

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

.ratio-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.ratio-tag.gold {
  color: #fbbf24;
}

.dim-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.media-preview-container {
  width: 100%;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-9-16 { aspect-ratio: 9 / 16; max-height: 480px; }

.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.media-img:hover {
  transform: scale(1.02);
}

.media-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.media-actions {
  display: flex;
  gap: 6px;
}

.btn-media-dl {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-media-dl:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* ==============================================================================
   TAB 3 & 4: RELATÓRIO E PAYLOAD
   ============================================================================== */
.report-box, .payload-box {
  padding: 30px;
}

.report-content {
  font-family: var(--font-body);
  line-height: 1.7;
  color: #cbd5e1;
}

.report-content h1, .report-content h2, .report-content h3 {
  color: #fff;
  margin: 1.5em 0 0.5em;
  font-family: var(--font-display);
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.report-content th, .report-content td {
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  text-align: left;
}

.report-content th {
  background: rgba(255, 255, 255, 0.04);
}

.payload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.payload-pre {
  background: #05070e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  max-height: 550px;
  overflow-y: auto;
}

/* ==============================================================================
   MODAIS & DRAWERS
   ============================================================================== */
.modal-overlay, .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.modal-title, .drawer-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-close, .drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover, .drawer-close:hover {
  color: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.field-input:focus {
  border-color: var(--accent-cyan);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Drawer lateral */
.drawer-overlay {
  justify-content: flex-end;
  padding: 0;
}

.drawer-panel {
  width: 100%;
  max-width: 460px;
  height: 100vh;
  border-radius: 0;
  border-left: 1px solid var(--border-subtle);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-item:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent-cyan);
}

.history-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.35;
}

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

/* ==============================================================================
   TOASTS
   ============================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================================
   BOTÃO DE DISPARO / PUBLICAÇÃO DIRETA & ESTILOS DE CANAIS
   ============================================================================== */
.btn-publish-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: var(--transition-fast);
}

.btn-publish-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

.modal-lg {
  max-width: 820px;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Abas internas do Modal de Clientes */
.client-modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.cl-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cl-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.cl-tab.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.cl-tab-panel {
  display: none;
}

.cl-tab-panel.active {
  display: block;
}

.info-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Card de Canal Social */
.channel-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

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

.channel-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.toggle-switch-sm {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch-sm input {
  display: none;
}

.toggle-switch-sm .toggle-slider {
  width: 36px;
  height: 20px;
}

.toggle-switch-sm .toggle-slider::after {
  width: 14px;
  height: 14px;
}

.toggle-switch-sm input:checked + .toggle-slider::after {
  transform: translateX(16px);
}

.modal-footer-right {
  display: flex;
  gap: 12px;
}

/* Lista de Resultados do Disparo */
.dispatch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.dispatch-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

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

.dispatch-channel-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.dispatch-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

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

.dispatch-badge.skipped {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.dispatch-badge.error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.dispatch-detail-msg {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dispatch-url {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  text-decoration: none;
}

.dispatch-url:hover {
  text-decoration: underline;
}

/* ========================================================================== */
/* MODAL CLIENT HEADER ACTIONS & TEST FEEDBACK                                 */
/* ========================================================================== */

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost-sm {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

.btn-danger {
  color: var(--accent-rose);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
}

.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrap input {
  padding-right: 40px;
}

.btn-toggle-eye {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.65;
  transition: var(--transition-fast);
}

.btn-toggle-eye:hover {
  opacity: 1;
}

.form-row-channel {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.flex-grow {
  flex: 1;
}

.channel-test-btn-wrap {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.test-action-wrap {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.test-feedback-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  transition: var(--transition-fast);
}

.test-feedback-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.test-feedback-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.test-feedback-loading {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

/* ========================================================================== */
/* BACKGROUND QUEUE & SCHEDULER TAB                                           */
/* ========================================================================== */

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

.queue-header-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #fff;
}

.queue-header-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.queue-header-actions {
  display: flex;
  gap: 8px;
}

.queue-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.queue-empty {
  text-align: center;
  padding: 30px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.queue-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: var(--transition-fast);
}

.queue-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.queue-card-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.queue-pkg-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.queue-pkg-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.queue-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.queue-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.queue-badge.scheduled {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.queue-badge.processing {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.queue-badge.published {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.queue-badge.failed {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.queue-badge.cancelled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ========================================================================== */
/* PUBLISH OPTIONS DIALOG                                                      */
/* ========================================================================== */

.publish-dialog-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.publish-channels-select {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.channel-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.channel-check-label:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.06);
}

.channel-check-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent-cyan);
}

.publish-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.radio-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.radio-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.radio-card.active {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.radio-card input[type="radio"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent-cyan);
}

.radio-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radio-card-content strong {
  font-size: 0.88rem;
  color: #fff;
}

.radio-card-content span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ========================================================================= */
/* SAAS USER PROFILE BADGE & TOPBAR LOGOUT                                   */
/* ========================================================================= */

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  transition: all 0.2s ease;
}

.user-profile-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052ff, #00d2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 82, 255, 0.4);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-submeta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.user-plan-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.user-quota-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.btn-logout {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
  transform: scale(1.05);
}

/* ========================================================================== */
/* RESPONSIVIDADE MOBILE & TABLET (SIDEBAR & WORKSPACE)                       */
/* ========================================================================== */
@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -290px;
    width: 270px !important;
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.85);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .app-sidebar.open {
    left: 0;
  }

  .sidebar-toggle-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .workspace-topbar {
    padding: 12px 20px;
  }

  .main-content {
    padding: 20px 16px 60px;
  }

  .hero-title {
    font-size: 1.85rem;
  }
}

/* ==============================================================================
   ESTILOS ESPECÍFICOS: TEMA CLARO (FUNDO BRANCO)
   ============================================================================== */
body.light-theme .app-sidebar {
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.03);
}

body.light-theme .sidebar-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .brand-title {
  color: #0f172a;
}

body.light-theme .sidebar-toggle-btn {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: #64748b;
}

body.light-theme .sidebar-toggle-btn:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

body.light-theme .sidebar-client-box {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .sidebar-client-box .client-dropdown {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .sidebar-nav-item {
  color: #475569;
}

body.light-theme .sidebar-nav-item:hover {
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

body.light-theme .sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(99, 102, 241, 0.08));
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

body.light-theme .sidebar-footer {
  background: rgba(248, 250, 252, 0.95);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

body.light-theme .status-pill {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: #334155;
}

body.light-theme .user-profile-badge {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .user-name {
  color: #0f172a;
}

body.light-theme .sidebar-info-link {
  color: #64748b;
}

body.light-theme .sidebar-info-link:hover {
  color: #0f172a;
}

body.light-theme .workspace-topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.light-theme .workspace-badge {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
  color: #0284c7;
}

body.light-theme .btn-ghost,
body.light-theme .btn-ghost-sm {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}

body.light-theme .btn-ghost:hover,
body.light-theme .btn-ghost-sm:hover {
  background: rgba(15, 23, 42, 0.07);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.18);
}

body.light-theme .btn-icon {
  border-color: rgba(15, 23, 42, 0.1);
  color: #64748b;
}

body.light-theme .btn-icon:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

body.light-theme .generator-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06);
}

body.light-theme .mode-tabs-wrap {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .mode-tab-btn {
  color: #64748b;
}

body.light-theme .mode-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

body.light-theme .mode-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light-theme .url-input-container {
  background: #ffffff;
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

body.light-theme .url-input-container:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

body.light-theme .url-input {
  color: #0f172a;
}

body.light-theme .url-input::placeholder {
  color: #94a3b8;
}

body.light-theme .btn-paste {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

body.light-theme .btn-paste:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .control-input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-theme .control-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

body.light-theme .topic-textarea {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-theme .topic-textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

body.light-theme .pillar-chip {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}

body.light-theme .pillar-chip:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

body.light-theme .pillar-chip.selected {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}

body.light-theme .ai-suggestions-box {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.3);
}

body.light-theme .suggestion-card {
  background: #ffffff;
  border-color: rgba(245, 158, 11, 0.2);
}

body.light-theme .suggestion-title {
  color: #0f172a;
}

body.light-theme .toggle-slider {
  background: #cbd5e1;
}

body.light-theme .toggle-switch input:checked + .toggle-slider {
  background: #0284c7;
}

body.light-theme .toggle-label {
  color: #334155;
}

body.light-theme .step-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .step-name {
  color: #0f172a;
}

body.light-theme .article-banner {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .article-title {
  color: #0f172a;
}

body.light-theme .btn-secondary {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

body.light-theme .btn-secondary:hover {
  background: #e2e8f0;
}

body.light-theme .studio-tab {
  color: #64748b;
}

body.light-theme .studio-tab:hover {
  color: #0f172a;
}

body.light-theme .studio-tab.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  background: transparent;
}

body.light-theme .network-nav {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .net-btn {
  color: #64748b;
}

body.light-theme .net-btn:hover {
  color: #0f172a;
}

body.light-theme .net-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.light-theme .network-content {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .net-current-title {
  color: #0f172a;
}

body.light-theme .copy-box {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .copy-pre {
  color: #1e293b;
}

body.light-theme .first-comment-card {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.25);
}

body.light-theme .first-comment-text {
  color: #78350f;
}

body.light-theme .btn-copy-action,
body.light-theme .btn-copy-comment {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

body.light-theme .btn-copy-action:hover,
body.light-theme .btn-copy-comment:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light-theme .media-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .ratio-tag {
  color: #0f172a;
}

body.light-theme .media-desc {
  color: #475569;
}

body.light-theme .btn-media-dl {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}

body.light-theme .report-box,
body.light-theme .payload-box {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: #1e293b;
}

body.light-theme .payload-pre {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .modal-dialog,
body.light-theme .drawer-panel {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.15);
}

body.light-theme .modal-title,
body.light-theme .drawer-title {
  color: #0f172a;
}

body.light-theme .modal-subtitle {
  color: #475569;
}

body.light-theme .field-label {
  color: #334155;
}

body.light-theme .field-input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.14);
}

body.light-theme .field-hint {
  color: #64748b;
}

body.light-theme .cl-tab {
  color: #64748b;
}

body.light-theme .cl-tab.active {
  color: #0284c7;
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.light-theme .channel-box {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .channel-name {
  color: #0f172a;
}

body.light-theme .queue-card,
body.light-theme .history-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .queue-pkg-title,
body.light-theme .history-title {
  color: #0f172a;
}

body.light-theme .radio-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .radio-card.active {
  background: rgba(2, 132, 199, 0.06);
  border-color: #0284c7;
}

body.light-theme .radio-card-content strong {
  color: #0f172a;
}

body.light-theme .publish-channels-select {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .channel-check-label {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

/* Management Canvas Light Theme */
body.light-theme .management-client-picker {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .management-picker-label {
  color: #64748b;
}

body.light-theme .management-subtabs-wrap {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .management-subtabs-wrap .cl-tab {
  color: #64748b;
}

body.light-theme .management-subtabs-wrap .cl-tab:hover {
  color: #0f172a;
  background: #e2e8f0;
}

body.light-theme .management-subtabs-wrap .cl-tab.active {
  color: #0284c7;
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.25);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

body.light-theme .management-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

body.light-theme .channels-grid .channel-box {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .management-footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* History Canvas Light Theme */
body.light-theme .history-search-box {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  color: #64748b;
}

body.light-theme .history-search-box:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.15);
  background: #ffffff;
}

body.light-theme .history-search-input {
  color: #0f172a;
}

body.light-theme .history-search-input::placeholder {
  color: #94a3b8;
}

body.light-theme .history-stat-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

body.light-theme .history-stat-card:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme .history-stat-card .stat-number {
  color: #0f172a;
}

body.light-theme .history-stat-card .stat-label {
  color: #64748b;
}

body.light-theme .history-content-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

body.light-theme .history-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .history-card:hover {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

body.light-theme .history-card-title {
  color: #0f172a;
}

body.light-theme .history-card-actions {
  border-top-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .history-empty-title {
  color: #0f172a;
}

body.light-theme .history-empty-desc {
  color: #64748b;
}

/* =============================================================================
   FASE 1: GANCHOS ALTERNATIVOS (A/B HOOKS), THREADS & CARROSSEL PDF
   ============================================================================= */

/* 1. A/B Hook Picker */
.hooks-picker-card {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(12px);
}

.hooks-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hooks-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.3px;
}

.hooks-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
}

.hooks-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-hook-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-hook-pill:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  transform: translateY(-1px);
}

.btn-hook-pill.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

/* 2. Thread View Layout */
.thread-view-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.thread-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.thread-title-info {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.btn-copy-thread {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-thread:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

.thread-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.thread-item-card {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 0.2s ease;
}

.thread-item-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.thread-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.thread-item-badge {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.thread-item-chars {
  font-size: 0.78rem;
  color: #64748b;
  margin-left: auto;
  margin-right: 0.75rem;
}

.btn-copy-thread-part {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-thread-part:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: #38bdf8;
}

.thread-item-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #f1f5f9;
  white-space: pre-wrap;
}

/* 3. Carrossel Studio */
.carousel-studio-wrapper {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.carousel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 780px;
}

.carousel-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.carousel-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
}

.badge-ratio-gold {
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.badge-format-pill {
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
}

.carousel-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
}

.carousel-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.carousel-slides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.carousel-slide-card {
  padding: 0.85rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.carousel-slide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  border-color: rgba(56, 189, 248, 0.3);
}

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

.slide-index-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.slide-ratio-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.slide-thumb-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  background: #070c18;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.slide-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel-slide-card:hover .slide-thumb-img {
  transform: scale(1.02);
}

.slide-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slide-name-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-dl-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-slide-dl {
  flex: 1;
  text-align: center;
  padding: 0.3rem 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-slide-dl:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: #38bdf8;
}

.carousel-empty-state {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
}

/* =============================================================================
   LIGHT THEME ADAPTATIONS PARA A FASE 1
   ============================================================================= */

body.light-theme .hooks-picker-card {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

body.light-theme .hooks-title {
  color: #0284c7;
}

body.light-theme .hooks-subtitle {
  color: #64748b;
}

body.light-theme .btn-hook-pill {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

body.light-theme .btn-hook-pill:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
}

body.light-theme .btn-hook-pill.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(99, 102, 241, 0.12) 100%);
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
}

body.light-theme .thread-header-bar {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .thread-title-info {
  color: #0f172a;
}

body.light-theme .btn-copy-thread {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

body.light-theme .btn-copy-thread:hover {
  background: rgba(2, 132, 199, 0.2);
  color: #0369a1;
}

body.light-theme .thread-item-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .thread-item-card:hover {
  border-color: rgba(2, 132, 199, 0.35);
}

body.light-theme .thread-item-body {
  color: #1e293b;
}

body.light-theme .carousel-studio-wrapper {
  background: #ffffff;
}

body.light-theme .carousel-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .carousel-title {
  color: #0f172a;
}

body.light-theme .carousel-subtitle {
  color: #64748b;
}

body.light-theme .carousel-slide-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .carousel-slide-card:hover {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

body.light-theme .slide-name-text {
  color: #1e293b;
}

body.light-theme .btn-slide-dl {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}

body.light-theme .btn-slide-dl:hover {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: #0284c7;
}

/* =============================================================================
   CALENDÁRIO EDITORIAL INTERATIVO & RSS ZERO-CLICK (FASE 2)
   ============================================================================= */

.calendar-canvas {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 0 40px 0;
}

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

.calendar-titles {
  max-width: 600px;
}

.calendar-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.calendar-month-indicator {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-heading);
  min-width: 130px;
  text-align: center;
  padding: 0 4px;
}

.calendar-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.calendar-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.calendar-stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
}

.calendar-stat-card .stat-number.highlight-scheduled {
  color: #f59e0b;
}

.calendar-stat-card .stat-number.highlight-published {
  color: #10b981;
}

.calendar-stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.calendar-stat-card.rss-info-card {
  grid-column: span 1;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-color: rgba(56, 189, 248, 0.25);
}

.rss-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rss-status-badge .rss-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.rss-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.calendar-stat-card .stat-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Grade do Calendário */
.calendar-content-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calendar-weekdays-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.calendar-grid-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day-cell {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 120px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.calendar-day-cell:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.calendar-day-cell.calendar-cell-other-month {
  opacity: 0.35;
  background: transparent;
  border-style: dashed;
}

.calendar-day-cell.is-today {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

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

.calendar-day-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
}

.calendar-day-cell.is-today .calendar-day-num {
  color: var(--accent-cyan);
}

.today-tag {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--accent-cyan);
  color: #0b0f19;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.day-events-count {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 8px;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  overflow-y: auto;
  max-height: 140px;
}

/* Card de Evento dentro do Dia */
.calendar-event-card {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border-left: 3px solid;
}

.calendar-event-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.calendar-event-card.cal-event-scheduled {
  background: rgba(245, 158, 11, 0.14);
  border-left-color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left-width: 3px;
}

.calendar-event-card.cal-event-published {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left-width: 3px;
}

.calendar-event-card.cal-event-draft {
  background: rgba(56, 189, 248, 0.12);
  border-left-color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left-width: 3px;
}

.calendar-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
}

.cal-event-time {
  font-weight: 700;
  color: var(--text-heading);
}

.cal-event-channels {
  font-size: 0.72rem;
  letter-spacing: -2px;
}

.cal-event-title {
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.cal-event-client {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botão de Slot Inteligente */
.btn-smart-slot-action {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-smart-slot-action:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(139, 92, 246, 0.3));
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* =============================================================================
   TEMA CLARO (FUNDO BRANCO) - CALENDÁRIO EDITORIAL
   ============================================================================= */

body.light-theme .calendar-stat-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .calendar-stat-card.rss-info-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
  border-color: rgba(2, 132, 199, 0.2);
}

body.light-theme .rss-status-badge .rss-title {
  color: #0284c7;
}

body.light-theme .calendar-content-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body.light-theme .calendar-weekdays-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
  color: #64748b;
}

body.light-theme .calendar-day-cell {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .calendar-day-cell:hover {
  border-color: rgba(2, 132, 199, 0.35);
  background: #f1f5f9;
}

body.light-theme .calendar-day-cell.is-today {
  border-color: #0284c7;
  background: #f0f9ff;
}

body.light-theme .calendar-day-cell.is-today .calendar-day-num {
  color: #0284c7;
}

body.light-theme .today-tag {
  background: #0284c7;
  color: #ffffff;
}

body.light-theme .day-events-count {
  background: rgba(15, 23, 42, 0.08);
  color: #64748b;
}

body.light-theme .calendar-event-card.cal-event-scheduled {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.3);
  border-left-color: #d97706;
}

body.light-theme .calendar-event-card.cal-event-published {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.3);
  border-left-color: #059669;
}

body.light-theme .calendar-event-card.cal-event-draft {
  background: #f0f9ff;
  border-color: rgba(2, 132, 199, 0.25);
  border-left-color: #0284c7;
}

body.light-theme .calendar-event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-theme .btn-smart-slot-action {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(124, 58, 237, 0.1));
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

body.light-theme .btn-smart-slot-action:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(124, 58, 237, 0.2));
  border-color: #0284c7;
}

/* Responsividade do Calendário */
@media (max-width: 992px) {
  .calendar-weekdays-header {
    font-size: 0.72rem;
  }
  .calendar-day-cell {
    min-height: 95px;
    padding: 6px;
  }
  .calendar-event-card {
    padding: 4px 6px;
    font-size: 0.7rem;
  }
  .cal-event-client {
    display: none;
  }
}

@media (max-width: 640px) {
  .calendar-weekdays-header {
    display: none;
  }
  .calendar-grid-cells {
    grid-template-columns: 1fr;
  }
  .calendar-day-cell.calendar-cell-other-month {
    display: none;
  }
  .calendar-day-cell {
    min-height: auto;
  }
}

/* =============================================================================
   ANALYTICS & PERFORMANCE EDITORIAL (FASE 3)
   ============================================================================= */

.analytics-canvas {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 0 40px 0;
}

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

.analytics-titles {
  max-width: 600px;
}

.analytics-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Grid de KPIs */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.analytics-kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.analytics-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.kpi-reach { background: rgba(56, 189, 248, 0.12); color: var(--accent-cyan); }
.kpi-clicks { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.kpi-engagement { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.kpi-evergreen { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.kpi-data {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Painel Duplo: Canais + Evergreen */
.analytics-dual-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.analytics-panel-card {
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.panel-card-header {
  margin-bottom: 16px;
}

.panel-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 2px 0;
}

.panel-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Itens de Desempenho por Canal */
.channels-performance-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.channel-perf-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-perf-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
}

.channel-perf-share {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.channel-perf-bar-track {
  width: 100%;
  height: 8px;
  background: var(--surface-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.channel-perf-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-perf-bottom {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Lista Evergreen */
.evergreen-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 290px;
  overflow-y: auto;
}

.evergreen-item-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition-fast);
}

.evergreen-item-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.evergreen-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.evergreen-item-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
}

.evergreen-item-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.evergreen-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.evergreen-empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.evergreen-empty-state span {
  font-size: 2rem;
}

/* Tabela de Publicações */
.analytics-table-card {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.analytics-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.analytics-table th {
  background: var(--surface-secondary);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.analytics-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.analytics-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-col-title {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-heading) !important;
}

.rate-badge {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.rate-high {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.rate-normal {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
}

/* =============================================================================
   TEMA CLARO (FUNDO BRANCO) - ANALYTICS
   ============================================================================= */

body.light-theme .analytics-kpi-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.light-theme .analytics-panel-card,
body.light-theme .analytics-table-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body.light-theme .channel-perf-bar-track {
  background: #f1f5f9;
}

body.light-theme .evergreen-item-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .analytics-table th {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .analytics-table td {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .analytics-table tr:hover td {
  background: #f1f5f9;
}

/* Responsividade do Analytics */
@media (max-width: 992px) {
  .analytics-dual-panel {
    grid-template-columns: 1fr;
  }
}



