@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- PENGAMAN GLOBAL --- */
* {
    box-sizing: border-box;
}

:root {
    --primary: #1e40af;
    --accent: #3b82f6;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #111827;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    margin: 0;
    color: var(--text);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- FIX: HEADER KIRI & KANAN --- */
header {
    display: flex;
    justify-content: space-between; /* Menendang konten ke ujung kiri dan kanan */
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    width: 100%;
}

header h2 {
    margin: 0;
    color: var(--primary);
    font-weight: 800;
}

header a {
    color: #ef4444;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

/* --- KUNCI TAMPILAN DESKTOP --- */
.grid-layout {
    display: flex;
    flex-direction: row; 
    gap: 30px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
}

.sidebar {
    width: 320px;      
    flex-shrink: 0;    
}

/* --- DESIGN CARDS --- */
.card {
    background: var(--card);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.card-balance {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border: none;
}

.btn-action {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-white { background: white; color: var(--primary); }
.btn-outline { border: 1px solid white; color: white; margin-left: 10px; }

/* --- INPUT & FORM STYLING --- */
input[type="number"], 
input[type="file"], 
input[type="text"], 
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* --- CUSTOMER SERVICE WHATSAPP --- */
.floating-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    text-decoration: none;
}

.floating-wa img {
    width: 35px;
    height: 35px;
}

.wa-tooltip {
    position: absolute;
    right: 75px;
    background: #1e293b;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.floating-wa:hover .wa-tooltip {
    opacity: 1;
    visibility: visible;
}

/* --- RESPONSIVE FIX --- */
@media (max-width: 992px) {
    .grid-layout {
        flex-direction: column;
    }
    .sidebar, .main-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Menjaga Header Tetap Kiri-Kanan di HP */
    header {
        flex-direction: row !important; /* Mencegah tumpuk ke bawah */
        justify-content: space-between !important;
        padding: 15px 0;
    }

    header h2 {
        font-size: 20px;
    }

    .card, .container, form {
        width: 100% !important;
        padding: 15px !important;
    }

    /* Memaksa Grid Inline agar Turun ke Bawah di HP */
    div[style*="display: grid"],
    div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .card-balance h1 {
        font-size: 24px !important;
        word-break: break-all;
    }

    .btn-action, .btn-outline, .btn-white {
        width: 100% !important;
        margin-left: 0 !important;
        text-align: center;
        display: block !important;
    }
}