@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep: #020617; --bg-card: #0f172a; --bg-input: #1e293b;
    --primary: #10b981; --primary-dim: #059669; --accent: #3b82f6;
    --text-white: #ffffff; --text-gray: #94a3b8;
    --border: rgba(255, 255, 255, 0.08); --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--bg-deep); color: var(--text-white); font-size: 0.95rem; overflow-x: hidden; }

h1,h2,h3,h4,h5,h6,label,.text-white-force { color: #fff !important; font-weight: 700; }
.text-muted { color: var(--text-gray) !important; }
a { text-decoration: none; color: var(--primary); transition: 0.3s; }

/* INPUTS */
.form-control, .form-select, .input-group-text {
    background-color: var(--bg-input) !important; border: 1px solid var(--border) !important;
    color: #fff !important; padding: 0.6rem 1rem; border-radius: 10px; font-weight: 500;
}
.form-control:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
.form-control::placeholder { color: #94a3b8 !important; opacity: 0.7; }
input[type="date"] { color-scheme: dark; }
input[type="file"] { padding: 0.4rem !important; }

/* LOGIN */
#particles-js { position: fixed; width: 100%; height: 100%; background-color: var(--bg-deep); z-index: 1; top: 0; left: 0; }
.login-wrapper { 
    position: relative; z-index: 2; min-height: 100vh; width: 100%;
    display: flex; align-items: center; justify-content: center; 
    padding: 20px;
}
.login-card {
    width: 100%; max-width: 400px;
    background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.login-icon-wrap {
    width: 70px; height: 70px; margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(59,130,246,0.2));
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 0 20px rgba(16,185,129,0.2);
}

/* LAYOUT */
.app-wrapper { display: flex; width: 100%; min-height: 100vh; position: relative; z-index: 2; }
.sidebar {
    width: 280px; background: var(--bg-card); border-right: 1px solid var(--border);
    height: 100vh; position: fixed; display: flex; flex-direction: column; z-index: 1000;
}
.sidebar-header {
    padding: 2rem 1.5rem; display: flex; align-items: center; gap: 12px;
    font-weight: 800; font-size: 1.4rem; color: var(--primary);
    background: linear-gradient(180deg, rgba(16,185,129,0.08), transparent);
}
.sidebar-menu { padding: 1rem; flex: 1; overflow-y: auto; }
.menu-item {
    display: flex; align-items: center; gap: 14px; padding: 14px 20px; color: var(--text-gray);
    border-radius: 12px; margin-bottom: 6px; font-weight: 600; transition: 0.3s; border: 1px solid transparent;
}
.menu-item:hover { background: rgba(255,255,255,0.03); color: #fff; transform: translateX(5px); }
.menu-item.active {
    background: linear-gradient(90deg, rgba(16,185,129,0.15), transparent);
    color: var(--primary); border: 1px solid rgba(16,185,129,0.3); box-shadow: inset 2px 0 0 var(--primary);
}

.main-content { 
    margin-left: 280px; width: calc(100% - 280px); padding: 2rem; 
    display: flex; flex-direction: column; min-height: 100vh; /* Agar footer bisa di push ke bawah */
}
.header-section {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;
    background: var(--bg-card); padding: 1.5rem 2rem; border-radius: var(--radius); border: 1px solid var(--border);
}

/* FOOTER FIX */
.main-footer { 
    margin-top: auto; /* Dorong ke bawah */
    padding-top: 30px; 
    padding-bottom: 10px;
    text-align: center; 
    color: var(--text-gray); 
    opacity: 0.8; 
    font-size: 0.85rem; 
}

/* GLASS PANEL */
.glass-panel {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); height: 100%;
    overflow: hidden;
}
.stat-card { display: flex; align-items: center; gap: 1.5rem; transition: 0.3s; position: relative; overflow: hidden; }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.stat-icon {
    width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; flex-shrink: 0; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.stat-value { font-size: 2rem; font-weight: 800; color: #fff; }

/* TABLE FIXES */
.table-responsive { border-radius: 12px; }
.table-custom, .table-custom-pro { width: 100%; border-collapse: collapse; }
.table > :not(caption) > * > * { background-color: transparent !important; color: var(--text-white); border-bottom-color: rgba(255,255,255,0.1); }
.table-hover > tbody > tr:hover > * { background-color: rgba(255,255,255,0.05) !important; color: #fff !important; --bs-table-accent-bg: transparent !important; }

.table-custom thead th, .table-custom-pro thead th {
    background-color: rgba(15, 23, 42, 0.9) !important;
    color: var(--text-gray); font-weight: 600; text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 1px; padding: 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); border-top: none;
}
.table-custom td, .table-custom-pro td {
    padding: 14px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle;
}
td.action-cell { 
    text-align: center !important; vertical-align: middle !important;
    display: flex; justify-content: center; align-items: center;
    gap: 8px; border-bottom: none; height: 100%; padding-top: 18px;
}

/* TABS */
.nav-tabs { border-bottom: 1px solid rgba(255,255,255,0.1); gap: 10px; padding-bottom: 15px; }
.nav-tabs .nav-link { 
    color: var(--text-gray); background: transparent; border: 1px solid transparent; 
    padding: 10px 20px; font-weight: 600; border-radius: 50px; transition: all 0.3s ease;
}
.nav-tabs .nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-tabs .nav-link.active { 
    color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dim)); 
    border: none; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); transform: translateY(-1px);
}
.nav-pills-custom { background: rgba(0,0,0,0.2); padding: 4px; border-radius: 12px; display: inline-flex; }
.nav-pills-custom .nav-link { color: var(--text-gray); border-radius: 8px; font-size: 0.9rem; font-weight: 600; transition: 0.3s; }
.nav-pills-custom .nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-pills-custom .nav-link.active { background: var(--primary); color: #fff; }
.report-filter-box { background: rgba(30, 41, 59, 0.5); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; }

/* DEV CARDS & RESTRICTED */
.dev-grid-card { 
    background: linear-gradient(145deg, #1e293b, #0f172a) !important; border: 1px solid var(--border); 
    border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 15px; height: 100%;
    position: relative; overflow: hidden; transition: transform 0.2s;
}
.dev-grid-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); }
.dev-icon-box { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: rgba(16, 185, 129, 0.1); color: var(--primary); flex-shrink: 0; }
.dev-info label { display: block; font-size: 0.75rem; color: var(--text-gray); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.dev-info div, .dev-info p { font-weight: 600; color: #fff; margin: 0; font-size: 0.95rem; }
.copy-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin-left: auto; color: #fff; cursor: pointer; transition: 0.2s; background: rgba(255,255,255,0.05); }
.copy-btn:hover { background: rgba(255,255,255,0.15); }

.restricted-zone {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: 
        linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95)),
        repeating-linear-gradient(0deg, transparent 0, transparent 1px, rgba(239, 68, 68, 0.1) 1px, rgba(239, 68, 68, 0.1) 2px),
        repeating-linear-gradient(90deg, transparent 0, transparent 1px, rgba(239, 68, 68, 0.1) 1px, rgba(239, 68, 68, 0.1) 2px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 2rem;
}
.restricted-icon-box {
    width: 100px; height: 100px; border-radius: 50%; background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.5); display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem; box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
    animation: pulseRed 2s infinite;
}
.restricted-badge {
    background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 5px 15px; border-radius: 50px; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 1rem; font-weight: 700;
}
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* MOBILE & UTILS */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); padding: 10px 0; z-index: 2000;
}
.nav-btn { color: #64748b; display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; flex: 1; gap: 4px; padding: 5px; }
.nav-btn.active { color: var(--primary); }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); display: none; }
    .main-content { margin-left: 0; width: 100%; padding: 1rem; padding-bottom: 90px; }
    .bottom-nav { display: flex; }
    .header-section { flex-direction: column; align-items: flex-start; gap: 1rem; }
    
    table thead { display: none; }
    table tbody tr {
        display: block; margin-bottom: 1rem; background: rgba(255,255,255,0.03) !important;
        border: 1px solid var(--border); border-radius: 12px; padding: 1rem;
    }
    table tbody td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.5rem 0; border-bottom: 1px dashed rgba(255,255,255,0.05); text-align: right;
    }
    table tbody td.action-cell { display: flex; justify-content: flex-end; padding-top: 0.5rem; }
    table tbody td:last-child { border-bottom: none; }
    table tbody td::before {
        content: attr(data-label); font-weight: 700; color: var(--text-gray);
        font-size: 0.75rem; margin-right: 1rem; text-transform: uppercase;
    }
}

.badge { padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; }
.animate-fade { animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
div:where(.swal2-popup) { background: #1e293b !important; color: #fff !important; border: 1px solid var(--border); }