body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
}

form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

form input[type="text"],
form input[type="password"],
form input[type="file"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

form button:hover {
    background-color: #0056b3;
}

#logout-button {
    background-color: #dc3545;
    float: right;
    margin-top: -50px;
}

#logout-button:hover {
    background-color: #c82333;
}

.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #e9f7ef;
    border: 1px solid #d4edda;
    color: #155724;
    text-align: center;
}

.message[style*="red"] {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

#employee-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.employee-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.employee-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #eee;
}

.employee-item h4 {
    margin: 0 0 5px 0;
    color: #007bff;
}

.employee-item p {
    margin: 0 0 3px 0;
    font-size: 0.9em;
}

.employee-item button {
    padding: 5px 10px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
}

.employee-item .edit-employee {
    background-color: #ffc107;
    color: #333;
}

.employee-item .edit-employee:hover {
    background-color: #e0a800;
}

.employee-item .delete-employee {
    background-color: #dc3545;
    color: white;
}

.employee-item .delete-employee:hover {
    background-color: #c82333;
}

#refresh-employees {
    background-color: #17a2b8;
    color: white;
    margin-bottom: 15px;
}

#refresh-employees:hover {
    background-color: #138496;
}

#cancel-edit {
    background-color: #6c757d;
    color: white;
}

#cancel-edit:hover {
    background-color: #5a6268;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#photo-preview-container {
    margin-top: 10px;
    border: 1px solid #ddd;
    padding: 5px;
    display: inline-block;
    background-color: #fff;
}

#photo-preview {
    display: block;
    max-width: 120px;
    max-height: 160px;
    object-fit: contain;
}

#badges-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
}

#badges-checkboxes input[type="checkbox"] {
    margin-right: 5px;
    width: auto; /* Override default input width */
}

#badges-checkboxes label {
    font-weight: normal;
    margin-bottom: 0;
    display: inline-block;
}

#loading-indicator {
    position: fixed !important; /* Force fixed positioning */
    top: 50% !important; /* Center vertically */
    left: 50% !important; /* Center horizontally */
    transform: translate(-50%, -50%) !important; /* Adjust for element's own size */
    width: auto; /* Allow content to define width */
    height: auto; /* Allow content to define height */
    padding: 20px; /* Add some padding around content */
    background-color: rgba(255, 255, 255, 0.9); /* Slightly less transparent background */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
    display: none; /* Hidden by default */
    flex-direction: column; /* Stack spinner and text vertically */
    align-items: center;
    justify-content: center;
    z-index: 9999 !important; /* Force z-index to be on top */
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px; /* Add some space between spinner and text */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrollbar from appearing due to fixed elements */
}