<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}goutd{% endblock %}</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "SF Pro Text", "Noto Sans SC", sans-serif; background: #ffffff; color: #1f2328; min-height: 100vh; }
.nav { border-bottom: 1px solid #d0d7de; padding: 0 24px; display: flex; align-items: center; height: 52px; gap: 24px; background: #f6f8fa; }
.nav a { color: #656d76; text-decoration: none; font-size: 14px; line-height: 52px; border-bottom: 2px solid transparent; }
.nav a:hover { color: #1f2328; border-bottom-color: #d0d7de; }
.nav a.active { color: #1f2328; border-bottom-color: #1f2328; }
.nav .brand { font-weight: 600; font-size: 15px; margin-right: auto; color: #1f2328; letter-spacing: 0.02em; }
.main { max-width: 800px; margin: 40px auto; padding: 0 24px; }
h1 { font-size: 20px; font-weight: 600; margin-bottom: 24px; color: #1f2328; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #1f2328; letter-spacing: -0.01em; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 8px 12px; font-weight: 500; color: #656d76; border-bottom: 1px solid #d0d7de; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
td { padding: 10px 12px; border-bottom: 1px solid #d0d7de; }
tr:hover td { background: #f6f8fa; }
.mono { font-family: "SF Mono", "Fira Code", monospace; font-size: 13px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; font-weight: 500; }
.tag-tcp { background: #ddf4ff; color: #0969da; }
.tag-udp { background: #fbefff; color: #8250df; }
.tag-active { background: #dafbe1; color: #1a7f37; }
.tag-waiting { background: #fff8c5; color: #9a6700; }
.empty { text-align: center; padding: 64px 0; color: #8b949e; font-size: 14px; }
.btn { display: inline-block; padding: 5px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid #d0d7de; background: #f6f8fa; color: #1f2328; text-decoration: none; line-height: 20px; }
.btn:hover { background: #eaeef2; }
.btn-primary { background: #0969da; border-color: #0969da; color: #ffffff; }
.btn-primary:hover { background: #0550ae; }
.btn-danger { color: #cf222e; border-color: #cf222e33; }
.btn-danger:hover { background: #cf222e11; }
form { display: flex; gap: 8px; margin-bottom: 24px; align-items: center; }
input[type="text"], input[type="password"] { padding: 5px 12px; border-radius: 6px; border: 1px solid #d0d7de; background: #ffffff; color: #1f2328; font-size: 14px; line-height: 20px; outline: none; }
input:focus { border-color: #0969da; box-shadow: 0 0 0 3px #0969da22; }
code { background: #f6f8fa; padding: 1px 6px; border-radius: 3px; font-size: 13px; color: #0969da; }
.box { background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; padding: 12px 16px; margin-bottom: 24px; }
.box label { display: block; font-size: 12px; color: #656d76; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.box .val { font-family: "SF Mono", "Fira Code", monospace; font-size: 13px; color: #1f2328; word-break: break-all; }
.hint { color: #8b949e; font-size: 13px; margin-top: 8px; }
.sec { margin-bottom: 32px; }
</style>
</head>
<body>
<div class="nav">
<span class="brand">goutd</span>
<a href="/dashboard" class="{% if active_page == "dashboard" %}active{% endif %}">Tunnels</a>
<a href="/keys" class="{% if active_page == "keys" %}active{% endif %}">Keys</a>
<a href="/logout" style="color:#8b949e;font-size:13px;">Logout</a>
</div>
<div class="main">
{% block content %}{% endblock %}
</div>
</body>
</html>