* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fff5e6, #fff);
    color: #2c1810;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 245, 230, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* LOGIN PAGE */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d4af37, #c49a6c);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-subtitle {
    opacity: 0.9;
}

.login-box {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.login-form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form-group input:focus {
    outline: none;
    border-color: #d4af37;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37, #c49a6c);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* NAVBAR */
.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #8b5a2b;
}

.nav-brand i {
    color: #d4af37;
    margin-right: 5px;
}

.nav-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.nav-user i {
    color: #d4af37;
    font-size: 1.2rem;
}

.nav-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    background: #f8f8f8;
    color: #333;
}

.nav-btn:hover {
    background: #d4af37;
    color: white;
}

.logout-btn {
    background: #ffebee;
    color: #f44336;
}

.logout-btn:hover {
    background: #f44336;
    color: white;
}

/* Header */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #8b5a2b;
    margin-bottom: 10px;
}

.title-icon {
    margin: 0 10px;
    font-size: 2rem;
}

.subtitle {
    color: #d4af37;
    font-style: italic;
    font-size: 1.2rem;
}

/* Progress Card */
.progress-card {
    background: white;
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.progress-header h2 {
    color: #8b5a2b;
    font-size: 1.5rem;
}

.target-date {
    background: #f8f8f8;
    padding: 10px 20px;
    border-radius: 25px;
    color: #666;
}

.progress-main {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.progress-circle {
    width: 150px;
    height: 150px;
    border: 8px solid #f0f0f0;
    border-top-color: #d4af37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-progress {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #d4af37;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-numbers {
    flex: 1;
    display: flex;
    gap: 40px;
}

.progress-numbers h3 {
    font-size: 2rem;
    color: #8b5a2b;
}

.progress-numbers span {
    color: #666;
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #c49a6c);
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.remaining-info {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
}

.remaining-info i {
    color: #d4af37;
    margin-right: 10px;
}

/* Stats Grid (2 KOLOM) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    color: #d4af37;
    width: 50px;
    height: 50px;
    background: #fff5e6;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
}

.stat-card h4 {
    color: #8b5a2b;
    font-size: 1rem;
}

/* Action Buttons (3 KOLOM) */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 20px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn i {
    font-size: 1.5rem;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Transactions */
.transactions-section {
    background: white;
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 30px;
}

.transactions-section h2 {
    color: #8b5a2b;
    margin-bottom: 20px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 15px;
    transition: transform 0.2s;
    position: relative;
}

.transaction-item:hover {
    transform: translateX(5px);
}

.transaction-item:hover .delete-btn {
    display: flex;
}

.transaction-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.transaction-icon.masuk {
    background: #e8f5e9;
    color: #4caf50;
}

.transaction-icon.keluar {
    background: #ffebee;
    color: #f44336;
}

.transaction-details {
    flex: 1;
}

.transaction-desc {
    font-weight: 500;
    margin-bottom: 5px;
}

.transaction-date {
    font-size: 0.8rem;
    color: #666;
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.1rem;
    margin-right: 45px;
}

.transaction-amount.positive {
    color: #4caf50;
}

.transaction-amount.negative {
    color: #f44336;
}

.delete-btn {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: #ffebee;
    color: #f44336;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    position: absolute;
    right: 10px;
}

.delete-btn:hover {
    background: #f44336;
    color: white;
    transform: scale(1.1);
}

.no-data {
    text-align: center;
    color: #999;
    padding: 30px;
}

/* Tips Card */
.tips-card {
    background: linear-gradient(135deg, #d4af37, #c49a6c);
    border-radius: 30px;
    padding: 30px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.tips-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.tips-card h3 {
    margin-bottom: 15px;
}

.tips-card p {
    font-size: 1.2rem;
    animation: fadeInOut 5s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* FOOTER dengan Animasi */
.footer {
    background: linear-gradient(135deg, #8b5a2b, #2c1810);
    border-radius: 30px 30px 0 0;
    padding: 20px;
    margin-top: 40px;
    overflow: hidden;
}

.footer-content {
    overflow: hidden;
    white-space: nowrap;
}

.copyright {
    color: #d4af37;
    font-size: 1rem;
    display: inline-block;
    animation: moveText 15s linear infinite;
    padding-left: 100%;
}

@keyframes moveText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 450px;
    margin: 50px auto;
    border-radius: 30px;
    overflow: hidden;
    animation: slideDown 0.3s;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #d4af37, #c49a6c);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s;
}

.close:hover {
    transform: scale(1.2);
}

.modal-content form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #d4af37;
}

.modal-content button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37, #c49a6c);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-main {
        justify-content: center;
        text-align: center;
    }
    
    .progress-numbers {
        justify-content: center;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .progress-numbers {
        flex-direction: column;
        gap: 15px;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
    }
}