:root {
    --manager-primary: #eb3f62;
    --manager-accent: #ff6b6b;
}

.sidebar { background-color: var(--manager-primary); }
button { background-color: var(--manager-primary); }

.dual-layout { display: flex; gap: 30px; align-items: flex-start; }
.layout-left { flex: 2; }
.layout-right { flex: 1; }

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.table-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}
.table-box:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

.table-box.available { border-top: 5px solid #2ecc71; }
.table-box.reserved { border-top: 5px solid #e74c3c; background: #fff5f5; }

.table-box h4 { font-size: 18px; margin-bottom: 5px; }
.table-box p { color: #888; font-size: 13px; }

.form-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from {opacity: 0; transform: translateY(-10px);} to {opacity: 1; transform: translateY(0);} }

.dual-layout {
    display: flex;
    gap: 30px;
    padding: 10px;
}

.reservation-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 5px solid #f1c40f; 
    transition: transform 0.2s;
}

.reservation-card:hover {
    transform: translateY(-3px);
}

.reservation-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
}

.reservation-card p {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.reservation-card .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-release {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

/* Lớp phủ nền tối */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Làm nền tối hơn để nổi bật modal */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Khối nội dung Modal - Đảm bảo nền trắng hoàn toàn */
.modal-content {
    background-color: #ffffff !important; /* Buộc nền phải là màu trắng */
    width: 90%;
    max-width: 550px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Header căn giữa tiêu đề */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: center; /* Căn giữa tiêu đề */
    align-items: center;
    position: relative;
}

#modalTitle {
    font-size: 24px; /* Kích thước to theo yêu cầu */
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

/* Nút X nằm bên phải và to ra */
.close-btn {
    position: absolute;
    right: 20px;
    font-size: 30px; /* To bằng size tiêu đề */
    cursor: pointer;
    color: #95a5a6;
    line-height: 1;
}

.close-btn:hover {
    color: #e74c3c;
}

/* Body modal thụt vào giữa */
.modal-body {
    padding: 30px;
    background-color: #ffffff; /* Đảm bảo body cũng màu trắng */
}

/* Footer căn giữa các nút bấm */
.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center; /* Căn giữa nút Hủy và Lưu */
    gap: 15px;
    background-color: #ffffff;
}

.modal-footer button {
    padding: 12px 25px;
    min-width: 120px;
    font-size: 16px;
}

/* báo cáo */
.finance-toolbar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-5px); }

