/* ==========================================================================
   BMO Whitelabel Theme (Cleaned, Scoped)
   Scope: add class "theme-bmo" to <html> or <body> to activate
   Version: 1.0.0 (2026-08-04)
   Notes:
   - Palette restricted to BMO blues + neutrals. BMO Red (#ED1C24) is reserved
     for the logo roundel, secure sign-in button, negative figures, and
     alert/warning icons only — never a general UI accent. Cerulean (#73C3EB)
     covers secondary/accent tint needs instead.
   - Accessible contrast and consistent focus styles
   - Minimal !important; specificity comes from scoping
   ========================================================================== */

/* Self-hosted brand typeface (BMO's digital/secure-site font per brand guidelines) */
@font-face {
  font-family: "Heebo";
  src:
    url("../images/bmo-img/fonts/Heebo-Regular.woff2") format("woff2"),
    url("../images/bmo-img/fonts/Heebo-Regular.woff") format("woff");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   Root Tokens
   -------------------------------------------------------------------------- */
.theme-bmo {
  /* Brand */
  --app-theme-clr: #0075be;          /* Primary (accessible blue) */
  --app-accent-clr: #73c3eb;         /* Cerulean */
  --app-theme-bg-clr: #f5f6f7;       /* Albicant off-white tint */
  --app-nav-header-clr: #0075be;     /* Same as --app-theme-clr, for consistency */
  --app-font-family: "Heebo", "Segoe UI", sans-serif;

  /* Neutrals */
  --app-light-clr: #ffffff;
  --app-dark-clr: #001928;
  --app-text-clr: #001928;
  --app-muted-text-clr: #646c76;
  --app-border-clr: #d9dce1;
  --app-bg-soft: #f5f6f7;

  /* Semantics */
  --app-info-clr: #0075be;
  --app-success-clr: #0f9b2c;
  --app-warning-clr: #ffc827;
  --app-error-clr: #d12121;

  /* Controls */
  --app-checkbox-bg-clr: #0075be;
  --app-input-txt-color: #001928;
  --app-input-bg-color: #ffffff;
  --app-input-border-color: #d9dce1;
  --app-focus-ring: 0 0 0 .2rem rgba(0, 117, 190, .25);

  /* Buttons */
  --app-btn-radius: 50px;
  --app-card-radius: .75rem;
  --app-btn1-bg-clr: #0075be;
  --app-btn1-txt-clr: #ffffff;
  --app-btn1-bg-hvr-clr: #ffffff;
  --app-btn1-hover-txt-clr: #ffffff;

  --app-btn2-bg-clr: #73c3eb;
  --app-btn2-txt-clr: #001928;

  --app-btn3-bg-clr: #0075be;
  --app-btn3-hover-bg-clr: #ffffff;
  --app-btn3-hover-txt-clr: #0075be;

  --app-btn-disabled: #c7ccd1;
  --app-btn-disabled-hover: #e3e6ea;
  --app-disable-clr: #d9dce1;

  /* Tabs / Pills */
  --app-tab-btn-bg-clr: #ffffff;
  --app-tab-btn-txt-clr: #0075be;
  --app-tab-btn-checked-clr: #0075be;

  /* Badges */
  --app-badge-bg-clr: #73c3eb;
  --app-badge-txt-clr: #001928;

  /* Date Range */
  --app-daterange-bg-select-clr: #73c3eb;
  --app-daterange-txt-select-clr: #001928;

  /* Shadows */
  --app-shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --app-shadow-md: 0 2px 8px rgba(0,0,0,.08);
  --app-shadow-lg: 0 8px 24px rgba(0,0,0,.12);

  /* Ported from buyer app pattern */
  --app-btn1-hover-txt-clr:#ffffff;
  --app-btn1-hover-bg-clr:#0075be;
  --bmo-pearl-white:#f5f6f7;
}

/* --------------------------------------------------------------------------
   Base & Typography
   -------------------------------------------------------------------------- */
.theme-bmo,
.theme-bmo body,
.theme-bmo #wrapper {
  color: var(--app-text-clr);
  background: var(--app-theme-bg-clr) !important;
  font-family: "Heebo", Arial, sans-serif;
  line-height: 1.5;
}

/* Ensure main content area uses brand light tint too */
.theme-bmo .content-page,
.theme-bmo #content-page,
.theme-bmo .content,
.theme-bmo .content-page .content {
  background: var(--app-theme-bg-clr) !important;
}

