* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #e5e7eb; display: flex; justify-content: center; }

.mobile-app { width: 100%; max-width: 420px; background-color: #f9fafb; min-height: 100vh; position: relative; padding: 20px 20px 80px 20px; box-shadow: 0 0 20px rgba(0,0,0,0.1); overflow-x: hidden; }

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header h1 { font-size: 24px; color: #1f2937; }
.header p { font-size: 14px; color: #6b7280; }

.action-badge { padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.action-badge:active { transform: scale(0.95); }
.bg-blue { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.bg-red { background: #fee2e2; color: #ef4444; border: 1px solid #fecaca; }

.balance-card { background: linear-gradient(135deg, #3b82f6, #4f46e5); border-radius: 15px; padding: 20px; color: white; margin-bottom: 20px; box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.5); }
.balance-card p { font-size: 14px; opacity: 0.9; margin-bottom: 5px; }
.balance-card h2 { font-size: 36px; margin-bottom: 20px; }
.balance-details { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 15px; }
.balance-details h3 { font-size: 18px; margin-top: 5px; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-title { font-size: 18px; color: #374151; }
.mt-4 { margin-top: 20px; }

.wallets-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.wallet-card { background: white; padding: 15px; border-radius: 12px; flex: 1 1 calc(33% - 10px); min-width: 100px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.wallet-card p { font-size: 12px; color: #6b7280; font-weight: bold; margin-bottom: 5px; text-transform: uppercase; word-break: break-all; }
.wallet-card h4 { font-size: 18px; color: #1f2937; }

.action-bar { display: flex; justify-content: space-between; align-items: center; background: #e0e7ff; padding: 10px 15px; border-radius: 12px; margin-bottom: 10px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.select-all-wrapper { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #374151; }
.action-buttons { display: flex; gap: 8px; }
.action-buttons button { border: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: 0.2s; }
.action-buttons button:active { transform: scale(0.95); }
#edit-btn { background: #3b82f6; color: white; }
#delete-btn { background: #ef4444; color: white; }
.custom-cb { width: 18px; height: 18px; cursor: pointer; accent-color: #3b82f6; }

.transactions-list { background: white; border-radius: 12px; padding: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.transaction-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f3f4f6; transition: background 0.2s; border-radius: 8px;}
.transaction-item.selected { background: #eff6ff; }
.transaction-item:last-child { border-bottom: none; }
.trans-left { display: flex; align-items: center; gap: 12px; }
.icon { min-width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 18px; }
.expense-icon { background: #fee2e2; color: #ef4444; }
.income-icon { background: #d1fae5; color: #10b981; }
.trans-info h4 { font-size: 16px; color: #1f2937; }
.trans-info p { font-size: 12px; color: #6b7280; margin-top: 2px; }
.trans-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.trans-right h4 { font-size: 16px; margin-bottom: 3px;}
.trans-right p { font-size: 12px; color: #9ca3af; }
.expense { color: #ef4444; }
.income { color: #10b981; }

.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; background: white; border-top: 1px solid #e5e7eb; display: flex; justify-content: space-around; padding: 10px 0; z-index: 100; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #9ca3af; font-size: 12px; gap: 5px; }
.nav-item i { font-size: 20px; }
.nav-item.active { color: #3b82f6; }

.add-form { background: white; padding: 20px; border-radius: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 30px;}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: #6b7280; font-weight: bold; margin-bottom: 8px; }
.form-group input[type="number"], .form-group input[type="text"], .form-group input[type="date"], .form-group select { width: 100%; padding: 12px 15px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; background: #f9fafb; outline: none; transition: 0.3s; }
.form-group input:focus, .form-group select:focus { border-color: #3b82f6; background: white; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.type-toggle { display: flex; gap: 10px; }
.type-toggle input { display: none; }
.toggle-btn { flex: 1; text-align: center; padding: 12px; border-radius: 10px; font-weight: bold; border: 1px solid #e5e7eb; cursor: pointer; color: #6b7280; transition: 0.3s; font-size: 14px;}
#type-expense:checked + .expense-btn { background: #fee2e2; color: #ef4444; border-color: #ef4444; }
#type-income:checked + .income-btn { background: #d1fae5; color: #10b981; border-color: #10b981; }

.export-type-toggle .toggle-btn { padding: 10px 5px; font-size: 13px; }
#exp-type-all:checked + .all-btn { background: #e0e7ff; color: #4f46e5; border-color: #4f46e5; }
#exp-type-expense:checked + .expense-btn { background: #fee2e2; color: #ef4444; border-color: #ef4444; }
#exp-type-income:checked + .income-btn { background: #d1fae5; color: #10b981; border-color: #10b981; }

.submit-btn { width: 100%; background: #3b82f6; color: white; border: none; padding: 15px; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3); transition: 0.2s; }
.submit-btn:active { transform: scale(0.98); }
.empty-msg { text-align: center; color: #9ca3af; padding: 20px; font-size: 14px; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 5px; }
.cat-box { position: relative; background: #f9fafb; border: 2px solid #e5e7eb; padding: 12px 5px; border-radius: 12px; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; user-select: none; }
.cat-box:hover { border-color: #d1d5db; }
.cat-box.active { background: #eff6ff; border-color: #3b82f6; box-shadow: 0 2px 6px rgba(59,130,246,0.2); }
.cat-icon { font-size: 24px; }
.cat-name { font-size: 12px; color: #4b5563; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90%;}
.cat-box.active .cat-name { color: #1d4ed8; }
.add-cat-box { background: #f3f4f6; border: 2px dashed #d1d5db; color: #6b7280; }
.delete-badge { position: absolute; top: -6px; right: -6px; background: #ef4444; color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: 0.2s; z-index: 5; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; justify-content: center; align-items: center; animation: fadeInModal 0.2s ease; border-radius: inherit;}
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: white; width: 90%; max-width: 340px; padding: 25px 20px; border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); animation: slideUpModal 0.3s ease; max-height: 90vh; overflow-y: auto; }
@keyframes slideUpModal { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-card h3 { font-size: 18px; color: #1f2937; margin-bottom: 15px; text-align: center; }
.modal-card input[type="text"], .modal-card select { width: 100%; padding: 12px 15px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; background: #f9fafb; outline: none; transition: 0.3s; }
.modal-card input:focus, .modal-card select:focus { border-color: #3b82f6; background: white; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.modal-card input[type="date"] { border: 1px solid #e5e7eb; border-radius: 8px; outline: none; transition: 0.3s; background: #f9fafb; width: 100%; }
.modal-card input[type="date"]:focus { border-color: #3b82f6; }
.modal-actions { display: flex; gap: 10px; margin-top: 15px; }
.modal-btn { flex: 1; padding: 12px; border: none; border-radius: 10px; font-weight: bold; font-size: 14px; cursor: pointer; transition: 0.2s; }
.modal-btn.cancel { background: #f3f4f6; color: #4b5563; }
.modal-btn.save { background: #3b82f6; color: white; box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2); }
.modal-btn:active { transform: scale(0.95); }

.multi-select-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.filter-pill { padding: 6px 12px; border: 1px solid #e5e7eb; border-radius: 20px; font-size: 12px; color: #4b5563; background: #f9fafb; cursor: pointer; transition: 0.2s; user-select: none; }
.filter-pill.active { background: #dbeafe; color: #1d4ed8; border-color: #3b82f6; font-weight: bold; }

/* ---- Baaki purani saari CSS uper rahegi ---- */

/* NAYA: WELCOME SCREEN CSS */
.welcome-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #e0e7ff, #ede9fe); z-index: 2000; display: flex; justify-content: center; align-items: center; }
.welcome-card { background: white; width: 90%; max-width: 350px; padding: 30px 20px; border-radius: 20px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); text-align: center; }
.welcome-icon { font-size: 40px; color: #3b82f6; margin-bottom: 10px; background: #eff6ff; width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto; }
.welcome-card h2 { color: #1f2937; font-size: 22px; margin-bottom: 5px; }
.welcome-card p { color: #6b7280; font-size: 14px; margin-bottom: 25px; }
.login-options { display: flex; flex-direction: column; gap: 15px; }
.login-btn { padding: 12px; border-radius: 12px; font-weight: bold; font-size: 15px; cursor: pointer; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: 0.2s; width: 100%; }
.login-btn:active { transform: scale(0.98); }
.demo-login-btn { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.demo-login-btn span { font-size: 11px; font-weight: normal; color: #9ca3af; margin-top: 3px; }
.demo-login-btn:hover { background: #e5e7eb; }
.admin-login-btn { background: #3b82f6; color: white; margin-top: 10px; flex-direction: row; gap: 8px;}
.admin-login-btn:hover { background: #2563eb; }
.divider { display: flex; align-items: center; text-align: center; color: #9ca3af; font-size: 12px; font-weight: bold; margin: 5px 0;}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #e5e7eb; }
.divider::before { margin-right: .5em; }
.divider::after { margin-left: .5em; }
.admin-form input { width: 100%; padding: 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 14px; background: #f9fafb; margin-bottom: 10px; outline: none; }
.admin-form input:focus { border-color: #3b82f6; }