/*--------------------------------------------------------------
# BetTrackr shared cross-app layer - common v2.0
#
# Token-driven rewrite of common_v1.8.css for the new dark theme.
# Every color now resolves through a --bettrackr-* token; there are
# no raw hex / rgb literals in this file.
#
# REQUIRES (load order at runtime):
#   1. tokens_v1.css   - defines the --bettrackr-* palette, loaded before Bootstrap
#   2. Bootstrap
#   3. theme_v1.css    - component layer, loaded after Bootstrap, before this file
#   4. common_v2.0.css - THIS file (shared app chrome: header, sidebar, footer, etc.)
#
# REMOVED / SUPERSEDED sections (now owned by theme_v1.css - do NOT re-add here):
#   - a / a:hover link resets                    (theme_v1 GLOBAL)
#   - .bg-bettrackr-blue, .text-bettrackr-green  (theme_v1 utility colors)
#   - .btn base, .btn-primary, .btn-success,
#     .btn-secondary, .btn-outline-primary,
#     .btn-outline-secondary, .btn-danger,
#     .btn-close                                 (theme_v1 BUTTONS)
#   - all card / accordion / list-group / form /
#     dropdown / toast / select2 styling         (theme_v1)
#   The dead commented-out .btn-outline-primary block from v1.8 was dropped.
#
# KEPT (repointed at tokens): shared app chrome that theme_v1 does not cover -
#   header, header-nav, sidebar, breadcrumbs, page title, back-to-top, footer,
#   nav-tabs-bordered, error-404, and the app-specific utility/button classes
#   Java still emits by name.
#
# LEGACY ALIASES: retired. Every rule has been repointed at the real
#   tokens (--bettrackr-surface / -primary / -negative / -text-muted);
#   do not reintroduce --bettrackr-blue / -green / -red / -grey.
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
:root {
  scroll-behavior: smooth;
}

/* App-specific utility classes Java emits by name. The blue/green
   counterparts (.bg-bettrackr-blue, .text-bettrackr-green) live in
   theme_v1.css; only the ones theme_v1 does NOT define are kept here. */
.bg-bettrackr-green {
  background-color: var(--bettrackr-primary) !important;
}

/* "blue" was the dark brand ink used as TEXT in v1.8; on the dark theme that
   role becomes the primary text color, not the surface the -blue alias maps to. */
.text-bettrackr-blue {
  color: var(--bettrackr-text) !important;
}

/* App-specific outline button (Java emits this class name). "blue" text/border
   becomes readable text on the dark surface; the green hover/active accent
   becomes primary. */
.btn-outline-bettrackr-blue {
  --bs-btn-color: var(--bettrackr-text);
  --bs-btn-border-color: var(--bettrackr-border);
  --bs-btn-bg: transparent;
  --bs-btn-hover-color: var(--bettrackr-primary);
  --bs-btn-hover-bg: var(--bettrackr-surface);
  --bs-btn-hover-border-color: var(--bettrackr-surface);
  --bs-btn-active-color: var(--bettrackr-primary);
  --bs-btn-active-bg: var(--bettrackr-surface);
  --bs-btn-active-border-color: var(--bettrackr-surface);
}
.btn-check:checked + .btn-outline-bettrackr-blue {
  color: var(--bettrackr-primary) !important;
  background-color: var(--bettrackr-surface) !important;
  border-color: var(--bettrackr-surface) !important;
}

body {
  font-family: var(--bettrackr-font-sans);
  background: var(--bettrackr-bg);
  color: var(--bettrackr-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Arial Pro", sans-serif;
}

/*--------------------------------------------------------------
# Main
--------------------------------------------------------------*/
#main {
  margin-top: 60px;
  margin-bottom: 0;
  padding: 10px 20px;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  #main:not(.force-top) {
    margin-top: 0;
    margin-bottom: 60px;
  }
}

@media (min-width: 1200px) {

  #main.no-sidebar,
  #footer.no-sidebar  {
    margin-left: 0 !important;
  }
}

/*--------------------------------------------------------------
# Override some default Bootstrap stylings
# (Buttons, cards, forms, toasts, etc. now live in theme_v1.css.
#  Only app-specific overrides theme_v1 does not cover remain.)
--------------------------------------------------------------*/

/* Over-time widget metric toggle: the selected metric uses the bright
   primary fill with dark on-primary text for clear contrast. */
.metric-toggle .btn.active {
  --bs-btn-active-bg: var(--bettrackr-primary);
  --bs-btn-active-border-color: var(--bettrackr-surface);
  --bs-btn-active-color: var(--bettrackr-on-primary);
}

.bg-bettrackr {
  background-color: var(--bettrackr-surface) !important;
  color: var(--bettrackr-primary) !important;
}