/* Override inline styles set by JavaScript - must be very specific */
.theme-bmo body[style*="background-color"],
.theme-bmo #wrapper[style*="background-color"],
.theme-bmo #content-page[style*="background-color"] {
  background-color: var(--app-theme-bg-clr) !important;
}
.theme-bmo a {
  color: var(--app-theme-clr) !important;
  text-decoration-color: color-mix(in srgb, var(--app-theme-clr) 50%, #ffffff);
}

.theme-bmo a:hover {
  color: var(--app-btn1-hover-bg-clr) !important;
  text-decoration-color: var(--app-btn1-hover-bg-clr) !important;
}

/* Top-right profile toggle (nav-user) - ensure hover background is applied */
.theme-bmo #profileDropdown:hover,
.theme-bmo a.nav-link.nav-user:hover {
  color: var(--app-btn1-hover-bg-clr) !important;
  background-color: var(--bmo-pearl-white) !important;
  border: 2px solid var(--app-btn1-hover-bg-clr) !important;
}

/* Focus (use :focus-visible for keyboard) */
.theme-bmo :where(a, button, input, select, textarea, [role="button"]):focus-visible {
  outline: 0;
  box-shadow: var(--app-focus-ring);
  border-color: var(--app-theme-clr);
}

/* --------------------------------------------------------------------------
   Logos (background-image approach for reliability)
   Apply to an empty <span class="loginLogo"></span> or similar element.
   -------------------------------------------------------------------------- */
.theme-bmo .loginLogo,
.theme-bmo .brand-logo {
  display: inline-block;
  width: 200px;
  height: 48px;
  background: url('../images/bmo-img/app-logo1.png') center/contain no-repeat;
}

/* Login Page Logos */
/* Hide broken img tags and use background-image on parent anchor tag */
.theme-bmo img.login-logo-dark,
.theme-bmo img.login-logo-light {
  display: none !important;
}

/* Use parent anchor tag (.logo) for logo background */
.theme-bmo .auth-logo .logo,
.theme-bmo .auth-logo a.logo,
.theme-bmo .auth-brand .auth-logo .logo,
.theme-bmo .auth-brand .auth-logo a.logo {
  display: inline-block !important;
  width: 200px !important;
  height: 62px !important;
  min-height: 62px !important;
  background-image: url('../images/bmo-img/app-logo-blue.svg') !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  text-align: center !important;
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
}

.theme-bmo .auth-logo .logo.logo-dark,
.theme-bmo .auth-logo a.logo.logo-dark,
.theme-bmo .auth-brand .auth-logo .logo.logo-dark,
.theme-bmo .auth-brand .auth-logo a.logo.logo-dark {
  background-image: url('../images/bmo-img/app-logo-blue.svg') !important;
}

.theme-bmo .auth-logo .logo.logo-light,
.theme-bmo .auth-logo a.logo.logo-light,
.theme-bmo .auth-brand .auth-logo .logo.logo-light,
.theme-bmo .auth-brand .auth-logo a.logo.logo-light {
  background-image: url('../images/bmo-img/app-logo1.svg') !important;
}

/* Ensure auth-logo container properly displays logo */
.theme-bmo .auth-logo,
.theme-bmo .auth-brand .auth-logo {
  display: block !important;
  text-align: center !important;
  margin-bottom: 1.5rem;
}

/* Center auth-brand container */
.theme-bmo .auth-brand {
  text-align: center !important;
}

/* Login page: Show only logo-dark (for white background), hide logo-light */
.theme-bmo .auth-logo .logo.logo-dark,
.theme-bmo .auth-logo a.logo.logo-dark,
.theme-bmo .auth-brand .auth-logo .logo.logo-dark,
.theme-bmo .auth-brand .auth-logo a.logo.logo-dark {
  display: inline-block !important;
  margin: 0 auto !important;
}

.theme-bmo .auth-logo .logo.logo-light,
.theme-bmo .auth-logo a.logo.logo-light,
.theme-bmo .auth-brand .auth-logo .logo.logo-light,
.theme-bmo .auth-brand .auth-logo a.logo.logo-light {
  display: none !important;
}

/* Auth/logout pages: prevent second logo layer from generic .logo-lg background */
.theme-bmo .auth-logo .logo .logo-lg,
.theme-bmo .auth-logo a.logo .logo-lg,
.theme-bmo .auth-brand .auth-logo .logo .logo-lg,
.theme-bmo .auth-brand .auth-logo a.logo .logo-lg {
  background-image: none !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

/* Auth Fluid Right - Background Image Container */
.theme-bmo .auth-fluid {
  background: url('../images/bmo-img/bmo_auth.jpg') !important;
  background-position: center !important; /* Center the image */
  background-repeat: no-repeat !important; /* Do not repeat the image */
  background-size: 100% 100% !important; /* Stretch image to fill container both vertically and horizontally */
  justify-content: end !important;
  overflow: hidden !important; /* Login page must never scroll, under any circumstance */
}

/* "Don't have an account? Contact Us" line — trailing margin can't fix this once .card-body is
   vertically centered inside an overflow:hidden box: a taller centered block just gets pushed off
   both top AND bottom equally. Fix is to shrink the block itself (see .auth-fluid-form-box overrides
   below), not to pad the bottom. Keep this negligible, just enough to avoid it looking flush. */
.theme-bmo footer.text-center p.text-muted:last-of-type {
  margin-bottom: 0.25rem !important;
}

/* BankOps login form has more vertical content than Seller's (extra SSO button, always-visible
   Contact Us line) — compact the whole centered block so it fits inside the fixed, non-scrolling
   auth-fluid-form-box without any part (esp. the Contact Us line) being clipped top/bottom. */
.theme-bmo .auth-fluid-form-box {
  padding: 1.5rem 2rem !important;
  display: flex !important;
  flex-direction: column !important;
}

/* The centered card-body wrapper (div.d-flex.align-items-center.h-100) was consuming the box's
   entire height via h-100, pushing the sibling <footer> below the fold where overflow:hidden then
   clipped it. Let it share the box with the footer instead: take only the space the footer doesn't
   need, rather than 100% unconditionally. */
.theme-bmo .auth-fluid-form-box > div.d-flex.h-100 {
  height: auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.theme-bmo .auth-fluid-form-box > footer {
  flex: 0 0 auto !important;
}

.theme-bmo .auth-fluid-form-box .auth-brand.mb-4 {
  margin-bottom: 0.75rem !important;
}

.theme-bmo .auth-fluid-form-box p.mb-4 {
  margin-bottom: 0.75rem !important;
}

.theme-bmo .auth-fluid-form-box .form-group.mb-3,
.theme-bmo .auth-fluid-form-box .form-group.mb-2 {
  margin-bottom: 0.5rem !important;
}

.theme-bmo .auth-fluid-form-box .btn.mb-2,
.theme-bmo .auth-fluid-form-box .btn.mb-1 {
  margin-bottom: 0.4rem !important;
}

.theme-bmo .auth-fluid-right {
  background: url('../images/bmo-img/bmo_auth.jpg') !important;
  background-position: center !important; /* Center the image */
  background-repeat: no-repeat !important; /* Do not repeat the image */
  background-size: 100% 100% !important; /* Stretch image to fill container both vertically and horizontally */
}

/* Auth User Testimonial - Semi-transparent background for text readability */
.theme-bmo .auth-user-testimonial {
  background-color: rgba(0, 0, 0, 0.4) !important; /* Subtle semi-transparent dark background */
  padding: 1.5rem 2rem !important;
  border-radius: 0.75rem !important;
  -webkit-backdrop-filter: blur(2px) !important;
}

.theme-bmo .auth-user-testimonial p.lead,
.theme-bmo .auth-user-testimonial #getMeasurableImprovementMsg {
  background-color: transparent !important; /* Remove background from paragraph since container has it */
  padding: 0 !important; /* Remove padding since container has it */
  border-radius: 0 !important;
  display: block !important;
}

/* BMO Logo Images - img tags without src attribute */
/* Strategy: Hide broken img and use parent container (span) with background-image */
.theme-bmo .logo-sm img.appSmLogo,
.theme-bmo img.appSmLogo {
  display: none !important;
}

.theme-bmo .logo-lg img.appLgLogo,
.theme-bmo img.appLgLogo {
  display: none !important;
}

/* Default state (expanded sidebar): Show logo-lg, hide logo-sm */
/* Apply to all logo containers (sidebar and navbar) - must be very specific */
.theme-bmo .logo .logo-sm,
.theme-bmo .logo-sm,
.theme-bmo .logo-box .logo .logo-sm,
.theme-bmo .navbar-custom .logo-box .logo .logo-sm,
.theme-bmo .left-side-menu .logo-box .logo .logo-sm {
  display: none !important;
}

.theme-bmo .logo .logo-lg,
.theme-bmo .logo-lg,
.theme-bmo .logo-box .logo .logo-lg,
.theme-bmo .navbar-custom .logo-box .logo .logo-lg,
.theme-bmo .left-side-menu .logo-box .logo .logo-lg {
  display: inline-block !important;
  width: 137px !important;
  height: 70px !important;
  max-width: 137px !important;
  max-height: 70px !important;
  background-image: url('../images/bmo-img/app-logo-full-white-red.png') !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  margin: 0 auto;
}

/* Condensed sidebar state: Hide logo-lg, show logo-sm */
/* Apply to all logo containers (sidebar and navbar) - must be very specific */
.theme-bmo body[data-sidebar-size="condensed"] .logo .logo-sm,
.theme-bmo body[data-sidebar-size="condensed"] .logo-sm,
.theme-bmo body[data-sidebar-size=condensed] .logo .logo-sm,
.theme-bmo body[data-sidebar-size=condensed] .logo-sm,
.theme-bmo body[data-sidebar-size="condensed"] .logo-box .logo .logo-sm,
.theme-bmo body[data-sidebar-size="condensed"] .navbar-custom .logo-box .logo .logo-sm,
.theme-bmo body[data-sidebar-size="condensed"] .left-side-menu .logo-box .logo .logo-sm,
.theme-bmo body[data-sidebar-size=condensed] .logo-box .logo .logo-sm,
.theme-bmo body[data-sidebar-size=condensed] .navbar-custom .logo-box .logo .logo-sm,
.theme-bmo body[data-sidebar-size=condensed] .left-side-menu .logo-box .logo .logo-sm {
  display: inline-block !important;
  width: 45px !important;
  height: 45px !important;
  background-image: url('../images/bmo-img/app-favicon.png') !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  margin: 0 auto;
}

.theme-bmo body[data-sidebar-size="condensed"] .logo .logo-lg,
.theme-bmo body[data-sidebar-size="condensed"] .logo-lg,
.theme-bmo body[data-sidebar-size=condensed] .logo .logo-lg,
.theme-bmo body[data-sidebar-size=condensed] .logo-lg,
.theme-bmo body[data-sidebar-size="condensed"] .logo-box .logo .logo-lg,
.theme-bmo body[data-sidebar-size="condensed"] .navbar-custom .logo-box .logo .logo-lg,
.theme-bmo body[data-sidebar-size="condensed"] .left-side-menu .logo-box .logo .logo-lg,
.theme-bmo body[data-sidebar-size=condensed] .logo-box .logo .logo-lg,
.theme-bmo body[data-sidebar-size=condensed] .navbar-custom .logo-box .logo .logo-lg,
.theme-bmo body[data-sidebar-size=condensed] .left-side-menu .logo-box .logo .logo-lg {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Buttons (generic + mapped utility classes)
   -------------------------------------------------------------------------- */
.theme-bmo .btn,
.theme-bmo button,
.theme-bmo [role="button"] {
  border-radius: var(--app-btn-radius);
  color: var(--bmo-pearl-white) !important;
  background-color: var(--app-btn1-hover-bg-clr) !important;
}

.theme-bmo .btn:hover,
.theme-bmo button:hover,
.theme-bmo [role="button"]:hover {
  color: var(--app-btn1-hover-bg-clr) !important;
  background-color: var(--bmo-pearl-white) !important;
  border-color: var(--app-btn1-hover-bg-clr) !important;
}

/* Dropdown menu items: keep neutral by default, brand blue only on hover */
.theme-bmo .dropdown-menu .dropdown-item {
  color: var(--app-theme-clr) !important;
  background-color: #ffffff !important;
  border: 0 !important;
}

.theme-bmo .dropdown-menu .dropdown-item:hover,
.theme-bmo .dropdown-menu .dropdown-item:focus,
.theme-bmo .dropdown-menu .dropdown-item.active,
.theme-bmo .dropdown-menu .dropdown-item:active {
  color: #ffffff !important;
  background-color: var(--app-theme-clr) !important;
}

/* Persist brand color for selected page-size option */
.theme-bmo .dropdown-menu .dropdown-item[aria-current="true"],
.theme-bmo .dropdown-menu .dropdown-item[aria-selected="true"],
.theme-bmo .dropdown-menu .dropdown-item.selected {
  color: #ffffff !important;
  background-color: var(--app-theme-clr) !important;
}

/* Primary */
.theme-bmo .btn-primary,
.theme-bmo .fis-btn,
.theme-bmo .btnLogin {
  border-radius: var(--app-btn-radius);
  color: var(--bmo-pearl-white) !important;
  background-color: var(--app-btn1-hover-bg-clr) !important;
}
.theme-bmo .btn-primary:hover,
.theme-bmo .fis-btn:hover,
.theme-bmo .btnLogin:hover {
  color: var(--app-btn1-hover-bg-clr) !important;
  background-color: var(--bmo-pearl-white) !important;
  border-color: var(--app-btn1-hover-bg-clr) !important;
}
.theme-bmo .btn-primary:active,
.theme-bmo .fis-btn:active,
.theme-bmo .btnLogin:active {
  background: var(--app-btn-disabled-hover);
  border-color: var(--app-btn-disabled);
}
.theme-bmo .btn-primary:disabled,
.theme-bmo .fis-btn:disabled,
.theme-bmo .btnLogin:disabled {
  color: #666;
  background: var(--app-disable-clr);
  border-color: var(--app-disable-clr);
}

/* Accent (Cerulean) */
.theme-bmo .btn-accent,
.theme-bmo .btn-warning,
.theme-bmo .btn-secondary {
  color: var(--app-btn2-txt-clr);
  background: var(--app-btn2-bg-clr);
  border-color: var(--app-btn2-bg-clr);
}
.theme-bmo .btn-accent:hover,
.theme-bmo .btn-warning:hover,
.theme-bmo .btn-secondary:hover {
  filter: brightness(0.95);
}

/* Outline brand */
.theme-bmo .btn-outline-brand {
  color: var(--app-theme-clr);
  background: transparent;
  border-color: var(--app-theme-clr);
}
.theme-bmo .btn-outline-brand:hover {
  color: var(--app-light-clr);
  background: var(--app-theme-clr);
  border-color: var(--app-theme-clr);
}

/* Destructive */
.theme-bmo .btn-danger {
  color: #ffffff;
  background: var(--app-error-clr);
  border-color: var(--app-error-clr);
}
.theme-bmo .btn-danger:hover { filter: brightness(0.95); }

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */
.theme-bmo input,
.theme-bmo select,
.theme-bmo textarea {
  color: var(--app-input-txt-color);
  background: var(--app-input-bg-color);
  border: 1px solid var(--app-input-border-color);
  border-radius: .5rem;
  padding: .5rem .75rem;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.theme-bmo input:focus,
.theme-bmo select:focus,
.theme-bmo textarea:focus { border-color: var(--app-theme-clr); box-shadow: var(--app-focus-ring); }

/* Specific legacy class override (from original file) */
.theme-bmo .loginInputTxt {
  border: 1px solid var(--app-input-border-color);
  border-radius: .5rem;
  padding: .5rem .75rem;
  background: var(--app-input-bg-color);
  color: var(--app-input-txt-color);
}

/* Checkboxes */
.theme-bmo .form-check-input[type="checkbox"] {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--app-input-border-color);
  border-radius: .25rem;
}
.theme-bmo .form-check-input[type="checkbox"]:checked {
  background-color: var(--app-checkbox-bg-clr);
  border-color: var(--app-checkbox-bg-clr);
}
.theme-bmo .form-check-input:focus { box-shadow: var(--app-focus-ring); border-color: var(--app-checkbox-bg-clr); }

/* --------------------------------------------------------------------------
   Navigation Bar / Header
   -------------------------------------------------------------------------- */
.theme-bmo .navbar-custom {
  background-color: var(--app-theme-clr) !important;
  box-shadow: var(--app-shadow-md);
}
/* Hide navbar logo-box - sidebar already has the logo */
.theme-bmo .navbar-custom .logo-box {
  display: none !important;
}
.theme-bmo .navbar-custom .topnav-menu .nav-link {
  color: rgba(255, 255, 255, 0.75);
}
.theme-bmo .navbar-custom .topnav-menu .nav-link:hover {
  color: #ffffff;
}
.theme-bmo .navbar-custom .topnav-menu .nav-link.nav-user:hover,
.theme-bmo .navbar-custom .topnav-menu #profileDropdown:hover {
  color: var(--app-btn1-hover-bg-clr) !important;
  background: var(--bmo-pearl-white) !important;
  background-color: var(--bmo-pearl-white) !important;
  box-shadow: inset 0 0 0 1000px var(--bmo-pearl-white) !important;
  border-color: var(--app-btn1-hover-bg-clr) !important;
}

.theme-bmo .profile-dropdown .dropdown-item:hover,
.theme-bmo .profile-dropdown .dropdown-item:focus {
  color: var(--app-btn1-hover-bg-clr) !important;
  background: var(--bmo-pearl-white) !important;
  background-color: var(--bmo-pearl-white) !important;
}
.theme-bmo .navbar-custom .button-menu-mobile {
  color: var(--bmo-pearl-white) !important;
}

.theme-bmo .navbar-custom .button-menu-mobile:hover {
  color: var(--bmo-pearl-white) !important;
  background: var(--app-btn1-hover-bg-clr) !important;
  background-color: var(--app-btn1-hover-bg-clr) !important;
  border-color: var(--app-btn1-hover-bg-clr) !important;
}
.theme-bmo .navbar-custom .dropdown .nav-link.show {
  background-color: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   Sidebar / Left Menu
   -------------------------------------------------------------------------- */
.theme-bmo .left-side-menu {
  background: var(--app-light-clr) !important;
  box-shadow: var(--app-shadow-md);
}

/* Logo box in sidebar - match navbar background color (brand blue) */
/* Must override compiled CSS which sets background-color: #0056c1 */
.theme-bmo .logo-box,
.theme-bmo .left-side-menu .logo-box,
.theme-bmo body .logo-box,
.theme-bmo html .logo-box,
html.theme-bmo .logo-box,
html.theme-bmo body .logo-box,
html.theme-bmo .left-side-menu .logo-box {
  background-color: var(--app-theme-clr) !important;
  background: var(--app-theme-clr) !important;
  /* Center logo both vertically and horizontally */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
}

/* Ensure logo container is centered within logo-box and fills exact height */
.theme-bmo .logo-box .logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
  line-height: 70px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.theme-bmo .logo-box .logo .logo-lg-text-dark {
  color: var(--app-light-clr);
}

.theme-bmo .logo-box .logo .logo-lg-text-light {
  color: var(--app-light-clr);
}

/* Sidebar menu items */
.theme-bmo .left-side-menu #sidebar-menu > ul > li > a {
  color: var(--app-text-clr);
  transition: color .15s ease, background-color .15s ease;
}

.theme-bmo .left-side-menu #sidebar-menu > ul > li > a:hover,
.theme-bmo .left-side-menu #sidebar-menu > ul > li > a:focus,
.theme-bmo .left-side-menu #sidebar-menu > ul > li > a:active {
  color: var(--app-theme-clr);
  background-color: var(--app-theme-bg-clr);
}

.theme-bmo .left-side-menu #sidebar-menu > ul > li > a.mm-active,
.theme-bmo .left-side-menu #sidebar-menu .menuitem-active > a {
  color: #ffffff !important;
  font-weight: 600;
  background-color: var(--app-theme-clr) !important;
}

