@extends('layout.auth')

@section('title', 'Masuk Ke Akun')

@section('content')
<div class="auth-visual-side">
    <div class="visual-logo-box">
        <a href="/" style="text-decoration:none; display:flex; align-items:center; gap:15px;">
            <img src="{{ asset('assets/img/logo-pro.png') }}" alt="Logo" style="width:40px; height:40px; border-radius:10px;">
            <span style="color:white; font-weight:900; font-size:1.2rem; letter-spacing:-1px;">{{ $shop_settings['shop_name'] ?? 'PrintPro' }}</span>
        </a>
    </div>

    <div class="visual-content">
        <div class="visual-badge">Verified Service Center</div>
        <h2>Solusi Printer<br>Tanpa Batas.</h2>
        <p>Masuk untuk memantau status perbaikan, riwayat belanja, dan layanan prioritas kami.</p>
    </div>

    <div class="visual-footer" style="position:relative; z-index:2; font-size:12px; color:rgba(255,255,255,0.4); font-weight:600;">
        &copy; {{ date('Y') }} {{ $shop_settings['shop_name'] ?? 'PrintPro' }} &bull; Enterprise Secure
    </div>
</div>

<div class="auth-form-side">
    <div class="form-header">
        <h1>Selamat Datang</h1>
        <p>Silakan masuk ke akun member Anda</p>
    </div>

    <form action="{{ route('login') }}" method="POST">
        @csrf
        
        <div class="input-group-pro">
            <label class="label-pro">Alamat Email</label>
            <div class="input-box">
                <i class="lni lni-envelope"></i>
                <input type="email" name="email" class="control-pro @error('email') is-invalid @enderror" 
                    placeholder="nama@email.com" value="{{ old('email') }}" required autofocus>
                @error('email')
                    <div class="invalid-feedback">{{ $message }}</div>
                @enderror
            </div>
        </div>

        <div class="input-group-pro">
            <div class="d-flex justify-content-between align-items-center mb-1">
                <label class="label-pro mb-0">Kata Sandi</label>
                <a href="{{ route('password.request') }}" class="auth-link" style="font-size: 0.75rem;">Lupa Sandi?</a>
            </div>
            <div class="input-box">
                <i class="lni lni-lock-alt"></i>
                <input type="password" name="password" class="control-pro" 
                    placeholder="••••••••" required>
                <i class="lni lni-eye pass-toggle"></i>
            </div>
        </div>

        <div class="auth-extra">
            <label class="custom-check">
                <input type="checkbox" name="remember" id="remember">
                <div class="check-box"></div>
                <span class="check-label">Ingat Saya</span>
            </label>
        </div>

        <button type="submit" class="btn-pro">
            Masuk Sekarang <i class="lni lni-arrow-right"></i>
        </button>

        <div style="margin: 25px 0; display: flex; align-items: center; gap: 15px;">
            <div style="flex:1; height:1px; background:rgba(0,0,0,0.05);"></div>
            <span style="font-size:12px; color:#94a3b8; font-weight:700;">ATAU</span>
            <div style="flex:1; height:1px; background:rgba(0,0,0,0.05);"></div>
        </div>

        <button type="button" class="btn-pro" style="background:#fff; color:#0f172a; border:1px solid rgba(0,0,0,0.08); box-shadow:none; margin-top:0;">
            <img src="https://www.svgrepo.com/show/355037/google.svg" alt="Google" style="width:18px;">
            <span>Masuk via Google</span>
        </button>
    </form>

    <p class="auth-footer">
        Belum punya akun? 
        <a href="{{ route('register') }}" class="auth-link">Daftar Member</a>
    </p>
</div>
@endsection