:root {
            --bg: #050510;
            --surface: #0f101a;
            --surface-hover: #181926;
            --border: #2a2e45;
            --text: #e4e6ef;
            --text-muted: #8b8fa3;
            --accent: #00f3ff;
            --accent-glow: rgba(0, 243, 255, 0.4);
            --accent-secondary: #bd00ff;
            --green: #00ff9d;
            --green-bg: rgba(0, 255, 157, 0.1);
            --green-border: rgba(0, 255, 157, 0.2);
            --red: #ff3366;
            --red-bg: rgba(255, 51, 102, 0.1);
            --red-border: rgba(255, 51, 102, 0.2);
            --yellow: #f59e0b;
            --yellow-bg: rgba(245, 158, 11, 0.1);
            --yellow-border: rgba(245, 158, 11, 0.2);
            --blue: #3b82f6;
            --border-subtle: rgba(255, 255, 255, 0.08);
            --radius: 12px;
        }

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

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
        }

        /* Navigation */
        .navbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 32px;
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(20px);
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 800;
            font-size: 18px;
        }

        .nav-brand .logo {
            width: 32px;
            height: 32px;
            background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(189, 0, 255, 0.1));
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            box-shadow: 0 0 10px var(--accent-glow);
        }

        .nav-brand {
            background: linear-gradient(135deg, var(--accent), var(--text), var(--accent-secondary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .nav-tabs {
            display: flex;
            gap: 4px;
            background: var(--bg);
            padding: 4px;
            border-radius: 10px;
        }

        .nav-tab {
            padding: 8px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-muted);
            transition: all 0.2s;
            border: none;
            background: none;
        }

        .nav-tab:hover {
            color: var(--text);
            background: var(--surface-hover);
        }

        .nav-tab.active {
            color: var(--bg);
            background: var(--accent);
            font-weight: 700;
        }

        .nav-status {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: var(--text-muted);
        }

        .nav-status .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--green);
            box-shadow: 0 0 8px var(--green);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }
        }

        /* Main Layout */
        .main {
            max-width: 1400px;
            margin: 0 auto;
            padding: 32px;
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 16px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 24px;
            transition: all 0.2s;
        }

        .stat-card:hover {
            border-color: var(--accent);
            box-shadow: 0 0 20px var(--accent-glow);
        }

        .stat-label {
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            margin-bottom: 8px;
        }

        .stat-value {
            font-size: 32px;
            font-weight: 800;
            line-height: 1;
        }

        .stat-sub {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 8px;
        }

        .stat-value.green {
            color: var(--green);
        }

        .stat-value.red {
            color: var(--red);
        }

        .stat-value.yellow {
            color: var(--yellow);
        }

        .stat-value.blue {
            color: var(--blue);
        }

        .stat-value.accent {
            color: var(--accent);
        }

        /* Section */
        .section {
            margin-bottom: 32px;
        }

        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .section-title {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-title .icon {
            font-size: 20px;
        }

        /* Table */
        .table-container {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            overflow: hidden;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th {
            background: rgba(255, 255, 255, 0.03);
            padding: 12px 16px;
            text-align: left;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            border-bottom: 1px solid var(--border);
        }

        td {
            padding: 14px 16px;
            font-size: 13px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        }

        tr:hover td {
            background: var(--surface-hover);
        }

        /* Badges */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
        }

        .badge.online {
            background: var(--green-bg);
            color: var(--green);
            border: 1px solid var(--green-border);
        }

        .badge.offline {
            background: var(--red-bg);
            color: var(--red);
            border: 1px solid var(--red-border);
        }

        .badge.warning {
            background: var(--yellow-bg);
            color: var(--yellow);
            border: 1px solid var(--yellow-border);
        }

        .badge.federated {
            background: rgba(0, 243, 255, 0.1);
            color: var(--accent);
            border: 1px solid rgba(0, 243, 255, 0.2);
        }

        .badge.standalone {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
            border: 1px solid var(--border);
        }

        /* Buttons */
        .btn {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            border: 1px solid var(--border);
            background: var(--surface);
            color: var(--text);
            transition: all 0.2s;
        }

        .btn:hover {
            border-color: var(--accent);
            background: var(--surface-hover);
        }

        .btn.primary {
            background: linear-gradient(135deg, var(--accent-secondary), #8b5cf6);
            border: none;
            color: white;
            box-shadow: 0 0 10px rgba(189, 0, 255, 0.3);
        }

        .btn.primary:hover {
            box-shadow: 0 0 20px rgba(189, 0, 255, 0.5);
            transform: translateY(-1px);
        }

        .btn.danger {
            border-color: var(--red-border);
            color: var(--red);
        }

        .btn.danger:hover {
            background: var(--red-bg);
        }

        /* Progress bar */
        .progress-bar {
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 3px;
            overflow: hidden;
            margin-top: 6px;
        }

        .progress-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.5s ease;
        }

        .progress-fill.green {
            background: var(--green);
        }

        .progress-fill.yellow {
            background: var(--yellow);
        }

        .progress-fill.red {
            background: var(--red);
        }

        /* Tab content */
        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Dialog */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 200;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay.visible {
            display: flex;
        }

        .modal {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 32px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
        }

        .modal h3 {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 16px;
        }

        .modal input,
        .modal select {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            font-size: 14px;
            margin-bottom: 12px;
            font-family: inherit;
        }

        .modal input:focus,
        .modal select:focus {
            outline: none;
            border-color: var(--accent);
        }

        .modal label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            display: block;
            margin-bottom: 4px;
        }

        .modal-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        /* Config block */
        .config-block {
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 16px;
            font-family: 'JetBrains Mono', 'Menlo', monospace;
            font-size: 12px;
            white-space: pre-wrap;
            word-break: break-all;
            color: var(--green);
            margin-top: 12px;
            position: relative;
        }

        .config-block .copy-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 4px 8px;
            font-size: 10px;
        }

        /* Live indicator */
        .live-dot {
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            margin-right: 6px;
        }

        .live-dot.green {
            background: var(--green);
            box-shadow: 0 0 6px var(--green);
        }

        .live-dot.red {
            background: var(--red);
            box-shadow: 0 0 6px var(--red);
        }

        .live-dot.yellow {
            background: var(--yellow);
            box-shadow: 0 0 6px var(--yellow);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .navbar {
                padding: 12px 16px;
                flex-wrap: wrap;
                gap: 12px;
            }

            .main {
                padding: 16px;
            }

            .stats-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        /* Animations */
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-in {
            animation: slideIn 0.3s ease-out;
        }

        .mono {
            font-family: 'JetBrains Mono', 'Menlo', monospace;
        }

        .text-muted {
            color: var(--text-muted);
        }

        /* Account Dropdown */
        .account-dropdown {
            position: relative;
            display: inline-block;
        }

        .account-menu {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            min-width: 240px;
            z-index: 1000;
            overflow: hidden;
        }

        .account-menu.visible {
            display: block;
        }

        .account-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            cursor: pointer;
            transition: background 0.2s;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .account-item:last-child {
            border-bottom: none;
        }

        .account-item:hover {
            background: var(--surface-hover);
        }

        .account-item.active {
            background: rgba(99, 102, 241, 0.1);
        }

        .account-item-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            object-fit: cover;
        }

        .account-item-info {
            flex: 1;
            overflow: hidden;
        }

        .account-item-name {
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .account-item-email {
            font-size: 11px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .account-action {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            font-size: 12px;
            color: var(--text-muted);
            cursor: pointer;
            border-top: 1px solid var(--border);
        }

        .account-action:hover {
            background: var(--surface-hover);
            color: var(--text);
        }

        /* CJK Typography */
        :lang(zh) {
            word-break: break-all;
            overflow-wrap: break-word;
            line-height: 1.8;
            font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
        }

        :lang(zh) .stat-value,
        :lang(zh) h1,
        :lang(zh) h2,
        :lang(zh) h3 {
            line-height: 1.4;
        }