<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Self Review Saved</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <style>
            body {
                margin: 0;
                font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
                background: #111;
                color: #f0f0f0;
            }
            .wrap {
                min-height: 100vh;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 1rem;
            }
            .card {
                max-width: 460px;
                width: 100%;
                border: 1px solid #3a3a3a;
                border-radius: 10px;
                background: #1a1a1a;
                padding: 1rem 1.2rem;
                box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
            }
            h1 {
                margin-top: 0;
                font-size: 1.15rem;
            }
            p {
                margin-bottom: 0;
                color: #d0d0d0;
            }
        </style>
    </head>
    <body>
        <div class="wrap">
            <div class="card">
                <h1>Self review saved</h1>
                <p>This window will close shortly and refresh the case page.</p>
            </div>
        </div>

        <script>
            (function () {
                try { window.alert('Self review saved. This popup will close and refresh the case page.'); } catch (e) {}

                try {
                    if (window.opener && !window.opener.closed) {
                        try {
                            window.opener.postMessage({ type: 'self_review_saved' }, '*');
                        } catch (e) {
                            window.opener.location.reload();
                        }
                    }
                } catch (e) {}

                setTimeout(function () {
                    window.close();
                }, 700);
            })();
        </script>
    </body>
</html>
