/* Sitewide dark-theme layer. The legacy JavaScript injector remains disabled. */
body {
  --ts-surface-0: #0d141d;
  --ts-surface-1: #131d29;
  --ts-surface-2: #1a2735;
  --ts-surface-hover: #213247;
  --ts-border: #2a3a4d;
  --ts-text: #edf4ff;
  --ts-text-muted: #aebed0;
  --ts-primary: #4ea1ff;
  --ts-primary-strong: #287fe0;
  --bs-body-bg: var(--ts-surface-0);
  --bs-body-color: var(--ts-text);
  --bs-border-color: var(--ts-border);
  --pc-heading-color: var(--ts-text);
  --pc-sidebar-background: var(--ts-surface-1);
  --pc-sidebar-color: var(--ts-text-muted);
  --pc-sidebar-caption-color: #7f94ac;
  --pc-sidebar-active-color: var(--ts-primary);
  --pc-sidebar-user-background: var(--ts-surface-2);
  --pc-active-background: var(--ts-surface-hover);
}

body,
body .pc-container,
body .pc-content {
  background: var(--ts-surface-0);
  color: var(--ts-text);
}

body .card,
body .modal-content,
body .dropdown-menu,
body .offcanvas {
  background: var(--ts-surface-1);
  border-color: var(--ts-border);
  color: var(--ts-text);
  box-shadow: none;
}

body .card,
body .modal-content {
  border-radius: 8px;
}

body .card-header,
body .card-footer {
  background: transparent;
  border-color: var(--ts-border);
  color: var(--ts-text);
}

body .text-muted,
body .form-text,
body .breadcrumb-item,
body .breadcrumb-item.active {
  color: var(--ts-text-muted) !important;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .h1,
body .h2,
body .h3,
body .h4,
body .h5,
body .h6,
body .form-label,
body label {
  color: var(--ts-text);
}

body .form-control,
body .form-select,
body .input-group-text {
  background: var(--ts-surface-2);
  border-color: var(--ts-border);
  color: var(--ts-text);
}

body .form-control::placeholder {
  color: #8395aa;
}

body .form-control:focus,
body .form-select:focus {
  background: var(--ts-surface-2);
  border-color: var(--ts-primary);
  color: var(--ts-text);
  box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.16);
}

body .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ts-text);
  --bs-table-border-color: var(--ts-border);
  --bs-table-striped-color: var(--ts-text);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.025);
  --bs-table-hover-color: var(--ts-text);
  --bs-table-hover-bg: var(--ts-surface-hover);
  color: var(--ts-text);
}

body .table > :not(caption) > * > * {
  background-color: transparent;
  color: inherit;
  border-bottom-color: var(--ts-border);
}

body .pc-sidebar,
body .pc-sidebar .navbar-wrapper,
body .pc-sidebar .navbar-content {
  background: var(--ts-surface-1) !important;
  border-color: var(--ts-border) !important;
}

body .pc-sidebar .pc-caption,
body .pc-sidebar .pc-caption span:not(.badge) {
  color: #8195ac;
}

body .pc-sidebar .pc-navbar > .pc-item {
  margin: 4px 10px;
}

body .pc-sidebar .pc-navbar > .pc-item > .pc-link {
  border-radius: 6px;
  color: var(--ts-text-muted);
  padding: 12px 14px;
}

body .pc-sidebar .pc-navbar > .pc-item > .pc-link:hover,
body .pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
body .pc-sidebar .pc-navbar > .pc-item.pc-trigger > .pc-link {
  background: var(--ts-surface-hover);
  color: var(--ts-text);
}

body .pc-sidebar .pc-navbar > .pc-item.active > .pc-link {
  box-shadow: inset 3px 0 0 var(--ts-primary);
}

body .pc-sidebar .pc-navbar > .pc-item > .pc-link::after {
  display: none;
}

body .analytics-tab {
  align-content: flex-start;
  border: 1px solid var(--ts-border);
  border-radius: 8px;
  gap: 4px;
  padding: 8px;
}

