/* ==================================== */
/* 1. GAYA DASAR & UTAMA                */
/* ==================================== */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
}

.login-container, .dashboard-container, .container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 900px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* ==================================== */
/* 2. GAYA KARTU RINGKASAN              */
/* ==================================== */
.summary-cards {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

.card {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin: 0 0 5px;
    font-size: 1em;
    color: #555;
}

.card p {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
}

.pemasukan-card { border-left: 5px solid #4CAF50; }
.pengeluaran-card { border-left: 5px solid #F44336; }
.saldo-card { border-left: 5px solid #2196F3; }

/* ==================================== */
/* 3. GAYA TOMBOL NAVIGASI              */
/* ==================================== */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.btn {
    display: block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    flex-grow: 1;
}

.btn:hover { background-color: #0056b3; }

/* Tombol logout yang terpisah */
p a.btn {
    margin-top: 10px;
}

/* ==================================== */
/* 4. GAYA FORMULIR                     */
/* ==================================== */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.help-block {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

/* ==================================== */
/* 5. GAYA TABEL                        */
/* ==================================== */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9em; /* Ukuran font tabel yang sedikit lebih kecil */
}

table thead {
    background-color: #00BFFF;
    color: white;
}

table th, table td {
    padding: 12px 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tfoot tr {
    background-color: #FFC0CB;
    font-weight: bold;
    border-top: 2px solid #000;
}

/* ==================================== */
/* 6. RESPONSIVITAS (MEDIA QUERIES)     */
/* ==================================== */
@media (max-width: 768px) {
    .summary-cards {
        flex-direction: column;
    }
    
    .card {
        margin-bottom: 10px;
    }

    /* Membuat tabel lebih mudah dibaca di mobile */
    table, table tbody, table tr, table td, table th {
        display: block;
    }

    table thead {
        display: none;
    }

    table tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
    
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    /* Menggabungkan sel footer tabel */
    table tfoot td {
        display: inline-block;
        width: 100%;
        text-align: center;
        border: none;
    }
}