/* ===== SISTEMA DE TEMAS - VARIÁVEIS CSS ===== */

/* Tema Claro (padrão) */
:root {
  /* Cores de fundo */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  --bg-topbar: #ffffff;
  --bg-hover: rgba(59, 130, 246, 0.08);
  --bg-active: rgba(59, 130, 246, 0.15);

  /* Cores de texto */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-muted: #cbd5e1;
  --text-inverse: #ffffff;

  /* Bordas */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;

  /* Cores de destaque */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-success: #10b981;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

  /* Scrollbar */
  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;

  /* Cards Dashboard - Tema Claro */
  --dashboard-hero-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --dashboard-card-bg: #ffffff;
  --dashboard-card-border: #e2e8f0;
  --dashboard-text: #1e293b;
  --dashboard-text-muted: #64748b;
  --dashboard-stat-card-bg: rgba(255, 255, 255, 0.9);
  --dashboard-stat-card-border: #e2e8f0;

  /* Tables */
  --table-header-bg: #f8fafc;
  --table-row-hover: #f8fafc;
}

/* Tema Escuro */
[data-theme="dark"] {
  /* Cores de fundo */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-sidebar: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  --bg-topbar: #1e293b;
  --bg-hover: rgba(59, 130, 246, 0.15);
  --bg-active: rgba(59, 130, 246, 0.25);

  /* Cores de texto */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;
  --text-inverse: #0f172a;

  /* Bordas */
  --border-color: #334155;
  --border-light: #1e293b;
  --border-dark: #475569;

  /* Cores de destaque */
  --accent-primary: #60a5fa;
  --accent-primary-hover: #3b82f6;
  --accent-success: #34d399;
  --accent-danger: #f87171;
  --accent-warning: #fbbf24;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

  /* Scrollbar */
  --scrollbar-track: #1e293b;
  --scrollbar-thumb: #475569;
  --scrollbar-thumb-hover: #64748b;

  /* Cards Dashboard - Tema Escuro */
  --dashboard-hero-bg: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e293b 50%,
    #334155 100%
  );
  --dashboard-card-bg: #1e293b;
  --dashboard-card-border: rgba(255, 255, 255, 0.08);
  --dashboard-text: #f1f5f9;
  --dashboard-text-muted: rgba(255, 255, 255, 0.5);
  --dashboard-stat-card-bg: rgba(255, 255, 255, 0.1);
  --dashboard-stat-card-border: rgba(255, 255, 255, 0.1);

  /* Tables */
  --table-header-bg: rgba(255, 255, 255, 0.05);
  --table-row-hover: rgba(255, 255, 255, 0.03);
}

/* ===== MELHORIAS DE LEGIBILIDADE DARK MODE ===== */

/* Progress Steps */
[data-theme="dark"] .progress-steps .step-title {
  color: #cbd5e0;
  font-weight: 500;
}

[data-theme="dark"] .progress-steps .step.active .step-title {
  color: #f7fafc;
  font-weight: 600;
}

[data-theme="dark"] .progress-steps .step-icon {
  background-color: #4a5568;
  color: #e2e8f0;
}

[data-theme="dark"] .progress-steps .step.active .step-icon {
  background-color: #4299e1;
  color: #ffffff;
}

[data-theme="dark"] .progress {
  background-color: #2d3748;
}

/* Cards */
[data-theme="dark"] .card-modern {
  background-color: #2d3748;
  border-color: #4a5568;
}

[data-theme="dark"] .card-body {
  color: #e2e8f0;
}

[data-theme="dark"] .card-header-modern {
  background-color: #1a202c;
  border-bottom-color: #4a5568;
  color: #f7fafc;
}

/* Page Headers */
[data-theme="dark"] .page-title {
  color: #f7fafc !important;
}

[data-theme="dark"] .page-subtitle {
  color: #cbd5e0 !important;
}

/* Alerts */
[data-theme="dark"] .alert-danger {
  background-color: #742a2a;
  border-color: #9b2c2c;
  color: #feb2b2;
}

[data-theme="dark"] .alert-info {
  background-color: #2c5282;
  border-color: #2b6cb0;
  color: #bee3f8;
}

[data-theme="dark"] .alert-success {
  background-color: #22543d;
  border-color: #276749;
  color: #9ae6b4;
}

/* Form Labels e Inputs */
[data-theme="dark"] label,
[data-theme="dark"] .form-label {
  color: #f7fafc !important;
  font-weight: 500;
}

