/* CSS Variables */
:root {
    --primary-color: #007BFF;
    --secondary-color: #6c757d;
    --background-color: #f9f9fc;
    --text-color: #444;
    --border-color: #ccc;
    --success-color: #d4edda;
    --error-color: #f8d7da;
}

/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Utility Classes */
.center {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Container Styles */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 70%;
}

.content-box {
    max-width: 1200px;
    width: 90%;
    padding: 30px;
    background-color: #ffffff;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .content-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

/* Typography */
h1, h2 {
    text-align: center;
}

h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

/* Form and Input Styles */
form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
    font-size: 14px;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], select {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

    input:focus, select:focus {
        border-color: var(--primary-color);
        outline: none;
    }

.total-hours {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    background-color: #f9f9f9;
}

#manager-select {
    margin: 16px;
    text-align: center;
    font-size: 16px;
}

#employee-select {
    padding: 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    
}

#edit-clock-admin {
    margin-top: 20px;
    text-align: center;
}

#edit-clock-admin h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

#edit-line-btn {
    background-color: #007BFF;
    color: white;
    padding: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    width: 100px;
    display: block /* Ensure the button is treated as a block element */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#admin-clock-btn {
    background-color: #007BFF;
    color: white;
    padding: 16px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    width: 100%;
    display: flex; /* Ensure the button is treated as a block element */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    #admin-clock-btn:hover {
        background-color: #0056b3;
    }

    #admin-clock-btn:active {
        background-color: #004494;
    }


/* Button Styles */
button {
    background-color: #007BFF;
    color: white;
    padding: 16px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    width: 80%;
    max-width: 80%;
    margin: 10px auto;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    button:hover {
        background-color: #0056b3;
    }

    button span {
        display: block;
        font-size: calc(1vw + 1em);
        line-height: 1.2;
    }

    button:disabled {
        background-color: #cccccc;
        cursor: not-allowed;
    }

/* Center the button in the button-section */
.button-section {
    display: flex;
    justify-content: center; /* Centers the content horizontally */
    align-items: center; /* Centers the content vertically */
    margin-top: 20px; /* Optional: Adds spacing above the section */
}

    .button-section button {
        background-color: #007BFF;
        color: white;
        padding: 16px;
        border: none;
        cursor: pointer;
        font-size: 18px;
        border-radius: 6px;
        transition: background-color 0.3s ease;
        width: 80%;
        max-width: 80%;
        margin: 10px auto;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .button-section button:hover {
        background-color: #0056b3; /* Slightly darker hover effect */
    }

/* Section Header */
.section-header {
    background-color: var(--background-color);
    padding: 10px;
    border-radius: 5px;
    border-color: var(--border-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Payment Form Styles */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--background-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 95%; /* Full width */
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%; /* Full width for all form groups */
}

/* Style for the side-by-side inputs with labels above the input boxes */
.inline-input-group {
    display: flex;
    gap: 20px;
    width: 100%; /* Full width */
}

    .inline-input-group .form-group {
        display: flex;
        flex-direction: column; /* Ensure label is above the input box */
        flex: 1; /* Equal width for each input group */
    }

    .inline-input-group .form-label {
        margin-bottom: 5px;
        font-weight: bold;
        font-size: 14px;
        color: var(--text-color);
    }

    .inline-input-group .form-input {
        width: 100%;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
    }

/* Section Header Styles */
.section-header {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-color);
    width: 100%; /* Full width */
    box-sizing: border-box;
}

/* Form Input Styles */
.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.submit-button {
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%; /* Full width for the button */
}

    .submit-button:hover {
        background-color: #0056b3;
    }

/* Table Styling */
table {
    width: 100%;
    border-collapse: separate; /* Allows spacing adjustments */
    border-spacing: 0 6px; /* Adds spacing between rows */
}

thead th {
    background-color: var(--primary-color); /* Fills header with primary color */
    color: white;
    text-align: center;
    padding: 10px;
}

.table-container {
    background-color: var(--primary-color); /* Fills space below header */
    padding: 10px; /* Adds spacing inside the container */
    border-radius: 6px; /* Rounded corners for the container */
}

tbody tr {
    background-color: var(--background-color); /* Keeps rows in default color */
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

tbody td {
    padding: 10px;
    text-align: center;
}

tbody tr:hover {
    background-color: #f0f8ff; /* Light blue background on hover */
}

/* Payment Form Spacing */
.payment-form {
    margin-top: 20px; /* Adds 20px space between table and form */
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--background-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 95%;
}

/* Updated Overlay Styles */
#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Higher than container */
    border-radius: inherit; /* Match the container's border radius */
}

#overlay-content {
    text-align: center;
    background: white;
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#countdown-message {
    font-size: 1.5rem;
    margin: 10px 0;
}

#shift-end-message {
    font-size: 1.8rem;
    color: green;
    font-weight: bold;
    margin-top: 20px;
}

/* Welcome Text Styling */
.welcome-text {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-align: center;
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-text {
        font-size: 1rem;
    }

    .container {
        padding: 15px;
        margin: 0 auto;
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 14px;
    }

    button {
        width: 100%;
        padding: 10px;
        margin: 5px 0;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .welcome-text {
        font-size: 0.9rem;
    }

    table {
        font-size: 12px;
    }

    button {
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .mobile-hidden {
        display: none; /* Hides the column */
    }
}




