:root {
  --bs-border-radius: 0.25rem;
  --bs-border-radius-sm: 0.2rem;
  --bs-border-radius-lg: 0.25rem;
  --bs-border-radius-xl: 0.25rem;
  --bs-border-radius-xxl: 0.25rem;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-bottom: 0;
}

.footer {
  margin-top: auto;
}

.page-content,
.flash-container {
  max-width: 1750px;
  margin-left: auto;
  margin-right: auto;
}

.page-content {
  padding-top: 30px;
  padding-bottom: 45px;
  padding-left: 24px;
  padding-right: 24px;
}

.page-title,
.box-header h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.page-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
}

.page-title .btn {
  margin-left: auto;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.page-content .card {
  margin-bottom: 24px;
}

.page-content h2 {
  font-size: 24px;
  font-weight: 500;
}

.page-content h3 {
  font-size: 20px;
  font-weight: 600;
}

.page-content h4 {
  font-size: 17px;
  font-weight: 600;
}

/* Login form styling - Bootstrap 3 form-signin pattern */
.form-signin {
  max-width: 400px;
  padding: 25px;
  margin: 40px auto;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.form-signin .form-signin-heading,
.form-signin .checkbox {
  margin-bottom: 20px;
  text-align: center;
}

.form-signin .form-signin-heading {
  color: #31AAE5;
  font-size: 28px;
  margin-bottom: 25px;
}

.form-signin .checkbox {
  font-weight: normal;
  margin-bottom: 15px;
}

.form-signin .form-control {
  position: relative;
  height: auto;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 12px;
  font-size: 16px;
  margin-bottom: 15px;
}

.form-signin .form-control:focus {
  z-index: 2;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 15px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.form-signin .btn-block {
  display: block;
  width: 100%;
  margin-top: 10px;
}

.form-signin a {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #31AAE5;
}

.form-signin a[href*="resetting"] {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 14px;
}

.form-signin .input-group.col-centered {
  margin-top: 20px;
  text-align: center;
}

/* Login page error messages */
.form-signin + div,
.form-signin ~ div {
  text-align: center;
  max-width: 400px;
  margin: 0 auto 20px;
  padding: 15px;
  border-radius: 4px;
}

.col-centered {
  margin: 0 auto;
  float: none;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* Fix navbar bullets when Sonata Admin CSS is loaded */
.navbar-nav,
.navbar .navbar-nav,
.navbar-collapse .navbar-nav,
nav .navbar-nav {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  /* Do NOT set margin-left to 0 to allow ms-auto class to work */
}

.navbar-nav > li,
.navbar .navbar-nav > li {
  list-style-type: none !important;
}

/* Hide empty buttons and inputs in navbar */
.navbar-nav button:empty,
.navbar-nav input:empty,
.navbar button:empty,
.navbar input:empty {
  display: none !important;
}

/* Hide hidden form inputs in navbar */
.navbar input[type="hidden"],
.navbar-nav input[type="hidden"],
.navbar form input[type="hidden"] {
  display: none !important;
}

/* Fix navbar alignment with Bootstrap 3 and Bootstrap 5 compatibility */
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .navbar-collapse {
  display: none;  /* Bootstrap 3 default - hidden by default */
  flex-grow: 1;
}

/* When navbar is expanded (has .in class), show it with flex */
.navbar .navbar-collapse.in {
  display: flex !important;
  justify-content: flex-end;
}

/* For expanded navbars (when toggle is not active on desktop) */
@media (min-width: 992px) {
  /* Override Bootstrap 3's .collapse display: none on desktop */
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    justify-content: flex-end !important;
  }

  /* Hide the toggle button on desktop */
  .navbar-expand-lg .navbar-toggler {
    display: none !important;
  }
}

/* Bootstrap 5 utility classes for Bootstrap 3 compatibility */

/* Margin utilities */
.ms-auto {
  margin-left: auto !important;
}
.me-auto {
  margin-right: auto !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}

/* Responsive margin utilities (Bootstrap 5 breakpoint: lg = 992px) */
@media (min-width: 992px) {
  .mb-lg-0 {
    margin-bottom: 0 !important;
  }
}

/* Padding utilities */
.p-2 {
  padding: 0.5rem !important;
}
.pe-0 {
  padding-right: 0 !important;
}
.ps-0 {
  padding-left: 0 !important;
}

/* Display utilities */
.d-flex {
  display: flex !important;
}

.navbar .navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  /* Do not force margin-left here - let ms-auto class work */
}

.navbar .navbar-nav.ms-auto {
  margin-left: auto !important;
}

.navbar .navbar-nav .nav-item {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.navbar .navbar-nav .nav-item:first-child {
  margin-left: 0;
}

.navbar .navbar-nav .nav-link {
  padding: 8px 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
}

/* EcoScandic theme colors */
.btn-primary {
  background-color: #6DB300;
  border-color: #CBCBCB;
}

.btn-primary:hover {
  background-color: #5a9000;
  border-color: #a8a8a8;
}

.btn-lg {
  padding: 10px 40px;
  margin: 5px 5px;
}

/* Jumbotron replacement for Bootstrap 5 */
.jumbotron {
  padding: 20px;
  padding-top: 10px;
  background-color: #31AAE5;
  color: white;
  text-align: center;
  border-top: 1px solid #979797;
  border-bottom: 1px solid #979797;
  border-radius: 0;
}

.navbar {
  margin-bottom: 0;
  border-radius: 0;
}

.navbar-light.bg-light {
  background-color: #f8f8f8 !important;
  border-bottom: 1px solid #e7e7e7;
}

/* Bootstrap 5 navbar compatibility - toggler is handled in the media query above */

.navbar .navbar-toggler {
  border: 1px solid #ccc;
  padding: 4px 8px;
  background-color: transparent;
}

.navbar .navbar-toggler:hover {
  background-color: #e7e7e7;
}

.navbar .navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  content: "";
  background: no-repeat center center;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .navbar-brand {
  padding: 8px 15px;
}

.footer {
  background-color: #31AAE5;
  border-top: 1px solid #979797;
  padding: 26px 0;
}

.footer .container {
  background-color: transparent;
}

.footer p {
  text-align: center;
  color: #fff;
  margin-bottom: 8px;
}

.footer p:last-child {
  margin-bottom: 0;
}

.footer .footer-app {
  margin-top: 18px;
}

.footer a {
  color: #fff;
  text-decoration: underline;
}

.footer a:hover {
  color: #eaf6fd;
}

.logo img + span {
  margin-left: 10px;
  width: auto;
}

.col-centered {
  float: none;
  margin: 0 auto;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}

.inline-label {
  display: inline;
}

.inline-label,
.checkbox label,
.form-check-label,
label.inline-label {
  font-weight: normal;
  margin-top: 0;
}

.input-group.col-centered {
  margin-top: 20px;
}

/* Form controls - Bootstrap 5 */
input[type='text'],
input[type='email'],
input[type='password'],
select {
  width: 100%;
}

div.flash-success {
  text-align: center;
  color: #3c763d;
  background-color: #dff0d8;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #d6e9c6;
  border-radius: 4px;
}

div.flash-failure {
  text-align: center;
  color: #a94442;
  background-color: #f2dede;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #ebccd1;
  border-radius: 4px;
}

/* Use Bootstrap 5 alert classes as fallback */
.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}
.cts-header {
  text-align: center;
}
.cts-header.recyclingjob h3 {
  background-color: #FF8000;
  color: white;
  padding: 10px;
  margin: 0 auto;
}
.cts-header.salesjob h3 {
  background-color: #6DB300;
  color: white;
  padding: 10px;
  margin: 0 auto;
}
.customer-rj-tab a {
  color: #FF8000;
}
li.customer-index-tab.active a {
  font-weight: bold;
}
li.customer-rj-tab.active > a {
  color: #FF8000;
  font-weight: bold;
}
.customer-sj-tab a {
  color: #6DB300;
}
li.customer-sj-tab.active > a {
  color: #6DB300;
  font-weight: bold;
}
.recycling-job-print-link.printed {
  color: #551A8B;
}
/* ES-CHG-7 */
#usersTable_wrapper table i {
  cursor: pointer;
}
/* ES-CHG-1 */
.menuHolder {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  align-self: flex-start;
}
.menuHolder h3 {
  font-size: 18px;
  margin: 0 0 10px 0;
}
.menuHolder .nav {
  margin-bottom: 25px;
}
.menu-sub-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #31AAE5;
}
.menulabels {
  margin: 0 0 4px 0;
  font-size: 12px;
  text-transform: uppercase;
  color: #31AAE5;
}
.menuHolder .nav .nav-item {
  border-bottom: 1px solid #eee;
}
.menuHolder .nav .menuitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #333;
}
.menuHolder .nav .nav-item:hover {
  background: #f5fbfe;
}
.menuHolder .nav .nav-item.active {
  background: #eaf6fd;
  box-shadow: inset 3px 0 0 #31AAE5;
}
#bulkReadyWarning {
  display: block;
  margin-bottom: 8px;
  color: #dd4b39;
  font-size: 12px;
}
.btn-primary:disabled,
.btn-primary.disabled {
  background-color: #6DB300;
  border-color: #CBCBCB;
  opacity: 0.65;
}
.bulk_cylinder_form_cylinders-collection-rescue-add {
  margin: 5px 0;
}
.bulkList > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  max-width: 480px;
  /* override Bootstrap's mb-3 !important on the prototype row */
  margin-bottom: 8px !important;
}
.bulkList > div > label {
  flex-basis: 100%;
  margin: 0;
}
.bulkList > div > input.form-control {
  flex: 1;
  width: auto;
}
#bulkList {
  list-style-type: none;
}
.bulkActionItem {
  margin-bottom: 10px;
  display: inline-flex;
  width: 100%;
}
.bulkButtons {
  border-top: 1px solid #ccc;
  padding-top: 20px;
}
#bulkStart {
  background-color: #31AAE5;
}
#bulkCancel {
  background-color: #dc3545;
}
.jobtable th,
.jobtable td {
  padding-top: 4px;
  padding-bottom: 4px;
}

