<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Lead Form Data</title>
	{{-- <style>
  body {
      margin: 10mm;
      font-size: 10px;
      font-family: DejaVu Sans, sans-serif;
  }
 
  table {
      width: 100%;
      border-collapse: collapse;
      font-size: 10px;
      page-break-inside: auto;   /* allow table to break */
  }
 
  thead {
      display: table-header-group;  /* repeat header rows automatically */
  }
 
  tfoot {
      display: table-footer-group;  /* repeat footer rows automatically */
  }
 
  tr, td, th {
      border: 1px solid #ddd;
      padding: 6px;
 
      page-break-inside: auto !important; /* let rows split naturally */
      page-break-after: auto;
  } --}}

{{-- </style> --}}
</head>

<body
    style="margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; color: #333333; background-color: #f4f4f4;">
    @php
        $dataArray = json_decode($leadFormData->vehicle_mot_data_json, true);
        $valuationjson = json_decode($leadFormData->valuation_json, true);
    @endphp

    {{-- <table border="0" cellpadding="0" cellspacing="0" width="100%"
        style="background-color: #ffffff; max-width: 600px; margin: 0 auto; border-collapse: collapse;">
        <tr>
            <td style="padding: 20px;">
                <h1
                    style="font-size: 24px; font-weight: bold; color: #2c3e50; text-align: center; margin-bottom: 20px;">
                    Lead Form Data</h1> --}}
                <table border="0" cellpadding="10" cellspacing="0" width="100%"
                    style="border-collapse: collapse; border: 1px solid #dddddd;">
                    <!-- Valuation Data -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Valuation Data</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px; width: 50%;">Vrm</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['Vrm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Mileage</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['Mileage'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Plate Year</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['PlateYear'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Vehicle Description</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['VehicleDescription	'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">OTR</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['OTR'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Dealer Fore court</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['DealerForecourt'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Trade Retail</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['TradeRetail'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Private Clean</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['PrivateClean'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Private Average</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['PrivateAverage'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Part Exchange</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['PartExchange'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Auction</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['Auction'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Trade Average</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['TradeAverage'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Trade Poor</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationList']['TradePoor'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Valuation Book</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ValuationBook'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Extract Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $valuationjson['Response']['DataItems']['ExtractNumber'] ?? '***' }}</td>
                    </tr>
                    <!-- Valuation Data -->
					
                    <!-- Vehicle Information -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Vehicle Information</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Vehicle Registration Mark</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Vrm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Make & Model</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['MakeModel'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Make</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Make'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Model</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Model'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Engine Capacity</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['EngineCapacity'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Year of Manufacture</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['YearOfManufacture'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Fuel</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['FuelType'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Date First Registered</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['DateFirstRegistered'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Door Plan</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['DoorPlan'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Date of 1st Registration in UK</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['DateFirstRegisteredUk'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Colour</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Colour'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Year Month 1st Registered</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['YearMonthFirstRegistered'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">CO2 Emissions</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Co2Emissions'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Transmission'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Euro Status</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['EuroStatus'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['TransmissionType'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Gear Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['GearCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Seating Capacity</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['SeatingCapacity'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Engine Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['EngineNumber'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Wheel Plan</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['WheelPlan'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Gross Weight</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['GrossWeight'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">MVRIS Make CODE</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['MvrisMakeCode'] ?? '***' }}</td>
                    </tr>

                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Maximum Permissable Mass</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['MaxPermissibleMass'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">MVRIS Model CODE</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['MvrisModelCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Door Plan Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['DoorPlanLiteral'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['TransmissionCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">VIN Serial Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['Vin'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Vehicle Class</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['VehicleClass'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Vin Last 5</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['VinLast5'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Used before first registration</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'vehicleInformation.VehicleUsedBeforeFirstRegistration')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Vin Confirmation Flag</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['VinConfirmationFlag'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Date Of Last Update</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleInformation']['DateOfLastUpdate'] ?? '***' }}</td>
                    </tr>
                    <!-- Vehicle Information -->
					
                    <!-- General -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            General</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Make</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['Make'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Euro Status</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['EuroStatus'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Aspiration</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['Aspiration'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Fuel System</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['FuelSystem'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Cylinders</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['NumberOfCylinders'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Fuel Delivery</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['FuelDelivery'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Valves Per Cylinder</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['ValvesPerCylinder'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Fuel Catalyst</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['FuelCatalyst'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Cylinder Arrangement</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['CylinderArrangement'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Stroke</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['Stroke'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Valve Gear</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['ValveGear'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Location</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['Location'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Description</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['Description'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Bore</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['Bore'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Power Delivery</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['PowerDelivery'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Type Approval Category</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['TypeApprovalCategory'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Driving Axle</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['DrivingAxle'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Primary Fuel Flag</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['Engine']['PrimaryFuelFlag'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Series Description</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['SeriesDescription'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Driver Position</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['DriverPosition'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Data Version Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['DataVersionNumber'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Is Limited Edition</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'general.IsLimitedEdition')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <!-- General -->
					
                    <!-- EV Battery Capacity -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            EV Battery Capacity</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">EV Battery Capacity</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['ElectricVehicleBattery']['Capacity'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">EV Battery Charge Port</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['ElectricVehicleBattery']['ChargePort'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">EV Battery Charge Time</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['ElectricVehicleBattery']['ChargeTime'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">EV Battery Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['ElectricVehicleBattery']['Type'] ?? '***' }}</td>
                    </tr>
                    <!-- EV Battery Capacity -->
					
                    <!-- Previous Keepers Detail -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Previous Keepers Detail</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Total Keepers</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleData']['totalKeepers'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Keeper Data Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['general']['ElectricVehicleBattery']['Type'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;font-weight: bold;">Keeper Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;font-weight: bold;">Keeper Changed</td>
                    </tr>
                    @if (isset($dataArray['vehicleData']['keeperChanged']))
                        @foreach ($dataArray['vehicleData']['keeperChanged'] as $keeperChangedkey => $keeperChangedval)
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Keeper
                                    {{ $keeperChangedkey + 1 }}</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $keeperChangedval['date'] ?? '***' }}</td>
                            </tr>
                        @endforeach
                    @endif
                    <!-- Previous Keepers Detail -->
					
                    <!-- V5C Certificate Issue Details -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            V5C Certificate issue details</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">V5C Certificate Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ count(data_get($dataArray, 'V5CCertificates', [])) }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Certificate Date 3</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            <table>

                                @if (isset($dataArray['V5CCertificates']))
                                    @foreach ($dataArray['V5CCertificates'] as $V5CCertificateskey => $V5CCertificatesval)
                                        <tr>
                                            <td style="border: 1px solid #dddddd; padding: 8px;">
                                                {{ $V5CCertificatesval ?? '***' }}</td>
                                        </tr>
                                    @endforeach
                                @endif
                            </table>
                        </td>
                    </tr>
                    <!-- V5C Certificate Issue Details -->
					
                    <!-- Vehicle Tax & CO2 Emissions -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Vehicle Tax & CO2 Emissions</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Standard Six Month</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['StandardSixMonth']['Amount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Per Month (Standard Six Month)</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['StandardSixMonth']['PerMonth'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Standard Twelve Month</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['StandardTwelveMonth']['Amount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Per Month (Standard Twelve Month)</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['StandardTwelveMonth']['PerMonth'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">First Year Six Month</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['FirstYearSixMonth']['Amount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Per Month (First Year Six Month)</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['FirstYearSixMonth']['PerMonth'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">First Year Twelve Month</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['First Year Twelve Month']['Amount'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Per Month (First Year Twelve Month)</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['First Year Twelve Month']['PerMonth'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Premium Vehicle Six Month</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['PremiumVehicleYear2to6-SixMonth']['Amount'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Per Month (Premium Vehicle Six Month)</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['PremiumVehicleYear2to6-SixMonth']['PerMonth'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Premium Vehicle Twelve Month</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['PremiumVehicleYear2to6-Twelve Month']['Amount'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Per Month (Premium Vehicle Twelve Month)
                        </td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['PremiumVehicleYear2to6-Twelve Month']['PerMonth'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">VED CO2 Emissions</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['VedCo2Emissions'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">VED Band</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['VedBand'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">VED CO2 Band</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['vehicleTaxCo2Emissions']['VedCo2Band'] ?? '***' }}</td>
                    </tr>
                    <!-- Vehicle Tax & CO2 Emissions -->
					
                    <!-- Previous VRM -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Previous VRM</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Previous Northern Ireland VRM</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'vehicleInformation.PreviousVrmNi')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Previous UK VRM</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'vehicleInformation.PreviousVrmuk')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <!-- Previous VRM -->
                    <!-- Import/Export -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Import/Export</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Import Non EU</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'importExport.importNonEu')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Imported</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'importExport.imported')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Exported</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'importExport.exported')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Export Date</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'importExport.dateExported')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <!-- Import/Export -->
                    <!-- Scrap Destruction -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Scrap Destruction</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Scrap / Destruction Certificate</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'scrapDestruction.scrapped')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Scrap / Destruction Certificate Date</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'scrapDestruction.dateofScapped')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <!-- Scrap Destruction -->
                    <!-- Colour Changes -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Colour Changes</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Original Colour</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['colourChange']['OriginalColour'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Current Colour</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['colourChange']['CurrentColour'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Colour Data Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['colourChange']['ColourDataCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Previous Colours</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['colourChange']['NumberOfPreviousColours'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Last Colour</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['colourChange']['LastColour'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Date Of Last Colour Change</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['colourChange']['DateOfLastColourChange'] ?? '***' }}</td>
                    </tr>
                    <!-- Colour Changes -->
                    <!-- VEHICLE IDENTITY CHECK -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            VEHICLE IDENTITY CHECK by VOSA if REPAIRED or RE REGISTERED after WRITTEN OFF, ACCIDENTED,
                            CAT C OR D etc</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Vehicle ID Check by VOSA Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'scrapDestruction.vehicleIdCheckCount')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <!-- VEHICLE IDENTITY CHECK -->
                    <!-- Dimensions -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Dimensions</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Unladen Weight</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['UnladenWeight'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Rigid/Artic</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['RigidArtic'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Body Shape</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['BodyShape'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Payload Volume</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['PayloadVolume'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Payload Weight</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['PayloadWeight'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Height</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['Height'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Doors</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['NumberOfDoors'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Seats</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['NumberOfSeats'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Gross Train Weight</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['GrossTrainWeight'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Fuel Tank Capacity</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['FuelTankCapacity'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Load Length</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['LoadLength'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Data Version Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['DataVersionNumber'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Wheel Base</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['WheelBase'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Car Length</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['CarLength'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Width</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['Width'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Axles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['NumberOfAxles'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Gross Vehicle Weight</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['GrossVehicleWeight'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Gross Combined Weight</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['dimensions']['GrossCombinedWeight'] ?? '***' }}</td>
                    </tr>
                    <!-- Dimensions -->
                    <!-- Safety -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Safety</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Child</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['safety']['EuroNcap']['Child'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Adult</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['safety']['EuroNcap']['Adult'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Pedestrian</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['safety']['EuroNcap']['Pedestrian'] ?? '***' }}</td>
                    </tr>
                    <!-- Safety -->
                    <!-- Classification Details -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Classification Details</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">SMMT Make</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Smmt']['Make'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">SMMT Range</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Smmt']['Range'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">SMMT Trim</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Smmt']['Trim'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Is Electric Vehicle</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'classificationDetails.classificationDetails.IsElectricVehicle')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">DVLA Model</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Dvla']['Model'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">DVLA Make</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Dvla']['Make'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">SMMT Mvris Make Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Smmt']['Mvris']['MakeCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">SMMT Mvris Model Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['classificationDetails']['Smmt']['Mvris']['ModelCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Is Ni General Format</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'classificationDetails.Ukvd.VrmFormat.IsNiGeneralFormat')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Is GB General Format</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'classificationDetails.Ukvd.VrmFormat.IsGbGeneralFormat')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <!-- Classification Details -->
                    <!-- SMMT Details -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            SMMT Details</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Range</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['Range'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Fuel Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['FuelType'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Engine Capacity</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['EngineCapacity'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Market Sector Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['MarketSectorCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Country Of Origin</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['CountryOfOrigin'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Model Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['ModelCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Model Variant</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['ModelVariant'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Data Version Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['DataVersionNumber'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Gears</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['NumberOfGears'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Nominal Engine Capacity</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['NominalEngineCapacity'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Marque Code</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['MarqueCode'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['Transmission'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Body Style</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['BodyStyle'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Visibility Date</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['VisibilityDate'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">SysSetup Date</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['SysSetupDate'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Marque</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['Marque'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Cab Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['CabType'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Terminate Date</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['TerminateDate'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Series</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['Series'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Number Of Doors</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['NumberOfDoors'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Drive Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['smmtDetails']['DriveType'] ?? '***' }}</td>
                    </tr>
                    <!-- SMMT Details -->
                    <!-- Performance -->
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Performance</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Torque FtLb</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Torque']['FtLb'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Torque Nm</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Torque']['Nm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Torque Rpm</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Torque']['Rpm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Noise Level</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['NoiseLevel'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Data Version Number</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['DataVersionNumber'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Power Bhp</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Power']['Bhp'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Power Rpm</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Power']['Rpm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Power Kw</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Power']['Kw'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Max Speed Kph</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['MaxSpeed']['Kph'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Max Speed Mph</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['MaxSpeed']['Mph'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Co2</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Co2'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Particles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Particles'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Acceleration Mph</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Acceleration']['Mph'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Acceleration Kph</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Acceleration']['Kph'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Acceleration Zero To 60 Mph</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Acceleration']['ZeroTo60Mph'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Acceleration Zero To 100 Kph</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['performance']['Acceleration']['ZeroTo100Kph'] ?? '***' }}</td>
                    </tr>
                    <!-- Performance -->
                    <!-- Electrical Vehicle Data -->
                        @if(!empty($dataArray['electricVehicleData']))
                    <tr>
                        <td colspan="2"
                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;color: red;">
                            Electrical Vehicle Data</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px; width: 50%;">Max Range Miles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MaxRangeMiles'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Max Range Km</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MaxRangeKm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">CO2</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['Co2'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Drag Coefficient</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['DragCoefficient'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">OtaUpgradable</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'electricVehicleData.OtaUpgradable')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">LatestOtaVersion</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['LatestOtaVersion'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">HwVersion</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['HwVersion'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">WhMile</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['WhMile'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">ZeroEmissionMiles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ZeroEmissionMiles'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">MaxKwChargeInput</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MaxKwChargeInput'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">MaxMilesPerChargeHour</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MaxMilesPerChargeHour'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">MaxMilesPerChargeMinute</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MaxMilesPerChargeMinute'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">ManufacturerWarrantyMiles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ManufacturerWarrantyMiles'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">ManufacturerWarrantyMonths</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ManufacturerWarrantyMonths'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">DrivetrainVersionDescription</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['DrivetrainVersionDescription'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">TeslaSuperchargerCompatible</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'electricVehicleData.TeslaSuperchargerCompatible')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Tesla Supercharging Version 1</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['TeslaSupercharging']['Version1']['MaxChargeKw'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Tesla Supercharging Version 2</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['TeslaSupercharging']['Version2']['MaxChargeKw'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Tesla Supercharging Version 3</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['TeslaSupercharging']['Version3']['MaxChargeKw'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Details Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Capacity Kwh</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['CapacityKwh'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Description</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['BatteryDescription'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Chemistry</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['Chemistry'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Voltage</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['Voltage'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Location</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['BatteryLocation'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Warranty Months</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['BatteryWarrantyMonths'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Battery Warranty Miles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['BatteryDetailsList']['BatteryWarrantyMiles'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">ChargePort Details Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ChargePortDetailsCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Charge Port Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ChargePortDetailsList']['PortType'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Charge Port Location</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ChargePortDetailsList']['PortLocation'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Charge Max Charge Power Kw</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ChargePortDetailsList']['MaxChargePowerKw'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Charge Port Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['ChargePortCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Details Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Manufacturer</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['Manufacturer'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Model</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['Model'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['MotorType'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Power Kw</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['PowerKw'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Max Power Rpm</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['MaxPowerRpm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Max Torque Nm</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['MaxTorqueNm'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Regen Braking</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'electricVehicleData.MotorDetailsList.RegenBraking')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Additional Information</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['AdditionalInformation'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Motor Location</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['MotorDetailsList']['MotorLocation'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission Details Count</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['TransmissionDetailsCount'] ?? '***' }}</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission Type</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['TransmissionDetailsList']['TransmissionType'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Transmission Number Of Gears</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['TransmissionDetailsList']['NumberOfGears'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Range Figures</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['RangeFigures']['RangeTestCycleDetailsList']['RangeTestCycleDetailsList']['EvRangeTestType'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Combined Range Miles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['RangeFigures']['RangeTestCycleDetailsList']['RangeTestCycleDetailsList']['CombinedRangeMiles'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Combined Range Km</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['RangeFigures']['RangeTestCycleDetailsList']['RangeTestCycleDetailsList']['CombinedRangeKm'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">City Range Miles</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['RangeFigures']['RangeTestCycleDetailsList']['RangeTestCycleDetailsList']['CityRangeMiles'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">City Range Km</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ $dataArray['electricVehicleData']['RangeTestCycleDetailsList']['CityRangeKm'] ?? '***' }}
                        </td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; padding: 8px;">Is Electric Vehicle</td>
                        <td style="border: 1px solid #dddddd; padding: 8px;">
                            {{ ($val = data_get($dataArray, 'electricVehicleData.Identification.IsElectricVehicle')) === false ? 'No' : ($val === true ? 'Yes' : ($val !== null && $val !== '' ? $val : '***')) }}
                        </td>
                    </tr>
                    @endif
                    <!-- Electrical Vehicle Data -->
                    <!-- Mot List -->
                    @if (!empty($dataArray['motTestList']['motList']))
                        @foreach ($dataArray['motTestList']['motList'] as $motlistkey => $motlistval)
                            <tr
                                style="background-color: {{ !empty($motlistval['result']) && $motlistval['result'] === 'PASSED' ? 'green' : 'red' }}">
                                <td style="border: 1px solid #dddddd; padding: 8px;">MOT {{ $motlistkey + 1 }} Date
                                    :{{ $motlistval['date'] ?? '***' }}</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $motlistval['result'] ?? '***' }}</td>
                            </tr>
                            @php
                                $datetime = $motlistval['date'];
                                $parts = explode('T', $datetime);

                                $date = $parts[0]; // 2025-06-04
                                $time = substr($parts[1], 0, 8); // 11:48:37
                            @endphp
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Mot Test Number</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $motlistval['motTesNumber'] ?? '***' }}</td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Test Date</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">{{ $date ?? '***' }}</td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Test Time</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">{{ $time ?? '***' }}</td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Test Result</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $motlistval['result'] ?? '***' }}</td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Expiry Date</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $motlistval['motTesNumber'] ?? '***' }}</td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Mileage</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $motlistval['mileage'] ?? '***' }}</td>
                            </tr>
                            <tr>
                                <td style="border: 1px solid #dddddd; padding: 8px;">Mileage Difference</td>
                                <td style="border: 1px solid #dddddd; padding: 8px;">
                                    {{ $motlistval['difference'] ?? '***' }}</td>
                            </tr>

                            @if (!empty($motlistval['advisory']))
                                <tr>
                                    <td colspan="2"
                                        style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;">
                                        Advisories: </td>
                                </tr>
                                @foreach ($motlistval['advisory'] as $advisorykey => $advisoryval)
                                    <tr>
                                        <td colspan="2" style="border: 1px solid #dddddd; padding: 8px;">
                                            {{ $advisoryval['text'] ?? '***' }}<span
                                                style="background-color: yellow;">{{ $advisoryval['type'] ?? '***' }}</span>
                                        </td>
                                    </tr>
                                @endforeach
                            @endif

                            @if (!empty($motlistval['failure']))
                                <tr>
                                    <td colspan="2"
                                        style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;">
                                        Failures: </td>
                                </tr>
                                @foreach ($motlistval['failure'] as $failurekey => $failureval)
                                    <tr>
                                        <td colspan="2"
                                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;">
                                            {{ $failureval['text'] ?? '***' }}<span
                                                style="background-color: red;">{{ $failureval['type'] ?? '***' }}</span>
                                        </td>
                                    </tr>
                                @endforeach
                            @endif


                            @if (!empty($motlistval['prsText']))
                                @foreach ($motlistval['prsText'] as $prsText => $prs)
                                    <tr>
                                        <td colspan="2"
                                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;">
                                            {{ $prs['text'] ?? '***' }}<span
                                                style="background-color: #297cc3;">{{ $prs['type'] ?? '***' }}</span>
                                        </td>
                                    </tr>
                                @endforeach
                            @endif

                            @if (!empty($motlistval['userEntered']))
                                @foreach ($motlistval['userEntered'] as $userEnteredIndex => $userEntered)
                                    <tr>
                                        <td colspan="2"
                                            style="background-color: #ecf0f1; font-weight: bold; font-size: 18px; padding: 10px; border-bottom: 1px solid #dddddd;">
                                            {{ $userEntered['text'] ?? '***' }}<span
                                                style="background-color: #16aad6;">{{ $userEntered['type'] ?? '***' }}</span>
                                        </td>
                                    </tr>
                                @endforeach
                            @endif
                        @endforeach
                    @endif

                    <!-- Mot List -->
                </table>
            </td>
        </tr>
    {{-- </table> --}}
</body>

</html>
