/* Custom .btn-primary with color #36458a */
.btn-primary {
  background-color: #36458a !important;
  border: 1px solid #36458a;
  box-shadow: none;
  color: #fff;
}

/* Hover state */
.btn-primary:hover {
  background-color: #2e3c78 !important;
  border-color: #2a376c !important;
  color: #fff !important;
}

/* Focus state (keyboard navigation) */
.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Active state */
.btn-primary:active, 
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background-color: #293665;
  border-color: #25315a;
  color: #fff;
}

/* Disabled state */
.btn-primary:disabled, 
.btn-primary.disabled {
  background-color: #36458a;
  border-color: #36458a;
  opacity: 0.65;
  color: #fff;
}

/* Base "default" button (BS3 look) */
.btn-default {
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
}

/* Hover for INACTIVE buttons (toggle pattern only) */
.btn-default:hover,
.btn-check:not(:checked) + .btn-default:hover {
  color: #333;               
  background-color: #e6e6e6; 
  border-color: #adadad;     
}

/* Focus */
.btn-default:focus {
  box-shadow: 0 0 0 0.25rem rgba(204, 204, 204, 0.5);
}

/* Active/checked state */
.btn-check:checked + .btn-default,
.btn-default.active,
.show > .btn-default.dropdown-toggle {
  color: #fff;
  background-color: #337ab7;
  border-color: #2e6da4;
}

/* Keep BLUE when active/checked even on hover */
.btn-check:checked + .btn-default:hover,
.btn-default.active:hover {
  color: #fff;
  background-color: #337ab7; 
  border-color: #2e6da4;      
}

/* Disabled */
.btn-default:disabled,
.btn-default.disabled {
  background-color: #fff;
  border-color: #ccc;
  opacity: 0.65;
  pointer-events: none;
}

/* Only affect horizontal button groups */
.btn-group:not(.btn-group-vertical) {
  width: auto !important;
}

/* Prevent radio/checkbox buttons in btn-groups from stretching */
.btn-group > .btn {
  flex: 0 0 auto;
}

/* Restore .btn-default */
.btn-default {
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
}
.btn-default:hover,
.btn-default:focus {
  background-color: #e6e6e6;
  border-color: #adadad;
}

/* Make button group radios behave like BS3 */
.btn-group.user_toggle input[type="radio"] {
  position: absolute;
  clip: rect(0, 0, 0, 0); /* hide the radios */
  pointer-events: none;
}

/* Active state like BS3 */
.btn-group.user_toggle .btn.active,
.btn-group.user_toggle .btn:active {
  background-color: #337ab7;
  border-color: #2e6da4;
  color: #fff;
  box-shadow: none;
}

/* Ensure .btn stays toggleable when checked */
.btn-group.user_toggle input[type="radio"]:checked + label,
.btn-group.user_toggle .btn.active {
  background-color: #337ab7;
  border-color: #2e6da4;
  color: #fff;
}

/* Text alignment */
.text-left {
    text-align: left !important; /* or use .text-start if you prefer */
}

.text-right {
    text-align: right !important; /* or use .text-end if you prefer */
}

.text-center {
    text-align: center !important;
}

.text-justify {
    text-align: justify !important;
}

/* Float / Pull */
.pull-left {
    float: left !important; /* or .float-start */
}

.pull-right {
    float: right !important; /* or .float-end */
}

/* === Bootstrap 3 to Bootstrap 5 compatibility === */

/* col-md-pull-*  → simulate pull (float + relative position) */
[class*="col-md-pull-"] {
  position: relative;
}
.col-md-pull-1 { right: 8.333333%; }
.col-md-pull-2 { right: 16.666667%; }
.col-md-pull-3 { right: 25%; }
.col-md-pull-4 { right: 33.333333%; }
.col-md-pull-5 { right: 41.666667%; }
.col-md-pull-6 { right: 50%; }
.col-md-pull-7 { right: 58.333333%; }
.col-md-pull-8 { right: 66.666667%; }
.col-md-pull-9 { right: 75%; }
.col-md-pull-10 { right: 83.333333%; }
.col-md-pull-11 { right: 91.666667%; }
.col-md-pull-12 { right: 100%; }

/* col-md-push-*  → simulate push (float + relative position) */
[class*="col-md-push-"] {
  position: relative;
}
.col-md-push-1 { left: 8.333333%; }
.col-md-push-2 { left: 16.666667%; }
.col-md-push-3 { left: 25%; }
.col-md-push-4 { left: 33.333333%; }
.col-md-push-5 { left: 41.666667%; }
.col-md-push-6 { left: 50%; }
.col-md-push-7 { left: 58.333333%; }
.col-md-push-8 { left: 66.666667%; }
.col-md-push-9 { left: 75%; }
.col-md-push-10 { left: 83.333333%; }
.col-md-push-11 { left: 91.666667%; }
.col-md-push-12 { left: 100%; }

/* pull-right / pull-left → replaced with float utilities */
.pull-right { float: right !important; }
.pull-left { float: left !important; }

/* input-group-addon → replaced with .input-group-text */
.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

/* well → replaced with .card or .bg-light + .p-3 */
.well {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}

/* panel → replaced with .card */
.panel {
  margin-bottom: 20px;
  background-color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}
.panel-body {
  padding: 15px;
}

.breadcrumb {
  background-color: #eee;  /* light gray like BS4 */
  padding: 0.75rem 0.75rem;
  border-radius: 0.375rem;    /* rounded corners */
}

td.alert-warning,
tr.alert-warning {
  background-color: #fff3cd !important; /* same as .table-warning */
}

td.alert-success,
tr.alert-success {
  background-color: #d1e7dd !important; /* same as .table-success */
}

td.alert-danger,
tr.alert-danger {
  background-color: #f8d7da !important; /* same as .table-danger */
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.form-inline .form-control {
  display: inline-block;
  width: auto;
  vertical-align: middle;
}

.btn-xs {
  padding: .25rem .4rem;
  font-size: .75rem;
  border-radius: .2rem;
}

/* if you're using .switch-lg on the input */
.form-switch .form-check-input.switch-lg{
  transform: scale(1.4);
  transform-origin: left center;
  margin-right: 1rem;   /* <-- adds layout space so it won't overlap text */
}