*{box-sizing:border-box}body{margin:0;background:#f3f5f9;color:#172033;font:15px system-ui,-apple-system,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}.topbar{height:66px;background:#172b4d;color:#fff;display:flex;align-items:center;gap:12px;padding:10px 18px}.brand{width:36px;height:36px;flex:none;display:grid;place-items:center}.brand img{width:34px;height:34px;object-fit:contain;pointer-events:none}.brand-mark{width:32px;height:32px;border-radius:10px;background:#fff;color:#172b4d;font-weight:800;display:grid;place-items:center;font-size:12px}.greeting{font-size:15px;font-weight:650}.wrap{max-width:760px;margin:auto;padding:16px 14px 100px}.panel,.tile{background:#fff;border:1px solid #e7eaf0;border-radius:16px;padding:16px;margin:12px 0;box-shadow:0 3px 12px #16233a08}.balance{font-size:30px;font-weight:800;margin:6px 0 14px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{margin:0;min-height:82px;font-weight:650}.tile span{display:block;color:#7a8498;font-size:12px;font-weight:400;margin-top:5px}label{display:block;font-size:13px;font-weight:650;margin:12px 0 6px}input,select,textarea{width:100%;padding:13px;border:1px solid #dce1e9;border-radius:11px;font:inherit;background:#fff}button,.btn{display:inline-block;border:0;background:#315bd6;color:white;padding:13px 16px;border-radius:11px;font:inherit;font-weight:700;cursor:pointer;width:100%;margin-top:12px;text-align:center}.btn.alt,button.alt{background:#edf1fb;color:#2347a6}.row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid #eef0f4}.alert{background:#fff2df;color:#8a4b00;padding:11px;border-radius:10px}.ok{background:#e6f8ef;color:#176b3c;padding:11px;border-radius:10px}.auth{min-height:100vh;display:grid;place-items:center;padding:18px}.auth .panel{width:min(100%,420px);padding:24px}.nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #e7eaf0;display:flex;justify-content:space-around;padding:9px 2px calc(9px + env(safe-area-inset-bottom));font-size:19px;color:#59657a;z-index:10}.nav a{text-align:center;min-width:17%}.nav small{display:block;font-size:10px;margin-top:3px}.tag{font-size:11px;background:#edf1fb;color:#315bd6;padding:4px 8px;border-radius:20px}.muted{font-size:13px;color:#788399}.foot{text-align:center}.danger{color:#b42318}.positive{color:#12804a}h1{font-size:22px}h2{font-size:17px}.preview{max-width:220px;max-height:220px;object-fit:contain;border:1px solid #ddd;border-radius:12px}.status{padding:12px;border-radius:12px;background:#eef3ff;margin:10px 0}

/* Mobile account experience */
.profile-hero{margin:-16px -14px 18px;padding:28px 20px 26px;background:linear-gradient(135deg,#214fc7,#4d83f0);color:#fff;border-radius:0 0 26px 26px;display:flex;align-items:center;gap:14px;min-height:148px}
.avatar{width:62px;height:62px;border-radius:50%;background:#e8efff;color:#315bd6;display:grid;place-items:center;font-size:27px;font-weight:800;border:3px solid #fff;flex:none}
.profile-main{min-width:0;flex:1}.profile-main h1{font-size:19px;margin:0 0 5px;color:#fff}.profile-main p{margin:0 0 8px;color:#e7edff;font-size:13px}.profile-chip{font-size:10px;padding:4px 9px;border-radius:20px;background:#ffffff2b;color:#fff}.edit-link{font-size:13px;font-weight:700;color:white;padding:8px}
.account-section{background:#fff;border:1px solid #e9edf4;border-radius:18px;padding:14px 16px;margin:12px 0 16px;box-shadow:0 4px 16px #172b4d0a}.section-heading{font-size:14px;font-weight:800;padding:2px 0 8px;color:#25324a}.account-item{display:flex;align-items:center;gap:12px;padding:14px 0;border-top:1px solid #eff1f5}.account-item>span:nth-child(2){flex:1;min-width:0}.account-item b{display:block;font-size:14px}.account-item small{display:block;color:#7b8494;font-size:11px;margin-top:4px;line-height:1.4}.account-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:19px;flex:none}.account-icon.blue{background:#edf3ff;color:#315bd6}.account-icon.violet{background:#f1edff}.account-icon.green{background:#e9f8f0;color:#16804a}.chevron{font-size:24px;color:#aab2c0}.account-form{border-radius:18px;padding:18px}.account-form h2{margin:0 0 5px;font-size:17px}.account-form label{margin-top:14px}.logout-panel{background:#fff;border:1px solid #f0dede;border-radius:16px;padding:15px;margin:14px 0 22px;display:flex;align-items:center;gap:12px}.logout-panel>div{flex:1}.logout-panel b{display:block;font-size:14px}.logout-panel small{display:block;font-size:11px;color:#7b8494;margin-top:4px}.logout-panel form{width:auto}.logout-button{width:auto;margin:0;background:#fff0f0;color:#bd3030;border:1px solid #ffd7d7;padding:10px 16px}.nav{box-shadow:0 -4px 18px #172b4d0d;padding-top:10px}.wrap{padding-bottom:112px}

/* App-like polish: touch feedback, spacing, safe areas and transient notices */
:root{color-scheme:light;--brand:#315bd6;--ink:#172033;--muted:#788399;--line:#e9edf4}
html{min-height:100%;scroll-behavior:smooth;scroll-padding-top:18px}
body{min-height:100vh;background:#f5f7fb;padding-bottom:env(safe-area-inset-bottom);-webkit-tap-highlight-color:transparent;overscroll-behavior-y:contain}
*,*::before,*::after{-webkit-tap-highlight-color:transparent}
a,button,input,select,textarea,label,[role=button]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus,a:focus,input:focus,select:focus,textarea:focus{outline:none}
button:focus-visible,a:focus-visible{outline:3px solid #8eafff;outline-offset:2px}
button:active,.btn:active,.tile:active,.account-item:active,.nav a:active{transform:scale(.985);filter:brightness(.97)}
button,.btn{transition:transform .12s ease,filter .12s ease,box-shadow .12s ease;box-shadow:0 3px 8px #315bd61a}
input,select,textarea{min-height:46px;color:var(--ink);outline:none;transition:border-color .15s,box-shadow .15s}
input:focus,select:focus,textarea:focus{border-color:#7294ed;box-shadow:0 0 0 3px #315bd61a}
.topbar{position:sticky;top:0;z-index:8;height:58px;background:#fff;color:var(--ink);padding:8px 16px;border-bottom:1px solid #edf0f5;box-shadow:0 2px 10px #172b4d08}
.brand{width:34px;height:34px}.brand img{width:32px;height:32px}.brand-mark{background:#edf2ff;color:var(--brand)}
.greeting{font-size:14px;font-weight:700;color:#26334b}
.wrap{width:100%;max-width:680px;margin:0 auto;padding:14px 14px calc(104px + env(safe-area-inset-bottom))}
.panel,.tile,.account-section{border-radius:18px;border-color:#edf0f5;box-shadow:0 4px 16px #172b4d08}
h1,h2{letter-spacing:-.25px}h2{margin-top:0}
.nav{padding:8px 4px calc(8px + env(safe-area-inset-bottom));min-height:64px;box-shadow:0 -5px 20px #172b4d0c;border-top:1px solid #edf0f5;backdrop-filter:blur(14px);background:#ffffffF5}
.nav a{flex:1;min-width:0;color:#929bad;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:12px;padding:4px 0}
.nav a span{font-size:20px;line-height:24px}.nav small{font-size:10px;font-weight:600;letter-spacing:.05px}.nav a.active{color:var(--brand);font-weight:800}
.toast{position:fixed;z-index:30;top:calc(68px + env(safe-area-inset-top));left:14px;right:14px;max-width:520px;margin:0 auto;padding:13px 44px 13px 14px;border:1px solid #dce8ff;border-radius:15px;box-shadow:0 12px 32px #15264a20;display:flex;align-items:center;gap:10px;font-size:13px;font-weight:650;line-height:1.4;animation:toast-in .28s cubic-bezier(.2,.8,.2,1) both}
.toast-success,.toast-info,.ok{background:#f0f7ff;color:#214a9a}.toast-success{background:#eaf8f0;color:#176b3c;border-color:#d4f0df}.toast-symbol{width:24px;height:24px;flex:none;border-radius:50%;background:#d2f0df;color:#176b3c;display:grid;place-items:center;font-weight:900}
.toast-close{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:30px;height:30px;margin:0;padding:0;background:transparent;color:currentColor;box-shadow:none;font-size:22px;line-height:1}
.alert{background:#fff6e8;color:#8a4b00;border:1px solid #ffe3b4;border-radius:13px;padding:13px}
.toast-hide{animation:toast-out .32s ease forwards}
@keyframes toast-in{from{opacity:0;transform:translateY(-12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toast-out{to{opacity:0;transform:translateY(-10px);visibility:hidden}}
.profile-hero{margin:-14px -14px 16px;padding:25px 18px 24px;min-height:136px;border-radius:0 0 24px 24px}
.account-item{min-height:68px}.account-form{scroll-margin-top:76px}
.logout-panel{margin-bottom:12px}
@media(min-width:600px){.profile-hero{border-radius:22px;margin:0 0 18px}.wrap{padding-top:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Transaction and loan feedback */
.loan-status{padding:17px;border-radius:16px;margin:12px 0;border:1px solid #e8edf5;animation:loan-in .45s cubic-bezier(.2,.8,.2,1) both}.loan-status p{font-size:13px;line-height:1.55;margin:9px 0}.loan-pending{background:#f2f6ff;border-color:#dce7ff}.loan-approved{background:#edfaf2;border-color:#d3f1df}.loan-rejected{background:#fff5f3;border-color:#f6dfda}.loan-symbol,.anim-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-size:23px;font-weight:900;margin-bottom:10px;background:#dce8ff;color:#315bd6}.loan-approved .loan-symbol,.anim-icon{background:#d8f4e2;color:#16804a;animation:success-pop .55s ease both}.loan-rejected .loan-symbol{background:#ffe4df;color:#b42318}.success-animation{text-align:center;padding:28px 18px;animation:loan-in .4s ease both}.success-animation .anim-icon{margin:0 auto 12px;width:58px;height:58px;font-size:30px}@keyframes loan-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes success-pop{0%{transform:scale(.5);opacity:0}70%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}

/* Header quick logout action */
.topbar .greeting{flex:1;min-width:0}.header-logout{width:auto;margin:0;flex:none}.header-logout-button{width:40px;height:40px;margin:0;padding:0;display:grid;place-items:center;border:1px solid #f2dede;border-radius:12px;background:#fff3f2;color:#c43b36;box-shadow:none}.header-logout-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.header-logout-button:active{transform:scale(.94)}
/* Native-app logout confirmation */
.app-confirm-backdrop{position:fixed;inset:0;background:#10182880;backdrop-filter:blur(5px);z-index:100;display:none;align-items:center;justify-content:center;padding:24px}.app-confirm-backdrop.show{display:flex;animation:toast-in .18s ease both}.app-confirm{width:min(100%,340px);background:#fff;border-radius:22px;padding:23px 20px 18px;text-align:center;box-shadow:0 22px 70px #0003;animation:loan-in .22s ease both}.app-confirm-icon{width:52px;height:52px;margin:0 auto 12px;border-radius:17px;background:#fff0ef;color:#c43b36;display:grid;place-items:center;font-size:26px}.app-confirm h3{margin:0 0 7px;font-size:18px;color:#172033}.app-confirm p{font-size:13px;line-height:1.5;color:#788399;margin:0 0 16px}.app-confirm-actions{display:flex;gap:9px}.app-confirm-actions button{margin:0;flex:1;padding:11px 8px}.installment-option input{accent-color:#315bd6}
