@font-face { font-family: 'Schibsted Grotesk'; src: url('fonts/SchibstedGrotesk.ttf') format('truetype'); font-weight: 400 900; }
@font-face { font-family: 'Archivo'; src: url('fonts/Archivo.ttf') format('truetype'); font-weight: 100 900; font-stretch: 62% 125%; }

:root {
  --acc: #ef4444; --ar: 239,68,68; --k: 1;
  --txt: #f2f3f5; --mut: #9097a1; --dim: #6b717b; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --well: rgba(255,255,255,.035); --hair: rgba(255,255,255,.07);
  --f: 'Schibsted Grotesk', system-ui, sans-serif; --fd: 'Archivo', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: transparent; font-family: var(--f); color: var(--txt); -webkit-font-smoothing: antialiased; user-select: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input, select, textarea { user-select: text; }
.hidden { display: none !important; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d { font-family: var(--fd); font-stretch: 78%; font-weight: 700; }
.tn { font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); } .neg { color: var(--txt); }

#app { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; }
#app.open { display: flex; }
.shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.42), rgba(0,0,0,.12) 70%); }

.win { position: relative; zoom: var(--k); border-radius: 24px; overflow: hidden; background: rgba(15,16,20,.95); box-shadow: 0 40px 100px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 0 1px rgba(255,255,255,.04); animation: win .22s cubic-bezier(.2,.8,.2,1); }
.win::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(620px 420px at 0 0, rgba(var(--ar),.16), transparent 70%); }
@keyframes win { from { opacity: 0; transform: translateY(8px); } }

