/* --- Root Variables & Reset --- */
:root {
    --pp-blue: #003087;
    --pp-light-blue: #0070ba;
    --pp-soft-blue: #e8f1fa;
    --text-dark: #2c2e2f;
    --text-gray: #6c7378;
    --bg-body: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Open Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Layout Wrapper --- */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Desktop Navbar --- */
.desktop-navbar {
    display: none;
    background-color: var(--pp-blue);
    padding: 0 2rem;
    height: 65px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1010;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-links-left {
    display: flex;
    gap: 10px;
    height: 100%;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
}

.nav-link.active {
    color: white;
    border-bottom: 4px solid white;
    background: rgba(255, 255, 255, 0.1);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    transition: opacity 0.3s ease;
}

.main-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Cards & Dashboard Elements --- */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.balance-card {
    background: var(--pp-blue);
    color: white;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0;
}

.btn-primary {
    display: inline-block;
    background: var(--pp-light-blue);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
}

/* --- Mobile Bottom Nav --- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 75px;
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    text-decoration: none;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.nav-item.active {
    color: var(--pp-light-blue);
}

.icon-wrapper-fab {
    background: var(--pp-light-blue);
    padding: 10px;
    border-radius: 50%;
    margin-top: -20px;
    box-shadow: 0 4px 10px rgba(0, 112, 186, 0.3);
}

/* --- Responsive Queries --- */
@media (max-width: 767px) {
    .main-content {
        padding-bottom: 90px;
    }
}

@media (min-width: 768px) {
    .desktop-navbar {
        display: block;
    }
    .mobile-nav {
        display: none;
    }
}
/* --- Footer Styling --- */
.main-footer {
    display: none; /* Sembunyikan di mobile agar tidak menumpuk dengan nav bawah */
    background: var(--white);
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 50px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-gray);
}

.text-success {
    color: #28a745;
    font-weight: bold;
}

/* --- SPA Loader Styling --- */
.spa-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 2000;
    display: none;
}

.spa-loader.active {
    display: block;
}

.spa-loader::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--pp-light-blue);
    width: 30%;
    animation: loading-bar 1.5s infinite linear;
}

@keyframes loading-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* --- Responsive Footer --- */
@media (min-width: 768px) {
    .main-footer {
        display: block;
    }
}
/* --- Top Bar Styling --- */
.top-bar {
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    height: 65px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-bar-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--pp-blue);
}

.logo-text span {
    color: var(--pp-light-blue);
}

/* --- Search Bar --- */
.search-wrapper {
    display: none; /* Sembunyikan di mobile */
}

.search-input {
    background: #f0f2f5;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    width: 250px;
    outline: none;
    font-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    box-shadow: 0 0 0 2px var(--pp-soft-blue);
    width: 300px;
}

/* --- User Nav --- */
.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 5px;
}

.profile-circle img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--pp-soft-blue);
}

/* --- Responsive Header --- */
@media (min-width: 768px) {
    .search-wrapper {
        display: block;
    }
    
    .top-bar {
        /* Di desktop, jika menggunakan Navbar atas, top-bar bisa dibuat lebih minimalis */
        background: var(--white);
    }
}
/* --- Mobile Navigation Styling --- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-gray);
    transition: var(--transition);
    position: relative;
}

.nav-icon {
    margin-bottom: 4px;
    transition: var(--transition);
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
}

/* Active State */
.nav-item.active {
    color: var(--pp-light-blue);
}

.nav-item.active .nav-icon svg {
    stroke: var(--pp-light-blue);
}

/* Floating Action Button (FAB) Style */
.nav-fab .fab-wrapper {
    background: var(--pp-light-blue);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
    transition: var(--transition);
}

.nav-item.nav-fab.active .fab-wrapper {
    background: var(--pp-blue);
    transform: translateY(-5px);
}

.nav-item.nav-fab span {
    margin-top: 5px;
}

