@extends('shop.layout')
@section('title', __('portal.shop.login'))
@section('content')

<div style="max-width:380px;margin:0 auto;">
    <h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.signin_title') }}</h1>

    @if ($errors->any())
        <div class="card" style="border-color:#fca5a5;background:#fef2f2;margin-bottom:14px;">
            <ul style="margin:0;padding-left:18px;color:#991b1b;font-size:14px;">
                @foreach ($errors->all() as $e)<li>{{ $e }}</li>@endforeach
            </ul>
        </div>
    @endif

    <form method="POST" action="/shop/login" class="card">
        @csrf
        <div class="field"><label>{{ __('portal.shop.phone_req') }}</label>
            <input type="text" name="phone" value="{{ old('phone') }}" required placeholder="+373…">
        </div>
        <div class="field"><label>{{ __('portal.common.password') }} *</label>
            <input type="password" name="password" required>
        </div>
        <button type="submit" class="btn block">{{ __('portal.shop.signin_button') }}</button>
    </form>

    <p class="muted" style="text-align:center;margin-top:12px;">
        <a href="/shop/password/forgot" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.forgot_password') }}</a>
        · {{ __('portal.shop.no_account') }} <a href="/shop/register" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.register') }}</a>
    </p>
    @if (session('status'))
        <div class="card" style="border-color:#bbf7d0;background:#f0fdf4;margin-top:14px;color:#166534;font-size:14px;text-align:center;">
            {{ session('status') }}
        </div>
    @endif
</div>
@endsection
