/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Form Styles */
.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Login Container */
.login-row {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

/* Remove styles for add-button and delete-button */
.add-button,
.delete-button {
    display: none;
}

/* Last Submission Styles */
.last-submission-container {
    margin-top: 30px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    display: none; /* Initially hidden */
    max-height: 600px; /* Limit the height of the last submission box */
    overflow-y: auto; /* Enable vertical scrolling */
}

.last-submission-container h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.last-submission-field {
    margin-bottom: 8px;
    display: flex;
}

.last-submission-field strong {
    min-width: 120px;
    font-weight: bold;
    color: #555;
}

.submission-summary {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #c3e6cb;
}

.submission-summary p {
    margin: 0;
}

.logins-list {
    margin-top: 5px;
    padding-left: 20px;
}

.logins-list li {
    margin-bottom: 3px;
}

/* Button Styles */
.submit-btn {
    background-color: #4CAF50; /* Green */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    width: 100%;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #3e8e41; /* Darker green */
}

.delete-last-submission-btn {
    background-color: #f5b7b9; /* Slightly darker red */
    color: #721c24; /* Dark red text */
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    width: 100%;
    transition: background-color 0.3s;
}

.delete-last-submission-btn:hover {
    background-color: #f19496; /* Darker red on hover */
}

/* Header Buttons */
.header-buttons {
    display: flex;
    justify-content: center; /* Center align the buttons */
    gap: 15px; /* Ensure consistent spacing between buttons */
    margin-bottom: 20px;
}

.action-button,
.header-buttons .upload-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 12px 25px; /* Match size with other buttons */
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px; /* Match font size with other buttons */
    font-weight: bold; /* Make button text bold */
    text-align: center;
    transition: background-color 0.3s;
}

.action-button:hover,
.header-buttons .upload-button:hover {
    background-color: #0b7dda;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
}

.dashboard-content {
    max-width: 90%;
    max-height: 80vh;
    overflow: auto;
    padding: 30px;
}

.modal h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 15px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-buttons button:first-child {
    background-color: #4CAF50;
    color: white;
}

.modal-buttons button:last-child {
    background-color: #f44336;
    color: white;
}

.modal-buttons button:hover {
    opacity: 0.8;
}

.close-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.close-button:hover {
    background-color: #3e8e41;
}

/* Password Modal Styles */
#passwordModal .modal-content {
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    color: white; /* Text color */
    padding: 20px 40px; /* Add padding for better visibility */
    border-radius: 8px; /* Rounded corners */
    font-size: 18px; /* Larger font size */
    font-weight: bold; /* Bold text */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

#passwordModal input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

#passwordModal .modal-buttons button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#passwordModal .modal-buttons button:hover {
    background-color: #3e8e41;
}

#passwordModal .modal-buttons button:last-child {
    background-color: #f44336;
}

#passwordModal .modal-buttons button:last-child:hover {
    background-color: #d32f2f;
}

#passwordModal h3 {
    color: #FFD700; /* Bright gold color for better visibility */
    font-size: 20px; /* Slightly larger font size */
    margin-bottom: 15px;
}

/* Confirmation Content */
.confirmation-entry {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin: 15px 0;
}

.confirmation-entry p {
    margin: 8px 0;
}

/* Message Styles */
.message {
    padding: 10px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    display: block;
}

.message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
    display: block;
}

/* Dashboard Styles */
.dashboard-summary {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb); /* Gradient background */
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #90caf9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.dashboard-summary h4 {
    font-size: 20px;
    color: #0d47a1; /* Dark blue */
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-summary h5 {
    font-size: 16px;
    color: #1565c0; /* Medium blue */
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 2px solid #90caf9; /* Underline effect */
    padding-bottom: 5px;
}

.dashboard-summary ul {
    margin: 10px 0 15px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.dashboard-summary ul li {
    margin-bottom: 8px;
    color: #1e88e5; /* Bright blue */
    font-size: 14px;
    font-weight: 500;
}

.dashboard-summary .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dashboard-summary .filters label {
    font-size: 14px;
    color: #0d47a1;
    font-weight: bold;
}

.dashboard-summary .filters input,
.dashboard-summary .filters select {
    padding: 8px;
    border: 1px solid #90caf9;
    border-radius: 5px;
    font-size: 14px;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.dashboard-summary .filters input:focus,
.dashboard-summary .filters select:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 5px rgba(30, 136, 229, 0.5);
}

.dashboard-summary .filters button {
    background-color: #1e88e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.dashboard-summary .filters button:hover {
    background-color: #1565c0;
    transform: scale(1.05); /* Slight zoom effect */
}

.dashboard-table-container {
    max-height: calc(10 * 40px); /* Approximate height for 10 rows (40px per row) */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid #ddd; /* Add border around the table container */
    border-radius: 5px; /* Rounded corners */
    margin-top: 15px; /* Add spacing above the table */
    position: relative; /* Required for sticky positioning */
}

.dashboard-table thead th {
    position: sticky; /* Make the header row sticky */
    top: 0; /* Stick to the top of the container */
    z-index: 1; /* Ensure it stays above the table rows */
    background-color: #4CAF50; /* Match the header background color */
    color: white; /* Match the header text color */
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); /* Add subtle shadow for separation */
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.dashboard-table th {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    text-align: left;
}

.dashboard-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

.dashboard-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.dashboard-table tr:hover {
    background-color: #e9e9e9;
}

.dashboard-table .delete-entry-btn {
    background-color: #f44336; /* Red background */
    color: white; /* White text */
    border: none;
    padding: 5px 10px; /* Match padding with filter clear button */
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px; /* Match font size with filter clear button */
    transition: background-color 0.3s, transform 0.2s;
}

.dashboard-table .delete-entry-btn:hover {
    background-color: #d32f2f; /* Darker red on hover */
    transform: scale(1.05); /* Slight zoom effect */
}

/* Add this to your styles.css */
.multiple-entries-notice {
    background-color: #fff3cd;
    color: #856404;
    padding: 8px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 4px solid #ffeeba;
}

/* Loading Indicator Styles */
.loading-indicator {
    position: fixed; /* Make it float on the screen */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust for perfect centering */
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    color: white; /* Text color */
    padding: 15px 30px; /* Add padding for better visibility */
    border-radius: 8px; /* Rounded corners */
    font-size: 18px; /* Larger font size */
    font-weight: bold; /* Bold text */
    z-index: 10000; /* Ensure it appears above other elements */
    display: none; /* Initially hidden */
    text-align: center;
}

/* Alert Window Styles */
.alert-window {
    position: fixed; /* Make it float on the screen */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust for perfect centering */
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    color: white; /* Text color */
    padding: 20px 40px; /* Add padding for better visibility */
    border-radius: 8px; /* Rounded corners */
    font-size: 18px; /* Larger font size */
    font-weight: bold; /* Bold text */
    z-index: 10000; /* Ensure it appears above other elements */
    display: none; /* Initially hidden */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
}

.alert-window button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.alert-window button:hover {
    background-color: #3e8e41;
}

/* Duration Inputs */
.duration-inputs input {
    width: 80px; /* Increase width for better usability */
    padding: 8px; /* Add padding for better appearance */
    margin-right: 5px; /* Add spacing between inputs */
    text-align: center; /* Center-align the text */
}

/* Summary Table Styles */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
    table-layout: fixed; /* Ensure consistent column widths */
}

