<!DOCTYPE html>
<html lang="{{ 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>@yield('title', 'Prisijungti') — {{ config('cms.name', 'Protera') }}</title>

    {{-- SystemFindings/task-16d — Bootstrap, bootstrap-icons and Google Fonts
         Manrope used to be five tags here, copied from the web layout. All three
         now @import into web.css, which @cmsAssets('css') below emits for `web.*`
         — and `web.*auth.*` matches that glob, so this shell inherits them with
         no tags of its own. Nothing on the public login/register page reaches a
         third party any more, which matters most on exactly these two screens:
         they and va-core/auth's login are what a deployment shows strangers. --}}

    {{-- Web theme CSS bundle — same variables + base styles as the public pages.
         task-116b: served from the va-themes/protera package via @cmsAssets() (the
         provider declares web.css/web.js for the `web.*` route pattern, which the
         auth routes — web.auth.* — match). Replaces the old
         @vite(['themes/Web/Protera/Resources/assets/...']) block. --}}
    @cmsAssets('css')

    {{-- SystemFindings/task-15 — the auth shell's rules moved to this theme's
         Resources/assets/css/auth.css and are declared in
         ThemeServiceProvider::assets() against `web.*auth.*` at tier `module`.

         Tier matters here: web.css above is tier `script` (1), this is tier
         `module` (2), and AssetRegistry emits 1 before 2 — which is the order
         the inline block had, sitting after @cmsAssets('css'). Merging into
         web.css was not an option either way: this sheet restyles bare
         `body`. --}}

    @stack('styles')
</head>
<body>

    <div class="auth-wrap">
        <div class="auth-card">
            {{-- Brand --}}
            <a href="/" class="logo">
                <span class="logo-mark">P</span>
                <span>PadanguParduotuvė<span class="dim">.lt</span></span>
            </a>

            @yield('content')
        </div>
    </div>

    <div class="auth-footer">
        <a href="/privatumo-politika">Privatumo politika</a>
        <a href="/slapukai">Slapukai</a>
        <a href="/kontaktai">Pagalba</a>
    </div>

    <script>
        window.Viartas = {
            locale: '{{ app()->getLocale() }}',
            csrfToken: '{{ csrf_token() }}',
        };
    </script>

    {{-- task-116b: Protera theme JS (web.js) via @cmsAssets() — replaces the JS half
         of the old @vite() block in <head>. --}}
    @cmsAssets('js')

    @stack('scripts')
</body>
</html>