/* layout */
.bank { width: 1340px; height: 760px; display: grid; grid-template-columns: 240px 1fr; }
.bank.wide { grid-template-columns: 240px 1fr 340px; }
.rail { position: relative; padding: 22px 14px 14px; display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 8px 18px; }
.mk { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(160deg, #ff6b6b, var(--acc) 55%, #b91c1c); box-shadow: 0 8px 24px rgba(var(--ar),.35), inset 0 1px 0 rgba(255,255,255,.35); }
.mk .ico { width: 22px; height: 22px; }
.brand b { display: block; font: 800 22px var(--fd); font-stretch: 78%; }
.brand span { font-size: 13px; color: var(--mut); }
.nv { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 13px; color: #a8aeb7; font-size: 15px; width: 100%; text-align: left; }
.nv:hover { color: #fff; background: rgba(255,255,255,.04); }
.nv .c { margin-left: auto; font-size: 12px; padding: 2px 7px; border-radius: 7px; background: rgba(var(--ar),.18); color: #ffb4b4; }
.nv.on { color: #fff; background: linear-gradient(90deg, rgba(var(--ar),.2), rgba(var(--ar),.04)); box-shadow: inset 0 0 0 1px rgba(var(--ar),.25); }
.nv.on .ico { color: #ff8a8a; }
.sep { font-size: 13px; color: var(--dim); padding: 16px 12px 6px; display: flex; justify-content: space-between; align-items: center; }
.sep button { color: var(--mut); display: inline-flex; }
.sep button:hover { color: #fff; }
.accs { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1; }
.accs::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 5px; }
.accs::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
.acc { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 13px; text-align: left; width: 100%; }
.acc:hover { background: rgba(255,255,255,.04); }
.acc.on { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); }
.ai { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.acc b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.acc span { font-size: 12.5px; color: var(--mut); }
.t-checking { background: rgba(239,68,68,.18); color: #ff8a8a; }
.t-savings { background: rgba(74,222,128,.14); color: #86efac; }
.t-job { background: rgba(245,158,11,.16); color: #fcd34d; }
.t-gang { background: rgba(244,114,182,.16); color: #f9a8d4; }
.t-shared { background: rgba(129,140,248,.16); color: #a5b4fc; }
.rail .foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin-top: 8px; border-radius: 13px; background: var(--well); font-size: 13px; color: var(--mut); }
.foot b { color: var(--txt); font-weight: 600; }
kbd { font: 600 11px var(--f); color: var(--mut); background: rgba(255,255,255,.07); padding: 3px 7px; border-radius: 6px; }

.main { position: relative; padding: 26px 30px; display: flex; flex-direction: column; gap: 20px; min-width: 0; min-height: 0; background: rgba(255,255,255,.015); }
.scroll { overflow-y: auto; min-height: 0; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.top h1 { margin: 0; font-size: 44px; line-height: .95; }
.top p { margin: 8px 0 0; font-size: 14px; color: var(--mut); }
.x { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); color: var(--mut); flex: none; }
.x:hover { color: #fff; }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: rgba(0,0,0,.28); gap: 2px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 14px; color: var(--mut); white-space: nowrap; }
.seg button.on { background: rgba(255,255,255,.1); color: #fff; }

.hero { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; }
.card { position: relative; height: 190px; border-radius: 20px; padding: 22px 24px; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #ff6b6b 0%, var(--acc) 32%, #991b1b 70%, #4c0d0d 100%); box-shadow: 0 24px 60px rgba(var(--ar),.35), inset 0 1px 0 rgba(255,255,255,.35); transform: perspective(900px) rotateY(-8deg) rotateX(4deg); }
.card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.2) 45%, transparent 60%); }
.card.c-savings { background: radial-gradient(120% 140% at 0% 0%, #4ade80 0%, #16a34a 38%, #14532d 100%); box-shadow: 0 24px 60px rgba(34,197,94,.3), inset 0 1px 0 rgba(255,255,255,.35); }
.card.c-job, .card.c-gang { background: radial-gradient(120% 140% at 0% 0%, #4b5563 0%, #1f2937 45%, #0b0d12 100%); box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18); }
.card.c-shared { background: radial-gradient(120% 140% at 0% 0%, #a5b4fc 0%, #6366f1 38%, #312e81 100%); box-shadow: 0 24px 60px rgba(99,102,241,.3), inset 0 1px 0 rgba(255,255,255,.35); }
.card .bk { font: 800 19px var(--fd); font-stretch: 80%; letter-spacing: .02em; }
.card .chip { position: absolute; left: 24px; top: 66px; width: 44px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #f6dd9a, #b9934a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.card .num { position: absolute; left: 24px; bottom: 50px; font: 700 20px var(--fd); font-stretch: 90%; letter-spacing: .12em; }
.card .nm { position: absolute; left: 24px; bottom: 22px; font-size: 13px; opacity: .85; text-transform: uppercase; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tp { position: absolute; right: 22px; bottom: 18px; font: 800 italic 22px var(--fd); font-stretch: 85%; opacity: .9; }
.card .fz { position: absolute; right: 18px; top: 18px; display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 4px 9px; border-radius: 8px; background: rgba(0,0,0,.35); }
.bal .k { font-size: 14px; color: var(--mut); }
.bal .big { font-size: 66px; line-height: .95; margin-top: 6px; letter-spacing: -.01em; }
.bal .big small { font-size: 36px; color: var(--mut); }
.bal .tr { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; color: var(--ok); }
.bal .tr.down { color: var(--bad); }
.qa { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.qa .btn { padding: 0 14px; }
.btn { height: 46px; padding: 0 16px; border-radius: 15px; display: inline-flex; gap: 9px; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); white-space: nowrap; }
.btn:hover:not(:disabled) { background: rgba(255,255,255,.07); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.sm { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13.5px; }
.btn.pri { color: #fff; background: linear-gradient(180deg, #f45b5b, var(--acc)); box-shadow: 0 10px 28px rgba(var(--ar),.35), inset 0 1px 0 rgba(255,255,255,.3); font-weight: 700; }
.btn.pri:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(180deg, #f45b5b, var(--acc)); }
.btn.danger:hover:not(:disabled) { color: #fca5a5; }

.panel { border-radius: 18px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); padding: 18px 20px; }
.panel .h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--mut); gap: 12px; }
.panel .h b { color: var(--txt); font-weight: 600; }
.chartp { flex: 1; display: flex; flex-direction: column; min-height: 220px; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--mut); }
.legend b { font: 700 15px var(--fd); font-stretch: 85%; margin-left: 6px; }
.legend .li b { color: var(--ok); } .legend .lo b { color: var(--bad); }
.lc { position: relative; flex: 1; margin-top: 10px; }
.lc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc .yl { position: absolute; left: 0; font-size: 11.5px; color: var(--dim); transform: translateY(-50%); }
.lc .xl { position: absolute; bottom: -4px; font-size: 11.5px; color: var(--dim); transform: translateX(-50%); white-space: nowrap; }
.lc .tip { position: absolute; transform: translate(-50%, -125%); padding: 8px 11px; border-radius: 11px; background: #1d1f25; box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); font-size: 12px; color: var(--mut); white-space: nowrap; pointer-events: none; }
.lc .tip b { display: block; font: 700 17px var(--fd); font-stretch: 82%; color: #fff; }
.lc .hit { position: absolute; inset: 0; }

.side { position: relative; padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: inset 1px 0 0 var(--hair); min-height: 0; }
.side h3, .sec h3 { margin: 0; font: 700 26px var(--fd); font-stretch: 80%; }
.tx { display: flex; align-items: center; gap: 12px; padding: 9px 4px; }
.tx .ti { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); color: #c9cdd3; flex: none; }
.tx .tt { min-width: 0; flex: 1; }
.tx b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx span { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tx .am { flex: none; margin-left: auto; font: 700 17px var(--fd); font-stretch: 82%; white-space: nowrap; text-align: right; }
.tx .am small { display: block; font: 500 12px var(--f); color: var(--dim); }
.callout { margin-top: auto; padding: 14px; border-radius: 16px; background: linear-gradient(180deg, rgba(var(--ar),.16), rgba(var(--ar),.06)); box-shadow: inset 0 0 0 1px rgba(var(--ar),.3); display: flex; gap: 12px; align-items: center; }
.callout b { display: block; font-size: 14px; }
.callout span { font-size: 12.5px; color: #ffb4b4; }
.callout .btn { margin-left: auto; }
.empty { padding: 22px; border-radius: 16px; background: var(--well); text-align: center; font-size: 14px; color: var(--dim); }

/* forms */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 7px; }
.fld > span { font-size: 13.5px; font-weight: 600; color: #d6d9de; }
.fld small { font-size: 12.5px; color: var(--dim); }
.in { height: 46px; padding: 0 14px; border-radius: 13px; border: 0; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; outline: none; width: 100%; }
.in:focus { box-shadow: inset 0 0 0 1px var(--acc); }
textarea.in { height: 80px; padding: 12px 14px; resize: none; }
select.in { color-scheme: dark; }
select.in option { background: #1e2126; color: #f3f4f6; }
.money { position: relative; }
.money .in { padding-left: 30px; font: 700 22px var(--fd); font-stretch: 85%; height: 56px; }
.money::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 700 22px var(--fd); color: var(--mut); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); color: var(--mut); }
.chips button:hover { color: #fff; }
.row { display: flex; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.hint { font-size: 13px; color: var(--dim); }
.tgl { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; }
.tgl b { display: block; font-size: 14px; font-weight: 600; }
.tgl span { font-size: 12.5px; color: var(--dim); }
.sw { position: relative; width: 40px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.12); flex: none; transition: background .2s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c5c9cf; transition: transform .2s, background .2s; }
.tgl.on .sw { background: var(--acc); box-shadow: 0 0 14px rgba(var(--ar),.45); }
.tgl.on .sw::after { transform: translateX(16px); background: #fff; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); }
.item .grow { flex: 1; min-width: 0; }
.item b { display: block; font-size: 15px; font-weight: 600; }
.item span { font-size: 13px; color: var(--mut); }
.item .big { font: 700 22px var(--fd); font-stretch: 82%; white-space: nowrap; }
.tag { display: inline-flex; padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.07); color: var(--mut); }
.tag.ok { background: rgba(74,222,128,.14); color: #86efac; }
.tag.warn { background: rgba(251,191,36,.14); color: #fcd34d; }
.tag.bad { background: rgba(var(--ar),.18); color: #fca5a5; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 16px 18px; border-radius: 16px; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); }
.stat span { font-size: 13px; color: var(--mut); }
.stat b { display: block; font: 700 30px var(--fd); font-stretch: 80%; margin-top: 4px; }

.gauge { position: relative; width: 220px; height: 130px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .v { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; }
.gauge .v b { display: block; font: 700 46px var(--fd); font-stretch: 80%; line-height: 1; }
.gauge .v span { font-size: 13px; color: var(--mut); }

.mini { position: relative; width: 210px; height: 128px; border-radius: 16px; padding: 14px 16px; color: #fff; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, #ff6b6b 0%, var(--acc) 32%, #991b1b 70%, #4c0d0d 100%); box-shadow: 0 14px 36px rgba(var(--ar),.3), inset 0 1px 0 rgba(255,255,255,.3); flex: none; }
.mini.fz { filter: grayscale(.85) brightness(.75); }
.mini .bk { font: 800 15px var(--fd); font-stretch: 80%; }
.mini .num { position: absolute; left: 16px; bottom: 34px; font: 700 15px var(--fd); letter-spacing: .1em; }
.mini .nm { position: absolute; left: 16px; bottom: 14px; font-size: 11px; opacity: .85; }

/* modal */
.modal { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(5,6,8,.55); }
.dlg { width: 440px; border-radius: 22px; padding: 24px; background: #15161b; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 16px; animation: win .18s ease-out; }
.dlg h2 { margin: 0; font-size: 32px; }
.dlg p { margin: -8px 0 0; color: var(--mut); font-size: 14px; }

.toast { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 30; display: flex; gap: 12px; align-items: center; padding: 11px 18px 11px 11px; border-radius: 16px; background: #1b1c22; box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 0 0 1px var(--hair); font-size: 14px; animation: win .2s ease-out; }
.toast .tk { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(74,222,128,.14); color: var(--ok); }
.toast.err .tk { background: rgba(var(--ar),.18); color: var(--bad); }

/* ATM */
.atm { width: 350px; padding: 20px 22px 20px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; }
.atm .mk { width: 34px; height: 34px; border-radius: 11px; }
.atm .mk .ico { width: 18px; height: 18px; }
.atm h2 { margin: 10px 0 0; font-size: 26px; text-align: center; }
.atm > p { margin: 3px 0 0; color: var(--mut); font-size: 12px; text-align: center; }
.atm .x { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 9px; }
.atm .x .ico { width: 15px; height: 15px; }
.dots { display: flex; gap: 11px; margin: 16px 0 14px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px var(--hair); transition: background .15s; }
.dots i.f { background: var(--acc); box-shadow: 0 0 14px rgba(var(--ar),.7); }
.dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 62px); gap: 8px; }
.pad button { height: 46px; border-radius: 13px; font: 700 20px var(--fd); font-stretch: 85%; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255,255,255,.05); display: grid; place-items: center; }
.pad button:hover { background: rgba(255,255,255,.07); }
.pad .ok { color: #fff; background: linear-gradient(180deg, #f45b5b, var(--acc)); box-shadow: 0 10px 28px rgba(var(--ar),.35), inset 0 1px 0 rgba(255,255,255,.3); }
.pad .ico { width: 18px; height: 18px; }
.atm .hint { font-size: 12px; margin-top: 12px; text-align: center; }
.atm .hint:empty { display: none; }
.cardpick { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; width: 100%; }
.cardpick .item { cursor: pointer; }
.cardpick .item:hover { background: rgba(255,255,255,.06); }
.atmbal { margin-top: 18px; text-align: center; }
.atmbal .big { font-size: 64px; line-height: 1; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; margin-top: 14px; }
.quick button { height: 38px; border-radius: 11px; font: 700 15px var(--fd); font-stretch: 85%; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); }
.quick button:hover { background: rgba(255,255,255,.07); }
.atm .row { width: 100%; margin-top: 12px; }
.atm .tx { width: 100%; }

/* admin */
.admin { width: 1180px; height: 720px; display: grid; grid-template-columns: 230px 1fr; }
.setgrp { display: flex; flex-direction: column; gap: 12px; }
.setgrp h4 { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: #d6d9de; }
.atm .row { gap: 6px; margin-top: 8px; }
.atm .money .in { height: 38px; font-size: 15px; padding-left: 24px; border-radius: 11px; }
.atm .money::before { left: 11px; font-size: 15px; }
.atm .row .btn { height: 38px !important; padding: 0 11px; font-size: 13px; border-radius: 11px; gap: 6px; }
.atm .row .btn .ico { width: 15px; height: 15px; }
.atm .tx { padding: 5px 2px; gap: 10px; }
.atm .tx .ti { width: 30px; height: 30px; border-radius: 9px; }
.atm .tx .ti .ico { width: 15px; height: 15px; }
.atm .tx b { font-size: 13px; }
.atm .tx span { font-size: 11.5px; }
.atm .tx .am { font-size: 14px; }
.atm .item { padding: 10px 12px; border-radius: 13px; }
