/* --- 1. CSS SETUP TEMA PASTEL --- */
:root {
    --primary-color: #ffb7b2;
    --secondary-color: #b5ead7;
    --accent-color: #ffdac1;
    --header-color: #96ceb4;
    --text-dark: #555555;
    --text-light: #9ca3af;
    --bg-body: #f7fdfd;
    --bg-section-calc: #e9f5ff;
    --white: #ffffff;
    --chart-needs: #ff9aa2;
    --chart-wants: #ffdac1;
    --chart-save: #a0eacb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Quicksand', sans-serif; 
    line-height: 1.6; 
    color: var(--text-dark); 
    background-color: var(--bg-body); 
    overflow-x: hidden; 
    scroll-behavior: smooth; 
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* HEADER */
header { 
    background-color: var(--secondary-color); 
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); }
.nav-links { display: flex; gap: 2rem; flex-wrap: wrap; }
.nav-links a { 
    font-weight: 500; 
    color: var(--text-dark);
    padding: 5px 10px;
    transition: 0.3s; 
    border-radius: 10px;
    font-size: 0.95rem;
}
.nav-links a:hover { 
    color: var(--primary-color); 
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* HERO */
.hero { 
    padding: 4rem 0 6rem; 
    background: linear-gradient(135deg, var(--bg-body) 0%, #fff7f7 100%);
    display: flex; 
    align-items: center;
}
.hero-content { 
    display: flex; 
    align-items: center; 
    gap: 4rem;
    flex-wrap: wrap; 
}
.hero-text { flex: 1; min-width: 300px; }
.hero-text h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 1.5rem; color: var(--text-dark); }
.hero-text p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; }

.btn-cta { 
    display: inline-block; 
    padding: 12px 30px; 
    background-color: var(--primary-color); 
    color: white; 
    border-radius: 50px; 
    font-weight: 700; 
    transition: 0.3s; 
    box-shadow: 0 5px 15px rgba(255, 183, 178, 0.5);
}
.btn-cta:hover { background-color: var(--primary-color); transform: translateY(-3px) scale(1.02); }

.hero-image { flex: 1; text-align: center; position: relative; min-width: 250px; }
.piggy-bank { max-width: 80%; height: auto; border-radius: 20px; background: var(--primary-color); padding: 10px; }
.image-caption { margin-top: 10px; font-weight: 500; color: var(--text-dark); }

/* MAIN GRID */
.main-grid-section { padding: 5rem 0; background-color: var(--bg-body); }
.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.left-content, .right-content { padding: 0; }

.section-title-small { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin-bottom: 1.5rem; padding-top: 0.5rem; }

/* CARD */
.card { 
    background: var(--white); 
    border-radius: 20px; 
    padding: 2rem; 
    margin-bottom: 2rem; 
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); 
    border: 1px solid #f0f0f0;
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(181, 234, 215, 0.3); }

