:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --accent: #D4AF37;
    --accent-glow: #FBBF24;
    --surface: #FFFFFF;
    --surface-alt: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --radius: 16px; 
    
    --badge-public-bg: #ECFDF5;
    --badge-public-text: #059669;
    --badge-internal-bg: #FEF3C7;
    --badge-internal-text: #D97706;
}

/* RESET & TYPOGRAPHY */
/* RESET & TYPOGRAPHY */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* BACKGROUND HALAMAN GRADASI */
body {
    margin: 0;
    /* Gradasi lembut dari putih tulang ke abu-abu kebiruan terang */
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    background-attachment: fixed; /* Memastikan gradasi penuh dan tidak terpotong saat di-scroll */
    color: var(--text-main);
    font-family: "Plus Jakarta Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* TOPBAR */
.topbar {
    position: absolute; z-index: 30;
    top: 0; left: 0; right: 0; color: white;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
    backdrop-filter: blur(8px);
}
.topbar-inner {
    max-width: 1220px; min-height: 80px; margin: auto; padding: 0 28px;
    display: flex; align-items: center; 
    justify-content: space-between; /* Memisahkan logo ke kiri dan menu ke kanan */
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.brand-name { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-subtitle { margin-top: 2px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; }

/* MENU NAVIGASI KANAN */
.topbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.nav-link i {
    font-size: 14px;
}
.nav-link:hover {
    color: var(--accent);
    background: rgba(255,255,255,0.1);
}
.nav-link.active {
    color: var(--accent);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
}
/* HERO SECTION (2 KOLOM & LEBIH PADAT) */
/* HERO SECTION (BACKGROUND GAMBAR & OVERLAY) */
.hero {
    position: relative; overflow: hidden;
    padding: 90px 0 20px; 
    color: white; 
    /* Lapisan gradient biru donker transparan (0.95 s/d 0.6 opacity) yang menimpa gambar */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 100%), 
                url('https://sigemas.pa-semarang.go.id/assets/images/slide.png');
    background-size: cover;
    background-position: center;
    /* Aktifkan kode di bawah ini jika ingin ada efek parallax (gambar diam saat di-scroll) */
    /* background-attachment: fixed; */
}
.hero::before {
    content: ''; position: absolute; top: -30%; right: -10%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
    border-radius: 50%; z-index: 1;
}

.hero-inner {
    position: relative; z-index: 5; max-width: 1220px; width: 100%;
    margin: auto; padding: 0 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.hero-text {
    flex: 1; max-width: 600px;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
    padding: 8px 16px; background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 100px;
    color: var(--accent); font-size: 12px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.hero h1 {
    margin: 0; font-family: "Playfair Display", serif;
    font-size: clamp(36px, 5vw, 60px); line-height: 1.15; letter-spacing: -0.02em;
}
.hero h1 span {
    background: linear-gradient(120deg, #FBBF24, #D4AF37);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-description {
    margin-top: 20px; color: #94A3B8; font-size: 15px; line-height: 1.7;
}

/* HERO VISUAL KANAN (GLASS ANIMATION) */
.hero-visual {
    position: relative; width: 400px; height: 350px;
    display: flex; align-items: center; justify-content: center;
}
.glass-orb {
    position: absolute; border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.01));
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; color: var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.orb-main {
    width: 200px; height: 200px; font-size: 80px; z-index: 3;
    animation: float 6s ease-in-out infinite;
}
.orb-sub1 {
    width: 90px; height: 90px; top: 20px; right: 30px; font-size: 32px; z-index: 2;
    animation: float 7s ease-in-out infinite reverse;
}
.orb-sub2 {
    width: 110px; height: 110px; bottom: 30px; left: 10px; font-size: 40px; z-index: 4;
    animation: float 5s ease-in-out infinite 1s;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* MAIN CONTENT OVERLAP */
/* MAIN CONTENT FULL WIDTH */
main { 
    position: relative; 
    z-index: 10;
    width: 100%;       /* Pastikan mengambil 100% lebar */
    max-width: none;   /* Hapus batasan maksimum lebar */
    margin: 0;         /* Hilangkan auto margin agar tidak di tengah */
    padding: 40px 90px 40px; /* Padding kiri-kanan tetap aman */
}

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.section-number {
    display: inline-block; margin-bottom: 12px; color: var(--accent);
    font-size: 13px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
}
.section-heading h2 { max-width: 500px; margin: 0; color: var(--primary); font-family: "Playfair Display", serif; font-size: clamp(28px, 4vw, 36px); line-height: 1.2; }
.section-heading p { max-width: 400px; margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.section-divider { height: 1px; margin: 70px 0; background: linear-gradient(to right, transparent, var(--border), transparent); }

/* APP CARD - GRID 2 KOLOM */
.app-list {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* Diubah menjadi 3 kolom */
    gap: 20px;
}
.app-card {
    position: relative; background: var(--surface); padding: 24px; /* Padding sedikit dikurangi */
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden; border: 1px solid rgba(255,255,255,0.8);
    display: flex; flex-direction: column;
}
.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 0 4px 6px rgba(15, 23, 42, 0.04);
}
.app-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-glow)); opacity: 0.8;
}
.app-index {
    position: absolute; right: -5px; top: -15px; color: rgba(15, 23, 42, 0.03);
    font-family: "Playfair Display", serif; font-size: 110px; line-height: 1; /* Ukuran angka diperkecil sedikit */
    font-weight: 800; pointer-events: none; z-index: 1; transition: color 0.3s ease;
}
.app-card:hover .app-index { color: rgba(212, 175, 55, 0.06); }

/* LAYOUT CARD INTERNAL */
.app-main {
    position: relative; z-index: 2; display: grid;
    grid-template-columns: 64px minmax(0, 1fr); /* Lebar kolom ikon diperkecil */
    gap: 16px; flex-grow: 1;
}
.app-icon-wrapper {
    width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
    padding: 10px; background: var(--surface-alt); border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 6px 12px rgba(15,23,42,0.05);
}
.app-icon { width: 100%; height: 100%; object-fit: contain; }
.app-icon-fallback { color: var(--primary); font-size: 28px; opacity: 0.3; }

.app-name { margin: 0; color: var(--primary); font-size: 18px; font-weight: 800; letter-spacing: -0.02em; } /* Font judul diperkecil */
.app-tagline { margin-top: 4px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.app-description {
    margin-top: 10px; color: var(--text-muted); font-size: 12px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.app-type {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 8px; padding: 4px 10px; border-radius: 100px;
    font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
}
.app-type-public { color: var(--badge-public-text); background: var(--badge-public-bg); }
.app-type-internal { color: var(--badge-internal-text); background: var(--badge-internal-bg); }

/* META LAYOUT */
.app-meta {
    position: relative; z-index: 2; display: grid;
    grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; padding-top: 16px;
    border-top: 1px dashed var(--border);
}
.meta-item {
    padding: 8px 10px; background: #F8FAFC; border: 1px solid #F1F5F9; border-radius: 10px;
}
.meta-label {
    margin-bottom: 2px; color: #94A3B8; font-size: 9px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
}
.meta-value { color: var(--primary); font-size: 11px; font-weight: 700; }

/* BUTTONS */
.app-actions {
    position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px;
}
.btn {
    min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 0 12px; border-radius: 8px; font-size: 11px; font-weight: 700;
    transition: all 0.3s ease; cursor: pointer; flex: 1; /* flex: 1 agar tombol membagi ruang rata jika berjejer */
    white-space: nowrap;
}
.btn-primary { color: white; background: var(--primary); box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 6px 14px rgba(212, 175, 55, 0.25); transform: translateY(-2px); color: var(--primary); }
.btn-secondary { color: var(--primary); background: var(--surface); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-alt); border-color: #CBD5E1; transform: translateY(-2px); }
.btn-gold { color: #B45309; background: #FEF3C7; border: 1px solid #FDE68A; }
.btn-gold:hover { background: #FDE68A; transform: translateY(-2px); }

/* STATE BOX */
.state-box {
    grid-column: 1 / -1; padding: 60px 20px; text-align: center;
    background: var(--surface); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.spinner {
    width: 36px; height: 36px; margin: 0 auto 16px; border: 3px solid var(--surface-alt);
    border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state-icon { margin-bottom: 12px; color: var(--border); font-size: 42px; }
.state-title { font-size: 16px; font-weight: 700; color: var(--primary); }
.state-description { max-width: 450px; margin: 6px auto 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; }

/* CLOSING BANNER */
/* CLOSING BANNER (BACKGROUND GAMBAR & OVERLAY) */
.closing {
    position: relative; overflow: hidden; margin-top: 50px; padding: 70px 50px;
    border-radius: 24px; color: white;
    text-align: center; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    /* Lapisan transparan yang makin ke bawah makin gelap */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95)), 
                url('https://sigemas.pa-semarang.go.id/assets/images/slide.png');
    background-size: cover;
    background-position: center;
}
.closing::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
}
.closing-label {
    position: relative; z-index: 2; color: var(--accent);
    font-size: 12px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase;
}
.closing h2 {
    position: relative; z-index: 2; max-width: 700px; margin: 16px auto 0;
    font-family: "Playfair Display", serif; font-size: clamp(28px, 4vw, 42px); line-height: 1.2;
}
.closing p {
    position: relative; z-index: 2; max-width: 600px; margin: 16px auto 0;
    color: #94A3B8; font-size: 14px; line-height: 1.8;
}

/* FOOTER */
footer { background: #0B1120; color: #64748B; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-inner { max-width: 1220px; margin: auto; padding: 40px 28px; display: flex; align-items: center; justify-content: space-between; }
.footer-brand { color: white; font-size: 13px; font-weight: 800; letter-spacing: 0.05em; }
.footer-copy { margin-top: 6px; font-size: 12px; }
.footer-mark { color: var(--accent); font-size: 24px; opacity: 0.8; }






        /* TABLES */
        .table-modern { margin-bottom: 0; font-size: 13px; }
        .table-modern thead th {
            background: var(--surface-alt); color: var(--text-muted); border-bottom: 1px solid var(--border);
            font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 16px;
        }
        .table-modern tbody td { padding: 16px; border-color: var(--border); vertical-align: middle; }
        .app-name { font-weight: 700; color: var(--primary); font-size: 14px; }
        
        /* Modifikasi untuk Tabel 12 Bulan yang Padat */
        .table-annual th { padding: 14px 10px; font-size: 10px; }
        .table-annual td { padding: 12px 10px; font-size: 12px; }
        .table-annual .app-name { font-size: 12px; }
        .table-annual .rank-number { width: 28px; height: 28px; font-size: 11px; }

        .rank-number {
            width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
            border-radius: 12px; background: var(--surface-alt); color: var(--text-muted); font-weight: 800;
        }
        .rank-top { background: linear-gradient(135deg, var(--accent), #FDE68A); color: #B45309; box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3); }

        /* BADGES & PROGRESS */
        .trend-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
        .trend-up { color: #059669; background: #D1FAE5; }
        .trend-down { color: #E11D48; background: #FFE4E6; }
        .trend-flat { color: var(--text-muted); background: var(--surface-alt); }
        
        .period-badge {
            display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 12px;
            color: var(--primary); background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 700;
        }
        .progress { height: 8px; background: var(--surface-alt); border-radius: 20px; overflow: hidden; }
        .progress-bar { background: var(--primary); }

        /* BUTTONS */
        .btn-theme {
            display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 12px; font-size: 13px; font-weight: 700; transition: all 0.3s ease;
        }
        .btn-theme-primary { color: white; background: var(--primary); border: none; }
        .btn-theme-primary:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }
        .btn-theme-secondary { color: var(--primary); background: white; border: 1px solid var(--border); }
        .btn-theme-secondary:hover { background: var(--surface-alt); transform: translateY(-2px); }

        .chart-wrapper { position: relative; height: 350px; padding: 20px; }
        .empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); }
        .empty-state i { font-size: 48px; color: var(--border); margin-bottom: 16px; display: block; }
        .dashboard-footer { text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px 0; font-weight: 500; }

        .dashboard-wrapper { max-width: 1450px; margin: 0 auto; padding: 0px 0 20px; }

        /* HEADER BANNER */
        .dashboard-header {
            /*            position: relative; overflow: hidden; border-radius: var(--radius);
            padding: 50px 40px; */
            position: relative; overflow: hidden;
            /*padding: 90px 0 20px; */
            padding: 50px 40px;
            color: white;             
            /*color: white;*/
            /*background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 100%), url('assets/img/slide.png');*/
            /*background-size: cover; background-position: center;*/
            /*box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);*/
            /* Lapisan gradient biru donker transparan (0.95 s/d 0.6 opacity) yang menimpa gambar */
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 100%), 
            url('https://sigemas.pa-semarang.go.id/assets/images/slide.png');
            background-size: cover;
            background-position: center;            
        }
        .dashboard-header::before {
            content: ''; position: absolute; top: -30%; right: -10%;
            width: 700px; height: 700px;
            background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
            border-radius: 50%; z-index: 1;
        }

        .header-icon {
            width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
            border-radius: 16px; background: rgba(212, 175, 55, 0.2); border: 1px solid rgba(212, 175, 55, 0.4);
            font-size: 28px; color: var(--accent); margin-bottom: 20px;
        }

        /* CARDS (Stat & Content) */
        .filter-card, .stat-card, .content-card {
            background: var(--surface); border: 1px solid rgba(255,255,255,0.8);
            border-radius: 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08); }
        .filter-card { margin-top: -30px; position: relative; z-index: 5; }
        .stat-card { padding: 24px; height: 100%; display: flex; flex-direction: column; justify-content: space-between;}
        
        .stat-icon {
            width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
            font-size: 24px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--primary);
        }
        .icon-gold { color: #B45309; background: #FEF3C7; border-color: #FDE68A; }
        .stat-label { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;}
        .stat-number { font-size: 32px; font-weight: 800; color: var(--primary); font-family: "Playfair Display", serif; }

        .content-card-header { padding: 24px; border-bottom: 1px dashed var(--border); }
        .section-title { font-size: 18px; font-weight: 800; color: var(--primary); margin: 0; }
        .section-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }









/* RESPONSIVE TABLET */
@media (max-width: 950px) {
    .app-list { grid-template-columns: 1fr; }
    .hero-inner { flex-direction: column; text-align: center; }
    .hero-text { margin-bottom: 20px; }
    .hero-visual { display: none; } /* Hilangkan 3D box di layar kecil */
    .section-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* RESPONSIVE MOBILE */
@media (max-width: 650px) {
    .hero { padding: 110px 0 60px; }
    .app-card { padding: 24px 20px; }
    .app-index { right: -5px; top: -15px; bottom: auto; font-size: 120px; }
    .app-main { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
    .app-icon-wrapper { width: 72px; height: 72px; padding: 10px; border-radius: 16px; }
    .app-name { font-size: 18px; }
    .app-actions { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .closing { padding: 40px 24px; border-radius: 20px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}
