/* style.css - Gunakan versi bersih ini */

:root {
    --primary: #00449e;
    --success: #28a745;
    --light: #f4f7f6;
    --warning: #ffc107;
    --danger: #e53e3e;
    --purple: #6b46c1;
    --cyan: #00838f;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e2e8f0;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.dashboard {
    background: white;
    width: 100%;
    max-width: 1550px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: var(--primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid var(--warning);
}

.content { padding: 30px; }

.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-sizing: border-box;
}

.upload-box {
    border: 3px dashed #107c41;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    background: #f0fdf4;
    margin-bottom: 20px;
    display: none;
}

.upload-box:hover { border-color: #0b5e31; background: #dcfce7; }

.date-picker-box {
    background: #ebf8ff;
    border: 2px solid #90cdf4;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.date-picker-box input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #63b3ed;
    border-radius: 6px;
    font-weight: bold;
    color: var(--primary);
}

.section-title {
    color: var(--primary);
    border-left: 4px solid var(--primary);
    padding-left: 10px;
    margin-bottom: 15px;
    background: #ebf4ff;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
}

.title-baki { color: var(--danger); border-left-color: var(--danger); background: #fff5f5; }
.title-tung { color: var(--purple); border-left-color: var(--purple); background: #faf5ff; }
.title-pend { color: #4a5568; border-left-color: #4a5568; background: #edf2f7; }
#inputManualArea {
    display: none;
    background: #fffaf0;
    border: 1px solid #fbd38d;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

table.input-table, .table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    white-space: nowrap;
    text-align: center;
    margin-bottom: 15px;
}

th { background: #edf2f7; padding: 10px; border: 1px solid #cbd5e0; color: #2d3748; font-weight: bold; }
td { padding: 8px; border: 1px solid #cbd5e0; color: #4a5568; }

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
}

td:nth-child(2) { text-align: left; font-weight: bold; color: var(--primary); }
.uang { text-align: right !important; font-family: monospace; font-size: 12px; }

.row-jumlah td {
    font-weight: bold;
    background-color: #e2e8f0 !important;
    color: #1a202c !important;
    border-top: 2px solid #a0aec0;
}

.input-field {
    width: 90%;
    padding: 4px;
    text-align: center;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
}

.btn-group {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: 0.2s;
    flex: 1;
    min-width: 150px;
}

.btn-primary { background: var(--primary); }
.btn-pdf { background: #d32f2f; }
.btn-excel { background: #107c41; }
.btn-success { background: #28a745; }
.btn-danger { background: #e53e3e; }
.btn-cyan { background: var(--cyan); }

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #cbd5e0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #e2e8f0;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    color: #4a5568;
}

.tab-btn.active { background: var(--primary); color: white; }

.badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin: 0 5px;
    color: white;
}

.badge.green { background: #38a169; }
.badge.red { background: #e53e3e; }

/* ==========================================================
   CSS SAKTI UNTUK TAMPILAN MOBILE / HP (SUPER COMPACT / KECIL)
   ========================================================== */
@media screen and (max-width: 768px) {
    /* Kunci Layar 100% Pas Body HP */
    html, body { 
        width: 100vw !important; max-width: 100% !important;
        overflow-x: hidden !important; padding: 0 !important; margin: 0 !important;
    }
    
    body .dashboard { border-radius: 0 !important; box-shadow: none !important; }
    body .content, body .header-section { padding: 8px !important; } /* Jarak dikecilkan */

    /* 1. HEADER ATAS LEBIH KECIL & RAPI */
    body .header { padding: 10px !important; gap: 5px !important; text-align: center; }
    body .header h2 { font-size: 14px !important; margin: 0 !important; }
    body .header p { font-size: 10px !important; margin: 0 !important; }
    body .header a { 
        padding: 6px 15px !important; font-size: 10px !important; 
        width: auto !important; display: inline-block !important; margin-top: 5px !important;
    }

    /* 2. TOMBOL DIBUAT MINI & BERJEJER 2 KOLOM (Biar ga habisin layar ke bawah) */
    body .nav-tabs, body .btn-group, body #btn-group-pusat-nav {
        display: flex !important;
        flex-direction: row !important; /* Berjejer ke samping */
        flex-wrap: wrap !important; /* Kalau mentok, turun ke bawah */
        gap: 6px !important;
        justify-content: center !important;
    }
    
    body .btn-group .btn, body .nav-tabs .tab-btn, body #btn-group-pusat-nav .btn {
        width: calc(50% - 3px) !important; /* Tombol dibagi 2 bersebelahan */
        padding: 8px !important; /* Dibuat tipis */
        font-size: 10px !important; /* Huruf dikecilkan */
        margin: 0 !important;
        border-radius: 4px !important;
    }
    
    /* Tombol Konsolidasi biar tetap full lebar */
    body #btn-nav-konsolidasi { width: 100% !important; }

    /* 3. KOTAK TANGGAL SUPER COMPACT */
    body .date-picker-box { padding: 10px !important; margin-bottom: 10px !important; text-align: center; }
    body .date-picker-box h3 { font-size: 12px !important; margin-bottom: 5px !important; color: #c05621 !important; }
    body .date-picker-box input[type="date"], body .header-section input[type="date"] {
        padding: 6px !important; font-size: 11px !important; width: 100% !important; margin: 0 !important; box-sizing: border-box !important;
    }

    /* 4. TEKS JUDUL & TABEL DIBIKIN MUNGIL */
    body h4.section-title { font-size: 11px !important; padding: 6px 8px !important; margin-bottom: 8px !important; }
    
    body .table-container, body #area-tabel-keuangan, body #inputManualArea {
        width: 100% !important; max-width: 100vw !important; overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important; margin-bottom: 15px !important;
    }
    
    body table.input-table, body .table-container table, body .tabel-data { 
        font-size: 8.5px !important; /* Font tabel super kecil seperti di Excel HP */
    } 
    body th, body td { padding: 4px 3px !important; } /* Jarak dalam tabel ditipiskan */
}