<?php $__env->startSection('content'); ?>

<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; margin-top: 15px;">
    <h2 style="color: #d4af37; font-size: 1.5rem; font-weight: bold;">
        <?php echo e(app()->getLocale() == 'ar' ? 'تفاصيل وثيقة التأمين' : 'Insurance Policy Details'); ?>

    </h2>
    <a href="<?php echo e(route('admin.vehicle-insurances.index')); ?>" style="background: #666; color: white; padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none;">
        <?php echo e(app()->getLocale() == 'ar' ? 'عودة' : 'Back'); ?>

    </a>
</div>

<div style="background: #111; border: 1px solid #333; border-radius: 1rem; padding: 2rem; max-width: 900px; margin: 0 auto;">
    
    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem;">
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'السيارة' : 'Vehicle'); ?></div>
            <div style="font-weight: bold; color: white; font-size: 1.1rem;"><?php echo e($vehicle_insurance->car->brand?->name); ?> <?php echo e($vehicle_insurance->car->carModel?->name); ?></div>
            <div style="color: #999; font-size: 0.875rem;"><?php echo e($vehicle_insurance->car->plate_number); ?></div>
        </div>
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'رقم الوثيقة' : 'Policy Number'); ?></div>
            <div style="font-weight: bold; color: #d4af37; font-family: monospace; font-size: 1.1rem;"><?php echo e($vehicle_insurance->policy_number); ?></div>
        </div>
    </div>

    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem;">
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'شركة التأمين' : 'Insurance Company'); ?></div>
            <div style="font-weight: bold; color: white; font-size: 1rem;"><?php echo e($vehicle_insurance->company->name); ?></div>
        </div>
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'نوع التأمين' : 'Insurance Type'); ?></div>
            <div style="display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.85rem; font-weight: bold; background: rgba(59, 130, 246, 0.2); color: #3b82f6;">
                <?php echo e($vehicle_insurance->insurance_type == 'comprehensive' ? (app()->getLocale() == 'ar' ? 'شامل' : 'Comprehensive') : (app()->getLocale() == 'ar' ? 'ضد الغير' : 'Third Party')); ?>

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

    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem;">
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'تاريخ البداية' : 'Start Date'); ?></div>
            <div style="color: white; font-size: 1rem;"><?php echo e($vehicle_insurance->start_date->format('Y-m-d')); ?></div>
        </div>
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'تاريخ الانتهاء' : 'End Date'); ?></div>
            <div style="color: <?php echo e($vehicle_insurance->end_date->isPast() ? '#ef4444' : ($vehicle_insurance->end_date->diffInDays(now()) < 30 ? '#eab308' : '#10b981')); ?>; font-size: 1rem;"><?php echo e($vehicle_insurance->end_date->format('Y-m-d')); ?></div>
        </div>
    </div>

    <div style="background: #1a1a1a; border: 1px solid #333; border-radius: 0.75rem; padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 2rem;">
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'قسط التأمين' : 'Premium Amount'); ?></div>
            <div style="color: #d4af37; font-weight: bold; font-size: 1.25rem;"><?php echo e(number_format($vehicle_insurance->premium_amount, 2)); ?> SAR</div>
        </div>
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'قيمة التحمل' : 'Deductible'); ?></div>
            <div style="color: #ef4444; font-weight: bold; font-size: 1.25rem;"><?php echo e(number_format($vehicle_insurance->deductible_amount, 2)); ?> SAR</div>
        </div>
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'قيمة التغطية' : 'Coverage Amount'); ?></div>
            <div style="color: #10b981; font-weight: bold; font-size: 1.25rem;"><?php echo e(number_format($vehicle_insurance->coverage_amount ?? 0, 2)); ?> SAR</div>
        </div>
    </div>

    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem;">
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'حالة الدفع' : 'Payment Status'); ?></div>
            <div style="display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.85rem; font-weight: bold; 
                <?php if($vehicle_insurance->payment_status == 'paid'): ?> background: rgba(34, 197, 94, 0.2); color: #22c55e;
                <?php elseif($vehicle_insurance->payment_status == 'partial'): ?> background: rgba(234, 179, 8, 0.2); color: #eab308;
                <?php else: ?> background: rgba(239, 68, 68, 0.2); color: #ef4444; <?php endif; ?>">
                <?php echo e($vehicle_insurance->payment_status == 'paid' ? (app()->getLocale() == 'ar' ? 'مدفوع' : 'Paid') : ($vehicle_insurance->payment_status == 'partial' ? (app()->getLocale() == 'ar' ? 'مدفوع جزئياً' : 'Partial') : (app()->getLocale() == 'ar' ? 'غير مدفوع' : 'Unpaid'))); ?>

            </div>
        </div>
        <div>
            <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'الحالة' : 'Status'); ?></div>
            <div style="display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.85rem; font-weight: bold; background: <?php echo e($vehicle_insurance->status == 'active' ? 'rgba(34, 197, 94, 0.2); color: #22c55e;' : 'rgba(239, 68, 68, 0.2); color: #ef4444;'); ?>">
                <?php echo e($vehicle_insurance->status == 'active' ? (app()->getLocale() == 'ar' ? 'ساري' : 'Active') : (app()->getLocale() == 'ar' ? 'منتهي' : 'Expired')); ?>

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

    <?php if($vehicle_insurance->notes): ?>
    <div style="margin-bottom: 2rem;">
        <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'ملاحظات' : 'Notes'); ?></div>
        <div style="color: #ccc; font-size: 0.95rem; line-height: 1.6;"><?php echo e($vehicle_insurance->notes); ?></div>
    </div>
    <?php endif; ?>

    <?php if($vehicle_insurance->document_path): ?>
    <div style="margin-bottom: 2rem;">
        <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'المستند' : 'Document'); ?></div>
        <a href="<?php echo e(asset('storage/' . $vehicle_insurance->document_path)); ?>" target="_blank" style="color: #3b82f6; text-decoration: none; font-weight: bold;">
            📄 <?php echo e(app()->getLocale() == 'ar' ? 'عرض المستند' : 'View Document'); ?>

        </a>
    </div>
    <?php endif; ?>

    <div style="padding-top: 1.5rem; border-top: 1px solid #333;">
        <div style="color: #999; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem;"><?php echo e(app()->getLocale() == 'ar' ? 'تم التسجيل بواسطة' : 'Recorded By'); ?></div>
        <div style="color: white; font-size: 0.95rem;"><?php echo e($vehicle_insurance->creator->name ?? '---'); ?> - <?php echo e($vehicle_insurance->created_at->format('Y-m-d H:i')); ?></div>
    </div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\tq cars\resources\views/admin/rentals/insurances/show.blade.php ENDPATH**/ ?>