body .analytics-tab .nav-link {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ts-text-muted);
  text-align: left;
}

body .analytics-tab .nav-link:hover,
body .analytics-tab .nav-link.active {
  background: var(--ts-surface-hover);
  border-color: var(--ts-border);
  color: var(--ts-text);
}

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

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

@media (max-width: 767.98px) {
  body .analytics-tab {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  body .analytics-tab .nav-link {
    white-space: nowrap;
  }
}
/* Dashboard and account surfaces: direct CSS replacement for the retired legacy injector. */
body .pc-content .card,
body .pc-content a.card,
body .pc-content .list-group-item {
  background: var(--ts-surface-1);
  border-color: var(--ts-border);
  color: var(--ts-text);
  box-shadow: none;
}

body .pc-content .card-body,
body .pc-content .card-body p,
body .pc-content .card-body span:not(.badge),
body .pc-content .card-body strong,
body .pc-content .list-group-item {
  color: var(--ts-text);
}

body .analytics-tab {
  background: var(--ts-surface-1);
  border-bottom: 1px solid var(--ts-border);
}

body .analytics-tab .nav-link {
  background: transparent;
  color: var(--ts-text-muted);
}

body .analytics-tab .nav-link.active,
body .analytics-tab .nav-link:hover {
  background: var(--ts-surface-hover);
  border-color: var(--ts-border);
  color: var(--ts-text);
}

body .pc-content .table,
body .pc-content .dataTable,
body .pc-content .table a,
body .pc-content .dataTable a {
  color: var(--ts-text);
}

body .pc-content .table thead th,
body .pc-content .table tbody td,
body .pc-content .dataTable thead th,
body .pc-content .dataTable tbody td {
  background: transparent;
  border-color: var(--ts-border);
  color: var(--ts-text);
}

body .pc-content .table tbody tr:nth-child(even) > *,
body .pc-content .dataTable tbody tr:nth-child(even) > * {
  background: rgba(255, 255, 255, 0.025);
}

body .pc-content .table tbody tr:hover > *,
body .pc-content .dataTable tbody tr:hover > * {
  background: var(--ts-surface-hover);
  color: var(--ts-text);
}

body .pc-content .card:hover,
body .pc-content .list-group-item:hover {
  transform: none;
}
/* Public storefront cards use explicit light surfaces in the base stylesheet. */
body .card,
body .card.rounded-0,
body .heighlight-card,
body .list-group-item,
body .list-group,
body .accordion-item {
  background-color: var(--ts-surface-1) !important;
  border-color: var(--ts-border) !important;
  color: var(--ts-text) !important;
}

body .card-header,
body .card-footer,
body .card-body,
body .heighlight-card .card-body,
body .list-group-flush {
  background-color: transparent !important;
  border-color: var(--ts-border) !important;
  color: var(--ts-text) !important;
}

body .card p,
body .card span:not(.badge),
body .card strong,
body .card a:not(.btn),
body .list-group-item,
body .list-group-item a,
body .text-body {
  color: var(--ts-text) !important;
}

body .card .text-muted,
body .list-group-item .text-muted,
body .text-truncate-2 {
  color: var(--ts-text-muted) !important;
}

body .badge.bg-light-primary {
  background-color: #1b3554 !important;
  color: #cfe6ff !important;
}

body .badge.bg-light-warning {
  background-color: #4a3517 !important;
  color: #ffd38d !important;
}

body .badge.bg-light-success {
  background-color: #173f31 !important;
  color: #9cebc9 !important;
}
/* Customer dashboard side navigation. */
body .analytics-tab {
  align-content: stretch;
  background: #111b27 !important;
  border: 1px solid #2a3a4d !important;
  border-radius: 6px !important;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

body .analytics-tab .nav-item {
  margin: 0;
  width: 100%;
}

body .analytics-tab .nav-link {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #2a3a4d !important;
  border-radius: 0 !important;
  color: #b9c9db !important;
  display: flex;
  font-weight: 600;
  gap: 10px;
  min-height: 56px;
  padding: 14px 18px;
  transition: background-color 160ms ease, color 160ms ease;
}

body .analytics-tab .nav-item:last-child .nav-link {
  border-bottom: 0 !important;
}

body .analytics-tab .nav-link i {
  color: #67a9f5 !important;
  font-size: 1rem;
  text-align: center;
  width: 1.25rem;
}

body .analytics-tab .nav-link:hover {
  background: #1b2b3d !important;
  color: #f2f7ff !important;
}

body .analytics-tab .nav-link.active {
  background: #1f3650 !important;
  box-shadow: inset 3px 0 0 #62a6f7;
  color: #f7fbff !important;
}

body .analytics-tab .nav-link.active i {
  color: #8ac4ff !important;
}
/* Floating surfaces: header account menu and order detail modals. */
body .pc-header .dropdown-user-profile,
body .pc-header .dropdown-user-profile .dropdown-header,
body .pc-header .dropdown-user-profile .dropdown-body,
body .dropdown-menu {
  background: #111b27 !important;
  border-color: #2a3a4d !important;
  color: #dce8f5 !important;
}

body .pc-header .dropdown-user-profile .dropdown-item,
body .dropdown-menu .dropdown-item {
  background: transparent !important;
  border-radius: 5px;
  color: #c2d1e1 !important;
  font-weight: 600;
  margin: 2px 8px;
  padding: 10px 12px;
  width: auto;
}

body .pc-header .dropdown-user-profile .dropdown-item i,
body .dropdown-menu .dropdown-item i {
  color: #67a9f5 !important;
}

body .pc-header .dropdown-user-profile .dropdown-item:hover,
body .pc-header .dropdown-user-profile .dropdown-item:focus,
body .dropdown-menu .dropdown-item:hover,
body .dropdown-menu .dropdown-item:focus {
  background: #1d3045 !important;
  color: #f5f9ff !important;
}

body .pc-header .dropdown-user-profile .dropdown-item.text-danger,
body .pc-header .dropdown-user-profile .dropdown-item.text-danger i {
  color: #ff8f98 !important;
}

body .pc-header .dropdown-user-profile .dropdown-divider,
body .dropdown-menu .dropdown-divider {
  border-color: #2a3a4d !important;
  opacity: 1;
}

body .modal .modal-content {
  background: #131d29 !important;
  border: 1px solid #2a3a4d !important;
  color: #edf4ff !important;
}

body .modal .modal-header {
  background: #17345d !important;
  border-bottom-color: #2a3a4d !important;
  color: #f5f9ff !important;
}

body .modal .modal-body,
body .modal .modal-footer {
  background: #131d29 !important;
  border-color: #2a3a4d !important;
  color: #dce8f5 !important;
}

body .modal .modal-title,
body .modal .modal-body h1,
body .modal .modal-body h2,
body .modal .modal-body h3,
body .modal .modal-body h4,
body .modal .modal-body h5,
body .modal .modal-body h6,
body .modal .modal-body p,
body .modal .modal-body span:not(.badge),
body .modal .modal-body label,
body .modal .modal-footer {
  color: #dce8f5 !important;
}

body .modal .form-control,
body .modal .form-select,
body .modal textarea {
  background: #0f1924 !important;
  border-color: #3a5068 !important;
  color: #edf4ff !important;
}

body .modal .form-control::placeholder,
body .modal textarea::placeholder {
  color: #8799ad !important;
}

body .modal .table,
body .modal .table > :not(caption) > * > * {
  background-color: transparent !important;
  border-color: #2a3a4d !important;
  color: #dce8f5 !important;
}

body .modal .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}
/* Resposta entregue no detalhe do pedido: evita utilitários claros dentro do modal. */
body .modal .bg-light,
body .modal .bg-white,
body .modal pre,
body .modal code,
body .modal .form-control[readonly],
body .modal .form-control-plaintext,
body .modal [contenteditable="true"] {
    background: #0f1924 !important;
    border-color: #3a5068 !important;
    color: #edf4ff !important;
}

body .modal pre,
body .modal code {
    white-space: pre-wrap;
}
/* Estrutura concreta do modal de detalhes do pedido. */
body .modal #orderDetailsHtml.modal-body.bg-white {
  background: #131d29 !important;
  color: #edf4ff !important;
}

