* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #2563eb;
}

.brand i {
    font-size: 1.5rem;
}

.brand h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #64748b;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar nav ul li a i {
    width: 20px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #2563eb;
    color: white;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.header-left h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.add-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #1d4ed8;
}

.logout-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #dc2626;
}

/* Card Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.card-icon {
    background-color: #2563eb;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.card.status-active .card-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.3);
}

.card.status-leave .card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.card.status-inactive .card-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.card-info h3 {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.card-info .number {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.025em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: #64748b;
}

.close:hover {
    color: #1e293b;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.form-group textarea {
    height: 60px;
    resize: vertical;
}

.submit-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #1d4ed8;
}

/* Scrollbar Styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form Section Styles */
.form-section {
    font-size: 0.9rem;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Recent Employees Section */
.recent-employees-section {
    margin-top: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.recent-employees-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.recent-employees-section h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.view-all-btn i {
    font-size: 0.875rem;
}

.recent-employees-list {
    display: grid;
    gap: 1rem;
}

.recent-employee-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.recent-employee-card:hover {
    background: #f1f5f9;
    transform: translateX(5px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.recent-employee-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recent-employee-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.recent-employee-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.recent-employee-details p {
    margin: 0.375rem 0 0 0;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 400;
}

.recent-employee-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.recent-employee-date i {
    color: #2563eb;
}

.recent-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.recent-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.recent-empty p {
    font-size: 1rem;
}

/* Employee List Section Styles */
.employee-list-section {
    margin-top: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.section-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.search-box input {
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    width: 260px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-family: 'Inter', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box input::placeholder {
    color: #94a3b8;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    color: #334155;
    font-weight: 500;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select:hover {
    border-color: #cbd5e1;
}

/* Employee List Section Styles */
.employee-list-section {
    margin-top: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

td {
    color: #334155;
    font-size: 0.9375rem;
}

tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.001);
}

tbody tr:last-child td {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 0.875rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.edit-btn {
    background-color: #f59e0b;
    color: white;
}

.edit-btn:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.delete-btn {
    background-color: #ef4444;
    color: white;
}

.delete-btn:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

/* Status Dropdown Styles */
.status-select {
    padding: 0.375rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    outline: none;
    text-transform: capitalize;
}

.status-select:hover {
    border-color: #cbd5e1;
}

.status-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.status-active {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.status-on_leave {
    background-color: #fef3c7;
    color: #b45309;
    border-color: #fde047;
}

.status-inactive {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
}

.pagination-info {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #475569;
    min-width: 120px;
    text-align: center;
}

.pagination-btn i {
    font-size: 0.75rem;
}

/* Employee Details Modal Styles */
.close-details {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.close-details:hover {
    background-color: #f1f5f9;
    color: #334155;
}

#employeeDetailsModal .modal-content {
    max-width: 700px;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
}

#employeeDetailsModal h2 {
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.employee-details {
    display: grid;
    gap: 2rem;
}

.detail-section {
    display: grid;
    gap: 0.75rem;
}

.detail-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.detail-section p {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    margin: 0;
    padding: 0.75rem 0;
    line-height: 1.6;
    border-bottom: 1px solid #f8fafc;
    transition: background-color 0.2s ease;
}

.detail-section p:last-child {
    border-bottom: none;
}

.detail-section p:hover {
    background-color: #f8fafc;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 6px;
}

.detail-section p strong {
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.detail-section p span {
    color: #0f172a;
    font-weight: 500;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
}

/* Two-column layout for specific fields */
@media (min-width: 640px) {
    .detail-section:first-child,
    .detail-section:last-child {
        display: grid;
        gap: 0.75rem;
    }
    
    .detail-section:first-child {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        column-gap: 2rem;
    }
    
    .detail-section:first-child h3 {
        grid-column: 1 / -1;
    }
    
    .detail-section:last-child {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 2rem;
    }
    
    .detail-section:last-child h3 {
        grid-column: 1 / -1;
    }
    
    .detail-section:last-child p:nth-of-type(3) {
        grid-column: 1 / -1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}