:root {
  --primary: #5c2e91;
  --primary-rgb: 92, 46, 145;
  --accent-color: var(--primary);
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Poppins", sans-serif;

  --color-error: #e57373;
  --color-warn: #ffb74d;
  --color-info: #64b5f6;
  --color-success: #81c784;
  --color-pending: #9575cd;
  --color-paid: #26a69a;

  --bg-canvas: #ffffff;
  --bg-surface: #f8f9fa;
  --text-heading: #18181b;
  --text-body: #52525b;
  --text-muted: #71717a;
  --border-color: #e4e4e7;
  --primary-light-theme: #f4effa;
  --text-heading-rgb: 24, 24, 27;

  --syntax-key: #d73a49;
  --syntax-string: #032f62;
  --syntax-number: #005cc5;
  --syntax-boolean: #e36209;
  --syntax-null: #6f42c1;

  --color-error-rgb: 229, 115, 115;
  --color-warn-rgb: 255, 183, 77;
  --color-info-rgb: 100, 181, 246;
  --color-success-rgb: 129, 199, 132;

  --shield-size: 250px;
  --path-color: var(--border-color);
  --path-glow-color: rgba(var(--primary-rgb), 0.8);
  --success-glow-color: rgba(var(--color-success-rgb), 0.8);
  --fail-glow-color: rgba(var(--color-error-rgb), 0.8);
}

body.dark-theme {
  --bg-canvas: #0d1117;
  --bg-surface: #161b22;
  --text-heading: #f0f6fc;
  --text-body: #c9d1d9;
  --text-muted: #8b949e;
  --border-color: #30363d;
  --text-heading-rgb: 240, 246, 252;

  --syntax-key: #ff7b72;
  --syntax-string: #a5d6ff;
  --syntax-number: #79c0ff;
  --syntax-boolean: #ffab70;
  --syntax-null: #d2a8ff;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-body);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.body-404 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-heading);
  transition: color 0.3s ease;
}

.action-btn,
.discord-btn,
.login-button,
.feature-card,
.stat-card {
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.action-btn:hover,
.discord-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

.topbar {
  background: rgba(var(--bg-canvas-rgb, 255, 255, 255), 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: all 0.3s ease;
}

.dark-theme .topbar {
  background: rgba(13, 17, 23, 0.8);
}

.topbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom-color: transparent;
}

.dark-theme .topbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.topbar-logo {
  height: 38px;
}

.topbar-nav {
  gap: 0.5rem;
  align-items: center;
}

/* Base para botões de navegação */
.topbar-button {
  position: relative;
  padding: 0.75rem 1rem;
  background-color: transparent; /* Certifica que o fundo é transparente */
  color: var(--text-body);
  text-decoration: none; /* Remove sublinhado padrão */
  display: flex; /* Para alinhar ícone e texto */
  align-items: center;
}

.topbar-button:hover {
  color: var(--text-heading);
}

/* Efeito de linha inferior para botões de navegação */
.topbar-button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.topbar-button.active::after,
.topbar-button:hover::after {
  width: 60%;
}

/* Remover a seta padrão do Bootstrap */
.topbar-nav .dropdown-toggle::after {
  content: none;
}

/* Estilo do Botão de Login/Perfil */
.login-button {
  display: flex; /* Garante alinhamento flexível para avatar, texto e chevron */
  align-items: center;
  padding: 0.5rem 1rem; /* Ajusta o padding para o botão de login */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-surface); /* Fundo padrão do botão de login */
  color: var(--text-heading);
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Estilo para quando o usuário está logado */
.login-button.logged-in {
  background-color: var(
    --bg-surface
  ); /* Certifica-se que o fundo é o do surface */
  border-color: var(--border-color);
}

/* Remove a seta padrão do Bootstrap de todos os botões dropdown */
.dropdown-toggle::after {
  display: none;
}

.login-button.logged-in:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
}

.login-button #login_button {
  margin-left: 0.5rem; /* Espaço entre avatar e texto */
  margin-right: 0.5rem; /* Espaço entre texto e chevron */
}

.user-avatar {
  width: 28px; /* Levemente maior */
  height: 28px;
  border-radius: 6px;
  object-fit: cover; /* Garante que a imagem preencha o espaço sem distorcer */
}

/* Ícone de chevron do login */
#login-chevron {
  transition: transform 0.2s ease-in-out;
  color: var(--text-muted); /* Cor mais discreta */
}

.dropdown.active #login-chevron {
  transform: rotate(180deg);
  color: var(--primary); /* Cor primária quando ativo */
}

/* --- TemaSwitcher (Estilo Interruptor) --- */
.theme-switch {
  display: flex;
  align-items: center;
  justify-content: space-around; /* Espaça os ícones internos */
  width: 60px;
  height: 30px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50px; /* Formato de pílula */
  padding: 4px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease;
  margin-right: 15px; /* Espaçamento ajustado */
}
.theme-switch:hover {
  border-color: var(--primary);
}

/* Ícones de Sol e Lua */
.theme-switch i {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

/* O seletor que desliza */
.theme-switch-toggle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  /* A mágica da animação de deslize */
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Os ícones DENTRO do seletor que desliza */
.theme-switch-toggle i {
  position: absolute;
  color: #fff;
  font-size: 0.7rem;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

/* --- Lógica de Troca de Tema --- */

/* Estado Padrão (Tema Claro) */
.theme-switch-toggle .theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg);
}
.theme-switch-toggle .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Estado do Tema Escuro */
.dark-theme .theme-switch-toggle {
  transform: translateX(28px); /* Desliza para a direita */
}
.dark-theme .theme-switch-toggle .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}
.dark-theme .theme-switch-toggle .theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg);
}
.dark-theme .theme-switch .fa-moon {
  color: var(--text-muted); /* Mantém a lua apagada */
}

/* Dropdown Comum (base) */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  z-index: 1001;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown.active .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  color: var(--text-body);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  color: var(--primary);
  background-color: var(--primary-light-theme);
}

.dark-theme .dropdown-item:hover {
  color: var(--text-heading);
  background-color: rgba(var(--primary-rgb), 0.1);
}

/* Ícone de Chevron nos Dropdowns de Navegação */
.dropdown-toggle .fa-chevron-down {
  transition: transform 0.2s ease-in-out;
}

.dropdown.active .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

.topbar-nav .dropdown-toggle.topbar-button,
.topbar-nav .dropdown-toggle.topbar-button:focus,
.topbar-nav .dropdown-toggle.topbar-button:active,
.dropdown.active > .dropdown-toggle.topbar-button {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Mega-Menu específico */
.mega-menu {
  display: none;
  width: 450px;
  padding: 1.5rem;
  gap: 1.5rem;
  background-image: radial-gradient(
    circle at 0% 0%,
    rgba(var(--primary-rgb), 0.05) 0%,
    transparent 40%
  );
}

.dark-theme .mega-menu {
  background-image: radial-gradient(
    circle at 0% 0%,
    rgba(var(--primary-rgb), 0.15) 0%,
    transparent 50%
  );
}

.dropdown.active .mega-menu {
  display: flex;
}

.mega-menu-column {
  flex: 1;
}

.mega-menu-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.mega-menu .dropdown-item {
  padding: 0.5rem 0.75rem;
}

.mega-menu .dropdown-item:hover {
  background-color: rgba(var(--primary-rgb), 0.08);
}

.dark-theme .mega-menu .dropdown-item:hover {
  background-color: rgba(var(--primary-rgb), 0.2);
}

.hero-section {
  padding-bottom: 60px;
  margin-top: 60px;
}

.hero-stats-container {
  position: relative;
  z-index: 2;
  margin-top: 80px;
}

.hero-section .stat-card {
  background-color: rgba(var(--primary-rgb), 0.05);
  border-color: rgba(var(--primary-rgb), 0.1);
  backdrop-filter: blur(5px);
}

.dark-theme .hero-section .stat-card {
  background-color: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.2);
}

/* --- Seção: Aurora Background Containers --- */
.aurora-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  opacity: 1; /* O container fica sempre visível */
}

.aurora-background.active {
  opacity: 1;
  visibility: visible;
}

