/* ======== Sign-in: aurora background, floating glass cards, glass card with a live border ======== */
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* The sign-in screen is pinned to the whole display (including under the iPhone/iPad home bar), so no page background can show at the bottom. */
html.login-open, html.login-open body { background: #070a24; }
.lg { --px: 0; --py: 0; position: fixed; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(400px, 1fr); color: #fff; background: #070a24; isolation: isolate; }

/* ---- background */
.lg-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.lg-bg > i { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; animation: aurora 18s ease-in-out infinite; }
.lg-bg .a1 { width: 620px; height: 620px; left: -160px; top: -180px; background: #4f46e5; opacity: .75; }
.lg-bg .a2 { width: 560px; height: 560px; right: -140px; bottom: -200px; background: #8b5cf6; opacity: .6; animation-delay: -6s; }
.lg-bg .a3 { width: 420px; height: 420px; left: 34%; top: 38%; background: #0ea5b7; opacity: .32; animation-delay: -11s; }
@keyframes aurora { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(70px, 40px) scale(1.14); } 66% { transform: translate(-50px, 80px) scale(.92); } }
.lg-grid { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%); animation: grid-slide 24s linear infinite; }
@keyframes grid-slide { to { background-position: 48px 48px; } }
.lg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s; }
.lg-video.ready { opacity: .5; }
.lg-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 20%, transparent, rgba(7, 10, 36, .55) 80%); }

