<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AIDSO 数据监控 - 登录</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='dashboard/dashboard_login.css') }}">
</head>
<body>
<main class="login-page">
    <section class="login-visual">
        <div class="visual-content">
            <div class="visual-badge">AIDSO DATA</div>
            <h1>数据监控中心</h1>
            <p>统一查看队列状态、历史任务趋势与三方渠道用量。</p>
            <div class="visual-grid" aria-hidden="true">
                <span></span><span></span><span></span>
                <span></span><span></span><span></span>
            </div>
        </div>
    </section>

    <section class="login-panel">
        <div class="login-card">
            <img
                class="login-logo"
                src="{{ url_for('static', filename='dashboard/aidso_logo.png') }}"
                alt="AIDSO 爱搜"
            >
            <div class="login-heading">
                <h2>登录数据监控</h2>
                <p>请输入账号和密码进入系统</p>
            </div>

            <form method="post" action="{{ url_for('dashboard.dashboard_login') }}">
                <label class="login-field">
                    <span>账号</span>
                    <span class="input-shell">
                        <i class="input-icon user-icon" aria-hidden="true"></i>
                        <input
                            type="text"
                            name="username"
                            autocomplete="username"
                            placeholder="请输入账号"
                            required
                            autofocus
                        >
                    </span>
                </label>

                <label class="login-field">
                    <span>密码</span>
                    <span class="input-shell">
                        <i class="input-icon lock-icon" aria-hidden="true"></i>
                        <input
                            type="password"
                            name="password"
                            autocomplete="current-password"
                            placeholder="请输入密码"
                            required
                        >
                    </span>
                </label>

                {% if error_message %}
                <div class="login-error" role="alert">{{ error_message }}</div>
                {% endif %}

                <button class="login-button" type="submit">登录</button>
            </form>
            <p class="login-footer">AIDSO 数据监控</p>
        </div>
    </section>
</main>
</body>
</html>
