
*{box-sizing:border-box}:root{--bg:#f4f6fb;--ink:#101828;--muted:#667085;--line:#e5e7eb;--primary:#635bff;--green:#08875d;--red:#c2410c;--amber:#b45309;--blue:#0ea5e9}
body{margin:0;background:var(--bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink)}.app{max-width:540px;margin:0 auto;min-height:100vh;padding-bottom:98px}.hero{background:#111827;color:white;padding:22px 18px 24px;border-bottom-left-radius:28px;border-bottom-right-radius:28px;position:sticky;top:0;z-index:2}.hero small{color:#c7d2fe}.hero h1{margin:4px 0 14px;font-size:24px}.controls{display:grid;grid-template-columns:.85fr 1.15fr;gap:8px}.controls select{width:100%;border:1px solid #374151;background:#1f2937;color:white;border-radius:14px;padding:12px;font-size:15px}.summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.summary .box{background:#1f2937;border-radius:18px;padding:14px}.summary span{display:block;color:#cbd5e1;font-size:13px}.summary b{font-size:22px}.balance{grid-column:1/3;background:linear-gradient(135deg,#635bff,#0ea5e9)!important}.content{padding:16px}.view{display:none}.view.show{display:block}.card{background:white;border-radius:22px;padding:16px;margin-bottom:14px;box-shadow:0 8px 24px #0000000c;border:1px solid #eef0f4}.card h2{font-size:18px;margin:0 0 12px;display:flex;justify-content:space-between;align-items:center}.kpi{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.kpi div,.reportBox{background:#f8fafc;border-radius:16px;padding:11px;text-align:center}.kpi span,.reportBox span{font-size:12px;color:var(--muted)}.kpi b,.reportBox b{display:block;font-size:16px;margin-top:4px}.reportGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.row{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #f0f2f5}.row:last-child{border-bottom:0}.left{flex:1;min-width:0}.left b{display:block;font-size:15px}.left small{color:var(--muted)}.amount{font-weight:800;white-space:nowrap}.expense{color:var(--red)}.income{color:var(--green)}.actions{display:flex;gap:6px}.mini{border:0;border-radius:10px;background:#eef2ff;color:#3730a3;padding:7px 8px;font-weight:700}.mini.danger{background:#fee2e2;color:#991b1b}.pill{display:inline-flex;border-radius:999px;padding:5px 9px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:700}.pill.red{background:#fee2e2;color:#991b1b}.pill.green{background:#dcfce7;color:#166534}.pill.amber{background:#fef3c7;color:#92400e}.progress{height:10px;background:#eef2f7;border-radius:999px;overflow:hidden;margin-top:8px}.bar{height:100%;background:#635bff;border-radius:999px}.bar.green{background:#08875d}.bar.red{background:#c2410c}.bar.amber{background:#b45309}.category{margin:12px 0}.categoryTop{display:flex;justify-content:space-between;font-size:14px;gap:10px}.category small{color:#667085}.search{width:100%;border:1px solid var(--line);border-radius:16px;padding:13px;font-size:16px;margin-bottom:12px}.empty{text-align:center;color:var(--muted);padding:18px}.tabbar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:540px;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding:8px 6px calc(8px + env(safe-area-inset-bottom));z-index:5}.tab{border:0;background:transparent;color:#667085;font-size:11px;padding:6px 3px;border-radius:12px}.tab b{display:block;font-size:21px;margin-bottom:2px}.tab.active{color:#635bff;background:#eef2ff}.fab{position:fixed;right:18px;bottom:92px;width:58px;height:58px;border-radius:50%;background:#635bff;color:white;border:0;box-shadow:0 12px 30px #635bff66;font-size:30px;z-index:6}.modal{position:fixed;inset:0;background:#0008;display:none;align-items:flex-end;z-index:10}.modal.show{display:flex}.sheet{width:100%;max-width:540px;margin:0 auto;background:white;border-top-left-radius:26px;border-top-right-radius:26px;padding:18px;max-height:90vh;overflow:auto}.formGrid{display:grid;gap:10px}.formGrid input,.formGrid select,.formGrid textarea{width:100%;border:1px solid var(--line);border-radius:14px;padding:12px;font-size:16px}.formGrid textarea{min-height:70px}.btn{border:0;border-radius:16px;padding:13px;font-weight:800;background:#635bff;color:#fff}.btn.close{background:#f3f4f6;color:#111827}.btn.danger{background:#fee2e2;color:#991b1b}.settingsGroup{margin-bottom:16px}.chipList{display:flex;flex-wrap:wrap;gap:8px}.chip{display:flex;gap:6px;align-items:center;border:1px solid #e5e7eb;background:#fff;border-radius:999px;padding:8px 10px;font-size:13px}.chip button{border:0;background:#fee2e2;color:#991b1b;border-radius:999px;width:22px;height:22px}.addLine{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.note{font-size:13px;color:#667085;line-height:1.35}.subnav{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.subnav button{border:0;border-radius:14px;background:#eef2ff;color:#3730a3;padding:11px;font-weight:800}.subnav button.active{background:#635bff;color:white}.hidden{display:none}

.cloudLogin{position:fixed;inset:0;background:#0f172a;z-index:9999;display:none;align-items:center;justify-content:center;padding:20px}.cloudLogin.show{display:flex}.loginCard{background:white;color:#101828;border-radius:26px;padding:22px;width:100%;max-width:420px;box-shadow:0 25px 70px #0006}.loginCard h2{margin:0 0 8px;font-size:26px}.loginCard p{color:#667085;line-height:1.35}.loginCard input{width:100%;border:1px solid #e5e7eb;border-radius:14px;padding:13px;font-size:16px;margin:8px 0}.loginCard .btn{width:100%;margin-top:8px}.cloudBar{background:#eef2ff;color:#3730a3;border-radius:16px;padding:12px;margin:0 0 14px;font-weight:700;font-size:14px}.cloudActions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.cloudActions button{border:0;border-radius:14px;padding:11px;font-weight:800}.cloudPrimary{background:#635bff;color:#fff}.cloudSecondary{background:#f3f4f6;color:#111827}.cloudDanger{background:#fee2e2;color:#991b1b}.syncCard{background:#fff;border-radius:22px;padding:16px;margin-bottom:14px;box-shadow:0 8px 24px #0000000c;border:1px solid #eef0f4}.syncCard small{color:#667085}.syncStatus{font-size:13px;color:#667085;margin-top:8px}.syncStatus.ok{color:#166534}.syncStatus.warn{color:#92400e}.syncStatus.err{color:#991b1b}

.syncStatus strong{font-weight:800}.syncCountsGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:8px}.syncCountsGrid div{background:#f8fafc;border:1px solid #eef0f4;border-radius:12px;padding:8px;font-size:12px}.syncCountsGrid b{display:block;font-size:15px}.safeWarn{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:12px;padding:10px;margin-top:8px}.safeOk{background:#ecfdf5;border:1px solid #bbf7d0;color:#166534;border-radius:12px;padding:10px;margin-top:8px}
.app{padding-bottom:126px}.fab{bottom:108px}

.accountRow{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #f0f2f5}.accountRow:last-child{border-bottom:0}.accountMeta{font-size:12px;color:var(--muted);margin-top:3px}.accountBalance{font-size:17px;font-weight:800;text-align:right}.transferArrow{color:#635bff;font-weight:800}.accountActions{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}.accountInactive{opacity:.55}.balanceNegative{color:var(--red)}.balancePositive{color:var(--green)}

.migrationBanner{background:#fff7ed;border:1px solid #fed7aa;border-radius:16px;padding:13px;margin-bottom:12px}.migrationBanner b{display:block;color:#9a3412;margin-bottom:4px}.migrationItem{border:1px solid #e5e7eb;border-radius:16px;padding:12px;margin:10px 0}.migrationTop{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.migrationStats{font-size:12px;color:#667085;margin-top:4px}.migrationControls{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.migrationControls select{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px;font-size:14px}.migrationButtons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.sectionLabel{font-size:13px;font-weight:800;color:#667085;text-transform:uppercase;letter-spacing:.04em;margin:12px 0 4px}.warningText{font-size:12px;color:#92400e;margin-top:6px}.movementReviewItem{border:1px solid #e5e7eb;border-radius:14px;padding:12px;margin:10px 0}.movementReviewTop{display:flex;justify-content:space-between;gap:12px}.movementReviewMeta{font-size:12px;color:#667085;margin-top:4px}.movementReviewActions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.movementReviewActions select{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px;font-size:14px}.movementReviewActions button{white-space:nowrap}
