{% extends "_base.html" %}

{% block title %}頁面不存在 - MES Dashboard{% endblock %}

{% block head_extra %}
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft JhengHei', Arial, sans-serif;
            background: #f5f7fa;
            color: #222;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .error-container {
            text-align: center;
            padding: 40px;
        }

        .error-icon {
            font-size: 80px;
            margin-bottom: 20px;
        }

        .error-code {
            font-size: 72px;
            font-weight: bold;
            color: #667eea;
            margin-bottom: 10px;
        }

        .error-title {
            font-size: 28px;
            color: #333;
            margin-bottom: 12px;
        }

        .error-message {
            font-size: 16px;
            color: #666;
            margin-bottom: 30px;
            line-height: 1.6;
        }

        .home-btn {
            display: inline-block;
            padding: 12px 24px;
            font-size: 16px;
            color: white;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 8px;
            text-decoration: none;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .home-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }
    </style>
{% endblock %}

{% block content %}
    <div class="error-container">
        <div class="error-code">404</div>
        <h1 class="error-title">頁面不存在</h1>
        <p class="error-message">
            您要找的頁面不存在或已被移除。<br>
            請檢查網址是否正確，或返回首頁。
        </p>
        <a href="{{ url_for('portal_index') }}" class="home-btn">返回首頁</a>
    </div>
{% endblock %}