/* Ripple effect on click */
.nav-item:active {
    transform: scale(0.95);
}
/* --- Desktop Navbar Styling --- */
.desktop-navbar {
    display: none; /* Default sembunyi, diaktifkan via Media Query */
    background-color: var(--pp-blue);
    height: 60px;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-links-left {
    display: flex;
    gap: 5px;
    height: 100%;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 0 18px;
    display: flex;
    align-items: center;
    border-bottom: 4px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--white);
    border-bottom: 4px solid var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-links-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon-btn {
    background: none;
    border: none;
    color: var(--white);
    opacity: 0.8;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.nav-icon-btn:hover, .nav-icon-btn.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
}

.btn-outline-small {
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.btn-outline-small:hover {
    background: var(--white);
    color: var(--pp-blue);
    border-color: var(--white);
}

/* Responsivitas: Tampilkan Navbar di Desktop */
@media (min-width: 768px) {
    .desktop-navbar {
        display: block;
    }
}
/* --- SPA Progress Bar (Top) --- */
.spa-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--pp-light-blue);
    z-index: 2000;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 112, 186, 0.5);
}

/* --- Efek Transisi Konten --- */
#spa-content-area {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.fade-in {
    animation: fadeIn 0.4s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- App Wrapper Layout --- */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Layout Adjustment for Mobile Navigation Space */
@media (max-width: 767px) {
    .main-content {
        padding-bottom: 90px; /* Jarak agar tidak tertutup nav bawah */
    }
}
/* --- Activity Page Styling --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pp-blue);
    margin: 0;
}

.search-box .search-input, #txSearch {
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ddd;
    outline: none;
    width: 200px;
    transition: var(--transition);
}

#txSearch:focus {
    width: 250px;
    border-color: var(--pp-light-blue);
}

/* Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-item {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tab-item.active {
    background: var(--pp-soft-blue);
    color: var(--pp-blue);
    border-color: var(--pp-blue);
}

/* Activity Grouping */
.group-label {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-gray);
    letter-spacing: 1px;
    margin: 20px 0 10px 5px;
}

/* Activity Card */
.activity-card {
    background: var(--white);
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.activity-card:active {
    transform: scale(0.98);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.icon-out { background: #fff1f1; color: #d93025; }
.icon-in { background: #e6f4ea; color: #1e8e3e; }

.activity-details { flex: 1; }
.activity-name { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); }
.activity-date { font-size: 0.8rem; color: var(--text-gray); }

.activity-amount { font-weight: 700; font-size: 1rem; }
.amount-negative { color: var(--text-dark); }
.amount-positive { color: #1e8e3e; }

/* Desktop Adjustment */
@media (min-width: 768px) {
    .activity-card:hover {
        background: #f8f9fa;
        cursor: pointer;
    }
}
/* --- Wallet Specific Styling --- */
.wallet-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Virtual Credit Card */
.credit-card-virtual {
    background: linear-gradient(135deg, #003087 0%, #0070ba 100%) !important;
    color: white;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px !important;
    position: relative;
    overflow: hidden;
    border: none;
}

.credit-card-virtual::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.card-number {
    font-size: 1.4rem;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
}

.card-footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder .label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
}

.card-holder .val {
    font-weight: 600;
}

/* Currency List */
.currency-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.currency-item:last-child { border-bottom: none; }

.currency-item strong { display: block; font-size: 14px; }
.currency-item span { font-size: 11px; color: var(--text-gray); }
.curr-val { font-weight: 700; color: var(--pp-blue); }

/* Bank List */
.bank-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.bank-icon { font-size: 24px; margin-right: 15px; }
.bank-details { flex: 1; }
.bank-details strong { display: block; font-size: 14px; }
.bank-details span { font-size: 12px; color: var(--text-gray); }
.bank-status { font-size: 12px; font-weight: 700; color: var(--pp-light-blue); }

/* Desktop Adjustment */
@media (min-width: 768px) {
    .wallet-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.btn-primary-outline {
    background: transparent;
    border: 1px solid var(--pp-light-blue);
    color: var(--pp-light-blue);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-outline:hover {
    background: var(--pp-light-blue);
    color: white;
}