/**
 * css/shiftEmployeeManager.css
 *
 * Styling riêng cho tính năng quản lý ca làm việc & nhân viên
 */

/* ===== LAYOUT CHÍNH ===== */
.shift-employee-manager-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

.shift-employee-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: 100%;
    padding: 20px;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* Responsive: màn hình nhỏ */
@media (max-width: 1024px) {
    .shift-employee-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
    }
}

/* ===== SHIFT COLUMN (BÊN TRÁI) ===== */
.shift-column {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.shift-list-header {
    padding: 16px;
    border-bottom: 2px solid #f0f0f0;
    background-color: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.shift-list-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.shift-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.shift-item {
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.shift-item:hover {
    background-color: #f9f9f9;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.shift-item.active {
    background-color: #e3f2fd;
    border-color: #2563eb;
    font-weight: 500;
}

.shift-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shift-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.shift-item-time {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shift-item-time .time-separator {
    margin: 0 4px;
}

.shift-item-note {
    font-size: 11px;
    color: #999;
    font-style: italic;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* ===== EMPLOYEE COLUMN (BÊN PHẢI) ===== */
.employee-column {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.employee-shift-header {
    padding: 16px;
    border-bottom: 2px solid #f0f0f0;
    background-color: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.employee-shift-header h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.employee-shift-header strong {
    color: #2563eb;
}

.employee-count {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.employee-count strong {
    color: #2563eb;
    font-weight: 600;
}

/* ===== DANH SÁCH NHÂN VIÊN ===== */
.employee-shift-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.empty-message {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ===== TABLE NHÂN VIÊN ===== */
.employee-shift-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}

.employee-shift-table thead {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 5;
}

.employee-shift-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.employee-shift-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.1s ease;
}

.employee-shift-table tbody tr:hover {
    background-color: #f9f9f9;
}

.employee-shift-table td {
    padding: 12px;
    color: #555;
}

.employee-name {
    font-weight: 500;
    color: #333;
}

.employee-code {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 12px;
}

.employee-note {
    color: #888;
    font-size: 12px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-creator {
    color: #999;
    font-size: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .shift-employee-layout {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .shift-column, .employee-column {
        max-height: 400px;
    }

    .shift-list-header h3, .employee-shift-header h3 {
        font-size: 14px;
    }

    .shift-item {
        padding: 10px;
    }

    .employee-shift-table th,
    .employee-shift-table td {
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .shift-item-note {
        display: none;
    }

    .employee-note {
        display: none;
    }

    .employee-shift-table th,
    .employee-shift-table td {
        padding: 6px;
        font-size: 11px;
    }
}
/* ===== TAB NAVIGATION ===== */
.shift-employee-tabs {
    padding: 0 20px 0 20px;
    background-color: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0;
}

.tabs-wrapper {
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background-color: transparent;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ===== ALL EMPLOYEES VIEW ===== */
.shift-employee-all-employees {
    padding: 20px;
    background-color: #f5f5f5;
    overflow-y: auto;
}

.all-employees-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.all-employees-header {
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #ffffff;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.all-employees-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.employee-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.employee-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #2563eb;
}

.employee-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e0e0e0;
}

.employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.employee-info {
    text-align: center;
    width: 100%;
}

.employee-info .employee-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
    line-height: 1.3;
}

.employee-info .employee-code {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.employee-info .employee-shift {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    padding: 6px 8px;
    background-color: #f0f8ff;
    border-radius: 4px;
}

.employee-info .employee-shift strong {
    color: #2563eb;
    font-weight: 600;
}

.employee-info .employee-note {
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-top: 6px;
    line-height: 1.2;
}

/* ===== TABLE AVATAR ===== */
.employee-avatar-cell {
    text-align: center;
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.employee-avatar-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.avatar-placeholder-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin: 0 auto;
    border: 2px solid #e0e0e0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .employees-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .employee-card {
        padding: 12px;
    }
    
    .employee-avatar {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }
    
    .avatar-placeholder {
        font-size: 24px;
    }
    
    .shift-employee-tabs {
        padding: 0 12px;
    }
    
    .tab-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
}