/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #f5f7fa;
    --text-primary: #141414;
    --text-secondary: #5e5e5e;
    --brand-blue: #0070ba;
    --success-green: #07882a; /* The exact bright green */
    --white: #ffffff;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-family); -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-color); color: var(--text-primary); min-height: 100vh; padding-bottom: 200px; overflow-x: hidden; }

/* --- 10 COLOR PALETTE (For Avatars) --- */
.bg-cyan { background-color: #4ab2f6; color: #fff; }
.bg-black { background-color: #141414; color: #fff; }
.bg-blue { background-color: #0070ba; color: #fff; }
.bg-purple { background-color: #8e44ad; color: #fff; }
.bg-green { background-color: #27ae60; color: #fff; }
.bg-red { background-color: #c0392b; color: #fff; }
.bg-orange { background-color: #e67e22; color: #fff; }
.bg-pink { background-color: #fd79a8; color: #fff; }
.bg-teal { background-color: #00b894; color: #fff; }
.bg-gold { background-color: #d4af37; color: #fff; }

/* --- ADMIN PANEL --- */
.control-panel { 
    position: fixed; top: 0; left: -100%; width: 300px; height: 100%; 
    background: var(--white); z-index: 2000; box-shadow: 10px 0 30px rgba(0,0,0,0.1); 
    transition: left 0.3s ease; display: flex; flex-direction: column;
}
.control-panel.open { left: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #eee; }
.icon-btn-plain { background: none; border: none; font-size: 20px; cursor: pointer; }
.panel-content-scroll { padding: 20px; overflow-y: auto; flex: 1; }
.panel-section { margin-bottom: 15px; }
.panel-section label { display: block; font-weight: 700; font-size: 13px; color: #666; margin-bottom: 6px; }
.panel-section input, .panel-section select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; outline: none; }
.panel-divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; }
.action-btn { width: 100%; padding: 12px; background: var(--brand-blue); color: white; border: none; border-radius: 50px; font-weight: 700; cursor: pointer; }
.btn-add { background: #141414; }
.btn-danger { background: #d32f2f; color: white; margin-top: 10px; } 

/* CONFIG BOX */
.config-box { background: #f9f9f9; padding: 15px; border-radius: 12px; border: 1px solid #eee; }
.date-row { display: flex; gap: 10px; }
.date-row select { flex: 1; min-width: 0; }
.amount-row { display: flex; align-items: center; gap: 10px; }
.sign-toggle { 
    width: 45px; height: 45px; background: #eee; border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 20px; font-weight: bold; cursor: pointer; user-select: none;
}
.sign-toggle.negative { background: #ffebee; color: #c62828; }
.sign-toggle.positive { background: #e8f5e9; color: #2e7d32; }

.toggle-row { display: flex; background: #e0e0e0; border-radius: 8px; padding: 4px; }
.toggle-btn { flex: 1; border: none; background: transparent; padding: 8px; font-weight: 600; font-size: 13px; border-radius: 6px; cursor: pointer; }
.toggle-btn.active { background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.icon-option { width: 40px; height: 40px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid #ddd; }
.icon-option.selected { border-color: var(--brand-blue); background: #e3f2fd; }
.icon-option.selected i { color: var(--brand-blue); }

.color-grid-container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.color-dot { width: 35px; height: 35px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.color-dot.selected { border-color: #333; transform: scale(1.1); }

/* --- GLOBAL UI --- */
.view { display: none; padding-top: 10px; animation: fadeIn 0.2s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1500; display: none; backdrop-filter: blur(2px); }
.overlay.active { display: block; }

.app-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; position: relative; z-index: 50; }
.icon-btn { background: var(--white); border: none; width: 44px; height: 44px; border-radius: 50%; color: var(--brand-blue); font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.header-right { display: flex; align-items: center; gap: 15px; }
.profile-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }

.tab-header { display: flex; gap: 25px; padding: 20px 24px; align-items: center; }
.tab-item { font-size: 20px; font-weight: 700; color: #999; cursor: pointer; position: relative; padding-bottom: 6px; }
.tab-item.active { color: var(--text-primary); }
.tab-item.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--text-primary); border-radius: 2px; }

.container { padding: 0 24px; }
.balance-card { background: var(--white); border-radius: 28px; padding: 24px; margin-bottom: 30px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); display: flex; gap: 16px; }
.balance-logo { width: 35px; height: auto; margin-top: 5px; }
.balance-info h1 { font-size: 25px; font-weight: 700; margin-bottom: 4px; letter-spacing: -1.5px; line-height: 1; color: var(--text-primary); }
.balance-info p { color: var(--text-secondary); font-size: 13px; font-weight: 400; }

.send-again h3 { font-size: 18px; margin-bottom: 20px; font-weight: 700; color: var(--text-primary); }
.contact-scroll-container { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; }
.contact-scroll-container::-webkit-scrollbar { display: none; }
.contact-item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 70px; flex-shrink: 0; cursor: pointer; }
.avatar { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 18px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
.contact-item span { font-size: 13px; font-weight: 500; color: var(--text-primary); text-align: center; line-height: 1.2; }

.activity-section { background: var(--white); border-radius: 28px 28px 0 0; padding: 15px 0 30px 0; margin: 0 -24px; box-shadow: 0 -4px 20px rgba(0,0,0,0.02); }
.transaction-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 24px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.transaction-item:last-child { border-bottom: none; }
.trans-left { display: flex; gap: 16px; width: 65%; }
.avatar-circle { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; color: white; flex-shrink: 0; }

.trans-details h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.trans-details p { font-size: 14px; color: var(--text-secondary); margin-bottom: 2px; }
.status-sub { font-size: 14px; color: var(--text-secondary); }
.trans-amount { font-size: 16px; font-weight: 700; white-space: nowrap; }
.trans-amount.positive { color: var(--success-green); }
.trans-amount.negative { color: var(--text-primary); } /* Per screenshots, negatives are black/dark grey */
.see-more-link { text-align: center; padding: 25px; color: var(--brand-blue); font-weight: 700; font-size: 15px; cursor: pointer; border-top: 1px solid #f5f5f5; }
.empty-state { text-align:center; padding:30px; color:#999; font-size:14px; }

/* Activity View Specifics */
.search-row { display: flex; align-items: center; gap: 10px; margin: 0 0 20px 0; }
.search-input-wrapper { flex: 1; position: relative; }
.search-input-wrapper input { width: 100%; padding: 12px 12px 12px 45px; border-radius: 50px; border: 1px solid #ddd; outline: none; font-size: 15px; background: var(--white); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #888; font-size: 18px; }
.filter-icon-btn { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; color: #444; font-size: 18px; cursor: pointer; }
.section-label { font-size: 18px; font-weight: 700; margin-bottom: 15px; color: var(--text-primary); }
.month-label { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 25px 0 10px 0; }
.activity-card-group { background: var(--white); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }

/* Wallet View */
.wallet-balance-header { background: var(--white); padding: 24px; border-radius: 20px; margin-bottom: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.link-text { color: var(--text-primary); font-size: 14px; cursor: pointer; font-weight: 400; }
.visa-card { background: linear-gradient(135deg, #2c509a 0%, #173675 100%); border-radius: 16px; height: 200px; position: relative; padding: 24px; color: white; box-shadow: 0 10px 20px rgba(23, 54, 117, 0.3); overflow: hidden; }
.visa-card::before { content: ''; position: absolute; width: 150px; height: 150px; background: rgba(255,255,255,0.08); top: -20px; right: -20px; border-radius: 50%; }
.card-chip { width: 45px; height: 32px; background: linear-gradient(135deg, #e0c56e, #bf9e47); border-radius: 6px; margin-bottom: 80px; }
.card-details { font-size: 18px; font-family: monospace; letter-spacing: 2px; }
.dots { color: #00ffaa; font-size: 24px; margin-right: 5px; } /* Green dots per screenshot */
.visa-logo { position: absolute; bottom: 20px; right: 24px; font-size: 28px; font-weight: 900; font-style: italic; }
.pref-card { background: var(--white); border-radius: 20px; padding: 10px 24px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.pref-item { display: flex; align-items: center; gap: 15px; padding: 18px 0; border-bottom: 1px solid #f5f5f5; font-weight: 500; }
.pref-item i { font-size: 22px; width: 25px; text-align: center; }

/* Bottom Nav & FAB */
.bottom-fixed-wrapper { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 100; background: #ffffff; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); padding-top: 15px; display: flex; flex-direction: column; gap: 12px; border-top-left-radius: 15px; border-top-right-radius: 15px; }
.floating-actions { display: flex; gap: 16px; padding: 0 24px; width: 100%; }
.pill-btn { flex: 1; background: #000000; color: white; border: none; border-radius: 50px; padding: 16px; font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.bottom-nav { display: flex; justify-content: space-around; align-items: center; padding-bottom: 25px; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #141414; opacity: 0.4; cursor: pointer; width: 60px; }
.nav-item.active { opacity: 1; }
.nav-item i { font-size: 24px; }
.nav-item span { font-size: 12px; font-weight: 500; }

/* Detail Page */
.detail-page { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--white); z-index: 3000; display: none; flex-direction: column; animation: slideUp 0.3s ease-out; }
.detail-page.active { display: flex; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.detail-header-nav { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; }
.back-btn { background: none; border: none; font-size: 20px; margin-right: 15px; }
.detail-title { font-weight: 600; font-size: 16px; flex: 1; text-align: center; margin-right: 35px; }
.detail-body { padding: 30px 24px; display: flex; flex-direction: column; position: relative; }
.detail-top-section { margin-bottom: 30px; position: relative; width: 100%; }
.detail-icon-wrap { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; margin-bottom: 16px; }
#detailName { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
#detailDate { font-size: 14px; color: var(--text-secondary); }
.detail-amount-display { position: absolute; top: 90px; right: 0; font-size: 18px; font-weight: 700; text-align: right; }
.detail-row { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #f5f5f5; }