body .modal #orderDetailsHtml .order-comments-section {
  background: #0f1924 !important;
  border-color: #3a5068 !important;
  color: #edf4ff !important;
}

body .modal #orderDetailsHtml .order-comments-section *,
body .modal #orderDetailsHtml .text-muted,
body .modal #orderDetailsHtml .form-label,
body .modal #orderDetailsHtml label,
body .modal #orderDetailsHtml small,
body .modal #orderDetailsHtml .text-dark {
  color: #b9c9db !important;
}

body .modal #orderDetailsHtml .order-comments-section .text-muted,
body .modal #orderDetailsHtml .order-comments-section small {
  color: #dce8f5 !important;
}
/* Navegação lateral real do painel do cliente. */
body #menu .customer-menu {
  background: #111b27 !important;
  border-color: #2a3a4d !important;
  border-radius: 8px !important;
  overflow: hidden;
  padding: 0 !important;
}

body #menu .customer-menu button.btn {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #b9c9db !important;
  display: flex;
  font-weight: 600;
  gap: 10px;
  margin: 0 !important;
  min-height: 58px;
  padding: 14px 18px !important;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease;
  width: 100%;
}

body #menu .customer-menu button.btn + button.btn {
  border-top: 1px solid #2a3a4d !important;
}

body #menu .customer-menu button.btn i {
  color: #67a9f5 !important;
  font-size: 1rem;
  text-align: center;
  width: 1.25rem;
}