.theme-bmo .left-side-menu #sidebar-menu .menuitem-active .active {
  color: #ffffff !important;
}

.theme-bmo .left-side-menu #sidebar-menu > ul > li > a.mm-active i,
.theme-bmo .left-side-menu #sidebar-menu .menuitem-active > a i,
.theme-bmo .left-side-menu #sidebar-menu .menuitem-active .active i,
.theme-bmo .left-side-menu #sidebar-menu > ul > li ul .active i,
.theme-bmo .left-side-menu #sidebar-menu .nav-second-level li.active > a i,
.theme-bmo .left-side-menu #sidebar-menu > ul > li > a.mm-active svg,
.theme-bmo .left-side-menu #sidebar-menu .menuitem-active > a svg,
.theme-bmo .left-side-menu #sidebar-menu .menuitem-active .active svg,
.theme-bmo .left-side-menu #sidebar-menu > ul > li ul .active svg,
.theme-bmo .left-side-menu #sidebar-menu .nav-second-level li.active > a svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* Sidebar expand/collapse arrow color behavior */
.theme-bmo .left-side-menu #sidebar-menu .menu-arrow::before {
  color: var(--app-theme-clr) !important;
}

.theme-bmo .left-side-menu #sidebar-menu > ul > li > a.mm-active .menu-arrow::before,
.theme-bmo .left-side-menu #sidebar-menu .menuitem-active > a .menu-arrow::before,
.theme-bmo .left-side-menu #sidebar-menu > ul > li ul .active > a .menu-arrow::before,
.theme-bmo .left-side-menu #sidebar-menu .nav-second-level li.active > a .menu-arrow::before {
  color: #ffffff !important;
}