[data-theme="dark"] .form-text {
  color: #cbd5e0 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #2d3748;
  border-color: #4a5568;
  color: #f7fafc;
}

[data-theme="dark"] .form-control::placeholder {
  color: #718096;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #2d3748;
  border-color: #4299e1;
  color: #f7fafc;
  box-shadow: 0 0 0 0.2rem rgba(66, 153, 225, 0.25);
}

[data-theme="dark"] textarea.form-control {
  background-color: #2d3748;
  border-color: #4a5568;
  color: #f7fafc;
}

/* Buttons */
[data-theme="dark"] .btn-outline-secondary {
  color: #cbd5e0;
  border-color: #4a5568;
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: #4a5568;
  border-color: #4a5568;
  color: #f7fafc;
}

[data-theme="dark"] .btn-primary {
  background-color: #4299e1;
  border-color: #4299e1;
  color: #ffffff;
}

[data-theme="dark"] .btn-primary:hover {
  background-color: #3182ce;
  border-color: #3182ce;
}

/* Badges Dark Mode - Bootstrap Override */
[data-theme="dark"] .badge {
  color: #ffffff;
}

[data-theme="dark"] .badge.bg-secondary {
  background-color: #475569 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .badge.bg-light {
  background-color: #475569 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .badge.bg-dark {
  background-color: #334155 !important;
  color: #f1f5f9 !important;
}

