@extends('layouts.admin') @section('title', $country->name . ' — Global Supply Chain') @section('page_title', $country->name) @section('content') {{-- ── Back link ────────────────────────────────────────────────── --}}
← Back to Countries
{{-- ── Hero card ────────────────────────────────────────────────── --}}
@if($country->flag_url) {{ $country->name }} flag @endif

{{ $country->name }}

{{ $country->iso2 }} / {{ $country->iso3 }} @if($country->latestRiskScore) @include('partials.risk-badge', ['level' => $country->latestRiskScore->risk_level]) @endif
@if($country->capital) 🏛 {{ $country->capital }} @endif @if($country->region) 🗺 {{ $country->region }}{{ $country->subregion ? ' · ' . $country->subregion : '' }} @endif @if($country->population) 👥 {{ number_format($country->population) }} @endif @if($country->area) 📐 {{ number_format($country->area) }} km² @endif @if($country->timezone) 🕐 {{ $country->timezone }} @endif
@if($country->latestRiskScore)

{{ number_format($country->latestRiskScore->total_score, 1) }}

Risk Score

@endif
{{-- ── Detail grid ──────────────────────────────────────────────── --}}
{{-- Basic info --}}

Country Info

Currency
{{ $country->currency ? $country->currency->name . ' (' . $country->currency->code . ')' : '—' }}
Calling Code
{{ $country->calling_code ?: '—' }}
Internet Domain
{{ $country->internet_domain ?: '—' }}
Numeric Code
{{ $country->numeric_code ?: '—' }}
Coordinates
{{ $country->latitude }}, {{ $country->longitude }}
{{-- Languages --}}

Languages

@if($country->languages->isEmpty())

No languages on record.

@else @endif
{{-- Latest Risk Score --}}

Risk Score Breakdown

@if($country->latestRiskScore) @php $rs = $country->latestRiskScore @endphp
@foreach([ 'Economy' => $rs->economy_score, 'Inflation' => $rs->inflation_score, 'Currency' => $rs->currency_score, 'Weather' => $rs->weather_score, 'Disaster' => $rs->disaster_score, 'Political' => $rs->political_score, 'Port' => $rs->port_score, ] as $label => $score)
{{ $label }}
{{ number_format($score ?? 0, 0) }}
@endforeach

Calculated {{ $rs->calculated_at?->diffForHumans() }}

@if($rs->recommendation)

💡 {{ $rs->recommendation }}

@endif @else

No risk score calculated yet.

@endif
{{-- ── Risk Score History ────────────────────────────────────────── --}} @if($riskHistory->isNotEmpty())

Risk Score History

@foreach($riskHistory as $h) @endforeach
Calculated Total Currency Weather Disaster Level
{{ $h->calculated_at?->format('Y-m-d H:i') }} {{ number_format($h->total_score, 1) }} {{ number_format($h->currency_score ?? 0, 0) }} {{ number_format($h->weather_score ?? 0, 0) }} {{ number_format($h->disaster_score ?? 0, 0) }} @include('partials.risk-badge', ['level' => $h->risk_level])
@endif @endsection