/* Transitional layer: keeps legacy views visually aligned to SCIFI. */

:root {
  --bridge-text-strong: #ffffff;
  --bridge-text: #eaf2ff;
  --bridge-text-muted: #c7d8f2;
  --bridge-text-soft: #a7bddb;
  --bridge-surface: rgba(9, 22, 38, 0.92);
  --bridge-surface-soft: rgba(18, 40, 64, 0.82);
  --bridge-border: rgba(122, 169, 224, 0.4);
}

body[data-theme-mode="dark"] {
  color: var(--bridge-text);
  --body-bg-rgb: 7, 17, 30;
  --body-bg-rgb2: 6, 14, 25;
  --default-body-bg-color: rgb(6, 14, 25);
  --theme-bg-gradient: rgb(14, 35, 58);
  --default-text-color-rgb: 234, 242, 255;
  --menu-bg: rgb(7, 17, 30);
  --header-bg: rgb(7, 17, 30);
  --light-rgb: 235, 243, 255;
}

body.authentication-background {
  position: relative;
  min-height: 100vh;
  --default-body-bg-color: #02060d;
  --theme-bg-gradient: #071324;
  background: radial-gradient(circle at 18% 12%, rgba(16, 44, 72, 0.22) 0%, rgba(6, 17, 32, 0.94) 42%, rgba(2, 7, 15, 1) 100%) !important;
}

body.authentication-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 12, 0.62);
  pointer-events: none;
  z-index: 0;
}

body.authentication-background > * {
  position: relative;
  z-index: 1;
}

body.authentication-background:after {
  opacity: 0.01 !important;
}

body[data-theme-mode="dark"] .text-dark,
body[data-theme-mode="dark"] .text-default,
body[data-theme-mode="dark"] .text-body {
  color: var(--bridge-text) !important;
}

body[data-theme-mode="dark"] .text-muted,
body[data-theme-mode="dark"] .text-secondary {
  color: var(--bridge-text-muted) !important;
}

body[data-theme-mode="dark"] h1,
body[data-theme-mode="dark"] h2,
body[data-theme-mode="dark"] h3,
body[data-theme-mode="dark"] h4,
body[data-theme-mode="dark"] h5,
body[data-theme-mode="dark"] h6,
body[data-theme-mode="dark"] .page-title {
  color: var(--bridge-text-strong) !important;
}

body[data-theme-mode="dark"] p,
body[data-theme-mode="dark"] li,
body[data-theme-mode="dark"] label,
body[data-theme-mode="dark"] small,
body[data-theme-mode="dark"] .small,
body[data-theme-mode="dark"] .form-label {
  color: var(--bridge-text);
}

body[data-theme-mode="dark"] .card,
body[data-theme-mode="dark"] .custom-card,
body[data-theme-mode="dark"] .table,
body[data-theme-mode="dark"] .table-responsive,
body[data-theme-mode="dark"] .dropdown-menu,
body[data-theme-mode="dark"] .modal-content {
  color: var(--bridge-text);
}

body[data-theme-mode="dark"] .card,
body[data-theme-mode="dark"] .custom-card,
body[data-theme-mode="dark"] .table-responsive {
  background: var(--bridge-surface);
  border-color: var(--bridge-border);
}

