<div class="row g-4">
    
    <div class="col-lg-4">
        <div class="tw-bg-white tw-border tw-border-gray-100 tw-rounded-[2rem] tw-shadow-sm tw-overflow-hidden tw-h-full">
            <div class="tw-h-32 tw-bg-gradient-to-br tw-from-blue-600 tw-to-indigo-800 tw-relative">
                <div class="tw-absolute tw-inset-0 tw-opacity-10 tw-bg-[url('https://www.transparenttextures.com/patterns/cubes.png')]"></div>
            </div>
            
            <div class="tw-text-center tw-relative tw-pt-0 tw-px-8 tw-pb-10">
                <div class="tw-relative tw--mt-16 tw-mb-5 d-inline-block">
                    <img src="https://ui-avatars.com/api/?name=<?php echo urlencode($user->name); ?>&background=ffffff&color=2563eb&size=128&font-size=0.4" 
                         class="tw-w-32 tw-h-32 tw-rounded-[2.5rem] tw-border-[6px] tw-border-white tw-shadow-2xl tw-object-cover">
                    <div class="tw-absolute tw-bottom-2 tw-right-2 tw-bg-emerald-500 tw-w-6 tw-h-6 tw-rounded-full tw-border-4 tw-border-white tw-shadow-sm" title="Sistemde Aktif"></div>
                </div>

                <h4 class="tw-font-black tw-text-xl tw-text-gray-900 tw-mb-1"><?php echo htmlspecialchars($user->name); ?></h4>
                <p class="tw-text-[11px] tw-font-bold tw-text-blue-600 tw-uppercase tw-tracking-widest tw-mb-8">Sistem Yöneticisi</p>

                <div class="tw-grid tw-grid-cols-2 tw-gap-4 tw-border-t tw-border-gray-50 tw-pt-8">
                    <div class="text-center">
                        <div class="tw-text-[10px] tw-text-gray-400 tw-uppercase tw-font-black tw-tracking-wider tw-mb-1">Kayıt Tarihi</div>
                        <div class="tw-text-sm tw-font-bold tw-text-gray-700">
                            <?php echo isset($user->created_at) ? date('d.m.Y', strtotime($user->created_at)) : 'Bilinmiyor'; ?>
                        </div>
                    </div>
                    <div class="text-center tw-border-l tw-border-gray-100">
                        <div class="tw-text-[10px] tw-text-gray-400 tw-uppercase tw-font-black tw-tracking-wider tw-mb-1">Hesap Türü</div>
                        <div class="tw-text-sm tw-font-bold tw-text-emerald-600">Premium</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-lg-8">
        <div class="tw-bg-white tw-border tw-border-gray-100 tw-rounded-[2rem] tw-shadow-sm tw-overflow-hidden">
            
            <div class="tw-p-8 tw-border-b tw-border-gray-50 d-flex align-items-center justify-content-between">
                <div class="d-flex align-items-center">
                    <div class="tw-w-10 tw-h-10 tw-bg-blue-50 tw-text-blue-600 tw-rounded-xl d-flex align-items-center justify-content-center tw-mr-4">
                        <i class="fa-solid fa-user-gear"></i>
                    </div>
                    <div>
                        <h5 class="tw-font-black tw-text-xl tw-text-gray-900 tw-mb-0">Hesap Ayarları</h5>
                        <p class="tw-text-gray-400 tw-text-[11px] tw-font-bold tw-uppercase tw-tracking-widest tw-mb-0">Bilgilerinizi buradan güncelleyebilirsiniz</p>
                    </div>
                </div>
            </div>

            <div class="tw-p-8 md:tw-p-10">
                
                <?php if (isset($_GET['success'])): ?>
                    <div class="tw-flex tw-items-center tw-p-4 tw-mb-8 tw-text-emerald-800 tw-rounded-2xl tw-bg-emerald-50 tw-border tw-border-emerald-100">
                        <i class="fa-solid fa-circle-check tw-text-xl tw-mr-3"></i>
                        <div class="tw-font-bold tw-text-sm">Profil bilgileriniz başarıyla güncellendi.</div>
                    </div>
                <?php endif; ?>

                <form action="<?php echo BASE_URL; ?>/admin/profile" method="POST" class="tw-space-y-8">
                    
                    <div>
                        <h6 class="tw-text-[10px] tw-font-black tw-text-blue-600/50 tw-uppercase tw-tracking-[0.25em] tw-mb-6 tw-flex tw-items-center">
                            <span class="tw-w-6 tw-h-px tw-bg-blue-100 tw-mr-3"></span> KİŞİSEL BİLGİLER
                        </h6>
                        
                        <div class="row g-4">
                            <div class="col-md-6">
                                <label class="tw-text-[11px] tw-font-black tw-text-gray-400 tw-uppercase tw-tracking-widest tw-mb-2 tw-block tw-px-1">Tam Adınız</label>
                                <div class="tw-relative">
                                    <span class="tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-items-center tw-pl-4 tw-text-gray-400">
                                        <i class="fa-regular fa-user"></i>
                                    </span>
                                    <input type="text" name="name" class="tw-w-full tw-pl-11 tw-pr-4 tw-py-3.5 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-xl focus:tw-outline-none focus:tw-bg-white focus:tw-ring-4 focus:tw-ring-blue-50 focus:tw-border-blue-300 tw-transition-all tw-text-sm tw-font-bold tw-text-gray-800 shadow-none" value="<?php echo htmlspecialchars($user->name); ?>" required>
                                </div>
                            </div>
                            
                            <div class="col-md-6">
                                <label class="tw-text-[11px] tw-font-black tw-text-gray-400 tw-uppercase tw-tracking-widest tw-mb-2 tw-block tw-px-1">İletişim Numarası</label>
                                <div class="tw-relative">
                                    <span class="tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-items-center tw-pl-4 tw-text-gray-400">
                                        <i class="fa-solid fa-phone"></i>
                                    </span>
                                    <input type="text" name="phone" class="tw-w-full tw-pl-11 tw-pr-4 tw-py-3.5 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-xl focus:tw-outline-none focus:tw-bg-white focus:tw-ring-4 focus:tw-ring-blue-50 focus:tw-border-blue-300 tw-transition-all tw-text-sm tw-font-bold tw-text-gray-800 shadow-none" value="<?php echo htmlspecialchars($user->phone); ?>" placeholder="05xx xxx xx xx">
                                </div>
                            </div>

                            <div class="col-12">
                                <label class="tw-text-[11px] tw-font-black tw-text-gray-400 tw-uppercase tw-tracking-widest tw-mb-2 tw-block tw-px-1">E-Posta Adresi</label>
                                <div class="tw-relative">
                                    <span class="tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-items-center tw-pl-4 tw-text-gray-400">
                                        <i class="fa-regular fa-envelope"></i>
                                    </span>
                                    <input type="email" name="email" class="tw-w-full tw-pl-11 tw-pr-4 tw-py-3.5 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-xl focus:tw-outline-none focus:tw-bg-white focus:tw-ring-4 focus:tw-ring-blue-50 focus:tw-border-blue-300 tw-transition-all tw-text-sm tw-font-bold tw-text-gray-800 shadow-none" value="<?php echo htmlspecialchars($user->email); ?>" required>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tw-bg-slate-50 tw-p-6 md:tw-p-8 tw-rounded-[2rem] tw-border tw-border-gray-100">
                        <h6 class="tw-text-[10px] tw-font-black tw-text-gray-400 tw-uppercase tw-tracking-[0.25em] tw-mb-6 tw-flex tw-items-center">
                            <span class="tw-w-6 tw-h-px tw-bg-gray-200 tw-mr-3"></span> GÜVENLİK & ŞİFRE
                        </h6>
                        
                        <div class="mb-4">
                            <label class="tw-text-[11px] tw-font-black tw-text-gray-400 tw-uppercase tw-tracking-widest tw-mb-2 tw-block tw-px-1">Yeni Şifre Oluştur</label>
                            <div class="tw-relative">
                                <span class="tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-items-center tw-pl-4 tw-text-gray-400">
                                    <i class="fa-solid fa-key"></i>
                                </span>
                                <input type="password" name="password" class="tw-w-full tw-pl-11 tw-pr-4 tw-py-3.5 tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl focus:tw-outline-none focus:tw-ring-4 focus:tw-ring-blue-50 focus:tw-border-blue-300 tw-transition-all tw-text-sm tw-font-bold tw-text-gray-800 shadow-none" placeholder="Değiştirmek istemiyorsanız boş bırakın">
                            </div>
                        </div>
                        
                        <div class="tw-bg-amber-50 tw-border tw-border-amber-100 tw-p-4 tw-rounded-xl d-flex align-items-start">
                            <i class="fa-solid fa-circle-info tw-text-amber-500 tw-mt-0.5 tw-mr-3"></i>
                            <p class="tw-text-[11px] tw-text-amber-700 tw-font-bold tw-mb-0 tw-leading-relaxed">
                                Şifrenizi güncellediğinizde bir sonraki girişinizde yeni şifreniz geçerli olacaktır. Lütfen güvenli bir şifre seçtiğinizden emin olun.
                            </p>
                        </div>
                    </div>

                    <div class="tw-pt-4 d-flex justify-content-end">
                        <button type="submit" class="btn tw-bg-blue-600 hover:tw-bg-blue-700 tw-text-white tw-px-12 tw-py-4 tw-rounded-2xl tw-font-black tw-text-xs tw-tracking-widest tw-shadow-xl tw-shadow-blue-500/25 tw-transition-all hover:tw--translate-y-1">
                            DEĞİŞİKLİKLERİ UYGULA
                        </button>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>