.messagestable th,
.messagestable td {
  padding: 4px 8px;
}

/* Inline label + input rows on job step forms; label width matches
   the 175px th column of the detail tables above */
.field-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.field-inline > label {
  flex: 0 0 175px;
  margin: 0;
}

.field-inline-widget {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 767.98px) {
  .field-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .field-inline > label {
    flex-basis: auto;
  }
}

.bulkCylinderItem {
  display: none;
}
.bulkCylinderItem.active {
  display: inline-block;
}
/* ES-CHG-13 */
#customerOverview {
  margin: 20px 0 30px 0;
  padding-bottom: 20px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
#customerOverview .col {
  padding: 0.5em;
}
#customerOverview .col h4 {
  line-height: 40px;
  border-bottom: 3px solid #6DB300;
}
#customerOverview .recycledCount,
#customerOverview .salesCount {
  margin-bottom: 5px;
}
#customerOverview .ecoBlue {
  color: #31AAE5;
  text-transform: uppercase;
  font-size: 16px;
}
#customerOverview .ecoGreen {
  color: #6DB300;
  text-transform: uppercase;
  font-size: 16px;
}
#customerOverview .ecoCount {
  border: 1px solid #ccc;
  padding: 0 8px;
  margin-right: 3px;
  color: #4d4d4d;
}
#cylinderSubMenu {
  display: none;
}
ul.nav li.customer-index-tab:hover #cylinderSubMenu {
  display: initial;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