.theme-bmo .left-side-menu #sidebar-menu .menu-title {
  color: var(--app-muted-text-clr);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sub-menu items */
.theme-bmo .left-side-menu #sidebar-menu > ul > li ul a {
  color: var(--app-text-clr);
}

.theme-bmo .left-side-menu #sidebar-menu > ul > li ul a:hover,
.theme-bmo .left-side-menu #sidebar-menu > ul > li ul a:active,
.theme-bmo .left-side-menu #sidebar-menu > ul > li ul a:focus {
  color: var(--app-theme-clr);
  background-color: var(--app-theme-bg-clr);
}

.theme-bmo .left-side-menu #sidebar-menu > ul > li ul .active,
.theme-bmo .left-side-menu #sidebar-menu .nav-second-level li.active > a {
  color: #ffffff !important;
  background-color: var(--app-theme-clr) !important;
}

/* --------------------------------------------------------------------------
   Navigation, Tabs, Pills
   -------------------------------------------------------------------------- */
.theme-bmo .nav-pills .nav-link {
  color: var(--app-tab-btn-txt-clr);
  background: var(--app-tab-btn-bg-clr);
  border: 2px solid var(--app-border-clr);
  border-radius: 999px;
}
.theme-bmo .nav-pills .nav-link:hover { border-color: var(--app-tab-btn-checked-clr); }
.theme-bmo .nav-pills .nav-link.active,
.theme-bmo .nav-pills .show > .nav-link {
  color: #ffffff;
  background: var(--app-theme-clr);
  border-color: var(--app-theme-clr);
}

