/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

.navbar-toggle {
    float: left !important;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
    max-width: 600px;
}

.no-max-width { max-width:none; }

a {
    text-decoration: underline;
}

.strike {
text-decoration: line-through;
}

.dhr{border-bottom:1px dotted gray;margin-top:5px;margin-bottom:5px;}
.m0{margin:0;}
.m3{margin:3px;}
.m5{margin:5px;}
.mt5{margin-top:5px;}
.mt2{margin-top:2px;}
.mb0{margin-bottom:0 !important;}
.mb2{margin-bottom:2px;}
.mb5{margin-bottom:5px;}
.mb6{margin-bottom:6px;}
.mb10{margin-bottom:10px !important;}
.mb15{margin-bottom:15px !important;}
.mb20{margin-bottom:20px !important;}
.mt10{margin-top:10px;}
.ml5{margin-left:5px;}
.ml10{margin-left:10px;}
.ml58{margin-left:58px;}
.ml44{margin-left:44px;}
.mt15{margin-top:15px;}
.mt20{margin-top:20px;}

.show-grid {
  margin-bottom: 15px;
}
.show-grid [class^="col-"] {
  padding-top: 50px;
  padding-bottom: 10px;
}
.show-grid [class^="col-"] {
  padding-top: 10px;
  background-color: #eee;
  background-color: rgba(86,61,124,.15);
  border: 1px solid #ddd;
  border: 1px solid rgba(86,61,124,.2);
}

.conv-block {
    text-align: center;
}
.conv-block p {
    padding: 15px;
}

.my-grid {
  margin-bottom: 15px;
}
.my-grid [class^="col-"] {
  padding-bottom: 10px;
  padding-top: 10px;
  xbackground-color: #eee;
  xbackground-color: rgba(86,61,124,.15);
  xborder: 1px solid #ddd;
  xborder: 1px solid rgba(86,61,124,.2);
}

.footer {
  text-align: center;
}

.bg-secondary {
  background-color: #2c3e50 !important;
}

.navLink {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .0625rem;
}

/* Bootstrap 3 Compatibility Fixes */

/* Restore dl-horizontal */
@media (min-width: 768px) {
  /* Main dl-horizontal styling */
  .dl-horizontal dt {
    float: left;
    width: 160px;
    overflow: hidden;
    clear: left;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    line-height: 1.42857143;
    margin-bottom: 0;
    display: block; /* Ensure block behavior */
  }
  .dl-horizontal dd {
    margin-left: 180px;
    margin-bottom: 0;
    display: block; /* Ensure block behavior */
  }
  /* Clearfix for dd to handle internal floats/heights properly - critical for alignment */
  .dl-horizontal dd:before,
  .dl-horizontal dd:after {
    content: " ";
    display: table;
  }
  .dl-horizontal dd:after {
    clear: both;
  }

  /* Fallback for dl without .dl-horizontal class (if class is missing from HTML) */
  dl:not(.dl-horizontal) dt {
    float: left;
    width: 160px;
    overflow: hidden;
    clear: left;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    line-height: 1.42857143;
    margin-bottom: 0;
    display: block;
  }
  dl:not(.dl-horizontal) dd {
    margin-left: 180px;
    margin-bottom: 0;
    display: block;
  }
  /* Fallback clearfixes */
  dl:not(.dl-horizontal) dd:before,
  dl:not(.dl-horizontal) dd:after {
    content: " ";
    display: table;
  }
  dl:not(.dl-horizontal) dd:after {
    clear: both;
  }

  /* Clearfix for the dl container itself */
  .dl-horizontal:before,
  .dl-horizontal:after,
  dl:not(.dl-horizontal):before,
  dl:not(.dl-horizontal):after {
    content: " ";
    display: table;
  }
  .dl-horizontal:after,
  dl:not(.dl-horizontal):after {
    clear: both;
  }
}

