﻿/* =============================================================================
 * legacy-compat.css
 * -----------------------------------------------------------------------------
 * Compatibility shim that maps legacy Bootstrap 3 / AdminLTE 2 class names to
 * their Bootstrap 5 / AdminLTE 4 equivalents so existing markup keeps working
 * without rewriting every view.
 *
 * Loaded after site.min.css (Bootstrap 5 + AdminLTE 4 bundle) and after the
 * project's own site.css, so its rules win when there is overlap.
 *
 * Sections:
 *   1. Bootstrap 3 utility shims  (floats, grid xs, form-group, validation,
 *                                  inline checks, input/button sizes, button
 *                                  variants, visibility helpers, images,
 *                                  progress bars, navbar helpers)
 *   2. AdminLTE 2 box-system shim (mapped to .card visuals)
 *   3. AdminLTE 2 layout / sidebar / color shim
 * ============================================================================= */


/* =============================================================================
 * 1. Bootstrap 3 utility shims
 * ============================================================================= */

/* --- Floats (BS3) -> flex/float utilities (BS5) ----------------------------- */

.pull-left {
    /*float: left !important;*/
    float:none;
}

.user-panel .pull-left {
    float: left !important;
}

.pull-right {
    /*float: right !important;*/
    float:none;
}

/* --- BS3 extra-small grid (.col-xs-*) -> BS5 default .col-* ----------------- */
/* BS5 dropped the "xs" infix; .col-1..12 already apply at all breakpoints.    */
.col-xs-1 {
    flex: 0 0 auto;
    width: 8.33333333%;
}

.col-xs-2 {
    flex: 0 0 auto;
    width: 16.66666667%;
}

.col-xs-3 {
    flex: 0 0 auto;
    width: 25%;
}

.col-xs-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
}

.col-xs-5 {
    flex: 0 0 auto;
    width: 41.66666667%;
}

.col-xs-6 {
    flex: 0 0 auto;
    width: 50%;
}

.col-xs-7 {
    flex: 0 0 auto;
    width: 58.33333333%;
}

.col-xs-8 {
    flex: 0 0 auto;
    width: 66.66666667%;
}

.col-xs-9 {
    flex: 0 0 auto;
    width: 75%;
}

.col-xs-10 {
    flex: 0 0 auto;
    width: 83.33333333%;
}

.col-xs-11 {
    flex: 0 0 auto;
    width: 91.66666667%;
}

.col-xs-12 {
    flex: 0 0 auto;
    width: 100%;
}

/* --- BS3 .form-group spacing ----------------------------------------------- */
.form-group {
    margin-bottom: 1rem;
}

