<!doctype html>
<html lang="es">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@yield('title', 'Veltrix')</title>

    <link rel="icon" type="image/png" href="{{ asset('assets/img/veltrix-favicon.png') }}">
    <link rel="apple-touch-icon" href="{{ asset('assets/img/veltrix-favicon.png') }}">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
    @vite(['resources/scss/app.scss', 'resources/js/app.js'])

    <style>
        .vx-error-shell {
            min-height: 100vh;
            position: relative;
            overflow: hidden;
            background:
                radial-gradient(circle at top left, rgba(26, 181, 213, 0.16), transparent 32%),
                radial-gradient(circle at bottom right, rgba(243, 166, 74, 0.12), transparent 26%),
                linear-gradient(180deg, #15213b 0%, #101827 100%);
            color: #edf4ff;
            font-family: "Poppins", sans-serif;
        }

        .vx-error-shell::before,
        .vx-error-shell::after {
            content: "";
            position: absolute;
            border-radius: 999px;
            filter: blur(8px);
            opacity: .55;
            pointer-events: none;
        }

        .vx-error-shell::before {
            width: 260px;
            height: 260px;
            top: -60px;
            right: -60px;
            background: rgba(26, 181, 213, 0.16);
        }

        .vx-error-shell::after {
            width: 220px;
            height: 220px;
            left: -40px;
            bottom: -40px;
            background: rgba(115, 129, 255, 0.12);
        }

        .vx-error-wrap {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 32px 18px;
        }

        .vx-error-card {
            width: min(100%, 980px);
            border-radius: 28px;
            overflow: hidden;
            background: rgba(12, 20, 38, 0.72);
            border: 1px solid rgba(173, 197, 235, 0.14);
            box-shadow: 0 30px 80px rgba(2, 8, 23, 0.38);
            backdrop-filter: blur(18px);
        }

        .vx-error-topbar {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 20px 24px;
            border-bottom: 1px solid rgba(173, 197, 235, 0.12);
            background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
        }

        .vx-error-brand-dot {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #2ac8e8 0%, #7be7ff 100%);
            box-shadow: 0 10px 24px rgba(26, 181, 213, 0.32);
            overflow: hidden;
            flex-shrink: 0;
        }

        .vx-error-brand-dot img {
            width: 72%;
            height: 72%;
            object-fit: contain;
        }

        .vx-error-brand-copy strong {
            display: block;
            font-size: 1.08rem;
            line-height: 1.1;
            color: #f5f9ff;
        }

        .vx-error-brand-copy span {
            display: block;
            margin-top: 3px;
            font-size: .86rem;
            color: #9db1d4;
        }

        .vx-error-body {
            display: grid;
            grid-template-columns: 1.15fr .85fr;
            gap: 0;
        }

        .vx-error-main {
            padding: 42px 42px 40px;
        }

        .vx-error-side {
            padding: 42px 34px 40px;
            border-left: 1px solid rgba(173, 197, 235, 0.12);
            background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
        }

        .vx-error-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 999px;
            font-size: .82rem;
            font-weight: 600;
            letter-spacing: .02em;
            color: #cff7ff;
            background: rgba(26, 181, 213, 0.12);
            border: 1px solid rgba(83, 223, 251, 0.24);
            margin-bottom: 18px;
        }

        .vx-error-code {
            font-size: clamp(3rem, 8vw, 5.4rem);
            line-height: .95;
            font-weight: 700;
            letter-spacing: -.05em;
            color: #ffffff;
            margin: 0 0 12px;
        }

        .vx-error-title {
            font-size: clamp(1.55rem, 3vw, 2.4rem);
            line-height: 1.08;
            font-weight: 700;
            color: #f5f9ff;
            margin: 0 0 12px;
            max-width: 10ch;
        }

        .vx-error-copy {
            max-width: 54ch;
            font-size: 1rem;
            line-height: 1.7;
            color: #afc0de;
            margin: 0;
        }

        .vx-error-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 30px;
        }

        .vx-error-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 48px;
            padding: 0 18px;
            border-radius: 14px;
            text-decoration: none;
            font-weight: 600;
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
        }

        .vx-error-btn:hover {
            transform: translateY(-1px);
        }

        .vx-error-btn-primary {
            color: #08212a;
            background: linear-gradient(135deg, #29c7e8 0%, #48d8f4 100%);
            box-shadow: 0 14px 26px rgba(26, 181, 213, 0.24);
        }

        .vx-error-btn-secondary {
            color: #eaf3ff;
            border: 1px solid rgba(173, 197, 235, 0.2);
            background: rgba(255,255,255,0.04);
        }

        .vx-error-panel {
            border-radius: 22px;
            padding: 20px 20px 18px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(173, 197, 235, 0.12);
        }

        .vx-error-panel + .vx-error-panel {
            margin-top: 16px;
        }

        .vx-error-panel h2 {
            font-size: .94rem;
            font-weight: 700;
            letter-spacing: .02em;
            color: #f5f9ff;
            margin: 0 0 10px;
        }

        .vx-error-panel p,
        .vx-error-panel li {
            color: #afc0de;
            font-size: .92rem;
            line-height: 1.65;
        }

        .vx-error-panel ul {
            margin: 0;
            padding-left: 1.1rem;
        }

        .vx-error-status {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: .78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .08em;
            color: #89e6f7;
            margin-bottom: 12px;
        }

        .vx-error-status::before {
            content: "";
            width: 9px;
            height: 9px;
            border-radius: 999px;
            background: currentColor;
            box-shadow: 0 0 0 6px rgba(137, 230, 247, 0.12);
        }

        @media (max-width: 900px) {
            .vx-error-body {
                grid-template-columns: 1fr;
            }

            .vx-error-side {
                border-left: 0;
                border-top: 1px solid rgba(173, 197, 235, 0.12);
            }

            .vx-error-main,
            .vx-error-side {
                padding: 28px 22px;
            }
        }
    </style>
</head>
<body class="vx-error-shell">
    <div class="vx-error-wrap">
        <main class="vx-error-card" aria-labelledby="vx-error-title">
            <header class="vx-error-topbar">
                <span class="vx-error-brand-dot">
                    <img src="{{ asset('assets/img/veltrix-logo-vertical-white.png') }}" alt="Veltrix">
                </span>
                <div class="vx-error-brand-copy">
                    <strong>Veltrix</strong>
                    <span>Experiencia guiada incluso cuando algo se bloquea.</span>
                </div>
            </header>

            <section class="vx-error-body">
                <div class="vx-error-main">
                    <span class="vx-error-kicker">@yield('kicker', 'Estado del sistema')</span>
                    <p class="vx-error-code">@yield('code', '000')</p>
                    <h1 class="vx-error-title" id="vx-error-title">@yield('headline', 'Algo necesita atención')</h1>
                    <p class="vx-error-copy">@yield('message')</p>

                    <div class="vx-error-actions">
                        @yield('actions')
                    </div>
                </div>

                <aside class="vx-error-side">
                    <div class="vx-error-panel">
                        <span class="vx-error-status">Veltrix UI</span>
                        <h2>@yield('side_title', 'Qué puedes hacer ahora')</h2>
                        @yield('side_content')
                    </div>

                    <div class="vx-error-panel">
                        <h2>Atajo rápido</h2>
                        <p class="mb-0">
                            Si vienes trabajando dentro del sistema, vuelve al panel principal y retoma tu flujo sin perder contexto.
                        </p>
                    </div>
                </aside>
            </section>
        </main>
    </div>
</body>
</html>
