@extends('layouts.security')

@section('content')

<style>

.hover-card{
    transition:.25s;
}

.hover-card:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 25px rgba(0,0,0,.10) !important;
}

</style>

<div style="margin-bottom:25px;">

    <p style="
    color:#64748b;
    font-size:14px;
    margin-bottom:8px;
    ">
        Home / Laporan Kendaraan
    </p>

    <h2 style="
    font-size:34px;
    font-weight:700;
    margin:0;
    ">
        Laporan Kendaraan
    </h2>

    <hr style="
    margin-top:20px;
    border:none;
    border-top:4px solid #e5e7eb;
    ">

</div>

<div class="hover-card" style="
padding:20px;
border-radius:18px;
background:white;
box-shadow:0 4px 16px rgba(0,0,0,0.05);
">

<table style="
width:100%;
border-collapse:collapse;
">

<tr>

<th style="
padding:16px;
text-align:left;
color:#64748b;
font-size:14px;
font-weight:700;
border-bottom:1px solid #e5e7eb;
">
Kendaraan
</th>

<th style="
padding:16px;
text-align:left;
color:#64748b;
font-size:14px;
font-weight:700;
border-bottom:1px solid #e5e7eb;
">
Pengguna
</th>

<th style="
padding:16px;
text-align:left;
color:#64748b;
font-size:14px;
font-weight:700;
border-bottom:1px solid #e5e7eb;
">
Waktu Berangkat
</th>

<th style="
padding:16px;
text-align:left;
color:#64748b;
font-size:14px;
font-weight:700;
border-bottom:1px solid #e5e7eb;
">
Status
</th>

</tr>

@forelse($activeTrips as $trip)

<tr style="
border-bottom:1px solid #f1f5f9;
">

<td style="padding:18px 16px;">
<strong>
{{ $trip->vehicle->vehicle_name ?? '-' }}
</strong>
</td>

<td style="padding:18px 16px;">
{{ $trip->user->name ?? '-' }}
</td>

<td style="padding:18px 16px;">
{{ $trip->departure_time }}
</td>

<td style="padding:18px 16px;">

<span style="
background:#dcfce7;
color:#15803d;
padding:6px 12px;
border-radius:999px;
font-size:12px;
font-weight:700;
">

IN USE

</span>

</td>

</tr>

@empty

<tr>

<td colspan="4"
style="
padding:25px;
text-align:center;
color:#64748b;
">

Tidak ada kendaraan yang sedang digunakan.

</td>

</tr>

@endforelse

</table>

</div>

@endsection