<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ __('auth.sign_in') }} - {{ config('app.name', 'Viartas Admin') }}</title>

    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">

    <!-- Bootstrap 5 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">

    @vite('resources/css/login.css', 'vendor/viartas-themes/viartas-theme')
</head>
<body>

<div class="login-wrapper">
    <!-- Left Side - Branding -->
    <div class="login-branding">
        <div class="branding-content">
            <div class="brand-logo">
                <img src="{{ theme()->publicPath('images/logos/logotipas_white_2.png') }}" />
            </div>

            <h1 class="branding-title">{{ __('auth.welcome_to') }}<br>{{ __('auth.admin_dashboard') }}</h1>
            <p class="branding-subtitle">{{ __('auth.branding_subtitle') }}</p>

            <div class="branding-features">
                <div class="feature-item">
                    <div class="feature-icon">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <div class="feature-text">
                        <h4>{{ __('auth.feature_secure_title') }}</h4>
                        <p>{{ __('auth.feature_secure_desc') }}</p>
                    </div>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">
                        <i class="fas fa-bolt"></i>
                    </div>
                    <div class="feature-text">
                        <h4>{{ __('auth.feature_fast_title') }}</h4>
                        <p>{{ __('auth.feature_fast_desc') }}</p>
                    </div>
                </div>
                <div class="feature-item">
                    <div class="feature-icon">
                        <i class="fas fa-headset"></i>
                    </div>
                    <div class="feature-text">
                        <h4>{{ __('auth.feature_support_title') }}</h4>
                        <p>{{ __('auth.feature_support_desc') }}</p>
                    </div>
                </div>
            </div>
        </div>

        <div class="branding-footer">
            <p>&copy; {{ date('Y') }} Viartas. {{ __('globals.all_rights_reserved') }}</p>
        </div>
    </div>

    <!-- Right Side - Login Form -->
    <div class="login-form-wrapper">
        <div class="login-form-container">
            <!-- Mobile Logo -->
            <div class="mobile-logo">
                <img src="{{ theme()->publicPath('images/logos/logotipas_black.png') }}" />
            </div>

            <div class="login-header">
                <h2>{{ __('auth.sign_in') }}</h2>
                <p>{{ __('auth.sign_in_subtitle') }}</p>
            </div>

            <div class="divider">
                <span>{{ __('auth.with_email') }}</span>
            </div>

            <!-- Login Form -->
            <form class="login-form" method="POST" action="{{ route('accounting.login.index') }}">
                @csrf

                <div class="form-group">
                    <label class="form-label" for="email">{{ __('globals.email') }}</label>
                    <div class="input-wrapper">
                        <i class="fas fa-envelope"></i>
                        <input type="email"
                               class="form-input @error('email') is-invalid @enderror"
                               id="email"
                               name="email"
                               value="{{ old('email') }}"
                               placeholder="{{ __('auth.enter_email') }}"
                               required
                               autocomplete="email"
                               autofocus>
                    </div>
                    @error('email')
                    <div class="invalid-feedback">
                        <strong>{{ $message }}</strong>
                    </div>
                    @enderror
                </div>

                <div class="form-group">
                    <div class="label-row">
                        <label class="form-label" for="password">{{ __('globals.password') }}</label>
                        @if (Route::has('password.request'))
                            <a href="{{ route('password.request') }}" class="forgot-link">
                                {{ __('auth.forgot_password') }}
                            </a>
                        @endif
                    </div>
                    <div class="input-wrapper">
                        <i class="fas fa-lock"></i>
                        <input type="password"
                               class="form-input @error('password') is-invalid @enderror"
                               id="password"
                               name="password"
                               placeholder="{{ __('auth.enter_password') }}"
                               required
                               autocomplete="current-password">
                    </div>
                    @error('password')
                    <div class="invalid-feedback">
                        <strong>{{ $message }}</strong>
                    </div>
                    @enderror
                </div>

                <div class="form-group">
                    <label class="checkbox-wrapper">
                        <input type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
                        <span class="checkmark"></span>
                        <span class="checkbox-label">{{ __('auth.remember_me') }}</span>
                    </label>
                </div>

                <button type="submit" class="btn-login">
                    <span>{{ __('auth.sign_in') }}</span>
                    <i class="fas fa-arrow-right"></i>
                </button>
            </form>

            @if (Route::has('register'))
                <div class="login-footer">
                    <p>{{ __('auth.no_account') }} <a href="{{ route('register') }}">{{ __('auth.create_account') }}</a></p>
                </div>
            @endif
        </div>
    </div>
</div>

</body>
</html>
