/* ============ VBN ALL IN ONE — Complete Banking Style ============ */
/* Responsive: Phone (<768px), Tablet (768-1024), Desktop (>1024) */

:root {
  --primary: #1E3A8A;
  --primary-dark: #172554;
  --primary-light: #3B82F6;
  --accent: #059669;
  --accent-light: #10B981;
  --gold: #F59E0B;
  --coral: #EF4444;
  --purple: #7C3AED;
  --teal: #0D9488;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-2: #64748B;
  --text-3: #94A3B8;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.05);
  --shadow-lg: 0 12px 28px rgba(15,23,42,.1), 0 6px 12px rgba(15,23,42,.06);
  --sidebar-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary-light); text-decoration: none; }
.hidden { display: none !important; }

/* ============ SPLASH ============ */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: linear-gradient(135deg, #1E3A8A 0%, #7C3AED 50%, #059669 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: splashFade 2s ease-in forwards; animation-delay: 1.4s;
}
@keyframes splashFade { to { opacity: 0; visibility: hidden; } }
.splash-logo { display: flex; flex-direction: column; align-items: center; gap: 16px; animation: bounceIn .8s cubic-bezier(.34,1.56,.64,1); }
.splash-icon { width: 96px; height: 96px; border-radius: 28px; background: rgba(255,255,255,.18); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; font-size: 52px; font-weight: 800; color: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.3); }
.splash-text { font-size: 48px; font-weight: 900; color: #fff; letter-spacing: 6px; text-shadow: 0 4px 20px rgba(0,0,0,.3); }
.splash-tagline { color: rgba(255,255,255,.9); font-size: 13px; font-weight: 600; letter-spacing: 4px; margin-top: 8px; }
.splash-loader { width: 40px; height: 40px; margin-top: 40px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes bounceIn { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ APP SHELL ============ */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-layout { display: flex; flex: 1; }

/* ============ HEADER ============ */
.app-header { position: sticky; top: 0; z-index: 500; background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%); color: #fff; box-shadow: 0 4px 20px rgba(30,58,138,.25); padding: env(safe-area-inset-top) 0 0 0; }
.header-content { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1400px; margin: 0 auto; }
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-badge { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.2); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.header-logo h1 { font-size: 20px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.header-logo p { font-size: 11px; opacity: .85; font-weight: 500; letter-spacing: 2px; margin-top: 3px; }
.header-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: all .2s; }
.icon-btn:active, .icon-btn:hover { transform: scale(.92); background: rgba(255,255,255,.25); }
.sidebar-toggle { display: none; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 450; }

/* ============ SIDEBAR ============ */
.sidebar { width: var(--sidebar-w); min-width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--border); padding: 16px 0; overflow-y: auto; position: sticky; top: 72px; height: calc(100vh - 72px); z-index: 400; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.side-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left; transition: all .15s; }
.side-btn:hover { background: #F1F5F9; color: var(--text); }
.side-btn.active { background: linear-gradient(135deg, rgba(30,58,138,.08), rgba(59,130,246,.08)); color: var(--primary); font-weight: 700; }
.side-icon { font-size: 18px; width: 24px; text-align: center; }

/* ============ MAIN CONTENT ============ */
.app-main { flex: 1; padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; min-height: calc(100vh - 72px); }

/* Tab panels */
.tab-panel { display: none; animation: fadeIn .3s ease-out; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }

/* ============ CARDS ============ */
.card { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); max-width: 100%; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* ============ STATS ROW ============ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: 18px; padding: 20px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); border-left: 5px solid; }
.stat-blue { border-left-color: #3B82F6; } .stat-green { border-left-color: #10B981; }
.stat-orange { border-left-color: #F59E0B; } .stat-red { border-left-color: #EF4444; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* ============ QUICK ACTIONS ============ */
.quick-actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.qa-btn { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 14px; font-size: 14px; font-weight: 700; color: #fff; transition: all .2s; box-shadow: var(--shadow-sm); }
.qa-btn:active { transform: scale(.95); opacity: .9; }
.qa-green { background: linear-gradient(135deg,#10B981,#059669); } .qa-blue { background: linear-gradient(135deg,#3B82F6,#1E3A8A); }
.qa-orange { background: linear-gradient(135deg,#F59E0B,#D97706); } .qa-purple { background: linear-gradient(135deg,#A855F7,#7C3AED); }
.qa-teal { background: linear-gradient(135deg,#14B8A6,#0D9488); }
.qa-icon { font-size: 18px; }

/* ============ DASHBOARD GRID ============ */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.summary-card-inner { text-align: center; }
.summary-big { font-size: 32px; font-weight: 800; color: var(--primary); }
.summary-sub { font-size: 13px; color: var(--text-2); font-weight: 600; margin-top: 4px; }
.balance-chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 10px 0; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 60px; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #3B82F6, #1E3A8A); transition: height .4s ease; min-height: 4px; }
.chart-bar.savings { background: linear-gradient(180deg, #60A5FA, #2563EB); }
.chart-bar.current { background: linear-gradient(180deg, #34D399, #059669); }
.chart-label { font-size: 10px; color: var(--text-2); font-weight: 600; margin-top: 6px; text-align: center; word-break: break-all; max-width: 60px; }
.chart-amt { font-size: 10px; color: var(--text-3); font-weight: 700; }

.txn-list-compact { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.txn-item-sm { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.txn-item-sm:last-child { border-bottom: none; }
.txn-sm-icon { font-size: 16px; width: 28px; text-align: center; }
.txn-sm-body { flex: 1; min-width: 0; }
.txn-sm-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-sm-date { font-size: 11px; color: var(--text-3); }
.txn-sm-amt { font-weight: 700; white-space: nowrap; }
.txn-sm-in { color: #059669; } .txn-sm-out { color: #D97706; }

/* ============ FORMS ============ */
.account-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; }
.form-group input, .form-group select { padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: #FAFBFD; color: var(--text); font-weight: 500; transition: all .2s; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.1); }
.form-row-inline { display: flex; gap: 12px; }
.segmented { display: flex; background: #F1F5F9; padding: 4px; border-radius: 12px; }
.segmented input[type=radio] { display: none; }
.segmented label { flex: 1; text-align: center; padding: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); border-radius: 9px; cursor: pointer; transition: all .2s; }
.segmented input[type=radio]:checked + label { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
#typeDeposit:checked + label { background: linear-gradient(135deg,#10B981,#059669); color: #fff; }
#typeWithdraw:checked + label { background: linear-gradient(135deg,#F59E0B,#D97706); color: #fff; }

.btn { padding: 12px 20px; border-radius: 14px; font-weight: 700; font-size: 14px; transition: all .2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-lg { padding: 14px 24px; font-size: 15px; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-primary { background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%); color: #fff; box-shadow: 0 6px 16px rgba(30,58,138,.3); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: #F1F5F9; color: var(--text); border: 1.5px solid var(--border); }
.btn-export-pdf { background: linear-gradient(135deg,#EF4444,#DC2626); color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.3); }
.btn-print { background: linear-gradient(135deg,#F59E0B,#D97706); color: #fff; box-shadow: 0 4px 12px rgba(217,119,6,.3); }
.chip { background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.link-btn { font-size: 12px; font-weight: 600; color: var(--primary-light); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.search-bar-inline input { padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; width: 100%; min-width: 200px; }
.search-bar-inline input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(59,130,246,.1); }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 7px 14px; border-radius: 20px; background: #fff; font-size: 12px; font-weight: 600; color: var(--text-2); border: 1.5px solid var(--border); white-space: nowrap; transition: all .2s; cursor: pointer; }
.pill.active { background: linear-gradient(135deg,#1E3A8A,#3B82F6); color: #fff; border-color: transparent; }
.history-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* ============ MEMBERS GRID ============ */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.member-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 16px; display: flex; gap: 14px; transition: all .2s; cursor: pointer; }
.member-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.member-photo { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 22px; flex-shrink: 0; background: linear-gradient(135deg,#3B82F6,#1E3A8A); overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-photo.savings-avatar { background: linear-gradient(135deg,#3B82F6,#1E3A8A); }
.member-photo.current-avatar { background: linear-gradient(135deg,#10B981,#059669); }
.member-body { flex: 1; min-width: 0; }
.member-name { font-weight: 700; font-size: 15px; color: var(--text); }
.member-detail { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.member-address { font-size: 11px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.member-balance { font-weight: 800; font-size: 16px; color: var(--text); }
.member-type-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.badge-savings { background: rgba(59,130,246,.12); color: #1E3A8A; } .badge-current { background: rgba(16,185,129,.12); color: #065F46; }
.member-delete { color: var(--coral); font-size: 18px; padding: 4px 8px; border-radius: 8px; transition: background .2s; cursor: pointer; }
.member-delete:hover { background: rgba(239,68,68,.1); }

/* ============ TXN TABLE ============ */
.txn-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.txn-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
.txn-table thead { background: linear-gradient(135deg,#1E3A8A,#3B82F6); color: #fff; }
.txn-table th { padding: 12px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.txn-table th:last-child { text-align: center; }
.txn-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.txn-table tbody tr { transition: background .15s; }
.txn-table tbody tr:hover { background: #F8FAFC; }
.txn-table tbody tr:last-child td { border-bottom: none; }
.txn-type-dep { color: #059669; font-weight: 700; } .txn-type-wit { color: #D97706; font-weight: 700; }
.txn-amt-dep { color: #059669; font-weight: 700; } .txn-amt-wit { color: #D97706; font-weight: 700; }
.txn-delete-btn { color: var(--coral); font-size: 16px; padding: 4px 10px; border-radius: 8px; font-weight: 700; transition: all .2s; cursor: pointer; }
.txn-delete-btn:hover { background: rgba(239,68,68,.12); }

/* ============ TXN LAYOUT ============ */
.txn-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.preview-card .preview-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.preview-row:last-child { border-bottom: none; }
.preview-label { font-weight: 600; color: var(--text-2); font-size: 13px; }
.preview-val { font-weight: 700; color: var(--text); font-size: 14px; }
.preview-val.pos { color: #059669; } .preview-val.neg { color: #DC2626; }

/* ============ PASSBOOK ============ */
.passbook-header-card { margin-top: 16px; }
.passbook-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.passbook-account-info { display: flex; align-items: center; gap: 14px; }
.passbook-acc-avatar { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 24px; flex-shrink: 0; background: linear-gradient(135deg,#1E3A8A,#7C3AED); overflow: hidden; }
.passbook-acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.passbook-acc-name { font-weight: 700; font-size: 18px; color: var(--text); }
.passbook-acc-detail { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.passbook-balance-box { background: linear-gradient(135deg,#F0F9FF,#E0F2FE); border-radius: 14px; padding: 16px 20px; border: 1.5px solid #BAE6FD; text-align: center; min-width: 160px; }
.passbook-balance-label { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; }
.passbook-balance-amount { font-size: 24px; font-weight: 800; color: var(--primary); margin-top: 2px; }
.passbook-member-info { margin-bottom: 14px; padding: 12px; background: #F8FAFC; border-radius: 12px; font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 16px; }
.passbook-member-info span { font-weight: 600; color: var(--text); }
.passbook-actions { display: flex; gap: 10px; }
.passbook-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; }
.passbook-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 650px; }
.passbook-table thead { background: linear-gradient(135deg,#1E3A8A,#3B82F6); color: #fff; }
.passbook-table th { padding: 12px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.passbook-table th:nth-child(4), .passbook-table th:nth-child(5), .passbook-table th:nth-child(6) { text-align: right; }
.passbook-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.passbook-table tbody tr:hover { background: #F8FAFC; }
.passbook-table tbody tr:last-child td { border-bottom: none; }
.pb-opening-row { background: #F1F5F9; font-style: italic; }
.pb-opening-row td { padding: 10px 14px; color: var(--text-2); font-size: 12px; }
.pb-date { white-space: nowrap; color: var(--text-2); font-weight: 500; }
.pb-note { font-weight: 600; color: var(--text); }
.pb-mode { color: var(--text-3); font-size: 12px; }
.pb-deposit { color: #059669; font-weight: 700; text-align: right; }
.pb-withdraw { color: #D97706; font-weight: 700; text-align: right; }
.pb-balance { font-weight: 800; color: var(--text); text-align: right; }

/* ============ REPORTS ============ */
.reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.report-card { display: flex; flex-direction: column; gap: 12px; }
.report-desc { font-size: 13px; color: var(--text-2); }
.report-content { max-height: 600px; overflow-y: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; background: #F1F5F9; color: var(--text-2); border-bottom: 2px solid var(--border); }
.report-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }

/* ============ ATM CARDS ============ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }
.atm-card-ui { border-radius: 20px; padding: 20px; color: #fff; position: relative; overflow: hidden; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-lg); }
.atm-card-visa { background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #7C3AED 100%); }
.atm-card-mastercard { background: linear-gradient(135deg, #DC2626 0%, #F97316 50%, #F59E0B 100%); }
.atm-card-rupay { background: linear-gradient(135deg, #059669 0%, #10B981 50%, #14B8A6 100%); }
.atm-card-shine { position: absolute; top: -40%; right: -20%; width: 160px; height: 160px; background: radial-gradient(circle, rgba(255,255,255,.2) 0%, transparent 70%); pointer-events: none; }
.atm-card-chip { font-size: 28px; margin-bottom: 8px; }
.atm-card-number { font-size: 18px; font-weight: 700; letter-spacing: 3px; margin-bottom: 12px; font-family: 'Courier New', monospace; }
.atm-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.atm-card-holder .atm-label, .atm-card-expiry .atm-label { font-size: 9px; opacity: .7; text-transform: uppercase; letter-spacing: 1px; }
.atm-card-holder .atm-value { font-size: 14px; font-weight: 700; text-transform: uppercase; }
.atm-card-expiry .atm-value { font-size: 14px; font-weight: 700; }
.atm-card-type { font-size: 12px; font-weight: 700; opacity: .85; text-align: right; }
.atm-card-delete { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; background: rgba(0,0,0,.3); color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: background .2s; z-index: 2; cursor: pointer; }
.atm-card-delete:hover { background: rgba(255,0,0,.7); }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 48px; opacity: .4; margin-bottom: 12px; }
.empty-hint { color: var(--text-3); font-size: 14px; }

/* ============ BOTTOM NAV (mobile) ============ */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(20px); border-top: 1px solid var(--border); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)) 0; z-index: 500; justify-content: space-around; align-items: center; box-shadow: 0 -4px 20px rgba(0,0,0,.06); }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; color: var(--text-3); font-size: 10px; font-weight: 600; transition: color .2s; cursor: pointer; }
.nav-btn .nav-icon { font-size: 20px; }
.nav-btn.active { color: var(--primary); }
.nav-btn-center { position: relative; }
.fab { width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg,#1E3A8A,#7C3AED); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; box-shadow: 0 8px 20px rgba(30,58,138,.4); margin-bottom: 2px; transition: transform .2s; }
.nav-btn-center:active .fab { transform: scale(.94); }

/* More Menu */
.more-menu { position: fixed; inset: 0; z-index: 600; }
.more-menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.more-menu-sheet { position: absolute; bottom: 0; left: 0; right: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: slideUp .3s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.more-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.more-menu-header h3 { font-size: 16px; font-weight: 700; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 14px; font-size: 15px; font-weight: 600; width: 100%; border-radius: 12px; transition: background .15s; }
.more-item:active, .more-item:hover { background: #F1F5F9; }



/* ============ SMS NOTIFICATION ============ */
.sms-notification {
  position: fixed; top: 20px; right: 20px; z-index: 3000;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6); color: #fff;
  border-radius: 16px; padding: 16px 20px; max-width: 350px;
  box-shadow: 0 12px 40px rgba(30,58,138,.5);
  transform: translateX(120%); opacity: 0; transition: all .4s cubic-bezier(.34,1.56,.64,1);
  font-size: 13px;
}
.sms-notification.show { transform: translateX(0); opacity: 1; }
.sms-header {
  font-weight: 700; font-size: 13px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.2);
}
.sms-icon { font-size: 18px; }
.sms-body { white-space: pre-line; line-height: 1.6; font-size: 12px; opacity: .95; }

/* SMS Banking Tab */
.sms-sim-card {
  background: linear-gradient(135deg, #1E3A8A 0%, #7C3AED 50%, #059669 100%);
  border-radius: 20px; padding: 24px; color: #fff; text-align: center;
  margin-bottom: 20px; box-shadow: 0 12px 32px rgba(30,58,138,.35);
}
.sms-sim-icon { font-size: 48px; margin-bottom: 8px; }
.sms-sim-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.sms-sim-sub { font-size: 12px; opacity: .8; }
.sms-sim-number { font-size: 22px; font-weight: 700; letter-spacing: 3px; margin-top: 8px; }
.sms-enquiry-box {
  background: #fff; border-radius: 16px; padding: 20px; margin-top: 16px;
}
.sms-response {
  background: #E8F5E9; border-radius: 14px; padding: 16px;
  margin-top: 12px; white-space: pre-line; font-size: 13px;
  line-height: 1.8; color: #1B5E20; border-left: 4px solid #4CAF50;
  font-family: 'Courier New', monospace;
}
.sms-response.error {
  background: #FFEBEE; border-left-color: #EF4444; color: #B71C1C;
}
.sms-history-item {
  background: #fff; border-radius: 14px; padding: 14px;
  border: 1px solid var(--border); margin-bottom: 8px;
  display: flex; gap: 12px; align-items: flex-start;
}
.sms-history-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #E8F5E9; display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.sms-history-body { flex: 1; }
.sms-history-phone { font-weight: 700; font-size: 13px; color: var(--text); }
.sms-history-msg { font-size: 12px; color: var(--text-2); white-space: pre-line; margin-top: 4px; line-height: 1.5; }
.sms-history-time { font-size: 10px; color: var(--text-3); margin-top: 4px; }


/* ============ TOAST ============ */
.toast { position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--text); color: #fff; padding: 14px 24px; border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; transition: all .3s; z-index: 2000; pointer-events: none; box-shadow: var(--shadow-lg); white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg,#10B981,#059669); }
.toast.error { background: linear-gradient(135deg,#EF4444,#DC2626); }

/* ============ RESPONSIVE: Tablet ============ */
@media (max-width: 1024px) {
  .sidebar { display: none; position: fixed; left: 0; top: 72px; bottom: 0; z-index: 460; box-shadow: var(--shadow-lg); transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { display: block; transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .txn-layout { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ============ RESPONSIVE: Phone ============ */
@media (max-width: 768px) {
  .app-main { padding: 16px; }
  .page-title { font-size: 20px; margin-bottom: 14px; }
  .header-content { padding: 12px 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 20px; }
  .quick-actions-row { gap: 8px; }
  .qa-btn { padding: 10px 14px; font-size: 12px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .summary-big { font-size: 24px; }
  .txn-layout { grid-template-columns: 1fr; }
  .account-form-grid { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .passbook-top { flex-direction: column; align-items: flex-start; }
  .passbook-balance-box { width: 100%; }
  .passbook-actions { flex-direction: column; }
  .sidebar { display: none; position: fixed; left: 0; top: 60px; bottom: 0; z-index: 460; box-shadow: var(--shadow-lg); transform: translateX(-100%); transition: transform .3s; width: 280px; min-width: 280px; }
  .sidebar.open { display: block; transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .bottom-nav { display: flex; }
  .app { padding-bottom: 80px; }
  .history-controls { flex-direction: column; align-items: stretch; }
  .search-bar-inline input { min-width: 0; }
  .card { padding: 14px; }
  .form-group input, .form-group select { padding: 10px 12px; }
  .btn { padding: 10px 16px; }
}

/* ============ PRINT STYLES ============ */
@media print {
  .app-header, .sidebar, .bottom-nav, .toast, .splash,
  .passbook-actions, .quick-actions-row, .nav-btn,
  #sidebarOverlay, .more-menu, .fab, .sidebar-toggle,
  form, .search-bar-inline, .filter-pills, .history-controls,
  .btn, .member-delete, .txn-delete-btn, .atm-card-delete { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .app { max-width: 100%; padding: 0; }
  .app-main { padding: 10px; max-width: 100%; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .passbook-table-container, .txn-table-wrapper { box-shadow: none; border: 1px solid #ccc; }
  .passbook-table thead, .txn-table thead { background: #1E3A8A !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .passbook-table thead th, .txn-table thead th { color: #fff !important; }
  .atm-card-ui { break-inside: avoid; }
  .report-content { max-height: none; overflow: visible; }
}