body #menu .customer-menu button.btn:hover,
body #menu .customer-menu button.btn:focus-visible {
  background: #1b2b3d !important;
  color: #f5f9ff !important;
  outline: 0;
}

body #menu .customer-menu button.btn.active {
  background: #1f3650 !important;
  border-bottom-color: #2a3a4d !important;
  border-left-color: #62a6f7 !important;
  border-right: 0 !important;
  color: #f7fbff !important;
  font-weight: 700;
}

body #menu .customer-menu button.btn.active i {
  color: #8ac4ff !important;
}

@media (max-width: 767.98px) {
  body #menu .customer-menu {
    border: 1px solid #2a3a4d !important;
  }
}
/* Menu do cliente: o elemento possui simultaneamente #menu e .customer-menu. */
body #menu.customer-menu {
  background: #111b27 !important;
  border: 1px solid #2a3a4d !important;
  border-radius: 8px !important;
  overflow: hidden;
  padding: 0 !important;
}

body #menu.customer-menu button.btn {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #2a3a4d !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #b9c9db !important;
  display: flex;
  font-weight: 600;
  margin: 0 !important;
  min-height: 58px;
  padding: 14px 18px !important;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease !important;
  width: 100%;
}

body #menu.customer-menu button.btn:last-child {
  border-bottom: 0 !important;
}

body #menu.customer-menu button.btn i {
  color: #67a9f5 !important;
  font-size: 1rem;
  margin-right: 10px;
  text-align: center;
  width: 1.25rem;
}

body #menu.customer-menu button.btn:hover,
body #menu.customer-menu button.btn:focus-visible {
  background: #1b2b3d !important;
  color: #f5f9ff !important;
  outline: 0;
}

body #menu.customer-menu button.btn.active {
  background: #1f3650 !important;
  border-bottom-color: #2a3a4d !important;
  border-left-color: #62a6f7 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  color: #f7fbff !important;
  font-weight: 700;
}

body #menu.customer-menu button.btn.active i {
  color: #8ac4ff !important;
}

