<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5">
    <title>服务监测 - 运行维护平台</title>
    <style>
        :root {
            --primary: #2563eb;
            --primary-hover: #1d4ed8;
            --gray-50: #f9fafb;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-500: #6b7280;
            --gray-700: #374151;
            --gray-900: #111827;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
            background: #f3f4f6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 顶部导航栏 — 与平台首页统一风格 */
        .navbar {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 16px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        }

        .navbar-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .navbar-brand {
            color: white;
            font-size: 18px;
            font-weight: 700;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .navbar-brand:hover {
            opacity: 0.9;
        }

        .navbar-module {
            color: rgba(255, 255, 255, 0.7);
            font-size: 14px;
        }

        .navbar-home {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.35);
            padding: 6px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: background 0.2s;
            white-space: nowrap;
        }

        .navbar-home:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .navbar-user {
            color: white;
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 14px;
        }

        .btn-logout {
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s;
        }

        .btn-logout:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        /* 主体 */
        .container {
            max-width: 960px;
            margin: 0 auto;
            padding: 60px 24px;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .placeholder-card {
            background: white;
            border-radius: 16px;
            padding: 60px 40px;
            text-align: center;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
            max-width: 480px;
            width: 100%;
        }

        .placeholder-icon {
            font-size: 64px;
            margin-bottom: 24px;
        }

        .placeholder-title {
            font-size: 24px;
            font-weight: 700;
            color: var(--gray-900);
            margin-bottom: 12px;
        }

        .placeholder-desc {
            font-size: 16px;
            color: var(--gray-500);
            line-height: 1.6;
            margin-bottom: 24px;
        }

        .placeholder-features {
            text-align: left;
            background: var(--gray-50);
            border-radius: 12px;
            padding: 20px 24px;
            margin-bottom: 24px;
        }

        .placeholder-features h3 {
            font-size: 14px;
            color: var(--gray-700);
            margin-bottom: 12px;
            font-weight: 600;
        }

        .placeholder-features ul {
            list-style: none;
            padding: 0;
        }

        .placeholder-features li {
            font-size: 14px;
            color: var(--gray-500);
            padding: 6px 0;
            padding-left: 20px;
            position: relative;
        }

        .placeholder-features li::before {
            content: "📋";
            position: absolute;
            left: 0;
        }

        .btn-back {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--primary);
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            transition: background 0.2s;
        }

        .btn-back:hover {
            background: var(--primary-hover);
        }

        /* 页脚 */
        .footer {
            text-align: center;
            padding: 20px;
            color: var(--gray-500);
            font-size: 12px;
        }

        /* ===== 移动端响应式 ===== */
        @media screen and (max-width: 768px) {
            .container { padding: 24px 16px; }
            .placeholder-card { padding: 40px 24px; }
            .placeholder-title { font-size: 20px; }
            .navbar { padding: 12px 16px; }
            .navbar-brand { font-size: 16px; }
            .navbar-module { display: none; }
            .navbar-home { min-height: 44px; font-size: 14px; padding: 8px 14px; }
            .btn-logout { min-height: 44px; font-size: 16px; }
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="navbar">
        <div class="navbar-left">
            <a href="/" class="navbar-brand">🛠️ 运行维护平台</a>
            <span class="navbar-module">/ 服务监测</span>
            <a href="/" class="navbar-home">🏠 返回首页</a>
        </div>
        <div class="navbar-user">
            <span>{{ user.username }}（{{ '管理员' if user.role == 'admin' else '用户' }}）</span>
            <button class="btn-logout" onclick="handleLogout()">🚪 退出</button>
        </div>
    </div>

    <!-- 主体 -->
    <div class="container">
        <div class="placeholder-card">
            <div class="placeholder-icon">🚧</div>
            <div class="placeholder-title">服务监测模块开发中</div>
            <div class="placeholder-desc">该模块正在规划开发，敬请期待</div>
            <div class="placeholder-features">
                <h3>计划功能</h3>
                <ul>
                    <li>SSH 连接监测服务器服务状态</li>
                    <li>服务运行状态实时监测</li>
                    <li>服务状态报告输出</li>
                </ul>
            </div>
            <a href="/" class="btn-back">🏠 返回首页</a>
        </div>
    </div>

    <div class="footer">
        运行维护平台 · 运行维护工具集
    </div>

    <script>
        async function handleLogout() {
            try {
                await fetch('/logout', {
                    method: 'POST',
                    headers: { 'Content-Type': 'application/json' },
                    credentials: 'include'
                });
            } catch (e) {}
            window.location.href = '/login';
        }
    </script>
</body>
</html>