/* Tables Dark Mode - Bootstrap Override */
[data-theme="dark"] .table {
  color: #e2e8f0;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
  --bs-table-border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .table > thead {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .table > thead > tr > th {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .table > tbody > tr > td {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table > tbody > tr {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table-dark {
  --bs-table-bg: rgba(255, 255, 255, 0.08);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.1);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .table-dark > thead > tr > th {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .table-primary {
  --bs-table-bg: rgba(59, 130, 246, 0.15);
  --bs-table-striped-bg: rgba(59, 130, 246, 0.18);
  --bs-table-hover-bg: rgba(59, 130, 246, 0.2);
  color: #e2e8f0;
}

[data-theme="dark"] .table-warning {
  --bs-table-bg: rgba(245, 158, 11, 0.15);
  --bs-table-striped-bg: rgba(245, 158, 11, 0.18);
  --bs-table-hover-bg: rgba(245, 158, 11, 0.2);
  color: #e2e8f0;
}

/* Text Muted Dark Mode */
[data-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

/* Small Text Dark Mode */
[data-theme="dark"] small {
  color: #cbd5e1;
}

[data-theme="dark"] small.text-muted {
  color: #94a3b8 !important;
}

/* Strong Text Dark Mode */
[data-theme="dark"] strong {
  color: #f1f5f9;
}

/* Border Dark Mode */
[data-theme="dark"] .border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .rounded {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Card Header Dark Mode */
[data-theme="dark"] .card-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

/* Badge de Nível/Ranque - Padronizado */
.level-badge-large,
.level-badge-small {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 8px #000, 0 1px 0 #222;
  overflow: hidden;
}
.level-badge-large {
  width: 128px;
  height: 128px;
  font-size: 3.5rem;
  margin: 0 auto;
}
.level-badge-small {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}
.level-badge-large span,
.level-badge-small span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  pointer-events: none;
}
/* Reset e Estilos Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Player Ranking Badge */
.badge-lg {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

.player-ranking-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  border-radius: 0.375rem;
}

/* ===== SIDEBAR RESPONSIVO ===== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 12px;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2.5px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: var(--bg-sidebar);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
}

.sidebar-logo {
  height: 36px;
  width: 200px;
  max-width: 200px;
  object-fit: contain;
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.sidebar-close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: rotate(90deg);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
}

/* Nav Sections */
.nav-section {
  padding: 0.5rem 0;
}

.nav-section:not(:last-child) {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.nav-section-label {
  display: block;
  padding: 0.75rem 1.5rem 0.5rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Nav Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.5rem;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  margin: 0.125rem 0.75rem;
  border-radius: 10px;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #e2e8f0;
}

.nav-item.active {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(59, 130, 246, 0.08)
  );
  color: #3b82f6;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #3b82f6;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-item:hover .nav-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.nav-item.active .nav-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.nav-text {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Sidebar Footer - User Card */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(148, 163, 184, 0.05);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.user-card:hover {
  background: rgba(148, 163, 184, 0.1);
}

.user-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(59, 130, 246, 0.3);
}

.user-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.steam-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  background: #171a21;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: white;
  border: 2px solid #0f172a;
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-name {
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: fit-content;
}

.user-role-badge.admin {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.user-role-badge.mod {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.logout-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transform: scale(1.05);
}

/* Legacy nav-link support */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: none;
}

.nav-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-right: 3px solid #3b82f6;
}

.nav-link i {
  width: 20px;
  font-size: 1rem;
}

.nav-section-title {
  padding: 1rem 1.5rem 0.5rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid #334155;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-section-title:first-of-type {
  border-top: none;
  margin-top: 1rem;
}

/* Avatar Inicial */
.avatar-initial {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Main Content */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background: var(--bg-primary);
  transition: all 0.3s ease;
}

.topbar {
  background: var(--bg-primary);
  padding: 0.56rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  min-height: 76px;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-left: 1px solid rgba(148, 163, 184, 0.1);
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

/* Cards Modernos */
.card-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card-modern:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-header-modern {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  color: var(--text-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border-left: 4px solid;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.primary {
  border-left-color: #3b82f6;
}

.stat-card.success {
  border-left-color: #10b981;
}

.stat-card.danger {
  border-left-color: #ef4444;
}

.stat-card.warning {
  border-left-color: #f59e0b;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0.8;
}

/* Tabelas Modernas */
.table-modern {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease;
}

.table-modern thead th {
  background: var(--bg-tertiary);
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.table-modern tbody td {
  padding: 1rem 1.5rem;
  border: none;
  border-top: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-primary);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.table-modern tbody tr:hover {
  background: var(--bg-tertiary);
}

/* Badges Modernos */
.badge-modern {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-live {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  animation: pulse-live 2s infinite;
}

/* Botões Modernos */
.btn-modern {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  color: white;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Formulários Modernos */
.form-modern {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Animações */
@keyframes pulse-live {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease;
}

/* Responsividade */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    padding-left: 4.5rem;
    min-height: auto;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .topbar {
    padding: 1rem;
    padding-left: 4.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: auto;
  }

  .topbar > div:last-child {
    align-self: flex-end;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .page-subtitle {
    font-size: 0.875rem;
  }

  .content-wrapper {
    padding: 1rem;
  }

  /* Mobile sidebar improvements */
  .sidebar {
    width: 280px;
  }

  .nav-item {
    padding: 0.875rem 1.25rem;
  }

  .nav-icon {
    width: 40px;
    height: 40px;
  }

  .user-card {
    padding: 0.875rem;
  }

  .user-avatar,
  .user-avatar-placeholder {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .mobile-menu-toggle {
    top: 0.75rem;
    left: 0.75rem;
    width: 40px;
    height: 40px;
  }

  .hamburger-line {
    width: 18px;
    height: 2px;
  }

  .topbar {
    padding-left: 4rem;
  }

  .sidebar {
    width: 100%;
    max-width: 300px;
  }
}

/* Login Page */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #6b7280;
}

/* Login Divider */
.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.login-divider span {
  padding: 0 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Steam Login Button */
.btn-steam {
  background: linear-gradient(135deg, #171a21 0%, #1b2838 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-steam:hover {
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 26, 33, 0.4);
}

.btn-steam:active {
  transform: translateY(0);
}

.btn-steam svg {
  width: 24px;
  height: 24px;
}

/* User Avatar */
.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b82f6;
}

/* Avatar Level Badge */
.avatar-badge {
  width: 24px !important;
  height: 24px !important;
  font-size: 0.6rem !important;
  position: absolute;
  bottom: -4px;
  right: -4px;
  border-radius: 6px;
}

.avatar-badge span {
  font-size: 0.55rem;
}

.user-avatar-sm {
  width: 24px;
  height: 24px;
}

.user-avatar-lg {
  width: 48px;
  height: 48px;
}

/* Utilitários */
.text-primary {
  color: #3b82f6 !important;
}
.text-secondary {
  color: #6b7280 !important;
}
.text-success {
  color: #10b981 !important;
}
.text-danger {
  color: #ef4444 !important;
}
.text-warning {
  color: #f59e0b !important;
}

.bg-primary {
  background: #3b82f6 !important;
}
.bg-secondary {
  background: #6b7280 !important;
}
.bg-success {
  background: #10b981 !important;
}
.bg-danger {
  background: #ef4444 !important;
}
.bg-warning {
  background: #f59e0b !important;
}

.content-wrapper {
  padding: 2rem;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* ===== BOTÃO DE ALTERNÂNCIA DE TEMA ===== */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn .theme-icon-light,
.theme-toggle-btn .theme-icon-dark {
  position: absolute;
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* Tema claro: mostrar ícone da lua (para alternar para escuro) */
.theme-toggle-btn .theme-icon-light {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
  color: #f59e0b;
}

.theme-toggle-btn .theme-icon-dark {
  opacity: 1;
  transform: rotate(0) scale(1);
  color: #6366f1;
}

/* Tema escuro: mostrar ícone do sol (para alternar para claro) */
[data-theme="dark"] .theme-toggle-btn .theme-icon-light {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle-btn .theme-icon-dark {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

/* Language Selector */
.language-selector {
  position: relative;
}

.language-selector .btn {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.language-selector .btn:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.language-selector .btn:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.language-selector .dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  min-width: 180px;
  background: var(--bg-card);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.language-selector .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.language-selector .dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.language-selector .dropdown-item.active {
  background: var(--bg-active);
  color: var(--accent-primary);
  font-weight: 500;
}

.language-selector .dropdown-item img {
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

/* ===== SISTEMA DE SÉRIES ===== */

/* Progress Steps */
.progress-steps {
  text-align: center;
}

.progress-steps .d-flex {
  position: relative;
}

.progress-steps .step {
  flex: 1;
  position: relative;
}

.progress-steps .step::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 100%;
  height: 2px;
  background: #e9ecef;
  z-index: 1;
  transform: translateY(-50%);
}

.progress-steps .step:last-child::before {
  display: none;
}

.progress-steps .step.active::before {
  background: #007bff;
}

.progress-steps .step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.progress-steps .step.active .step-icon {
  background: #007bff;
  color: white;
}

.progress-steps .step-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6c757d;
}

.progress-steps .step.active .step-title {
  color: #007bff;
}

/* Team Cards */
.team-matchup {
  padding: 20px 0;
  text-align: center;
}

.team-matchup .team1-name,
.team-matchup .team2-name {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  margin: 0 10px;
}

.team-matchup .team1-name {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.team-matchup .team2-name {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.team-matchup .vs {
  font-size: 1.1rem;
  font-weight: 700;
  color: #6c757d;
  margin: 0 15px;
}

/* Badge Styles */
.badge-lg {
  font-size: 0.9rem;
  padding: 8px 12px;
}

.badge-info {
  background-color: #17a2b8 !important;
  color: white;
}

.badge-warning {
  background-color: #ffc107 !important;
  color: #212529;
}

.badge-success {
  background-color: #28a745 !important;
  color: white;
}

.badge-danger {
  background-color: #dc3545 !important;
  color: white;
}

.badge-secondary {
  background-color: #6c757d !important;
  color: white;
}

/* SteamID Input Enhancement */
.steamid-input.is-valid {
  border-color: #28a745;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.8-.8-.8-.8 1.4-1.4L7 7.3l1.4-1.4-1.4-1.4-.8-.8.8-.8-.8-.8L3 4.3l-1.4 1.4 1.4 1.4z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Maps Display */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.map-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.map-card:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

.map-card.banned {
  background: #f8f9fa;
  border-color: #dc3545;
  opacity: 0.6;
}

.map-card.picked {
  background: #d4edda;
  border-color: #28a745;
}

.map-card .map-image {
  height: 80px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 6px;
}

.map-card .map-image img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
}

.map-card .map-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.map-card .map-status {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: #e9ecef;
  color: #6c757d;
  display: inline-block;
}

.map-card .map-status.banned {
  background: #f5c6cb;
  color: #721c24;
}

.map-card .map-status.picked {
  background: #d1ecf1;
  color: #0c5460;
}

/* Series Status */
.series-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.scheduled {
  background: #ffc107;
  animation: pulse 2s infinite;
}

.status-indicator.live {
  background: #28a745;
  animation: pulse 1s infinite;
}

.status-indicator.completed {
  background: #6c757d;
}

.status-indicator.cancelled {
  background: #dc3545;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 10px transparent;
    opacity: 0.5;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    opacity: 1;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .progress-steps .step-title {
    display: none;
  }

  .team-matchup .team1-name,
  .team-matchup .team2-name {
    font-size: 1rem;
    margin: 5px 0;
    display: block;
  }

  .maps-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }
}