@media (max-width: 767.98px) {
  body #menu.customer-menu {
    border-radius: 0 !important;
  }

  body #menu.customer-menu button.btn.active {
    border-bottom: 2px solid #62a6f7 !important;
    border-left-color: transparent !important;
  }
}
/* Authentication modal: keep the two account actions as compact horizontal tabs. */
body #login .modal-content.login-content {
  background: #111b27 !important;
  border: 1px solid #2a3a4d !important;
  color: #dce8f5 !important;
}

body #login .modal-header {
  align-items: center !important;
  background: #1c3d6c !important;
  border-bottom: 1px solid #2d507d !important;
  padding: 12px 16px !important;
}

body #login .modal-header #loginLabel {
  flex: 1 1 auto;
  margin: 0;
}

body #login .analytics-tab {
  align-items: stretch !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  overflow: visible !important;
  padding: 0 !important;
}

body #login .analytics-tab .nav-item {
  flex: 0 0 auto !important;
  width: auto !important;
}

body #login .analytics-tab .nav-link {
  align-items: center !important;
  border: 1px solid transparent !important;
  border-bottom: 0 !important;
  border-radius: 5px !important;
  display: inline-flex !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  white-space: nowrap !important;
}

body #login .analytics-tab .nav-link.active {
  background: #132b4d !important;
  border-color: #3975b8 !important;
  box-shadow: inset 0 2px 0 #73b8ff !important;
}

body #login .login-form,
body #login .modal-footer {
  background: #111b27 !important;
  border-color: #2a3a4d !important;
}

body #login .form-label,
body #login .forgot-btn {
  color: #dce8f5 !important;
}

/* Add-balance flow: one readable dark surface from gateway choice to payment summary. */
body .card:has(#addAmountField) {
  background: #111b27 !important;
  border-color: #2a3a4d !important;
  color: #dce8f5 !important;
}

body .card:has(#addAmountField) .card-header,
body .card:has(#addAmountField) .card-body,
body .card:has(#addAmountField) .col-md-6,
body .card:has(#addAmountField) .custom-left-border {
  background: #111b27 !important;
  border-color: #2a3a4d !important;
  color: #dce8f5 !important;
}

body .card:has(#addAmountField) h5,
body .card:has(#addAmountField) strong,
body .card:has(#addAmountField) .saprator,
body .card:has(#addAmountField) .breadcrumb-item,
body .card:has(#addAmountField) .breadcrumb-item a {
  color: #dce8f5 !important;
}

body .card:has(#addAmountField) .text-muted,
body .card:has(#addAmountField) .small {
  color: #9fb1c7 !important;
}

body .card:has(#addAmountField) .form-control {
  background: #0d1620 !important;
  border-color: #33475d !important;
  color: #f4f8ff !important;
}

body .card:has(#addAmountField) .form-control::placeholder {
  color: #8fa6be !important;
}

body .card:has(#addAmountField) .checkbox-tile {
  background: #162434 !important;
  border: 1px solid #2f4964 !important;
  color: #e8f1fb !important;
}

body .card:has(#addAmountField) .checkbox-input:checked + .checkbox-tile {
  background: #19365a !important;
  border-color: #5d9fe7 !important;
}

body .card:has(#addAmountField) .table,
body .card:has(#addAmountField) .table td,
body .card:has(#addAmountField) .table th,
body .card:has(#addAmountField) .border-bottom,
body .card:has(#addAmountField) hr {
  background-color: transparent !important;
  border-color: #2f4358 !important;
  color: #dce8f5 !important;
}

body .card:has(#addAmountField) #modalInputs,
body .card:has(#addAmountField) #modalInputs * {
  color: #dce8f5 !important;
}

body .card:has(#addAmountField) .createInvoice {
  background: #0d3b94 !important;
  border-color: #2463c2 !important;
  color: #ffffff !important;
}
/* Keep the masked BRL marker legible inside the amount field. */
body .card:has(#addAmountField) #addAmountField {
  color: #4b5563 !important;
  -webkit-text-fill-color: #4b5563 !important;
  caret-color: #172033 !important;
}