/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 680px;
    padding: 20px;
}

.container:has(.login-form),
.container:has(.timecard) {
    max-width: 400px;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

h2 {
    color: #555;
    text-align: center;
    margin-bottom: 20px;
    font-weight: normal;
}

h3 {
    color: #444;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

h4 {
    color: #555;
    margin-bottom: 10px;
}

small {
    display: block;
    color: #777;
    margin-top: 5px;
    font-size: 12px;
}

/* Login Form */
.login-form, .timecard, .admin-panel {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 0.1em;
}

table input[type="text"],
table input[type="email"],
table select {
    padding: 4px 6px !important;
    font-size: 13px !important;
    text-align: left !important;
    letter-spacing: normal !important;
    box-sizing: border-box;
    width: 100%;
    height: auto;
}

.btn-login, .btn-add-user {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-login:hover, .btn-add-user:hover {
    background-color: #45a049;
}

/* Timecard */
.user-info {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}

.status-in {
    background-color: #e8f5e9;
    color: #2e7d32;
    text-align: center;
}

.status-out {
    background-color: #ffebee;
    color: #c62828;
    text-align: center;
}

.timecard-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.timecard-buttons button:disabled {
    background-color: #8d8d8de5;
    cursor: not-allowed; 
    pointer-events: none;
}

.full-width {
    width: 100%;
}

.btn-checkin, .btn-checkout {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-checkin {
    background-color: #4CAF50;
}

.btn-checkout {
    background-color: #f44336;
}

.btn-checkin:hover {
    background-color: #45a049;
}

.btn-checkout:hover {
    background-color: #d32f2f;
}

/* Admin Panel */
.admin-panel {
    max-width: 680px;
}

.admin-section {
    margin-bottom: 30px;
}

.user-list {
    margin-bottom: 30px;
    overflow-x: auto;
}

table {
    width: auto;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

th, td {
    padding: 5px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f9f9f9;
}

.btn-deleteUser {
    color: #fff;
    background-color: #f44336;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
}
.btn-deleteUser:hover {
    background-color: #d32f2f;
}


.add-user-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.admin-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-logout {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

.cell-action {
    text-align: center;
    vertical-align: middle;
}

.cell-add {
    text-align: center;
}

.btn-addUser {
    color: #fff;
    background-color: #4CAF50;
    border: none;
    cursor: pointer;
    padding: 4px 16px;
    border-radius: 3px;
    font-size: 16px;
}

.btn-addUser:hover {
    background-color: #45a049;
}

/* Edit User */
.btn-editUser {
    color: #fff;
    background-color: #2196F3;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.btn-editUser:hover {
    background-color: #1976D2;
}

.btn-saveUser {
    background-color: #4CAF50 !important;
}

.btn-saveUser:hover {
    background-color: #45a049 !important;
}

.edit-input, .edit-select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #2196F3;
    border-radius: 3px;
    font-size: 13px !important;
    text-align: left;
    letter-spacing: normal;
}

.edit-select {
    padding: 4px 2px;
    font-size: 13px !important;
}

/* Whitelist Management */
.whitelist-note {
    color: #777;
    font-size: 13px;
    margin-bottom: 15px;
}

.whitelist-list {
    margin-bottom: 15px;
}

.whitelist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 6px;
}

.whitelist-email {
    font-size: 14px;
    color: #333;
}

.whitelist-empty {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.btn-delete-whitelist {
    background: none;
    border: none;
    color: #f44336;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-delete-whitelist:hover {
    color: #d32f2f;
}

.whitelist-add {
    display: flex;
    gap: 8px;
}

.whitelist-add input[type="email"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: left;
    letter-spacing: normal;
}

.btn-add-whitelist {
    padding: 10px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-add-whitelist:hover {
    background-color: #45a049;
}

/* Google Login Button */
.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #ddd;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.divider span {
    background-color: white;
    padding: 0 10px;
    color: #999;
    font-size: 14px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-google:hover {
    background-color: #f5f5f5;
}

/* Messages */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}