/* --- Estilo Base para as Partículas da Logo --- */
.aurora-particle {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0; /* Começa 100% invisível */
  will-change: transform, opacity;
  pointer-events: none;
  object-fit: contain;
  transition: opacity 2.5s ease-in-out;
}
/* Efeito visual para o "dash" */
.aurora-particle.is-dashing {
  transition: transform 0.3s cubic-bezier(0.5, 0, 0.5, 1), opacity 0.3s ease; /* Transição mais rápida durante o dash */
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  font-weight: 900;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-body);
  margin: 1.5rem auto 2.5rem;
  max-width: 900px;
}

.action-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.2);
}

.action-btn:hover {
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.3);
}

.stats-section {
  padding: 80px 0;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem 1rem;
  text-align: center;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--accent-color);
}

.dark-theme .stat-number {
  color: var(--text-heading);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: -6px;
}

.features-section {
  padding: 80px 0;
  background-color: var(--bg-light);
}

.section-title {
  font-size: 2rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-body);
  max-width: 900px;
  margin: 0.5rem auto 0;
}

.feature-card {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--primary-rgb), 0.7);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.feature-icon {
  font-size: 1.75rem;
  color: var(--accent-color);
  width: 60px;
  height: 60px;
  background-color: var(--primary-light-theme);
  border-radius: 12px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.feature-text {
  font-size: 0.9rem;
}

.dark-theme .feature-icon {
  background-color: rgba(var(--primary-rgb), 0.1);
}

/* --- Seção: Portfólio (Mosaico) --- */
.portfolio-section {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.portfolio-mosaic {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 1.5rem;
  perspective: 1500px;
}

.mosaic-item-wrapper {
  grid-column: span 1;
  grid-row: span 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.mosaic-item-wrapper.wide {
  grid-column: span 2;
}
.mosaic-item-wrapper.tall {
  grid-row: span 2;
}

.mosaic-item {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background-color: var(--bg-surface-alt);
  transform-style: preserve-3d;
  transition: box-shadow 0.4s ease, transform 0.2s ease;
  display: block;
  backface-visibility: hidden;
}

.dark-theme .mosaic-item {
  border: 1px solid rgba(var(--border-rgb), 0.3);
}

.mosaic-item:hover {
  box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.4);
  z-index: 10;
}
.dark-theme .mosaic-item:hover {
  box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.6);
}

.mosaic-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
  opacity: 0.8;
  border-radius: 16px;
}
.mosaic-item:hover .mosaic-bg {
  opacity: 0.85;
}

.mosaic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 24, 27, 0.98) 0%,
    rgba(24, 24, 27, 0.75) 20%,
    transparent 95%
  );
  opacity: 1;
  z-index: 1;
  border-radius: 16px;
}
.dark-theme .mosaic-overlay {
  background: linear-gradient(
    to top,
    rgba(24, 24, 27, 0.98) 0%,
    rgba(24, 24, 27, 0.75) 20%,
    transparent 95%
  );
}

.mosaic-content {
  position: relative;
  z-index: 3;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mosaic-item:hover .mosaic-content {
  transform: translateY(-40px);
}

.content-top {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.partner-badge {
  align-self: flex-start;
  margin-bottom: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.partner-name {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.partner-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #fff;
  margin-top: -6px;
  max-width: 60%;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background-color: rgba(var(--text-heading-rgb), 0.2);
}

.stat-pill i {
  color: #fff;
  font-size: 1rem;
}

.stat-pill span {
  font-weight: 700;
}

.visit-prompt {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  text-align: center;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 4;
  border-radius: 0 0 16px 16px;
}

.mosaic-item:hover .visit-prompt {
  opacity: 1;
  transform: translateY(0);
}

.visit-prompt.disabled {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.portfolio-mosaic {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 1.5rem;
  perspective: 1500px;
}

@media (max-width: 991px) {
  .portfolio-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 320px;
  }
  .mosaic-item-wrapper.wide,
  .mosaic-item-wrapper.tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .mosaic-item-wrapper.tall.wide {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 767px) {
  .portfolio-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: 350px;
  }
  .mosaic-item-wrapper.wide,
  .mosaic-item-wrapper.tall,
  .mosaic-item-wrapper.tall.wide {
    grid-column: span 1;
    grid-row: span 1;
  }
  .mosaic-item:hover .mosaic-content {
    transform: translateY(-30px);
  }
}

/* --- Seção: Carrossel de Projetos Menores --- */
.minor-projects-container {
  margin-top: 100px;
  text-align: center;
}
.minor-projects-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2.5rem;
}
.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}
.carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  flex-wrap: nowrap;
  animation: scroll 40s linear infinite;
}
.carousel-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 400px;
  flex-shrink: 0;
}
.carousel-icon {
  font-size: 1.5rem;
  color: var(--primary);
  background-color: var(--primary-light-theme);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dark-theme .carousel-icon {
  background-color: rgba(var(--primary-rgb), 0.15);
}
.carousel-text {
  text-align: left;
  line-height: 1.3;
}
.carousel-text strong {
  color: var(--text-heading);
  font-weight: 600;
  display: block;
}
.carousel-text span {
  font-size: 0.9rem;
  color: var(--text-muted);
}
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.final-cta-section {
  padding: 80px 0;
}

.cta-box {
  background-color: var(--bg-surface);
  padding: 4rem;
  text-align: center;
  border-radius: 24px;
}

.cta-title {
  font-size: 2.25rem;
  color: var(--text-heading);
}

.cta-subtitle {
  color: var(--text-body);
  margin: 1rem auto 2rem;
  max-width: 900px;
}

.dark-theme .cta-box {
  background-color: var(--bg-surface);
}

.site-footer {
  background-color: var(--background-darker-alt);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: left;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-column:nth-child(2) {
  margin-left: auto;
}

.footer-column.about {
  max-width: 280px;
  flex-shrink: 0;
  text-align: left;
}

.footer-column.about .footer-logo {
  height: 35px;
  max-width: 150px;
  filter: brightness(1.2);
}

.footer-column .footer-text {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin-left: 10px;
  margin-right: 10px;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links .footer-link-item {
  display: flex;
  align-items: center;
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0;
}

.footer-links .footer-link-item:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-links .footer-link-item i {
  color: var(--primary-light);
  font-size: 1rem;
  transition: color 0.2s ease;
}

.footer-links .footer-link-item:hover i {
  color: var(--primary);
}

.footer-links .footer-link-legal {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  display: block;
}

.footer-links .footer-link-legal:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.footer-socials a {
  color: var(--text-muted);
  font-size: 1.6rem;
  transition: color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-socials a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.footer-socials a i {
  text-decoration: none;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom-bar .footer-text a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom-bar .footer-text a:hover {
  color: var(--primary);
}

body.dark-theme {
  --background-darker-alt: #0e0e1a;
}
body.light-theme {
  --background-darker-alt: #f0f2f5;
}

@media (max-width: 991.98px) {
  .footer-grid {
    flex-direction: column;
    text-align: center;
  }

  .footer-column.about {
    text-align: center;
    max-width: 100%;
  }

  .footer-column:nth-child(2) {
    margin-left: 0;
  }

  .footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-socials,
  .footer-links .footer-link-item {
    justify-content: center;
  }

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 992px) {
  .footer-links .footer-link-legal {
    text-align: left;
  }
}

.hamburger-menu,
.close-menu {
  background: none;
  border: none;
  color: var(--text-heading);
  font-size: 1.5rem;
  margin-left: 1rem;
}

/* --- Estilos para o Menu Mobile --- */

.mobile-menu-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1.5rem 1rem 0.5rem; /* Mais espaço acima do título */
  margin: 0;
  border-bottom: 1px solid var(--border-color); /* Linha separadora */
  margin-bottom: 0.5rem;
}

/* Garante que o primeiro título não tenha espaço extra em cima */
.mobile-menu-content > .mobile-menu-category:first-of-type {
  padding-top: 0;
}

/* Itens de link dentro de uma categoria */
.mobile-menu-item {
  padding-left: 2rem !important; /* Adiciona uma indentação clara */
}

/* Estilo para links diretos (que não estão em categorias) */
.mobile-menu-content > .topbar-button {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

/* O container principal do menu que desliza da direita */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%; /* Começa fora da tela */
  width: 100%;
  max-width: 320px; /* Largura máxima para não ocupar a tela toda em tablets */
  height: 100%;
  background-color: var(--bg-canvas);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 1040;
  padding: 4rem 1.5rem 2rem;
  transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
}

.dark-theme .mobile-menu {
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

/* O estado "aberto" do menu */
.mobile-menu.open {
  right: 0; /* Desliza para dentro da tela */
}

/* Impede o scroll da página principal quando o menu está aberto */
body.mobile-menu-open {
  overflow: hidden;
}

/* Botão de fechar (X) */
.close-menu {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-heading);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Container do conteúdo do menu */
.mobile-menu-content {
  overflow-y: auto; /* Permite scroll se o menu for muito grande */
  flex-grow: 1;
}

/* Garante que o <nav> clonado se organize verticalmente no menu mobile */
.mobile-menu .topbar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Adiciona um pequeno espaço entre os botões principais */
}

/* Adaptação dos botões da barra de navegação para o layout vertical */
.mobile-menu .topbar-button {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 500;
}

.mobile-menu .topbar-button.active {
  background-color: var(--primary-light-theme);
  color: var(--primary);
}

.dark-theme .mobile-menu .topbar-button.active {
  background-color: rgba(var(--primary-rgb), 0.1);
}

/* Adaptação dos dropdowns para o mobile */
.mobile-menu .dropdown {
  width: 100%;
}

.mobile-menu .dropdown-toggle::after {
  content: none; /* Remove a seta padrão do Bootstrap se houver */
}

/* O menu do dropdown não será mais flutuante, mas sim um bloco expansível */
.mobile-menu .dropdown-menu {
  position: static;
  display: none; /* Começa fechado */
  background: transparent;
  border: none;
  box-shadow: none;
  width: 100%;
  padding-left: 1.5rem; /* Indentação para os sub-itens */
  margin-top: 0.5rem;
  opacity: 1;
  transform: none;
  transition: none;
}

.mobile-menu .dropdown.active > .dropdown-menu {
  display: block; /* Mostra o menu quando o dropdown está ativo */
}

.mobile-menu .dropdown-item {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
}

.mobile-menu .mega-menu {
  display: block;
  width: 100%;
  padding: 0.5rem 0 0 1.5rem;
  background-image: none;
}

.mobile-menu .mega-menu-column {
  margin-bottom: 1rem;
}

.mobile-menu .mega-menu-header {
  font-size: 0.8rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.products-section {
  padding: 80px 0;
}

.product-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.dark-theme .product-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.product-card.popular {
  border: 2px solid var(--primary);
}

.popular-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  background-color: var(--primary);
  color: white;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 2;
}

.product-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.product-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.product-icon.sakura {
  background-color: #ffebee;
  color: #e57373;
}

.product-icon.tsuki {
  background-color: #e3f2fd;
  color: #64b5f6;
}

.product-icon.onny {
  background-color: #ede7f6;
  color: #9575cd;
}

.dark-theme .product-icon.sakura {
  background-color: rgba(229, 115, 115, 0.1);
}

.dark-theme .product-icon.tsuki {
  background-color: rgba(100, 181, 246, 0.1);
}

.dark-theme .product-icon.onny {
  background-color: rgba(149, 117, 205, 0.1);
}

.product-title {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-heading);
}

.product-tier {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-body);
}

.product-features li i {
  color: #28a745;
}

.system-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.system-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-body);
  font-size: 14px;
}

