/* Base Styles */
:root {
    --primary-color: #6b4caf; /* Green */
    --secondary-color: #ffffff; /* White */
    --background-color: #f5f5dc; /* Beige */
    --text-color: #333333; /* Dark Text */
    --dark-mode-bg: #1e1e1e; /* Dark Mode Background */
    --dark-mode-text: #e4e4e4; /* Light Text for Dark Mode */
    --dark-mode-primary: #3495a8; /* Dark Green for Dark Mode */
}

/* Dark Mode Variables */
body.dark-mode {
    --background-color: var(--dark-mode-bg);
    --text-color: var(--dark-mode-text);
    --primary-color: var(--dark-mode-primary);
    --secondary-color: var(--dark-mode-bg);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sidebar Styles */
.sidebar {
    width: 250px; /* Sidebar width */
    background-color: var(--primary-color);
    color: var(--secondary-color);
    height: 100vh; /* Full height */
    padding: 20px;
    position: fixed; /* Stays in place */
    top: 0; /* Aligns to top */
    left: 0; /* Aligns to left */
    box-sizing: border-box; /* Includes padding in width */
    transition: transform 0.3s ease; /* Smooth hide/show effect */
    overflow-y: auto; /* Allow scrolling for content */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 16px;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* Main Content Styles */
.main-content {
    margin-left: 250px; /* Push content to the right of the sidebar */
    padding: 20px; /* Add spacing */
    width: calc(100% - 250px); /* Adjust width dynamically */
    box-sizing: border-box; /* Includes padding in width */
    transition: margin-left 0.3s ease;
}

/* Button Styles */
button {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #8e3e77; /* Slightly darker green */
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid var(--primary-color);
    padding: 10px;
    text-align: left;
}

table th {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

table tr:nth-child(even) {
    background-color: var(--background-color);
}

table tr:nth-child(odd) {
    background-color: #eaf7ea; /* Light green */
}

table tr:hover {
    background-color: #d4edd4; /* Slightly darker light green */
}

/* Dark Mode Overrides */
body.dark-mode .sidebar {
    background-color: var(--dark-mode-primary);
    color: var(--dark-mode-text);
}

body.dark-mode .sidebar ul li a {
    color: var(--dark-mode-text);
}

body.dark-mode button {
    background-color: var(--dark-mode-primary);
    color: var(--dark-mode-text);
}

body.dark-mode table tr:nth-child(odd),
body.dark-mode table tr:nth-child(even) {
    background-color: var(--dark-mode-bg);
}

body.dark-mode table tr:hover {
    background-color: #32383e; /* Slightly lighter dark background */
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%); /* Hide sidebar by default */
    }

    .sidebar.active {
        transform: translateX(0); /* Show sidebar when active */
    }

    .main-content {
        margin-left: 0; /* Full width for main content */
        width: 100%; /* Take up full width */
    }

    button#toggle-sidebar {
        display: block; /* Show toggle button on small screens */
        margin-bottom: 20px;
    }
}

/* Toggle Sidebar Button */
button#toggle-sidebar {
    display: none; /* Hidden by default */
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button#toggle-sidebar:hover {
    background: color #9c929c;; /* Slightly darker green */
}
/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.sidebar {
    width: 250px;
    background-color: #f37335;
    color: white;
    padding: 15px;
    position: fixed;
    height: 100%;
    top: 0;
}

.sidebar h2 {
    text-align: center;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.main-content {
    margin-left: 260px;
    padding: 20px;
}

button {
    background-color: #45a049;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 15px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Permission Checkbox Styling */
#permissionsContainer label {
    display: block;
    margin-bottom: 5px;
}
.sidebar-toggle-btn {
    background-color: #4CAF50;
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: none;
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle-btn {
        display: block;
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 10;
    }
}