/* Restore pre styling */
pre {
  display: block;
  padding: 9.5px;
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.42857143;
  color: #333;
  word-break: break-all;
  word-wrap: break-word;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* Vivid Alerts (from custom.min.css or similar) */
.alert {
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.alert-info {
    background-color: rgba(52,152,219,.88); /* Blue */
    border-color: rgba(52,152,219,.88);
    color: #E9EDEF;
}
.alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}
.alert-danger, .alert-error {
    background-color: rgba(231,76,60,.88); /* Red */
    border-color: rgba(231,76,60,.88);
    color: #E9EDEF;
}
.alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.bg-info {
    background-color: #d9edf7 !important;
}

dl {
    margin-top: 0;
    margin-bottom: 20px;
}

dl {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    unicode-bidi: isolate;
}
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #fff;
    margin: 0;
}
html {
    font-size: 10px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
html {
    font-family: sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}
.navbar-inverse {
    background-color: #222;
    border-color: #080808;
}

/* Navbar Container */
.navbar {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 50px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

/* Navbar Collapse */
.navbar-collapse {
    border-color: #101010;
    box-shadow: none;
}

/* Navbar Nav container reset */
.navbar-nav {
    margin: 7.5px -15px;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

/* Navbar Links - High Specificity Override */
#navbarCollapse .navbar-nav > li > a {
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 20px;
    color: #9d9d9d !important;
    text-decoration: none !important;
    font-weight: normal;
    display: block;
    padding-left: 15px;
    padding-right: 15px;
}

/* Hover/Focus */
#navbarCollapse .navbar-nav > li > a:hover,
#navbarCollapse .navbar-nav > li > a:focus {
    color: #fff !important;
    background-color: transparent;
    text-decoration: none !important;
}

/* Active State */
#navbarCollapse .navbar-nav > .active > a,
#navbarCollapse .navbar-nav > .active > a:hover,
#navbarCollapse .navbar-nav > .active > a:focus {
    color: #fff !important;
    background-color: #080808;
}

/* Toggler (Hamburger) Styling for Inverse Theme */
.navbar-inverse .navbar-toggler {
    border-color: #333;
}

.navbar-inverse .navbar-toggler:hover,
.navbar-inverse .navbar-toggler:focus {
    background-color: #333;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28157, 157, 157, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Desktop View Overrides */
@media (min-width: 768px) {
    .navbar-nav {
        float: left;
        margin: 0;
    }

    .navbar-nav > li {
        float: left;
    }

    #navbarCollapse .navbar-nav > li > a {
        padding-top: 15px;
        padding-bottom: 15px;
    }
}

/* Restore Bootstrap 3 button geometry (BS5 .btn has different padding and radius). */

.btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    user-select: none;
    background-image: none;
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
}

/* Restore Bootstrap 3 Default Button Style for btn-default and variant-less buttons */
.btn-default,
.btn:not([class*="btn-"]) {
    --bs-btn-color: #333;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #ccc;
    --bs-btn-hover-color: #333;
    --bs-btn-hover-bg: #e6e6e6;
    --bs-btn-hover-border-color: #adadad;
    --bs-btn-active-color: #333;
    --bs-btn-active-bg: #d4d4d4;
    --bs-btn-active-border-color: #8c8c8c;
    --bs-btn-disabled-color: #333;
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: #ccc;
}

.btn:hover,
.btn:focus,
.btn.focus {
    text-decoration: none;
}

/* Ensure input buttons specifically behave nicely */
input.btn {
    width: auto; /* Prevent full width if inputs are styled that way */
}

/* Restore form-horizontal for Bootstrap 5 */
.form-horizontal .form-group {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    margin-bottom: 15px;
}

/* Restore control-label alignment on desktop */
@media (min-width: 768px) {
    .form-horizontal .control-label {
        text-align: right;
        margin-bottom: 0;
        padding-top: 7px; /* Center label vertically with input */
        font-weight: bold; /* Restore bold font weight for labels */
        display: inline-block; /* Restore display as per old style */
        max-width: 100%; /* Restore max-width as per old style */
    }
}

/* Ensure col-md-* classes behave correctly inside our flex form-group if BS5 grid isn't catching them */
/* BS5 cols are flex items, so this should generally work provided the parent is flex. */
/* However, we need to ensure they don't have full width if they are supposed to be columns */
@media (min-width: 768px) {
    .form-horizontal .col-md-2 {
        flex: 0 0 auto;
        width: 16.66666667%;
        padding-left: 15px; /* Restore horizontal padding */
        padding-right: 15px; /* Restore horizontal padding */
        position: relative; /* Restore relative positioning */
        min-height: 1px; /* Restore min-height */
    }
    .form-horizontal .col-md-10 {
        flex: 0 0 auto;
        width: 83.33333333%;
        padding-left: 15px; /* Restore horizontal padding */
        padding-right: 15px; /* Restore horizontal padding */
        position: relative; /* Restore relative positioning */
        min-height: 1px; /* Restore min-height */
    }
    .form-horizontal .col-md-offset-2 {
        margin-left: 16.66666667%;
    }
}