.system-features li i {
  color: #28a745;
}

.product-price {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.price-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
}

.price-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1;
  margin: 0;
}

.price-period {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.purchase-btn {
  border: none;
  border-radius: 10px;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  width: 100%;
}

.sakura-btn {
  background-color: #e57373;
}

.tsuki-btn {
  background-color: #64b5f6;
}

.onny-btn {
  background-color: #9575cd;
}

#alertContainer {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  width: 450px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-popup {
  position: relative;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: var(--text-light);
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  transform: translateX(120%);
  animation: slideIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-popup i {
  font-size: 1.25rem;
}

.alert-popup .close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  font-size: 1.5rem;
  padding: 0 0 0 1rem;
}

.alert-popup .close-btn:hover {
  opacity: 1;
}

.alert-success {
  background-color: #28a745;
}

.alert-error {
  background-color: #dc3545;
}

.alert-warning {
  background-color: #ffc107;
  color: #0d1117;
}

.valorant-hero .game-logo {
  max-height: 80px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.dark-theme .valorant-hero .game-logo {
  filter: none;
}

.command-details-section {
  padding: 80px 0;
  background-color: var(--bg-surface);
}

.command-info .command-path {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  background-color: var(--bg-canvas);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.command-info .command-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.command-info .command-description {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.command-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem 0;
}

.command-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.command-features li i {
  color: var(--primary);
  background-color: var(--primary-light-theme);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dark-theme .command-features li i {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.command-mockup-wrapper {
  perspective: 1500px;
}

.command-mockup {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transform: rotateY(-15deg) rotateX(5deg) scale(1.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease;
}

.command-mockup-wrapper:hover .command-mockup {
  transform: rotateY(0deg) rotateX(0deg) scale(1);
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.mockup-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.mockup-bot-name {
  font-weight: 600;
  color: var(--text-heading);
}

.mockup-bot-tag {
  font-size: 0.7rem;
  background-color: var(--primary);
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.mockup-command-title {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.mockup-username {
  color: var(--text-heading);
  font-weight: 600;
}

.mockup-match-result {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: inline-block;
}

.mockup-match-result.victory {
  color: #28a745;
  background-color: rgba(40, 167, 69, 0.1);
}

.mockup-match-result.defeat {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.mockup-kda {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1;
}

.mockup-kda .kda-ratio {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.mockup-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.mockup-stat-card {
  background-color: var(--bg-surface);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

.mockup-stat-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.mockup-stat-card .value {
  font-size: 1.25rem;
  color: var(--text-heading);
  font-weight: 700;
  display: block;
}

.mockup-teams-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.team-column .team-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  margin-left: 5px;
  margin-right: 5px;
  border-bottom: 1px solid var(--border-color);
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.4rem 0;
}

.player-row.mvp .player-agent {
  font-weight: 700;
  color: var(--text-heading);
}

.player-agent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 10px;
  color: var(--text-body);
}

.player-kda {
  font-size: 0.85rem;
  margin-right: 10px;
  color: var(--text-muted);
}

.mockup-rank-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-surface);
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1.5rem;
}

.mockup-rank-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
}

.mockup-rank-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-heading);
  line-height: 1;
}

.mockup-rank-progress {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.main-404 {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.error-section {
  width: 100%;
  padding: 40px 0;
}

.error-title {
  font-size: 10rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  text-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.1);
}

.error-subtitle {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-heading);
}

.error-description {
  font-size: 1.1rem;
  max-width: 750px;
  margin: 0 auto 2.5rem auto;
  color: var(--text-body);
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-canvas);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 80px;
  height: 80px;
  background-image: url(/pages/assets/onny_compact_logo.png);
  background-size: contain;
  background-repeat: no-repeat;
  animation: floating 2s ease-in-out infinite;
}

/* Estilização da seção do perfil */
.profile-hero-section {
  position: relative; /* Necessário para o posicionamento da sobreposição */
  background-image: url("/pages/assets/onny_banner_simple_purple.png");
  background-size: cover;
  background-position: center;
  overflow: hidden; /* Garante que a sobreposição não vaze */
  border-radius: 1rem; /* Adiciona bordas arredondadas para um visual mais suave */
}

/* Cria a camada de sobreposição (degradê) */
.profile-hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Coloca a sobreposição acima do fundo, mas abaixo do conteúdo */
  transition: background 0.3s ease; /* Animação suave na troca de tema */
}

/* Garante que o conteúdo (avatar, nome, botão) fique na frente da sobreposição */
.profile-hero-section .profile-hero-content,
.profile-hero-section .logout-button {
  position: relative;
  z-index: 2;
}

/* --- ESTILOS DEPENDENTES DO TEMA --- */

/* TEMA CLARO (Padrão) */
.profile-hero-section::before {
  /* Um degradê muito claro, quase branco, para suavizar a imagem de fundo */
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.6)
  );
}