/* ---- left: message + floating cards */
.lg-hero { position: relative; display: flex; align-items: center; padding: 56px 28px 56px 64px; }
.lg-copy { position: relative; z-index: 2; max-width: 420px; }
.lg-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; font-size: 18px; animation: rise .8s both; }
.lg-brand .brand-mark { width: 44px; height: 44px; }
.lg-copy h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -.035em; color: #fff; animation: rise .8s .1s both; }
.lg-word { display: inline-block; opacity: 0; background: linear-gradient(100deg, #fff 30%, #b9bcff 70%, #8ff0d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-word.in { animation: word-in .8s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes word-in { from { opacity: 0; transform: translateY(20px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.lg-copy p { margin-top: 14px; font-size: 16px; color: #c3c8f0; max-width: 340px; animation: rise .8s .2s both; }
.lg-chips { max-width: 360px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; animation: rise .8s .3s both; }
.lg-chips > span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.lg-scene { position: absolute; right: 2%; top: 50%; width: 350px; height: 560px; margin-top: -280px; pointer-events: none; z-index: 1; }
.lg-fl { position: absolute; transform: translate3d(calc(var(--px) * var(--d) * -16px), calc(var(--py) * var(--d) * -12px), 0); transition: transform .35s ease-out; }
.lg-glass { padding: 16px 18px; border-radius: 22px; background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(16px); box-shadow: 0 24px 50px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .25); animation: float 7s ease-in-out infinite; }
.lg-glass small { display: block; font-size: 12px; color: rgba(255, 255, 255, .75); }
.lg-fl { z-index: 1; }
.lg-fl.a { right: 0; top: 0; width: 270px; }
.lg-fl.b { left: 6px; top: 262px; width: 168px; text-align: center; } .lg-fl.b .lg-glass { animation-delay: -2.5s; }
.lg-fl.c { right: 0; bottom: 0; width: 232px; } .lg-fl.c .lg-glass { animation-delay: -4.5s; }
.lg-fl.d { right: 0; top: 186px; } .lg-fl.d .lg-glass { display: flex; align-items: center; gap: 12px; padding: 12px 16px; animation: receipt 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes receipt { 0%, 8% { opacity: 0; transform: translateX(34px) scale(.94); } 14%, 70% { opacity: 1; transform: none; } 78%, 100% { opacity: 0; transform: translateX(34px) scale(.94); } }
.lg-fl.d b, .lg-fl.d small { display: block; }
.lg-tick { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #12a373; flex: none; }
.lg-amount { display: block; font-size: 25px; letter-spacing: -.02em; margin: 2px 0 6px; white-space: nowrap; }
.lg-chart { width: 100%; height: 66px; display: block; overflow: visible; }
.lg-line { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 2.6s .6s ease forwards, glow 3s 3.2s infinite; }
.lg-area { opacity: 0; animation: fade-in 1.2s 1.6s forwards; }
.lg-dot { opacity: 0; animation: fade-in .3s 3s forwards, pulse-dot 2s 3s infinite; transform-origin: 220px 14px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glow { 50% { filter: drop-shadow(0 0 6px #7df2c6); } }
@keyframes pulse-dot { 50% { transform: scale(1.5); } }
@keyframes fade-in { to { opacity: 1; } }
.lg-chip { position: absolute; right: 14px; top: 14px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(18, 163, 115, .35); color: #9ff3d4; }
.lg-ring-wrap { position: relative; width: 92px; height: 92px; margin: 0 auto 6px; }
.lg-ring { width: 100%; height: 100%; }
.lg-ring-arc { animation: ring-fill 2.4s .7s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes ring-fill { to { stroke-dasharray: 236 252; } }
.lg-ring-wrap b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 21px; letter-spacing: -.02em; }
.lg-bars { display: flex; align-items: flex-end; gap: 8px; height: 76px; margin-top: 10px; }
.lg-bars i { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #a5f3d0, rgba(125, 242, 198, .22)); transform-origin: bottom; transform: scaleY(0); animation: bar-up .9s var(--d) cubic-bezier(.2, .8, .2, 1) forwards, bar-breathe 4s calc(var(--d) + 1.2s) ease-in-out infinite; }
@keyframes bar-up { to { transform: scaleY(1); } }
@keyframes bar-breathe { 50% { transform: scaleY(.9); } }
.lg-fl.coin { z-index: 0; }
.lg-fl.coin.c1 { left: 10px; top: 60px; } .lg-fl.coin.c2 { left: 150px; bottom: 40px; } .lg-fl.coin.c3 { right: -18px; top: 330px; }
.lg-coin { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #7a4a00; background: radial-gradient(circle at 30% 30%, #ffe9a6, #f5b83a 60%, #d98a0b); box-shadow: 0 8px 18px rgba(0, 0, 0, .28); animation: coin 9s ease-in-out infinite; }
.lg-fl.coin.c2 .lg-coin { width: 28px; height: 28px; font-size: 9px; animation-delay: -3s; } .lg-fl.coin.c3 .lg-coin { width: 34px; height: 34px; animation-delay: -6s; }
@keyframes coin { 0%, 100% { transform: translateY(0) rotateY(0); } 50% { transform: translateY(-22px) rotateY(180deg); } }

/* ---- right: the sign-in card */
.lg-panel { display: grid; place-items: center; padding: 28px 40px 28px 16px; position: relative; }
.lg-card { --a: 0deg; --mx: 50%; --my: 0; position: relative; width: 100%; max-width: 420px; padding: 32px 30px 26px; border-radius: 30px; background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5); box-shadow: 0 40px 80px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .22); animation: card-in .9s cubic-bezier(.2, .8, .2, 1) both; transition: opacity .28s, transform .28s; }
.lg-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 255, 255, .13), transparent 70%); }
.lg-card::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; background: conic-gradient(from var(--a), transparent 0 55%, rgba(165, 168, 255, .95) 75%, rgba(125, 242, 198, .9) 88%, transparent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: border-spin 7s linear infinite; }
@keyframes border-spin { to { --a: 360deg; } }
@keyframes card-in { from { opacity: 0; transform: translateY(34px) scale(.96); } }
.lg-card.shake { animation: shake .45s; }
.lg-card.leaving { opacity: 0; transform: translateY(-16px) scale(.97); }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.lg-card > * { position: relative; }
.lg-card > h2, .lg-card > .lg-sub, .lg-card > .lg-card-top, .lg-card > .lg-stagger, .lg-card > .lg-install { animation: rise .7s calc(.25s + var(--i) * .08s) both; }
.lg-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.lg-logo { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lg-logo strong, .lg-logo small { display: block; } .lg-logo strong { font-size: 14.5px; line-height: 1.2; } .lg-logo small { color: rgba(255, 255, 255, .6); }
.lg-logo .brand-mark { width: 38px; height: 38px; flex: none; }
.lg-net { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); }
.lg-net i { width: 7px; height: 7px; border-radius: 50%; background: #7df2c6; box-shadow: 0 0 0 0 rgba(125, 242, 198, .6); animation: ping 2s infinite; }
.lg-net.off i { background: #ffc46b; animation: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(125, 242, 198, 0); } 100% { box-shadow: 0 0 0 0 rgba(125, 242, 198, 0); } }
.lg-card h2 { font-size: 27px; letter-spacing: -.025em; color: #fff; }
.lg-sub { color: rgba(255, 255, 255, .65); margin: 3px 0 22px; }
.lg-form { display: grid; gap: 14px; }

.lg-field { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 56px; border-radius: 16px; border: 1.5px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .6); transition: border-color .2s, box-shadow .2s, background .2s, color .2s; }
.lg-field:focus-within { border-color: #a5a8ff; background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 4px rgba(129, 140, 248, .22); color: #c9ccff; }
.lg-field input { border: 0 !important; box-shadow: none !important; background: none !important; flex: 1; min-width: 0; height: 100%; padding: 18px 0 0 !important; color: #fff; font-size: 15.5px; outline: none; }
.lg-label { position: absolute; left: 44px; top: 50%; translate: 0 -50%; font-size: 15px; color: rgba(255, 255, 255, .6); pointer-events: none; transition: top .18s, font-size .18s, color .18s; }
.lg-field:focus-within .lg-label, .lg-field input:not(:placeholder-shown) ~ .lg-label { top: 14px; font-size: 11.5px; color: #b9bcff; font-weight: 600; }
.lg-field input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 100px #262a78 inset !important; border-radius: 12px; }
.lg-eye { border: 0; background: none; color: rgba(255, 255, 255, .6); padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.lg-eye:hover { color: #fff; }
.lg-caps { display: inline-flex; align-items: center; gap: 6px; margin-top: -4px; color: #ffc46b; }
.lg-caps[hidden] { display: none; }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lg-keep { white-space: nowrap; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.lg-keep input { position: absolute; opacity: 0; width: 0; height: 0; }
.lg-switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, .18); transition: background .2s; flex: none; }
.lg-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.lg-keep input:checked + .lg-switch { background: linear-gradient(120deg, #6d5df0, #12a373); }
.lg-keep input:checked + .lg-switch::after { transform: translateX(18px); }
.lg-keep input:focus-visible + .lg-switch { box-shadow: 0 0 0 4px rgba(165, 168, 255, .35); }
.lg-tip { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: rgba(255, 255, 255, .5); cursor: help; }
.lg-error { padding: 11px 14px; border-radius: 12px; background: rgba(224, 67, 79, .2); border: 1px solid rgba(255, 120, 130, .4); color: #ffd0d4; font-weight: 500; animation: rise .25s; }

.lg-btn { position: relative; overflow: hidden; display: grid; place-items: center; height: 56px; border: 0; border-radius: 16px; color: #fff; font-weight: 700; font-size: 16px; background: linear-gradient(120deg, #4f46e5, #7c5cf5 55%, #a06cf7); box-shadow: 0 16px 32px rgba(79, 70, 229, .5); transition: transform .2s, box-shadow .2s, background .3s; }
.lg-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transform: skewX(-20deg); animation: shine 3.8s infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.lg-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 20px 38px rgba(79, 70, 229, .6); }
.lg-btn:active:not(:disabled) { transform: scale(.98); }
.lg-btn:disabled { cursor: default; }
.lg-btn > span { grid-area: 1 / 1; }
.lg-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; opacity: 0; animation: spin .7s linear infinite; }
.lg-check { opacity: 0; transform: scale(.4); display: grid; }
.lg-btn.loading .lg-btn-text { opacity: .0; } .lg-btn.loading .lg-spin { opacity: 1; }
.lg-btn.ok { background: linear-gradient(120deg, #0f8a62, #12a373); box-shadow: 0 16px 32px rgba(18, 163, 115, .5); }
.lg-btn.ok .lg-check { opacity: 1; transform: none; transition: .35s cubic-bezier(.3, 1.6, .5, 1); }
.lg-btn.ok .lg-btn-text { opacity: 0; }
.lg-install { margin-top: 12px; }
.lg-install .btn { color: rgba(255, 255, 255, .8); background: transparent; border: 1px dashed rgba(255, 255, 255, .22); }
.lg-install .btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---- iPhone / iPad. The screen is pinned to the whole display (top:0 bottom:0), nothing in the layout changes height. */
.lg-co, .lg-foot { display: none; }
.lg.kb { bottom: auto; height: var(--vvh); top: var(--vvt, 0px); }
@keyframes orb-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
@media (max-width: 1180px) {
  .lg { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .lg-bg > i { filter: blur(60px); }
  .lg-bg .a1 { width: 460px; height: 460px; left: -150px; top: -150px; } .lg-bg .a2 { width: 460px; height: 460px; right: -160px; bottom: -140px; } .lg-bg .a3 { display: none; }
  .lg-orb .brand-mark { width: 100%; height: 100%; }
}

/* ===== iPhone and iPad (any direction): logo on top, a compact glass card with the form ===== */
@media (max-width: 1180px) {
  .lg { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; row-gap: clamp(18px, 4svh, 44px); padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); padding-bottom: 12px; }
  .lg-grid { mask-image: radial-gradient(ellipse at 50% 38%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 38%, #000 10%, transparent 70%); }
  .lg-hero { flex-direction: column; justify-content: center; align-items: center; padding: 0; text-align: center; max-height: 420px; overflow: visible; transition: max-height .3s ease, opacity .25s ease; }
  .lg-copy { max-width: 400px; display: grid; justify-items: center; }
  .lg-copy h1, .lg-copy p, .lg-chips, .lg-scene { display: none; }
  .lg-brand { flex-direction: column; gap: 12px; margin: 0; }
  .lg-brand strong { font-size: clamp(20px, 2.8svh, 25px); letter-spacing: -.02em; line-height: 1.1; }
  .lg-brand::after { content: 'MICRO FINANCE'; font-size: 11.5px; font-weight: 600; letter-spacing: .24em; color: rgba(255, 255, 255, .55); margin-top: -6px; }
  .lg-orb { position: relative; width: clamp(64px, 9svh, 88px); height: clamp(64px, 9svh, 88px); display: grid; place-items: center; }
  .lg-orb .brand-mark { border-radius: 30%; box-shadow: 0 18px 44px rgba(79, 70, 229, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .lg-orb .brand-mark .icon svg { width: clamp(28px, 4.4svh, 42px); height: clamp(28px, 4.4svh, 42px); }
  .lg-orb::before, .lg-orb::after { content: ''; position: absolute; inset: 0; border-radius: 32%; border: 1.5px solid rgba(165, 168, 255, .55); animation: orb-ring 3.2s ease-out infinite; }
  .lg-orb::after { animation-delay: 1.6s; }
  .lg-panel { padding: 0; align-items: center; }
  .lg-card { max-width: 400px; padding: clamp(18px, 3svh, 26px) clamp(16px, 4vw, 24px) clamp(14px, 2.4svh, 20px); border-radius: 26px; text-align: center; animation: rise .8s .15s both; } /* keeps the glass card with its glowing border */
  .lg-card-top { justify-content: center; margin-bottom: clamp(8px, 1.6svh, 16px); } .lg-card-top .lg-logo { display: none; }
  .lg-card h2 { font-size: clamp(21px, 3svh, 26px); } .lg-sub { margin: 3px 0 clamp(12px, 2.2svh, 20px); font-size: 14px; }
  .lg-form { gap: clamp(9px, 1.5svh, 13px); text-align: left; }
  .lg-field { height: clamp(48px, 6svh, 54px); border-radius: 16px; padding: 0 13px; }
  .lg-btn { height: clamp(48px, 6svh, 54px); border-radius: 16px; font-size: 16px; }
  .lg-field input { font-size: 16px; } /* 16px stops iOS from zooming the page when a field is focused */
  .lg-install { margin-top: clamp(6px, 1.2svh, 12px); } .lg-install .btn { min-height: 44px; border: 0; background: transparent; color: rgba(255, 255, 255, .75); }
  .lg-install .btn:hover { background: transparent; }
}
@media (max-width: 1180px) and (max-height: 760px) { .lg-sub, .lg-install { display: none; } .lg-card h2 { margin-bottom: 12px; } .lg-orb { width: 60px; height: 60px; } .lg-orb .brand-mark .icon svg { width: 30px; height: 30px; } .lg-brand::after { display: none; } }
@media (max-width: 1180px) and (max-height: 600px) { .lg { grid-template-columns: 1fr 1fr; grid-template-rows: auto; column-gap: 28px; } .lg-card-top, .lg-card h2, .lg-sub, .lg-install, .lg-brand::after { display: none; } .lg-orb { width: 72px; height: 72px; } .lg-hero { max-height: none; } }

/* keyboard open: the header folds away so the form stays in view */
.lg.kb .lg-hero { max-height: 0; opacity: 0; overflow: hidden; margin: 0; }
.lg.kb { row-gap: 0; }
@media (prefers-reduced-motion: reduce) {
  .lg *, .lg *::before, .lg *::after { animation: none !important; transition: none !important; }
  .lg-ring-arc { stroke-dasharray: 236 252; } .lg-line { stroke-dashoffset: 0; } .lg-bars i { transform: none; } .lg-word { opacity: 1; } .lg-area, .lg-dot { opacity: 1; }
}
