/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 80px;
    line-height: 1.5;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
}

.header-user {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================
   CONTENT
   ============================================ */
.content {
    padding: 16px;
}

/* ============================================
   BOTTOM NAVBAR
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    padding: 4px 12px;
    transition: 0.2s;
}

.nav-item.active {
    color: #4CAF50;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.nav-label {
    font-weight: 500;
}

.nav-add {
    position: relative;
    top: -16px;
}

.nav-icon-add {
    background: #4CAF50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(76,175,80,0.4);
    transition: 0.2s;
}

.nav-icon-add:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(76,175,80,0.3);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #555;
}

/* Saldo Card */
.saldo-card {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    text-align: center;
    padding: 28px 20px;
}

.saldo-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.saldo-amount {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Ringkasan */
.ringkasan-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ringkasan-card {
    flex: 1;
    text-align: center;
    padding: 16px;
}

.ringkasan-masuk {
    border-left: 4px solid #4CAF50;
}

.ringkasan-keluar {
    border-left: 4px solid #f44336;
}

.ringkasan-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.ringkasan-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.ringkasan-amount {
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   CHART
   ============================================ */
.chart-item {
    margin-bottom: 12px;
}

.chart-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 4px;
}

.chart-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.chart-bar-container {
    background: #eee;
    border-radius: 6px;
    height: 8px;
    margin-bottom: 2px;
}

.chart-bar {
    height: 8px;
    border-radius: 6px;
    transition: width 0.5s;
}

.chart-value {
    font-size: 11px;
    color: #888;
}

/* ============================================
   TRANSAKSI LIST
   ============================================ */
.transaksi-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.transaksi-item:last-child {
    border-bottom: none;
}

.transaksi-kategori {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.transaksi-tanggal {
    font-size: 12px;
    color: #999;
}

.transaksi-ket {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
    font-style: italic;
}

.transaksi-amount {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.text-success { color: #4CAF50; }
.text-danger { color: #f44336; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 24px;
    color: #aaa;
    font-size: 14px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: 0.2s;
    font-family: inherit;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #4CAF50;
    color: white;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.btn-primary:hover {
    background: #45a049;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.guest-body {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.guest-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-logo {
    font-size: 56px;
    margin-bottom: 8px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}

.login-form {
    text-align: left;
}

.login-form .form-group input {
    background: #f5f5f5;
}

/* ============================================
   RESPONSIVE FINE-TUNING
   ============================================ */
@media (max-width: 360px) {
    .saldo-amount {
        font-size: 26px;
    }
    .ringkasan-amount {
        font-size: 14px;
    }
}