:root {
    --bs-primary: #75242E;
    --bs-primary-hover: #5a1b23;
    --bs-primary-light: #8f2d38;
    --bs-primary-bg: #fdf2f3;
    --bs-primary-border: #e8c8cb;
    /* Table theme: grey */
    --table-header-bg: #37474f;
    --table-header-color: #fff;
    --table-row-hover: #f3f4f6;
    --table-border: #e5e7eb;
}
/* Global theme: primary buttons and links */
.btn-primary,
.bg-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}
.btn-primary:hover {
    background-color: var(--bs-primary-hover) !important;
    border-color: var(--bs-primary-hover) !important;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(117, 36, 46, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

html,
body {
    margin: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    /* Use theme colors for background instead of fixed purple */
    background: linear-gradient(90deg, var(--bs-primary-bg), var(--bs-primary)); 
}

.center-body {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    height: 100vh;
    width: 100vw;
}

.main-body {
    height: 100vh;
    width: 100vw;
    border-radius: 0;
    background: #fff;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.screen {
    /* Card background tied to theme colors */
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-primary-hover));
    position: relative;
    height: 600px;
    width: 360px;
    box-shadow: 0px 0px 24px rgba(117, 36, 46, 0.4);
}

.screen__content {
    z-index: 1;
    position: relative;
    height: 100%;
    /* Ensure readable text on top of themed backgrounds */
    color: #111827;
}

/* Bootstrap's `text-muted` can be too low-contrast on our login card */
.screen__content .text-muted {
    color: #4b5563 !important;
    opacity: 1 !important;
}

.screen__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
}

.screen__background__shape {
    transform: rotate(45deg);
    position: absolute;
}

.screen__background__shape1 {
    height: 520px;
    width: 520px;
    background: #fff;
    top: -50px;
    right: 120px;
    border-radius: 0 72px 0 0;
}

.screen__background__shape2 {
    height: 220px;
    width: 220px;
    background: var(--bs-primary-light);
    top: -172px;
    right: 0;
    border-radius: 32px;
}

.screen__background__shape3 {
    height: 540px;
    width: 190px;
    background: linear-gradient(270deg, var(--bs-primary), var(--bs-primary-hover));
    top: -24px;
    right: 0;
    border-radius: 32px;
}

.screen__background__shape4 {
    height: 400px;
    width: 200px;
    background: var(--bs-primary-light);
    top: 420px;
    right: 50px;
    border-radius: 60px;
}

.login {
    width: 320px;
    padding: 30px;
    padding-top: 156px;
}

.login__field {
    padding: 20px 0px;
    position: relative;
    width: 100%;
}

.login__icon {
    position: absolute;
    top: 30px;
    color: #7875b5;
}

.login__input {
    border: none;
    border-bottom: 2px solid #d1d1d4;
    background: none;
    padding: 10px;
    padding-left: 24px;
    font-weight: 700;
    width: 100%;
    transition: 0.2s;
}

.login__input--with-toggle {
    /* Make room for the eye button on the right */
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    top: 40%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #7875b5;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.password-toggle:focus {
    outline: 2px solid #6a679e;
    outline-offset: 2px;
    border-radius: 6px;
}

.password-toggle i {
    pointer-events: none;
}

.login__input:active,
.login__input:focus,
.login__input:hover {
    outline: none;
    border-bottom-color: #6a679e;
}

.login__submit {
    /* Use primary theme color for button */
    background: var(--bs-primary);
    font-size: 14px;
    margin-top: 30px;
    padding: 16px 20px;
    border-radius: 26px;
    border: 1px solid var(--bs-primary);
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    width: 100%;
    color: #ffffff;
    box-shadow: 0px 2px 2px rgba(117, 36, 46, 0.4);
    cursor: pointer;
    transition: 0.2s;
}

.login__submit:active,
.login__submit:focus,
.login__submit:hover {
    background: var(--bs-primary-hover);
    border-color: var(--bs-primary-hover);
    outline: none;
}

.button__icon {
    font-size: 24px;
    margin-left: auto;
    color: #7875b5;
}

.container-slider {
    border: none;
    border-radius: 1rem;
}