.card-icon {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.card-info h5 { margin: 0; color: #7f8c8d; font-size: 14px; font-weight: normal; }
.card-info p { margin: 5px 0 0 0; font-size: 22px; font-weight: bold; color: #2c3e50; }

.bg-green { background: #2ecc71; }
.bg-red { background: #e74c3c; }
.bg-blue { background: #3498db; }

.table-container {
    background: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-height: 500px;
    overflow-y: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.left-tools,
.right-tools {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Thêm menu form */
.menu-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.menu-form-grid .form-group.full {
    grid-column: span 2;
}

.menu-form-grid input,
.menu-form-grid select,
.menu-form-grid textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.finance-table th { position: sticky; top: 0; z-index: 10; background: #f8f9fa; }
.text-green { color: #27ae60; font-weight: bold; }
.text-red { color: #c0392b; font-weight: bold; }

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 5px;
    font-size: 14px;
}
.form-group {
    margin-bottom: 15px;
}
.btn-icon {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: 0.2s;
}
.btn-icon.edit { color: #f39c12; }
.btn-icon.delete { color: #e74c3c; }
.btn-icon:hover { transform: scale(1.2); }

.schedule-table th {
    background-color: #2c3e50;
    color: white;
    text-align: center;
}

.slot-cell {
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #eee;
    height: 60px;
    vertical-align: middle !important;
}

.slot-cell:hover {
    background-color: #f1f1f1;
}

.slot-cell.active {
    background-color: #e8f5e9; 
    border: 2px solid #2ecc71;
}

.slot-cell i {
    font-size: 24px;
    opacity: 0.3;
}

.slot-cell.active i {
    opacity: 1;
    color: #2ecc71;
    transform: scale(1.1);
}
.badge-ft {
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.badge-pt {
    background-color: #f39c12;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.stats-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.chart-wrapper {
    position: relative;
    height: 350px; /* Chiều cao cố định cho biểu đồ */
    width: 100%;
}

.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-bar input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-group label {
    font-weight: 500;
    color: #555;
}

.custom-date-input {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: inherit;
    color: #333;
    background: #f9f9f9;
    transition: 0.3s;
}
.custom-date-input:focus {
    border-color: var(--manager-primary);
    background: #fff;
    outline: none;
}

/* Các thẻ chỉ số (KPI Cards) */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-3px);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
/* Màu sắc cho từng loại icon */
.bg-light-red { background: #ffebee; color: var(--manager-primary); }
.bg-light-blue { background: #e3f2fd; color: #1976d2; }
.bg-light-green { background: #e8f5e9; color: #2e7d32; }

.kpi-info h4 {
    margin: 0;
    font-size: 14px;
    color: #777;
    font-weight: 500;
}

.kpi-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

/* Phần nội dung chính */
.analytics-container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 phần biểu đồ, 1 phần danh sách */
    gap: 25px;
}

.card-box {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Tinh chỉnh bảng trong Dashboard */
.mini-table {
    width: 100%;
    font-size: 14px;
}
.mini-table th {
    background: #f8f9fa;
    color: #666;
    padding: 10px;
    font-weight: 600;
}
.mini-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}
.table-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f0f0;
    color: #555;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 1024px) {
    .analytics-container {
        grid-template-columns: 1fr;
    }
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--manager-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-right: 15px;
    text-transform: uppercase;
}

/* Thông tin nhân viên trong bảng */
.staff-info {
    display: flex;
    align-items: center;
}
.staff-name {
    font-weight: 500;
    color: #333;
    display: block;
}
.staff-sub {
    font-size: 12px;
    color: #888;
}

/* Role Badges - Phân biệt chức vụ bằng màu sắc */
.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.role-manager { background: #e3f2fd; color: #1565c0; } /* Xanh dương */
.role-chef { background: #fff3e0; color: #ef6c00; }    /* Cam */
.role-waiter { background: #e8f5e9; color: #2e7d32; }  /* Xanh lá */
.role-other { background: #f5f5f5; color: #616161; }   /* Xám */

/* Nút hành động trong bảng */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 5px;
    transition: 0.2s;
}
.btn-edit { background: #fff8e1; color: #fbc02d; }
.btn-edit:hover { background: #ffecb3; }

.btn-delete { background: #ffebee; color: #e53935; }
.btn-delete:hover { background: #ffcdd2; }

.staff-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
    font-size: 15px;
}

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

.tab-btn.active {
    background: var(--manager-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(235, 63, 98, 0.3);
}

/* --- SCHEDULE TABLE STYLE --- */
.schedule-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

.schedule-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
    border: 1px solid #eee;
    font-weight: 700;
    color: #444;
}

.schedule-table td {
    border: 1px solid #eee;
    padding: 10px;
    vertical-align: top;
    height: 120px; /* Chiều cao cố định để ô lịch rộng rãi */
    width: 14.28%; /* Chia đều 7 ngày */
    transition: 0.2s;
    background: #fff;
}

.schedule-table td:hover {
    background: #fafafa;
}

/* Thẻ tên nhân viên trong ô lịch */
.shift-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 5px;
    background: #fff3e0; /* Màu mặc định */
    border-left: 3px solid #ff9800;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.shift-tag.role-bep { background: #ffebee; border-left-color: #e53935; } /* Bếp màu đỏ nhạt */
.shift-tag.role-pv { background: #e8f5e9; border-left-color: #2e7d32; } /* Phục vụ màu xanh */

.shift-tag i.remove-shift {
    color: #aaa;
    margin-left: 5px;
    transition: 0.2s;
}
.shift-tag i.remove-shift:hover { color: #d32f2f; }

.add-shift-btn {
    width: 100%;
    padding: 5px;
    border: 1px dashed #ccc;
    background: none;
    color: #888;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}
.add-shift-btn:hover {
    border-color: var(--manager-primary);
    color: var(--manager-primary);
    background: #fff5f8;
}
.btn-logout {
    margin-left: 12px;
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-logout:hover {
    background: #c0392b;
}

.modal-body .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.modal-body label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.modal-body .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modal-body textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.modal-body input[type="file"] {
    padding: 5px 0;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}
.stat-item:hover { transform: translateY(-3px); }

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.stat-info h4 { margin: 0; font-size: 14px; color: #666; font-weight: 500; }
.stat-info span { font-size: 24px; font-weight: bold; color: #333; }

/* Màu sắc trạng thái */
.bg-blue-light { background: #e3f2fd; color: #1976d2; }
.bg-green-light { background: #e8f5e9; color: #2e7d32; }
.bg-red-light { background: #ffebee; color: #c62828; }
.bg-orange-light { background: #fff3e0; color: #ef6c00; }

/* --- Table Grid (Cải tiến) --- */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Rộng hơn chút */
    gap: 20px;
}

.table-box {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.table-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Trạng thái bàn */
.table-box.available { border-color: #2ecc71; background: #fff; }
.table-box.available .table-icon { color: #2ecc71; background: #e8f5e9; }

.table-box.occupied { border-color: #e74c3c; background: #fff5f5; }
.table-box.occupied .table-icon { color: #e74c3c; background: #ffebee; }
.table-box.occupied h4 { color: #c0392b; }

.table-box.reserved { border-color: #f1c40f; background: #fef9e7; }
.table-box.reserved .table-icon { color: #f39c12; background: #fff3e0; }

.table-icon {
    width: 60px; height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    transition: 0.3s;
}

.table-box h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.table-meta {
    font-size: 13px;
    color: #777;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.current-guest-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.reservation-card {
    border-left: 4px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
}
.reservation-card.pending { border-left-color: #f39c12; background: #fff8e1; }
.reservation-card.confirmed { border-left-color: #2ecc71; background: #e8f5e9; }

.res-time {
    font-weight: bold;
    color: #333;
    font-size: 16px;
    margin-bottom: 5px;
    display: block;
}

/* --- Finance Toolbar --- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 15px;
}

.date-picker-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-picker-group label {
    font-weight: 500;
    color: #555;
}

.custom-date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    color: #333;
    outline: none;
    transition: 0.3s;
}
.custom-date-input:focus { border-color: var(--manager-primary); }

.btn-excel {
    background-color: #217346;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-excel:hover { background-color: #1a5c38; transform: translateY(-2px); }

