@extends('layouts.app')

@section('title', 'Tenant Branding & White Label')

@section('content')
<div class="max-w-3xl mx-auto space-y-6">
    <div>
        <h1 class="text-xl font-bold text-slate-900 dark:text-white">Tenant Branding & White Label</h1>
        <p class="text-xs text-slate-500">Configure logo, brand colors, dark mode logo, and white-label custom domain settings.</p>
    </div>

    <!-- Branding Form (Requirements 56-58) -->
    <div class="bg-white dark:bg-slate-800 rounded-3xl p-6 border border-slate-200 dark:border-slate-700/60 shadow-sm space-y-6 text-xs">
        <div class="space-y-4">
            <h3 class="font-bold text-slate-900 dark:text-white uppercase tracking-wider text-xs border-b border-slate-100 dark:border-slate-700 pb-2">Tenant Logos & Colors</h3>

            <div class="grid grid-cols-2 gap-4">
                <div>
                    <label class="block font-semibold mb-1">Primary Brand Color</label>
                    <div class="flex items-center space-x-2 rtl:space-x-reverse">
                        <input type="color" name="primary_color" value="{{ $branding->primary_color ?? '#0284c7' }}" class="w-10 h-10 rounded-xl cursor-pointer">
                        <span class="font-mono text-slate-700 dark:text-slate-300 font-bold">{{ $branding->primary_color ?? '#0284c7' }}</span>
                    </div>
                </div>

                <div>
                    <label class="block font-semibold mb-1">Secondary Brand Color</label>
                    <div class="flex items-center space-x-2 rtl:space-x-reverse">
                        <input type="color" name="secondary_color" value="{{ $branding->secondary_color ?? '#0f172a' }}" class="w-10 h-10 rounded-xl cursor-pointer">
                        <span class="font-mono text-slate-700 dark:text-slate-300 font-bold">{{ $branding->secondary_color ?? '#0f172a' }}</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- White-Label Custom Domain Section (Requirements 57-58) -->
        <div class="space-y-4 pt-2 border-t border-slate-100 dark:border-slate-700">
            <div class="flex items-center justify-between">
                <h3 class="font-bold text-slate-900 dark:text-white uppercase tracking-wider text-xs">White-Label Custom Domain</h3>
                <span class="px-2.5 py-0.5 rounded-full bg-emerald-100 text-emerald-800 font-bold text-[10px]">Entitlement Active</span>
            </div>

            <div>
                <label class="block font-semibold mb-1">Custom Domain (CNAME Alias)</label>
                <input type="text" name="custom_domain" value="{{ $branding->custom_domain }}" placeholder="portal.almadinatyping.ae" class="w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-300 dark:border-slate-700 rounded-xl font-mono text-sky-600 font-bold">
                <span class="text-[10px] text-slate-400 mt-1 block">Point CNAME record to <code>cname.typingcenter.ae</code></span>
            </div>
        </div>
    </div>
</div>
@endsection
