/* Import Poppins Font (Add this at the very top of your style.css) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* General Body Styling */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    /* Latar belakang abu-abu muda */
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 0.9em;
    /* Ukuran font dasar sedikit lebih kecil */
}

/* Header */
.main-header {
    background-color: #0d47a1;
    /* Biru tua */
    color: white;
    padding: 10px 20px;
    /* Padding lebih kecil */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.main-header .logo a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    /* Ukuran logo di header lebih kecil */
    font-weight: 700;
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    /* Jarak antar menu lebih kecil */
    font-weight: 500;
    font-size: 0.9em;
    /* Ukuran font menu lebih kecil */
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #cce5ff;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    /* Padding lebih kecil */
    margin-top: auto;
    font-size: 0.8em;
}

/* --- Login Page Specific Styling (tetap sama dari sebelumnya) --- */
.login-page {
    /* ... */
}

.login-top-background {
    /* ... */
}

.login-logo-section {
    /* ... */
}

.logo-circle {
    /* ... */
}

.logo-text h2 {
    /* ... */
}

.logo-text p {
    /* ... */
}

.login-illustration {
    /* ... */
}

.login-illustration img {
    /* ... */
}

.login-illustration h3 {
    /* ... */
}

.login-container {
    /* ... */
}

.login-title {
    /* ... */
}

.error-box {
    /* ... */
}

.login-form .input-group {
    /* ... */
}

.login-form .input-group .icon {
    /* ... */
}

.login-form input[type="text"],
.login-form input[type="password"] {
    /* ... */
}

.btn-login {
    /* ... */
}

.forgot-password {
    /* ... */
}

/* --- Dashboard Page Specific Styling (Perubahan Besar di Sini) --- */
.dashboard-page {
    background-color: #f0f2f5;
    /* Latar belakang abu-abu muda */
}

.dashboard-main-content {
    width: 95%;
    max-width: 500px;
    /* Lebar maksimum lebih kecil agar mobile-first */
    margin: 0 auto;
    /* Pusatkan */
    padding: 15px;
    /* Padding lebih kecil */
    box-sizing: border-box;
}

.dashboard-greeting {
    background-color: #f0f2f5;
    /* Sesuaikan dengan latar belakang body */
    padding: 15px 0;
    text-align: left;
    margin-bottom: 10px;
}

.dashboard-greeting p {
    margin: 0;
    color: #666;
    font-size: 0.8em;
    /* Lebih kecil */
}

.dashboard-greeting h2 {
    margin: 5px 0 0;
    color: #0d47a1;
    font-size: 1.4em;
    /* Lebih kecil */
    font-weight: 600;
}

