body {
  padding-top: 60px;
  padding-bottom: 40px;
}

@media only screen and (min-width: 768px) {
  .navbar-collapse.custom-menu {
    display: none !important;
  }
}

/* Top bar + mobile menu: match Bootstrap btn-primary blue
   (bootstrap-theme gradient must be cleared or the bar stays dark) */
.navbar-inverse {
  background-color: #337ab7 !important;
  background-image: none !important;
  filter: none !important;
  border-color: #2e6da4 !important;
}

.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
  color: #ffffff;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 16px;
  line-height: 26px;
  white-space: nowrap;
}

.navbar-inverse .navbar-brand-text {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  letter-spacing: 0.02em;
  text-shadow:
    -1px -1px 0 #222,
     1px -1px 0 #222,
    -1px  1px 0 #222,
     1px  1px 0 #222,
     2px  2px 3px rgba(0, 0, 0, 0.55);
}

.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.navbar-inverse .navbar-toggle {
  border-color: #2e6da4;
}

.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
  background-color: #286090;
}

.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
  border-color: #2e6da4;
}

.navbar-inverse .navbar-nav > li > a {
  color: rgba(255, 255, 255, 0.85);
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus,
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus,
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
  color: #333333 !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

@media (max-width: 767px) {
  .navbar-inverse .navbar-nav .open .dropdown-menu {
    background-color: #286090;
  }

  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a,
  .navbar-inverse .navbar-nav .dropdown-submenu > a {
    color: rgba(255, 255, 255, 0.85);
    background-color: transparent !important;
    background-image: none !important;
  }

  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus,
  .navbar-inverse .navbar-nav .dropdown-submenu:hover > a,
  .navbar-inverse .navbar-nav .dropdown-submenu:focus > a,
  .navbar-inverse .navbar-nav .dropdown-submenu.open > a,
  .navbar-inverse .navbar-nav .dropdown-menu .dropdown-menu > li > a:hover,
  .navbar-inverse .navbar-nav .dropdown-menu .dropdown-menu > li > a:focus {
    color: #333333 !important;
    background-color: #ffffff !important;
    background-image: none !important;
  }

  .navbar-inverse .navbar-nav > li.open > a .caret,
  .navbar-inverse .navbar-nav > li > a:hover .caret,
  .navbar-inverse .navbar-nav > li > a:focus .caret,
  .navbar-inverse .navbar-nav .dropdown-submenu:hover > a .caret {
    border-top-color: #333333;
    border-bottom-color: #333333;
  }

  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
    background-color: #2e6da4;
  }
}

/* Sidebar menu spacing & hierarchy */
.shrinkLeftMenuPadding {
  line-height: 1.2;
}

/* Sidebar menu: same blue theme + mobile-style text selection */
.nav-sidebar > li > a,
.nav-sidebar .dropdown-menu > li > a,
.nav-sidebar .dropdown-submenu > a {
  color: rgba(255, 255, 255, 0.85);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: normal;
  line-height: 21px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-left: none;
  background-color: transparent !important;
  background-image: none !important;
  transition: color 0.15s ease;
}

