/* Modern Financial Management App Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

body.dark-mode {
    --light-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
body.dark-mode .login-container { background: #1e293b; color: #f1f5f9; }
body.dark-mode .app-header { background: linear-gradient(135deg, #334155 0%, #1e293b 100%); }
body.dark-mode .transaction-row:hover { background: #334155; }
body.dark-mode .chart-container { background: #334155; }
body.dark-mode .monthly-tabs-container { background: #1e293b; }
body.dark-mode .form-group input,
body.dark-mode .form-group select { background: #0f172a; color: #f1f5f9; border-color: #334155; }
body.dark-mode .amount-input-wrapper select,
body.dark-mode .amount-input-wrapper input { background: #0f172a; color: #f1f5f9; }
body.dark-mode .table-actions input,
body.dark-mode .table-actions select { background: #0f172a; color: #f1f5f9; }
body.dark-mode thead { background: #334155; }
body.dark-mode td { color: #f1f5f9; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Login Screen */
.login-screen { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.login-container { background: var(--card-bg); border-radius: 20px; padding: 50px 40px; box-shadow: var(--shadow-lg); max-width: 450px; width: 100%; animation: slideUp 0.5s ease-out; }

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

.login-header { text-align: center; margin-bottom: 40px; }
.login-header i { font-size: 60px; color: var(--primary-color); margin-bottom: 20px; }
.login-header h1 { font-size: 32px; font-weight: 700; margin-bottom: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-header p { color: var(--text-secondary); font-size: 16px; }

.input-group { position: relative; margin-bottom: 25px; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.input-group input { width: 100%; padding: 15px 15px 15px 45px; border: 2px solid var(--border-color); border-radius: 12px; font-size: 16px; transition: all 0.3s ease; font-family: 'Inter', sans-serif; }
.input-group input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.error-message { color: var(--danger-color); font-size: 14px; margin-top: 10px; display: none; }
.error-message:not(:empty) { display: block; }

.first-time-info { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 15px; background: #eff6ff; border-radius: 10px; font-size: 14px; color: var(--info-color); }
.first-time-info i { font-size: 20px; }

/* Main App */
.main-app { min-height: 100vh; background: var(--light-bg); }

/* Header */
.app-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
.header-left { display: flex; align-items: center; gap: 15px; }
.header-left i { font-size: 32px; }
.header-left h1 { font-size: 28px; font-weight: 700; }
.header-right { display: flex; gap: 10px; }

.btn-icon { background: rgba(255,255,255,0.2); border: none; color: white; padding: 12px 16px; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; font-size: 18px; }
.btn-icon:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); }

/* Monthly Tabs */
.monthly-tabs-container { background: white; padding: 15px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100; }
.tab-scroll-btn { background: var(--light-bg); border: 1px solid var(--border-color); padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-size: 14px; color: var(--text-primary); }
.tab-scroll-btn:hover { background: var(--border-color); }
.monthly-tabs { display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth; flex: 1; padding: 5px 0; }
.monthly-tabs::-webkit-scrollbar { height: 5px; }
.monthly-tabs::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 5px; }
.month-tab { background: var(--light-bg); border: 2px solid transparent; padding: 12px 24px; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; font-weight: 500; font-size: 14px; }
.month-tab:hover { background: var(--border-color); }
.month-tab.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* Main Content */
.main-content { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 25px; padding: 25px; max-width: 1800px; margin: 0 auto; }
.left-section, .right-section { min-width: 0; }

/* Card */
.card { background: var(--card-bg); border-radius: 16px; box-shadow: var(--shadow); padding: 25px; margin-bottom: 25px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid var(--border-color); }
.card-header h2 { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-header i { color: var(--primary-color); }

/* Form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 8px; color: var(--text-primary); font-size: 14px; }
.form-group label i { color: var(--primary-color); font-size: 16px; }
.form-group input, .form-group select { width: 100%; padding: 12px 15px; border: 2px solid var(--border-color); border-radius: 10px; font-size: 15px; transition: all 0.3s ease; font-family: 'Inter', sans-serif; background: var(--card-bg); color: var(--text-primary); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Amount Input with Currency */
.amount-input-wrapper { display: flex; gap: 8px; }
.currency-select { width: 90px !important; flex-shrink: 0; padding: 12px 8px !important; font-size: 13px !important; }
.amount-input-wrapper input { flex: 1; }
.converted-amount { font-size: 12px; color: var(--text-secondary); margin-top: 4px; padding: 4px 8px; background: var(--light-bg); border-radius: 6px; }

/* Buttons */
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 14px 28px; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(102,126,234,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(102,126,234,0.4); }
.btn-secondary { background: var(--text-secondary); color: white; border: none; padding: 14px 28px; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s ease; }
.btn-secondary:hover { background: var(--text-primary); }
.btn-block { width: 100%; }
.btn-cancel { background: var(--danger-color); color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 6px; transition: all 0.3s ease; }
.btn-cancel:hover { background: #dc2626; }
.btn-delete { background: transparent; border: none; color: var(--danger-color); cursor: pointer; padding: 8px 12px; border-radius: 6px; transition: all 0.3s ease; font-size: 16px; }
.btn-delete:hover { background: rgba(239,68,68,0.1); }
.btn-danger { background: var(--danger-color); color: white; border: none; padding: 12px 24px; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s ease; }
.btn-danger:hover { background: #dc2626; }

/* Balance Section */
.balance-section { margin-bottom: 25px; }

/* Summary Cards */
.summary-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 15px; }
.summary-card { background: linear-gradient(135deg, var(--card-color-1), var(--card-color-2)); border-radius: 16px; padding: 25px; color: white; display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow); transition: all 0.3s ease; }
.summary-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.summary-card.income { --card-color-1: #10b981; --card-color-2: #059669; }
.summary-card.expense { --card-color-1: #ef4444; --card-color-2: #dc2626; }
.summary-card.balance { --card-color-1: #3b82f6; --card-color-2: #2563eb; }
.summary-icon { background: rgba(255,255,255,0.2); padding: 15px; border-radius: 12px; font-size: 28px; }
.summary-content h3 { font-size: 14px; font-weight: 500; opacity: 0.9; margin-bottom: 5px; }
.summary-amount { font-size: 20px; font-weight: 700; }

/* E-Wallet Cards */
.ewallet-cards { display: flex; gap: 15px; flex-wrap: wrap; }
.ewallet-card { flex: 1; min-width: 150px; border-radius: 16px; padding: 20px; color: white; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow); transition: all 0.3s ease; position: relative; overflow: hidden; }
.ewallet-card::before { content: ''; position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.ewallet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ewallet-card .ewallet-icon { background: rgba(255,255,255,0.25); padding: 12px; border-radius: 10px; font-size: 22px; }
.ewallet-card .ewallet-info { flex: 1; }
.ewallet-card .ewallet-name { font-size: 13px; font-weight: 500; opacity: 0.9; margin-bottom: 4px; }
.ewallet-card .ewallet-amount { font-size: 18px; font-weight: 700; }

/* Table */
.table-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.table-actions input, .table-actions select { padding: 8px 12px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 14px; background: var(--card-bg); color: var(--text-primary); }
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--light-bg); }
th { padding: 15px 12px; text-align: left; font-weight: 600; font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.transaction-row { border-bottom: 1px solid var(--border-color); transition: all 0.3s ease; cursor: pointer; }
.transaction-row:hover { background: var(--light-bg); }
td { padding: 15px 12px; font-size: 14px; }
.type-badge { display: inline-block; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; color: white; }
.category-badge { display: inline-block; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.category-badge.pemasukan { background: rgba(16,185,129,0.1); color: #059669; }
.category-badge.pengeluaran { background: rgba(239,68,68,0.1); color: #dc2626; }
.category-badge.transfer { background: rgba(245,158,11,0.1); color: #d97706; }
.wallet-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; color: white; }
.amount-income { color: #059669; font-weight: 600; }
.amount-expense { color: #dc2626; font-weight: 600; }
.amount-transfer { color: #d97706; font-weight: 600; }
.no-data { text-align: center; padding: 60px 20px !important; color: var(--text-secondary); }
.no-data i { font-size: 48px; margin-bottom: 15px; opacity: 0.3; display: block; }
.no-data p { font-size: 16px; }

/* Charts */
.dashboard-content { display: flex; flex-direction: column; gap: 25px; }
.chart-container { background: var(--light-bg); padding: 20px; border-radius: 12px; min-height: 300px; }
.chart-container h3 { font-size: 16px; font-weight: 600; margin-bottom: 15px; color: var(--text-primary); }
.chart-container canvas { max-height: 350px !important; display: block; }
.no-chart-data { display: none; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-secondary); min-height: 250px; width: 100%; }
.no-chart-data i { font-size: 48px; margin-bottom: 15px; opacity: 0.3; }
.no-chart-data p { font-size: 16px; margin: 0; }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.modal-content { background: var(--card-bg); border-radius: 20px; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease-out; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 25px; border-bottom: 2px solid var(--border-color); }
.modal-header h2 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.modal-close { background: none; border: none; font-size: 32px; cursor: pointer; color: var(--text-secondary); transition: all 0.3s ease; line-height: 1; }
.modal-close:hover { color: var(--danger-color); }
.modal-body { padding: 25px; }
.modal-desc { color: var(--text-secondary); margin-bottom: 20px; font-size: 14px; }

/* Wallet Settings */
.wallet-settings-list { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.wallet-setting-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: var(--light-bg); border-radius: 12px; }
.wallet-setting-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; flex-shrink: 0; }
.main-wallet-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.ewallet1-icon { background: linear-gradient(135deg, #00AED6, #0088a8); }
.ewallet2-icon { background: linear-gradient(135deg, #EE4D2D, #c43e24); }
.wallet-setting-info { flex: 1; }
.wallet-setting-info label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.wallet-name-input { width: 100%; padding: 8px 12px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 14px; background: var(--card-bg); color: var(--text-primary); font-family: 'Inter', sans-serif; }
.wallet-name-input:focus { outline: none; border-color: var(--primary-color); }
.wallet-color-picker input[type="color"] { width: 40px; height: 40px; border: none; border-radius: 8px; cursor: pointer; padding: 2px; background: none; }

/* Backup */
.backup-section { padding: 25px; background: var(--light-bg); border-radius: 12px; margin-bottom: 20px; }
.backup-section h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.backup-section p { color: var(--text-secondary); margin-bottom: 15px; }
.backup-warning { display: flex; align-items: flex-start; gap: 12px; padding: 15px; background: #fef3c7; border-radius: 10px; color: #92400e; }
.backup-warning i { font-size: 20px; margin-top: 2px; }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: 400px; }
.toast { background: var(--card-bg); padding: 16px 20px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; font-weight: 500; opacity: 0; transform: translateX(400px); transition: all 0.3s ease; border-left: 4px solid; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-color: var(--success-color); }
.toast-success i { color: var(--success-color); font-size: 20px; }
.toast-error { border-color: var(--danger-color); }
.toast-error i { color: var(--danger-color); font-size: 20px; }
.toast-warning { border-color: var(--warning-color); }
.toast-warning i { color: var(--warning-color); font-size: 20px; }
.toast-info { border-color: var(--info-color); }
.toast-info i { color: var(--info-color); font-size: 20px; }
.toast span { flex: 1; color: var(--text-primary); }
.toast-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px; transition: all 0.3s ease; }
.toast-close:hover { color: var(--text-primary); }

/* Bulk Actions */
.bulk-actions { padding: 15px 25px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; display: flex; justify-content: space-between; align-items: center; border-radius: 0; margin: -25px -25px 0 -25px; }
.bulk-info { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.bulk-info i { font-size: 20px; }
.bulk-buttons { display: flex; gap: 10px; }
.btn-secondary-sm, .btn-danger-sm { padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; }
.btn-secondary-sm { background: rgba(255,255,255,0.2); color: white; }
.btn-secondary-sm:hover { background: rgba(255,255,255,0.3); }
.btn-danger-sm { background: var(--danger-color); color: white; }
.btn-danger-sm:hover { background: #dc2626; }
.transaction-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary-color); }
.transaction-row.selected { background: rgba(102,126,234,0.1); }
.modal-small { max-width: 450px; }
.confirm-detail { margin-top: 15px; padding: 15px; background: var(--light-bg); border-radius: 10px; text-align: center; }
.confirm-detail strong { display: block; margin-bottom: 8px; color: var(--text-primary); }
.text-danger { color: var(--danger-color); font-size: 14px; margin-top: 10px; }
.text-secondary { color: var(--text-secondary); font-size: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; }

/* Top Expenses */
.top-expenses-list { display: flex; flex-direction: column; gap: 12px; }
.top-expense-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: var(--card-bg); border-radius: 10px; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.top-expense-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.expense-rank { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.expense-info { flex: 1; }
.expense-detail { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.expense-type { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.expense-type i { font-size: 8px; }
.expense-amount { font-weight: 700; font-size: 16px; color: var(--danger-color); }

/* Receipt Upload */
.receipt-upload-container { margin-top: 5px; }
.btn-upload { width: 100%; padding: 14px 20px; border: 2px dashed var(--border-color); border-radius: 10px; background: var(--light-bg); color: var(--text-primary); font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-upload:hover { border-color: var(--primary-color); background: rgba(37,99,235,0.05); color: var(--primary-color); }
.receipt-preview { margin-top: 15px; position: relative; border-radius: 10px; overflow: hidden; border: 2px solid var(--border-color); }
.receipt-preview img { width: 100%; height: auto; max-height: 300px; object-fit: cover; }
.btn-remove-receipt { position: absolute; top: 10px; right: 10px; background: var(--danger-color); color: white; border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; font-size: 16px; transition: all 0.3s ease; }
.btn-remove-receipt:hover { background: #dc2626; transform: scale(1.1); }
.receipt-analysis { padding: 12px; background: var(--card-bg); }
.analyzing { display: flex; align-items: center; gap: 10px; color: var(--info-color); font-size: 14px; }
.analysis-result { display: flex; align-items: center; gap: 10px; color: var(--success-color); font-size: 14px; }
.analysis-result i { font-size: 18px; }
.analysis-details { flex: 1; }
.analysis-details div { margin: 4px 0; font-size: 13px; }
.analysis-error { display: flex; align-items: center; gap: 10px; color: var(--danger-color); font-size: 14px; }

/* Export Options */
.export-options { margin-bottom: 20px; }
.export-options h3 { font-size: 16px; margin-bottom: 15px; color: var(--text-primary); }

/* Responsive */
@media (max-width: 1400px) { .main-content { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1200px) { .main-content { grid-template-columns: 1fr; } .right-section { order: 2; } .left-section { order: 1; } }
@media (max-width: 768px) {
    body { font-size: 14px; }
    .main-content { padding: 15px; gap: 15px; }
    .card { padding: 15px; margin-bottom: 15px; }
    .app-header { padding: 12px 15px; }
    .header-left h1 { font-size: 18px; }
    .header-left i { font-size: 22px; }
    .header-right { gap: 5px; }
    .btn-icon { padding: 8px 10px; font-size: 14px; }
    .summary-cards { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
    .ewallet-cards { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; gap: 15px; }
    .table-actions { flex-direction: column; }
    .table-actions input, .table-actions select { width: 100%; }
    .modal-content { width: 95%; max-width: 95%; max-height: 85vh; }
    .modal-header { padding: 15px; }
    .modal-body { padding: 15px; }
    .modal-actions { flex-direction: column; }
    .modal-actions button { width: 100%; }
    .toast-container { bottom: 10px; right: 10px; left: 10px; max-width: none; }
    .toast { font-size: 13px; padding: 12px 16px; }
    .amount-input-wrapper { flex-direction: column; }
    .currency-select { width: 100% !important; }
}
@media (max-width: 480px) {
    .header-left h1 { font-size: 16px; }
    .btn-icon { padding: 6px 8px; font-size: 13px; }
}

/* ===== WALLET MANAGER (Dynamic Add/Edit/Delete) ===== */
.modal-medium { max-width: 560px; }

.wallet-manager-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.wallet-manager-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.wallet-manager-item:hover { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }

.wallet-manager-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px; flex-shrink: 0;
}

.wallet-manager-info { flex: 1; min-width: 0; }
.wallet-manager-info .wallet-name-input {
    width: 100%; padding: 6px 10px;
    border: 1px solid var(--border-color); border-radius: 8px;
    background: var(--card-bg); color: var(--text-primary);
    font-size: 14px; font-weight: 500;
    transition: border-color 0.2s ease;
}
.wallet-manager-info .wallet-name-input:focus { outline: none; border-color: var(--primary-color); }
.wallet-type-badge {
    display: inline-block; margin-top: 4px;
    padding: 2px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    background: rgba(37,99,235,0.1); color: var(--primary-color);
}

.wallet-manager-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.wallet-color-picker-inline {
    width: 34px; height: 34px;
    border: 2px solid var(--border-color); border-radius: 8px;
    padding: 2px; cursor: pointer; background: none;
}
.wallet-color-picker-inline:hover { border-color: var(--primary-color); }

.btn-wallet-delete {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    color: var(--danger-color); border-radius: 8px;
    width: 34px; height: 34px;
    cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.btn-wallet-delete:hover { background: var(--danger-color); color: white; }

/* Add Wallet Form */
.btn-add-wallet {
    width: 100%; padding: 12px 20px;
    border: 2px dashed var(--primary-color);
    border-radius: 12px; background: rgba(37,99,235,0.05);
    color: var(--primary-color); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add-wallet:hover { background: rgba(37,99,235,0.12); }

.add-wallet-form { margin-top: 12px; }
.add-wallet-form-inner {
    padding: 16px; border-radius: 12px;
    background: var(--light-bg); border: 1px solid var(--border-color);
}
.wallet-color-picker-block {
    width: 100%; height: 44px;
    border: 1px solid var(--border-color); border-radius: 8px;
    padding: 4px; cursor: pointer; background: var(--card-bg);
}
.add-wallet-actions { display: flex; gap: 10px; margin-top: 12px; }
.add-wallet-actions button { flex: 1; }

/* ===== TRANSFER MODAL ===== */
.transfer-wallets-row {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: end; gap: 12px; margin-bottom: 16px;
}
.transfer-arrow {
    display: flex; align-items: center; justify-content: center;
    padding-bottom: 8px; color: var(--primary-color); font-size: 20px;
}

/* ===== TRANSFER SHORTCUT BUTTON ===== */
.btn-transfer-shortcut {
    width: 100%; margin-top: 10px;
    padding: 12px 20px; border-radius: 10px;
    border: 2px solid #f59e0b;
    background: rgba(245,158,11,0.08);
    color: #d97706; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-transfer-shortcut:hover { background: #f59e0b; color: white; }

/* Transfer header button highlight */
.btn-transfer-header { color: #f59e0b !important; }
.btn-transfer-header:hover { background: rgba(245,158,11,0.15) !important; }

/* ===== WALLET BADGE (Table) ===== */
.wallet-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 20px;
    color: white; font-size: 11px; font-weight: 600;
    white-space: nowrap; vertical-align: middle;
}

/* ===== EWALLET CARDS AREA ===== */
.ewallet-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.ewallet-card {
    flex: 1; min-width: 150px;
    padding: 16px; border-radius: 14px;
    color: white; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ewallet-icon { font-size: 24px; opacity: 0.9; }
.ewallet-name { font-size: 13px; font-weight: 600; opacity: 0.9; }
.ewallet-amount { font-size: 16px; font-weight: 700; margin-top: 2px; }
.ewallet-empty {
    padding: 16px; text-align: center; color: var(--text-secondary);
    border: 2px dashed var(--border-color); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px;
}

/* amount display in table */
.amount-income { color: var(--success-color); font-weight: 700; }
.amount-expense { color: var(--danger-color); font-weight: 700; }
.amount-transfer { color: var(--warning-color); font-weight: 700; }
.converted-amount { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* Dark mode additions */
body.dark-mode .wallet-manager-item { background: #0f172a; border-color: #334155; }
body.dark-mode .wallet-manager-info .wallet-name-input { background: #1e293b; color: #f1f5f9; border-color: #334155; }
body.dark-mode .add-wallet-form-inner { background: #0f172a; border-color: #334155; }
body.dark-mode .btn-add-wallet { border-color: #60a5fa; color: #60a5fa; background: rgba(96,165,250,0.08); }
body.dark-mode .ewallet-empty { border-color: #334155; color: #64748b; }
body.dark-mode .transfer-arrow { color: #60a5fa; }
body.dark-mode .wallet-color-picker-block { background: #1e293b; border-color: #334155; }

@media (max-width: 480px) {
    .transfer-wallets-row { grid-template-columns: 1fr; }
    .transfer-arrow { padding: 0; transform: rotate(90deg); justify-content: flex-start; }
    .ewallet-card { min-width: 100%; }
}

/* ===== PAGE TABS (Transaksi / Dashboard) ===== */
.page-tabs-bar {
    display: flex; gap: 0;
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 0 20px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.page-tab {
    padding: 14px 28px; background: none; border: none;
    font-size: 15px; font-weight: 600; cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    display: flex; align-items: center; gap: 8px;
}
.page-tab:hover { color: var(--primary-color); background: rgba(37,99,235,0.05); }
.page-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); background: rgba(37,99,235,0.05); }
.page-content { min-height: calc(100vh - 120px); }

/* Single col layout for transaksi page */
.main-content.single-col { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; }

/* ===== DASHBOARD PAGE ===== */
.dashboard-page { padding: 24px 20px; max-width: 1400px; margin: 0 auto; }

/* KPI Row */
.dashboard-kpi-row {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 24px;
}
.kpi-card {
    background: var(--card-bg); border-radius: 16px;
    padding: 18px 20px; display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow); border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.kpi-income .kpi-icon { background: rgba(34,197,94,0.15); color: #22c55e; }
.kpi-expense .kpi-icon { background: rgba(239,68,68,0.15); color: #ef4444; }
.kpi-balance .kpi-icon { background: rgba(37,99,235,0.15); color: #2563eb; }
.kpi-savings .kpi-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }
.kpi-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.kpi-value { font-size: 17px; font-weight: 700; color: var(--text-primary); }

/* Charts Grid */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.chart-card {
    background: var(--card-bg); border-radius: 16px;
    padding: 20px; box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.chart-card-full { grid-column: 1 / -1; }
.chart-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.chart-card-header h3 {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
    margin: 0;
}
.chart-card-header h3 i { color: var(--primary-color); }
.chart-card-hint { font-size: 11px; color: var(--text-secondary); background: rgba(37,99,235,0.08); padding: 3px 8px; border-radius: 6px; }
.chart-canvas-wrap { position: relative; }

/* Savings Center Text */
.savings-center-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -55%);
    font-size: 22px; font-weight: 800;
    pointer-events: none;
}

/* ===== TOP EXPENSES — Category Overview ===== */
.top-expenses-header { padding: 6px 0 10px 0; }
.top-expenses-title { font-size: 12px; color: var(--text-secondary); font-style: italic; }

.top-expense-category-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    cursor: pointer; transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 6px;
}
.top-expense-category-item:hover {
    background: rgba(37,99,235,0.05);
    border-color: rgba(37,99,235,0.2);
    transform: translateX(3px);
}
.expense-sub-info {
    display: flex; align-items: center; gap: 8px;
    margin-top: 4px;
}
.expense-count { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.expense-pct-bar {
    flex: 1; height: 4px; background: rgba(0,0,0,0.08);
    border-radius: 2px; overflow: hidden; min-width: 40px;
}
.pct-bar-fill { display: block; height: 100%; border-radius: 2px; transition: width 0.4s ease; }
.expense-pct-text { font-size: 11px; color: var(--text-secondary); white-space: nowrap; min-width: 36px; text-align: right; }
.expense-drill-icon { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }

/* ===== DRILL-DOWN ===== */
.drill-down-header {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; margin-bottom: 10px;
    background: rgba(37,99,235,0.05); border-radius: 10px;
}
.drill-back-btn {
    background: none; border: 1px solid var(--border-color);
    border-radius: 8px; padding: 6px 12px; cursor: pointer;
    font-size: 13px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s ease;
}
.drill-back-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.drill-title { flex: 1; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.drill-total { font-weight: 700; font-size: 15px; color: var(--danger-color); }
.drill-items { display: flex; flex-direction: column; gap: 6px; max-height: 350px; overflow-y: auto; padding-right: 4px; }
.drill-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 10px 12px; border-radius: 10px;
    background: var(--light-bg); border: 1px solid var(--border-color);
}
.drill-item-left { flex: 1; }
.drill-date { font-size: 11px; color: var(--text-secondary); margin-bottom: 3px; }
.drill-detail { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.drill-wallet { margin-top: 2px; }
.drill-amount { font-size: 14px; font-weight: 700; color: var(--danger-color); white-space: nowrap; padding-left: 12px; }

/* ===== INITIAL BALANCE MODAL ===== */
.initial-balance-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.init-balance-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: var(--light-bg); border: 1px solid var(--border-color);
    border-radius: 12px;
}
.init-balance-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 15px; flex-shrink: 0;
}
.init-balance-info { flex: 1; }
.init-balance-info label { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.init-balance-type { font-size: 11px; color: var(--text-secondary); }
.init-balance-input {
    display: flex; align-items: center; gap: 6px;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 4px 10px;
}
.init-currency { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.init-balance-input input {
    width: 120px; border: none; background: none;
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    text-align: right; outline: none;
}

/* Dark mode for new components */
body.dark-mode .page-tabs-bar { background: #1e293b; border-color: #334155; }
body.dark-mode .page-tab:hover { background: rgba(96,165,250,0.1); }
body.dark-mode .page-tab.active { color: #60a5fa; border-bottom-color: #60a5fa; background: rgba(96,165,250,0.08); }
body.dark-mode .kpi-card { background: #1e293b; border-color: #334155; }
body.dark-mode .chart-card { background: #1e293b; border-color: #334155; }
body.dark-mode .top-expense-category-item:hover { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.2); }
body.dark-mode .drill-item { background: #0f172a; border-color: #334155; }
body.dark-mode .drill-down-header { background: rgba(96,165,250,0.08); }
body.dark-mode .init-balance-item { background: #0f172a; border-color: #334155; }
body.dark-mode .init-balance-input { background: #1e293b; border-color: #334155; }
body.dark-mode .init-balance-input input { color: #f1f5f9; }

/* Responsive dashboard */
@media (max-width: 1024px) {
    .dashboard-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .dashboard-charts-grid { grid-template-columns: 1fr; }
    .chart-card-full { grid-column: 1; }
}
@media (max-width: 768px) {
    .dashboard-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .kpi-card { padding: 12px; }
    .kpi-value { font-size: 14px; }
    .page-tab { padding: 10px 16px; font-size: 13px; }
    .dashboard-page { padding: 14px 12px; }
    .main-content.single-col { padding: 12px; }
}
@media (max-width: 480px) {
    .dashboard-kpi-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .kpi-card { padding: 10px; gap: 8px; }
    .kpi-icon { width: 36px; height: 36px; font-size: 16px; }
    .kpi-value { font-size: 13px; }
}
