@extends('layouts.client')
@section('title', 'Edit Profile')
@section('content')
<h1 class="client-page-title" style="text-align:left">Edit Profile</h1>
<p class="client-page-sub" style="text-align:left">Update your account details</p>

<div class="client-form-card client-card">
    <form method="POST" action="{{ route('client.profile.update') }}">
        @csrf
        @method('PUT')
        <div class="form-group">
            <label for="name">Full name</label>
            <input id="name" type="text" name="name" class="client-input"
                   value="{{ old('name', $user->name) }}" required autocomplete="name">
            @error('name')
                <p class="form-error">{{ $message }}</p>
            @enderror
        </div>
        <div class="form-group">
            <label for="username">Username</label>
            <input id="username" type="text" name="username" class="client-input"
                   value="{{ old('username', $user->username) }}" required autocomplete="username">
            @error('username')
                <p class="form-error">{{ $message }}</p>
            @enderror
        </div>
        <div class="form-group">
            <label for="email">Email</label>
            <input id="email" type="email" name="email" class="client-input"
                   value="{{ old('email', $user->email) }}" required autocomplete="email">
            @error('email')
                <p class="form-error">{{ $message }}</p>
            @enderror
        </div>
        <button type="submit" class="client-btn client-btn-primary">Save changes</button>
    </form>
</div>
@endsection
