@extends('member.layout')
@section('member-content')
<h1 style="margin:0 0 30px;color:#414141;font-size:24px;font-weight:600;">Hesap Ayarları</h1>

<div>
            
            <form method="POST" action="{{ route('profile.update') }}" style="display:flex;flex-direction:column;gap:20px;">
                @csrf
                @method('PUT')
                
                <div class="form-group">
                    <label style="display:block;margin-bottom:8px;font-weight:600;color:#414141;">Ad Soyad <span style="color:#e74c3c;">*</span></label>
                    <input type="text" name="name" value="{{ old('name', $user->name) }}" required 
                           style="width:100%;padding:12px;border:2px solid #e5e7eb;border-radius:4px;font-size:14px;box-sizing:border-box;transition:border-color 0.3s;"
                           onfocus="this.style.borderColor='#7db64f'" onblur="this.style.borderColor='#e5e7eb'">
                </div>

                <div class="form-group">
                    <label style="display:block;margin-bottom:8px;font-weight:600;color:#414141;">E-posta <span style="color:#e74c3c;">*</span></label>
                    <input type="email" name="email" value="{{ old('email', $user->email) }}" required 
                           style="width:100%;padding:12px;border:2px solid #e5e7eb;border-radius:4px;font-size:14px;box-sizing:border-box;transition:border-color 0.3s;"
                           onfocus="this.style.borderColor='#7db64f'" onblur="this.style.borderColor='#e5e7eb'">
                </div>

                <div class="form-group">
                    <label style="display:block;margin-bottom:8px;font-weight:600;color:#414141;">Telefon</label>
                    <input type="tel" name="phone" value="{{ old('phone', $user->phone ?? '') }}" 
                           placeholder="05XX XXX XX XX"
                           style="width:100%;padding:12px;border:2px solid #e5e7eb;border-radius:4px;font-size:14px;box-sizing:border-box;transition:border-color 0.3s;"
                           onfocus="this.style.borderColor='#7db64f'" onblur="this.style.borderColor='#e5e7eb'">
                </div>

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

                <h4 style="margin-bottom:15px;color:#414141;font-size:16px;">Şifre Değiştir</h4>

                <div class="form-group">
                    <label style="display:block;margin-bottom:8px;font-weight:600;color:#414141;">Mevcut Şifre</label>
                    <input type="password" name="current_password" 
                           style="width:100%;padding:12px;border:2px solid #e5e7eb;border-radius:4px;font-size:14px;box-sizing:border-box;transition:border-color 0.3s;"
                           onfocus="this.style.borderColor='#7db64f'" onblur="this.style.borderColor='#e5e7eb'">
                    <small style="color:#666;font-size:12px;margin-top:4px;display:block;">Şifre değiştirmek istemiyorsanız boş bırakın</small>
                </div>

                <div class="form-group">
                    <label style="display:block;margin-bottom:8px;font-weight:600;color:#414141;">Yeni Şifre</label>
                    <input type="password" name="password" 
                           style="width:100%;padding:12px;border:2px solid #e5e7eb;border-radius:4px;font-size:14px;box-sizing:border-box;transition:border-color 0.3s;"
                           onfocus="this.style.borderColor='#7db64f'" onblur="this.style.borderColor='#e5e7eb'">
                </div>

                <div class="form-group">
                    <label style="display:block;margin-bottom:8px;font-weight:600;color:#414141;">Yeni Şifre Tekrar</label>
                    <input type="password" name="password_confirmation" 
                           style="width:100%;padding:12px;border:2px solid #e5e7eb;border-radius:4px;font-size:14px;box-sizing:border-box;transition:border-color 0.3s;"
                           onfocus="this.style.borderColor='#7db64f'" onblur="this.style.borderColor='#e5e7eb'">
                </div>

                <button type="submit" style="background:#7db64f;color:#fff;padding:14px 24px;border:none;border-radius:4px;font-size:16px;font-weight:600;cursor:pointer;transition:background 0.3s;width:100%;">
                    Güncelle
                </button>
            </form>
</div>
@endsection