body:not(.dark-theme) .profile-hero-section .profile-info h1,
body:not(.dark-theme) .profile-hero-section .profile-info p {
  /* Cor escura para o texto no tema claro para garantir a legibilidade */
  color: #2a2a40;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5); /* Sombra clara para destacar */
}

/* TEMA ESCURO */
body.dark-theme .profile-hero-section::before {
  /* Um degradê escuro e roxo que combina com a imagem e o tema */
  background: linear-gradient(
    to right,
    rgba(25, 9, 48, 0.7),
    rgba(10, 2, 20, 0.85)
  );
}

body.dark-theme .profile-hero-section .profile-info h1,
body.dark-theme .profile-hero-section .profile-info p {
  /* Cor clara para o texto no tema escuro */
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Sombra escura para destacar */
}

.level-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 3px solid var(--bg-surface);
}

.level-progress-container {
  margin-top: 1.5rem;
}

.level-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-bar-bg {
  height: 8px;
  background-color: var(--bg-canvas);
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 8px;
  transition: width 0.5s ease-out;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.card-icon-header {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.card-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-link {
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.5rem;
  display: inline-block;
  text-decoration: none;
}

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

.main-content-section {
  margin-bottom: 2rem;
}

.content-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  height: 100%;
  padding: 2rem;
  transition: all 0.3s ease;
}

.content-card .card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.content-card .card-icon {
  font-size: 1.25rem;
  color: var(--primary);
  width: 40px;
  height: 40px;
  background-color: var(--primary-light-theme);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dark-theme .content-card .card-icon {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.content-card .card-title {
  font-size: 1.25rem;
  margin: 0;
}

.content-card .card-body {
  padding: 0;
}

.content-card .card-body p {
  margin-bottom: 1rem;
}

.card-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--primary-light-theme);
  color: var(--primary);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 1rem;
  font-weight: 600;
}

body.dark-theme .card-alert {
  background-color: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.2);
}

.btn-add {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  background-color: var(--primary-light-theme);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

body.dark-theme .btn-add {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.btn-add:hover {
  filter: brightness(0.95);
}

.list-group-item {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  border-radius: 12px !important;
}

.list-group-item small {
  display: block;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  background-color: var(--bg-canvas) !important;
  opacity: 0.7;
}

.empty-state i {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h6 {
  font-weight: 600;
  color: var(--text-heading);
}

.form-control,
.form-select {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-canvas);
  color: var(--text-body);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background-color: var(--text-muted);
  filter: brightness(0.8);
  transform: translateY(0);
}

.btn-outline-secondary {
  color: var(--text-muted);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  color: var(--text-heading);
  background-color: var(--bg-surface);
  border-color: var(--text-body);
}

.mission-control-hero {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.stat-showcase-card {
  background-color: rgba(var(--bg-surface-rgb, 248, 249, 250), 0.5);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
}

.dark-theme .stat-showcase-card {
  background-color: rgba(22, 27, 34, 0.5);
}

.stat-showcase-card .stat-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.stat-showcase-card .stat-value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-showcase-card .stat-value.text-danger {
  color: var(--color-error) !important;
}

.stat-showcase-card .stat-value.text-warning {
  color: var(--color-warn) !important;
}

.small-decimals {
  font-size: 0.75em;
  vertical-align: bottom;
}

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

.sidebar .chart-container {
  height: 180px;
}

.log-feed-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.log-feed-table thead {
  display: none;
}

.log-feed-table tbody tr {
  background-color: var(--bg-surface);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.log-feed-table tbody tr:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.dark-theme .log-feed-table tbody tr:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.log-feed-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.log-feed-table td:first-child {
  border-left: 1px solid var(--border-color);
  padding: 1rem;
  width: 20px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.log-feed-table td:last-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.log-feed-table .log-level-indicator {
  width: 6px;
  height: 24px;
  border-radius: 3px;
  background-color: var(--text-muted);
}

.log-level-indicator.level-error,
.log-level-indicator.level-critical {
  background-color: var(--color-error);
}

.log-level-indicator.level-warn {
  background-color: var(--color-warn);
}

.log-level-indicator.level-info {
  background-color: var(--color-info);
}

.log-level-indicator.level-success {
  background-color: var(--color-success);
}

.log-level-indicator.pending_payment {
  background-color: var(--color-success);
}

.log-level-indicator.paid {
  background-color: var(--color-success);
}

.log-feed-table .log-timestamp {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 150px;
}

.log-feed-table .log-service {
  font-weight: 600;
  color: var(--text-heading);
  min-width: 120px;
}

/* --- Estilos para o Modal de Notificações com Agrupamento --- */

/* Garante que o scroll aconteça dentro do modal body */
.modal-body#all-notifications-list {
  padding: 0;
}

/* Cabeçalho da Data (ex: Hoje, Ontem) */
.notification-date-header {
  position: sticky;
  top: -1px; /* Compensa o padding do modal */
  background-color: var(--bg-surface);
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  z-index: 10;
}

.modal-body {
  background-color: var(--bg-canvas);
  border-color: var(--bg-canvas);
}

/* Reutiliza o estilo .notification-item, mas ajusta para o modal */
.modal-body .notification-item {
  padding: 1rem 1.5rem;
  margin: 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0; /* Remove bordas arredondadas para um visual de lista */
  transition: background-color 0.2s ease;
}

.modal-body .notification-item:hover {
  background-color: var(--bg-canvas);
}

.modal-body .notification-item:last-child {
  border-bottom: none;
}

.status-page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 200px);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

.diagnostic-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.5s ease-in-out;
}

.node-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 2rem;
  border: 3px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  position: relative;
  transition: all 0.5s ease-in-out;
}

.node-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.node-name {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.5s ease-in-out;
}

.connector {
  flex-grow: 1;
  height: 4px;
  background-color: var(--border-color);
  position: relative;
  overflow: hidden;
  transition: background-color 0.5s ease-in-out;
}

.connector .pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  animation: pulse-animation 1s ease-in-out;
}

.connector .pulse.success {
  background-color: var(--color-success);
}

.connector .pulse.fail {
  background-color: var(--color-error);
  animation-duration: 0.3s;
}

.node.is-success .node-icon {
  border-color: var(--color-success);
  color: var(--color-success);
  box-shadow: 0 0 15px rgba(var(--color-success), 0.3);
}

.node.is-success .node-name {
  color: var(--text-heading);
}

.node.is-success + .connector {
  background-color: var(--color-success);
}

.node.is-fail .node-icon {
  border-color: var(--color-error);
  color: var(--color-error);
  animation: shake 0.5s;
}

.node.is-fail .node-name {
  color: var(--color-error);
  font-weight: 700;
}

.node.is-pending {
  opacity: 0.4;
}

.status-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  max-width: 1000px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInPanel 0.8s 0.5s ease-out forwards;
  position: relative;
  z-index: 2;
}

.status-panel .status-title {
  font-size: 1rem;
  max-width: 900px;
}

.status-panel .status-explanation {
  color: var(--text-body);
  line-height: 1.7;
  max-width: 900px;
}

.status-panel .solution-box {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 12px;
}

.profile-panel-custom {
  position: absolute;
  top: 65px;
  right: 0;
  background: #181a2a;
  border-radius: 16px;
  box-shadow: 0 4px 24px #0006;
  padding: 18px 0 10px 0;
  min-width: 170px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: opacity 0.25s, transform 0.25s;
  opacity: 1;
  transform: translateY(0);
}

.profile-panel-custom.d-none {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.profile-panel-link {
  background: none;
  border: none;
  color: #fff;
  text-align: left;
  padding: 10px 24px;
  font-size: 1em;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-panel-link:hover {
  background: #23244a;
  color: #6c5ce7;
  text-decoration: none;
}

.legal-section {
  padding: 80px 0;
  color: var(--text-color);
}

.legal-section h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: var(--title-color);
}

.legal-section h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin-top: 40px;
  margin-bottom: 15px;
  color: var(--title-color);
}

.legal-section h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 40px;
  margin-bottom: 15px;
  color: var(--title-color);
}

.legal-section p,
.legal-section li {
  font-family: "Poppins", sans-serif;
  line-height: 1.8;
  text-align: justify;
}

