/* FinGlobal — light theme, matching Arjun's reference screens.
   White / light blue-grey bg, navy text, blue primary, cream balance card,
   pastel category tiles. Same layout in every language. */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,'Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif;background:#eef2f7;color:#12284b;-webkit-font-smoothing:antialiased}
button{font:inherit;cursor:pointer}
input,select,textarea{font:inherit;color:#12284b}
a{color:#1f6fd6}
.boot{min-height:100vh;display:flex;align-items:center;justify-content:center;font-weight:800;color:#12284b;font-size:22px}
#app{max-width:480px;margin:0 auto;min-height:100vh;background:#f8fafc;position:relative;box-shadow:0 0 40px rgba(18,40,75,.08)}
@media(min-width:768px){#app{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0}}
.view{padding:18px 18px 110px}
.view.no-nav{padding-bottom:30px}
h1{font-size:22px;margin:0 0 4px}
h2{font-size:17px;margin:22px 0 10px}
.sub{color:#64748b;font-size:13px}
.small{font-size:12.5px;color:#64748b}
.err{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:12px;padding:10px 12px;font-size:14px;margin:10px 0}
.okmsg{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;border-radius:12px;padding:10px 12px;font-size:14px;margin:10px 0}
.card{background:#fff;border:1px solid #e6ecf3;border-radius:18px;padding:16px;box-shadow:0 2px 10px rgba(18,40,75,.05);margin-bottom:14px}
.btn{display:block;width:100%;background:#1f6fd6;color:#fff;border:0;border-radius:14px;padding:14px;font-weight:700;font-size:16px;text-align:center;text-decoration:none}
.btn:hover{background:#1a5fb8}
.btn.secondary{background:#eaf2fb;color:#1f6fd6}
.btn.ghost{background:#fff;border:1px solid #dbe4ee;color:#12284b}
.btn.danger{background:#dc2626}
.btn.sm{width:auto;display:inline-block;padding:8px 14px;font-size:13.5px;border-radius:10px}
.btn:disabled{opacity:.55}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],input[type=month],select,textarea{width:100%;border:1px solid #dbe4ee;border-radius:12px;padding:12px;background:#fff;font-size:15px;margin:4px 0 12px}
label{font-size:13px;font-weight:600;color:#334155;display:block;margin-top:6px}
.row{display:flex;gap:10px;align-items:center}
.row.wrap{flex-wrap:wrap}
.sp{flex:1}
.pos{color:#059669}.neg{color:#dc2626}
.amt{font-weight:800;white-space:nowrap}

/* header */
.apphead{display:flex;align-items:center;gap:10px;padding:16px 18px 6px}
.apphead .greet{font-size:19px;font-weight:800;line-height:1.25}
.avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#0ea5a4,#1f6fd6);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;flex:0 0 38px}
.iconbtn{position:relative;width:38px;height:38px;border-radius:50%;border:1px solid #e2e8f0;background:#fff;font-size:17px;display:flex;align-items:center;justify-content:center}
.iconbtn .dot{position:absolute;top:7px;right:8px;width:8px;height:8px;border-radius:50%;background:#ef4444}
.langpill{display:flex;background:#eef2f7;border:1px solid #e2e8f0;border-radius:999px;padding:3px;gap:2px}
.langpill button{border:0;background:transparent;padding:5px 10px;border-radius:999px;font-size:12.5px;font-weight:700;color:#64748b}
.langpill button.on{background:#fff;color:#12284b;box-shadow:0 1px 4px rgba(18,40,75,.15)}

/* balance card (cream) */
.balance-card{background:linear-gradient(150deg,#fffbe8,#fdf3d0);border:1px solid #f3e3ae;border-radius:20px;padding:20px;margin:12px 18px 4px;box-shadow:0 4px 14px rgba(180,140,20,.10)}
.balance-card .bk{font-size:13px;color:#8a6d1a;font-weight:600}
.balance-card .bv{font-size:34px;font-weight:800;color:#b8860b;margin:6px 0 4px;letter-spacing:-.01em}
.balance-card .bv .cur{font-size:16px;color:#8a6d1a;font-weight:700}
.balance-card .bd{font-size:13.5px;color:#5b4a12}

/* quick add tiles */
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.tile{border:1px solid #e6ecf3;border-radius:16px;background:#fff;padding:12px 4px 10px;text-align:center;font-size:12px;font-weight:600;color:#334155;box-shadow:0 2px 8px rgba(18,40,75,.04)}
.tile .ic{font-size:22px;display:block;margin-bottom:5px}
.tile.add{border:1.5px dashed #93c5fd;color:#1f6fd6;background:#f4f9ff}
.tile.add .ic{font-size:26px;font-weight:300}
.tile.p0{background:#fff7e8}.tile.p1{background:#e9f9f0}.tile.p2{background:#fdeeee}.tile.p3{background:#eef2ff}
.tile.p4{background:#fdf4ff}.tile.p5{background:#ecfeff}.tile.p6{background:#fff1f2}.tile.p7{background:#f0fdf4}
.tile.sel{outline:2.5px solid #1f6fd6;outline-offset:-1px}

/* segmented */
.seg{display:flex;background:#eef2f7;border-radius:12px;padding:4px;gap:4px;margin:8px 0 12px}
.seg button{flex:1;border:0;background:transparent;padding:10px;border-radius:9px;font-weight:700;font-size:14.5px;color:#64748b}
.seg button.on{background:#1f6fd6;color:#fff;box-shadow:0 2px 8px rgba(31,111,214,.35)}
.seg button.on.alt{background:#fff;color:#12284b;box-shadow:0 1px 4px rgba(18,40,75,.15)}

/* transactions list */
.txrow{display:flex;align-items:center;gap:12px;padding:11px 2px;border-bottom:1px solid #f1f5f9}
.txrow:last-child{border-bottom:0}
.txrow .tic{width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:19px;flex:0 0 42px}
.txrow .tt{flex:1;min-width:0}
.txrow .tt b{display:block;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.txrow .tt span{font-size:12px;color:#94a3b8}
.txrow .tbtns{display:flex;gap:6px}
.mini{border:1px solid #e2e8f0;background:#fff;border-radius:8px;padding:5px 9px;font-size:12px;color:#475569}
.mini.arm{background:#fef2f2;border-color:#fecaca;color:#b91c1c}

/* bottom nav */
.bottomnav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;background:#fff;border-top:1px solid #e6ecf3;display:flex;padding:8px 6px calc(8px + env(safe-area-inset-bottom));z-index:20}
.bottomnav button{flex:1;border:0;background:transparent;color:#94a3b8;font-size:10.5px;font-weight:600;display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px 0}
.bottomnav button .ni{font-size:21px;line-height:1}
.bottomnav button.on{color:#1f6fd6}
.bottomnav .fab{width:52px;height:52px;border-radius:50%;background:#1f6fd6;color:#fff;font-size:27px;margin-top:-22px;box-shadow:0 6px 16px rgba(31,111,214,.4);display:flex;align-items:center;justify-content:center;flex:0 0 52px}

/* toggle switch */
.switch{position:relative;width:48px;height:27px;flex:0 0 48px}
.switch input{opacity:0;width:0;height:0}
.switch .tr{position:absolute;inset:0;background:#cbd5e1;border-radius:99px;transition:.2s}
.switch .tr:before{content:'';position:absolute;width:21px;height:21px;border-radius:50%;background:#fff;top:3px;left:3px;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.switch input:checked + .tr{background:#1f6fd6}
.switch input:checked + .tr:before{transform:translateX(21px)}

/* bars chart */
.bars{display:flex;align-items:flex-end;gap:8px;height:130px;padding-top:8px}
.bars .bar{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.bars .bar i{display:block;width:70%;border-radius:6px 6px 3px 3px;min-height:3px}
.bars .bar span{font-size:10px;color:#64748b;text-align:center;line-height:1.2}
.progress{height:10px;background:#eef2f7;border-radius:99px;overflow:hidden;margin:6px 0}
.progress i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#0ea5a4,#1f6fd6)}
.progress i.warn{background:linear-gradient(90deg,#f59e0b,#ef4444)}

/* members */
.members{display:flex;gap:14px;overflow-x:auto;padding:6px 2px 10px}
.member{text-align:center;font-size:11.5px;color:#475569;min-width:52px}
.member .avatar{margin:0 auto 4px}
.member .adm{color:#1f6fd6;font-weight:700;font-size:10px}
.checkrow{display:flex;align-items:center;gap:10px;padding:9px 2px;border-bottom:1px solid #f1f5f9}
.checkrow input[type=checkbox]{width:20px;height:20px;accent-color:#1f6fd6}
.checkrow input[type=number]{width:110px;margin:0;padding:8px}

/* landing / auth */
.hero{text-align:center;padding:38px 24px 10px}
.hero img.brand{width:min(240px,70vw);height:auto}
.hero h1{font-size:27px;margin:10px 0 6px}
.hero p{color:#64748b;font-size:15px;line-height:1.6}
.feat{display:flex;gap:12px;align-items:flex-start;padding:10px 2px}
.feat .fic{font-size:24px}
.logo-sm{width:64px;height:64px;border-radius:16px}
.divider{text-align:center;color:#94a3b8;font-size:12.5px;margin:16px 0}
.qrbox{text-align:center}
.qrbox canvas,.qrbox img{margin:8px auto}
.kv{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #f1f5f9;font-size:14.5px}
.kv:last-child{border-bottom:0}
select.inline{width:auto;margin:0;padding:8px}
.chip{display:inline-block;background:#eaf2fb;color:#1f6fd6;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700}
.chip.paid{background:#fef3c7;color:#92400e}
.chip.confirmed{background:#dcfce7;color:#15803d}
.chip.pending{background:#e2e8f0;color:#475569}
