/* =========================================
   GLOBAL STYLES & TYPOGRAPHY
========================================= */
body { 
    font-family: 'Nunito', sans-serif; 
    background-color: #f4f9fc; /* Sedikit kebiruan menyesuaikan tema */
    overflow-x: hidden; 
}

/* =========================================
   SIDEBAR STYLE (RMD BLUE THEME)
========================================= */
.sidebar { 
    background-color: #0c3e55; /* Navy gelap khas RMD */
    width: 260px; 
    height: 100vh; 
    position: fixed; 
    top: 0; 
    left: 0; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.3s ease; 
    z-index: 1040 !important; 
    border-top-right-radius: 30px; 
    border-bottom-right-radius: 30px;
    box-shadow: 4px 0 20px rgba(12, 62, 85, 0.15);
}

.sidebar-overlay {
    z-index: 1030 !important; /* Di bawah sidebar, tapi menutupi topbar */
}

.sidebar-logo { padding: 40px 20px 30px; text-align: center; }
.sidebar-logo img { 
    max-width: 120px; 
    border-radius: 50%; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    border: 3px solid rgba(148, 212, 237, 0.3); /* Transparansi warna #94d4ed */
}
.nav-menu { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    flex-grow: 1; 
    overflow-y: auto; 
    scrollbar-width: none; 
}
.nav-menu::-webkit-scrollbar { display: none; }
.nav-item { margin-bottom: 2px; }
.nav-link { 
    color: #b5e3f5; /* Biru muda pucat agar kontras */
    padding: 12px 20px 12px 30px; 
    display: flex; 
    align-items: center; 
    font-weight: 700; 
    font-size: 0.95rem; 
    text-decoration: none; 
    transition: all 0.3s; 
}
.nav-link i { margin-right: 15px; font-size: 1.15rem; }
.nav-link:hover { color: #ffffff; }

/* Active Menu Style RMD */
.nav-item.active .nav-link { 
    background: linear-gradient(90deg, rgba(148, 212, 237, 0.15) 0%, rgba(148, 212, 237, 0) 100%); 
    color: #94d4ed; /* Light Blue Text RMD */
    font-weight: 800; 
    border-radius: 0 20px 20px 0; 
    margin-right: 25px; 
    border-left: 4px solid #94d4ed;
}
.sidebar-footer { padding: 20px 30px 40px; }

/* RMD Logout Button */
.btn-logout { 
    background-color: #94d4ed; 
    color: #0c3e55; 
    width: 100%; 
    border: none; 
    padding: 12px; 
    border-radius: 12px; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    transition: 0.3s; 
    box-shadow: 0 4px 10px rgba(148, 212, 237, 0.3);
}
.btn-logout:hover { 
    background-color: #7ab8d3; 
    color: #0c3e55; 
    transform: translateY(-2px);
}
.btn-logout i { margin-right: 8px; font-size: 1.2rem; }

/* =========================================
   MAIN CONTENT & TOPBAR
========================================= */
header, .topbar { 
    position: sticky !important;
    top: 0;
    z-index: 1020;
    background-color: rgba(255, 255, 255, 0) !important;
    backdrop-filter: blur(62px);
    -webkit-backdrop-filter: blur(62px);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}
    
.main-content { 
    margin-left: 260px; 
    padding: 30px 40px; 
    min-height: 100vh; 
    position: relative;
    padding-bottom: 50px;
}
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.page-title { font-weight: 800; color: #0c3e55; font-size: 1.5rem; margin: 0; }
.user-profile { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    cursor: pointer; 
    transition: opacity 0.2s; 
}
.user-profile:hover { opacity: 0.8; }
.user-info { text-align: right; line-height: 1.2; }
.user-name { font-weight: 800; color: #0c3e55; font-size: 0.95rem; }
.user-role { font-size: 0.7rem; background-color: #e6f6fc; color: #0c3e55; padding: 2px 8px; border-radius: 10px; font-weight: 800; border: 1px solid #94d4ed; }

/* AVATAR RMD */
.user-avatar { 
    width: 45px; 
    height: 45px; 
    background-color: #94d4ed; 
    color: #0c3e55; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem; 
    font-weight: 800;
}

/* Watermark Background - Dihilangkan jika tidak ada file bgsigerbot.jpg, atau biarkan transparan */
.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image: url('bgsigerbot.jpg'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.03; 
    pointer-events: none; 
    z-index: -1; 
}

/* =========================================
   DASHBOARD SPECIFIC (Cards & Banner)
========================================= */
/* Banner dengan perpaduan Biru RMD */
.welcome-banner { 
    background: linear-gradient(135deg, #0c3e55 0%, #1e3a8a 100%); 
    border-left: 8px solid #94d4ed; /* Garis highlight RMD di sisi kiri banner */
    border-radius: 15px; 
    padding: 30px; 
    color: white; 
    margin-bottom: 30px; 
    box-shadow: 0 10px 20px rgba(12, 62, 85, 0.2); 
}
.welcome-banner h2 { font-weight: 800; font-size: 1.8rem; margin-bottom: 8px; }
.welcome-banner p { margin: 0; color: #b5e3f5; font-size: 0.95rem; }

/* DESAIN CARD DASHBOARD BARU */
.stat-card { 
    border-radius: 15px; 
    padding: 20px; 
    position: relative; 
    overflow: hidden; 
    border: none; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); 
    transition: all 0.3s ease; 
    color: white; 
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stat-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); 
}

.stat-card .watermark-icon {
    position: absolute;
    right: -10%;
    bottom: -15%;
    font-size: 9rem;
    opacity: 0.15;
    transform: rotate(-15deg);
    transition: all 0.4s ease;
}
.stat-card:hover .watermark-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.25;
}

.icon-circle {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    backdrop-filter: blur(5px);
}

.data-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1; 
}

/* GRADASI DISESUAIKAN UNTUK CARD */
.bg-grad-blue { background: linear-gradient(135deg, #0c3e55 0%, #1e3a8a 100%); } 
.bg-grad-orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.bg-grad-green { background: linear-gradient(135deg, #059669 0%, #10b981 100%); } 
.bg-grad-red { background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%); } 

/* =========================================
   DATA TABLE & FILTER CARDS
========================================= */
.filter-card { background: white; border-radius: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); margin-bottom: 20px; border: none; }
.table-container { background: white; border-radius: 15px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); border: none; }
.table thead th { background-color: #f8fafc; color: #64748b; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; border: none; padding: 15px; }
.table tbody td { padding: 15px; background-color: #ffffff; color: #334155; font-size: 0.9rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }

/* Tambahan style biar isi tabel tidak terlalu mepet saat di-scroll di HP */
.table-custom-mobile th, .table-custom-mobile td {
    vertical-align: middle;
}
.detail-info-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    font-size: 0.85rem;
}

/* =========================================
   RESPONSIVE (Mobile Layout / Webview)
========================================= */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(12, 62, 85, 0.6); /* Overlay bernuansa navy RMD */
    backdrop-filter: blur(2px);
    z-index: 998;
    display: none;
}

@media (max-width: 768px) { 
    .sidebar { 
        transform: translateX(-100%); 
        z-index: 1040;
    } 
    .sidebar.show {
        transform: translateX(0) !important;
    }
    
    .main-content { 
        margin-left: 0; 
        padding: 15px 12px; 
        padding-bottom: 30px;
    } 

    html, body {
        font-size: 14px; 
    }

    .page-title {
        font-size: 1.25rem !important; 
    }
    .user-profile {
        gap: 10px; 
    }
    .user-name {
        font-size: 0.85rem;
    }
    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .welcome-banner {
        padding: 20px 15px; 
    }
    .welcome-banner h2 {
        font-size: 1.4rem;
    }
    .stat-card {
        min-height: 130px;
        padding: 15px;
    }
    .stat-card h2 {
        font-size: 1.6rem !important; 
    }
    .icon-circle {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    .stat-card .watermark-icon {
        font-size: 7rem;
    }

    .table-container {
        padding: 15px 10px;
    }
    .table thead th {
        padding: 10px 8px;
        font-size: 0.7rem;
    }
    .table tbody td {
        padding: 10px 8px;
        font-size: 0.8rem; 
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
}