/* EDUCATION GRID */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.edu-item { 
    text-align: center; 
    padding: 1.5rem; 
    border-radius: 15px; 
    background: #fffafa; 
    border: 1px solid #ffeded;
    cursor: pointer;
    transition: 0.3s;
}
.edu-item:hover { background: var(--secondary-color); color: white; }
.edu-icon { font-size: 2rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.edu-item:hover .edu-icon { color: white; }
.edu-item p { font-size: 0.9rem; font-weight: 600; }

/* STATIC BAR CHART */
.chart-bar-container { margin-top: 2rem; }
.bar-group { margin-bottom: 1.5rem; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 700; color: var(--text-dark); }
.bar-bg { background-color: #f0f0f0; height: 25px; border-radius: 15px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 15px; width: 0; animation: fillBar 1.5s ease-out forwards; }
.needs .bar-fill { background: var(--chart-needs); }
.wants .bar-fill { background: var(--chart-wants); }
.save .bar-fill { background: var(--chart-save); }

@keyframes fillBar {
    from { width: 0; }
    to { width: 100%; }
}

/* CHECKLIST */
.checklist-item { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    padding: 1rem; 
    margin-bottom: 10px; 
    border-radius: 15px; 
    background: #f7fcfd; 
    border: 1px solid #eef;
}
.check-icon { color: var(--header-color); font-size: 1.2rem; }

/* PROFILE CARD */
.profile-card { text-align: center; border: 2px solid var(--accent-color); background: #fffef2; }
.profile-img-container { margin-bottom: 1rem; }
.profile-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary-color); }
.profile-info h4 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.profile-info p { font-size: 0.9rem; color: var(--text-light); }
.btn-profile { margin-top: 15px; background: var(--accent-color); color: var(--text-dark); padding: 8px 20px; border-radius: 20px; font-weight: 600; }

/* KALKULATOR SECTION */
.calculator-section { background-color: var(--bg-section-calc); padding: 5rem 0; border-radius: 30px; margin: 0 20px 40px; }
.calc-wrapper { background: var(--white); padding: 3rem; border-radius: 30px; max-width: 800px; margin: 0 auto; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); border: 2px solid var(--secondary-color); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.calc-info h3 { color: var(--header-color); margin-bottom: 1rem; }
.calc-description { color: var(--text-dark); opacity: 0.8; }

.form-group { margin-bottom: 1rem; }
.form-control { width: 100%; padding: 12px; border: 2px solid #eee; border-radius: 15px; font-family: inherit; }
.btn-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 1.5rem; }
.btn-calc { padding: 10px; font-size: 1.1rem; background: var(--secondary-color); color: white; border: none; border-radius: 10px; cursor: pointer; transition: 0.2s; }
.btn-calc:hover { background: var(--header-color); transform: scale(1.05); }

.result-box { margin-top: 1.5rem; background: #fff5f5; padding: 1rem; border-radius: 15px; text-align: center; border: 1px dashed var(--primary-color); }
.result-box span { display: block; font-size: 0.9rem; color: var(--text-light); }
.result-box strong { font-size: 1.5rem; color: var(--primary-color); }

/* FOOTER */
footer { background-color: var(--white); color: var(--text-dark); text-align: center; padding: 2rem 0; font-size: 0.9rem; border-top: 1px solid #eee; }
.footer-link { text-decoration: underline; color: var(--text-dark); }

/* FINANCE SECTION */
.finance-section { padding: 4rem 0; background-color: var(--bg-body); }
.finance-subtitle { color: var(--text-light); margin-bottom: 2rem; }
.finance-grid { display: grid; grid-template-columns: 1.2fr 1.2fr; gap: 2rem; margin-bottom: 2rem; }
.finance-card { height: 100%; }
.finance-card-title { font-size: 1.2rem; margin-bottom: 1.5rem; color: var(--text-dark); }

/* Form transaksi */
.transaction-form .form-group { margin-bottom: 1rem; }
.form-group-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.transaction-form label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; font-weight: 600; color: var(--text-dark); }
.transaction-form .form-control { width: 100%; padding: 10px 12px; border-radius: 12px; border: 2px solid #eee; font-family: inherit; font-size: 0.95rem; }
.transaction-form .form-control:focus { outline: none; border-color: var(--primary-color); }
.btn-full { width: 100%; text-align: center; margin-top: 0.5rem; }

/* Ringkasan */
.summary-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }
.summary-item { display: flex; justify-content: space-between; padding: 0.75rem 1rem; border-radius: 12px; background-color: #fdfdfd; border: 1px solid #f1f1f1; }
.summary-item.saldo { background-color: #e6fff1; border-color: #b6f3cf; }
.summary-label { font-size: 0.9rem; color: var(--text-light); }
.summary-value { font-weight: 700; font-size: 1rem; color: var(--text-dark); }

/* Chart wrapper */
.chart-wrapper { margin-top: 1rem; }

/* Tabel transaksi */
.finance-table-card { margin-top: 1.5rem; }
.table-wrapper { width: 100%; overflow-x: auto; }
.transaction-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.transaction-table thead { background-color: #fff7f7; }
.transaction-table th,
.transaction-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #f0f0f0; }
.transaction-table th { font-weight: 600; color: var(--text-dark); }
.transaction-table tbody tr:nth-child(even) { background-color: #fffdfd; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-text h1 { font-size: 2.5rem; }
    .calc-grid { grid-template-columns: 1fr; }
    .finance-grid { grid-template-columns: 1fr; }
    .form-group-inline { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    nav { flex-direction: column; align-items: flex-start; }
    .logo { text-align: left; width: 100%; margin-bottom: 0.5rem; }
    .nav-links { justify-content: flex-start; }
}
