/**
 * Financier Dashboard — vibrant green theme aligned with loan view modal
 */

.financier-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #064e3b 0%, #059669 45%, #10b981 100%);
    color: #ecfdf5;
    box-shadow: 0 12px 40px rgba(6, 78, 59, 0.28);
    position: relative;
    overflow: hidden;
}

.financier-hero::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.financier-hero-content {
    position: relative;
    z-index: 1;
}

.financier-hero-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.financier-hero-content p {
    opacity: 0.92;
    font-size: 1rem;
    margin: 0;
}

.financier-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

#financier_dashboard .financier-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

#financier_dashboard .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#financier_dashboard .stat-card {
    border-radius: 16px;
    border: 1px solid #d1fae5;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#financier_dashboard .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.14);
}

#financier_dashboard .dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    background: #ecfdf5;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}

#financier_dashboard .dashboard-tabs .tab-btn {
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #065f46;
    font-weight: 600;
    padding: 0.65rem 1rem;
}

#financier_dashboard .dashboard-tabs .tab-btn.active {
    background: #059669;
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

#financierLoanWorkspace {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

#financierLoanWorkspace .filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#financierLoanWorkspace .filter-select {
    min-width: 180px;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

#financierLoansTableBody tr:hover {
    background: #f0fdf4;
}

#financierLoansTableBody .btn-sm {
    border-radius: 8px;
}

.financier-fallback-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.financier-fallback-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.modal-overlay .financier-form-modal.modal-content {
    border-radius: 14px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

@media (max-width: 768px) {
    .financier-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .financier-hero-actions {
        width: 100%;
    }

    .financier-hero-actions .btn {
        flex: 1;
    }
}
