:root {
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --dark-bg: #0A0A0A;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --text-main: #E0E0E0;
    --text-dim: #A0A0A0;
    --danger: #FF4B4B;
    --success: #00E676;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

/* THEME ANIMATIONS */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse {
    width: 10px;
    height: 10px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--success);
}

/* LAYOUT */
.glass-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
    background: radial-gradient(circle at 50% -20%, #1a1a1a 0%, #0a0a0a 100%);
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
}

.ninja-icon {
    width: 40px;
    height: 40px;
    background: var(--gold);
    border-radius: 10px;
    box-shadow: 0 0 20px var(--gold-glow);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo-section span {
    color: var(--gold);
}

nav {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s;
    margin-bottom: 5px;
    font-weight: 500;
}

.nav-item i { width: 20px; }

.nav-item:hover, .nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--gold), #8A6E1E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: black;
}

/* CONTENT AREA */
.content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.search-bar {
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 400px;
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
}

.search-bar input:focus { outline: none; }

.btn-primary {
    background: var(--gold);
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrap.gold { color: var(--gold); background: rgba(212, 175, 55, 0.1); }

.stat-info h3 { font-size: 0.9rem; color: var(--text-dim); }
.stat-info .value { font-size: 1.8rem; font-weight: 800; }
.stat-info .value.danger { color: var(--danger); }

/* TABLES */
.live-monitor {
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.ninja-table th {
    text-align: left;
    padding: 15px 25px;
    color: var(--text-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ninja-table td {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
}

.status-badge.online { color: var(--success); background: rgba(0, 230, 118, 0.1); }
.status-badge.online .dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* ─── VIEWS ──────────────────────────────────────────────────────────────── */
.view { display: none; flex-direction: column; gap: 20px; flex-grow: 1; overflow: hidden; }
.view.active { display: flex; }

.monitor-table-wrap { overflow-y: auto; flex-grow: 1; }

/* ─── STATS: 4 COLUMNS ───────────────────────────────────────────────────── */
.stats-grid { grid-template-columns: repeat(4, 1fr); }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-icon {
    background: rgba(255,255,255,0.04);
    border: none;
    color: var(--text-dim);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.btn-icon i { width: 15px; height: 15px; }
.btn-icon:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.btn-icon.danger:hover { background: rgba(255,75,75,0.15); color: var(--danger); }

.btn-logout {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.form-group input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}
.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px;
    width: 420px;
}
.modal-content h2 { margin-bottom: 30px; font-size: 1.3rem; }
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* ─── LOGIN OVERLAY ──────────────────────────────────────────────────────── */
.login-overlay {
    position: fixed;
    inset: 0;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.login-overlay.hidden { display: none; }

.login-box {
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 24px;
    padding: 50px 40px;
    width: 400px;
    text-align: center;
}
.login-subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 35px;
}
.login-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255,75,75,0.1);
    border-radius: 8px;
    text-align: left;
}
.login-error.hidden { display: none; }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
}
.badge-success { color: var(--success); background: rgba(0,230,118,0.1); }
.badge-danger  { color: var(--danger);  background: rgba(255,75,75,0.1); }
.badge-warn    { color: var(--gold);    background: rgba(212,175,55,0.1); }
.badge-dim     { color: var(--text-dim); background: rgba(255,255,255,0.05); }

/* ─── CODE / MONO ────────────────────────────────────────────────────────── */
.mono { font-family: 'Courier New', monospace; font-size: 0.85em; }
code.mono { color: var(--gold); }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state td {
    text-align: center;
    color: var(--text-dim);
    padding: 50px;
    font-size: 0.9rem;
}

/* ─── LOG FILTER BAR ─────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; }
.btn-filter {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    transition: 0.3s;
}
.btn-filter:hover, .btn-filter.active {
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border-color: rgba(212,175,55,0.4);
}

/* ─── SETTINGS VIEW ──────────────────────────────────────────────────────── */
.settings-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-grow: 1;
}
