<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Admin{% endblock %} - KuiperForge</title>
    <style>
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f5f5f5;
        }
        .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
        nav {
            background: #1a1a2e;
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        nav a { color: #fff; text-decoration: none; margin-right: 20px; }
        nav a:hover { text-decoration: underline; }
        .nav-brand { font-weight: bold; font-size: 1.2em; }
        .nav-links { display: flex; align-items: center; }
        .nav-user { color: #aaa; margin-left: 20px; }
        .card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            padding: 20px;
            margin-bottom: 20px;
        }
        .card-title { font-size: 1.1em; font-weight: 600; margin-bottom: 15px; color: #555; }
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
        .stat-card { text-align: center; }
        .stat-value { font-size: 2.5em; font-weight: bold; color: #1a1a2e; }
        .stat-label { color: #666; }
        table { width: 100%; border-collapse: collapse; }
        th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
        th { background: #f9f9f9; font-weight: 600; color: #555; }
        tr:hover { background: #f5f5f5; }
        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.85em;
            font-weight: 500;
        }
        .badge-online { background: #d4edda; color: #155724; }
        .badge-offline { background: #f8d7da; color: #721c24; }
        .badge-revoked { background: #fff3cd; color: #856404; }
        .badge-label { background: #e2e3e5; color: #383d41; margin: 2px; }
        .btn {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 4px;
            text-decoration: none;
            font-size: 0.9em;
            cursor: pointer;
            border: none;
        }
        .btn-primary { background: #007bff; color: white; }
        .btn-primary:hover { background: #0056b3; }
        .btn-danger { background: #dc3545; color: white; }
        .btn-danger:hover { background: #c82333; }
        .btn-secondary { background: #6c757d; color: white; }
        .btn-secondary:hover { background: #5a6268; }
        .btn-sm { padding: 4px 10px; font-size: 0.8em; }
        h1, h2 { margin-bottom: 20px; color: #333; }
        .token-display {
            background: #d4edda;
            border: 1px solid #c3e6cb;
            border-radius: 4px;
            padding: 15px;
            margin-bottom: 15px;
        }
        .token-value {
            display: block;
            background: #1a1a2e;
            color: #0f0;
            padding: 10px 15px;
            border-radius: 4px;
            margin: 10px 0;
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 0.95em;
            word-break: break-all;
        }
        code {
            background: #f4f4f4;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 0.9em;
            word-break: break-all;
        }
        table code { background: none; padding: 0; }
        .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .alert {
            padding: 15px;
            border-radius: 4px;
            margin-bottom: 20px;
        }
        .alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
        .detail-grid { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
        .detail-label { font-weight: 600; color: #555; }
    </style>
</head>
<body>
    {% block body %}{% endblock %}
</body>
</html>