.legal-section .alert {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.table-dark {
  --bs-table-bg: var(--card-bg-color);
  --bs-table-border-color: var(--border-color);
  --bs-table-color: var(--text-color);
}

.table-dark thead th {
  background-color: rgba(0, 0, 0, 0.2);
  color: var(--title-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-dark td,
.table-dark th {
  vertical-align: middle;
}

.stat-card .stat-tooltip {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.stat-card .stat-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-tooltip .online-dot {
  width: 9px;
  height: 9px;
  background-color: #3ba55d;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

#online-tooltip-text {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-heading);
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

a.app-list-item:hover {
  background-color: var(--bg-surface);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.dark-theme a.app-list-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.app-list-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.app-list-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light-theme);
  border-radius: 10px;
  color: var(--primary);
  font-size: 1.2rem;
}

.dark-theme .app-list-icon {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.app-list-content {
  flex-grow: 1;
}

.app-list-content strong {
  color: var(--text-heading);
  font-weight: 600;
  display: block;
}

.app-list-content small {
  color: var(--text-muted);
  font-size: 0.9em;
}

.app-list-item .badge {
  margin-left: auto;
}

.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-sidebar .form-label.small {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.dashboard-sidebar .form-control,
.dashboard-sidebar .form-select {
  background-color: transparent !important;
  border: none;
  border-bottom: 2px solid var(--border-color);
  border-radius: 0;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-weight: 600;
  color: var(--text-heading);
  transition: border-color 0.3s ease;
}

.dashboard-sidebar .form-control:focus,
.dashboard-sidebar .form-select:focus {
  box-shadow: none;
  border-color: var(--primary);
}

.dashboard-sidebar .form-select {
  background-position: right 0.25rem center;
}

body.dark-theme .dashboard-sidebar .form-select option {
  background-color: var(--bg-surface);
  color: var(--text-body);
}

.btn-reset-filters {
  font-weight: 600;
  color: var(--text-muted);
  background-color: transparent;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
}

.btn-reset-filters:hover {
  background-color: var(--bg-canvas);
  color: var(--primary);
  border-color: var(--primary);
}

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

.stat-card[data-level="info"]::before {
  background-color: var(--color-info);
}
.stat-card[data-level="error"]::before {
  background-color: var(--color-error);
}
.stat-card[data-level="warn"]::before {
  background-color: var(--color-warn);
}
.stat-card[data-level="success"]::before {
  background-color: var(--color-success);
}

.stat-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.1;
}

.log-feed-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ============================================= */
/* --- Estilos Completos para o Feed de Logs --- */
/* ============================================= */

/* 1. O contêiner de toda a lista de logs */
.log-feed-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Espaçamento entre cada log */
}

/* 2. O contêiner de CADA log individual (a "caixa" que faltava) */
.log-entry {
  display: flex;
  align-items: stretch; /* Garante que a barra de cor e o conteúdo tenham a mesma altura */
  flex-wrap: wrap; /* Permite que a expansão quebre a linha */
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
}

.log-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
}

.dark-theme .log-entry:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* 3. A barra de cor indicadora de nível */
.log-indicator-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px;
  margin-right: 1rem;
}
.log-indicator-bar.level-critical,
.log-indicator-bar.level-error {
  background-color: var(--color-error);
}
.log-indicator-bar.level-warn {
  background-color: var(--color-warn);
}
.log-indicator-bar.level-info {
  background-color: var(--color-info);
}
.log-indicator-bar.level-success,
.log-indicator-bar.level-paid,
.log-indicator-bar.level-pending_payment {
  background-color: var(--color-success);
}

/* 4. Conteúdo principal do log (mensagem, serviço, etc.) */
.log-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0; /* Previne que o conteúdo estoure o layout */
}

/* 5. Ação de expandir (seta) */
.log-actions {
  display: flex;
  align-items: center;
  padding-left: 1rem;
  margin-left: auto;
  color: var(--text-muted);
}

.log-actions i {
  transition: transform 0.3s ease-in-out;
}

/* 6. A área de detalhes que expande */
.log-details-content {
  max-height: 0;
  overflow: hidden;
  width: 100%;
  flex-basis: 100%;
  transition: max-height 0.4s ease-in-out, margin-top 0.4s ease-in-out;
  padding: 0;
  margin: 0;
}

.log-details-content pre {
  margin: 0;
  padding: 1rem;
  background-color: var(
    --bg-surface
  ); /* Cor de fundo um pouco diferente para destaque */
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border-color);
}

.log-details-content pre code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-body);
}

/* 7. Estilos para o estado expandido */
.log-entry.is-expanded .log-details-content {
  max-height: 500px;
  margin-top: 1rem;
}

.log-entry.is-expanded .log-actions i {
  transform: rotate(180deg);
}

/* 8. Botão de Copiar */
.log-copy-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: var(--bg-canvas);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.log-copy-button:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.log-entry.is-expanded .log-details-content .log-copy-button {
  opacity: 1;
}

.log-indicator-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px;
  margin-right: 1rem;
}
.log-indicator-bar.level-critical,
.log-indicator-bar.level-error {
  background-color: var(--color-error);
}
.log-indicator-bar.level-warn {
  background-color: var(--color-warn);
}
.log-indicator-bar.level-info {
  background-color: var(--color-info);
}
.log-indicator-bar.level-success,
.log-indicator-bar.level-paid,
.log-indicator-bar.level-pending_payment {
  background-color: var(--color-success);
}

.log-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
}
.log-main-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.log-service {
  font-weight: 600;
  color: var(--text-heading);
  background-color: var(--bg-surface);
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.log-message {
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}
.log-timestamp {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.log-footer-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.log-meta-tag {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: "Courier New", Courier, monospace;
  white-space: nowrap;
}
.log-meta-tag i {
  margin-right: 0.3rem;
}

.log-actions {
  display: flex;
  align-items: center;
  padding-left: 1rem;
  margin-left: auto;
  color: var(--text-muted);
}
.log-actions i {
  cursor: pointer;
  transition: color 0.2s ease;
}
.log-actions i:hover {
  color: var(--primary);
}

.api-reference-section {
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0;
  font-size: 14.5px;
}

.api-reference-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 40%;
  gap: 2.5rem;
  align-items: flex-start;
}

.api-nav-column {
  position: sticky;
  top: 110px;
}
.api-search-box {
  position: relative;
  margin-bottom: 1.5rem;
}
.api-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
#endpoint-search {
  padding-left: 2.75rem;
  font-size: 0.9rem;
}
.api-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}
.api-nav-list .nav-link {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.api-nav-list .nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--text-heading);
}
.api-nav-list .nav-link.active {
  background-color: var(--primary-light-theme);
  color: var(--primary);
  font-weight: 600;
}
.dark-theme .api-nav-list .nav-link.active {
  background-color: rgba(var(--primary-rgb), 0.15);
}
.api-no-results {
  padding: 1rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.api-content-column {
  min-width: 0;
}
.endpoint-content {
  display: none;
}
.endpoint-content.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

.api-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.api-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.api-card-header .sub-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.api-card-body {
  padding: 1.5rem;
}
.param-group {
  margin-bottom: 1.25rem;
}
.param-group:last-child {
  margin-bottom: 0;
}
.param-group .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.param-group .form-label code {
  font-size: 0.9rem;
}
.form-text-helper {
  font-size: 0.8rem;
  padding: 0.5rem 0.25rem 0;
  color: var(--text-muted);
}
.form-text-helper a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.form-text-helper a:hover {
  text-decoration: underline;
}

.method-badge {
  font-size: 0.8rem;
  display: inline-block;
  font-family: "Courier New", monospace;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}
.method-badge.method-get {
  background-color: #0d6efd;
}
.method-badge.method-post {
  background-color: #eb459e;
}
.endpoint-path {
  font-size: 14px;
  font-family: "Courier New", monospace;
  font-weight: 400;
  color: var(--text-heading);
  word-wrap: break-word;
}
.endpoint-description {
  font-size: 0.95rem;
  line-height: 1.7;
}

#apiResponseWrapper {
  background-color: var(--bg-canvas);
  border-radius: 8px;
  padding: 1rem;
  min-height: 150px;
  max-height: 500px;
  transition: max-height 0.4s ease-in-out;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}

#apiResponseWrapper::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

