@extends('layouts.aura-main')

@section('main-content')
<div class="max-w-2xl mx-auto pb-20">
    <div class="mb-8 border-b border-slate-200 pb-4">
        <h1 class="text-2xl font-black text-slate-900  tracking-tighter">Initialize Physical Count</h1>
        <p class="text-[10px] font-bold text-slate-400  tracking-widest mt-1">Snapshot system stock levels to start a reconciliation</p>
    </div>

    <form action="{{ route('inventory.counts.store') }}" method="POST" class="bg-white border border-slate-300 p-8 rounded-sm shadow-sm">
        @csrf
        <div class="space-y-6">
            <div>
                <label class="block text-[10px] font-black text-slate-500  mb-2 tracking-widest">Target Warehouse</label>
                <select name="warehouse_id" required class="w-full border-slate-300 text-sm font-bold rounded-sm focus:ring-0 focus:border-indigo-600">
                    <option value="">Select location to count...</option>
                    @foreach($warehouses as $wh)
                        <option value="{{ $wh->id }}">{{ $wh->name }} ({{ $wh->code }})</option>
                    @endforeach
                </select>
            </div>

            <div>
                <label class="block text-[10px] font-black text-slate-500  mb-2 tracking-widest">Count Date</label>
                <input type="date" name="count_date" value="{{ date('Y-m-d') }}" required
                       class="w-full border-slate-300 text-sm font-bold rounded-sm focus:ring-0 focus:border-indigo-600 ">
            </div>

            <div class="p-4 bg-slate-50 border border-slate-200 rounded-sm">
                <p class="text-[10px] text-slate-500 leading-relaxed font-medium">
                    <strong class="text-slate-900 ">Note:</strong> Initializing will capture the current "Quantity on Hand" for all items in this warehouse. Ensure all pending Sales Receipts and Bills are posted before starting.
                </p>
            </div>

            <div class="pt-6 border-t border-slate-100 flex justify-end">
                <button type="submit" class="bg-slate-900 text-white px-10 py-3 text-[11px] font-black  tracking-widest shadow-xl hover:bg-indigo-600 transition-all">
                    Generate Count Sheet
                </button>
            </div>
        </div>
    </form>
</div>
@endsection