/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.logo i {
    margin-right: 10px;
    color: #4fc3f7;
}

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #38a169;
    color: white;
}

.btn-primary:hover {
    background: #2f855a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main content */
.main-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 32px;
    margin-bottom: 20px;
}

.page-title h1 {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 8px;
}

.page-title p {
    color: #718096;
    font-size: 16px;
    margin-bottom: 32px;
}

/* Statistics */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.stat-info p {
    color: #718096;
    font-size: 14px;
}

/* Filters */
.filters-section {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.view-options {
    display: flex;
    gap: 4px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s ease;
}

.view-btn.active,
.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #edf2f7;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 8px;
}

.empty-state p {
    color: #718096;
    margin-bottom: 24px;
}

/* Data container */
.data-container {
    margin-bottom: 32px;
}

/* Employee cards (grid view) */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.employee-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.employee-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
}

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

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

.employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.employee-title {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
}

.employee-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
}

.info-row i {
    width: 16px;
    color: #718096;
}

/* Employee table (list view) */
.employee-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.employee-table th,
.employee-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.employee-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.employee-table td {
    font-size: 14px;
    color: #4a5568;
}

.employee-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.employee-table tbody tr:hover {
    background: #f7fafc;
}

.table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    overflow: hidden;
}

.table-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.department-badge {
    background: #edf2f7;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.pagination-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #718096;
}

/* Back link */
.back-link {
    text-align: center;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.back-link a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 20px;
    color: #2d3748;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f7fafc;
    border-radius: 6px;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.modal-employee-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

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

.modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-employee-info h3 {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 4px;
}

.modal-employee-info p {
    color: #667eea;
    font-weight: 500;
}

.modal-details {
    display: grid;
    gap: 16px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-label {
    font-weight: 500;
    color: #4a5568;
    min-width: 120px;
}

.detail-value {
    color: #2d3748;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .employee-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-table {
        font-size: 12px;
    }
    
    .employee-table th,
    .employee-table td {
        padding: 8px 12px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
}