<?php if (isset($component)) { $__componentOriginale0f1cdd055772eb1d4a99981c240763e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0f1cdd055772eb1d4a99981c240763e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin-layout','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex items-center justify-between">
            <div class="flex items-center gap-4">
                <a href="<?php echo e(route('dashboard')); ?>"
                    class="group flex items-center justify-center w-10 h-10 bg-white rounded-xl border border-slate-200 text-slate-400 hover:text-indigo-600 hover:border-indigo-200 transition-all shadow-sm">
                    <svg class="w-5 h-5 transition-transform group-hover:-translate-x-0.5" fill="none"
                        stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                            d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
                    </svg>
                </a>
                <div>
                    <h2 class="font-bold text-2xl text-slate-800 leading-tight flex items-center gap-3">
                        <?php echo e($tenant->firm_name); ?>

                        <?php if($tenant->subscription_status === 'active'): ?>
                            <span
                                class="inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-bold bg-emerald-100 text-emerald-700 border border-emerald-200">
                                <span class="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"></span>
                                Live
                            </span>
                        <?php else: ?>
                            <span
                                class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-bold bg-rose-100 text-rose-700 border border-rose-200">
                                Suspended
                            </span>
                        <?php endif; ?>
                    </h2>
                    <div class="flex items-center gap-3 text-xs font-medium text-slate-500 mt-1">
                        <span
                            class="font-mono bg-slate-100 px-2 py-0.5 rounded border border-slate-200 text-slate-600 select-all"><?php echo e($tenant->id); ?></span>
                        <span>•</span>
                        <span>Created <?php echo e($tenant->created_at->diffForHumans()); ?></span>
                    </div>
                </div>
            </div>

            <a href="<?php echo e(route('landlord.tenants.edit', $tenant->id)); ?>"
                class="flex items-center gap-2 px-4 py-2 bg-white border border-slate-200 rounded-lg text-sm font-bold text-slate-700 hover:bg-slate-50 hover:text-indigo-600 transition shadow-sm">
                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                        d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z">
                    </path>
                </svg>
                Edit Details
            </a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-10 bg-slate-50/50 min-h-screen">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">

            <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">

                <div class="space-y-6">

                    <div class="bg-white rounded-2xl shadow-sm border border-slate-200 overflow-hidden">
                        <div class="h-24 bg-gradient-to-r from-indigo-500 to-purple-600 relative">
                            <div class="absolute -bottom-10 left-6">
                                <div class="h-20 w-20 bg-white rounded-2xl p-1 shadow-lg">
                                    <div
                                        class="h-full w-full bg-slate-50 rounded-xl flex items-center justify-center text-3xl font-black text-indigo-600 border border-slate-100">
                                        <?php echo e(substr($tenant->firm_name, 0, 1)); ?>

                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="pt-12 px-6 pb-6">
                            <h3 class="font-bold text-lg text-slate-900"><?php echo e($tenant->firm_name); ?></h3>
                            <p class="text-sm text-slate-500 mb-6 flex items-center gap-2">
                                <svg class="w-4 h-4 text-slate-400" fill="none" stroke="currentColor"
                                    viewBox="0 0 24 24">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z">
                                    </path>
                                </svg>
                                <a href="mailto:<?php echo e($tenant->email); ?>"
                                    class="hover:text-indigo-600 hover:underline transition"><?php echo e($tenant->email); ?></a>
                            </p>

                            <div class="space-y-3 pt-4 border-t border-slate-50">
                                <div class="flex justify-between items-center group">
                                    <span
                                        class="text-xs font-bold text-slate-400 uppercase tracking-wider">Domain</span>
                                    <a href="http://<?php echo e($tenant->domains->first()->domain); ?>" target="_blank"
                                        class="text-sm font-bold text-indigo-600 hover:text-indigo-700 flex items-center gap-1 bg-indigo-50 px-2 py-1 rounded-md transition">
                                        <?php echo e($tenant->domains->first()->domain); ?>

                                        <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                                d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14">
                                            </path>
                                        </svg>
                                    </a>
                                </div>
                                <div class="flex justify-between items-center">
                                    <span class="text-xs font-bold text-slate-400 uppercase tracking-wider">KRA
                                        PIN</span>
                                    <span
                                        class="text-sm font-bold text-slate-700 font-mono"><?php echo e($tenant->kra_pin ?? 'N/A'); ?></span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div
                        class="bg-slate-900 rounded-2xl p-6 text-white shadow-xl shadow-indigo-900/10 relative overflow-hidden group">
                        <div
                            class="absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-20 transition transform group-hover:scale-110 duration-500">
                            <svg class="w-32 h-32" fill="currentColor" viewBox="0 0 20 20">
                                <path
                                    d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 100 2h1z"
                                    fill-rule="evenodd" clip-rule="evenodd"></path>
                            </svg>
                        </div>

                        <h4 class="text-xs font-bold text-indigo-200 uppercase tracking-widest mb-1">Current Plan</h4>
                        <div class="flex justify-between items-end mb-4">
                            <span class="text-3xl font-black capitalize"><?php echo e($tenant->plan ?? 'Premium'); ?></span>
                            <?php if($tenant->plan === 'enterprise'): ?>
                                <span
                                    class="px-2 py-1 rounded bg-amber-400 text-amber-900 text-xs font-bold uppercase">Corp</span>
                            <?php else: ?>
                                <span
                                    class="px-2 py-1 rounded bg-indigo-500 text-white text-xs font-bold uppercase">Std</span>
                            <?php endif; ?>
                        </div>
                        <p class="text-xs text-indigo-200/80 mb-6">
                            Next billing date: <span
                                class="text-white font-bold"><?php echo e(now()->addMonth()->format('M d, Y')); ?></span>
                        </p>
                        <button
                            class="w-full py-2.5 bg-white/10 hover:bg-white/20 border border-white/10 rounded-xl text-xs font-bold transition flex items-center justify-center gap-2">
                            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                    d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z">
                                </path>
                            </svg>
                            View Billing History
                        </button>
                    </div>
                </div>

                <div class="lg:col-span-2 space-y-6">

                    <div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-1 overflow-hidden">
                        <div class="grid grid-cols-2 md:grid-cols-4 divide-x divide-slate-100">
                            <div class="p-5">
                                <p class="text-[10px] font-bold text-slate-400 uppercase mb-1 flex items-center gap-1">
                                    <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4">
                                        </path>
                                    </svg>
                                    Database
                                </p>
                                <p class="text-sm font-bold text-slate-700 font-mono truncate"
                                    title="tenant_<?php echo e($tenant->id); ?>">tenant_<?php echo e($tenant->id); ?></p>
                            </div>
                            <div class="p-5">
                                <p class="text-[10px] font-bold text-slate-400 uppercase mb-1 flex items-center gap-1">
                                    <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z">
                                        </path>
                                    </svg>
                                    Storage
                                </p>
                                <p class="text-sm font-bold text-slate-700">S3 / Wasabi</p>
                            </div>
                            <div class="p-5">
                                <p class="text-[10px] font-bold text-slate-400 uppercase mb-1 flex items-center gap-1">
                                    <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z">
                                        </path>
                                    </svg>
                                    Region
                                </p>
                                <p class="text-sm font-bold text-slate-700 flex items-center gap-1">
                                    <span class="w-2 h-2 rounded-full bg-green-500"></span> af-south-1
                                </p>
                            </div>
                            <div class="p-5">
                                <p class="text-[10px] font-bold text-slate-400 uppercase mb-1 flex items-center gap-1">
                                    <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z">
                                        </path>
                                    </svg>
                                    Security
                                </p>
                                <p class="text-sm font-bold text-emerald-600">Encrypted</p>
                            </div>
                        </div>
                    </div>

                    <h4 class="text-sm font-bold text-slate-800 uppercase tracking-widest pl-1">Administrative Actions
                    </h4>

                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4">

                        <form action="<?php echo e(route('landlord.tenants.impersonate', $tenant->id)); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <button type="submit"
                                class="w-full h-full p-5 bg-white border border-slate-200 rounded-xl hover:border-indigo-300 hover:ring-1 hover:ring-indigo-300 hover:shadow-md transition text-left group">
                                <div class="flex items-start justify-between mb-2">
                                    <div
                                        class="p-2 bg-indigo-50 rounded-lg text-indigo-600 group-hover:bg-indigo-600 group-hover:text-white transition">
                                        <svg class="w-6 h-6" fill="none" stroke="currentColor"
                                            viewBox="0 0 24 24">
                                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                                d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1">
                                            </path>
                                        </svg>
                                    </div>
                                    <span
                                        class="text-[10px] font-bold bg-slate-100 text-slate-500 px-2 py-0.5 rounded">SUDO</span>
                                </div>
                                <h5 class="font-bold text-slate-800 group-hover:text-indigo-700">Impersonate Admin</h5>
                                <p class="text-xs text-slate-500 mt-1">Log into the portal as <?php echo e($tenant->email); ?>.
                                </p>
                            </button>
                        </form>

                        <form action="<?php echo e(route('landlord.tenants.toggle-status', $tenant->id)); ?>" method="POST"
                            class="h-full">
                            <?php echo csrf_field(); ?>
                            <button type="submit"
                                class="w-full h-full p-5 bg-white border border-slate-200 rounded-xl transition text-left group <?php echo e($tenant->subscription_status === 'active' ? 'hover:border-amber-300 hover:ring-1 hover:ring-amber-300' : 'hover:border-emerald-300 hover:ring-1 hover:ring-emerald-300'); ?>">

                                <div class="flex items-start justify-between mb-2">
                                    <?php if($tenant->subscription_status === 'active'): ?>
                                        <div
                                            class="p-2 bg-amber-50 rounded-lg text-amber-600 group-hover:bg-amber-500 group-hover:text-white transition">
                                            <svg class="w-6 h-6" fill="none" stroke="currentColor"
                                                viewBox="0 0 24 24">
                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                                    d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z">
                                                </path>
                                            </svg>
                                        </div>
                                        <span
                                            class="text-[10px] font-bold bg-amber-100 text-amber-700 px-2 py-0.5 rounded uppercase">Active</span>
                                    <?php else: ?>
                                        <div
                                            class="p-2 bg-emerald-50 rounded-lg text-emerald-600 group-hover:bg-emerald-500 group-hover:text-white transition">
                                            <svg class="w-6 h-6" fill="none" stroke="currentColor"
                                                viewBox="0 0 24 24">
                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                                    d="M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z">
                                                </path>
                                            </svg>
                                        </div>
                                        <span
                                            class="text-[10px] font-bold bg-emerald-100 text-emerald-700 px-2 py-0.5 rounded uppercase">Suspended</span>
                                    <?php endif; ?>
                                </div>

                                <h5
                                    class="font-bold text-slate-800 <?php echo e($tenant->subscription_status === 'active' ? 'group-hover:text-amber-700' : 'group-hover:text-emerald-700'); ?>">
                                    <?php echo e($tenant->subscription_status === 'active' ? 'Suspend Access' : 'Restore Access'); ?>

                                </h5>

                                <p class="text-xs text-slate-500 mt-1">
                                    <?php echo e($tenant->subscription_status === 'active'
                                        ? 'Immediately block all login attempts for this workspace.'
                                        : 'Re-enable login and dashboard access for all firm users.'); ?>

                                </p>
                            </button>
                        </form>

                        <button
                            class="w-full p-5 bg-white border border-slate-200 rounded-xl hover:border-slate-400 hover:shadow-md transition text-left group">
                            <div class="flex items-start justify-between mb-2">
                                <div
                                    class="p-2 bg-slate-100 rounded-lg text-slate-600 group-hover:bg-slate-700 group-hover:text-white transition">
                                    <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M19.428 15.428a2 2 0 00-1.022-.547l-2.384-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z">
                                        </path>
                                    </svg>
                                </div>
                            </div>
                            <h5 class="font-bold text-slate-800">Maintenance Mode</h5>
                            <p class="text-xs text-slate-500 mt-1">Display "Under Maintenance" page.</p>
                        </button>

                        <button
                            class="w-full p-5 bg-white border border-slate-200 rounded-xl hover:border-rose-300 hover:ring-1 hover:ring-rose-300 hover:bg-rose-50 transition text-left group">
                            <div class="flex items-start justify-between mb-2">
                                <div
                                    class="p-2 bg-rose-50 rounded-lg text-rose-500 group-hover:bg-rose-600 group-hover:text-white transition">
                                    <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                            d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16">
                                        </path>
                                    </svg>
                                </div>
                            </div>
                            <h5 class="font-bold text-slate-800 group-hover:text-rose-700">Delete Tenant</h5>
                            <p class="text-xs text-slate-500 mt-1">Permanently drop DB and files.</p>
                        </button>

                    </div>
                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $attributes = $__attributesOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $component = $__componentOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__componentOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php /**PATH /Users/yousaf/Documents/GitHub/law-firm-project/resources/views/landlord/tenants/show.blade.php ENDPATH**/ ?>