/* Restore form-control styling (inputs, textareas) */
.form-control {
    display: block;
    width: 100%;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    height: auto;
    font-family: monospace; /* User request */
}

/* Restore specific form-control styles for checkboxes */
input[type="checkbox"].form-control {
    width: 34px; /* Make it square matching height */
    height: 34px;
    padding: 0;
    margin: 4px 0 0;
    display: block;
    font-size: 14px;
    line-height: normal;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    vertical-align: middle;

    /* Custom appearance to show checked state */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    cursor: pointer;
}

/* Checked state for custom checkbox */
input[type="checkbox"].form-control:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/></svg>");
}

.bg-warning {
    background-color: #e9e1ba !important;
    font-weight: bold;
}

/* Restore Bootstrap 3 .panel → BS5 has .card, but 100+ views still use .panel */
.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-default {
    border-color: #ddd;
}
.panel-default > .panel-heading {
    color: #333;
    background-color: #f5f5f5;
    border-color: #ddd;
}
.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}
.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px;
    color: inherit;
}
.panel-body {
    padding: 15px;
}
.panel-footer {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* Restore standalone .form-group (BS3 had margin-bottom: 15px) */
.form-group {
    margin-bottom: 15px;
}

/* DataTables 2.x + Bootstrap 5 compatibility */
table.dataTable.table-bordered {
    border-collapse: collapse !important;
}
table.dataTable.table-bordered > thead > tr > th,
table.dataTable.table-bordered > thead > tr > td,
table.dataTable.table-bordered > tbody > tr > th,
table.dataTable.table-bordered > tbody > tr > td,
table.dataTable.table-bordered > tfoot > tr > th,
table.dataTable.table-bordered > tfoot > tr > td {
    border: 1px solid #ddd;
}
table.dataTable.table-bordered > thead > tr > th,
table.dataTable.table-bordered > thead > tr > td {
    border-bottom-width: 2px;
}

/* BS5 .table sets --bs-table-bg: var(--bs-body-bg) = #fff on cells,
   covering row-level background-color set via createdRow callbacks.
   BS5 + DataTables 2.x also use box-shadow on cells for accent effects.
   Fix: make cell backgrounds transparent so row colors show through. */
table.dataTable {
    --bs-table-bg: transparent;
}
table.dataTable > tbody > tr > td,
table.dataTable > tbody > tr > th {
    box-shadow: none !important;
}
table.dataTable > tbody > tr.selected {
    background-color: #B0BED9;
}
table.dataTable > tbody > tr.selected > td,
table.dataTable > tbody > tr.selected > th {
    color: inherit !important;
}
table.dataTable.stripe > tbody > tr.odd,
table.dataTable.display > tbody > tr.odd {
    background-color: rgba(0, 0, 0, 0.02);
}
table.dataTable.hover > tbody > tr:hover,
table.dataTable.display > tbody > tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Restore BS3 contextual row classes on tables (BS5 renamed to .table-*) */
.table > tbody > tr.success,
.table > tbody > tr.success > td,
.table > tbody > tr.success > th {
    background-color: #dff0d8;
    color: #3c763d;
}
.table > tbody > tr.info,
.table > tbody > tr.info > td,
.table > tbody > tr.info > th {
    background-color: #d9edf7;
    color: #31708f;
}
.table > tbody > tr.warning,
.table > tbody > tr.warning > td,
.table > tbody > tr.warning > th {
    background-color: #fcf8e3;
    color: #8a6d3b;
}
.table > tbody > tr.danger,
.table > tbody > tr.danger > td,
.table > tbody > tr.danger > th {
    background-color: #f2dede;
    color: #a94442;
}
.table > tbody > tr.active,
.table > tbody > tr.active > td,
.table > tbody > tr.active > th {
    background-color: #f5f5f5;
}