#apiResponseWrapper::-webkit-scrollbar-track {
  background: transparent;
}

#apiResponseWrapper::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
  transition: background-color 0.2s ease;
}

#apiResponseWrapper::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

#apiResponseWrapper pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
#apiResponseWrapper code {
  font-size: 0.85rem;
  line-height: 1.6;
}
.json-key {
  color: var(--syntax-key);
}
.json-string {
  color: var(--syntax-string);
}
.json-number {
  color: var(--syntax-number);
}
.json-boolean {
  color: var(--syntax-boolean);
}
.json-null {
  color: var(--syntax-null);
}

.api-examples-column {
  position: sticky;
  top: 110px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.examples-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 20;
  height: 60px;
  padding: 0.75rem 0.75rem 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.examples-title {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  vertical-align: middle;
  margin-top: auto;
  margin-bottom: auto;
  margin-right: 50px;
  word-wrap: break-word;
  word-break: break-all;
}

.language-dropdown {
  position: relative;
}
.language-dropdown-toggle {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  width: 180px;
  z-index: 10;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}
.language-dropdown.open .language-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.language-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
}
.language-dropdown-menu .dropdown-item:hover {
  background-color: var(--bg-canvas);
  color: var(--text-heading);
}

.code-example-wrapper {
  position: relative;
  background-color: var(--bg-canvas);
  max-height: 70vh;
  overflow: auto;
  border-radius: 0 0 11px 11px;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}
.code-example-wrapper::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.code-example-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.code-example-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
  transition: background-color 0.2s ease;
}
.code-example-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}
.code-example {
  display: none;
}
.code-example.active {
  display: block;
}
.code-example pre {
  margin: 0;
  padding: 1.5rem;
}
.code-example code {
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-body);
}
.copy-btn {
  position: sticky;
  top: 0.75rem;
  float: right;
  margin-right: 0.75rem;
  z-index: 10;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 1;
}

.code-example-wrapper:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background-color: var(--bg-canvas);
  color: var(--text-heading);
  transform: scale(1.05);
}
.copy-btn.copied {
  background-color: #198754;
  border-color: #198754;
  color: #fff;
}
.dark-theme .copy-btn.copied {
  background-color: #2ea043;
  border-color: #2ea043;
}

.promo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  position: relative;
  background-color: var(--primary-light-theme);
  color: var(--primary);
}
.promo-banner span {
  font-size: 0.9rem;
  font-weight: 500;
}
.promo-banner strong {
  margin: 0 0.3em;
}

.dark-theme .promo-banner {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--text-heading);
}

.endpoint-tag {
  display: inline-block;
  vertical-align: middle;
  background-color: transparent;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  transition: all 0.2s ease-in-out;
}

.api-nav-list .nav-link.active .endpoint-tag {
  color: var(--primary);
  font-weight: 600;
  border-color: var(--text-heading);
  background-color: var(--bg-canvas);
  box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.1);
}

.dark-theme .endpoint-tag.tag-version {
  background-color: rgba(131, 194, 255, 0.15);
  color: #83c2ff;
}

.dark-theme .endpoint-tag.tag-feature {
  background-color: rgba(110, 218, 169, 0.1);
  color: #6edaa9;
}

body:not(.dark-theme) .endpoint-tag.tag-version {
  background-color: #e6f1ff;
  color: #2c68b4;
}

body:not(.dark-theme) .endpoint-tag.tag-feature {
  background-color: #dff7e9;
  color: #1a633f;
}

.dark-theme .endpoint-tag.tag-deprecated {
  background-color: #7d3434;
  color: #ffc2c2;
}

body:not(.dark-theme) .endpoint-tag.tag-deprecated {
  background-color: #ffe0e0;
  color: #7d3434;
}

.nav-separator {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 1rem 0.5rem;
}

.api-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.api-group-title:first-of-type {
  margin-top: 0;
}

.example-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-surface);
  border-radius: 12px 12px 0 0;
}
.example-tab-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  background-color: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.example-tab-btn:hover {
  color: var(--text-heading);
}
.example-tab-btn.active {
  background-color: var(--bg-canvas);
  color: var(--primary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.dark-theme .example-tab-btn.active {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.example-tab-pane {
  display: none;
}
.example-tab-pane.active {
  display: block;
}
#request-panel .examples-header {
  border-top: 1px solid var(--border-color);
}
#response-panel .examples-header {
  border-top: 1px solid var(--border-color);
}
.example-tabs + .example-tab-pane .examples-header {
  border-top: none;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-banner .fas {
  font-size: 1.25rem;
  margin-right: 1rem;
  margin-top: 0.25rem;
}

.info-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.info-banner code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

body:not(.dark-theme) .info-banner {
  background-color: #e7f3fe;
  border-color: #bce8f1;
  color: #31708f;
}

body:not(.dark-theme) .info-banner .fas {
  color: #31708f;
}

body:not(.dark-theme) .info-banner strong {
  color: #2c6681;
}

body:not(.dark-theme) .info-banner code {
  background-color: rgba(0, 123, 255, 0.1);
  color: #2c5b78;
}

.dark-theme .info-banner {
  background-color: #1a2c44;
  border-color: #2a4a75;
  color: #a6c5e4;
}

.dark-theme .info-banner .fas {
  color: #58a6ff;
}

.dark-theme .info-banner strong {
  color: #c9d1d9;
}

.dark-theme .info-banner code {
  background-color: rgba(56, 139, 253, 0.15);
  color: #79c0ff;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  transition-delay: var(--animation-delay, 0ms);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.animate-fade-out {
  animation: fadeOut 0.4s ease-out forwards;
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse-animation {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0%);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes fadeInPanel {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 165, 93, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 165, 93, 0);
  }
}

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

@media (min-width: 992px) {
  .dashboard-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .dashboard-sidebar {
    position: sticky;
    top: 100px;
    width: 300px;
    flex-shrink: 0;
  }
  .dashboard-main {
    flex-grow: 1;
    min-width: 0;
  }
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 1200px) {
  .api-reference-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "nav" "content" "examples";
  }
  .api-nav-column,
  .api-examples-column {
    position: static;
    width: 100%;
  }
  .api-examples-column {
    margin-top: 1.5rem;
  }
}

@media (max-width: 991.98px) {
  .footer-logo {
    display: none;
  }
  .portfolio-container {
    flex-direction: column;
    min-height: auto;
  }
  .portfolio-image-bg {
    position: relative;
    width: 100%;
    transform: none;
    aspect-ratio: 21 / 9;
    border-radius: 16px;
    margin-bottom: 0;
  }
  .portfolio-content-card {
    width: 100%;
    border-radius: 16px;
    box-shadow: none;
    margin-top: -50px;
  }
  .command-mockup-wrapper .command-mockup {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
  }
  .portfolio-image-wrapper {
    aspect-ratio: 21 / 9;
    border-radius: 16px 16px 0 0;
  }
  .portfolio-showcase .row > div {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .footer-logo {
    display: none;
  }
  .stat-card {
    border-right: none;
  }
  .stats-section .row > .col-6:nth-child(odd) {
    padding-right: 0.75rem;
  }
  .stats-section .row > .col-6:nth-child(even) {
    padding-left: 0.75rem;
  }
  .portfolio-content-card {
    padding: 2rem;
  }
  .command-mockup-wrapper .command-mockup {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
  }
  .portfolio-content {
    padding: 2rem;
  }
  .diagnostic-flow {
    flex-direction: column;
    gap: 1rem;
  }
  .connector {
    width: 4px;
    height: 40px;
  }
  .connector .pulse {
    animation-name: pulse-animation-vertical;
  }
  @keyframes pulse-animation-vertical {
    from {
      transform: translateY(-100%);
    }
    to {
      transform: translateY(0%);
    }
  }
}

/* --- Layout de Status "Command Center" --- */
.sidebar {
  position: sticky;
  top: 100px;
}
.service-module {
  background-color: var(--bg-surface);
  border-radius: 16px;
  transition: border-color 0.3s ease;
}
.service-module.is-loading .skeleton-box,
.service-module.is-loading .skeleton-text {
  background-color: var(--border-color);
  border-radius: 8px;
  animation: pulse-bg 1.5s infinite ease-in-out;
}
.service-module.is-loading .skeleton-text {
  height: 1em;
}
@keyframes pulse-bg {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

.service-module.status-online {
  border-left-color: var(--color-success);
}
.service-module.status-degraded {
  border-left-color: var(--color-warn);
}
.service-module.status-offline {
  border-left-color: var(--color-error);
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-muted);
  flex-shrink: 0;
}
.status-online .status-dot {
  background-color: var(--color-success);
}
.status-degraded .status-dot {
  background-color: var(--color-warn);
}
.status-offline .status-dot {
  background-color: var(--color-error);
}
.service-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}
.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  color: #fff;
}
.status-badge.status-online {
  background-color: var(--color-success);
}
.status-badge.status-degraded {
  background-color: var(--color-warn);
}
.status-badge.status-offline {
  background-color: var(--color-error);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--border-color);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}
