/* Reset some default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #333;
    color: #fff;
    padding-top: 20px;
    flex-shrink: 0;
    transition: width 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow-y: auto; /* Ensure sidebar can scroll */
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 300;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li {
    margin: 20px 0;
}

.sidebar nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding: 10px;
    transition: background-color 0.3s ease;
}

.sidebar nav ul li a .icon {
    margin-right: 10px;
}

.sidebar nav ul li a:hover, .sidebar nav ul li.active a {
    background-color: #444;
}

.sidebar .toggle-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
}

.sidebar.collapsed .toggle-btn {
    transform: rotate(180deg);
}

/* Main content */
.main-content {
    flex-grow: 1;
    padding: 10px;
    transition: margin-left 0.3s ease;
}

.main-content header {
    background-color: #fff;
    padding: 10px 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-content header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
    color: #555;
}

.main-content header .menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.main-content .content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-content .content .card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(50% - 20px);
}

.main-content .content .card.full-width {
    flex: 1 1 100%;
}

.main-content .content .card h2 {
    margin-bottom: 10px;
    font-weight: 300;
    color: #666;
}

.main-content .content .card p {
    margin-bottom: 10px;
    color: #888;
}

/* Buttons */
button {
    background-color: rgba(16, 43, 107, 0.6);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: rgba(16, 43, 107, 0.8);
}

button:focus {
    outline: none;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
}

input[type="checkbox"] {
    width: 20px; /* Adjust the size */
    height: 20px; /* Adjust the size */
    cursor: pointer; /* Change cursor on hover */
    border-radius: 5px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(16, 43, 107, 0.6);
    outline: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 1rem;
    color: #666;
}

table th {
    background-color: #f2f2f2;
    color: #555;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:nth-child(odd) {
    background-color: #fff;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

/* Responsive Sidebar for Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        height: 100%;
        z-index: 1000;
        overflow-y: auto; /* Enable scroll on mobile */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .main-content header .menu-icon {
        display: block;
    }

    .main-content .content .card {
        flex: 1 1 100%;
    }

    /* Make the sidebar menu scrollable */
    .sidebar nav ul {
        max-height: calc(100vh - 100px); /* Adjust height as needed */
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .sidebar h2, .sidebar nav ul li {
        text-align: center;
    }
}