/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.sidebar-header {
  padding: 1.25rem 0.85rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at center top, var(--gp-primary-light), transparent 75%);
}

.brand-logo-img {
  width: 100%;
  max-width: 235px;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: transparent;
  filter: drop-shadow(0 6px 18px var(--gp-primary-glow));
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.brand-logo-img:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 10px 26px var(--gp-primary-glow));
}

.brand-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--gp-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0 0.85rem;
  margin-bottom: 0.4rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
}

.nav-item-btn i, .nav-item-btn svg {
  font-size: 1.2rem;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.nav-item-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item-btn:hover i, .nav-item-btn:hover svg {
  color: var(--gp-primary);
  transform: translateX(2px);
}

.nav-item-btn.active {
  background: var(--bg-sidebar-active);
  color: var(--gp-primary);
  font-weight: 700;
}

.nav-item-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: var(--gp-gradient-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: 0 0 10px var(--gp-primary);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--border-card);
  color: var(--text-muted);
}

.nav-badge.orange {
  background: var(--gp-primary-light);
  color: var(--gp-primary);
  border: 1px solid var(--gp-primary-glow);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-quick-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--gp-gradient-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px var(--gp-primary-glow);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.user-role {
  font-size: 0.72rem;
  color: var(--gp-primary);
  font-weight: 600;
}

.btn-sidebar-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-sidebar-logout:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  height: 72px;
  background-color: var(--bg-topbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-card);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  transition: background-color var(--transition-normal);
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 1rem;
    height: 64px;
  }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
}

.server-status-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--status-success);
  box-shadow: 0 0 10px var(--status-success);
  animation: livePulse 2s infinite ease-in-out;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-switch-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.theme-switch-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--gp-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gp-gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 107, 0, 0.45);
}

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

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--gp-primary);
}

.btn-success {
  background: var(--status-success);
  color: #FFFFFF;
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-danger {
  background: var(--status-danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-outline-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-outline-danger:hover {
  background: var(--status-danger);
  color: #FFFFFF;
  border-color: var(--status-danger);
}

.btn-outline-success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-outline-success:hover {
  background: var(--status-success);
  color: #FFFFFF;
  border-color: var(--status-success);
}

.btn-outline-purple {
  background: var(--status-purple-bg);
  color: var(--status-purple);
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.btn-outline-purple:hover {
  background: var(--status-purple);
  color: #FFFFFF;
  border-color: var(--status-purple);
}

.btn-outline-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-outline-warning:hover {
  background: var(--status-warning);
  color: #FFFFFF;
  border-color: var(--status-warning);
}

.btn-outline-info {
  background: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid rgba(14, 165, 233, 0.4);
}
.btn-outline-info:hover {
  background: var(--status-info);
  color: #FFFFFF;
  border-color: var(--status-info);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Barra de Filtros Compacta para Clientes */
.cli-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  background: var(--bg-card-hover);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.cli-filter-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: var(--bg-card);
}
.cli-filter-btn.active {
  background: var(--gp-gradient-primary);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 0 10px var(--gp-primary-glow);
  font-weight: 700;
}
.cli-filter-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.38rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-weight: 800;
}
.cli-filter-btn.active .cli-filter-badge {
  background: rgba(0, 0, 0, 0.28);
  color: #FFFFFF;
}

.cli-filter-btn.vod-action-btn-circle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cli-filter-btn.vod-action-btn-circle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.cli-filter-btn.vod-action-btn-circle.active {
  box-shadow: 0 0 14px currentColor, 0 4px 12px rgba(0, 0, 0, 0.4);
  border-width: 1.8px !important;
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.2);
}
.cli-filter-btn.vod-action-btn-circle svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:has([data-tooltip]),
.card:has(.vod-tooltip),
.card.overflow-visible,
.card-overflow-visible {
  overflow: visible !important;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Metric Stats Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gp-gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--gp-primary-glow);
  box-shadow: var(--shadow-md);
}

.metric-card:hover::after {
  opacity: 1;
}

.metric-content {
  display: flex;
  flex-direction: column;
}

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

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-main);
  margin: 0.25rem 0 0.2rem 0;
  line-height: 1.1;
}

.metric-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.trend-up { color: var(--status-success); }
.trend-down { color: var(--status-danger); }
.trend-neutral { color: var(--text-dim); }

.metric-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.metric-icon-orange {
  background: var(--gp-primary-light);
  color: var(--gp-primary);
  border: 1px solid var(--gp-primary-glow);
}

