<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ $title }} — DBErp 安装向导</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            color-scheme: light;
            --blue: #2563eb; --blue-d: #1d4ed8; --blue-dd: #1e40af;
            --red: #dc2626; --red-d: #b91c1c; --red-bg: #fef2f2; --red-br: #fecaca;
            --s50: #f8fafc; --s100: #f1f5f9; --s200: #e2e8f0; --s300: #cbd5e1;
            --s500: #64748b; --s600: #475569; --s700: #334155; --s800: #1e293b; --s900: #0f172a;
        }
        body {
            font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
            background: #eef2ff;
            color: var(--s900);
            line-height: 1.65;
            min-height: 100vh;
            padding: 0 0 2rem;
        }
        .install-error-main {
            max-width: 40rem;
            margin: 0 auto;
            padding: 0 1.25rem;
        }
        .card {
            max-width: 36rem;
            margin: 2rem auto 0;
            background: #fff;
            border: 1px solid var(--s200);
            border-radius: 1rem;
            padding: 1.75rem 1.5rem;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,.06);
        }
        h1 { font-size: 1.25rem; font-weight: 700; color: var(--red-d); margin-bottom: .75rem; }
        .status { font-size: .8125rem; color: var(--s500); margin-bottom: 1rem; }
        .msg { font-size: .9375rem; color: var(--s700); margin-bottom: 1.25rem; }
        details {
            border: 1px solid var(--s200);
            border-radius: .5rem;
            padding: .75rem 1rem;
            background: var(--s50);
            margin-bottom: 1rem;
        }
        summary { cursor: pointer; font-weight: 600; font-size: .875rem; color: var(--s700); }
        dl { margin-top: .75rem; font-size: .8125rem; }
        dt { color: var(--s500); margin-top: .5rem; }
        dt:first-child { margin-top: 0; }
        dd { color: var(--s800); font-family: ui-monospace, Menlo, monospace; margin: .15rem 0 0 0; }
        pre.debug {
            font-size: .75rem;
            background: var(--s900);
            color: #e2e8f0;
            padding: 1rem;
            border-radius: .5rem;
            overflow: auto;
            max-height: 14rem;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .actions { margin-top: 1.25rem; }
        .actions a {
            display: inline-flex;
            align-items: center;
            font-size: .875rem;
            font-weight: 600;
            color: var(--blue);
            text-decoration: none;
        }
        .actions a:hover { text-decoration: underline; color: var(--blue-d); }
    </style>
</head>
<body>
@include('install.partials.install-wizard-header')
<div class="install-error-main">
<div class="card">
    <h1>{{ $title }}</h1>
    @if (! empty($httpStatus))
        <p class="status">HTTP {{ $httpStatus }}</p>
    @endif
    <p class="msg">{{ $message }}</p>

    <details>
        <summary>软件版本信息（供技术支持核对）</summary>
        <dl>
            @foreach ($dberpProductVersion->diagnosticsRowsForInstaller() as $row)
                <dt>{{ $row['label'] }}</dt>
                <dd>{{ $row['value'] }}</dd>
            @endforeach
        </dl>
    </details>

    @if (! empty($showDebugDetails) && $exception instanceof \Throwable)
        <pre class="debug" role="region" aria-label="调试信息">{{ get_class($exception) }}

{{ $exception->getFile() }}:{{ $exception->getLine() }}</pre>
    @endif

    <div class="actions">
        <a href="{{ url('/install') }}">返回安装向导首页</a>
    </div>
</div>
</div>
</body>
</html>
