@extends('admin.clients.tabs._layout')

@section('tab-content')
<!-- Top Section: 4 Columns -->
<div class="row g-2 mb-2">
    <!-- Col 1: Client Information -->
    <div class="col-xl-3 col-lg-6">
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">{{ __('admin/clients.overview_client_info') }}</strong>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm mb-0" style="font-size: 0.75rem;">
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2" style="width: 45%;">{{ __('admin/clients.fields_first_name') }}</td>
                        <td class="border-0 py-1">{{ $client->first_name }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_last_name') }}</td>
                        <td class="border-0 py-1">{{ $client->last_name }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_company_name') }}</td>
                        <td class="border-0 py-1">{{ $client->company_name ?: '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_email_address') }}</td>
                        <td class="border-0 py-1"><a href="mailto:{{ $client->email }}" class="text-decoration-none">{{ $client->email }}</a></td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_address1') }}</td>
                        <td class="border-0 py-1">{{ $client->address1 ?: '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_address2') }}</td>
                        <td class="border-0 py-1">{{ $client->address2 ?: '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_city') }}</td>
                        <td class="border-0 py-1">{{ $client->city->name ?? '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_state') }}</td>
                        <td class="border-0 py-1">{{ $client->state ?: '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_postcode') }}</td>
                        <td class="border-0 py-1">{{ $client->postcode ?: '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_country') }}</td>
                        <td class="border-0 py-1">
                            @if($client->country)
                                @if($client->country->iso_code)
                                    {{ $client->country->iso_code }} - {{ $client->country->common_name }}
                                @else
                                    {{ $client->country->common_name }}
                                @endif
                            @else

                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_phone') }}</td>
                        <td class="border-0 py-1">{{ $client->phone ?: '' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_tax_id') }}</td>
                        <td class="border-0 py-1">{{ $client->tax_id ?: '' }}</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <!-- Col 2: Products/Services -->
    <div class="col-xl-3 col-lg-6">
        <div class="card border shadow-sm mb-2" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2 d-flex justify-content-between align-items-center" style="background: rgba(0,123,255,0.05);">
                <strong class="mb-0" style="font-size: 0.85rem;">{{ __('admin/clients.overview_products_services') }}</strong>
                @can('edit clients')
                <a href="{{ route('admin.clients.products', $client) }}" class="btn btn-success btn-sm py-0 px-2" style="font-size: 0.7rem; line-height: 1.4;">
                    {{ __('admin/clients.overview_create_product') }}
                </a>
                @endcan
            </div>
            <div class="card-body p-0">
                <table class="table table-sm mb-0" style="font-size: 0.75rem;">
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2" style="width: 50%;">{{ __('admin/clients.fields_active_products') }}</td>
                        <td class="border-0 py-1">{{ $productStats['active_products'] }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_active_domains') }}</td>
                        <td class="border-0 py-1">{{ $productStats['active_domains'] }}</td>
                    </tr>
                </table>
            </div>
        </div>

        <!-- Invoices -->
        <div class="card border shadow-sm mb-2" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">{{ __('admin/clients.overview_invoices') }}</strong>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm mb-0" style="font-size: 0.75rem;">
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2" style="width: 50%;">{{ __('admin/clients.fields_paid') }}</td>
                        <td class="border-0 py-1">{{ $invoiceStats['paid']['count'] }} (₺{{ number_format($invoiceStats['paid']['total'], 2) }})</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_draft') }}</td>
                        <td class="border-0 py-1">{{ $invoiceStats['draft']['count'] }} (₺{{ number_format($invoiceStats['draft']['total'], 2) }})</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_unpaid') }}</td>
                        <td class="border-0 py-1">{{ $invoiceStats['unpaid']['count'] }} (₺{{ number_format($invoiceStats['unpaid']['total'], 2) }})</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_cancelled') }}</td>
                        <td class="border-0 py-1">{{ $invoiceStats['cancelled']['count'] }} (₺{{ number_format($invoiceStats['cancelled']['total'], 2) }})</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Refunded:</td>
                        <td class="border-0 py-1">{{ $invoiceStats['refunded']['count'] }} (₺{{ number_format($invoiceStats['refunded']['total'], 2) }})</td>
                    </tr>
                </table>
            </div>
        </div>

        <!-- Credit Balance -->
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">Credit Balance</strong>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm mb-0" style="font-size: 0.75rem;">
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2" style="width: 50%;">Credit Balance:</td>
                        <td class="border-0 py-1">₺{{ number_format($client->balance ?? 0, 2) }}</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

    <!-- Col 3: Other Information & Send Email -->
    <div class="col-xl-3 col-lg-6">
        <!-- Other Information -->
        <div class="card border shadow-sm mb-2" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">Other Information</strong>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm mb-0" style="font-size: 0.75rem;">
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2" style="width: 50%;">Client Type:</td>
                        <td class="border-0 py-1">
                            @if($client->type === 'individual')
                                <i class="fas fa-user me-1"></i>Individual
                            @else
                                <i class="fas fa-building me-1"></i>Company
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_status') }}</td>
                        <td class="border-0 py-1">
                            @if($client->status === 'active')
                                <span class="badge bg-success" style="font-size: 0.65rem;">{{ __('admin/clients.status_active') }}</span>
                            @elseif($client->status === 'inactive')
                                <span class="badge bg-secondary" style="font-size: 0.65rem;">{{ __('admin/clients.status_inactive') }}</span>
                            @else
                                <span class="badge bg-warning" style="font-size: 0.65rem;">{{ __('admin/clients.status_suspended') }}</span>
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Client Group:</td>
                        <td class="border-0 py-1">{{ $client->group->group_name ?? 'None' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Currency:</td>
                        <td class="border-0 py-1">{{ $client->currency->code ?? 'TRY' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Language:</td>
                        <td class="border-0 py-1">{{ $client->language->name ?? 'Turkish' }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/clients.fields_tax_exempt') }}</td>
                        <td class="border-0 py-1">
                            @if($client->tax_exempt === true)
                                <i class="fas fa-check-circle text-success"></i>
                                {{ __('admin/clients.tax_exempt_always') }}
                            @elseif($client->tax_exempt === false)
                                <i class="fas fa-times-circle text-danger"></i>
                                {{ __('admin/clients.tax_exempt_never') }}
                            @else
                                <i class="fas fa-link text-muted"></i>
                                {{ __('admin/clients.tax_exempt_inherit') }}
                                @if($client->group && $client->group->tax_exempt)
                                    <small class="text-muted">
                                        ({{ __('admin/clients.tax_exempt_inherited_from_group', ['group' => $client->group->group_name]) }})
                                    </small>
                                @endif
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Marketing Emails:</td>
                        <td class="border-0 py-1">
                            @if($client->marketing_emails)
                                <i class="fas fa-check-circle text-success"></i> {{ __('admin/clients.common_enabled') }}
                            @else
                                <i class="fas fa-times-circle text-danger"></i> {{ __('admin/clients.common_disabled') }}
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Email Verified:</td>
                        <td class="border-0 py-1">
                            @if($client->email_verified_at)
                                <i class="fas fa-check-circle text-success"></i> {{ __('admin/clients.common_yes') }}
                            @else
                                <i class="fas fa-times-circle text-danger"></i> {{ __('admin/clients.common_no') }}
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">{{ __('admin/two-factor.setup_title') }}:</td>
                        <td class="border-0 py-1">
                            @if($client->totp_enabled)
                                <span class="badge bg-success" style="font-size: 0.65rem;">{{ __('admin/two-factor.status_enabled') }}</span>
                                <small class="text-muted ms-1">{{ $client->totp_verified_at?->format($dateTimeFormat) }}</small>
                                <form method="POST" action="{{ route('admin.clients.reset-2fa', $client) }}" class="d-inline ms-1">
                                    @csrf
                                    <button type="submit" class="btn btn-outline-warning btn-sm py-0 px-1" style="font-size: 0.65rem;"
                                            onclick="return confirm('Are you sure you want to reset this client\'s 2FA?')">
                                        <i class="fas fa-undo"></i> Reset
                                    </button>
                                </form>
                            @else
                                <span class="badge bg-secondary" style="font-size: 0.65rem;">{{ __('admin/two-factor.status_disabled') }}</span>
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Date Created:</td>
                        <td class="border-0 py-1">{{ $client->created_at->format($dateTimeFormat) }}</td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Last Login:</td>
                        <td class="border-0 py-1">
                            @if($client->last_login_at)
                                {{ $client->last_login_at->format($dateTimeFormat) }}
                                @if($client->last_login_ip)
                                    <br><small class="text-muted">
                                        <i class="fas fa-map-marker-alt me-1"></i>
                                        {{ $client->last_login_ip }}
                                        @if($client->last_login_city || $client->last_login_country)
                                            - {{ $client->last_login_city ? $client->last_login_city . ', ' : '' }}{{ $client->last_login_country }}
                                        @endif
                                    </small>
                                @endif
                            @else
                                Never logged in
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <td class="text-muted border-0 py-1 ps-2">Login Count:</td>
                        <td class="border-0 py-1">{{ $client->login_count ?? 0 }} times</td>
                    </tr>
                </table>
            </div>
        </div>

        {{-- Reseller Status --}}
        <div class="card border shadow-sm mt-2" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2 d-flex justify-content-between align-items-center" style="background: rgba(0,123,255,0.05);">
                <strong class="mb-0" style="font-size: 0.85rem;">
                    <i class="fas fa-handshake me-1"></i>{{ __('admin/resellers.overview_reseller') }}
                </strong>
                <a href="{{ route('admin.clients.reseller', $client) }}" class="btn btn-outline-primary btn-sm py-0 px-2" style="font-size: 0.7rem; line-height: 1.4;">
                    <i class="fas fa-cog"></i>
                </a>
            </div>
            <div class="card-body p-0">
                <table class="table table-sm mb-0" style="font-size: 0.75rem;">
                    @php $resellerProfile = $client->resellerProfile; @endphp
                    @if($resellerProfile)
                        <tr>
                            <td class="text-muted border-0 py-1 ps-2" style="width: 50%;">{{ __('admin/resellers.form_status') }}</td>
                            <td class="border-0 py-1">
                                @if($resellerProfile->status === 'active')
                                    <span class="badge bg-success" style="font-size: 0.65rem;">{{ __('admin/resellers.status_active') }}</span>
                                @elseif($resellerProfile->status === 'pending')
                                    <span class="badge bg-warning" style="font-size: 0.65rem;">{{ __('admin/resellers.status_pending') }}</span>
                                @elseif($resellerProfile->status === 'suspended')
                                    <span class="badge bg-danger" style="font-size: 0.65rem;">{{ __('admin/resellers.status_suspended') }}</span>
                                @else
                                    <span class="badge bg-secondary" style="font-size: 0.65rem;">{{ __('admin/resellers.status_terminated') }}</span>
                                @endif
                            </td>
                        </tr>
                        <tr>
                            <td class="text-muted border-0 py-1 ps-2">{{ __('admin/resellers.form_brand_name') }}</td>
                            <td class="border-0 py-1">{{ $resellerProfile->brand_name ?: '-' }}</td>
                        </tr>
                        <tr>
                            <td class="text-muted border-0 py-1 ps-2">{{ __('admin/resellers.column_commission') }}</td>
                            <td class="border-0 py-1">
                                {{ $resellerProfile->commission_rate }}{{ $resellerProfile->commission_type === 'percentage' ? '%' : ' ₺' }}
                            </td>
                        </tr>
                        <tr>
                            <td class="text-muted border-0 py-1 ps-2">{{ __('admin/resellers.column_clients_count') }}</td>
                            <td class="border-0 py-1">{{ $resellerProfile->getClientCount() }}</td>
                        </tr>
                    @else
                        <tr>
                            <td class="text-muted border-0 py-1 ps-2 text-center" colspan="2">
                                <i class="fas fa-times-circle text-secondary me-1"></i>{{ __('admin/clients.common_disabled') }}
                            </td>
                        </tr>
                    @endif
                </table>
            </div>
        </div>

    </div>

    <!-- Col 4: Other Actions -->
    <div class="col-xl-3 col-lg-6">
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">Other Actions</strong>
            </div>
            <div class="card-body p-1">
                <div class="list-group list-group-flush">
                    @can('edit clients')
                    <a href="{{ route('admin.clients.edit', $client) }}" class="list-group-item list-group-item-action py-1 px-2 border-0" style="font-size: 0.75rem;">
                        <i class="fas fa-edit me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_edit_client') }}
                    </a>
                    @endcan
                    @can('edit clients')
                    <a href="{{ route('admin.billing.create', ['client_id' => $client->id]) }}" class="list-group-item list-group-item-action py-1 px-2 border-0" style="font-size: 0.75rem;">
                        <i class="fas fa-file-invoice me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_create_invoice') }}
                    </a>
                    @endcan
                    @can('edit clients')
                    <a href="#" class="list-group-item list-group-item-action py-1 px-2 border-0 btn-add-funds" style="font-size: 0.75rem;" data-client-id="{{ $client->id }}">
                        <i class="fas fa-coins me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_create_add_funds_invoice') }}
                    </a>
                    @endcan
                    @can('edit clients')
                    <a href="{{ route('admin.quotes.create', ['client_id' => $client->id]) }}" class="list-group-item list-group-item-action py-1 px-2 border-0" style="font-size: 0.75rem;">
                        <i class="fas fa-file-alt me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_create_quote') }}
                    </a>
                    @endcan
                    @can('edit clients')
                    <a href="#" class="list-group-item list-group-item-action py-1 px-2 border-0 btn-generate-due-invoices" style="font-size: 0.75rem;" data-client-id="{{ $client->id }}">
                        <i class="fas fa-calendar-check me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_generate_due_invoices') }}
                    </a>
                    @endcan
                    @can('edit clients')
                    <a href="#" class="list-group-item list-group-item-action py-1 px-2 border-0 btn-add-billable-item" style="font-size: 0.75rem;" data-client-id="{{ $client->id }}">
                        <i class="fas fa-receipt me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_add_billable_item') }}
                    </a>
                    @endcan
                    <a href="{{ route('admin.client-balances.show', $client) }}" class="list-group-item list-group-item-action py-1 px-2 border-0" style="font-size: 0.75rem;">
                        <i class="fas fa-money-bill-wave me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_manage_credits') }}
                    </a>
                    <a href="{{ route('admin.clients.emails', $client) }}" class="list-group-item list-group-item-action py-1 px-2 border-0" style="font-size: 0.75rem;">
                        <i class="fas fa-envelope me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_send_email') }}
                    </a>
                    @can('edit clients')
                    <a href="#" class="list-group-item list-group-item-action py-1 px-2 border-0 btn-change-password" style="font-size: 0.75rem;" data-client-id="{{ $client->id }}">
                        <i class="fas fa-key me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_change_password') }}
                    </a>
                    @endcan
                    @can('edit clients')
                    <a href="#" class="list-group-item list-group-item-action py-1 px-2 border-0 btn-login-as-client" style="font-size: 0.75rem;" data-client-id="{{ $client->id }}">
                        <i class="fas fa-sign-in-alt me-2" style="width: 14px; font-size: 0.7rem;"></i>{{ __('admin/clients.overview_login_as_client') }}
                    </a>
                    @endcan
                </div>
            </div>
        </div>
    </div>
</div>

<!-- Third Row: Billing Addresses & Credit Cards -->
<div class="row g-2 mb-2">
    <!-- Left: Billing Addresses -->
    <div class="col-lg-4">
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2 d-flex justify-content-between align-items-center" style="background: rgba(0,123,255,0.05);">
                <strong class="mb-0" style="font-size: 0.85rem;">Billing Addresses</strong>
                @can('edit clients')
                <button class="btn btn-success btn-sm py-0 px-2 btn-add-billing-address" style="font-size: 0.7rem; line-height: 1.4;" data-client-id="{{ $client->id }}">
                    <i class="fas fa-plus me-1"></i>{{ __('admin/clients.overview_add_new') }}
                </button>
                @endcan
            </div>
            <div class="card-body p-0">
                @forelse($client->billingAddresses as $address)
                    <div class="p-2 border-bottom">
                        <div class="d-flex justify-content-between align-items-start">
                            <div style="font-size: 0.75rem;">
                                <strong class="d-block">{{ $address->title }}</strong>
                                <div class="text-muted">
                                    {{ $address->first_name }} {{ $address->last_name }}<br>
                                    @if($address->company_name){{ $address->company_name }}<br>@endif
                                    {{ $address->address1 }}<br>
                                    @if($address->address2){{ $address->address2 }}<br>@endif
                                    {{ $address->city }}, {{ $address->state }} {{ $address->postcode }}<br>
                                    {{ $address->country->common_name ?? '' }}
                                </div>
                            </div>
                            <div class="d-flex gap-1">
                                @if($address->is_default)
                                    <span class="badge bg-primary" style="font-size: 0.65rem;">{{ __('admin/clients.overview_default') }}</span>
                                @endif
                                @can('edit clients')
                                <button class="btn btn-sm btn-outline-secondary py-0 px-1 btn-edit-billing-address" style="font-size: 0.7rem;" data-address-id="{{ $address->id }}" data-client-id="{{ $client->id }}">
                                    <i class="fas fa-edit"></i>
                                </button>
                                @endcan
                                @can('delete clients')
                                <button class="btn btn-sm btn-outline-danger py-0 px-1 btn-delete-billing-address" style="font-size: 0.7rem;" data-address-id="{{ $address->id }}" data-client-id="{{ $client->id }}">
                                    <i class="fas fa-trash"></i>
                                </button>
                                @endcan
                            </div>
                        </div>
                    </div>
                @empty
                    <div class="p-3 text-center">
                        <p class="mb-0 text-muted" style="font-size: 0.75rem;">{{ __('admin/clients.overview_no_billing_addresses') }}</p>
                    </div>
                @endforelse
            </div>
        </div>
    </div>

    <!-- Right: Saved Credit Cards -->
    <div class="col-lg-4">
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2 d-flex justify-content-between align-items-center" style="background: rgba(0,123,255,0.05);">
                <strong class="mb-0" style="font-size: 0.85rem;">{{ __('admin/clients.overview_saved_cards') }}</strong>
                &nbsp;
            </div>
            <div class="card-body p-0">
                @forelse($client->savedPaymentMethods as $card)
                    <div class="p-2 border-bottom">
                        <div class="d-flex justify-content-between align-items-center">
                            <div style="font-size: 0.75rem;">
                                <div class="d-flex align-items-center gap-2">
                                    @if($card->card_brand === 'visa')
                                        <i class="fab fa-cc-visa fa-2x text-primary"></i>
                                    @elseif($card->card_brand === 'mastercard')
                                        <i class="fab fa-cc-mastercard fa-2x text-warning"></i>
                                    @elseif($card->card_brand === 'amex')
                                        <i class="fab fa-cc-amex fa-2x text-info"></i>
                                    @else
                                        <i class="fas fa-credit-card fa-2x text-secondary"></i>
                                    @endif
                                    <div>
                                        <strong class="d-block">•••• •••• •••• {{ $card->last_four }}</strong>
                                        <small class="text-muted">{{ __('admin/clients.overview_expires') }}: {{ str_pad($card->expiry_month, 2, '0', STR_PAD_LEFT) }}/{{ $card->expiry_year }}</small>
                                        @if($card->is_default)
                                            <span class="badge bg-primary ms-2" style="font-size: 0.6rem;">{{ __('admin/clients.overview_default') }}</span>
                                        @endif
                                    </div>
                                </div>
                            </div>
                            <div class="d-flex gap-1">
                                @can('edit clients')
                                <button class="btn btn-sm btn-outline-danger py-0 px-1 btn-delete-credit-card" style="font-size: 0.7rem;" data-card-id="{{ $card->id }}" data-client-id="{{ $client->id }}">
                                    <i class="fas fa-trash"></i>
                                </button>
                                @endcan
                            </div>
                        </div>
                    </div>
                @empty
                    <div class="p-3 text-center">
                        <p class="mb-0 text-muted" style="font-size: 0.75rem;">{{ __('admin/clients.overview_no_saved_cards') }}</p>
                    </div>
                @endforelse
            </div>
        </div>
    </div>
    <!-- Send Email -->
    <div class="col-lg-4">
    <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">Send Email</strong>
            </div>
            <div class="card-body p-2">
                <form id="sendEmailForm">
                    <div class="mb-2">
                        <label for="emailTemplate" class="form-label small mb-1">{{ __('admin/clients.overview_email_template') }} <span class="text-danger">*</span></label>
                        <select class="form-select form-select-sm" id="emailTemplate" name="template_id" required style="font-size: 0.75rem;">
                            <option value="">{{ __('admin/clients.overview_select_template') }}...</option>
                            @forelse($emailTemplates ?? [] as $template)
                                <option value="{{ $template->id }}">{{ $template->name }}</option>
                            @empty
                                <option value="" disabled>{{ __('admin/clients.overview_no_email_templates') }}</option>
                            @endforelse
                        </select>
                        @error('template_id') <div class="invalid-feedback">{{ $message }}</div> @enderror
                    </div>
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary btn-sm btn-send-email" style="font-size: 0.75rem;">
                            <i class="fas fa-paper-plane me-1"></i>{{ __('admin/clients.overview_send_email_btn') }}
                        </button>
                    </div>
                </form>
            </div>
        </div>
        </div>
</div>


<!-- Second Row: 2 Columns -->
<div class="row g-2 mb-2">
    <!-- Left: Recent Events -->
    <div class="col-lg-6">
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">Recent Events</strong>
            </div>
            <div class="card-body p-2">
                @forelse($recentEvents as $index => $event)
                    <div class="{{ $loop->last ? '' : 'mb-2 pb-1 border-bottom' }}" style="font-size: 0.75rem;">
                        <div class="text-muted">
                            <i class="far fa-clock me-1"></i>
                            {{ $event->created_at->format($dateTimeFormat) }}
                        </div>
                        <div>
                            <strong>{{ ucfirst($event->action) }}:</strong>
                            {{ $event->description ?: 'No description' }}
                            @if($event->ip_address)
                                <br><small class="text-muted">IP: {{ $event->ip_address }}</small>
                            @endif
                        </div>
                    </div>
                @empty
                    <p class="mb-0 text-muted" style="font-size: 0.75rem;">{{ __('admin/clients.overview_no_recent_events') }}</p>
                @endforelse
            </div>
        </div>
    </div>

    <!-- Right: Admin Notes -->
    <div class="col-lg-6">
        <div class="card border shadow-sm" style="font-size: 0.8rem;">
            <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
                <strong class="d-block mb-0" style="font-size: 0.85rem;">Admin Notes</strong>
            </div>
            <div class="card-body p-2">
                @if($client->notes)
                    <p class="mb-0" style="font-size: 0.75rem;">{{ $client->notes }}</p>
                @else
                    <p class="mb-0 text-muted" style="font-size: 0.75rem;">{{ __('admin/clients.overview_no_notes') }}</p>
                @endif
            </div>
        </div>
    </div>
</div>


<!-- Products/Services Table -->
<div class="card border shadow-sm mb-2">
    <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
        <strong class="d-block mb-0" style="font-size: 0.85rem;">{{ __('admin/clients.overview_products_services') }}</strong>
    </div>
    <div class="card-body p-0">
        <div class="table-responsive">
            <table class="table table-sm table-hover mb-0" style="font-size: 0.75rem;">
                <thead style="background: rgba(0,0,0,0.02);">
                    <tr>
                        <th class="ps-2 py-1 border-0" style="width: 40px;">#</th>
                        <th class="py-1 border-0">Product/Service</th>
                        <th class="py-1 border-0" style="width: 80px;">Amount</th>
                        <th class="py-1 border-0" style="width: 100px;">Billing Cycle</th>
                        <th class="py-1 border-0" style="width: 85px;">Signup Date</th>
                        <th class="py-1 border-0" style="width: 85px;">Next Due Date</th>
                        <th class="py-1 border-0" style="width: 70px;">Status</th>
                        <th class="text-end pe-2 py-1 border-0" style="width: 60px;">Actions</th>
                    </tr>
                </thead>
                <tbody>
                    @forelse($clientProducts as $clientProduct)
                    <tr class="align-middle">
                        <td class="ps-2 py-1 border-0">{{ $clientProduct->id }}</td>
                        <td class="py-1 border-0">{{ $clientProduct->product->name ?? 'N/A' }}</td>
                        <td class="py-1 border-0">-</td>
                        <td class="py-1 border-0">{{ ucfirst($clientProduct->billingcycle ?? 'N/A') }}</td>
                        <td class="py-1 border-0">{{ $clientProduct->create_date ? \Carbon\Carbon::parse($clientProduct->create_date)->format($dateFormat) : '-' }}</td>
                        <td class="py-1 border-0">{{ $clientProduct->next_due_date ? \Carbon\Carbon::parse($clientProduct->next_due_date)->format($dateFormat) : '-' }}</td>
                        <td class="py-1 border-0">
                            @if($clientProduct->status === 'active')
                                <span class="badge bg-success" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.products_status_active') }}</span>
                            @elseif($clientProduct->status === 'suspended')
                                <span class="badge bg-warning" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.products_status_suspended') }}</span>
                            @elseif($clientProduct->status === 'terminated')
                                <span class="badge bg-danger" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.products_status_terminated') }}</span>
                            @else
                                <span class="badge bg-secondary" style="font-size: 0.65rem; padding: 2px 6px;">{{ ucfirst($clientProduct->status) }}</span>
                            @endif
                        </td>
                        <td class="text-end pe-2 py-1 border-0">
                            <a href="{{ route('admin.clients.products.detail', [$client, $clientProduct]) }}" class="btn btn-sm btn-outline-secondary py-0 px-1" data-bs-toggle="tooltip" title="View" style="font-size: 0.7rem;">
                                <i class="fas fa-eye"></i>
                            </a>
                        </td>
                    </tr>
                    @empty
                    <tr>
                        <td colspan="8" class="text-center py-3 text-muted" style="font-size: 0.75rem;">{{ __('admin/clients.overview_no_products') }}</td>
                    </tr>
                    @endforelse
                </tbody>
            </table>
        </div>
        @if($clientProducts->count() > 0)
        <div class="px-2 py-1 border-top text-muted" style="font-size: 0.7rem; background: rgba(0,0,0,0.02);">
            Showing {{ $clientProducts->count() }} {{ Str::plural('entry', $clientProducts->count()) }}
        </div>
        @endif
    </div>
</div>

<!-- Domains Table -->
<div class="card border shadow-sm mb-2">
    <div class="card-header border-bottom py-1 px-2" style="background: rgba(0,123,255,0.05);">
        <strong class="d-block mb-0" style="font-size: 0.85rem;">Domains</strong>
    </div>
    <div class="card-body p-0">
        <div class="table-responsive">
            <table class="table table-sm table-hover mb-0" style="font-size: 0.75rem;">
                <thead style="background: rgba(0,0,0,0.02);">
                    <tr>
                        <th class="ps-2 py-1 border-0" style="width: 40px;">#</th>
                        <th class="py-1 border-0">Domain</th>
                        <th class="py-1 border-0" style="width: 110px;">Registrar</th>
                        <th class="py-1 border-0" style="width: 100px;">Registration Date</th>
                        <th class="py-1 border-0" style="width: 100px;">Next Due Date</th>
                        <th class="py-1 border-0" style="width: 90px;">Expiry Date</th>
                        <th class="py-1 border-0" style="width: 70px;">Status</th>
                        <th class="text-end pe-2 py-1 border-0" style="width: 60px;">Actions</th>
                    </tr>
                </thead>
                <tbody>
                    @forelse($clientDomains as $clientDomain)
                    <tr class="align-middle">
                        <td class="ps-2 py-1 border-0">{{ $clientDomain->id }}</td>
                        <td class="py-1 border-0">{{ $clientDomain->domain }}</td>
                        <td class="py-1 border-0">{{ ucfirst($clientDomain->module ?? 'N/A') }}</td>
                        <td class="py-1 border-0">{{ $clientDomain->create_date ? \Carbon\Carbon::parse($clientDomain->create_date)->format($dateFormat) : '-' }}</td>
                        <td class="py-1 border-0">{{ $clientDomain->next_due_date ? \Carbon\Carbon::parse($clientDomain->next_due_date)->format($dateFormat) : '-' }}</td>
                        <td class="py-1 border-0">{{ $clientDomain->expire_date ? \Carbon\Carbon::parse($clientDomain->expire_date)->format($dateFormat) : '-' }}</td>
                        <td class="py-1 border-0">
                            @if($clientDomain->status === 'active')
                                <span class="badge bg-success" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.domains_status_active') }}</span>
                            @elseif($clientDomain->status === 'pending')
                                <span class="badge bg-warning" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.domains_status_pending') }}</span>
                            @elseif($clientDomain->status === 'expired')
                                <span class="badge bg-danger" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.domains_status_expired') }}</span>
                            @elseif($clientDomain->status === 'cancelled')
                                <span class="badge bg-secondary" style="font-size: 0.65rem; padding: 2px 6px;">{{ __('admin/clients.domains_status_cancelled') }}</span>
                            @else
                                <span class="badge bg-secondary" style="font-size: 0.65rem; padding: 2px 6px;">{{ ucfirst($clientDomain->status) }}</span>
                            @endif
                        </td>
                        <td class="text-end pe-2 py-1 border-0">
                            <a href="{{ route('admin.clients.domains.detail', [$client, $clientDomain]) }}" class="btn btn-sm btn-outline-secondary py-0 px-1" data-bs-toggle="tooltip" title="View" style="font-size: 0.7rem;">
                                <i class="fas fa-eye"></i>
                            </a>
                        </td>
                    </tr>
                    @empty
                    <tr>
                        <td colspan="8" class="text-center py-3 text-muted" style="font-size: 0.75rem;">{{ __('admin/clients.overview_no_domains') }}</td>
                    </tr>
                    @endforelse
                </tbody>
            </table>
        </div>
        @if($clientDomains->count() > 0)
        <div class="px-2 py-1 border-top text-muted" style="font-size: 0.7rem; background: rgba(0,0,0,0.02);">
            Showing {{ $clientDomains->count() }} {{ Str::plural('entry', $clientDomains->count()) }}
        </div>
        @endif
    </div>
</div>

<!-- Change Password Modal -->
<div class="modal fade" id="changePasswordModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><i class="fas fa-key me-2"></i>{{ __('admin/clients.overview_change_password') }}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <form id="changePasswordForm">
                <div class="modal-body">
                    <div class="mb-3">
                        <label for="newPassword" class="form-label">{{ __('admin/clients.overview_new_password') }} <span class="text-danger">*</span></label>
                        <input type="password" class="form-control" id="newPassword" name="password" required minlength="8">
                        @error('password') <div class="invalid-feedback">{{ $message }}</div> @enderror
                    </div>
                    <div class="mb-3">
                        <label for="confirmPassword" class="form-label">{{ __('admin/clients.overview_confirm_password') }} <span class="text-danger">*</span></label>
                        <input type="password" class="form-control" id="confirmPassword" name="password_confirmation" required minlength="8">
                        @error('password_confirmation') <div class="invalid-feedback">{{ $message }}</div> @enderror
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('admin/clients.common_cancel') }}</button>
                    <button type="submit" class="btn btn-primary">{{ __('admin/clients.overview_change_password') }}</button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Add Funds Modal -->
<div class="modal fade" id="addFundsModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><i class="fas fa-coins me-2"></i>{{ __('admin/billing.add_funds_title') }}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <form id="addFundsForm">
                <div class="modal-body">
                    <div class="mb-3">
                        <label for="addFundsAmount" class="form-label">{{ __('admin/billing.add_funds_amount') }} *</label>
                        <input type="number" class="form-control" id="addFundsAmount" name="amount" required min="0.01" step="0.01" placeholder="0.00">
                        @error('amount') <div class="invalid-feedback">{{ $message }}</div> @enderror
                    </div>
                    <div class="mb-3">
                        <label for="addFundsCurrency" class="form-label">{{ __('admin/billing.add_funds_currency') }}</label>
                        <select class="form-select" id="addFundsCurrency" name="currency_id">
                            @foreach($currencies ?? [] as $currency)
                                <option value="{{ $currency->id }}" {{ $currency->is_default ? 'selected' : '' }}>
                                    {{ $currency->code }} - {{ $currency->name }}
                                </option>
                            @endforeach
                        </select>
                    </div>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" id="addFundsSendEmail" name="send_email" value="1" checked>
                        <label class="form-check-label" for="addFundsSendEmail">
                            <i class="fas fa-envelope me-1"></i>{{ __('admin/billing.send_email_to_client') }}
                        </label>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('admin/clients.common_cancel') }}</button>
                    <button type="submit" class="btn btn-primary">
                        <i class="fas fa-save me-1"></i>{{ __('admin/billing.buttons_save') }}
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Billable Item Modal -->
<div class="modal fade" id="billableItemModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><i class="fas fa-receipt me-2"></i>{{ __('admin/billing.billable_item_title') }}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <form id="billableItemForm">
                <div class="modal-body">
                    <div id="billable-items">
                        <div class="billable-item-row mb-3 p-2 border rounded">
                            <div class="mb-2">
                                <label class="form-label">{{ __('admin/billing.billable_item_description') }} *</label>
                                <input type="text" class="form-control form-control-sm" name="bi_items[0][description]" required>
                            </div>
                            <div class="row g-2">
                                <div class="col-6">
                                    <label class="form-label">{{ __('admin/billing.billable_item_quantity') }}</label>
                                    <input type="number" class="form-control form-control-sm" name="bi_items[0][quantity]" value="1" min="1" step="1">
                                </div>
                                <div class="col-6">
                                    <label class="form-label">{{ __('admin/billing.billable_item_unit_price') }} *</label>
                                    <input type="number" class="form-control form-control-sm" name="bi_items[0][unit_price]" step="0.01" min="0" required placeholder="0.00">
                                </div>
                            </div>
                        </div>
                    </div>
                    <button type="button" class="btn btn-outline-primary btn-sm mb-3" id="add-billable-row">
                        <i class="fas fa-plus me-1"></i>{{ __('admin/billing.invoice_items_add_item') }}
                    </button>
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" id="billableSendEmail" name="send_email" value="1" checked>
                        <label class="form-check-label" for="billableSendEmail">
                            <i class="fas fa-envelope me-1"></i>{{ __('admin/billing.send_email_to_client') }}
                        </label>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('admin/clients.common_cancel') }}</button>
                    <button type="submit" class="btn btn-primary">
                        <i class="fas fa-save me-1"></i>{{ __('admin/billing.buttons_save') }}
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Billing Address Modal -->
<div class="modal fade" id="billingAddressModal" tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="billingAddressModalTitle"><i class="fas fa-map-marker-alt me-2"></i>{{ __('admin/clients.overview_add_billing_address') }}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <form id="billingAddressForm">
                <input type="hidden" id="billingAddressId" name="address_id" value="">
                <div class="modal-body">
                    <div class="row g-3">
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.overview_ba_title') }} *</label>
                            <input type="text" class="form-control" name="title" required>
                            @error('title') <div class="invalid-feedback">{{ $message }}</div> @enderror
                        </div>
                        <div class="col-md-3">
                            <label class="form-label">{{ __('admin/clients.fields_first_name') }} *</label>
                            <input type="text" class="form-control" name="first_name" required>
                            @error('first_name') <div class="invalid-feedback">{{ $message }}</div> @enderror
                        </div>
                        <div class="col-md-3">
                            <label class="form-label">{{ __('admin/clients.fields_last_name') }} *</label>
                            <input type="text" class="form-control" name="last_name" required>
                            @error('last_name') <div class="invalid-feedback">{{ $message }}</div> @enderror
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_company_name') }}</label>
                            <input type="text" class="form-control" name="company_name">
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_tax_id') }}</label>
                            <input type="text" class="form-control" name="tax_id">
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_email_address') }}</label>
                            <input type="email" class="form-control" name="email">
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_phone') }}</label>
                            <input type="text" class="form-control" name="phone">
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_country') }} *</label>
                            <select class="form-select" name="country_id" required>
                                <option value="">{{ __('admin/clients.overview_select_country') }}</option>
                                @foreach($countries as $country)
                                    <option value="{{ $country->id }}">{{ $country->common_name }}</option>
                                @endforeach
                            </select>
                            @error('country_id') <div class="invalid-feedback">{{ $message }}</div> @enderror
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_city') }}</label>
                            <input type="text" class="form-control" name="city">
                        </div>
                        <div class="col-md-12">
                            <label class="form-label">{{ __('admin/clients.fields_address1') }} *</label>
                            <input type="text" class="form-control" name="address1" required>
                            @error('address1') <div class="invalid-feedback">{{ $message }}</div> @enderror
                        </div>
                        <div class="col-md-12">
                            <label class="form-label">{{ __('admin/clients.fields_address2') }}</label>
                            <input type="text" class="form-control" name="address2">
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_state') }}</label>
                            <input type="text" class="form-control" name="state">
                        </div>
                        <div class="col-md-6">
                            <label class="form-label">{{ __('admin/clients.fields_postcode') }}</label>
                            <input type="text" class="form-control" name="postcode">
                        </div>
                        <div class="col-md-12">
                            <div class="form-check">
                                <input class="form-check-input" type="checkbox" name="is_default" id="addressIsDefault" value="1">
                                <label class="form-check-label" for="addressIsDefault">{{ __('admin/clients.overview_set_as_default') }}</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('admin/clients.common_cancel') }}</button>
                    <button type="submit" class="btn btn-primary">{{ __('admin/clients.common_save') }}</button>
                </div>
            </form>
        </div>
    </div>