/* Selected/hover: bright white row with dark text */
.nav-sidebar > li > a:hover,
.nav-sidebar > li > a:focus,
.nav-sidebar > li.open > a,
.nav-sidebar > li.open > a:hover,
.nav-sidebar > li.open > a:focus,
.nav-sidebar > li.active > a,
.nav-sidebar > li.active > a:hover,
.nav-sidebar > li.active > a:focus,
.nav-sidebar > li > a.dropdown-toggle:hover,
.nav-sidebar > li > a.dropdown-toggle:focus,
.nav-sidebar > li.open > a.dropdown-toggle,
.nav-sidebar .dropdown-menu > li > a:hover,
.nav-sidebar .dropdown-menu > li > a:focus,
.nav-sidebar .dropdown-menu > .active > a,
.nav-sidebar .dropdown-menu > .active > a:hover,
.nav-sidebar .dropdown-menu > .active > a:focus,
.nav-sidebar .dropdown-menu .dropdown-menu > li > a:hover,
.nav-sidebar .dropdown-menu .dropdown-menu > li > a:focus,
.nav-sidebar .dropdown-submenu:hover > a,
.nav-sidebar .dropdown-submenu:focus > a,
.nav-sidebar .dropdown-submenu.open > a {
  color: #333333 !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

.nav-sidebar > li > a.dropdown-toggle {
  font-weight: normal;
  color: rgba(255, 255, 255, 0.85);
}

/* Keep closed top-level items below an open flyout (later siblings otherwise steal hover) */
.nav-sidebar > li.dropdown {
  position: relative;
  z-index: 1;
}

.nav-sidebar > li.dropdown:hover,
.nav-sidebar > li.dropdown.open {
  z-index: 2000;
}

.nav-sidebar .dropdown-menu {
  background-color: #286090;
  border: 1px solid #2e6da4;
  box-shadow: none;
  border-radius: 0;
  padding: 5px 0;
  /* Grow with longest item; links add ~50px trailing space */
  width: max-content;
  min-width: 0;
  z-index: 2010;
}

/*
 * Legacy-style horizontal flyouts: open to the RIGHT of the sidebar
 * so main menu items stay visible (not stacked over items below).
 */
.nav-sidebar > li.dropdown > .dropdown-menu {
  top: 0;
  left: 100%;
  right: auto;
  margin-top: 0;
  margin-left: 0;
  float: none;
}

/* Hide in-list flyouts; JS moves the open menu to .sidebar-flyout-host */
.sidebar-nav > li.dropdown:hover > .dropdown-menu,
.sidebar-nav .dropdown-submenu:hover > .dropdown-menu {
  display: none;
}
.sidebar-flyout-host > .dropdown-menu.flyout-fixed {
  display: block;
  position: fixed !important;
  right: auto;
  bottom: auto;
  float: none;
  margin: 0;
  z-index: 3000;
}
/* Only the JS .open submenu shows a 3rd-level panel (hover leftover menus stay closed) */
.sidebar-flyout-host .dropdown-submenu > .dropdown-menu {
  display: none;
}
.sidebar-flyout-host .dropdown-submenu.open > .dropdown-menu {
  display: block;
}

.nav-sidebar .dropdown-menu > li > a {
  padding: 3px 50px 3px 25px; /* ~50px past longest label */
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  font-weight: normal;
  line-height: 21px;
  white-space: nowrap;
  position: relative;
  display: block;
}

.nav-sidebar .divider {
  margin: 4px 0;
  background-color: #2e6da4;
}

/* Main-menu spacer: same height as a menu row (2022 &nbsp; separator) */
.nav-sidebar > li.menu-separator {
  display: block;
  margin: 0;
  padding: 4px 14px;
  line-height: 21px;
  min-height: 21px;
  list-style: none;
  pointer-events: none;
  background: transparent;
}
.nav-sidebar > li.menu-separator > span {
  display: block;
  visibility: hidden;
  font-size: 17px;
  line-height: 21px;
}

/* Keep room for an absolutely positioned caret inside the hover row */
.nav-sidebar > li.dropdown > a.dropdown-toggle {
  position: relative;
  padding-right: 22px;
}

/* Right-pointing carets — absolute so they never float outside the white row */
.nav-sidebar > li.dropdown > a.dropdown-toggle > .caret,
.nav-sidebar .dropdown-submenu > a > .caret {
  position: absolute;
  right: 8px;
  top: 50%;
  margin: -4px 0 0 0;
  float: none;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 4px solid rgba(255, 255, 255, 0.85);
  border-right: 0;
}

.nav-sidebar > li.dropdown:hover > a.dropdown-toggle > .caret,
.nav-sidebar > li.dropdown.open > a.dropdown-toggle > .caret,
.nav-sidebar > li.dropdown > a.dropdown-toggle:hover > .caret,
.nav-sidebar > li.dropdown > a.dropdown-toggle:focus > .caret,
.nav-sidebar .dropdown-submenu:hover > a > .caret,
.nav-sidebar .dropdown-submenu.open > a > .caret {
  border-left-color: #333333;
  border-top-color: transparent;
  border-bottom-color: transparent;
}

/* Disabled / unavailable items */
.nav-sidebar a.menuItemDisabled,
.nav-sidebar a.menuItemDisabled:hover,
.nav-sidebar a.menuItemDisabled:focus {
  color: rgba(255, 255, 255, 0.45) !important;
  background-color: transparent !important;
  cursor: not-allowed;
  text-decoration: none;
  pointer-events: none;
}

/* Logo above left menu */
.sidebar .sidebar-logo {
  text-align: center;
  padding: 4px 8px 10px;
  flex: 0 0 auto;
}

.sidebar .sidebar-logo img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 72px;
}

