<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
@php
  $clientLogoSetting = \App\Models\CompanySetting::first();
  $clientLogoUrl = $clientLogoSetting?->logo_path ? asset('storage/'.$clientLogoSetting->logo_path) : asset('images/logo.svg');
@endphp
<title>@yield('title','Portal') — JPN Client Portal</title>
<link rel="icon" type="image/svg+xml" href="{{ asset('images/favicon.svg') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style>
body{background:#f0f4f8;font-size:14px}
.topbar{background:#1e2a3b;color:#fff;padding:12px 24px;display:flex;align-items:center;justify-content:space-between}
.topbar .brand{font-weight:700;font-size:15px}
.content{padding:24px}
.card{border:none;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.08)}
</style>
</head>
<body>
<div class="topbar">
  <div class="brand d-flex align-items-center gap-2">
    <img src="{{ $clientLogoUrl }}" alt="Logo" style="width:28px;height:28px;object-fit:contain;border-radius:6px;">
    <span>JPN Client Portal</span>
  <div class="d-flex align-items-center gap-3">
    <a href="{{ route('client.dashboard') }}" class="text-white text-decoration-none small"><i class="fas fa-gauge me-1"></i>Dashboard</a>
    <a href="{{ route('client.tickets') }}" class="text-white text-decoration-none small"><i class="fas fa-ticket me-1"></i>Tiket</a>
    <a href="{{ route('client.invoices') }}" class="text-white text-decoration-none small"><i class="fas fa-file-invoice me-1"></i>Invoice</a>
    <form action="{{ route('client.logout') }}" method="POST" class="mb-0">@csrf<button class="btn btn-sm btn-outline-light"><i class="fas fa-sign-out-alt me-1"></i>Logout</button></form>
  </div>
</div>
<div class="content">
  @if(session('success'))<div class="alert alert-success alert-dismissible"><i class="fas fa-check-circle me-2"></i>{{ session('success') }}<button class="btn-close" data-bs-dismiss="alert"></button></div>@endif
  @if($errors->any())<div class="alert alert-danger alert-dismissible">{{ $errors->first() }}<button class="btn-close" data-bs-dismiss="alert"></button></div>@endif
  @yield('content')
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js"></script>
</body>
</html>
