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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
}

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

.btn-secondary:hover {
    background: #4b5563;
}

.btn-text {
    background: transparent;
    color: #6b7280;
    padding: 10px 15px;
}

.btn-text:hover {
    color: #4b5563;
    background: #f3f4f6;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-edit {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    font-size: 13px;
}

.btn-edit:hover {
    background: #2563eb;
}

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

.stat {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filters */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-box {
    flex: 2;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.search-box:focus {
    outline: none;
    border-color: #4f46e5;
}

.filter-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* Table */
.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-offboarded {
    background: #fee2e2;
    color: #991b1b;
}

.status-keeta {
    background: #e0f2fe;
    color: #075985;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.picker-content {
    background: white;
    border-radius: 12px;
    max-width: 640px;
    width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
}

.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px;
}

.picker-body {
    padding: 0 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.picker-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: auto;
    max-height: 360px;
    background: #f9fafb;
}

.picker-item {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.picker-item:last-child {
    border-bottom: none;
}

.picker-item:hover {
    background: #eef2ff;
}

.picker-meta {
    color: #6b7280;
    font-size: 12px;
}

.picker-footer {
    padding: 10px 20px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.picker-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-btn:hover {
    color: #1a1a1a;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
}

.modal-actions {
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
    }

    .search-box,
    .filter-select {
        width: 100%;
    }

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

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-wrapper {
        overflow-x: auto;
    }
}

/* Tabs Navigation */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab-btn.active {
    background: #4f46e5;
    color: white;
}

.tab-section {
    display: none;
}

.tab-section.active {
    display: block;
}

/* Payment Panes */
.pay-pane {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* Status badges for payments */
.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-draft {
    background: #e0e7ff;
    color: #3730a3;
}

.status-closed {
    background: #f3f4f6;
    color: #374151;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