.metric-icon-blue {
  background: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.metric-icon-green {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.metric-icon-purple {
  background: var(--status-purple-bg);
  color: var(--status-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table-clients {
  min-width: 1140px;
}

.data-table th {
  background: var(--bg-card-hover);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--border-card);
}

.data-table td {
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.86rem;
  vertical-align: middle;
  transition: background-color var(--transition-fast);
}

.data-table tr:hover td {
  background-color: var(--bg-card-hover);
}

/* Coluna de Ações Normal (Fluxo Natural sem sobreposição/sticky) */
.sticky-col {
  position: static !important;
  box-shadow: none !important;
  border-left: none !important;
}

.data-table th.sticky-col {
  background: var(--bg-card-hover);
}

.data-table tr:hover td.sticky-col {
  background: var(--bg-card-hover) !important;
}

/* Botões Compactos da Tabela de Ações (28px x 28px) */
.tbl-act-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tbl-act-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-active {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-trial {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-trial-glow {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.28));
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-success, .badge-active {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-danger, .badge-expired {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-warning, .badge-pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-info, .badge-official {
  background: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid rgba(14, 165, 233, 0.35);
  font-weight: 700;
}

.badge-purple {
  background: var(--status-purple-bg);
  color: var(--status-purple);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.row-trial td:first-child {
  position: relative;
  border-left: 3px solid var(--status-warning) !important;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-window {
  background: var(--bg-modal);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #94a3b8);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  outline: none;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-close-btn svg {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #ef4444 !important;
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.32);
}

.modal-close-btn:hover svg {
  transform: rotate(90deg);
}

.modal-close-btn:active {
  transform: translateY(0) scale(0.95);
}

[data-theme="light"] .modal-close-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .modal-close-btn:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  background: var(--bg-card-hover);
}

/* Gerenciador de categorias VOD: acompanha o modo claro/escuro do painel. */
.vod-category-manager-scroll {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.vod-category-manager-row {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.vod-category-count {
  background: var(--status-info-bg);
  color: var(--status-info);
}

[data-theme="light"] .vod-category-manager-modal .modal-header,
[data-theme="light"] .vod-category-manager-modal .modal-body {
  background: #FFFFFF;
}

[data-theme="light"] .vod-category-manager-scroll {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

[data-theme="light"] .vod-category-manager-row {
  background: #FFFFFF;
  border-color: #D7DEE8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .vod-category-manager-row:hover {
  background: #F8FAFC;
  border-color: var(--border-hover);
}

[data-theme="light"] .vod-category-count {
  background: #E0F2FE;
  color: #0369A1;
}

/* ==========================================================================
   CARDS DE RENOVAÇÃO (Legibilidade em tema claro e escuro)
   ========================================================================== */
.renewal-plan-card {
  user-select: none;
}
.renewal-plan-title {
  color: var(--text-main) !important;
}
.renewal-plan-card strong {
  color: var(--text-main) !important;
}
[data-theme="light"] .renewal-plan-card {
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="light"] .form-label {
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-input, #0f172a);
  border: 1.5px solid var(--border-card, rgba(255, 255, 255, 0.15));
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

/* Legibilidade máxima e contraste em selects e opções nativas no Windows / Chrome / Edge */
select.form-control,
select {
  color: #ffffff !important;
  background-color: #0b1329 !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
}

select option {
  background-color: #0b1329 !important;
  color: #ffffff !important;
  padding: 10px 14px !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
}

select option:checked,
select option:hover {
  background-color: #1e293b !important;
  color: #38bdf8 !important;
}

[data-theme="light"] select.form-control,
[data-theme="light"] select {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] select option:checked,
[data-theme="light"] select option:hover {
  background-color: #e2e8f0 !important;
  color: #0284c7 !important;
}

/* VOD Multi-Select Dropdown */
.vod-multi-dropdown-container {
  position: relative;
  width: 100%;
}

.vod-dropdown-trigger {
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  background-color: #0b1329 !important;
  border: 1.5px solid rgba(167, 139, 250, 0.45) !important;
  border-radius: var(--radius-md);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
}

.vod-dropdown-trigger:hover {
  border-color: #a78bfa !important;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.25);
}

.vod-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #080f1e;
  border: 1.5px solid #6366f1;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  z-index: 1050;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
}

.vod-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.vod-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .vod-dropdown-trigger {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .vod-dropdown-menu {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .vod-dropdown-item:hover {
  background: #f1f5f9;
}

.form-control:focus {
  outline: none;
  border-color: var(--gp-primary);
  box-shadow: 0 0 0 3px var(--gp-primary-light);
}

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  animation: fadeIn 0.3s ease-out;
  min-width: 300px;
}

.toast.success { border-left: 4px solid var(--status-success); }
.toast.error { border-left: 4px solid var(--status-danger); }
.toast.info { border-left: 4px solid var(--gp-primary); }

/* ==========================================================================
   SIGMA-STYLE CUSTOM TOOLTIPS (CENTRALIZADO NO TOPO COM SETA)
   ========================================================================== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #090e1a !important;
  color: #ffffff !important;
  padding: 0.42rem 0.75rem;
  border-radius: 7px;
  font-size: 0.77rem;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 999999 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(56, 189, 248, 0.45);
  letter-spacing: 0.02em;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 6px 5px 0 5px;
  border-style: solid;
  border-color: #090e1a transparent transparent transparent !important;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 1000000 !important;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

[data-tooltip-pos="left"]::before {
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) !important;
}
[data-tooltip-pos="left"]::after {
  left: auto !important;
  right: 12px !important;
  transform: translateY(4px) !important;
}
[data-tooltip-pos="left"]:hover::before,
[data-tooltip-pos="left"]:hover::after {
  transform: translateY(0) !important;
}

/* Suporte para Tooltip Abaixo (Ideal para Barras Superiores / Cabeçalhos) */
[data-tooltip-pos="bottom"]::before,
[data-tooltip-pos="down"]::before {
  top: calc(100% + 9px) !important;
  bottom: auto !important;
  transform: translateX(-50%) translateY(-4px) !important;
}
[data-tooltip-pos="bottom"]::after,
[data-tooltip-pos="down"]::after {
  top: calc(100% + 3px) !important;
  bottom: auto !important;
  transform: translateX(-50%) translateY(-4px) !important;
  border-width: 0 6px 6px 6px !important;
  border-color: transparent transparent #090e1a transparent !important;
}
[data-tooltip-pos="bottom"]:hover::before,
[data-tooltip-pos="down"]:hover::before {
  transform: translateX(-50%) translateY(0) !important;
}
[data-tooltip-pos="bottom"]:hover::after,
[data-tooltip-pos="down"]:hover::after {
  transform: translateX(-50%) translateY(0) !important;
}

/* Modo Claro: Alto contraste e visibilidade máxima */
[data-theme="light"] [data-tooltip]::before {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35), 0 0 0 1px #334155 !important;
}
[data-theme="light"] [data-tooltip]::after {
  border-color: #0f172a transparent transparent transparent !important;
}
[data-theme="light"] [data-tooltip-pos="bottom"]::after,
[data-theme="light"] [data-tooltip-pos="down"]::after {
  border-color: transparent transparent #0f172a transparent !important;
}

/* ==========================================================================
   BALÃO VERDE FLUTUANTE DE CONFIRMAÇÃO DE CÓPIA (2 SEGUNDOS)
   ========================================================================== */
.copy-balloon-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #10b981;
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  z-index: 999999;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  animation: gpBalloonPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.copy-balloon-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #10b981 transparent transparent transparent;
}

@keyframes gpBalloonPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ==========================================================================
   TELA DE LOGIN MASTER / AUTENTICAÇÃO
   ========================================================================== */
.login-view-container {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, rgba(245, 130, 32, 0.14) 0%, transparent 65%), #070b14;
  padding: 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl, 16px);
  padding: 2.5rem 2.25rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(245, 130, 32, 0.15);
  animation: loginCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes loginCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: auto;
  max-width: 260px;
  height: auto;
  max-height: 130px;
  object-fit: contain;
  background: transparent;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 8px 24px rgba(255, 122, 0, 0.55));
}


.login-title {
  font-size: 1.55rem;
  font-weight: 800;
  background: var(--gp-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-input-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.login-input-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 5;
}

.login-control,
input.login-control,
#login-user,
#login-pass {
  width: 100%;
  padding: 0.85rem 2.85rem 0.85rem 3.1rem !important;
  padding-left: 3.1rem !important;
  padding-right: 2.85rem !important;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md, 8px);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.login-control:-webkit-autofill,
.login-control:-webkit-autofill:hover, 
.login-control:-webkit-autofill:focus {
  padding: 0.85rem 2.85rem 0.85rem 3.1rem !important;
  padding-left: 3.1rem !important;
  padding-right: 2.85rem !important;
}

.login-control:focus {
  outline: none;
  border-color: var(--gp-primary);
  box-shadow: 0 0 0 3px var(--gp-primary-light);
}

.login-toggle-pwd {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  z-index: 5;
}

.login-toggle-pwd:hover {
  color: var(--text-main);
}

.login-btn-submit {
  width: 100%;
  padding: 0.95rem;
  background: var(--gp-gradient-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--gp-primary-glow);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-btn-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--gp-primary-glow);
}

.login-btn-submit:active {
  transform: translateY(0);
}

/* ==============================================================================
   AUTO LIMPEZA CARD (SIDEBAR & SERVIDORES) - IDÊNTICO AO PAINEL PROXY
   ============================================================================== */
.sidebar-cleanup-card {
  margin: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.sidebar-cleanup-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.sidebar-cleanup-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.sidebar-cleanup-timer {
  font-size: 0.74rem;
  color: var(--status-success);
  margin-bottom: 10px;
  line-height: 1.25;
  font-weight: 700;
  font-family: monospace;
}

[data-theme="light"] .sidebar-cleanup-timer {
  color: #059669;
  font-weight: 800;
}

.cleanup-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 8px var(--status-success);
  transition: all 0.25s ease;
}

.cleanup-dot.off {
  background: var(--text-dim);
  box-shadow: none;
}

.cleanup-badge-30m,
.cleanup-badge-60m {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .cleanup-badge-30m,
[data-theme="light"] .cleanup-badge-60m {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

/* Switch Toggle Customizado */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-subtle);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  transition: 0.25s ease;
}

.switch-slider.active {
  background: var(--status-success);
  border-color: var(--status-success);
}

.switch-slider .knob {
  position: absolute;
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.switch-slider.active .knob {
  left: 18px;
}

.sidebar-cleanup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  text-align: center;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.80rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .sidebar-cleanup-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.sidebar-cleanup-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
  transform: translateY(-1px);
}

.sidebar-cleanup-btn:active {
  transform: translateY(0);
}

/* ==============================================================================
   STATUS DOTS DOS CANAIS (BOLINHA VERDE E VERMELHA COM PULSO)
   ============================================================================== */
.channel-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.channel-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8), 0 0 2px #10b981;
  animation: pulse-green 2.5s infinite;
}

.channel-status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8), 0 0 2px #ef4444;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(16, 185, 129, 0.8); }
  50% { transform: scale(1.15); box-shadow: 0 0 10px rgba(16, 185, 129, 1); }
  100% { transform: scale(1); box-shadow: 0 0 4px rgba(16, 185, 129, 0.8); }
}

