/* General styles */
body {
    background-color: #f0f2f5;
    height: 100vh;
    margin: 0;
}

/* Centered login container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Login form styles */
.login-form {
    width: 100%;
    max-width: 400px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Error message */
.error-message {
    color: red;
    font-size: 14px;
    margin-top: 10px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: none; /* Hidden by default */
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Sidebar - initially hidden */
.sidebar {
    height: 100%;
    background-color: #343a40;
    padding-top: 20px;
    position: fixed;
    top: 0;
    left: -250px; /* Sidebar is hidden initially */
    width: 250px;
    transition: left 0.3s ease-in-out;
}

/* Show sidebar when open */
.sidebar.open {
    left: 0;
}

/* Sidebar links */
.sidebar a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px;
    font-size: 16px;
}

.sidebar a:hover {
    background-color: #495057;
}

/* Content area */
.content {
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
}

/* If sidebar is open, shift content on desktop */
@media (min-width: 769px) {
    .content.shifted {
        margin-left: 250px;
    }
}

/* Sidebar Toggle Button */
#sidebarToggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

/* Hamburger Icon */
.navbar-toggler-icon {
    width: 30px;
    height: 3px;
    background-color: black;
    position: relative;
    display: block;
    transition: all 0.3s ease-in-out;
}

/* Top and Bottom Lines */
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: black;
    transition: all 0.3s ease-in-out;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    bottom: -8px;
}

/* Change Icon to "X" when sidebar is open */
.sidebar.open + #sidebarToggle .navbar-toggler-icon {
    background-color: transparent;
}

.sidebar.open + #sidebarToggle .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.sidebar.open + #sidebarToggle .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content {
        margin-left: 0;
    }
}
