:root {
    --bg-app: #27272a;       /* Zinc 800 (Slate Gray) */
    --bg-sidebar: #18181b;   /* Zinc 900 */
    --bg-card: #3f3f46;      /* Zinc 700 */
    --accent: #a855f7;       /* Euphoric Purple */
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --green: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-app); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar { width: 280px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px 16px; }
.sidebar-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; padding-left: 10px; }
.nav-logo { width: 44px; filter: brightness(1.3); } /* Brightened Logo */
.brand-text .name { display: block; font-weight: 700; font-size: 1.1rem; }
.brand-text .status { font-size: 0.7rem; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.nav-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin: 24px 14px 10px; display: block; }
.nav-item { width: 100%; border: none; background: transparent; color: var(--text-muted); padding: 12px 16px; border-radius: 10px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: 0.2s; font-family: inherit; font-size: 0.95rem; }
.nav-item i { width: 18px; stroke-width: 2.2px; }
.nav-item:hover { background: var(--bg-card); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.4); }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.logout-btn { width: 100%; background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 10px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 13px; font-family: inherit; }

/* Viewport */
.viewport { flex: 1; display: flex; flex-direction: column; }
.top-nav { height: 72px; padding: 0 40px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.breadcrumbs { font-size: 14px; }
.c-muted { color: var(--text-muted); } .c-active { font-weight: 600; }
.network-badge { background: var(--bg-sidebar); border: 1px solid var(--border); padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; display: flex; align-items: center; gap: 10px; }
.network-badge code { color: var(--accent); font-weight: 700; }
.pulse { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); animation: pulseEffect 2s infinite; }
@keyframes pulseEffect { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.page-container { padding: 40px; flex: 1; overflow-y: auto; }
.page { display: none; }
.page.active { display: block; animation: fadeInUp 0.4s ease forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.hero-card { background: linear-gradient(135deg, #3f3f46 0%, #27272a 100%); border: 1px solid var(--border); border-radius: 20px; padding: 48px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.hero-text h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.hero-logo { width: 100px; filter: brightness(1.3); opacity: 0.3; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); padding: 24px; border-radius: 16px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.s-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; display: block; }
.s-value { font-size: 1.5rem; font-weight: 700; }
.progress { height: 6px; background: #27272a; border-radius: 3px; margin-top: 15px; }
.bar { height: 100%; background: var(--green); border-radius: 3px; }
.bar.purple { background: var(--accent); }

.panel-card { background: var(--bg-card); border: 1px solid var(--border); padding: 24px; border-radius: 16px; }
.panel-card h3 { margin-bottom: 24px; }
.node-table { width: 100%; border-collapse: collapse; text-align: left; }
.node-table th { font-size: 11px; text-transform: uppercase; color: var(--text-muted); padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.node-table td { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.p-on { color: var(--green); font-weight: 700; }

/* Console UI */
.terminal { background: #000; border: 1px solid var(--border); border-radius: 16px; height: 600px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.terminal-head { background: #18181b; padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.term-info { display: flex; align-items: center; gap: 12px; color: var(--accent); font-weight: 600; font-size: 14px; }
.btn-clear { background: transparent; border: 1px solid #52525b; color: var(--text-muted); padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 11px; font-family: inherit; }
.terminal-body { flex: 1; padding: 24px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.6; color: #d1d5db; }
.terminal-footer { background: #18181b; padding: 18px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 15px; }
.prompt { color: var(--accent); font-weight: 800; font-size: 1.2rem; }
.terminal-footer input { background: transparent; border: none; color: white; flex: 1; font-family: inherit; font-size: 15px; }
#btn-send { background: var(--accent); color: white; border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 700; font-family: inherit; }