.summary-table th, .summary-table td {
    padding: 12px 15px; /* Add more padding for better spacing */
    border: 1px solid #ddd; /* Add dividers between cells */
    word-wrap: break-word; /* Ensure long text wraps within cells */
}

.summary-table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    text-align: center; /* Center-align header text */
}

.summary-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Light grey for even rows */
}

.summary-table tr:nth-child(odd) {
    background-color: #ffffff; /* White for odd rows */
}

.summary-table tr:hover {
    background-color: #f1f1f1; /* Highlight on hover */
}

.summary-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.summary-table tr:nth-child(odd) {
    background-color: #ffffff;
}

.summary-table tr:hover {
    background-color: #f1f1f1;
}

.table-container {
    overflow-x: auto; /* Enable horizontal scrolling for smaller screens */
    overflow-y: auto; /* Enable vertical scrolling for tall tables */
    margin-top: 15px;
    border: 1px solid #ddd; /* Add border around the table container */
    border-radius: 5px; /* Rounded corners */
    padding: 10px; /* Add padding around the table */
    max-height: calc(13 * 40px); /* Limit height for tables with many rows */
}

/* Code Summary Table Styles */
.code-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
    table-layout: fixed; /* Ensure consistent column widths */
}

.code-summary-table th, .code-summary-table td {
    padding: 12px 15px; /* Add more padding for better spacing */
    border: 1px solid #ddd; /* Add dividers between cells */
    word-wrap: break-word; /* Ensure long text wraps within cells */
}

.code-summary-table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    text-align: center; /* Center-align header text */
}

.code-summary-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Light grey for even rows */
}

.code-summary-table tr:nth-child(odd) {
    background-color: #ffffff; /* White for odd rows */
}

.code-summary-table tr:hover {
    background-color: #f1f1f1;
}

/* Breakdown by Day Table Styles */
.day-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
    table-layout: fixed; /* Ensure consistent column widths */
}

.day-summary-table th, .day-summary-table td {
    padding: 12px 15px; /* Add more padding for better spacing */
    border: 1px solid #ddd; /* Add dividers between cells */
    word-wrap: break-word; /* Ensure long text wraps within cells */
}

.day-summary-table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    text-align: center; /* Center-align header text */
}

.day-summary-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Light grey for even rows */
}

.day-summary-table tr:nth-child(odd) {
    background-color: #ffffff; /* White for odd rows */
}

.day-summary-table tr:hover {
    background-color: #f1f1f1; /* Highlight on hover */
}

/* Breakdown by Login Table Styles */
.login-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
    table-layout: fixed; /* Ensure consistent column widths */
}

.login-summary-table th, .login-summary-table td {
    padding: 12px 15px; /* Add more padding for better spacing */
    border: 1px solid #ddd; /* Add dividers between cells */
    word-wrap: break-word; /* Ensure long text wraps within cells */
}

.login-summary-table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    text-align: center; /* Center-align header text */
}

.login-summary-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Light grey for even rows */
}

.login-summary-table tr:nth-child(odd) {
    background-color: #ffffff; /* White for odd rows */
}

.login-summary-table tr:hover {
    background-color: #f1f1f1; /* Highlight on hover */
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
    
    .input-group label {
        font-size: 14px;
    }
    
    .dashboard-table {
        font-size: 12px;
    }
}

.submission-cards {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping to the next row */
    gap: 15px; /* Add spacing between cards */
    justify-content: flex-start; /* Align cards to the left */
}

.submission-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: calc(33.333% - 10px); /* Ensure 3 cards per row with spacing */
    box-sizing: border-box;
}

.submission-card-header {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.submission-card-body p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.last-submission-actions {
    margin-top: 20px;
    text-align: center;
}

.last-submission-actions .submit-btn {
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.last-submission-actions .submit-btn:hover {
    background-color: #d32f2f;
}

.auth-status {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.auth-button:hover {
    background-color: #45a049;
}

#welcomeMessage {
    margin-right: 10px;
}

#userInfo {
    margin: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#userInfo pre {
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}