@extends('layouts.cms_admin')
@section('title', 'Dashboard')

@section('content')
<div style="display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:1.5rem; margin-bottom: 2rem;">
    
    @if(isset($license_plan['page_limit']))
    <div class="card">
        <h3 style="color:var(--text-muted); font-size:0.875rem; margin-bottom:0.5rem">Sayfa Sayısı</h3>
        <p style="font-size:1.5rem; font-weight:700">0 / {{ $license_plan['page_limit'] == 0 ? 'Sınırsız' : $license_plan['page_limit'] }}</p>
    </div>
    @endif

    @if(isset($license_plan['has_blog']) && $license_plan['has_blog'])
    <div class="card">
        <h3 style="color:var(--text-muted); font-size:0.875rem; margin-bottom:0.5rem">Blog Sayısı</h3>
        <p style="font-size:1.5rem; font-weight:700">0 / {{ $license_plan['blog_limit'] == 0 ? 'Sınırsız' : $license_plan['blog_limit'] }}</p>
    </div>
    @endif

    @if(isset($license_plan['has_product']) && $license_plan['has_product'])
    <div class="card">
        <h3 style="color:var(--text-muted); font-size:0.875rem; margin-bottom:0.5rem">Ürün Sayısı</h3>
        <p style="font-size:1.5rem; font-weight:700">0 / {{ $license_plan['product_limit'] == 0 ? 'Sınırsız' : $license_plan['product_limit'] }}</p>
    </div>
    @endif

    <div class="card">
        <h3 style="color:var(--text-muted); font-size:0.875rem; margin-bottom:0.5rem">Lisans Süresi</h3>
        <p style="font-size:1.5rem; font-weight:700; color:var(--primary)">{{ \Carbon\Carbon::parse($license_end_date)->diffInDays(now()) }} Gün Kaldı</p>
    </div>
</div>

<div class="card">
    <h3 style="margin-bottom: 1rem">Hoşgeldiniz!</h3>
    <p style="color:var(--text-muted)">SanoDiji Site Builder'ı kullanmaya başlayın. Planınızın izin verdiği modülleri sol menüden yönetebilirsiniz.</p>
</div>
@endsection
