/* ============================================================
   AdminLTE Compatibility Layer for CoreUI 5.4.3 Migration
   Purpose: Bridge AdminLTE-specific and Bootstrap 4 classes
   that are still used across ASPX pages.
   ============================================================ */

/* --- Bootstrap 4 Backward-Compatible Classes --- */

.form-group {
    margin-bottom: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.input-group-append,
.input-group-prepend {
    display: flex;
}

/* BS4 directional utilities (replaced by logical in BS5) */
.float-left { float: left !important; }
.float-right { float: right !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* BS4 margin-left/right (replaced by ms-/me- in BS5) */
.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }
.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }

/* BS4 padding-left/right (replaced by ps-/pe- in BS5) */
.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0.5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }
.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pr-5 { padding-right: 3rem !important; }

/* BS4 close button (replaced by .btn-close in BS5) */
.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.close:hover,
.close:focus {
    opacity: .75;
    text-decoration: none;
}

/* BS4 badge variants (if any pages still use badge-* instead of bg-*) */
.badge-primary { background-color: var(--cui-primary, #321fdb) !important; color: #fff !important; }
.badge-secondary { background-color: var(--cui-secondary, #9da5b1) !important; color: #fff !important; }
.badge-success { background-color: var(--cui-success, #2eb85c) !important; color: #fff !important; }
.badge-danger { background-color: var(--cui-danger, #e55353) !important; color: #fff !important; }
.badge-warning { background-color: var(--cui-warning, #f9b115) !important; color: #212529 !important; }
.badge-info { background-color: var(--cui-info, #39f) !important; color: #fff !important; }

/* --- AdminLTE Elevation Classes --- */

.elevation-1 {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24) !important;
}

.elevation-2 {
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23) !important;
}

.elevation-3 {
    box-shadow: 0 10px 20px rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23) !important;
}

.elevation-4 {
    box-shadow: 0 14px 28px rgba(0, 0, 0, .25), 0 10px 10px rgba(0, 0, 0, .22) !important;
}

/* --- AdminLTE Login Page --- */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #e9ecef;
}

.login-box {
    width: 360px;
}

.login-logo {
    text-align: center;
    margin-bottom: 0.75rem;
}

.login-card-body {
    padding: 1.25rem;
}

.login-box-msg {
    text-align: center;
    padding: 0 1.25rem 1.25rem;
    margin-bottom: 0;
}

/* --- AdminLTE Info Box Component --- */

.info-box {
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
    border-radius: 0.25rem;
    background: #fff;
    display: flex;
    padding: 0.5rem;
    min-height: 80px;
    position: relative;
    width: 100%;
}

.info-box-icon {
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    padding: 0.5rem;
    text-align: center;
    width: 70px;
    color: #fff;
}

.info-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
    flex: 1;
    line-height: 1.8;
}

.info-box-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-box-number {
    display: block;
    font-weight: 700;
}

/* --- AdminLTE Small Box Component --- */

.small-box {
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
    position: relative;
    display: block;
    margin-bottom: 20px;
    color: #fff;
}

.small-box .inner {
    padding: 10px;
}

.small-box .icon {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 70px;
    color: rgba(0, 0, 0, .15);
    z-index: 0;
}

.small-box-footer {
    display: block;
    padding: 3px 0;
    background: rgba(0, 0, 0, .1);
    color: rgba(255, 255, 255, .8);
    text-align: center;
    text-decoration: none;
    z-index: 10;
    position: relative;
}

.small-box-footer:hover {
    background: rgba(0, 0, 0, .15);
    color: #fff;
}

/* --- AdminLTE Card Tools & Buttons --- */

.card-tools {
    float: right;
    margin-right: -0.625rem;
}

.btn-tool {
    background: transparent;
    color: #adb5bd;
    font-size: 0.875rem;
    margin: -0.75rem 0;
    padding: 0.25rem 0.5rem;
    border: 0;
    cursor: pointer;
}

.btn-tool:hover {
    color: #495057;
}

.btn-flat {
    border-radius: 0;
    border: 1px solid transparent;
}

/* --- AdminLTE Sidebar Extras --- */

.btn-sidebar {
    background: transparent;
    border: 0;
    color: #adb5bd;
}

.form-control-sidebar {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
}

/* --- AdminLTE Content Header --- */

.content-header {
    padding: 15px 0.5rem;
}

/* --- AdminLTE Navbar Compat (for pages not yet fully migrated) --- */

.navbar-white {
    background-color: #fff;
}

.navbar-light .navbar-nav .nav-link {
    color: rgba(0, 0, 0, .5);
}

.navbar-light .navbar-nav .nav-link:hover {
    color: rgba(0, 0, 0, .7);
}
