/* ============================================================
   CSS Variables & Reset
   ============================================================ */
:root {
    --primary: #4A9168;
    --primary-dark: #2D5A3E;
    --primary-light: rgba(74, 145, 104, 0.1);
    --danger: #dc3545;
    --danger-light: rgba(220, 53, 69, 0.1);
    --success: #28a745;
    --warning: #ffc107;
    --text-dark: #1a1a1a;
    --text-grey: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-grey: #f3f4f6;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

/* ============================================================
   Utilities
   ============================================================ */
.hidden { display: none !important; }
.screen { display: none; }
.screen.active { display: block; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #c82333; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-grey);
}
.btn-outline:hover { background: var(--bg-grey); }

.btn-block { width: 100%; }
.btn-small { padding: 8px 16px; font-size: 13px; }

.error-message {
    color: var(--danger);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* ============================================================
   Login Screen
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo .subtitle {
    color: var(--text-grey);
    font-size: 14px;
    margin-top: 4px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-grey);
    margin-bottom: 6px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================================
   Header
   ============================================================ */
.header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-small {
    font-size: 28px;
}

.header-left h2 {
    font-size: 18px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-email {
    color: var(--text-grey);
    font-size: 13px;
}

/* ============================================================
   Main Content
   ============================================================ */
.main-content {
    padding: 32px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-grey);
}

/* Loading & Empty State */
.loading, .empty-state {
    text-align: center;
    padding: 64px 24px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-grey);
}

/* ============================================================
   Professionals Grid
   ============================================================ */
.professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.professional-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.professional-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.card-avatar {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.card-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-info p {
    color: var(--text-grey);
    font-size: 13px;
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-grey);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.card-actions .btn {
    flex: 1;
}

/* ============================================================
   Modal
   ============================================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.modal-small {
    max-width: 480px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-grey);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

#reject-reason {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-top: 16px;
}

#reject-reason:focus {
    outline: none;
    border-color: var(--primary);
}

/* Review Profile Modal */
.review-header {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.review-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.review-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.review-info p {
    color: var(--text-grey);
}

.review-section {
    margin-bottom: 24px;
}

.review-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.review-field {
    padding: 12px 16px;
    background: var(--bg-grey);
    border-radius: var(--radius);
}

.review-field label {
    display: block;
    font-size: 12px;
    color: var(--text-grey);
    margin-bottom: 4px;
}

.review-field span {
    font-weight: 500;
}

.review-bio {
    padding: 16px;
    background: var(--bg-grey);
    border-radius: var(--radius);
    white-space: pre-wrap;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.document-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.document-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--bg-grey);
}

.document-card p {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-grey);
    text-align: center;
}

.review-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.review-actions .btn {
    flex: 1;
    padding: 16px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .professionals-grid {
        grid-template-columns: 1fr;
    }
    
    .review-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .admin-email {
        display: none;
    }
}