/* Balance Card (Recreated to match new reference) */
.card.balance-card {
    background: linear-gradient(to right, #4CAF50, #81C784);
    /* Gradien hijau */
    color: white;
    padding: 20px;
    /* Padding lebih kecil */
    border-radius: 15px;
    margin-bottom: 25px;
    /* Jarak antar elemen */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header h3 {
    margin: 0;
    font-size: 1em;
    /* Lebih kecil */
    font-weight: 500;
}

.more-icon {
    font-size: 1.2em;
    cursor: pointer;
}

.balance-amount {
    font-size: 2.2em;
    /* Ukuran dana terkumpul lebih kecil */
    font-weight: 700;
    margin-bottom: 15px;
}

.target-info {
    font-size: 0.8em;
    /* Ukuran font info target lebih kecil */
    opacity: 0.9;
}

.target-info p {
    margin: 3px 0;
    display: flex;
    justify-content: space-between;
    /* Untuk meratakan teks kiri dan kanan */
}

.target-info p span {
    font-weight: 600;
}

.error-msg-inline {
    color: #ffe082;
    /* Warna kuning muda untuk error di card */
    font-size: 0.8em;
    margin-top: 5px;
}


/* Section Titles */
.section-title-dashboard {
    /* Nama kelas baru untuk judul bagian di dashboard */
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.section-title-dashboard h3 {
    color: #0d47a1;
    font-size: 1.1em;
    /* Ukuran font lebih kecil */
    margin: 0;
    font-weight: 600;
}

/* Action Buttons (Bendahara) */
.action-buttons {
    display: grid;
    /* Menggunakan Grid untuk tata letak yang rapi */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    /* Kolom responsif */
    gap: 10px;
    /* Jarak antar tombol lebih kecil */
    margin-bottom: 25px;
}

.btn-dashboard-action {
    /* Nama kelas baru */
    background-color: #007bff;
    /* Biru */
    color: white;
    padding: 10px 12px;
    /* Padding lebih kecil */
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85em;
    /* Ukuran font lebih kecil */
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    /* Mencegah teks pecah baris */
}

.btn-dashboard-action:hover {
    background-color: #0056b3;
}


/* Anggota Progress List (Mengganti .anggota-list dan .anggota-item) */
.anggota-progress-list {
    margin-bottom: 25px;
    /* Jarak */
}

.anggota-progress-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 15px;
    /* Padding lebih kecil */
    margin-bottom: 8px;
    /* Jarak antar item lebih kecil */
}

.anggota-info-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.anggota-name-compact {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    /* Ukuran font lebih kecil */
}

.anggota-amount-compact {
    font-weight: 600;
    color: #28a745;
    /* Hijau */
    font-size: 0.9em;
    /* Ukuran font lebih kecil */
}

/* Progress Bar Compact */
.progress-bar-container-compact {
    width: 100%;
    background-color: #e9ecef;
    /* Warna track abu-abu lebih soft */
    border-radius: 10px;
    /* Lebih bulat */
    height: 8px;
    /* Sedikit lebih tebal agar warna terlihat jelas */
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar-compact {
    height: 100%;
    /* background-color dihapus dari sini karena sekarang diatur via PHP (inline style) */
    border-radius: 10px;
    transition: width 0.6s ease-in-out;
}

/* Persentase saya sarankan taruh di kanan bawah bar, 
   karena kalau di dalam bar dan barnya masih pendek (merah), angkanya tidak muat */
.progress-percentage-compact {
    font-size: 0.75em;
    color: #6c757d;
    font-weight: 500;
}

/* Menyembunyikan persentase jika bar terlalu kecil, opsional */
.progress-bar-container-compact .progress-bar-compact[style*="width: 0%"]+.progress-percentage-compact {
    display: none;
}


/* Empty State/Info Message */
.info-empty-state {
    text-align: center;
    padding: 20px;
    background-color: #e0f7fa;
    border: 1px solid #b2ebf2;
    border-radius: 10px;
    color: #007985;
    font-size: 0.9em;
    margin-bottom: 25px;
}


.btn-dashboard-logout {
    background-color: #dc3545;
    /* Merah */
    color: white;
    padding: 12px 0;
    /* Padding atas-bawah */
    border: none;
    border-radius: 25px;
    /* Membuat sudut lebih bulat (pill shape) agar lebih modern */
    cursor: pointer;
    width: 80%;
    /* Lebar tombol 80% dari kontainer, tidak full 100% */
    max-width: 300px;
    /* Batas maksimal lebar agar tidak kebesaran di layar lebar */
    font-size: 1em;
    font-weight: 600;
    margin: 30px auto 10px auto;
    /* Margin atas 30px, bawah 10px, kiri-kanan auto (tengah) */
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.3);
    /* Sedikit bayangan agar pop-up */
}

.btn-dashboard-logout:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    /* Efek naik sedikit saat di-hover */
}

.btn-dashboard-logout:active {
    transform: translateY(0);
}


/* --- Form Pages Styling (tambah_anggota.php, tambah_tabungan.php, kelola_kegiatan.php) --- */
.form-page {
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.form-container {
    flex: 1;
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
    /* Margin atas/bawah lebih kecil */
    padding: 25px;
    /* Padding lebih kecil */
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.form-container h1 {
    color: #0d47a1;
    text-align: center;
    margin-bottom: 25px;
    /* Margin lebih kecil */
    font-size: 1.5em;
    /* Ukuran font lebih kecil */
}

.form-container label {
    margin-bottom: 5px;
    /* Margin lebih kecil */
    font-size: 0.9em;
    /* Ukuran font lebih kecil */
}

.form-container input[type="text"],
.form-container input[type="number"],
.form-container select,
.form-container textarea {
    padding: 10px 15px;
    margin-bottom: 15px;
    /* Margin lebih kecil */
    font-size: 0.9em;
    /* Ukuran font lebih kecil */
}

.btn-submit {
    padding: 12px 20px;
    /* Padding lebih kecil */
    font-size: 1em;
    /* Ukuran font lebih kecil */
}

.btn-back {
    margin-top: 15px;
    /* Margin lebih kecil */
    font-size: 0.9em;
    /* Ukuran font lebih kecil */
}

/* Kelola Kegiatan Specific (Adjusted for smaller fonts/spacing) */
.form-add-kegiatan label,
.kegiatan-item label {
    font-size: 0.9em;
}

.kegiatan-item h4 {
    font-size: 1em;
    /* Ukuran font lebih kecil */
}

.kegiatan-item p {
    font-size: 0.8em;
    /* Ukuran font lebih kecil */
}

.kegiatan-actions {
    margin-top: 10px;
}

.btn-toggle-status,
.btn-delete {
    padding: 6px 12px;
    /* Padding tombol aksi lebih kecil */
    font-size: 0.8em;
    /* Ukuran font lebih kecil */
}

.kegiatan-item.active {
    border-left: 3px solid #28a745;
    /* Garis lebih tipis */
}


/* Responsive Adjustments */
@media (max-width: 480px) {
    body {
        font-size: 0.85em;
        /* Ukuran font dasar sedikit lebih kecil lagi */
    }

    .main-header {
        padding: 8px 15px;
    }

    .main-header .logo a {
        font-size: 1.1em;
    }

    .main-nav a {
        margin-left: 10px;
        font-size: 0.8em;
    }

    .dashboard-main-content {
        padding: 10px;
    }

    .dashboard-greeting h2 {
        font-size: 1.2em;
    }

    .card.balance-card {
        padding: 18px;
        margin-bottom: 20px;
    }

    .balance-amount {
        font-size: 2em;
    }

    .section-title-dashboard h3 {
        font-size: 1em;
    }

    .action-buttons {
        gap: 8px;
        margin-bottom: 20px;
    }

    .btn-dashboard-action {
        padding: 8px 10px;
        font-size: 0.8em;
    }

    .anggota-progress-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .anggota-name-compact,
    .anggota-amount-compact {
        font-size: 0.85em;
    }

    .progress-bar-container-compact {
        height: 5px;
    }

    .progress-percentage-compact {
        font-size: 0.65em;
    }

    .btn-dashboard-logout {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .form-container {
        margin: 15px auto;
        padding: 20px;
    }

    .form-container h1 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }
}


/* --- Common Styles (Forms & Cards) --- */
.light-bg {
    background-color: #f0f2f5;
    min-height: 100vh;
}

.main-container {
    width: 95%;
    max-width: 450px;
    /* Lebar konsisten dengan dashboard */
    margin: 20px auto;
}

.card-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.card-header-simple h3 {
    margin: 0;
    color: #0d47a1;
    font-size: 1.1em;
}

.close-btn {
    color: #999;
    font-size: 1.1em;
}

/* Forms */
.standard-form .form-group {
    margin-bottom: 15px;
}

.standard-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.85em;
    color: #555;
}

.standard-form input,
.standard-form select,
.standard-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9em;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    /* Penting agar padding tidak jebol */
}

.standard-form input:focus {
    border-color: #007bff;
    outline: none;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.btn-primary-full {
    width: 100%;
    background-color: #007bff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 25px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95em;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-primary-full:hover {
    background-color: #0056b3;
}

/* Login Page Styles */
.login-page {
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-top-background {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    width: 100%;
    padding: 40px 20px 80px 20px;
    /* Bawah dilebihkan untuk overlap */
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    color: white;
    text-align: center;
}

.login-header-content {
    max-width: 400px;
    margin: 0 auto;
}

.app-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 2.5em;
}

.app-branding h2 {
    margin: 0;
    font-size: 1.4em;
}

.app-branding p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.8em;
}

.welcome-text h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.welcome-text p {
    margin: 5px 0;
    font-size: 0.85em;
    opacity: 0.9;
}

.login-card {
    background: white;
    width: 85%;
    max-width: 350px;
    border-radius: 15px;
    padding: 30px 25px;
    margin-top: -50px;
    /* Overlap effect */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.form-title {
    text-align: center;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.compact-form .input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.compact-form .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.9em;
}

.compact-form input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    /* Kiri ada space untuk icon */
    border: 1px solid #ddd;
    border-radius: 25px;
    /* Input bulat */
    background: #f9f9f9;
    font-size: 0.9em;
    box-sizing: border-box;
}

.login-footer {
    text-align: center;
    font-size: 0.8em;
    color: #888;
    margin-top: 20px;
}

/* Activity List Items (Kelola Kegiatan) */
.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 15px 0;
    color: #888;
    font-size: 0.8em;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.section-divider span {
    padding: 0 10px;
}

.activity-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.activity-card.active-border {
    border-left: 4px solid #28a745;
    background-color: #fafffb;
}

.act-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.act-header h4 {
    margin: 0;
    font-size: 1em;
    color: #333;
}

.badge-active {
    background: #28a745;
    color: white;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 10px;
}

.act-details p {
    margin: 2px 0;
    font-size: 0.85em;
    color: #666;
}

.act-actions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-small {
    padding: 5px 12px;
    font-size: 0.8em;
    border-radius: 15px;
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
}

.btn-outline-green {
    border-color: #28a745;
    color: #28a745;
}

.btn-outline-orange {
    border-color: #fd7e14;
    color: #fd7e14;
}

.btn-outline-red {
    border-color: #dc3545;
    color: #dc3545;
}

/* Alerts */
.alert-box {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85em;
    margin-bottom: 15px;
}

.alert-box.error,
.error-banner {
    background: #ffebe9;
    color: #cc0000;
    border: 1px solid #ffcdd2;
}

.alert-box.success {
    background: #e6fffa;
    color: #007a5e;
    border: 1px solid #b2f5ea;
}

.activity-badge {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85em;
    margin-bottom: 15px;
}

/* Tambahan untuk tombol Edit */
.btn-outline-blue {
    border-color: #007bff;
    color: #007bff;
}

.btn-outline-blue:hover {
    background-color: #f0f8ff;
}