.grid-item {
  background-color: var(--bg-surface);
  padding: 1rem;
}
.item-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.latency-chart .chart-container {
  height: 120px;
}
.resource-gauges {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
}
.gauge-container {
  text-align: center;
}
.gauge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: conic-gradient(
    var(--c, #000) calc(var(--p, 0) * 1%),
    var(--border-color) 0
  );
  margin-bottom: 0.5rem;
}
.gauge-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
}
.gauge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.network-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  height: 100%;
}
.network-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}
.network-item strong {
  color: var(--text-heading);
}

.uptime-display {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.uptime-bar {
  height: 30px;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
  background-color: var(--border-color);
}
.uptime-bar-segment {
  flex-grow: 1;
}
.uptime-bar-segment.status-online {
  background-color: var(--color-success);
}
.uptime-bar-segment.status-degraded {
  background-color: var(--color-warn);
}
.uptime-bar-segment.status-offline {
  background-color: var(--color-error);
}

.module-incidents-container {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  border-radius: 0 0 15px 15px;
}
.incident-toggle {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.incident-toggle .fa-chevron-down {
  transition: transform 0.3s ease;
}
.incident-toggle[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.incident-list {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.incident-item-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.incident-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.incident-dot.status-online {
  background-color: var(--color-success);
}
.incident-dot.status-offline {
  background-color: var(--color-error);
}
.incident-details {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}
.incident-title {
  font-size: 0.9rem;
  color: var(--text-body);
}
.incident-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .module-grid {
    grid-template-columns: 1fr;
  }
  .latency-chart,
  .uptime-display {
    grid-row: span 1;
  }
}

/* --- Dashboard de Perfil --- */
.profile-hero-section {
  position: relative;
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.dark-theme .profile-hero-section {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.1) 0%,
    rgba(var(--bg-surface-rgb), 0.5) 100%
  );
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.profile-hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-grow: 1;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
}

.level-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 32px;
  height: 32px;
  background-color: var(--color-success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 3px solid var(--bg-surface);
  z-index: 1;
}

.profile-info {
  flex-grow: 1;
}
.profile-name {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-heading);
}
.profile-tag {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.level-progress-container {
  background-color: var(--bg-canvas);
  border-radius: 15px;
  padding: 0.75rem 1.25rem;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
}
.level-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.level-info span:first-child {
  color: var(--primary);
}
.progress-bar-bg {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}
.dark-theme .progress-bar-bg {
  background-color: rgba(var(--primary-rgb), 0.1);
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 8px;
  transition: width 0.5s ease-out;
}

.logout-button {
  background-color: var(--bg-canvas);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-button:hover {
  background-color: var(--bg-canvas);
  color: var(--color-error);
  border-color: var(--color-error);
}

/* SIDEBAR E MÉTRICAS */
.sidebar {
  position: sticky;
  top: 100px;
}

.metric-card .metric-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.metric-card .metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1;
}
.metric-card .metric-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .profile-hero-section,
  .profile-hero-content {
    flex-direction: column;
    text-align: center;
  }
  .profile-name {
    margin-top: 1rem;
  }
  .logout-button {
    margin-top: 1.5rem;
    width: 100%;
  }
}

/* NOVO PAINEL DE NOTIFICAÇÕES (HEADER) */
.topbar-nav .icon-button {
  padding: 0.75rem;
  font-size: 1.1rem;
}

.topbar-nav .icon-button:hover::after {
  width: 0;
}

.notification-area {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background-color: var(--color-error);
  color: white;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--bg-canvas);
  display: none;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

.notification-badge.show {
  display: flex;
}

.notifications-panel {
  width: 380px;
  max-width: 90vw;
  right: 0;
  left: auto;
  padding: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
.panel-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.clear-all-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.clear-all-btn:hover {
  color: var(--color-error);
  background-color: rgba(var(--color-error-rgb), 0.1);
}

.panel-tabs {
  display: flex;
  padding: 0.5rem;
  gap: 0.5rem;
  background-color: var(--bg-surface);
}

.tab-btn {
  flex: 1;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--text-heading);
  background-color: var(--bg-canvas);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.dark-theme .tab-btn.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.notifications-list {
  max-height: 450px;
  overflow-y: auto;
  display: none;
  padding: 0.5rem;
}

.notifications-list.active {
  display: block;
}

.notification-item-wrapper {
  padding: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 8px;
  transition: background-color 0.2s;
  cursor: pointer;
  position: relative;
}

.notification-item-wrapper:hover {
  background-color: var(--bg-surface);
}

.notification-item-wrapper.unread {
  font-weight: 600;
}

.notification-item-wrapper.unread::before {
  content: "";
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--primary);
}

.notification-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.notification-icon.icon-success {
  background-color: rgba(var(--color-success-rgb), 0.1);
  color: var(--color-success);
}
.notification-icon.icon-info {
  background-color: rgba(var(--color-info-rgb), 0.1);
  color: var(--color-info);
}
.notification-icon.icon-primary {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.notification-content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-body);
}

.notification-content p strong {
  color: var(--text-heading);
}

