@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;700&display=swap');

/* General Styling */
:root {
    --primary-color: #004643; /* Laboon Dark Teal */
    --secondary-color: #abd1c6;
    --success-color: #198754; /* Bootstrap Green */
    --warning-color: #ffc107; /* Bootstrap Yellow */
    --danger-color: #dc3545;  /* Bootstrap Red */
    --background-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --white: #fff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header & Footer */
header nav {
    background-color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #6c757d;
    border-top: 1px solid var(--border-color);
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 10vh auto;
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.login-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    transition: background-color 0.2s ease, opacity 0.2s ease;
    width: 100%;
}

.btn-primary { background-color: var(--primary-color); }
.btn-primary:hover:not(:disabled) { background-color: #003330; }
.btn-success { background-color: var(--success-color); }
.btn-success:hover:not(:disabled) { background-color: #146c43; }
.btn-warning { background-color: var(--warning-color); color: var(--text-color); }
.btn-warning:hover:not(:disabled) { background-color: #ffca2c; }

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    color: var(--white);
    text-align: center;
}
.alert-danger { background-color: var(--danger-color); }
.alert-success { background-color: var(--success-color); }

/* Dashboard Content */
.dashboard-content section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.dashboard-content h1, .dashboard-content h2, .dashboard-content h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.dashboard-content h2 { border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; margin-bottom: 20px; }
.dashboard-content h3 { margin-bottom: 15px; }

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* Employee List Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: #f2f2f2;
}

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

table .btn {
    width: auto; /* Override button width inside table */
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* Status Indicator */
.status-da-vao-ca {
    background-color: var(--success-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.status-chua-vao-ca {
    background-color: var(--danger-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Recent Logs */
.recent-logs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.recent-logs li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.recent-logs li:last-child {
    border-bottom: none;
}

/* Employee Dashboard Card */
.personal-card .employee-info {
    text-align: center;
    margin-bottom: 20px;
}

.personal-card .avatar {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.clock-form .button-group {
    display: flex;
    gap: 10px;
}

/* Tô màu cho lịch sử điểm danh */
.recent-logs table .log-check-in td {
    color: #28a745; /* Màu xanh lá cây */
    font-weight: bold;
}

.recent-logs table .log-check-out td {
    color: #dc3545; /* Màu đỏ */
}

/* Trạng thái đi trễ trong bảng log */
.status-late {
    background-color: var(--warning-color);
    color: var(--text-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}
.status-ontime {
    /* Bạn có thể thêm style cho 'Đúng giờ' nếu muốn, ví dụ màu xanh nhạt */
}


/* Thêm vào file public/css/style.css */

/* Style cho các nút lớn và nổi bật */
.large-button {
    padding: 15px 30px; /* Tăng kích thước padding */
    font-size: 1.5em;    /* Tăng kích thước chữ */
    font-weight: bold;
    border-radius: 8px;  /* Bo tròn góc nhiều hơn */
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-block; /* Đảm bảo nút nằm trên một dòng và có thể căn giữa */
    min-width: 200px; /* Đảm bảo chiều rộng tối thiểu */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Thêm đổ bóng để nổi bật */
    text-decoration: none; /* Đảm bảo không có gạch chân nếu là thẻ <a> */
    text-align: center;
}

/* Điều chỉnh màu sắc cho nút thành công (Vào ca) */
.large-button.btn-success {
    background-color: #28a745; /* Màu xanh lá cây */
    color: white;
    border: 1px solid #28a745;
}

.large-button.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Điều chỉnh màu sắc cho nút cảnh báo (Ra ca) */
.large-button.btn-warning {
    background-color: #ffc107; /* Màu vàng/cam */
    color: #212529; /* Chữ màu tối để tương phản */
    border: 1px solid #ffc107;
}

.large-button.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Căn giữa nhóm form chọn ca làm */
.attendance-actions .form-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
}

.attendance-actions .form-group label {
    margin-right: 10px;
    margin-bottom: 5px; /* Khoảng cách dưới label trên màn hình nhỏ */
}

.attendance-actions .form-group select {
    margin-bottom: 5px; /* Khoảng cách dưới select trên màn hình nhỏ */
}
