/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px; /* Start offscreen (RTL layout) */
    width: 280px;
    height: 100%;
    background-color: #ffffff; /* Changed to white */
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    color: #333; /* Changed text color to dark gray */
    border-left: none;
    border-top-left-radius: 10px; /* Rounded left corners */
    border-bottom-left-radius: 10px;
}

.sidebar.active {
    right: 0;
    animation: slideIn 0.3s forwards;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef; /* Lighter border color */
    background-color: #2185d0; /* Blue header background */
    color: white;
    border-top-left-radius: 10px; /* Match sidebar's border radius */
}

.sidebar-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.4rem;
}

.close-sidebar {
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-sidebar:hover {
    color: #d9d9d9; /* Just slightly darker on hover */
}

.sidebar-content {
    padding: 15px 0;
    margin-bottom: 80px; /* Leave space for footer */
    width: 100%; /* Ensure content doesn't overflow */
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar-menu li {
    margin-bottom: 2px;
    width: 100%;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333; /* Dark gray for text */
    text-decoration: none;
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
}

.sidebar-menu li a.active {
    background-color: #f0f7ff; /* Very light blue for active item */
    color: #2185d0; /* Blue color for active item */
    border-right-color: #2185d0; /* Blue border for active item */
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background-color: #f5f5f5; /* Slight gray on hover */
    color: #2185d0; /* Blue color on hover */
    border-right-color: #2185d0; /* Blue border on hover */
}

.sidebar-menu li a i {
    margin-left: 10px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: #2185d0; /* Blue color for icons */
}

/* Menu Button */
.menu-button {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Make sure this is just below the sidebar z-index */
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Header Logo */
.header-logo {
    height: 45px;
    margin-left: 15px;
    border-radius: 5px;
}

/* Flash Messages */
.flash-messages-container {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 1001;
    max-width: 350px;
}

.flash-message {
    background-color: #fff;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: slideIn 0.3s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-message.success {
    border-right: 4px solid #28a745;
    color: #1e7e34;
}

.flash-message.error, .flash-message.danger {
    border-right: 4px solid #dc3545;
    color: #bd2130;
}

.flash-message.warning {
    border-right: 4px solid #ffc107;
    color: #d39e00;
}

.flash-message.info {
    border-right: 4px solid #17a2b8;
    color: #138496;
}

.close-flash {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    margin-right: 10px;
    padding: 0;
    font-size: 0.9rem;
}

.close-flash:hover {
    color: #555;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments for the header */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .logo-container {
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    .header-buttons {
        margin-top: 10px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
}

/* Main content adjustment when sidebar is open */
.main-content {
    transition: margin-right 0.3s ease-in-out;
}

/* Remove this rule to prevent content from being pushed */
/* body.sidebar-open .main-content {
    margin-right: 280px;
} */

/* Sidebar footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #e9ecef;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    border-bottom-left-radius: 10px; /* Match sidebar's border radius */
    box-sizing: border-box; /* Include padding in width */
}

.sidebar-footer p {
    margin: 0 0 5px 0;
    font-weight: 500;
}

.sidebar-footer span {
    opacity: 0.8;
} 