ul.nav li.customer-index-tab:hover #cylinderSubMenu li {
  margin-bottom: 1px;
}
ul.nav li.customer-index-tab:hover #cylinderSubMenu li a {
  background: #fff;
  color: #000;
  display: block;
}
#typeRjSubMenu,
#typeSjSubMenu {
  display: none;
}
#typeRjSubMenu .customer-rj-tab,
#typeSjSubMenu .customer-sj-tab {
  height: 34px;
}
ul.nav li.customer-index-tab li.customer-rj-tab:hover #typeRjSubMenu,
ul.nav li.customer-index-tab li.customer-sj-tab:hover #typeSjSubMenu {
  display: initial;
  position: absolute;
  right: -112px;
  list-style-type: none;
}
ul.nav li.customer-index-tab li.customer-rj-tab:hover #typeRjSubMenu {
  top: 0px;
}
ul.nav li.customer-index-tab li.customer-sj-tab:hover #typeSjSubMenu {
  top: 35px;
}
ul.nav li.customer-index-tab li.active a {
  background: #999999 !important;
}
ul.nav li.customer-index-tab li.customer-sj-tab:hover a.sublink,
ul.nav li.customer-index-tab li.customer-sj-tab #typeSjSubMenu li:hover a {
  background: #6DB300 !important;
}
ul.nav li.customer-index-tab li.customer-rj-tab:hover a.sublink,
ul.nav li.customer-index-tab li.customer-rj-tab #typeRjSubMenu li:hover a {
  background: #FF8000 !important;
}
table.dataTable > tbody > tr.child ul.dtr-details li {
  white-space: normal;
}
.statisticsYear {
  text-transform: uppercase;
  margin-right: 10px;
}
.yearButton {
  color: #fff;
  padding: 6px 10px;
  background: #31AAE5;
  cursor: pointer;
}

