/* ==========================================================
   1. GLOBAL RESET & FONTS
   ========================================================== */
html {
    /* Memaksa scrollbar selalu muncul agar navbar tidak geser saat pindah halaman */
    overflow-y: scroll; 
}

* {
    box-sizing: border-box;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Roboto', Helvetica, Arial, sans-serif !important;
    background-color: #f4f7f6;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

input, button, select, textarea, h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif !important;
}

:root {
    --primary-dark: #022c57;   /* Biru Tua BPN */
    --gold-bpn: #fabc03;       /* Kuning Emas */
    --sky-blue: #00BFFF;       /* Biru Langit Slogan */
    --white: #ffffff;
}

/* ==========================================================
   2. NAVBAR & BRANDING
   ========================================================== */
.navbar {
    background: var(--primary-dark) !important;
    display: flex !important;
    justify-content: center !important; 
    align-items: center !important;
    padding: 0 !important;
    height: 80px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--gold-bpn);
    width: 100% !important;
}

.nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% !important;
}

.nav-brand {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
    flex-shrink: 0;
}

.nav-brand img {
    height: 52px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    object-fit: contain;
}

.logo-sakpore {
    height: 55px !important;
    flex-shrink: 0 !important;
}

.bpn-brand-container {
    display: flex !important;
    flex-direction: column !important;
}

.bpn-title {
    color: var(--gold-bpn) !important;
    font-weight: bold !important;
    font-size: clamp(14px, 1.5vw, 18px) !important;
    white-space: nowrap; 
    line-height: 1.2 !important;
}

.bpn-slogan {
    color: var(--sky-blue) !important;
    font-family: 'Freestyle Script', 'Dancing Script', cursive !important;
    font-size: 28px !important;
    margin-top: -8px !important;
    font-weight: normal !important;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex !important;
    list-style: none !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0;
}

.nav-links a {
    text-decoration: none !important;
    color: var(--white) !important;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-links a:hover { color: var(--gold-bpn) !important; }

.login-style {
    background-color: var(--gold-bpn) !important;
    color: var(--primary-dark) !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    font-size: 13px;
}

.logout-style {
    color: #ff4d4d !important;
    padding: 8px 20px !important;
    border: 2px solid #ff4d4d !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    font-size: 12px;
}

/* ==========================================================
   3. RESPONSIVE DESIGN (MOBILE)
   ========================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

@media (max-width: 992px) {
    .navbar { height: 70px !important; } /* Sedikit lebih ramping di HP */
    
    .menu-toggle { 
        display: flex !important; 
        order: 3; /* Pastikan di kanan */
    }

    .nav-container {
        padding: 0 15px !important;
    }

    .nav-wrapper {
        display: none;
        flex-direction: column !important;
        position: absolute;
        top: 70px; /* Sesuai tinggi navbar */
        left: 0;
        width: 100%;
        background-color: var(--primary-dark) !important;
        padding: 20px !important;
        border-bottom: 3px solid var(--gold-bpn);
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
        z-index: 999;
        gap: 15px !important;
    }

    .nav-wrapper.active { 
        display: flex !important; 
    }

    .nav-links {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 10px;
    }

    .nav-links a {
        font-size: 15px !important;
        display: block;
        width: 100%;
    }

    .auth { 
        margin-top: 10px; 
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Penyesuaian Brand di HP */
    .bpn-title { font-size: 11px !important; white-space: normal !important; width: 150px; }
}
/* ==========================================================
   4. TABLES & DATA CARDS (VERSI RAPAT)
   ========================================================== */
.data-card { 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    overflow-x: auto; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 800px; 
}

table th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    color: var(--primary-dark);
    font-size: 12px;
    text-transform: uppercase;
    border-bottom: 2px solid #eee;
}

table td { 
    padding: 8px 12px !important; 
    border-bottom: 1px solid #f1f5f9; 
    vertical-align: middle !important; 
    line-height: 1.3 !important; 
    color: #334155;
    font-weight: 400 !important;
    font-size: 13px !important; 
}

.level-text {
    font-weight: bold;
    color: var(--primary-dark);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ==========================================================
   5. TOMBOL AKSI (IKON MINIMALIS)
   ========================================================== */
.btn-edit, .btn-delete {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;  /* Lebar kotak */
    height: 30px; /* Tinggi kotak */
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px; /* Ukuran ikon */
    transition: 0.2s;
    border: none;
}

/* Tombol Edit (Pensil) */
.btn-edit {
    background: #3498db;
    color: white !important;
}

.btn-edit:hover {
    background: #2980b9;
    transform: translateY(-2px); /* Efek sedikit naik saat hover */
}

/* Tombol Hapus (Silang) */
.btn-delete {
    background: #e74c3c;
    color: white !important;
    margin-left: 5px;
}

.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-2px);
}


footer {
    background: var(--primary-dark) !important;
    color: #ffffff !important;
    padding: 40px 0 20px 0 !important;
    text-align: center;
    border-top: 4px solid var(--gold-bpn);
    margin-top: 50px;
}

.copyright {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: var(--sky-blue) !important;
}

/* Style tambahan untuk Profile Wrapper di Navbar */
.profile-wrapper { position: relative; cursor: pointer; }
.profile-info { display: flex; align-items: center; gap: 10px; color: white; }
.profile-text { text-align: right; line-height: 1.2; display: flex; flex-direction: column; }
.profile-name { font-size: 12px; font-weight: bold; color: #ffc107; }
.profile-level { font-size: 10px; opacity: 0.8; }
.profile-img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }

.drop-menu { 
    display: none; position: absolute; right: 0; top: 45px; 
    background: white; min-width: 160px; border-radius: 4px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 9999; 
}
.drop-menu.show { display: block; }
.drop-menu a { display: block; padding: 12px 16px; text-decoration: none; color: #333; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.drop-menu a:hover { background-color: #f8f9fa; }

/* Pastikan Dropdown bisa muncul */
.drop-menu.show { 
    display: block !important; 
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fix untuk mobile wrapper agar tidak tertutup konten hero */
.nav-wrapper {
    z-index: 1001 !important;
}
/* Aturan Global untuk Mobile (Agar semua halaman sama) */
@media (max-width: 992px) {
    .nav-container {
        padding: 5px 15px !important;
    }
    
    .bpn-title {
        font-size: 11px !important;
        font-weight: 700 !important;
    }

    .bpn-slogan {
        font-size: 13px !important; /* Ukuran slogan lebih kecil dari instansi */
        margin-top: -3px !important;
        display: block !important;
    }

    .menu-toggle {
        display: flex !important; /* Pastikan hamburger muncul */
    }
}