@keyframes pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(239, 68, 68, 0.8); }
  50% { transform: scale(1.15); box-shadow: 0 0 10px rgba(239, 68, 68, 1); }
  100% { transform: scale(1); box-shadow: 0 0 4px rgba(239, 68, 68, 0.8); }
}

/* Checkboxes customizados na tabela */
.channel-table-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--gp-primary);
  cursor: pointer;
  vertical-align: middle;
}

/* ==============================================================================
   XUI.ONE STREAM MODE PILLS (LIVE / ONDEMAND / DIRECT) & MENUS
   ============================================================================== */
.stream-mode-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.stream-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: transparent;
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.stream-mode-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stream-mode-pill:active {
  transform: translateY(0);
}

/* LIVE / AO VIVO */
.stream-mode-pill.stream-mode-live {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}
.stream-mode-pill.stream-mode-live .mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
  animation: pulse-green 2.5s infinite;
}

/* ONDEMAND / SOB DEMANDA */
.stream-mode-pill.stream-mode-ondemand {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
.stream-mode-pill.stream-mode-ondemand .mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.9);
}

/* DIRECT / DIRETO DA FONTE */
.stream-mode-pill.stream-mode-direct {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
.stream-mode-pill.stream-mode-direct .mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.9);
}

/* Dropdown Menu de Troca Rápida Canal a Canal */
.stream-mode-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75);
  z-index: 120;
  min-width: 190px;
  overflow: hidden;
  padding: 0.35rem;
  animation: fadeInDown 0.15s ease-out;
}