/* --- BS3 validation states -> BS5 is-invalid/is-valid look ------------------ */
.has-error > label,
.has-error > .control-label,
.has-error .help-block {
    color: var(--bs-danger, #dc3545);
}

.has-error .form-control,
.has-error .form-select,
.has-error input[type="text"],
.has-error input[type="email"],
.has-error input[type="password"],
.has-error textarea,
.has-error select {
    border-color: var(--bs-danger, #dc3545);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.has-warning > label,
.has-warning > .control-label,
.has-warning .help-block {
    color: var(--bs-warning-text-emphasis, #997404);
}

.has-warning .form-control,
.has-warning .form-select,
.has-warning input[type="text"],
.has-warning input[type="email"],
.has-warning input[type="password"],
.has-warning textarea,
.has-warning select {
    border-color: var(--bs-warning, #ffc107);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.15);
}

.has-success > label,
.has-success > .control-label,
.has-success .help-block {
    color: var(--bs-success, #198754);
}

.has-success .form-control,
.has-success .form-select,
.has-success input[type="text"],
.has-success input[type="email"],
.has-success input[type="password"],
.has-success textarea,
.has-success select {
    border-color: var(--bs-success, #198754);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15);
}

/* --- BS3 .checkbox-inline / .radio-inline ---------------------------------- */
/* Re-create inline-block + spacing without converting to .form-check.        */
.checkbox-inline,
.radio-inline {
    display: inline-block;
    position: relative;
    padding-left: 20px;
    margin-bottom: 0;
    font-weight: 400;
    vertical-align: middle;
    cursor: pointer;
}

    .checkbox-inline + .checkbox-inline,
    .radio-inline + .radio-inline {
        margin-left: 10px;
    }

    .checkbox-inline input[type="checkbox"],
    .radio-inline input[type="radio"] {
        position: absolute;
        margin-left: -20px;
        margin-top: 4px;
    }

/* --- BS3 input size aliases ------------------------------------------------- */
.input-sm,
select.input-sm,
textarea.input-sm,
input.input-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    min-height: calc(1.5em + 0.5rem + 2px);
}

.input-lg,
select.input-lg,
textarea.input-lg,
input.input-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 0.3rem;
    min-height: calc(1.5em + 1rem + 2px);
}

/* --- BS3 .btn-default -> BS5 .btn-secondary (neutral) ----------------------- */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

    .btn-default:hover,
    .btn-default:focus,
    .btn-default.focus {
        color: #333;
        background-color: #e6e6e6;
        border-color: #adadad;
    }

    .btn-default:active,
    .btn-default.active,
    .btn-default:not(:disabled):not(.disabled):active {
        color: #333;
        background-color: #d4d4d4;
        border-color: #8c8c8c;
        box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    }

    .btn-default.disabled,
    .btn-default:disabled {
        color: #333;
        background-color: #fff;
        border-color: #ccc;
        opacity: 0.65;
    }

/* --- BS3 .btn-xs ------------------------------------------------------------ */
.btn-xs,
.btn-group-xs > .btn {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

/* --- BS3 .btn-block (BS5 dropped this; use width:100%) ---------------------- */
.btn-block {
    display: block;
    width: 100%;
}

    .btn-block + .btn-block {
        margin-top: 5px;
    }

/* --- BS3 visibility helpers ------------------------------------------------- */
.hidden-xs { /* hidden on <576px (BS5 xs) */
}

@media (max-width: 575.98px) {
    .hidden-xs {
        display: none !important;
    }
}

.visible-xs,
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block {
    display: none !important;
}

@media (max-width: 575.98px) {
    .visible-xs {
        display: block !important;
    }

    .visible-xs-block {
        display: block !important;
    }

    .visible-xs-inline {
        display: inline !important;
    }

    .visible-xs-inline-block {
        display: inline-block !important;
    }
}

/* --- BS3 .sr-only -> BS5 .visually-hidden ----------------------------------- */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- BS3 image helpers ------------------------------------------------------ */
.img-circle {
    border-radius: 50%;
}

.img-rounded {
    border-radius: 6px;
}

.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- BS3 progress bar color variants --------------------------------------- */
.progress-bar-primary {
    background-color: var(--bs-primary, #0d6efd);
}

.progress-bar-info {
    background-color: var(--bs-info, #0dcaf0);
}

.progress-bar-success {
    background-color: var(--bs-success, #198754);
}

.progress-bar-warning {
    background-color: var(--bs-warning, #ffc107);
}

.progress-bar-danger {
    background-color: var(--bs-danger, #dc3545);
}

/* --- BS3 table contextual classes (.success/.warning/.danger/...) ---------- */
/* In BS3 these were commonly applied to <tr> and <td>/<th>. BS5 uses
   .table-*. Recreate the old behavior for legacy markup. */
.table > thead > tr > td.active,
.table > thead > tr > th.active,
.table > thead > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr > td.active,
.table > tbody > tr > th.active,
.table > tbody > tr.active > td,
.table > tbody > tr.active > th,
.table > tfoot > tr > td.active,
.table > tfoot > tr > th.active,
.table > tfoot > tr.active > td,
.table > tfoot > tr.active > th {
    background-color: var(--bs-secondary-bg, #e9ecef) !important;
}

.table > thead > tr > td.success,
.table > thead > tr > th.success,
.table > thead > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr > td.success,
.table > tbody > tr > th.success,
.table > tbody > tr.success > td,
.table > tbody > tr.success > th,
.table > tfoot > tr > td.success,
.table > tfoot > tr > th.success,
.table > tfoot > tr.success > td,
.table > tfoot > tr.success > th {
    color: var(--bs-success-text-emphasis, #0a3622);
    background-color: var(--bs-success-bg-subtle, #d1e7dd) !important;
}

.table > thead > tr > td.info,
.table > thead > tr > th.info,
.table > thead > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr > td.info,
.table > tbody > tr > th.info,
.table > tbody > tr.info > td,
.table > tbody > tr.info > th,
.table > tfoot > tr > td.info,
.table > tfoot > tr > th.info,
.table > tfoot > tr.info > td,
.table > tfoot > tr.info > th {
    color: var(--bs-info-text-emphasis, #055160);
    background-color: var(--bs-info-bg-subtle, #cff4fc) !important;
}

.table > thead > tr > td.warning,
.table > thead > tr > th.warning,
.table > thead > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr > td.warning,
.table > tbody > tr > th.warning,
.table > tbody > tr.warning > td,
.table > tbody > tr.warning > th,
.table > tfoot > tr > td.warning,
.table > tfoot > tr > th.warning,
.table > tfoot > tr.warning > td,
.table > tfoot > tr.warning > th {
    color: var(--bs-warning-text-emphasis, #664d03);
    background-color: var(--bs-warning-bg-subtle, #fff3cd) !important;
}

.table > thead > tr > td.danger,
.table > thead > tr > th.danger,
.table > thead > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr > td.danger,
.table > tbody > tr > th.danger,
.table > tbody > tr.danger > td,
.table > tbody > tr.danger > th,
.table > tfoot > tr > td.danger,
.table > tfoot > tr > th.danger,
.table > tfoot > tr.danger > td,
.table > tfoot > tr.danger > th {
    color: var(--bs-danger-text-emphasis, #58151c);
    background-color: var(--bs-danger-bg-subtle, #f8d7da) !important;
}

/* --- BS3 .progress.active animated stripes --------------------------------- */
/* BS5 uses .progress-bar-animated; mirror it via .progress.active.           */
.progress.active .progress-bar-striped {
    animation: progress-bar-stripes 1s linear infinite;
}

/* --- BS3 navbar helpers (no-op-friendly defaults) -------------------------- */
.navbar-static-top {
    position: static;
    border-radius: 0;
}

.navbar-custom-menu {
    float: right;
    margin: 0;
}

@media (max-width: 991.98px) {
    .navbar-custom-menu {
        float: none;
    }
}


/* =============================================================================
 * 2. AdminLTE 2 box-system shim
 *    Maps the legacy .box family to AdminLTE 4 .card visuals.
 * ============================================================================= */

.box {
    position: relative;
    border-radius: 3px;
    background: #ffffff;
    border-top: 3px solid #d2d6de;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

    .box.box-solid {
        border-top: 0;
    }

    .box.box-default {
        border-top-color: #d2d6de;
    }

    .box.box-primary {
        border-top-color: var(--bs-primary, #0d6efd);
    }

    .box.box-info {
        border-top-color: var(--bs-info, #0dcaf0);
    }

    .box.box-success {
        border-top-color: var(--bs-success, #198754);
    }

    .box.box-warning {
        border-top-color: var(--bs-warning, #ffc107);
    }

    .box.box-danger {
        border-top-color: var(--bs-danger, #dc3545);
    }

    .box.box-solid.box-default {
        border: 1px solid #d2d6de;
    }

    .box.box-solid.box-primary {
        border: 1px solid var(--bs-primary, #0d6efd);
    }

        .box.box-solid.box-primary > .box-header {
            color: #ffffff;
            background: var(--bs-primary, #0d6efd);
            background-color: var(--bs-primary, #0d6efd);
        }

            .box.box-solid.box-primary > .box-header a,
            .box.box-solid.box-primary > .box-header .btn {
                color: #ffffff;
            }

    .box.box-solid.box-info {
        border: 1px solid var(--bs-info, #0dcaf0);
    }

        .box.box-solid.box-info > .box-header {
            color: #ffffff;
            background: var(--bs-info, #0dcaf0);
            background-color: var(--bs-info, #0dcaf0);
        }

            .box.box-solid.box-info > .box-header a,
            .box.box-solid.box-info > .box-header .btn {
                color: #ffffff;
            }

    .box.box-solid.box-success {
        border: 1px solid var(--bs-success, #198754);
    }

        .box.box-solid.box-success > .box-header {
            color: #ffffff;
            background: var(--bs-success, #198754);
            background-color: var(--bs-success, #198754);
        }

            .box.box-solid.box-success > .box-header a,
            .box.box-solid.box-success > .box-header .btn {
                color: #ffffff;
            }

    .box.box-solid.box-warning {
        border: 1px solid var(--bs-warning, #ffc107);
    }

        .box.box-solid.box-warning > .box-header {
            color: #1f2d3d;
            background: var(--bs-warning, #ffc107);
            background-color: var(--bs-warning, #ffc107);
        }

            .box.box-solid.box-warning > .box-header a,
            .box.box-solid.box-warning > .box-header .btn {
                color: #1f2d3d;
            }

    .box.box-solid.box-danger {
        border: 1px solid var(--bs-danger, #dc3545);
    }

        .box.box-solid.box-danger > .box-header {
            color: #ffffff;
            background: var(--bs-danger, #dc3545);
            background-color: var(--bs-danger, #dc3545);
        }

            .box.box-solid.box-danger > .box-header a,
            .box.box-solid.box-danger > .box-header .btn {
                color: #ffffff;
            }

/* Box header / body / footer ------------------------------------------------ */
.box-header {
    color: #444;
    display: block;
    padding: 10px;
    position: relative;
}

    .box-header.with-border {
        border-bottom: 1px solid #f4f4f4;
    }

    .box-header > .box-title,
    .box-header .box-title {
        display: inline-block;
        font-size: 18px;
        margin: 0;
        line-height: 1;
    }

    .box-header > .box-tools {
        position: absolute;
        right: 10px;
        top: 5px;
    }

.box-body {
    padding: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.box-footer {
    padding: 10px;
    background-color: #ffffff;
    border-top: 1px solid #f4f4f4;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

/* Box-tool buttons (header icons) ------------------------------------------- */
.btn-box-tool {
    padding: 5px;
    font-size: 12px;
    background: transparent;
    color: #97a0b3;
    border: 0;
}

    .btn-box-tool:hover {
        color: #606c84;
    }

/* Collapsed-box: hide body/footer; rotate the chevron-style icon ------------ */
.box.collapsed-box > .box-body,
.box.collapsed-box > .box-footer {
    display: none;
}


/* =============================================================================
 * 3. AdminLTE 2 layout / sidebar / color shim
 * ============================================================================= */

/* --- Skin / color palette (legacy AdminLTE 2 text utilities) --------------- */
.text-red {
    color: #dd4b39 !important;
}

.text-yellow {
    color: #f39c12 !important;
}

.text-aqua {
    color: #00c0ef !important;
}

.text-blue {
    color: #0073b7 !important;
}

.text-black {
    color: #111111 !important;
}

.text-light-blue {
    color: #3c8dbc !important;
}

.text-green {
    color: #00a65a !important;
}

.text-gray {
    color: #d2d6de !important;
}

.text-navy {
    color: #001f3f !important;
}

.text-teal {
    color: #39cccc !important;
}

.text-olive {
    color: #3d9970 !important;
}

.text-lime {
    color: #01ff70 !important;
}

.text-orange {
    color: #ff851b !important;
}

.text-fuchsia,
.text-fuschia {
    color: #f012be !important;
}

.text-purple {
    color: #605ca8 !important;
}

.text-maroon {
    color: #d81b60 !important;
}

.text-success {
    color: var(--bs-success, #198754) !important;
}

.bg-red {
    background-color: #dd4b39 !important;
    color: #ffffff;
}

.bg-yellow {
    background-color: #f39c12 !important;
    color: #ffffff;
}

.bg-aqua {
    background-color: #00c0ef !important;
    color: #ffffff;
}

.bg-blue {
    background-color: #0073b7 !important;
    color: #ffffff;
}

.bg-black {
    background-color: #111111 !important;
    color: #ffffff;
}

.bg-light-blue {
    background-color: #3c8dbc !important;
    color: #ffffff;
}

.bg-green {
    background-color: #00a65a !important;
    color: #ffffff;
}

.bg-gray {
    background-color: #d2d6de !important;
    color: #000000;
}

.bg-navy {
    background-color: #001f3f !important;
    color: #ffffff;
}

.bg-teal {
    background-color: #39cccc !important;
    color: #ffffff;
}

.bg-olive {
    background-color: #3d9970 !important;
    color: #ffffff;
}

.bg-lime {
    background-color: #01ff70 !important;
    color: #ffffff;
}

.bg-orange {
    background-color: #ff851b !important;
    color: #ffffff;
}

.bg-fuchsia,
.bg-fuschia {
    background-color: #f012be !important;
    color: #ffffff;
}

.bg-purple {
    background-color: #605ca8 !important;
    color: #ffffff;
}

.bg-maroon {
    background-color: #d81b60 !important;
    color: #ffffff;
}

/* --- Flat / outline buttons (.btn-flat = removed corner radius) ------------ */
.btn-flat {
    border-radius: 0;
    box-shadow: none;
    border-width: 1px;
}

/* --- Page shell (.wrapper > .main-header + .main-sidebar + .content-wrapper + .main-footer) */
/* Root-level heights so percentage heights below resolve correctly.          */
/* Without these, .wrapper { min-height: 100% } resolves against a body of    */
/* "auto" height and collapses to its content, which is why the content area  */
/* would shrink on light pages and then fail to grow back on the next render. */
html, body {
    height: 100%;
}

.wrapper {
    position: relative;
    min-height: 100vh; /* always fill the viewport */
    overflow-x: hidden;
    overflow-y: visible;
}

.main-header {
    position: relative;
    height: 50px;
    max-height: 50px;
    z-index: 1030;
}

    .main-header .navbar {
        margin-left: 230px;
        margin-bottom: 0;
        border: 0;
        height: 50px;
        min-height: 50px;
        max-height: 50px;
        border-radius: 0;
        background-color: #3c8dbc;
        color: #ffffff;
        padding: 0;
    }

    .main-header .navbar .navbar-nav > li > a,
    .main-header .navbar .nav > li > a,
    .main-header .navbar .navbar-brand {
        color: #ffffff;
    }

        .main-header .navbar .navbar-nav > li > a:hover,
        .main-header .navbar .navbar-nav > li > a:focus,
        .main-header .navbar .nav > li > a:hover,
        .main-header .navbar .nav > li > a:focus,
        .main-header .navbar .navbar-brand:hover,
        .main-header .navbar .navbar-brand:focus {
            color: #ffffff;
        }

    .main-header .logo {
        display: block;
        float: left;
        height: 50px;
        line-height: 50px;
        width: 230px;
        font-size: 20px;
        font-weight: 300;
        text-align: center;
        padding: 0 15px;
        overflow: hidden;
        background-color: #367fa9;
        color: #ffffff;
        text-decoration: none;
    }

        .main-header .logo .logo-mini {
            display: none;
        }

        .main-header .logo .logo-lg {
            display: block;
        }

    .main-header .sidebar-toggle {
        float: left;
        display: block;
        height: 50px;
        box-sizing: border-box;
        background-color: transparent;
        background-image: none;
        padding: 15px;
        font-family: fontAwesome;
        color: #ffffff;
    }

        .main-header .sidebar-toggle::before {
            content: "\f0c9"; /* fa-bars */
        }

        .main-header .sidebar-toggle:hover {
            color: #f6f6f6;
            background: rgba(0, 0, 0, 0.1);
        }

    .main-header .navbar-custom-menu,
    .main-header .navbar-right {
        float: right;
    }

/* --- Main sidebar (left nav rail) ------------------------------------------ */
/* Scroll with the page instead of using an internal sidebar scrollbar.       */
.main-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    padding-top: 50px; /* leave room for the fixed-height header */
    box-sizing: border-box; /* keep sidebar total height aligned with content-wrapper + footer */
    min-height: 100%;
    height: auto;
    width: 230px;
    z-index: 810;
    background-color: #222d32;
    color: #b8c7ce;
    overflow-x: hidden;
    overflow-y: visible;
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
}

.main-header .navbar,
.content-wrapper,
.main-footer {
    transition: margin-left 0.3s ease-in-out;
}

/* Desktop/sidebar-collapse behavior for legacy AdminLTE toggle. */
body.sidebar-collapse .main-sidebar {
    transform: translateX(-230px);
}

body.sidebar-collapse .content-wrapper,
body.sidebar-collapse .main-footer {
    margin-left: 0;
}

.main-sidebar > .sidebar {
    padding-bottom: 10px;
}

/* --- User panel inside the sidebar ---------------------------------------- */
.user-panel {
    position: relative;
    width: 100%;
    padding: 10px;
    overflow: hidden;
    min-height: 60px;
}

    .user-panel > .image > img {
        width: 100%;
        max-width: 45px;
        height: auto;
    }

    .user-panel > .info {
        padding: 5px 5px 5px 15px;
        line-height: 1;
        position: absolute;
        left: 55px;
    }

        .user-panel > .info > p {
            font-weight: 600;
            margin-bottom: 9px;
            color: #ffffff;
        }

        .user-panel > .info > a {
            text-decoration: none;
            padding-right: 5px;
            margin-top: 3px;
            font-size: 11px;
            color: #b8c7ce;
        }

/* --- Sidebar menu (top-level items) --------------------------------------- */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

    .sidebar-menu > li {
        position: relative;
        margin: 0;
        padding: 0;
    }

        .sidebar-menu > li > a {
            display: block;
            padding: 12px 8px 12px 15px;
            color: #b8c7ce;
            text-decoration: none;
            white-space: nowrap; /* belt-and-suspenders: never wrap a label */
            overflow: hidden;
            text-overflow: ellipsis;
        }

            .sidebar-menu > li > a:hover,
            .sidebar-menu > li.active > a {
                color: #ffffff;
                background: #1e282c;
                border-left: 3px solid #3c8dbc;
            }

            .sidebar-menu > li > a > .fa,
            .sidebar-menu > li > a > i {
                width: 20px;
            }

    .sidebar-menu li.header {
        padding: 10px 25px 10px 15px;
        font-size: 12px;
        color: #4b646f;
        background: #1a2226;
        text-transform: uppercase;
    }

    /* --- Treeview submenu ----------------------------------------------------- */
    /* The <a> in a .treeview <li> has no href (it's a toggle), so make it look   */
    /* clickable.                                                                 */
    .sidebar-menu li.treeview > a {
        cursor: pointer;
    }

        .sidebar-menu li.treeview > a > .fa-angle-left {
            width: auto;
            height: auto;
            padding: 0;
            margin-right: 10px;
            margin-top: 3px;
            transition: transform 0.5s ease;
        }

    /* Rotate the chevron when the menu is open OR the row is hovered. */
    .sidebar-menu li.treeview:hover > a > .fa-angle-left,
    .sidebar-menu li.treeview.active > a > .fa-angle-left,
    .sidebar-menu li.treeview.menu-open > a > .fa-angle-left {
        transform: rotate(-90deg);
    }

.treeview-menu {
    display: none;
    list-style: none;
    padding: 0 0 0 5px;
    margin: 0;
    background: #2c3b41;
}

/* Expand the submenu on hover (matches legacy behavior the markup expects)   */
/* AND when .active / .menu-open is set by the click handler in              */
/* legacy-compat.js, so the menu stays open after a click on touch/keyboard. */
.sidebar-menu li.treeview:hover > .treeview-menu,
.treeview.active > .treeview-menu,
.treeview.menu-open > .treeview-menu {
    display: block;
}

.treeview-menu > li > a {
    padding: 5px 5px 5px 30px;
    display: block;
    font-size: 14px;
    color: #8aa4af;
    text-decoration: none;
}

    .treeview-menu > li > a:hover,
    .treeview-menu > li.active > a {
        color: #ffffff;
    }

    .treeview-menu > li > a > .fa,
    .treeview-menu > li > a > i {
        width: 20px;
    }

/* --- AdminLTE 2 right control sidebar -------------------------------------- */
.control-sidebar {
    max-height: calc(100vh - 50px); /* 50px = header height */
    position: fixed;
    /*top: 50px; /* height of .main-header */
    right: -350px;
    width: 350px;
    bottom: 0;
    z-index: 1030;
    transition: right .3s ease-in-out;
    background: #222d32;
    color: #b8c7ce;
}

    .control-sidebar.control-sidebar-open {
        right: 0;
    }

/* Push mode (slide: false): make room for the sidebar */
body.control-sidebar-open .content-wrapper,
body.control-sidebar-open .main-footer {
    margin-right: 350px;
    transition: margin-right .3s ease-in-out;
}

/* Move the floating "Score" button with the sidebar */
body.control-sidebar-open #commentWrapper {
    right: 350px;
}

/* --- Content area (right of sidebar) -------------------------------------- */
/* Always at least viewport-height minus the 50px fixed header, so the gray   */
/* canvas reaches the bottom of the screen even on pages with little content. */
.content-wrapper {
    min-height: calc(100vh - 50px);
    background-color: #ecf0f5;
    margin-left: 230px;
    z-index: 800;
}

    .content-wrapper > .content,
    .content-wrapper > .content-header {
        padding: 15px;
    }

.content-header > h1 {
    margin: 0;
    font-size: 24px;
}

    .content-header > h1 > small {
        font-size: 15px;
        display: inline-block;
        padding-left: 4px;
        font-weight: 300;
        color: #777;
    }

.content-header > .breadcrumb {
    float: right;
    background: transparent;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 12px;
    padding: 7px 5px;
    position: absolute;
    top: 15px;
    right: 10px;
    border-radius: 2px;
}

/* --- Main footer ---------------------------------------------------------- */
.main-footer {
    background: #ffffff;
    padding: 15px;
    color: #444;
    border-top: 1px solid #d2d6de;
    margin-left: 230px;
}

/* --- Mobile collapse: shrink sidebar when body lacks sidebar-collapse ----- */
@media (max-width: 767.98px) {
    .main-header .navbar {
        margin-left: 0;
    }

    .main-header .logo {
        width: 100%;
        float: none;
    }

    .main-sidebar {
        padding-top: 100px;
    }

    .content-wrapper,
    .main-footer {
        margin-left: 0;
    }
}

/* --- Colored modal accents (AdminLTE 2 .modal-* color variants) ----------- */
.modal-primary .modal-header,
.modal-primary .modal-footer {
    background-color: var(--bs-primary, #0d6efd);
    color: #ffffff;
    border-color: var(--bs-primary, #0d6efd);
}

    .modal-primary .modal-header .close,
    .modal-primary .modal-header .btn-close {
        color: #ffffff;
        text-shadow: none;
        opacity: 0.85;
        filter: invert(1) grayscale(100%) brightness(200%);
    }

.modal-warning .modal-header,
.modal-warning .modal-footer {
    background-color: var(--bs-warning, #ffc107);
    color: #1f2d3d;
    border-color: var(--bs-warning, #ffc107);
}

.modal-info .modal-header,
.modal-info .modal-footer {
    background-color: var(--bs-info, #0dcaf0);
    color: #1f2d3d;
    border-color: var(--bs-info, #0dcaf0);
}

.modal-success .modal-header,
.modal-success .modal-footer {
    background-color: var(--bs-success, #198754);
    color: #ffffff;
    border-color: var(--bs-success, #198754);
}

.modal-danger .modal-header,
.modal-danger .modal-footer {
    background-color: var(--bs-danger, #dc3545);
    color: #ffffff;
    border-color: var(--bs-danger, #dc3545);
}

    .modal-danger .modal-header .close,
    .modal-danger .modal-header .btn-close,
    .modal-success .modal-header .close,
    .modal-success .modal-header .btn-close {
        color: #ffffff;
        text-shadow: none;
        opacity: 0.85;
        filter: invert(1) grayscale(100%) brightness(200%);
    }

/* --- BS3 modal footer .btn-outline compatibility --------------------------- */
/* Legacy markup uses .btn.btn-outline for modal actions; in BS5 this renders */
/* with transparent borders unless a variant is also applied.                 */
.modal-footer .btn.btn-outline {
    color: inherit;
    background-color: transparent;
    border: 1px solid currentColor;
}

    .modal-footer .btn.btn-outline:hover,
    .modal-footer .btn.btn-outline:focus {
        color: inherit;
        background-color: rgba(255, 255, 255, 0.12);
    }

.modal-warning .modal-footer .btn.btn-outline:hover,
.modal-warning .modal-footer .btn.btn-outline:focus,
.modal-info .modal-footer .btn.btn-outline:hover,
.modal-info .modal-footer .btn.btn-outline:focus {
    background-color: rgba(0, 0, 0, 0.08);
}

/* --- AdminLTE 2 close (×) button rendering -------------------------------- */
/* BS5 removed the .close class in favor of .btn-close; render a textual ×. */
.modal-header > button.close,
.alert > button.close,
button.close {
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.75;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    cursor: pointer;
}

    button.close:hover,
    button.close:focus {
        opacity: 0.75;
    }

/* Skin (.skin-blue) is now a no-op — AdminLTE 2 used it to pick a palette;
   we already apply the blue palette above. Keep an empty rule so author
   intent is preserved and selectors that target descendants still match.   */
.skin-blue {
}

li>a {
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 5px;
}

a[aria-current=page] {
    font-weight:bolder;
    color:black;
}

button[aria-label=Close] {
    border:none !important;
    margin-right:10px;
}