body[data-theme-mode="dark"] .card-header,
body[data-theme-mode="dark"] .card-title,
body[data-theme-mode="dark"] .card-header .card-title,
body[data-theme-mode="dark"] .card-text,
body[data-theme-mode="dark"] .card-body > h1,
body[data-theme-mode="dark"] .card-body > h2,
body[data-theme-mode="dark"] .card-body > h3,
body[data-theme-mode="dark"] .card-body > h4,
body[data-theme-mode="dark"] .card-body > h5,
body[data-theme-mode="dark"] .card-body > h6,
body[data-theme-mode="dark"] .table thead th {
  color: var(--bridge-text-strong) !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .card-title,
body[data-theme-mode="dark"] .jogadores-online-view h3,
body[data-theme-mode="dark"] .jogadores-online-view h4,
body[data-theme-mode="dark"] .jogadores-online-view h5,
body[data-theme-mode="dark"] .jogadores-online-view strong {
  color: var(--bridge-text-strong) !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .text-muted,
body[data-theme-mode="dark"] .jogadores-online-view .small,
body[data-theme-mode="dark"] .jogadores-online-view p,
body[data-theme-mode="dark"] .jogadores-online-view .form-label {
  color: var(--bridge-text-muted) !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .text-primary {
  color: #8ecbff !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .card-stats-now .card-title,
body[data-theme-mode="dark"] .jogadores-online-view .card-stats-now .card-stats-now-value,
body[data-theme-mode="dark"] .jogadores-online-view .card-stats-now p,
body[data-theme-mode="dark"] .jogadores-online-view .card-stats-now span,
body[data-theme-mode="dark"] .jogadores-online-view .card .small {
  color: var(--bridge-text-strong) !important;
  opacity: 1 !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .card .card-title,
body[data-theme-mode="dark"] .jogadores-online-view .card p,
body[data-theme-mode="dark"] .jogadores-online-view .card span,
body[data-theme-mode="dark"] .jogadores-online-view .card label {
  color: #d8e2f2 !important;
  opacity: 1 !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .text-success {
  color: #3fd486 !important;
}

body[data-theme-mode="dark"] .jogadores-online-view .text-danger {
  color: #ff6b7a !important;
}

body[data-theme-mode="dark"] .table td,
body[data-theme-mode="dark"] .table th {
  border-color: var(--bridge-border);
}

body[data-theme-mode="dark"] .table-hover > tbody > tr:hover > * {
  color: var(--bridge-text-strong);
  background: var(--bridge-surface-soft);
}

body[data-theme-mode="dark"] .breadcrumb-item,
body[data-theme-mode="dark"] .breadcrumb-item a {
  color: var(--bridge-text-muted) !important;
}

body[data-theme-mode="dark"] .breadcrumb-item.active {
  color: var(--bridge-text-strong) !important;
}

body[data-theme-mode="dark"] .nav-link {
  color: var(--bridge-text) !important;
}

body[data-theme-mode="dark"] .nav-pills .nav-link.active,
body[data-theme-mode="dark"] .nav-tabs .nav-link.active {
  color: #fff !important;
}

body[data-theme-mode="dark"] input,
body[data-theme-mode="dark"] textarea,
body[data-theme-mode="dark"] select,
body[data-theme-mode="dark"] .form-control,
body[data-theme-mode="dark"] .form-select {
  color: #ffffff !important;
  background: rgba(9, 24, 41, 0.9) !important;
  border-color: var(--bridge-border) !important;
  color-scheme: dark;
}

body[data-theme-mode="dark"] select option,
body[data-theme-mode="dark"] .form-select option,
body[data-theme-mode="dark"] .form-control option {
  background-color: #0f2741 !important;
  color: #ffffff !important;
}

body[data-theme-mode="dark"] select optgroup,
body[data-theme-mode="dark"] .form-select optgroup,
body[data-theme-mode="dark"] .form-control optgroup {
  background-color: #123252 !important;
  color: #eaf2ff !important;
}

body[data-theme-mode="dark"] select option:checked,
body[data-theme-mode="dark"] .form-select option:checked,
body[data-theme-mode="dark"] .form-control option:checked {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

body[data-theme-mode="dark"] .choices__inner,
body[data-theme-mode="dark"] .choices__list--dropdown,
body[data-theme-mode="dark"] .choices__list[aria-expanded] {
  background-color: #0f2741 !important;
  color: #ffffff !important;
  border-color: var(--bridge-border) !important;
}

body[data-theme-mode="dark"] .choices__list--dropdown .choices__item,
body[data-theme-mode="dark"] .choices__list[aria-expanded] .choices__item {
  color: #ffffff !important;
}

body[data-theme-mode="dark"] .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: rgba(82, 154, 255, 0.35) !important;
  color: #ffffff !important;
}

/* Prevent select dropdown from pushing fields below. */
.choices {
  position: relative;
  overflow: visible !important;
}

.choices[data-type*="select-one"] .choices__list--dropdown {
  position: absolute !important;
  top: calc(100% + 0.25rem) !important;
  inset-inline-start: 0 !important;
  inset-inline-end: 0 !important;
  width: 100% !important;
  z-index: 2100 !important;
  margin: 0 !important;
}

.choices[data-type*="select-one"] .choices__list--dropdown .choices__list {
  max-height: min(32rem, calc(100vh - 8rem)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.choices[data-type*="select-one"] .choices__list--dropdown .choices__item--selectable {
  font-size: 0.875rem !important;
  line-height: 1.35 !important;
}

body[data-theme-mode="dark"] input::placeholder,
body[data-theme-mode="dark"] textarea::placeholder {
  color: var(--bridge-text-soft) !important;
  opacity: 1;
}

body[data-theme-mode="dark"] .form-control:disabled,
body[data-theme-mode="dark"] .form-select:disabled {
  color: var(--bridge-text-muted) !important;
  opacity: 0.9;
}

body[data-theme-mode="dark"] .list-group-item,
body[data-theme-mode="dark"] .dropdown-item {
  color: var(--bridge-text) !important;
}

body[data-theme-mode="dark"] .dropdown-item:hover,
body[data-theme-mode="dark"] .dropdown-item:focus {
  color: var(--bridge-text-strong) !important;
  background: var(--bridge-surface-soft);
}

body[data-theme-mode="dark"] .apexcharts-title-text,
body[data-theme-mode="dark"] .apexcharts-subtitle-text,
body[data-theme-mode="dark"] .apexcharts-text,
body[data-theme-mode="dark"] .apexcharts-legend-text,
body[data-theme-mode="dark"] .apexcharts-xaxis-label,
body[data-theme-mode="dark"] .apexcharts-yaxis-label,
body[data-theme-mode="dark"] .apexcharts-datalabel-label,
body[data-theme-mode="dark"] .apexcharts-datalabel-value {
  fill: #d8e2f2 !important;
  color: #d8e2f2 !important;
}

body[data-theme-mode="dark"] .apexcharts-xaxis text,
body[data-theme-mode="dark"] .apexcharts-yaxis text,
body[data-theme-mode="dark"] .apexcharts-title-text,
body[data-theme-mode="dark"] .apexcharts-legend-series text {
  fill: #e7efff !important;
}

body[data-theme-mode="dark"] .apexcharts-gridline {
  stroke: rgba(150, 183, 226, 0.2) !important;
}

body[data-theme-mode="dark"] .apexcharts-canvas text,
body[data-theme-mode="dark"] .apexcharts-svg text {
  fill: #e7efff !important;
}

body[data-theme-mode="dark"] canvas + div,
body[data-theme-mode="dark"] .chartjs-render-monitor + div {
  color: var(--bridge-text) !important;
}

.page-description {
  max-width: 70ch;
}

.app-container {
  width: 100%;
}

.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.game-badge .game-logo,
.game-badge .game-badge__logo {
  width: 2rem;
  height: 2rem;
  max-width: 2rem;
  max-height: 2rem;
  object-fit: contain;
  flex: 0 0 2rem;
  display: block;
}

@media (min-width: 992px) {
  .sidemenu-toggle {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .sidemenu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    z-index: 1055;
  }

  .app-header {
    padding-inline-start: 0 !important;
  }

  [data-nav-layout="vertical"] .app-content {
    margin-inline-start: 0 !important;
  }

  [data-nav-layout="vertical"] .app-sidebar {
    display: none !important;
    position: fixed !important;
    inset-inline-start: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 16rem !important;
    transform: translateX(-100%) !important;
    z-index: 1050 !important;
  }

  [data-nav-layout="vertical"][data-toggled="close"] .app-sidebar,
  [data-nav-layout="vertical"][data-toggled="detached-close"] .app-sidebar {
    display: none !important;
    transform: translateX(-100%) !important;
  }

  [data-nav-layout="vertical"][data-toggled="open"] .app-sidebar {
    display: block !important;
    transform: translateX(0) !important;
  }
}

@media (max-width: 767.98px) {
  [data-nav-layout="vertical"] .main-content,
  [data-nav-layout="vertical"] .app-content {
    margin-inline-start: 0 !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 0 !important;
  }

  [data-nav-layout="vertical"] .container-fluid {
    padding-inline: 0.5rem !important;
  }

  [data-nav-layout="vertical"] .app-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  [data-nav-layout="vertical"] .row {
    --bs-gutter-x: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  [data-nav-layout="vertical"] .container-fluid {
    padding-inline: 0.35rem !important;
  }

  [data-nav-layout="vertical"] .row {
    --bs-gutter-x: 0.5rem;
  }
}

.app-page-head {
  margin-bottom: 1rem;
}

.app-page-title {
  margin: 0;
  font-size: 1.125rem;
}

.app-page-desc {
  margin-top: 0.5rem;
  color: rgba(var(--default-text-color-rgb), 0.7);
}

.app-page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-breadcrumb {
  margin-bottom: 1rem;
}

.app-breadcrumb a {
  color: inherit;
}

.app-breadcrumb span {
  color: rgba(var(--default-text-color-rgb), 0.7);
}

.card {
  border-color: var(--default-border);
}

.card-body > .table-responsive:last-child,
.card-body > .table-wrap:last-child {
  margin-bottom: 0;
}

.form-group,
.form-group-default {
  margin-bottom: 1rem;
}

.form-group label,
.form-group-default label {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group-required label::after,
.form-group.default.required label::after,
.form-group-default.required label::after,
.form-group-default.form-group-required label::after {
  content: " *";
  color: rgb(var(--danger-rgb));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap table,
table.table {
  min-width: 720px;
}

.btn-ghost-secondary {
  color: var(--default-text-color);
  border: 1px solid var(--default-border);
  background: transparent;
}

.btn-ghost-secondary:hover,
.btn-ghost-secondary:focus {
  color: var(--default-text-color);
  border-color: rgba(var(--primary-rgb), 0.4);
  background: rgba(var(--primary-rgb), 0.08);
}

.btn-ghost-danger {
  color: rgb(var(--danger-rgb));
  border: 1px solid rgba(var(--danger-rgb), 0.35);
  background: transparent;
}

.btn-ghost-danger:hover,
.btn-ghost-danger:focus {
  color: #fff;
  background: rgba(var(--danger-rgb), 0.75);
  border-color: rgba(var(--danger-rgb), 0.75);
}

.badge-soft-info,
.badge-soft-success,
.badge-soft-danger,
.badge-soft-warning {
  border: 1px solid transparent;
}

.badge-soft-info {
  background: rgba(var(--info-rgb), 0.15);
  color: rgb(var(--info-rgb));
}

.badge-soft-success {
  background: rgba(var(--success-rgb), 0.15);
  color: rgb(var(--success-rgb));
}

.badge-soft-danger {
  background: rgba(var(--danger-rgb), 0.15);
  color: rgb(var(--danger-rgb));
}

.badge-soft-warning {
  background: rgba(var(--warning-rgb), 0.15);
  color: rgb(var(--warning-rgb));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-header-breadcrumb {
    align-items: flex-start !important;
  }

  .table-wrap table,
  table.table {
    min-width: 640px;
  }
}

/* Criadores de conteudo: styles required in SCIFI layout */
.criadores-grid.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.criadores-grid.row > * {
  width: auto;
  max-width: none;
  padding: 0;
}

.criadores-grid .criadores-tier-header {
  grid-column: 1 / -1;
  width: 100%;
}

.criadores-grid .criadores-tier-title {
  margin: 0 0 0.75rem;
}

.criador-card {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.criador-card:hover {
  color: inherit;
  text-decoration: none;
}

.criador-card__body {
  position: relative;
  height: 100%;
  padding: 1.25rem;
  padding-top: 1.8rem;
}

.criador-card__avatar-wrap {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

.criador-card__avatar {
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.criador-card__avatar--placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.2);
  color: #b8c7dc;
  font-size: 1.75rem;
  font-weight: 700;
}

.criador-card__nome {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.criador-card__jogos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.criador-card .game-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.criador-card .game-badge .game-logo,
.criador-card .game-badge .game-badge__logo {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.criador-card .game-badge .game-badge__name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.criador-card img {
  max-width: 100%;
}

.criador-card__tier,
.criador-card__status {
  position: absolute;
  top: 0.5rem;
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  z-index: 2;
}

.criador-card__tier {
  left: 0.65rem;
}

.criador-card__status {
  right: 0.65rem;
}

.criador-card__status--ativo {
  background: #3fb950 !important;
  color: #ffffff !important;
  border: 1px solid #3fb950 !important;
}

.criador-card__status--atencao {
  background: #d29922 !important;
  color: #111111 !important;
  border: 1px solid #d29922 !important;
}

.criador-card__status--atrasado {
  background: #f85149 !important;
  color: #ffffff !important;
  border: 1px solid #f85149 !important;
}

.criador-card__metas {
  margin-bottom: 0.6rem;
}

.criador-card__meta {
  margin-bottom: 0.55rem;
}

.criador-card__progress {
  height: 6px;
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  overflow: hidden;
}

.criador-card__progress--hours {
  min-height: 28px;
  border-radius: 8px;
}

.criador-card__progress-fill {
  height: 100%;
  background: #58a6ff;
}

.criador-card__progress-fill--ok {
  background: #3fb950 !important;
}

.criador-card__progress--video {
  min-height: 24px;
  border-radius: 8px;
  margin-top: 0.35rem;
  position: relative;
}

.criador-card__progress--video .criador-card__progress-fill {
  display: flex;
  align-items: center;
}

.criador-card__progress--video .criador-card__progress-segment {
  min-height: 24px;
}

.criador-card__progress-overlay-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111111 !important;
  text-shadow: none !important;
  pointer-events: none;
}

.criador-card__progress--video .criador-card__progress-overlay-text {
  background: rgba(255, 255, 255, 0.68);
}

.criador-card__progress--hours .criador-card__progress-segment {
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 0.45rem;
}

.criador-card__progress--hours .criador-card__progress-segment-text,
.criador-card__progress--hours .criador-card__progress-fill {
  color: #111111 !important;
  text-shadow: none !important;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .criadores-grid.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .criadores-grid.row {
    grid-template-columns: 1fr;
  }
}

/* Global hardening pass: dark theme contrast + interactive states */
body[data-theme-mode="dark"] {
  --body-bg-rgb: 8, 17, 30;
  --body-bg-rgb2: 6, 13, 24;
  --default-body-bg-color: rgb(6, 13, 24);
  --theme-bg-gradient: #10243c;
  --default-text-color-rgb: 234, 242, 255;
  --text-muted: #b8cbe7;
  --default-border: rgba(147, 184, 229, 0.35);
  --bootstrap-card-border: rgba(147, 184, 229, 0.3);
  --input-border: rgba(147, 184, 229, 0.45);
  --menu-bg: #09192c;
  --header-bg: #09192c;
}

body[data-theme-mode="dark"] a {
  color: #8ec5ff;
}

body[data-theme-mode="dark"] a:hover,
body[data-theme-mode="dark"] a:focus {
  color: #b4dbff;
}

body[data-theme-mode="dark"] .app-header,
body[data-theme-mode="dark"] .app-sidebar,
body[data-theme-mode="dark"] .main-content,
body[data-theme-mode="dark"] .app-content {
  color: var(--bridge-text);
}

body[data-theme-mode="dark"] .app-header {
  border-bottom: 1px solid var(--bridge-border);
}

body[data-theme-mode="dark"] .app-sidebar .main-menu .slide .side-menu__item {
  color: #d5e6ff !important;
  border: 1px solid transparent;
}

body[data-theme-mode="dark"] .app-sidebar .main-menu .slide .side-menu__item .side-menu__icon {
  color: #9ec8ff !important;
}

body[data-theme-mode="dark"] .app-sidebar .main-menu .slide .side-menu__item:hover,
body[data-theme-mode="dark"] .app-sidebar .main-menu .slide .side-menu__item:focus {
  color: #ffffff !important;
  background: rgba(67, 122, 193, 0.2) !important;
  border-color: rgba(133, 179, 237, 0.4);
}

body[data-theme-mode="dark"] .app-sidebar .main-menu .slide.active > .side-menu__item,
body[data-theme-mode="dark"] .app-sidebar .main-menu .slide .side-menu__item.active {
  color: #ffffff !important;
  background: rgba(84, 149, 227, 0.24) !important;
  border-color: rgba(158, 201, 255, 0.46) !important;
}

body[data-theme-mode="dark"] .card-header,
body[data-theme-mode="dark"] .modal-header,
body[data-theme-mode="dark"] .modal-footer {
  border-color: var(--bridge-border);
}

body[data-theme-mode="dark"] .card,
body[data-theme-mode="dark"] .custom-card,
body[data-theme-mode="dark"] .modal-content,
body[data-theme-mode="dark"] .offcanvas,
body[data-theme-mode="dark"] .dropdown-menu {
  background: rgba(10, 26, 44, 0.94) !important;
  border-color: var(--bridge-border) !important;
  color: var(--bridge-text) !important;
}

body[data-theme-mode="dark"] .table {
  --bs-table-color: #eaf2ff;
  --bs-table-striped-color: #f4f8ff;
  --bs-table-hover-color: #ffffff;
  --bs-table-bg: transparent;
}

body[data-theme-mode="dark"] .table thead th {
  background: rgba(63, 114, 182, 0.18) !important;
}

body[data-theme-mode="dark"] .table td,
body[data-theme-mode="dark"] .table th {
  vertical-align: middle;
}

body[data-theme-mode="dark"] .btn {
  font-weight: 600;
}

body[data-theme-mode="dark"] .btn-outline-light {
  color: #e8f2ff;
  border-color: rgba(177, 209, 247, 0.55);
}

body[data-theme-mode="dark"] .btn-outline-light:hover,
body[data-theme-mode="dark"] .btn-outline-light:focus {
  color: #071221;
  background: #c7e1ff;
  border-color: #c7e1ff;
}

body[data-theme-mode="dark"] .btn-secondary,
body[data-theme-mode="dark"] .btn-outline-secondary,
body[data-theme-mode="dark"] .btn-light {
  color: #e7f1ff;
}

body[data-theme-mode="dark"] .btn-dark {
  background: #0f243c;
  border-color: #274a72;
  color: #edf5ff;
}

body[data-theme-mode="dark"] .btn-dark:hover,
body[data-theme-mode="dark"] .btn-dark:focus {
  background: #17324f;
  border-color: #355f8f;
  color: #ffffff;
}

body[data-theme-mode="dark"] .btn:disabled,
body[data-theme-mode="dark"] .btn.disabled {
  opacity: 0.62;
  filter: saturate(0.7);
}

body[data-theme-mode="dark"] .badge {
  border: 1px solid rgba(255, 255, 255, 0.22);
}

body[data-theme-mode="dark"] .badge.bg-light,
body[data-theme-mode="dark"] .badge.text-bg-light {
  color: #0d2239 !important;
}

body[data-theme-mode="dark"] .list-group-item {
  background: rgba(10, 26, 44, 0.84);
  border-color: var(--bridge-border);
}

body[data-theme-mode="dark"] .list-group-item.active {
  color: #ffffff;
  background: rgba(82, 147, 224, 0.32);
  border-color: rgba(165, 204, 251, 0.58);
}

body[data-theme-mode="dark"] .form-control:focus,
body[data-theme-mode="dark"] .form-select:focus,
body[data-theme-mode="dark"] .choices__inner.is-focused,
body[data-theme-mode="dark"] .choices.is-focused .choices__inner {
  border-color: #81b7fb !important;
  box-shadow: 0 0 0 0.2rem rgba(90, 154, 235, 0.28) !important;
}

body[data-theme-mode="dark"] .form-check-input {
  background-color: #0e243e;
  border-color: rgba(146, 186, 237, 0.6);
}

body[data-theme-mode="dark"] .form-check-input:checked {
  background-color: #3f8dff;
  border-color: #3f8dff;
}

body[data-theme-mode="dark"] .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(94, 161, 247, 0.32);
}

body[data-theme-mode="dark"] .choices__item--selectable[aria-selected="true"] {
  background: rgba(71, 132, 211, 0.36) !important;
  color: #ffffff !important;
}

body[data-theme-mode="dark"] .dropdown-divider,
body[data-theme-mode="dark"] hr {
  border-color: var(--bridge-border);
}

body[data-theme-mode="dark"] .text-dark {
  color: #eaf2ff !important;
}

body[data-theme-mode="dark"] .text-muted {
  color: #bfd2ec !important;
}

body[data-theme-mode="dark"] :focus-visible {
  outline: 2px solid #7db5ff;
  outline-offset: 2px;
}

/* Prevent clipped tabs and actions on small screens. */
.nav-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.nav-tabs .nav-link {
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .card-header-tabs {
    gap: 0.25rem;
  }

  .table-wrap,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table,
  .table-responsive table,
  table.table {
    min-width: 560px;
  }
}

/*
  IMPORTANT:
  Main layout sets data-theme-mode on <html>, not on <body>.
  This block guarantees dark overrides apply in that structure.
*/
html[data-theme-mode="dark"] {
  --body-bg-rgb: 8, 17, 30 !important;
  --body-bg-rgb2: 6, 13, 24 !important;
  --default-body-bg-color: rgb(6, 13, 24) !important;
  --theme-bg-gradient: #10243c !important;
  --default-text-color-rgb: 234, 242, 255 !important;
  --text-muted: #b8cbe7 !important;
  --default-border: rgba(147, 184, 229, 0.35) !important;
  --bootstrap-card-border: rgba(147, 184, 229, 0.3) !important;
  --input-border: rgba(147, 184, 229, 0.45) !important;
  --menu-bg: #09192c !important;
  --header-bg: #09192c !important;
}

html[data-theme-mode="dark"] body {
  color: var(--bridge-text) !important;
}

html[data-theme-mode="dark"] .card-title,
html[data-theme-mode="dark"] .card-header .card-title,
html[data-theme-mode="dark"] .card-body > h1,
html[data-theme-mode="dark"] .card-body > h2,
html[data-theme-mode="dark"] .card-body > h3,
html[data-theme-mode="dark"] .card-body > h4,
html[data-theme-mode="dark"] .card-body > h5,
html[data-theme-mode="dark"] .card-body > h6 {
  color: #f3f8ff !important;
}

html[data-theme-mode="dark"] .card,
html[data-theme-mode="dark"] .custom-card,
html[data-theme-mode="dark"] .table-responsive,
html[data-theme-mode="dark"] .modal-content,
html[data-theme-mode="dark"] .dropdown-menu {
  background: rgba(10, 26, 44, 0.94) !important;
  border-color: var(--bridge-border) !important;
}

html[data-theme-mode="dark"] .table thead th {
  color: #ffffff !important;
  background: rgba(63, 114, 182, 0.18) !important;
}

html[data-theme-mode="dark"] .table td,
html[data-theme-mode="dark"] .table th {
  color: #eaf2ff !important;
}

html[data-theme-mode="dark"] .btn-ghost-primary {
  color: #beddff !important;
  border-color: rgba(130, 179, 242, 0.6) !important;
  background: rgba(61, 119, 192, 0.22) !important;
}

html[data-theme-mode="dark"] .btn-ghost-primary:hover,
html[data-theme-mode="dark"] .btn-ghost-primary:focus {
  color: #ffffff !important;
  border-color: rgba(175, 213, 255, 0.78) !important;
  background: rgba(88, 150, 227, 0.36) !important;
}

/* Choices.js: force white text in opened dropdown options. */
html[data-theme-mode="dark"] .choices__inner {
  color: #ffffff !important;
}

html[data-theme-mode="dark"] .choices__list--dropdown,
html[data-theme-mode="dark"] .choices__list[aria-expanded] {
  background-color: #0f2741 !important;
  color: #ffffff !important;
}

html[data-theme-mode="dark"] .choices__list--dropdown .choices__item,
html[data-theme-mode="dark"] .choices__list[aria-expanded] .choices__item,
html[data-theme-mode="dark"] .choices__list--dropdown .choices__item--selectable,
html[data-theme-mode="dark"] .choices__list[aria-expanded] .choices__item--selectable {
  color: #ffffff !important;
}

/* Sidebar menu filter */
.sidebar-menu-filter {
  border-bottom: 1px solid rgba(147, 184, 229, 0.22);
}

html[data-theme-mode="dark"] .sidebar-menu-filter .form-label {
  color: #d8e9ff !important;
}

html[data-theme-mode="dark"] #sidebar-menu-filter-input {
  background: rgba(10, 29, 49, 0.92) !important;
  color: #ffffff !important;
  border: 1px solid rgba(140, 184, 234, 0.48) !important;
}

html[data-theme-mode="dark"] #sidebar-menu-filter-input::placeholder {
  color: #b4c9e6 !important;
}

html[data-theme-mode="dark"] .marketing-kpi-value {
  color: #9ed4ff !important;
}

html[data-theme-mode="dark"] .marketing-kpi-value.text-success {
  color: #83efbc !important;
}