.mode-menu-item {
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.15s ease;
}

.mode-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(2px);
}

.mode-menu-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Botões de Ação XUI.ONE */
.btn-xui-play {
  background: #f97316 !important;
  border-color: #f97316 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35) !important;
  transition: all 0.2s ease !important;
}
.btn-xui-play:hover {
  background: #ea580c !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.5) !important;
}

.btn-xui-action {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
.btn-xui-action:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
}

.btn-xui-delete {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
.btn-xui-delete:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px) !important;
}

.btn-xui-test {
  background: rgba(56, 189, 248, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  color: #38bdf8 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
.btn-xui-test:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  color: #7dd3fc !important;
  transform: translateY(-1px) !important;
}
.btn-xui-test.testing svg {
  animation: spin 0.8s linear infinite !important;
}

.btn-xui-copy {
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}
.btn-xui-copy:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  color: #7dd3fc !important;
  transform: translateY(-1px) !important;
}

/* ==============================================================================
   OVERRIDE DE CONTRASTE E LEGIBILIDADE - TEMA CLARO E ESCURO
   ============================================================================== */

/* Padrão Tema Escuro */
.ftb-whatsapp-card {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), rgba(18, 140, 126, 0.04));
  border: 1px solid rgba(37, 211, 102, 0.35);
}
.ftb-whatsapp-title {
  color: #25d366;
}
.ftb-whatsapp-textarea {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.ftb-teams-row {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.ftb-team-badge {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #c084fc;
}
.ftb-vs-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}
.ftb-time-badge {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c084fc;
}
.ftb-onde-assistir {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.ftb-channel-text {
  color: #38bdf8;
}
.ftb-vinculado-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.ftb-trocar-btn {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

/* ==============================================================================
   TEMA CLARO (data-theme="light") - ALTO CONTRASTE E LEITURA PERFEITA
   ============================================================================== */
[data-theme="light"] .btn-xui-action {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
[data-theme="light"] .btn-xui-action:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="light"] .btn-xui-delete {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}
[data-theme="light"] .btn-xui-delete:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
  color: #b91c1c !important;
}

[data-theme="light"] .btn-xui-test {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}
[data-theme="light"] .btn-xui-test:hover {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
  color: #0369a1 !important;
}

[data-theme="light"] .btn-xui-copy {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}
[data-theme="light"] .btn-xui-copy:hover {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
  color: #0369a1 !important;
}

[data-theme="light"] .ftb-whatsapp-card {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.08) !important;
}
[data-theme="light"] .ftb-whatsapp-title {
  color: #166534 !important;
}
[data-theme="light"] .ftb-whatsapp-textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .ftb-match-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .ftb-match-card .tournament-name {
  color: #475569 !important;
  font-weight: 800 !important;
}
[data-theme="light"] .ftb-teams-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
[data-theme="light"] .ftb-team-name {
  color: #0f172a !important;
  font-weight: 800 !important;
}
[data-theme="light"] .ftb-team-badge {
  background: #f3e8ff !important;
  border-color: #d8b4fe !important;
  color: #7e22ce !important;
}
[data-theme="light"] .ftb-vs-badge {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .ftb-time-badge {
  background: #f3e8ff !important;
  border-color: #d8b4fe !important;
  color: #7e22ce !important;
}
[data-theme="light"] .ftb-onde-assistir {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
}
[data-theme="light"] .ftb-channel-text {
  color: #0369a1 !important;
  font-weight: 800 !important;
}
[data-theme="light"] .ftb-vinculado-badge {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}
[data-theme="light"] .ftb-trocar-btn {
  background: #ffffff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}
[data-theme="light"] .ftb-trocar-btn:hover {
  background: #e0f2fe !important;
  color: #0369a1 !important;
}
/* ==========================================================================
   VOD ACTION BUTTONS & MODERN TOOLTIP (BALÃO FLUTUANTE)
   ========================================================================== */
.vod-action-btn-circle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  outline: none;
  padding: 0;
  flex-shrink: 0;
}

.vod-action-btn-circle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: rgba(30, 41, 59, 0.9);
}

.vod-action-btn-circle:active {
  transform: translateY(0) scale(0.98);
}

.vod-action-btn-circle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.vod-action-btn-circle:hover svg {
  transform: scale(1.1);
}

/* Tooltip Balão Centralizado ACIMA com Seta Neon (Fica acima do ponteiro do mouse) */
.vod-tooltip,
.vod-action-btn-circle,
.chn-header-icon-btn,
.chn-tooltip {
  position: relative;
}

.chn-header-icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  font-size: 1.15rem;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.12));
}

.chn-header-icon-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.chn-header-icon-btn:active {
  transform: translateY(0) scale(0.96);
}

.chn-header-icon-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease;
}

.chn-header-icon-btn:hover svg {
  transform: scale(1.12);
}

