:root {
    --bg: #0b0e14;
    --side: #151921;
    --card: #1c222d;
    --blue: #3b82f6;
    --purple: #a855f7;
    --red: #ef4444;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    font-family: 'Inter', sans-serif; 
    background: var(--bg); 
    color: var(--text-main); 
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; }

/* --- LAYOUT UTAMA --- */
.dashboard-wrapper { 
    display: flex; 
    height: 100vh; /* Full layar di desktop */
    overflow: hidden; 
}

/* --- SIDEBAR --- */
.sidebar { 
    width: 280px; 
    background: var(--side); 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    border-right: 1px solid #2d3440;
    flex-shrink: 0; /* Agar sidebar tidak menciut */
    overflow-y: auto;
}

.brand { 
    font-size: 1.5rem; 
    font-weight: 800; 
    letter-spacing: 2px; 
    margin-bottom: 30px; 
    color: #fff;
}
.accent-blue { color: var(--blue); }

.nav-link { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 15px; 
    color: var(--text-muted); 
    border-radius: 8px; 
    margin-bottom: 5px; 
}
.nav-link:hover, .nav-link.active { 
    background: rgba(59, 130, 246, 0.1); 
    color: var(--blue); 
}

.nav-divider { border: 0; border-top: 1px solid #2d3440; margin: 15px 0; }

.sidebar-footer { margin-top: auto; padding-top: 20px; }

/* --- PROFILE & LOGIN --- */
.user-profile { margin-bottom: 15px; }
.user-meta { display: flex; flex-direction: column; }
.text-xs { font-size: 0.75rem; color: var(--text-muted); }

/* Badge Role */
.badge { 
    display: inline-block; 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    margin-top: 5px; 
    width: fit-content;
}
.badge-founder { background: var(--red); color: white; }
.badge-admin { background: var(--blue); color: white; }
.badge-marga { background: var(--purple); color: white; }
.badge-member { background: #10b981; color: white; }

/* --- MAIN CONTENT --- */
.main-body { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; /* Scroll konten terpisah */
    position: relative;
}

.top-header { 
    padding: 20px 30px; 
    border-bottom: 1px solid #2d3440; 
    background: rgba(11, 14, 20, 0.95);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.header-tools { display: flex; align-items: center; gap: 15px; }
.social-links a { font-size: 1.2rem; color: var(--text-muted); margin-left: 10px; }
.social-links a:hover { color: #fff; }

/* --- CARDS & GRID --- */
.scroll-content { padding: 30px; }
.p-25 { padding: 25px; }
.mb-25 { margin-bottom: 25px; }
.mt-15 { margin-top: 15px; }

.glass-card { 
    background: var(--card); 
    border: 1px solid #2d3440; 
    border-radius: 12px; 
    padding: 20px; 
}

.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* 2 Kolom di desktop */
    gap: 20px; 
}

/* Warna Border Project */
.border-blue { border-left: 4px solid var(--blue); }
.border-purple { border-left: 4px solid var(--purple); }

/* Chat Box */
.chat-display { 
    height: 300px; 
    overflow-y: auto; 
    background: #11141a; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid #2d3440;
}
.chat-msg { margin-bottom: 8px; font-size: 0.9rem; }
.user-name { color: var(--blue); margin-right: 5px; }

/* Input & Button */
input { 
    background: #0b0e14; 
    border: 1px solid #2d3440; 
    color: white; 
    padding: 10px; 
    border-radius: 6px; 
    width: 100%;
}
.flex { display: flex; }
.gap-10 { gap: 10px; }
.flex-1 { flex: 1; }

.btn-primary { 
    background: var(--blue); 
    color: white; 
    padding: 10px 15px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600;
    display: inline-block;
}
.btn-logout { background: #334155; color: white; padding: 8px; border-radius: 6px; border:none; cursor: pointer; margin-top: 10px;}
.btn-saweria { color: #facc15; font-weight: bold; font-size: 0.9rem; }

/* Link Colors Fix */
.text-blue { color: var(--blue); }
.text-purple { color: var(--purple); }
.text-red { color: var(--red); }
.text-gray { color: var(--text-muted); }

/* =========================================
   RESPONSIVE MOBILE (BAGIAN PENTING) 
   ========================================= */
@media screen and (max-width: 768px) {
    /* Ubah layout dari samping-sampingan jadi atas-bawah */
    .dashboard-wrapper { 
        flex-direction: column; 
        height: auto; 
        overflow: visible;
    }

    /* Sidebar jadi Header di atas */
    .sidebar { 
        width: 100%; 
        height: auto; 
        border-right: none; 
        border-bottom: 1px solid #2d3440;
        padding: 20px;
    }

    /* Sembunyikan footer sidebar (tombol login) agar tidak menuhin header */
    /* Kita pindahkan tombol login agar lebih rapi atau biarkan di bawah menu */
    .sidebar-footer {
        margin-top: 20px;
    }

    /* Main Content */
    .main-body { width: 100%; overflow: visible; }
    
    /* Grid jadi 1 kolom (Project FiveM & SAMP tumpuk ke bawah) */
    .grid-2 { grid-template-columns: 1fr; }

    /* Header Tools (Saweria & Medsos) rapikan */
    .top-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
    }
    
    .header-tools { 
        width: 100%; 
        justify-content: space-between; 
    }
}
