<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>تفاصيل التصريح الأمني</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --success-color: #28a745;
            --light-color: #f8f9fa;
            --dark-color: #343a40;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #dfe6f0 100%);
            min-height: 100vh;
            font-family: 'Tajawal', sans-serif;
        }

        .permit-card {
            border: none;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            background: rgba(255, 255, 255, 0.97);
            transition: all 0.3s ease;
        }

        .permit-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        }

        .permit-header {
            background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
            color: white;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }

        .permit-header::after {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><text x="10" y="50" font-family="Arial" font-size="20" fill="white">SECURITY</text></svg>');
            opacity: 0.1;
        }

        .permit-title {
            font-weight: 700;
            margin-bottom: 0;
            position: relative;
            z-index: 1;
        }

        .permit-status {
            position: absolute;
            top: 15px;
            left: 15px;
            background: <?php echo e($permit->status->name == 'نشط' ? '#28a745' : '#dc3545'); ?>;
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: bold;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            z-index: 1;
        }

        .permit-body {
            padding: 30px;
        }

        .detail-item {
            display: flex;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px dashed #eee;
        }

        .detail-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .detail-icon {
            width: 40px;
            height: 40px;
            background: var(--light-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 15px;
            color: var(--secondary-color);
            font-size: 18px;
            flex-shrink: 0;
        }

        .detail-content {
            flex-grow: 1;
        }

        .detail-label {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 3px;
            font-size: 15px;
        }

        .detail-value {
            color: var(--dark-color);
            font-size: 16px;
        }

        .btn-submit {
            background-color: var(--success-color);
            border-color: var(--success-color);
            padding: 12px 30px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 18px;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
        }

        .btn-submit:hover {
            background-color: #218838;
            border-color: #1e7e34;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
        }

        .btn-submit:active {
            transform: translateY(0);
        }

        .permit-qr {
            text-align: center;
            margin: 20px 0;
            padding: 20px;
            background: var(--light-color);
            border-radius: 10px;
            border: 2px dashed #ddd;
        }

        .permit-qr img {
            max-width: 200px;
            margin: 0 auto;
        }

        .security-stamp {
            position: absolute;
            bottom: 20px;
            left: 20px;
            opacity: 0.1;
            font-size: 80px;
            transform: rotate(-15deg);
            color: var(--secondary-color);
            z-index: 0;
        }

        @media (max-width: 576px) {
            .permit-body {
                padding: 20px;
            }

            .detail-item {
                flex-direction: column;
            }

            .detail-icon {
                margin-left: 0;
                margin-bottom: 10px;
            }
        }
    </style>
</head>
<body>
    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <div class="permit-card animate__animated animate__fadeInUp">
                    <div class="permit-header text-center">
                        <div class="permit-status animate__animated animate__pulse">
                            <?php echo e($permit->status->name); ?>

                        </div>
                        <h3 class="permit-title">
                            <i class="fas fa-id-card-alt me-2"></i> تفاصيل التصريح الأمني
                        </h3>
                        <div class="security-stamp">
                            <i class="fas fa-shield-alt"></i>
                        </div>
                    </div>

                    <div class="permit-body">
                           <div class="detail-item">
    <div class="detail-icon">
        <i class="fas fa-barcode"></i>
    </div>
    <div class="detail-content">
        <div class="detail-label">رقم التصريح</div>
        <div class="detail-value"><?php echo e($permit->permit_number ?? '---'); ?></div>
    </div>
      <div class="detail-icon">
                                <i class="fas fa-tag"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">نوع التصريح</div>
                                <div class="detail-value"><?php echo e($permit->type->name ?? '---'); ?></div>
                            </div>
</div>
                        <div class="detail-item">
                            <div class="detail-icon">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">الاسم الكامل</div>
                                <div class="detail-value"><?php echo e($permit->full_name); ?></div>
                            </div>


                        </div>
   <div class="detail-item">
                            <div class="detail-icon">
                                <i class="fas fa-globe"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">الجنسية</div>
                                <div class="detail-value"><?php echo e($permit->nationality); ?></div>
                            </div>

                            <div class="detail-icon">
                                <i class="fas fa-id-card"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">الرقم الوطني / الجواز</div>
                                <div class="detail-value"><?php echo e($permit->national_id); ?></div>
                            </div>
                        </div>



                        <div class="detail-item">
                            <div class="detail-icon">
                                <i class="fas fa-building"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">الجهة</div>
                                <div class="detail-value"><?php echo e($permit->organization); ?></div>
                            </div>

                            <div class="detail-icon">
                                <i class="fas fa-bullseye"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">الغرض</div>
                                <div class="detail-value"><?php echo e($permit->purpose); ?></div>
                            </div>
                        </div>



                        <div class="detail-item">
                            <div class="detail-icon">
                                <i class="fas fa-sign-in-alt"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">تاريخ الابتداء</div>
                                <div class="detail-value"><?php echo e($permit->entry_time); ?></div>
                            </div>

                            <div class="detail-icon">
                                <i class="fas fa-sign-out-alt"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">تاريخ الانتهاء</div>
                                <div class="detail-value"><?php echo e($permit->exit_time); ?></div>
                            </div>
                        </div>
                             <div class="detail-item">
                            <div class="detail-icon">
                                <i class="fas fa-map-marked-alt"></i>
                            </div>
                            <div class="detail-content">
                                <div class="detail-label">المناطق المصرح بها</div>
                                <div class="detail-value"><?php echo e($permit->authorized_areas->name ?? '---'); ?></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="text-center mt-4 animate__animated animate__fadeInUp animate__delay-1s">
                    <form method="POST" action="<?php echo e(route('gate.entry.log')); ?>">
                        <?php echo csrf_field(); ?>
                        <input type="hidden" name="permit_id" value="<?php echo e($permit->id); ?>">
                        <button type="submit" class="btn btn-submit">
                            <i class="fas fa-door-open me-2"></i> تسجيل الدخول
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
</body>
</html>
<?php /**PATH C:\xampp_new\htdocs\permits\resources\views/index.blade.php ENDPATH**/ ?>