.vod-tooltip::before,
button.vod-tooltip::before,
.vod-action-btn-circle::before,
.chn-header-icon-btn::before,
.chn-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(4px) scale(0.96);
  background: #090e1a !important;
  color: #ffffff !important;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.16s;
  z-index: 999999 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 189, 248, 0.45);
  letter-spacing: 0.01em;
}

.vod-tooltip::after,
button.vod-tooltip::after,
.vod-action-btn-circle::after,
.chn-header-icon-btn::after,
.chn-tooltip::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px) !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(4px);
  border-width: 6px 6px 0 6px !important;
  border-style: solid;
  border-color: #090e1a transparent transparent transparent !important;
  pointer-events: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.16s;
  z-index: 999999 !important;
}

.vod-tooltip:hover::before,
button.vod-tooltip:hover::before,
.vod-action-btn-circle:hover::before,
.chn-header-icon-btn:hover::before,
.chn-tooltip:hover::before {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) scale(1) !important;
}

.vod-tooltip:hover::after,
button.vod-tooltip:hover::after,
.vod-action-btn-circle:hover::after,
.chn-header-icon-btn:hover::after,
.chn-tooltip:hover::after {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* Modo Claro: Alto contraste, fundo grafite escuro com texto branco e borda nítida */
[data-theme="light"] .vod-tooltip::before,
[data-theme="light"] button.vod-tooltip::before,
[data-theme="light"] .vod-action-btn-circle::before,
[data-theme="light"] .chn-header-icon-btn::before,
[data-theme="light"] .chn-tooltip::before {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35), 0 0 0 1px #334155 !important;
}

[data-theme="light"] .vod-tooltip::after,
[data-theme="light"] button.vod-tooltip::after,
[data-theme="light"] .vod-action-btn-circle::after,
[data-theme="light"] .chn-header-icon-btn::after,
[data-theme="light"] .chn-tooltip::after {
  border-color: #0f172a transparent transparent transparent !important;
}

/* ── MODERN CONFIRM & PROMPT MODAL DIALOGS ────────────────────────────── */
.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.confirm-dialog-backdrop.fade-out {
  opacity: 0;
}

.confirm-dialog-card {
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .confirm-dialog-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px #cbd5e1;
}

.confirm-dialog-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-dialog-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.confirm-dialog-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.confirm-dialog-icon.info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.confirm-dialog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  margin: 0 0 0.45rem 0;
  letter-spacing: -0.01em;
}

.confirm-dialog-msg {
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.animate-scale-in {
  animation: dialogScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialogScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Posicionamento Alinhado à Direita para Botões no Fim da Linha (Abre acima e alinha à direita para evitar corte lateral) */
.vod-tooltip[data-tooltip-pos="bottom-left"]::before,
.vod-tooltip[data-tooltip-pos="left"]::before,
.chn-header-icon-btn[data-tooltip-pos="left"]::before,
[data-tooltip][data-tooltip-pos="bottom-left"]::before {
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) scale(0.96) !important;
}
.vod-tooltip[data-tooltip-pos="bottom-left"]::after,
.vod-tooltip[data-tooltip-pos="left"]::after,
.chn-header-icon-btn[data-tooltip-pos="left"]::after,
[data-tooltip][data-tooltip-pos="bottom-left"]::after {
  bottom: calc(100% + 2px) !important;
  top: auto !important;
  left: auto !important;
  right: 14px !important;
  transform: translateY(4px) !important;
  border-width: 6px 6px 0 6px !important;
  border-color: #090e1a transparent transparent transparent !important;
}
.vod-tooltip[data-tooltip-pos="bottom-left"]:hover::before,
.vod-tooltip[data-tooltip-pos="left"]:hover::before,
[data-tooltip][data-tooltip-pos="bottom-left"]:hover::before {
  transform: translateY(0) scale(1) !important;
}
.vod-tooltip[data-tooltip-pos="bottom-left"]:hover::after,
.vod-tooltip[data-tooltip-pos="left"]:hover::after,
[data-tooltip][data-tooltip-pos="bottom-left"]:hover::after {
  transform: translateY(0) !important;
}
[data-theme="light"] .vod-tooltip[data-tooltip-pos="bottom-left"]::after,
[data-theme="light"] .vod-tooltip[data-tooltip-pos="left"]::after,
[data-theme="light"] [data-tooltip][data-tooltip-pos="bottom-left"]::after {
  border-color: #0f172a transparent transparent transparent !important;
}

/* ==============================================================================
   CHANNELS MODULE - PAINEL DE MONITORAMENTO E BARRA EM MASSA
   ============================================================================== */
.chn-autocheck-panel {
  background: var(--bg-card, #121622) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}
.chn-progress-track {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}
.chn-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  text-align: center;
}
.chn-stat-box .stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.chn-stat-box .stat-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
}
.chn-stat-online {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}
.chn-stat-online .stat-label,
.chn-stat-online .stat-value {
  color: #10b981 !important;
}
.chn-stat-offline {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}
.chn-stat-offline .stat-label,
.chn-stat-offline .stat-value {
  color: #ef4444 !important;
}
.chn-stat-batch {
  background: rgba(56, 189, 248, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
}
.chn-stat-batch .stat-label,
.chn-stat-batch .stat-value {
  color: #38bdf8 !important;
}

/* Barra Mudar Todos em Massa */
.chn-bulk-action-bar {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.chn-bulk-title {
  color: #f59e0b;
}
.chn-bulk-target-label {
  color: #cbd5e1;
}
.btn-bulk-direct {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}
.btn-bulk-live {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.6);
  color: #10b981;
}
.btn-bulk-ondemand {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
}
.chn-sticky-bulk-bar {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}

/* ==============================================================================
   TEMA CLARO (data-theme="light") - CHANNELS MODULE OVERRIDES
   ============================================================================== */
[data-theme="light"] .chn-autocheck-panel {
  background: #ffffff !important;
  border: 1.5px solid #a7f3d0 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12) !important;
}
[data-theme="light"] .chn-autocheck-panel h1,
[data-theme="light"] .chn-autocheck-panel span,
[data-theme="light"] .chn-autocheck-panel div {
  color: #0f172a;
}
[data-theme="light"] #autocheck-status-subtext {
  color: #475569 !important;
}
[data-theme="light"] #autocheck-progress-label {
  color: #1e293b !important;
}
[data-theme="light"] .chn-progress-track {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .chn-stat-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .chn-stat-box .stat-label {
  color: #64748b !important;
}
[data-theme="light"] .chn-stat-box .stat-value {
  color: #0f172a !important;
}
[data-theme="light"] .chn-stat-online {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
}
[data-theme="light"] .chn-stat-online .stat-label,
[data-theme="light"] .chn-stat-online .stat-value {
  color: #059669 !important;
}
[data-theme="light"] .chn-stat-offline {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
}
[data-theme="light"] .chn-stat-offline .stat-label,
[data-theme="light"] .chn-stat-offline .stat-value {
  color: #dc2626 !important;
}
[data-theme="light"] .chn-stat-batch {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
}
[data-theme="light"] .chn-stat-batch .stat-label,
[data-theme="light"] .chn-stat-batch .stat-value {
  color: #0284c7 !important;
}

/* Barra Mudar Todos em Massa no Tema Claro */
[data-theme="light"] .chn-bulk-action-bar {
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.08) !important;
}
[data-theme="light"] .chn-bulk-title {
  color: #b45309 !important;
}
[data-theme="light"] .chn-bulk-target-label {
  color: #78350f !important;
}
[data-theme="light"] .chn-bulk-target-label strong {
  color: #451a03 !important;
}
[data-theme="light"] .btn-bulk-direct {
  background: #ffffff !important;
  border: 1.5px solid #f59e0b !important;
  color: #b45309 !important;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.15) !important;
}
[data-theme="light"] .btn-bulk-direct:hover {
  background: #fef3c7 !important;
}
[data-theme="light"] .btn-bulk-live {
  background: #ffffff !important;
  border: 1.5px solid #10b981 !important;
  color: #047857 !important;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.15) !important;
}
[data-theme="light"] .btn-bulk-live:hover {
  background: #ecfdf5 !important;
}
[data-theme="light"] .btn-bulk-ondemand {
  background: #ffffff !important;
  border: 1.5px solid #0ea5e9 !important;
  color: #0369a1 !important;
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.15) !important;
}
[data-theme="light"] .btn-bulk-ondemand:hover {
  background: #f0f9ff !important;
}