/* Alerts (theme_v1 does not restyle Bootstrap .alert-*) */
.alert-primary {
  --bs-alert-color: var(--bettrackr-text);
  --bs-alert-bg: var(--bettrackr-surface-alt);
  --bs-alert-border-color: var(--bettrackr-border);
  --bs-alert-link-color: var(--bettrackr-primary);
}

/*--------------------------------------------------------------
# Error 404
--------------------------------------------------------------*/
.error-404 {
  padding: 30px;
}

.error-404 h1 {
  font-size: 180px;
  font-weight: 700;
  color: var(--bettrackr-text);
  margin-bottom: 0;
  line-height: 150px;
}

.error-404 h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--bettrackr-text);
  margin-bottom: 30px;
}

@media (min-width: 992px) {
  .error-404 img {
    max-width: 50%;
  }
}


/* Bordered Tabs */
.nav-tabs-bordered {
  border-bottom: 2px solid var(--bettrackr-border);
}

.nav-tabs-bordered .nav-link {
  margin-bottom: -2px;
  border: none;
  color: var(--bettrackr-text);
}

.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus {
  color: var(--bettrackr-primary);
}

.nav-tabs-bordered .nav-link.active {
  background-color: var(--bettrackr-surface);
  color: var(--bettrackr-text);
  border-bottom: 2px solid var(--bettrackr-primary);
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/

.logo {
  line-height: 1;
}

@media (min-width: 1200px) {
  .logo {
    /* width: 280px; */
  }
}

.logo img {
  max-height: 40px;
  margin-right: 6px;
}

.logo span {
  font-size: 26px;
  font-weight: 700;
  color: var(--bettrackr-primary);
  font-family: "Nunito", sans-serif;
}

.header {
  transition: all 0.5s;
  z-index: 997;
  height: 60px;
  box-shadow: var(--bettrackr-shadow);
  background-color: var(--bettrackr-surface);
  padding-left: 20px;
  /* Toggle Sidebar Button */
  /* Search Bar */
}

.header .toggle-sidebar-btn {
  font-size: 32px;
  padding-left: 10px;
  cursor: pointer;
  color: var(--bettrackr-text);
}

/*--------------------------------------------------------------
# Header Nav
--------------------------------------------------------------*/
.header-nav ul {
  list-style: none;
}

.header-nav>ul {
  margin: 0;
  padding: 0;
}

.header-nav .nav-link {
  color: var(--bettrackr-primary);
}

.header-nav .nav-icon {
  font-size: 22px;
  position: relative;
}

.header-nav .nav-profile {
  color: var(--bettrackr-text);
}

.header-nav .nav-profile img {
  max-height: 36px;
}

.header-nav .nav-profile span {
  font-size: 14px;
  font-weight: 600;
}

.header-nav .badge-number {
  position: absolute;
  top: -2px;          /* Adjust vertically if needed */
  transform: translateX(-50%); /* Shift it back by half its width for centering */
  font-weight: normal;
  font-size: 12px;
  padding: 3px 6px;
}

.header-nav .notifications .notification-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  transition: 0.3s;
}

.header-nav .notifications .notification-item i {
  margin: 0 20px 0 10px;
  font-size: 24px;
}

.header-nav .notifications .notification-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.header-nav .notifications .notification-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: var(--bettrackr-text-muted);
}

.header-nav .notifications .notification-item:hover {
  background-color: var(--bettrackr-surface-alt);
}

.header-nav .messages {
  inset: 8px -15px auto auto !important;
}

.header-nav .messages .message-item {
  padding: 15px 10px;
  transition: 0.3s;
}

.header-nav .messages .message-item a {
  display: flex;
}

.header-nav .messages .message-item img {
  margin: 0 20px 0 10px;
  max-height: 40px;
}

.header-nav .messages .message-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--bettrackr-text);
}

.header-nav .messages .message-item p {
  font-size: 13px;
  margin-bottom: 3px;
  color: var(--bettrackr-text-muted);
}

.header-nav .messages .message-item:hover {
  background-color: var(--bettrackr-surface-alt);
}

.header-nav .profile {
  min-width: 240px;
  padding-bottom: 0;
  top: 8px !important;
}

.header-nav .profile .dropdown-header h6 {
  font-size: 18px;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--bettrackr-text);
}

.header-nav .profile .dropdown-header span {
  font-size: 14px;
}

.header-nav .profile .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.header-nav .profile .dropdown-item i {
  margin-right: 10px;
  font-size: 18px;
  line-height: 0;
}

.header-nav .profile .dropdown-item:hover {
  background-color: var(--bettrackr-surface-alt);
}
.header-nav .nav-icon:hover,
.header-nav .nav-icon:focus {
  background: var(--bettrackr-surface-hover);
  text-decoration: none;
  border-radius: 5px;
}
.header-nav .nav-link.disabled:hover,
.header-nav .nav-link.disabled:focus {
  background: var(--bettrackr-surface-hover);
  text-decoration: none;
  border-radius: 5px;
}


