/* Employee Management Styles */

/* Override main-content padding for employees page */
.main-content {
    padding: 0 !important;
}

.employee-page-container {
    width: 100%;
    height: 100vh;
    overflow: auto;
    box-sizing: border-box;
}

/* Dashboard Stats */
.employee-dashboard {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-header h2 {
    color: #333;
    font-size: 1.5rem;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease;
}

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

.stat-card.active-employees {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.total-hours {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card.avg-efficiency {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-card.total-payroll {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0 0 4px 0;
    font-weight: 700;
}

.stat-content p {
    margin: 0 0 4px 0;
    font-weight: 600;
}

.stat-content small {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Employee List */
.employees-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.employee-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border-left: 4px solid #667eea;
}

.employee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.employee-card.on-job {
    border-left-color: #43e97b;
}

.employee-card.driving {
    border-left-color: #fa709a;
}

.employee-card.break {
    border-left-color: #fee140;
}

.employee-card.inactive {
    border-left-color: #ccc;
    opacity: 0.7;
}

.employee-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.employee-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.employee-info h3 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 1.1rem;
}

.employee-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.employee-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.employee-status.active {
    background: #e8f5e8;
    color: #2d5a2d;
}

.employee-status.on-job {
    background: #e8f5e8;
    color: #2d5a2d;
}

.employee-status.driving {
    background: #fff3cd;
    color: #856404;
}

.employee-status.break {
    background: #d1ecf1;
    color: #0c5460;
}

.employee-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.employee-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.metric-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.metric-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.employee-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-btn.primary {
    background: #667eea;
    color: white;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.danger {
    background: #dc3545;
    color: white;
}

.action-btn:hover {
    opacity: 0.9;
}

/* Employee Details Modal */
.employee-details-modal {
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.employee-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.employee-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.employee-title-info h2 {
    margin: 0 0 4px 0;
    color: #333;
}

.employee-subtitle {
    margin: 0;
    color: #666;
}

.employee-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: #667eea;
    color: white;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.danger {
    background: #dc3545;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.employee-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.metric-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

/* Status Info */
.status-info {
    display: grid;
    gap: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-label {
    font-weight: 600;
    color: #333;
}

.status-value {
    color: #666;
}

/* Payroll Stats */
.payroll-stats {
    display: grid;
    gap: 12px;
}

.payroll-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.payroll-label {
    font-weight: 600;
    color: #333;
}

.payroll-value {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

/* Employee Footer Actions */
.employee-footer-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .employees-list {
        grid-template-columns: 1fr;
    }
    
    .employee-content-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .employee-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .employee-footer-actions {
        flex-direction: column;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}