/* DataTables pagination and export buttons */
.dataTables_wrapper .row {
  align-items: center;
}

/* Let long column titles wrap instead of forcing wide columns */
table.dataTable thead th,
table.dataTable.nowrap thead th {
  white-space: normal;
  vertical-align: middle;
}

/* Tables take their natural width, aligned left; wrappers shrink to fit
   and scroll horizontally when the window is too narrow */
table.dataTable {
  width: auto !important;
  margin-left: 0 !important;
}

.dataTables_wrapper {
  width: fit-content;
  max-width: 100%;
}

/* Scroll only the table row so focus rings on the controls are not clipped */
.dataTables_wrapper .row:has(table) {
  overflow-x: auto;
}

.dataTables_wrapper .row {
  flex-wrap: nowrap;
  justify-content: space-between;
  column-gap: 24px;
  margin-left: 0;
  margin-right: 0;
}

.dataTables_wrapper .row > * {
  width: auto;
  flex: 0 0 auto;
  padding-left: 0;
  padding-right: 0;
}

table.dataTable a {
  color: #31AAE5;
}

.page-link {
  color: #555;
}

.page-link:hover,
.page-link:focus {
  color: #333;
}

.page-item.active .page-link {
  color: #fff;
  background-color: #31AAE5;
  border-color: #31AAE5;
}

.dt-buttons .btn {
  color: #fff;
  background-color: #31AAE5;
  border-color: #31AAE5;
}

.dt-buttons .btn:hover,
.dt-buttons .btn:focus,
.dt-buttons .btn:active {
  color: #fff;
  background-color: #2795c9;
  border-color: #2795c9;
}
.yearSelection {
  margin: 20px 0;
}
.customerModal {
  background: #31AAE5;
  color: #fff;
  text-transform: uppercase;
}
.customerModal h5 {
  font-size: 20px;
  display: inline-flex;
  line-height: 20px;
}
.customerRentHeader {
  background: #31AAE5;
  font-size: 20px;
  color: #fff;
  font-weight: normal;
  text-transform: uppercase;
  border-spacing: 10px 0;
}
/* ES-CHG-4 */
.row.flex {
  display: flex;
  flex-wrap: wrap;
}
.inline-flex {
  display: inline-flex;
}
#select_customer_form_allCustomers {
  width: 16px;
  height: 16px;
  margin-left: 5px;
}
.analyse_cylinder_form_compensation_div > label {
  display: inline-block;
  margin-right: 20px;
  margin-left: 5px;
  margin-top: 5px;
}
#analyse_cylinder_form_substance_usability_div > div {
  display: inline-block;
}
#analyse_cylinder_form_substance_usability_div > label {
  margin-left: 5px;
  margin-top: 1px;
  display: inline-block;
}
.form-control-custom input {
  color: #555;
  border: 1px solid #d2d6de;
  padding: 6px 12px;
  border-radius: 0;
  box-shadow: none;
}
@media (min-width: 900px) {
  .order-delivery-modal {
    min-width: 900px;
  }
}

/* Frontend tab bars (BS3-style nav-tabs shim) */
.nav-tabs {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin: 0 0 25px 0;
  display: flex;
  flex-wrap: wrap;
  row-gap: 2px;
  border-bottom: 1px solid #ccc;
}

.nav-tabs > li {
  list-style-type: none !important;
  margin-bottom: -1px;
}

.nav-tabs > li > a {
  display: block;
  padding: 9px 15px;
  text-decoration: none;
  color: #31AAE5;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  line-height: 1.4;
}

.nav-tabs > li > a:hover {
  color: #1f80b3;
  background-color: #f5f5f5;
  border-color: #eee #eee #ccc;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li > a.active {
  color: #333;
  background-color: #fff;
  border-color: #ccc #ccc #fff;
  cursor: default;
}

/* Page-title heading (box-header renders as a plain page title) */
.box-header {
  padding: 0;
  border: 0;
  background-color: transparent;
  margin-bottom: 20px;
}

.navbar {
  font-size: 14px;
}

.app-navbar-inner {
  padding-left: 24px;
  padding-right: 24px;
}

.navbar .navbar-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.customer-select-nav {
  display: flex;
  align-items: center;
  margin: 0 10px;
  min-width: 0;
  flex-shrink: 1;
}

.customer-select-nav form {
  gap: 8px;
  min-width: 0;
}

.customer-select-nav select {
  min-width: 0;
  width: auto;
  max-width: 230px;
  text-overflow: ellipsis;
}