/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 200px;
  z-index: 996;
  transition: all 0.3s;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bettrackr-text-muted) transparent;
  box-shadow: var(--bettrackr-shadow);
  background-color: var(--bettrackr-surface);
}

@media (max-width: 768px) {
  .sidebar {
    top: 0;
    bottom: 60px;

    }
}


@media (max-width: 1200px) {
  .sidebar {
    left: -200px;
  }
}

.sidebar::-webkit-scrollbar {
  width: 5px;
  height: 8px;
  background-color: var(--bettrackr-surface);
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--bettrackr-text-muted);
}

@media (min-width: 1200px) {

  #main,
  #footer {
    margin-left: 200px;
  }
}

@media (max-width: 1200px) {
  .toggle-sidebar .sidebar {
    left: 0;
  }
}

@media (min-width: 1200px) {

  .toggle-sidebar #main,
  .toggle-sidebar #footer {
    margin-left: 0;
  }

  .toggle-sidebar .sidebar {
    left: -200px;
  }
}

.sidebar-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav li {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-item {
  margin-bottom: 5px;
}

.sidebar-nav .nav-heading {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--bettrackr-text-muted);
  font-weight: 600;
  margin: 10px 0 5px 15px;
}

/* Active / expanded link: in v1.8 this was green-on-blue, a darker fill than
   the white sidebar. On dark, use surface-alt so the highlighted item stands
   out from the sidebar's own surface. */
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--bettrackr-primary);
  transition: 0.3;
  background: var(--bettrackr-surface-alt);
  padding: 10px 15px;
  border-radius: 4px;
}

.sidebar-nav .nav-link i {
  font-size: 16px;
  margin-right: 10px;
  color: var(--bettrackr-primary);
}

.sidebar-nav .nav-link.collapsed {
  color: var(--bettrackr-text);
  background: transparent;
}

.sidebar-nav .nav-link.collapsed i {
  color: var(--bettrackr-text-muted);
}

.sidebar-nav .nav-link:hover {
  color: var(--bettrackr-primary);
  background: var(--bettrackr-surface-alt);
}

.sidebar-nav .nav-link:hover i {
  color: var(--bettrackr-primary);
}

.sidebar-nav .nav-link .bi-chevron-down {
  margin-right: 0;
  transition: transform 0.2s ease-in-out;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

.sidebar-nav .nav-content {
  padding: 5px 0 0 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav .nav-content a {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--bettrackr-text);
  transition: 0.3;
  padding: 10px 0 10px 40px;
  transition: 0.3s;
}

.sidebar-nav .nav-content a i {
  margin-right: 8px;
  line-height: 0;
  border-radius: 50%;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--bettrackr-primary);
}

.sidebar-nav .nav-content a.active i {
  background-color: var(--bettrackr-primary);
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 14px;
  font-family: "Nunito", sans-serif;
  color: var(--bettrackr-text-muted);
  font-weight: 600;
}

.breadcrumb a {
  color: var(--bettrackr-text-muted);
  transition: 0.3s;
}

.breadcrumb a:hover {
  color: var(--bettrackr-text);
}

.breadcrumb .breadcrumb-item::before {
  color: var(--bettrackr-text-muted);
}

.breadcrumb .active {
  color: var(--bettrackr-text);
  font-weight: 600;
}



/*--------------------------------------------------------------
# Page Title
--------------------------------------------------------------*/
.pagetitle {
  margin-bottom: 10px;
}

.pagetitle h1 {
  font-size: 24px;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--bettrackr-text);
}

.masthead h1, .call-to-action h2 {
  color: var(--bettrackr-text);
  font-weight: bold;
}


/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 82px; /* left of fab-rail (20px + 52px FAB + 10px gap) */
  bottom: 26px;
  z-index: 99999;
  background: var(--bettrackr-surface);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
}

.back-to-top i {
  font-size: 24px;
  color: var(--bettrackr-primary);
  line-height: 0;
}

.back-to-top:hover {
  background: var(--bettrackr-surface-hover);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  .back-to-top.active:not(.force-top) {
    bottom: 86px; /* above mobile nav, aligned with fab-rail */
  }
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  padding: 20px 0;
  font-size: 14px;
  transition: all 0.3s;
  border-top: 1px solid var(--bettrackr-border);
}

.footer .copyright {
  text-align: center;
  color: var(--bettrackr-text-muted);
}

.footer .credits {
  padding-top: 5px;
  text-align: center;
  font-size: 13px;
  color: var(--bettrackr-text-muted);
}


@media (max-width: 768px) {
  .footer:not(.force-top) {
    bottom: 60px;
    position: relative;
  }
}
