/* General body styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    color: #333;
    max-width: 100vw;
    overflow-x: hidden; /* Prevents horizontal overflow on small screens */
    padding-top: 80px; /* Adds 80px of space from the top */    
}

/* Login container styles */
.login-container {
    max-width: 600px;
    width: 100%;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 40px auto; /* Center horizontally and add top margin */
    text-align: center;
    box-sizing: border-box;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    background-color: #e9ecef;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    background-color: #fff;
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button styles */
.btn-login,
.button,
.btn-update-account,
.btn-resend-verification {
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    width: 48%; /* Applied to update and resend buttons */
}

.btn-login:hover,
.button:hover,
.btn-update-account:hover,
.btn-resend-verification:hover {
    background-color: #218838;
    border-color: #218838;
}

/* Error and success message styles */
.error-message,
.success-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}

/* Navigation styles */
nav {
    background-color: #343a40;
    padding: 1rem 1rem;
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    top: 10px;
    z-index: 1000;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    display: block; /* Ensure links take full width of the list item */
}

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

/* Menu icon styles for mobile */
.menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    z-index: 1001;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }

    nav ul {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        display: none;
        background-color: #343a40;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
    }

    nav ul.show {
        display: block;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    nav ul li a {
        width: 100%;
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #495057;
    }
}

/* Container styles for the Activity Report */
.logs-container,
.manage-account-container {
    max-width: 1200px;
    margin: 20px auto; /* Adds 20px space at the top and bottom, and centers horizontally */
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    text-align: center; /* Center the text inside the container */
    box-sizing: border-box; /* Ensure padding is included in the element's total width and height */
}

.manage-account-container {
    max-width: 100%; /* Set to 100% to prevent horizontal scrolling */
}

.modern-form .form-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow the rows to wrap on small screens */
}

.modern-form .form-column {
    flex: 1;
    padding: 0 10px;
    min-width: 0; /* Allow columns to shrink as needed */
    box-sizing: border-box; /* Ensure padding is included in the element's total width */
}
 

.logs-page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 100;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Filter form styles */
.filter-form {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-form label {
    margin-right: 10px;
    font-weight: bold;
}

.filter-form select {
    padding: 5px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    width: 100%; /* Ensure the select elements take full width */
}

/* Table container to allow horizontal scrolling on smaller devices */
.logs-table-container {
    overflow-x: auto;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 600px;
}

.logs-table th,
.logs-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    vertical-align: middle;
}

.logs-table th {
    background-color: #f4f4f4;
    font-weight: 700;
}

.logs-table tr:hover {
    background-color: #f9f9f9;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a,
.pagination strong {
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.pagination strong {
    background-color: #6c757d;
}

.pagination a:hover {
    background-color: #0056b3;
}

/* Back button styles */
.btn-back {
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease;
    position: fixed;
    right: 20px;
    top: 80%; /* Adjust this value to match the placement on your page */
    opacity: 0.25;
    z-index: 1000;
}

.btn-back:hover {
    background-color: #218838;
    opacity: 1.0;
}

/* Responsive styles for screens smaller than 768px */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .logs-table th,
    .logs-table td {
        text-align: center;
    }

    .logs-table td:nth-child(5) {
        display: block;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-family: monospace; /* Optional: gives it a more "Excel-like" appearance */
        font-size: 14px;
    }

    .logs-table td:nth-child(5)::before {
        content: "";
        font-weight: bold;
    }

    .logs-container,
    .manage-account-container {
        padding: 15px;
        margin: 20px 10px; /* Ensure there's space on the sides */
    }

    .logs-page-title,
    .manage-account-container h2 {
        font-size: 1.5rem;
        padding: 10px 0;
        background-color: #fff;
    }

    .modern-form .form-row {
        flex-direction: column; /* Stack the form rows vertically */
    }

    .modern-form .form-column {
        padding: 0;
        min-width: 100%; /* Make the columns full width on small screens */
    }

    .btn-update-account,
    .btn-resend-verification {
        width: 100%; /* Make the buttons full width */
    }

    footer {
        padding: 8px 10px;
    }

    footer p {
        font-size: 12px;
    }
}

/* Footer styles */
footer {
    background-color: #2C3E50;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

footer p {
    margin: 0;
    font-size: 14px;
}