</div>


@push('scripts')
<script>
window.overviewConfig = {
    clientId: {{ $client->id }},
    routes: {
        changePassword: '/api/v1/admin/clients/{{ $client->id }}/change-password',
        sendEmail: '/api/v1/admin/clients/{{ $client->id }}/send-email',
        impersonate: '/api/v1/admin/clients/{{ $client->id }}/impersonate',
        getBillingAddress: '/api/v1/admin/clients/{{ $client->id }}/billing-addresses/:id',
        storeBillingAddress: '/api/v1/admin/clients/{{ $client->id }}/billing-addresses',
        updateBillingAddress: '/api/v1/admin/clients/{{ $client->id }}/billing-addresses/:id',
        deleteBillingAddress: '/api/v1/admin/clients/{{ $client->id }}/billing-addresses/:id',
        deleteSavedCard: '/api/v1/admin/clients/{{ $client->id }}/saved-cards/:id',
        addFunds: '{{ route("admin.billing.store-add-funds") }}',
        billableItem: '{{ route("admin.billing.store-billable-item") }}',
        generateDueInvoices: '{{ route("admin.billing.generate-due-invoices") }}',
    },
    translations: {
        confirmDeleteAddress: '{{ __("admin/clients.overview_confirm_delete_address") }}',
        confirmDeleteCard: '{{ __("admin/clients.overview_confirm_delete_card") }}',
        passwordChanged: '{{ __("admin/clients.overview_password_changed") }}',
        passwordMismatch: '{{ __("admin/clients.overview_password_mismatch") }}',
        emailSent: '{{ __("admin/clients.overview_email_sent") }}',
        selectTemplate: '{{ __("admin/clients.overview_select_template_required") }}',
        confirmLoginAsClient: '{{ __("admin/clients.overview_confirm_login_as_client") }}',
        addressSaved: '{{ __("admin/clients.overview_billing_address_saved") }}',
        cardDeleted: '{{ __("admin/clients.overview_card_deleted") }}',
        error: '{{ __("admin/clients.overview_error") }}',
        addBillingAddress: '{{ __("admin/clients.overview_add_billing_address") }}',
        editBillingAddress: '{{ __("admin/clients.overview_edit_billing_address") }}',
        linkCopied: '{{ __("admin/clients.overview_link_copied") }}',
        addFundsSuccess: '{{ __("admin/billing.add_funds_success") }}',
        addFundsFailed: '{{ __("admin/billing.add_funds_failed") }}',
        billableItemSuccess: '{{ __("admin/billing.billable_item_success") }}',
        billableItemFailed: '{{ __("admin/billing.billable_item_failed") }}',
        generateDueConfirm: '{{ __("admin/billing.generate_due_confirm") }}',
        generateDueSuccess: '{{ __("admin/billing.generate_due_success") }}',
        generateDueNoItems: '{{ __("admin/billing.generate_due_no_items") }}',
        generateDueFailed: '{{ __("admin/billing.generate_due_failed") }}',
        generateDueProcessing: '{{ __("admin/billing.generate_due_processing") }}',
    }
};
</script>
@vite('resources/js/admin/clients/overview.js')
@endpush
@endsection
