/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Container */
.container-fluid {
    padding: 20px;
}

/* Navbar */
.navbar {
    background-color: #212529;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar .navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

/* Sidebar */
.sidebar {
    background-color: #343a40;
    color: #fff;
    padding: 20px;
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #fff;
    font-size: 1rem;
    display: block;
    padding: 10px;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 10px;
}

.sidebar .nav-link:hover {
    background-color: #495057;
}

.sidebar .nav-link.active {
    background-color: #007bff;
}

/* Sidebar Toggle Button */
.menu-toggle {
    display: none;
    background-color: #007bff;
    color: white;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    border: none;
    width: 100%;
    font-size: 18px;
}

/* Main Content */
.main {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-left: 270px;
    transition: margin-left 0.3s ease-in-out;
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 400px; /* Adjustable */
}

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* Prevents text breaking */
}

.table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #a71d2a;
}

/* Forms */
form {
    margin-top: 20px;
}

.form-control {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Footer */
.footer {
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: fixed;
    bottom: 0;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 600px;
}

/* Alerts */
.alert {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        height: 100vh;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .main {
        margin-left: 0;
    }

    .table-container {
        overflow-x: scroll;
    }

    .modal-content {
        width: 95%;
    }
}