/* Wizard chips */
.theme-bmo .form-wizard-header .nav-item .nav-link {
  color: var(--app-text-clr);
  background: color-mix(in srgb, var(--app-theme-clr) 50%, #ffffff);
  border: 2px solid color-mix(in srgb, var(--app-theme-clr) 50%, #ffffff);
  border-radius: 999px;
}
.theme-bmo .form-wizard-header .nav-item .nav-link .number {
  color: #ffffff;
  background: color-mix(in srgb, var(--app-theme-clr) 40%, #ffffff);
  border-radius: 999px;
  padding: 0 .5rem;
}
.theme-bmo .form-wizard-header .nav-item .nav-link.active,
.theme-bmo .form-wizard-header .nav-item .nav-link.active .number {
  color: #ffffff;
  background: var(--app-theme-clr);
  border-color: var(--app-theme-clr);
}

/* Header tabs (example legacy selectors) */
.theme-bmo .headerTab .headerTitle,
.theme-bmo .headerTab h1,
.theme-bmo .headerTab h2 {
  color: var(--app-theme-clr);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.theme-bmo .page-link { color: var(--app-theme-clr); }
.theme-bmo .page-item.active .page-link {
  color: #ffffff !important;
  background: var(--app-theme-clr);
  border: 2px solid var(--app-theme-clr);
}
.theme-bmo .page-item.active .page-link:hover,
.theme-bmo .page-item.active .page-link:focus,
.theme-bmo .page-item.active .page-link:active {
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Badges & Chips
   -------------------------------------------------------------------------- */
.theme-bmo .badge,
.theme-bmo .chip {
  border-radius: var(--app-btn-radius);
  color: var(--bmo-pearl-white) !important;
  background-color: var(--app-btn1-hover-bg-clr) !important;
  border-radius: 999px;
  padding: .125rem .5rem;
  border: 1px solid transparent;
}


.theme-bmo .badge:hover,
.theme-bmo .chip:hover {
  border-radius: var(--app-btn-radius);
  color: var(--app-btn1-hover-bg-clr) !important;
  background-color: var(--bmo-pearl-white) !important;
  border-color: var(--app-btn1-hover-bg-clr) !important;
  border-radius: 999px;
  padding: .125rem .5rem;
  border: 1px solid transparent;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.theme-bmo table {
  border-collapse: separate;
  border-spacing: 0;
}
.theme-bmo th, .theme-bmo td {
  border-bottom: 1px solid var(--app-border-clr);
  padding: .75rem;
}
.theme-bmo thead th {
  color: var(--app-dark-clr);
  background: var(--app-bg-soft);
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.theme-bmo .alert-info    { background: color-mix(in srgb, var(--app-info-clr) 10%, #ffffff);    border-left: 4px solid var(--app-info-clr); }
.theme-bmo .alert.alert-info.sub-heading-alert {
  background: var(--app-light-clr) !important;
  color: var(--app-theme-clr) !important;
  border: 1px solid var(--app-theme-clr) !important;
  border-left: 4px solid var(--app-theme-clr) !important;
}
.theme-bmo .alert.alert-primary.sub-heading-alert {
  background: var(--app-light-clr) !important;
  color: var(--app-theme-clr) !important;
  border: 1px solid var(--app-theme-clr) !important;
  border-left: 4px solid var(--app-theme-clr) !important;
}
.theme-bmo .alert-success { background: color-mix(in srgb, var(--app-success-clr) 10%, #ffffff); border-left: 4px solid var(--app-success-clr); }
.theme-bmo .alert.alert-warning {
  background: var(--app-light-clr);
  color: var(--app-theme-clr);
  border: 1px solid var(--app-theme-clr);
  border-left: 4px solid var(--app-theme-clr);
}
.theme-bmo .alert-danger  { background: color-mix(in srgb, var(--app-error-clr) 10%, #ffffff);   border-left: 4px solid var(--app-error-clr); }

/* --------------------------------------------------------------------------
   Date Range / Calendar (class names from original hints)
   -------------------------------------------------------------------------- */
.theme-bmo .custom-day.range,
.theme-bmo .custom-day:hover {
  color: var(--app-daterange-txt-select-clr);
  background: var(--app-daterange-bg-select-clr);
}

/* --------------------------------------------------------------------------
   Cards & Panels
   -------------------------------------------------------------------------- */
.theme-bmo .card,
.theme-bmo .panel {
  border: 1px solid var(--app-border-clr);
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-shadow-md);
  background: #fff;
}
.theme-bmo .card-header,
.theme-bmo .panel-header {
  color: var(--app-dark-clr);
  background: var(--app-bg-soft);
  border-bottom: 1px solid var(--app-border-clr);
}

/* --------------------------------------------------------------------------
   Utility Helpers
   -------------------------------------------------------------------------- */
.theme-bmo .text-brand { color: var(--app-theme-clr) !important; }
.theme-bmo .bg-brand   { background: var(--app-theme-clr) !important; color: #ffffff !important; }
.theme-bmo .bg-accent  { background: var(--app-theme-clr) !important; color: #111111 !important; }
.theme-bmo .border-brand{ border-color: var(--app-theme-clr) !important; }

/* --------------------------------------------------------------------------
   Responsive Touch-ups
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .theme-bmo .loginLogo,
  .theme-bmo .brand-logo { width: 170px; height: 40px; }
}
@media (max-width: 768px) {
  .theme-bmo .card, .theme-bmo .panel { border-radius: calc(var(--app-card-radius) - .25rem); }
}
@media (max-width: 576px) {
  .theme-bmo .loginLogo,
  .theme-bmo .brand-logo { width: 150px; height: 36px; }
}

/* --------------------------------------------------------------------------
   Responsive Layout — Mobile & Tablet
   -------------------------------------------------------------------------- */

/* ── ≤ 991px: sidebar becomes an overlay drawer ───────────── */
@media (max-width: 991.98px) {

  /* Content fills full width — no sidebar offset */
  .theme-bmo .content-page,
  .theme-bmo #content-page {
    margin-left: 0 !important;
  }

  /* Topbar spans full width */
  .theme-bmo .navbar-custom {
    left: 0 !important;
    margin-left: 0 !important;
  }

  /* Sidebar hidden by default on mobile */
  .theme-bmo .left-side-menu {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }

  /* Show sidebar as overlay when sidebar-enable is active */
  .theme-bmo body.sidebar-enable .left-side-menu {
    display: block !important;
  }

  /* Backdrop — covers content behind the open drawer */
  .theme-bmo .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1049;
  }

  .theme-bmo body.sidebar-enable .sidebar-backdrop {
    display: block;
  }

  /* Always show the hamburger button */
  .theme-bmo .button-menu-mobile {
    display: inline-flex !important;
  }
}

/* ── ≤ 767px: phone ───────────────────────────────────────── */
@media (max-width: 767.98px) {

  /* Tighter content padding */
  .theme-bmo .content-page {
    padding: 70px 10px 30px !important;
  }

  /* Hide username text in topbar — keep avatar icon */
  .theme-bmo .navbar-custom .pro-user-name {
    display: none !important;
  }

  /* Tables always horizontally scrollable */
  .theme-bmo .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Stat/filter pill rows: allow wrapping */
  .theme-bmo .row.mb-md-2 {
    flex-wrap: wrap;
  }

  /* Pagination: compact */
  .theme-bmo .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  /* Cards: reduce bottom margin */
  .theme-bmo .card {
    margin-bottom: 0.75rem;
  }
}

/* ── ≤ 575px: small phone ─────────────────────────────────── */
@media (max-width: 575.98px) {

  .theme-bmo .content-page {
    padding: 60px 8px 20px !important;
  }

  /* Page title area */
  .theme-bmo .page-title-box {
    padding: 0.5rem 0.75rem;
  }

  /* Filter/action buttons: stack vertically */
  .theme-bmo .dt-buttons,
  .theme-bmo .dataTables_filter {
    width: 100%;
    text-align: left !important;
  }

  /* Status filter tabs: wrap */
  .theme-bmo .btn-group {
    flex-wrap: wrap;
    gap: 4px;
  }

  .theme-bmo .btn-group .btn {
    flex: 1 1 auto;
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
  }

  /* Record-count badge: smaller */
  .theme-bmo .badge,
  .theme-bmo .show-records-badge {
    font-size: 0.72rem;
  }
}

/* --------------------------------------------------------------------------
   End
   -------------------------------------------------------------------------- */
