/* * File: style.css
 * Theme: Modern Deep Purple (Depth & Contrast)
 * Status: Fixed (Added missing variables)
 */

:root {
    --primary-color: #6f42c1;     /* Ungu Utama */
    --primary-hover: #5a32a3;     /* Ungu Hover (DITAMBAHKAN - Sebelumnya hilang) */
    --primary-dark: #4e2c8c;      /* Ungu Gelap */
    --primary-light: #e0cffc;     /* Ungu Muda Aksen */
    --accent-color: #0dcaf0;      /* Cyan untuk notifikasi/aksi */
    --text-dark: #2c3e50;
    --sidebar-width: 270px;
    --card-shadow: 0 10px 20px rgba(111, 66, 193, 0.05);
    --sidebar-gradient: linear-gradient(160deg, #6f42c1 0%, #462580 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f3f4f8; 
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- SIDEBAR REDESIGN --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-gradient);
    color: white;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1); 
}

.sidebar-header {
    padding: 25px 20px;
    font-weight: 700;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.05); 
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    padding: 20px 15px; 
}

.sidebar-menu small {
    display: block;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 8px 12px;
    font-size: 0.75rem;
}

/* Item Menu Styling */
.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.25s ease;
    border-radius: 12px; 
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.sidebar-menu a i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

/* Hover Effect */
.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(3px);
}

.sidebar-menu a:hover i {
    transform: scale(1.1);
}

/* Active State - Highlighted Box */
.sidebar-menu a.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 600;
}

.sidebar-menu a.active i {
    color: var(--primary-color);
}

/* --- MAIN CONTENT & NAVBAR --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: all 0.3s;
    min-height: 100vh;
}

/* Navbar Top */
.top-navbar {
    background: white;
    padding: 15px 30px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.02);
}

/* --- CARDS & UI ELEMENTS --- */
.card-bk {
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); 
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.card-bk:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(111, 66, 193, 0.1);
}

.card-header-bk {
    background: white;
    border-bottom: 2px solid #f0f2f5;
    padding: 20px 25px;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.05rem;
}

.card-body {
    padding: 25px;
}

/* Buttons */
.btn-primary-bk {
    /* Sekarang var(--primary-hover) sudah ada, jadi background ini akan valid */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(111, 66, 193, 0.3);
    transition: all 0.3s;
}

.btn-primary-bk:hover {
    box-shadow: 0 6px 15px rgba(111, 66, 193, 0.4);
    transform: translateY(-1px);
    color: white;
    /* Opsional: Ubah gradient sedikit saat hover */
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
}

/* Alert Styling */
.alert-2fa {
    border-radius: 12px;
    border: none;
    background-color: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Login Page Specific */
.login-body {
    background: linear-gradient(135deg, #f6f8fd 0%, #e0cffc 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(111, 66, 193, 0.15);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    .sidebar.active {
        margin-left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        z-index: 999;
    }
    .overlay.active {
        display: block;
    }
}