.sidebar .sidebar-user {
  list-style: none;
}
.sidebar .sidebar-user:hover {
  background: transparent;
}

/* User / date header in sidebar */
table.tblMenuUserName {
  width: 100%;
  margin: 0 0 6px;
  border-collapse: separate;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

table.tblMenuUserName td {
  padding: 6px 14px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: normal;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-word;
}

table.tblMenuUserName tr:last-child td {
  display: none; /* hide spacer row */
}

.dropdown-submenu {
  z-index: 9999;
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  margin-left: -1px;
  -webkit-border-radius: 0 6px 6px 6px;
  -moz-border-radius: 0 6px 6px;
  border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-submenu.pull-left {
  float: none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
  left: -100%;
  margin-left: 10px;
  -webkit-border-radius: 6px 0 6px 6px;
  -moz-border-radius: 6px 0 6px 6px;
  border-radius: 6px 0 6px 6px;
}

.subsubmenu {
  padding-left: 0;
}


.selectedDatatableRow {
    background-color:#f6a828;
}

.table-striped > tbody > tr:nth-of-type(odd).selectedDatatableRow {
    background-color:#f6a828;
}

.datatableHideColumn {
  display: none;
}

/* DataTables "Processing..." — more visible over large tables */
div.dataTables_wrapper {
  position: relative;
}

div.dataTables_processing {
  top: 50% !important;
  left: 50% !important;
  width: 280px !important;
  margin-left: -140px !important;
  margin-top: -28px !important;
  padding: 18px 24px !important;
  border: 2px solid #111111 !important;
  border-radius: 4px !important;
  background: rgba(34, 34, 34, 0.95) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  text-align: center !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 100 !important;
}

/* Full-page processing overlay (e.g. Agency Setup agency change postback) */
.page-processing-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10000;
}

.page-processing-overlay .page-processing-message {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  margin-left: -140px;
  margin-top: -28px;
  padding: 18px 24px;
  border: 2px solid #111111;
  border-radius: 4px;
  background: rgba(34, 34, 34, 0.95);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Shown only when JavaScript is disabled (<noscript> in the layout).
   Inline styles on the markup are the source of truth so the banner
   still looks like a warning if the stylesheet does not load. */
.js-disabled-warning,
.offline-warning {
  margin: 0 0 20px 0;
  padding: 18px 24px;
  border: 3px solid #e6e600;
  border-radius: 4px;
  background: #ffff33;
  color: #111111;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Dialog title bars: match dark navbar instead of jQuery UI orange */
.ui-dialog .ui-dialog-titlebar,
.ui-dialog .ui-widget-header {
  background: #222222;
  background-image: none;
  border: 1px solid #111111;
  color: #ffffff;
  font-weight: 600;
}

.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
  color: #ffffff;
}

/* Close button: jQuery UI 1.14 puts "Close" text in the button; draw a white × instead */
.ui-dialog .ui-dialog-titlebar-close {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 3px;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  margin: -11px 0 0 0;
  right: 0.5em;
  top: 50%;
  opacity: 1;
  padding: 0 !important;
  overflow: hidden !important;
  text-indent: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
  line-height: 0 !important;
}

.ui-dialog .ui-dialog-titlebar-close .ui-icon,
.ui-dialog .ui-dialog-titlebar-close .ui-button-icon,
.ui-dialog .ui-dialog-titlebar-close .ui-button-icon-space,
.ui-dialog .ui-dialog-titlebar-close .ui-button-icon-primary,
.ui-dialog .ui-dialog-titlebar-close .ui-button-text {
  display: none !important;
}

.ui-dialog .ui-dialog-titlebar-close::before {
  content: "\00d7"; /* × */
  color: #ffffff;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1 !important;
  text-indent: 0;
}

.ui-dialog .ui-dialog-titlebar-close:hover,
.ui-dialog .ui-dialog-titlebar-close:focus {
  background: #444444 !important;
  border-color: #ffffff !important;
  padding: 0 !important;
}

/* Session timeout: force Yes/No — no titlebar close (matches original closeOnEscape: false) */
.session-timeout-dialog .ui-dialog-titlebar-close {
  display: none !important;
}

/* Stronger modal backdrop so dialogs stand out from white page content */
.ui-widget-overlay {
  background: #000000 !important;
  opacity: 0.5 !important;
  filter: Alpha(Opacity=50);
}

/* Hide titlebar close when dialogClass includes no-close */
.no-close .ui-dialog-titlebar-close {
  display: none !important;
}

/* Shared confirm dialog chrome */
.cpcdms-confirm-dialog {
  border: 2px solid #111111 !important;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
  padding: 0;
  background: #eef3f8 !important;
}

.cpcdms-confirm-dialog .ui-dialog-content {
  padding: 1.25em 1.5em 0.75em;
  background: #eef3f8 !important;
}

.cpcdms-confirm-dialog .cpcdms-confirm-message {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: #222222;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane {
  margin-top: 0.5em;
  padding: 0.75em 1em;
  border-top: 1px solid #c5d0db;
  background: #e2eaf2;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
  float: right;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane button {
  min-width: 72px;
  margin-left: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane button.cpcdms-confirm-ok,
.cpcdms-confirm-dialog .ui-dialog-buttonpane button:first-child {
  background: #337ab7 !important;
  background-image: none !important;
  border: 1px solid #2e6da4 !important;
  color: #ffffff !important;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane button.cpcdms-confirm-ok:hover,
.cpcdms-confirm-dialog .ui-dialog-buttonpane button:first-child:hover {
  background: #286090 !important;
  border-color: #204d74 !important;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane button.cpcdms-confirm-cancel {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #adadad !important;
  color: #333333 !important;
}

.cpcdms-confirm-dialog .ui-dialog-buttonpane button.cpcdms-confirm-cancel:hover {
  background: #e6e6e6 !important;
  border-color: #8c8c8c !important;
}

/*
 * Form Cancel buttons: match Deactivate Client / Bootstrap btn-info
 * (light cyan), even when markup still uses btn-primary.
 */
input.btn[value="Cancel"],
input[type="button"][value="Cancel"],
input[type="submit"][value="Cancel"],
button.btn#btnCancel,
button#btnCancel.btn {
  color: #fff !important;
  background-color: #5bc0de !important;
  background-image: none !important;
  filter: none !important;
  border-color: #46b8da !important;
}

input.btn[value="Cancel"]:hover,
input.btn[value="Cancel"]:focus,
input[type="button"][value="Cancel"]:hover,
input[type="button"][value="Cancel"]:focus,
input[type="submit"][value="Cancel"]:hover,
input[type="submit"][value="Cancel"]:focus,
button.btn#btnCancel:hover,
button.btn#btnCancel:focus,
button#btnCancel.btn:hover,
button#btnCancel.btn:focus {
  color: #fff !important;
  background-color: #31b0d5 !important;
  background-image: none !important;
  border-color: #269abc !important;
}

input.btn[value="Cancel"]:active,
input[type="button"][value="Cancel"]:active,
input[type="submit"][value="Cancel"]:active,
button.btn#btnCancel:active,
button#btnCancel.btn:active {
  color: #fff !important;
  background-color: #269abc !important;
  background-image: none !important;
  border-color: #1b6d85 !important;
}

input.input-disabled,
input.input-disabled[readonly] {
  background-color: #EBEBE4 !important;
  border: 1px solid #ABADB3 !important;
  padding: 2px 1px;
  color: #333;
}