.sidebar {
    position: relative;
    width: 75px;
    height: 100vh;
    background-color: #222;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
    border-radius: 0 1rem 1rem 0;
    transition: width .75s ease;
    text-wrap: nowrap;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.sidebar:hover {
    width: 350px;
    text-align: start;
}

.slider-ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.slider-ul::-webkit-scrollbar {
    display: none;
}

.slider-li {
    padding: 10px 10px;
    border-bottom: 1px solid #444;
    border-radius: .5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.logout-li {
    margin-top: auto !important;
}

slider-li:hover {
    background-color: #444;
}

.nav-link {
    display: inline-flex;
    column-gap: 25px;
    color: inherit;
    padding: .5rem 0rem !important;
    text-decoration: none;
}

.item-txt {
    padding-left: 1.5rem;
    font-size: 15px;
}

.attribute {
    position: absolute;
    bottom: 10px;
}

.sidebar.expanded {
    width: 350px;
    /* Expanded width */
    text-align: start;
}

/* Sidebar top: logo + lock button, then divider */
.sidebar-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Closed sidebar: no padding, no background */
.sidebar-header {
    width: 100%;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-sizing: border-box;
}

/* Expanded sidebar: add padding and background */
.sidebar.expanded .sidebar-header {
    padding: 10px 8px;
    background: rgb(255, 255, 255);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0);
}

/* Hover (closed sidebar): same padding and background */
.sidebar:hover .sidebar-header {
    padding: 10px 8px;
    background: rgb(255, 255, 255);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0);
}

.sidebar-header .img-fluid {
    max-width: 100%;
    max-height: 44px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Lock button: top-right corner of sidebar */
.lock-btn {
    position: absolute;
    top: 12px;
    right: -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: #333;
    cursor: pointer;
    color: #fff;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
    z-index: 9998;
}
.lock-btn:hover {
    background: #444;
}
.lock-btn:focus,
.lock-btn:active {
    outline: none;
    box-shadow: none;
}
.lock-btn i {
    font-size: 1.1rem;
}

.top-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
}

.dt-search {
    border-radius: 6px;
}

.modal-body {
    text-align: left
}

#dt-length-0 {
    min-height: 30px !important;
    border-radius: 6px;
}
#dt-length-1 {
    min-height: 30px !important;
    border-radius: 6px;
}
#logoImage1 {
    display: none;
}

/* On hover, show the second image and hide the first */
.sidebar:hover #logoImage2 {
    display: none;
}

.sidebar:hover #logoImage1 {
    display: inline-flex;
}

.sidebar.expanded #logoImage1 {
    display: inline-flex;
}

.sidebar.expanded #logoImage2 {
    display: none;
}

.main-view {
    flex: 1;
    min-width: 0;
    height: 100vh;
    padding: 2rem;
    margin: 0;
    border-radius: 0;
    background: #fff;
    overflow-x: auto;
    overflow-y: auto;
}

@media (max-width: 991px) {
    .main-view {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-view {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .main-view {
        padding: 0.75rem;
    }
    .sidebar {
        height: 100vh;
    }
}

::-webkit-scrollbar {
    width: 10px;
    /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* Color of the track (background) */
}

::-webkit-scrollbar-thumb {
    background: #888;
    /* Color of the scrollbar thumb */
    border-radius: 10px;
    /* Rounded edges for the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
    /* Darker thumb color on hover */
}

#dataTable_info {
    padding-top: 10px
}
/* Loader styles */
.loader-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5); /* Reduced opacity for better blur effect */
    backdrop-filter: blur(3px); /* <-- Blur effect */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}


/* Hidden state */
.show {

    display: flex !important;
}

/* Loader spinner */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--bs-primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

/* Animation */
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.img-fluid {
    margin-left: 14%;
}

/* Permanent layout/readability rules for password reset screens */
.auth-reset .screen {
    background: rgba(255, 255, 255, 0.18);
    width: min(92vw, 460px);
    height: auto;
    min-height: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth-reset .screen__background {
    opacity: 0.35;
    filter: blur(8px);
}

.auth-reset .screen__content {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 16px;
    margin: 14px;
    height: auto;
    color: #111827;
}

.auth-reset .login {
    width: 100%;
    padding: 28px;
    padding-top: 28px;
}

.auth-reset .img-fluid {
    margin-left: 0;
    max-width: 240px;
}

.auth-reset h3,
.auth-reset p,
.auth-reset a:not(.btn),
.auth-reset label {
    color: #111827 !important;
}

@media (max-width: 480px) {
    .auth-reset .login {
        padding: 20px;
    }
}

/* Global table theme: grey headers and rows */
thead.thead-dark th {
    background: var(--table-header-bg, #37474f) !important;
    color: var(--table-header-color, #fff) !important;
    border: none;
    border-bottom: 2px solid #455a64;
}
tbody tr {
    border-bottom: 1px solid var(--table-border, #e5e7eb);
}
tbody tr:hover {
    background: var(--table-row-hover, #f3f4f6) !important;
}