[data-theme="light"] .chn-sticky-bulk-bar {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
[data-theme="light"] #channels-football-banner {
  background: #f5f3ff !important;
  border: 1.5px solid #ddd6fe !important;
}
[data-theme="light"] #channels-football-banner div {
  color: #1e1b4b !important;
}
[data-theme="light"] #channels-football-banner .badge {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #86efac !important;
}

/* ==========================================================================
   CARDS DE ACESSO XTREAM CODES (SMARTERS / TIVIMATE / XCIPTV)
   Legibilidade e Contraste Otimizados para Temas Escuro e Claro
   ========================================================================== */
.xc-credentials-container {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: monospace;
  font-size: 0.8rem;
}
.xc-box-full {
  width: 100%;
}
.xc-credentials-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
@media (max-width: 640px) {
  .xc-credentials-subgrid {
    grid-template-columns: 1fr;
  }
}
.xc-credential-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.xc-box-content {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-width: 0;
  word-break: break-all;
}
.btn-xc-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 5px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
  white-space: nowrap;
}
.btn-xc-copy:hover {
  background: var(--gp-primary, #3b82f6);
  color: #ffffff;
  border-color: var(--gp-primary, #3b82f6);
  transform: translateY(-1px);
}
.btn-xc-copy:active {
  transform: translateY(0);
}
.xc-credential-box .xc-label {
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}
.xc-credential-box .xc-val-server {
  color: #22d3ee;
  word-break: break-all;
  font-weight: 700;
}
.xc-credential-box .xc-val-port {
  color: #34d399;
  font-weight: 700;
}
.xc-credential-box .xc-port-hint {
  color: var(--text-dim, #64748b);
  font-size: 0.72rem;
}
.xc-credential-box .xc-val-user,
.xc-credential-box .xc-val-pass {
  color: var(--text-main, #f8fafc);
  font-weight: 700;
}

/* Xtream Codes no Modo Claro */
[data-theme="light"] .xc-credential-box {
  background: #F1F5F9 !important;
  border: 1.5px solid #CBD5E1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
[data-theme="light"] .xc-credential-box .xc-label {
  color: #475569 !important;
  font-weight: 700 !important;
}
[data-theme="light"] .xc-credential-box .xc-val-server {
  color: #0284C7 !important; /* Azul Oceano vivo e ultra legível */
  font-weight: 800 !important;
}
[data-theme="light"] .xc-credential-box .xc-val-port {
  color: #047857 !important; /* Verde Esmeralda escuro nítido */
  font-weight: 800 !important;
}
[data-theme="light"] .xc-credential-box .xc-port-hint {
  color: #64748B !important;
  font-weight: 500 !important;
}
[data-theme="light"] .xc-credential-box .xc-val-user,
[data-theme="light"] .xc-credential-box .xc-val-pass {
  color: #0F172A !important; /* Preto Ardósia com máximo contraste */
  font-weight: 800 !important;
}
[data-theme="light"] .btn-xc-copy {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}
[data-theme="light"] .btn-xc-copy:hover {
  background: #0284C7 !important;
  border-color: #0284C7 !important;
  color: #FFFFFF !important;
}

/* ==========================================================================
   PRÉ-VISUALIZAÇÃO DE MENSAGEM WHATSAPP
   Design Idêntico ao WhatsApp Real em Modo Claro e Escuro
   ========================================================================== */
.wa-preview-card {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.03));
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding: 0.85rem 1rem;
}
.wa-preview-header {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--status-success, #10b981);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.wa-chat-bubble {
  background: #005c4b; /* Fundo oficial WhatsApp Dark Mode */
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px 8px 8px 2px;
  padding: 0.85rem 1rem;
  color: #ecfdf5;
  font-size: 0.84rem;
  line-height: 1.55;
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}
.wa-chat-bubble-content {
  white-space: pre-wrap;
  word-break: break-word;
  color: #ecfdf5;
}
.wa-chat-bubble-content strong {
  color: #ffffff;
  font-weight: 800;
}
.wa-bubble-link {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 700;
  word-break: break-all;
}
.wa-chat-bubble-footer {
  text-align: right;
  font-size: 0.68rem;
  color: #6ee7b7;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}
.wa-check-ticks {
  color: #38bdf8;
  font-weight: 800;
}

/* WhatsApp Preview no Modo Claro (Visual Oficial WhatsApp Web/App Claro) */
[data-theme="light"] .wa-preview-card {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}
[data-theme="light"] .wa-preview-header {
  color: #047857 !important;
}
[data-theme="light"] .wa-chat-bubble {
  background: #D9FDD3 !important; /* Verde claro oficial de mensagem enviada do WhatsApp */
  border: 1px solid #86EFAC !important;
  color: #111827 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .wa-chat-bubble-content {
  color: #111827 !important; /* Texto preto super nítido */
}
[data-theme="light"] .wa-chat-bubble-content strong {
  color: #000000 !important;
  font-weight: 800 !important;
}
[data-theme="light"] .wa-chat-bubble-content em {
  color: #1f2937 !important;
}
[data-theme="light"] .wa-bubble-link {
  color: #0284C7 !important; /* Azul link nítido */
  font-weight: 800 !important;
  text-decoration: underline !important;
}
[data-theme="light"] .wa-chat-bubble-footer {
  color: #4B5563 !important; /* Horário legível */
  font-weight: 600 !important;
}
[data-theme="light"] .wa-check-ticks {
  color: #0284C7 !important; /* Confirmação de leitura azul */
  font-weight: 800 !important;
}

/* ==============================================================================
   EPG & MODAL - SUITE DE ESTILOS TEMA CLARO (ALTO CONTRASTE & LEITURA PERFEITA)
   ============================================================================== */

/* Modal Container e Janela Modal */
[data-theme="light"] .modal-window,
[data-theme="light"] .epg-modal-window {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15) !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-header .modal-title {
  color: #047857 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .modal-footer {
  border-top: 1px solid #e2e8f0 !important;
}

/* Painel de Busca de EPG nos Modais (Novo Canal / Editar Canal) */
[data-theme="light"] #new-epg-search-box,
[data-theme="light"] #edit-epg-search-box,
[data-theme="light"] .epg-search-box-container {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] #new-epg-search-box .epg-box-title,
[data-theme="light"] #edit-epg-search-box .epg-box-title,
[data-theme="light"] .epg-box-title {
  color: #047857 !important;
  font-weight: 800 !important;
}

/* Inputs de EPG e Filtro de Vincular */
[data-theme="light"] #new-epg-query,
[data-theme="light"] #edit-epg-query,
[data-theme="light"] #epg-mgr-search-input,
[data-theme="light"] #bind-channel-search-input,
[data-theme="light"] .epg-search-input-field {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #94a3b8 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] #new-epg-query::placeholder,
[data-theme="light"] #edit-epg-query::placeholder,
[data-theme="light"] #epg-mgr-search-input::placeholder,
[data-theme="light"] #bind-channel-search-input::placeholder {
  color: #64748b !important;
}

/* Botões de Filtros de Categoria (Documentários, Filmes, Esportes...) */
[data-theme="light"] .epg-cat-filter-btn,
[data-theme="light"] #new-epg-search-box button[onclick*="filterEpgByCategory"],
[data-theme="light"] #edit-epg-search-box button[onclick*="filterEpgByCategory"],
[data-theme="light"] .card-body button[onclick*="setFilterCategory"] {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .epg-cat-filter-btn:hover,
[data-theme="light"] #new-epg-search-box button[onclick*="filterEpgByCategory"]:hover,
[data-theme="light"] #edit-epg-search-box button[onclick*="filterEpgByCategory"]:hover,
[data-theme="light"] .card-body button[onclick*="setFilterCategory"]:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Botão da Categoria Selecionada */
[data-theme="light"] .epg-cat-filter-btn.active,
[data-theme="light"] #new-epg-search-box button[style*="background: rgba(16, 185, 129"],
[data-theme="light"] #new-epg-search-box button[style*="background:rgba(16,185,129"],
[data-theme="light"] #edit-epg-search-box button[style*="background: rgba(16, 185, 129"],
[data-theme="light"] #edit-epg-search-box button[style*="background:rgba(16,185,129"],
[data-theme="light"] .card-body button[style*="background:rgba(16,185,129"],
[data-theme="light"] .card-body button[style*="background: rgba(16, 185, 129"] {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  font-weight: 800 !important;
}

/* Botão "Usar este ID" / Custom ID */
[data-theme="light"] .epg-btn-use-id,
[data-theme="light"] button[onclick*="useQueryAsEpgId"] {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
}

/* Label de resultados do EPG */
[data-theme="light"] .epg-counter-label,
[data-theme="light"] #new-epg-results > div:first-child,
[data-theme="light"] #edit-epg-results > div:first-child,
[data-theme="light"] #epg-mgr-results-grid > div:first-child {
  color: #047857 !important;
  font-weight: 800 !important;
}

/* Itens da lista de busca de EPG (.epg-search-item) */
[data-theme="light"] .epg-search-item {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}

[data-theme="light"] .epg-search-item:hover {
  background: #ecfdf5 !important;
  border-color: #34d399 !important;
}

[data-theme="light"] .epg-search-item div {
  color: #0f172a !important;
}

[data-theme="light"] .epg-search-item div[style*="color: #ffffff"],
[data-theme="light"] .epg-search-item div[style*="color:#ffffff"] {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .epg-search-item div[style*="color: #94a3b8"],
[data-theme="light"] .epg-search-item div[style*="color:#94a3b8"] {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* Botão "Vincular" dentro da lista do modal */
[data-theme="light"] .epg-search-item button,
[data-theme="light"] .epg-btn-bind {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #0284c7 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .epg-search-item button:hover,
[data-theme="light"] .epg-btn-bind:hover {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
}

/* Badge ID monospaced */
[data-theme="light"] .epg-search-item span[style*="font-family: monospace"],
[data-theme="light"] .epg-card-item .epg-card-id-val {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
  font-weight: 800 !important;
}

/* Página Catálogo EPG (EpgManagerModule) no Tema Claro */
[data-theme="light"] .epg-mgr-search-card,
[data-theme="light"] #epg-tab-content .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .epg-mgr-placeholder-card,
[data-theme="light"] #epg-mgr-results-grid > div[style*="border:1.5px dashed"],
[data-theme="light"] #epg-mgr-results-grid > div[style*="border: 1.5px dashed"] {
  background: #ffffff !important;
  border: 2px dashed #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .epg-mgr-placeholder-card h3,
[data-theme="light"] #epg-mgr-results-grid h3 {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .epg-mgr-placeholder-card p,
[data-theme="light"] #epg-mgr-results-grid p {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .epg-quick-search-btn,
[data-theme="light"] button[onclick*="quickSearch"] {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border: 1.5px solid #bae6fd !important;
  font-weight: 800 !important;
}

[data-theme="light"] .epg-quick-search-btn:hover,
[data-theme="light"] button[onclick*="quickSearch"]:hover {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #38bdf8 !important;
}

/* Cards de Resultado no Grid do Catálogo EPG */
[data-theme="light"] .epg-card-item,
[data-theme="light"] #epg-mgr-results-grid .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] #epg-mgr-results-grid .card div[style*="color:#fff"],
[data-theme="light"] #epg-mgr-results-grid .card div[style*="color: #fff"] {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] #epg-mgr-results-grid .card div[style*="color:#94a3b8"],
[data-theme="light"] #epg-mgr-results-grid .card div[style*="color: #94a3b8"] {
  color: #475569 !important;
}

[data-theme="light"] #epg-mgr-results-grid .card div[style*="background:rgba(0,0,0,0.3)"],
[data-theme="light"] #epg-mgr-results-grid .card div[style*="background: rgba(0,0,0,0.3)"] {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] #epg-mgr-results-grid .card div[style*="color:#64748b"],
[data-theme="light"] #epg-mgr-results-grid .card div[style*="color: #64748b"] {
  color: #475569 !important;
  font-weight: 600 !important;
}

[data-theme="light"] #epg-mgr-results-grid .card button {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* Modais de Vinculação de Canais do Painel */
[data-theme="light"] .bind-channel-item,
[data-theme="light"] #bind-channels-list-container > div {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .bind-channel-item:hover,
[data-theme="light"] #bind-channels-list-container > div:hover {
  background: #ecfdf5 !important;
  border-color: #86efac !important;
}

[data-theme="light"] #bind-channels-list-container div[style*="color: #fff"],
[data-theme="light"] #bind-channels-list-container div[style*="color:#fff"] {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] #bind-channels-list-container div[style*="color: #94a3b8"],
[data-theme="light"] #bind-channels-list-container div[style*="color:#94a3b8"] {
  color: #475569 !important;
}
/* Botão de Filtro de Canais Offline (Alto Contraste) */
.btn-filter-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 800 !important;
  font-size: 0.8rem;
  background: #fee2e2 !important;
  border: 1.5px solid #ef4444 !important;
  color: #991b1b !important;
}

[data-theme="dark"] .btn-filter-offline {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1.5px solid #ef4444 !important;
  color: #fca5a5 !important;
}

.btn-filter-offline:hover {
  background: #fecaca !important;
  color: #7f1d1d !important;
}

[data-theme="dark"] .btn-filter-offline:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #ffffff !important;
}

.btn-filter-offline.active {
  background: #dc2626 !important;
  border: 1.5px solid #991b1b !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45) !important;
}

.btn-filter-offline .offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  display: inline-block;
  flex-shrink: 0;
}

.btn-filter-offline.active .offline-dot {
  background: #ffffff !important;
  box-shadow: 0 0 6px #ffffff !important;
}
