/* Custom styles for better aesthetics and responsiveness */
body {
    font-family: "Inter", sans-serif;
    background-color: #f0f2f5; /* Light gray background */
}
.sidebar {
    width: 250px;
    background-color: #1a202c; /* Darker background for sidebar */
    color: #e2e8f0; /* Light text color */
    transition: width 0.3s ease;
}
.sidebar.collapsed {
    width: 64px; /* Tailwind's w-16 */
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem; /* py-3 px-4 */
    border-radius: 0.5rem; /* rounded-lg */
    margin-bottom: 0.5rem; /* mb-2 */
    transition: background-color 0.2s, color 0.2s;
}
.sidebar-link:hover {
    background-color: #2d3748; /* Darker hover */
    color: #ffffff;
}
.sidebar-link.active {
    background-color: #4299e1; /* Blue for active link */
    color: #ffffff;
    font-weight: 600; /* semi-bold */
}
.main-content {
    flex-grow: 1;
    padding: 1.5rem; /* p-6 */
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* shadow-md */
    margin-left: 250px; /* Adjust for sidebar width */
    transition: margin-left 0.3s ease;
}
.sidebar.collapsed + .main-content {
    margin-left: 64px;
}
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 2rem;
    border-radius: 0.75rem;
    width: 90%; /* Responsive width */
    max-width: 500px; /* Max width for larger screens */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    position: relative;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 1.75rem; /* text-2xl */
    font-weight: bold;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}
.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary {
    background-color: #4299e1; /* Blue */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}
.btn-primary:hover {
    background-color: #3182ce; /* Darker blue */
}
.btn-danger {
    background-color: #ef4444; /* Red */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
}
.btn-danger:hover {
    background-color: #dc2626; /* Darker red */
}
.btn-secondary {
    background-color: #cbd5e0; /* Gray */
    color: #2d3748;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
}
.btn-secondary:hover {
    background-color: #a0aec0; /* Darker gray */
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
}
tr:hover {
    background-color: #f0f2f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding-top: 4rem; /* Space for header */
    }
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background-color: #ffffff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 990;
    }
}
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    .header {
        display: none; /* Hide header on larger screens */
    }
}
