:root {
    --bg-body: #09090b; 
    --bg-sidebar: #09090b;
    --bg-card: #18181b;
    --accent: #a855f7;
    --accent-hover: #9333ea;
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --green: #10b981;
    --red: #ef4444;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

/* Sidebar */
.sidebar { width: 280px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 35px 24px; position: relative; z-index: 10; }
.sidebar-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 45px; }
.nav-logo { width: 42px; border-radius: 8px; box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2); }
.brand-text .name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.5px; }
.brand-text .tag { font-size: 0.7rem; background: linear-gradient(to right, var(--accent), #d8b4fe); -webkit-background-clip: text; color: transparent; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;}

.nav-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin: 25px 0 10px 12px; }
.nav-item { width: 100%; border: none; background: transparent; color: var(--text-muted); padding: 12px 16px; border-radius: 10px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.2s ease; font-family: inherit; font-size: 14px; text-align: left; font-weight: 600; }
.nav-item i { width: 18px; height: 18px; }
.nav-item:hover { background: rgba(255,255,255,0.03); color: #fff; transform: translateX(4px); }
.nav-item.active { background: rgba(168, 85, 247, 0.1); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.2); }
.nav-item.active i { color: var(--accent); }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.logout-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 12px; border-radius: 10px; cursor: pointer; font-size: 13px; width: 100%; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.2s; }
.logout-btn:hover { background: rgba(239, 68, 68, 0.1); color: var(--red); border-color: rgba(239, 68, 68, 0.3); }

/* Main Area */
.viewport { flex: 1; display: flex; flex-direction: column; background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.05), transparent 50%); }
.top-nav { height: 75px; padding: 0 45px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(12px); z-index: 5; }
.breadcrumb { font-size: 14px; color: var(--text-muted); }
.breadcrumb b { color: #fff; letter-spacing: 0.5px; }
.status-badge { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--green); padding: 8px 16px; border-radius: 20px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; box-shadow: 0 0 15px rgba(16, 185, 129, 0.1); }
.status-badge .dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.page-container { padding: 40px 45px; flex: 1; overflow-y: auto; }
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block !important; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Dashboard Widgets */
.hero { background: linear-gradient(145deg, rgba(24,24,27,0.8), rgba(18,18,20,0.8)); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 16px; padding: 40px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.hero-motd { color: var(--text-muted); font-size: 15px; }
.hero-img { width: 110px; filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.3)); } 

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: rgba(24,24,27,0.6); backdrop-filter: blur(10px); border: 1px solid var(--border); padding: 25px; border-radius: 16px; transition: transform 0.2s; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.15); }
.stat-card span { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 12px; letter-spacing: 0.5px; }
.stat-card div { font-size: 28px; font-weight: 800; }

.panel-card { background: rgba(24,24,27,0.6); backdrop-filter: blur(10px); border: 1px solid var(--border); padding: 30px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); overflow-x: auto;}
.panel-card h3 { margin-bottom: 25px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel-card h3 i { color: var(--accent); }

/* Tables */
.node-table { width: 100%; border-collapse: collapse; text-align: left; }
.node-table th { font-size: 11px; text-transform: uppercase; color: var(--text-muted); padding: 15px; border-bottom: 1px solid var(--border); font-weight: 800; letter-spacing: 0.5px; background: rgba(0,0,0,0.2); }
.node-table td { padding: 16px 15px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 14px; font-weight: 500; color: #e4e4e7; }
.node-table tr:hover td { background: rgba(255,255,255,0.02); }
.node-table tr:last-child td { border-bottom: none; }

/* Buttons */
.btn-send { background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 12px; transition: 0.2s; box-shadow: 0 4px 12px rgba(168,85,247,0.3); font-family: inherit; }
.btn-send:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* Console / Terminal */
.terminal-shell { background: #000; border: 1px solid var(--border); border-radius: 16px; height: 600px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.term-head { background: #121214; padding: 15px 25px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.term-info { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.term-info i { color: var(--text-muted); }
.terminal-body { flex: 1; padding: 25px; overflow-y: auto; font-family: monospace; font-size: 13px; line-height: 1.6; color: #d1d5db; }
.terminal-footer { background: #121214; padding: 15px 25px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 15px; }
.term-prompt { color: var(--accent); font-weight: 900; font-size: 14px; font-family: monospace; }
.terminal-footer input { background: transparent; border: none; color: #fff; flex: 1; font-family: monospace; font-size: 14px; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; width: 600px; padding: 40px; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.modal-header h2 { font-size: 22px; font-weight: 800; }
.btn-close { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; transition: 0.2s; }
.btn-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.detail-item { margin-bottom: 20px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.02); }
.detail-item span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 800; display: block; margin-bottom: 8px; letter-spacing: 0.5px; }
.detail-item p { color: #e4e4e7; font-size: 14px; line-height: 1.6; font-weight: 500; }
.modal-footer { display: flex; gap: 15px; margin-top: 30px; }
.btn-accept { background: rgba(16, 185, 129, 0.1); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); padding: 15px; border-radius: 12px; flex: 1; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: inherit; font-size: 14px; }
.btn-accept:hover { background: var(--green); color: #fff; }
.btn-deny { background: rgba(239, 68, 68, 0.1); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.3); padding: 15px; border-radius: 12px; flex: 1; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: inherit; font-size: 14px; }
.btn-deny:hover { background: var(--red); color: #fff; }