.notification-content small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.empty-state-notifications {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.empty-state-notifications i {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* --- Novo Pop-up de Alerta (Toast) --- */

/* Animações de Entrada e Saída */
@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes fadeOutUp {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Container principal dos pop-ups (ajustado para o canto inferior direito) */
#alertContainer {
  position: fixed;
  bottom: 20px; /* MUDANÇA: Posição na parte inferior */
  right: 20px;
  z-index: 1056;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Estrutura do novo pop-up */
.alert-toast {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 400px;
  max-width: 90vw;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: slideInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.dark-theme .alert-toast {
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.alert-toast.animate-fade-out {
  animation: fadeOutUp 0.4s ease-out forwards;
}

/* Círculo do Ícone */
.alert-icon-wrapper {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Conteúdo de Texto */
.alert-content {
  flex-grow: 1;
  padding-right: 1rem; /* Espaço para o botão de fechar */
}
.alert-title {
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
  font-size: 1rem;
}
.alert-message {
  font-size: 0.9rem;
  color: var(--text-body);
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

/* Botão de Fechar */
.alert-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.7;
  transition: all 0.2s ease;
}
.alert-close-btn:hover {
  opacity: 1;
  color: var(--text-heading);
  transform: scale(1.1);
}

/* Cores dinâmicas baseadas no tipo de alerta */
.alert-success .alert-icon-wrapper {
  background-color: rgba(var(--color-success-rgb), 0.1);
  color: var(--color-success);
}
.alert-error .alert-icon-wrapper {
  background-color: rgba(var(--color-error-rgb), 0.1);
  color: var(--color-error);
}
.alert-warning .alert-icon-wrapper {
  background-color: rgba(var(--color-warn-rgb), 0.1);
  color: var(--color-warn);
}
.alert-info .alert-icon-wrapper {
  background-color: rgba(var(--color-info-rgb), 0.1);
  color: var(--color-info);
}

/* Estilos para os Cards do Dashboard */
.dashboard-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 20px 25px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dashboard-card .card-title {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* Carteira */
.wallet-item {
  display: flex;
  align-items: center;
  gap: 15px;
}
.wallet-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}
.wallet-info {
  display: flex;
  flex-direction: column;
}
.wallet-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.wallet-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}
.card-divider {
  border-color: var(--border-color-light);
  margin: 15px 0;
}

/* Informações do Usuário */
.user-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.user-info-list li {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.user-info-list li i {
  color: var(--primary-color);
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.badges-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}
.user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.user-badge {
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Ações Rápidas */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-action-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--button-bg);
  color: var(--text-primary);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: background-color 0.2s ease;
  text-decoration: none;
}
.quick-action-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Gráfico API */
.api-usage-chart-container {
  height: 250px;
  position: relative;
}

/* Feed de Atividade */
.activity-feed {
  list-style: none;
  padding: 0;
  margin: 0;
}
.activity-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color-light);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-icon {
  background-color: var(--primary-color-translucent);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.activity-content {
  flex: 1;
}
.activity-text {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.activity-timestamp {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Placeholder de Atividade VAZIA (sem o cursor de carregamento) */
.activity-item.placeholder-empty {
  color: var(--text-secondary);
  cursor: default; /* Garante que o cursor não seja de carregamento */
}

/* Placeholder de Atividade CARREGANDO (opcional, para usar no HTML inicial) */
.activity-item.placeholder {
  color: var(--text-secondary);
  cursor: progress; /* Cursor de carregamento */
  opacity: 0.6;
}

/* Garante que o conteúdo (avatar, nome, botão) fique na frente da sobreposição */
.profile-hero-section .profile-hero-content,
.profile-hero-section .logout-button {
  position: relative;
  z-index: 2;
}

/* ============================================= */
/* --- Estilos para o Tooltip do Gráfico --- */
/* ============================================= */
.chartjs-tooltip {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: auto;
  min-width: 180px;
}

.dark-theme .chartjs-tooltip {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.chartjs-tooltip-title {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-heading);
}

.chartjs-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chartjs-tooltip-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chartjs-tooltip-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chartjs-tooltip-label {
  color: var(--text-body);
}

.chartjs-tooltip-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-heading);
}

/* ======================================================= */
/* --- Layout e Navegação da Página de Políticas (V3) --- */
/* ======================================================= */

/* Habilita a rolagem suave para toda a página */
html {
  scroll-behavior: smooth;
}

.policy-section {
  padding-top: 2rem;
  margin-top: -1rem;
}
.policy-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
}

.policy-nav-wrapper {
  position: sticky;
  top: 100px;
}

.policy-nav-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.policy-nav .list-group-item {
  display: flex;
  align-items: center;
  background-color: transparent;
  border: none;
  padding: 0.75rem 1rem;
  color: var(--text-body);
  font-weight: 500;
  border-radius: 8px; /* Adicionado para cantos arredondados */
  margin-bottom: 0.25rem; /* Pequeno espaço entre os links */
  transition: all 0.2s ease-in-out;
}

.policy-nav .list-group-item .nav-icon {
  width: 28px;
  font-size: 0.9em;
  color: var(--text-muted);
  transition: color 0.2s ease-in-out;
}

.policy-nav .list-group-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-heading);
  transform: translateX(5px);
}

.policy-nav .list-group-item:hover .nav-icon {
  color: var(--primary);
}

/* NOVO ESTILO PARA ITEM ATIVO (SEM BORDA) */
.policy-nav .list-group-item.active {
  background-color: var(--primary-light-theme);
  color: var(--primary);
  font-weight: 700;
  transform: translateX(0);
}

.dark-theme .policy-nav .list-group-item.active {
  background-color: rgba(var(--primary-rgb), 0.1);
}

.policy-nav .list-group-item.active .nav-icon {
  color: var(--primary);
}

/* Barra de progresso de leitura */
.policy-progress-container {
  margin-top: 1.5rem;
  padding: 0 1rem;
}

.progress-bar-bg {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--primary);
  border-radius: 6px;
  transition: width 0.1s linear;
}

/* Responsividade para telas menores */
@media (max-width: 991.98px) {
  .policy-nav-wrapper {
    position: static;
    margin-bottom: 2rem;
  }
}

.integration-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  position: relative;
  padding: 2rem 0;
}
.integration-canvas {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.verification-shield {
  position: relative;
  width: var(--shield-size);
  height: var(--shield-size);
  margin-bottom: 2.5rem;
}

.shield-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 40%;
  background-color: var(--bg-canvas);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transition: all 0.5s ease;
}
.shield-center img {
  width: 55%;
  opacity: 0.8;
  transition: all 0.5s ease;
}

.shield-paths {
  width: 100%;
  height: 100%;
  transform: rotate(-45deg);
}
.shield-paths path {
  fill: none;
  stroke: var(--path-color);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke 0.4s ease;
}
.shield-paths path.trace {
  stroke: var(--path-glow-color);
  stroke-dasharray: 252;
  stroke-dashoffset: 252;
  animation: trace-path 1s ease-in-out forwards;
}
@keyframes trace-path {
  to {
    stroke-dashoffset: 0;
  }
}

.shield-segment {
  position: absolute;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  color: var(--text-muted);
  opacity: 0.5;
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shield-segment[data-step="partner"] {
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}
.shield-segment[data-step="onny"] {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
}
.shield-segment[data-step="discord"] {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
}
.shield-segment[data-step="riot"] {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
}

/* --- ÍCONES E A MÁGICA DA TRANSFORMAÇÃO --- */
.segment-icon {
  position: absolute;
  /* A transição 'cubic-bezier' cria o efeito de "bounce" no sucesso */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease;
}
.icon-success,
.icon-fail {
  opacity: 0;
  transform: scale(0); /* Começam invisíveis e pequenos */
}

/* --- ESTADOS DA ANIMAÇÃO --- */
.shield-segment.is-activating {
  opacity: 1;
  color: var(--primary);
  animation: activate-scan 1.2s infinite ease-in-out;
}
@keyframes activate-scan {
  0%,
  100% {
    filter: brightness(1) drop-shadow(0 0 0 var(--primary));
  }
  50% {
    filter: brightness(1.5) drop-shadow(0 0 8px var(--primary));
  }
}

.shield-segment.is-successful {
  opacity: 1;
  color: var(--color-success);
  animation: none;
}
.shield-segment.is-successful .icon-default {
  opacity: 0;
  transform: scale(0); /* Ícone padrão desaparece */
}
.shield-segment.is-successful .icon-success {
  opacity: 1;
  transform: scale(1); /* Ícone de sucesso aparece com "bounce" */
}

.shield-segment.is-failed {
  opacity: 1;
  color: var(--color-error);
  animation: shake 0.5s;
}
.shield-segment.is-failed .icon-default {
  opacity: 0;
  transform: scale(0);
}
.shield-segment.is-failed .icon-fail {
  opacity: 1;
  transform: scale(1);
}

.shield-paths path.is-successful {
  stroke: var(--color-success);
}
.shield-paths path.is-failed {
  stroke: var(--color-error);
}

/* Animação Final de Sucesso (Onda de Energia) */
.shield-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background-color: transparent;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
}
.verification-shield.is-complete .shield-ripple {
  animation: ripple-out 1s ease-out;
}
@keyframes ripple-out {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 0px rgba(var(--color-success-rgb), 0.5);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5);
    box-shadow: 0 0 0 50px rgba(var(--color-success-rgb), 0);
  }
}
.verification-shield.is-complete .shield-center {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 40px var(--success-glow-color);
}
.verification-shield.is-complete .shield-center img {
  opacity: 1;
  transform: scale(1.1);
}

/* Efeito de Mosaico na Falha */
.shield-segment.is-failed::after {
  content: "";
  position: absolute;
  inset: -10px;
  background-image: linear-gradient(
      45deg,
      var(--color-error) 25%,
      transparent 25%
    ),
    linear-gradient(-45deg, var(--color-error) 25%, transparent 25%);
  background-size: 8px 8px;
  opacity: 0;
  animation: shatter-fade 0.8s ease-out forwards;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
@keyframes shatter-fade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* --- PAINEL DE TEXTO E RESULTADO FINAL --- */
.status-panel-text {
  z-index: 2;
  text-align: center;
  max-width: 500px;
}
.status-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}
.status-message {
  font-size: 1.1rem;
  color: var(--text-body);
  line-height: 1.6;
  min-height: 50px;
  transition: all 0.3s;
}
.status-details {
  margin: 1.5rem auto;
  padding: 1rem;
  background-color: var(--bg-canvas);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: monospace;
}
.status-actions {
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}
.status-actions.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}
