:root{--bg:#f7f8fa;--surface:#ffffff;--surface2:#f1f3f6;--border:#e6e9ee;--text:#16181d;--text2:#5b6472;--text3:#9aa3b0;--accent:#4f63f0;--accent-soft:#eceffe;--accent-text:#3a4cd1;--green:#1fa66a;--green-soft:#e6f6ee;--red:#e0455a;--red-soft:#fdecef;--amber:#d98a0c;--amber-soft:#fdf3e2;--shadow:0 1px 2px rgba(20,24,40,.05),0 4px 16px rgba(20,24,40,.05);--shadow-lg:0 8px 40px rgba(20,24,40,.16);--radius:14px;--sidebar-w:232px}[data-theme=dark]{--bg:#0e1015;--surface:#171a21;--surface2:#1f242e;--border:#262b36;--text:#eef0f4;--text2:#9aa3b2;--text3:#646d7c;--accent:#7286ff;--accent-soft:#222a4a;--accent-text:#a5b1ff;--green:#34c98a;--green-soft:#15301f;--red:#f06a7c;--red-soft:#3a1b21;--amber:#e8a83e;--amber-soft:#33270f;--shadow:0 1px 2px rgba(0,0,0,.3),0 4px 16px rgba(0,0,0,.25);--shadow-lg:0 8px 40px rgba(0,0,0,.5)}*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{-webkit-text-size-adjust:100%}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.45;transition:background .25s,color .25s;overscroll-behavior-y:contain}button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}input,select,textarea{font:inherit;color:var(--text)}svg{display:block}::selection{background:var(--accent);color:#fff}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}.app{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-w);background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:20px 12px;z-index:40}.main{flex:1;margin-left:var(--sidebar-w);padding:28px 32px 48px;max-width:1280px}.brand{display:flex;align-items:center;gap:10px;padding:4px 10px 18px;font-weight:700;font-size:17px;letter-spacing:-.02em}.brand .logo{width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,var(--accent),#8a5cf6);display:grid;place-items:center;color:#fff;font-size:15px;font-weight:800}.nav-group{margin-top:14px}.nav-label{font-size:10.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text3);padding:0 10px;margin-bottom:6px}.nav-item{display:flex;align-items:center;gap:11px;width:100%;padding:8px 10px;border-radius:9px;color:var(--text2);font-weight:500;font-size:13.5px;transition:background .15s,color .15s;text-align:left}.nav-item svg{width:17px;height:17px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-item:hover{background:var(--surface2);color:var(--text)}.nav-item.active{background:var(--accent-soft);color:var(--accent-text);font-weight:600}.nav-item .badge{margin-left:auto;background:var(--red);color:#fff;font-size:10px;font-weight:700;padding:1px 6px;border-radius:99px}.sidebar-footer{margin-top:auto;padding:10px;display:flex;align-items:center;gap:10px;border-top:1px solid var(--border)}.avatar{width:32px;height:32px;border-radius:50%;background:var(--accent-soft);color:var(--accent-text);display:grid;place-items:center;font-weight:700;font-size:12.5px;flex:none}.avatar.sm{width:26px;height:26px;font-size:10.5px}.sidebar-footer .meta{min-width:0}.sidebar-footer .meta b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-footer .meta span{font-size:11.5px;color:var(--text3)}.topbar{display:flex;align-items:center;gap:14px;margin-bottom:24px}.topbar h1{font-size:21px;font-weight:700;letter-spacing:-.02em}.topbar .sub{color:var(--text2);font-size:13px;margin-top:2px}.topbar-actions{margin-left:auto;display:flex;gap:8px;align-items:center}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.card-pad{padding:20px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 20px;border-bottom:1px solid var(--border)}.card-head h3{font-size:14px;font-weight:600}.card-head .hint{font-size:12px;color:var(--text3)}.grid{display:grid;gap:16px}.kpis{grid-template-columns:repeat(4,1fr)}.kpi{padding:18px 20px}.kpi .label{font-size:12px;color:var(--text2);font-weight:500;display:flex;align-items:center;gap:6px}.kpi .value{font-size:23px;font-weight:700;letter-spacing:-.02em;margin-top:6px;font-variant-numeric:tabular-nums}.kpi .delta{font-size:11.5px;font-weight:600;margin-top:4px;display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:99px}.delta.up{color:var(--green);background:var(--green-soft)}.delta.down{color:var(--red);background:var(--red-soft)}.delta.flat{color:var(--text2);background:var(--surface2)}.btn{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:9px;font-weight:600;font-size:13px;border:1px solid var(--border);background:var(--surface);transition:all .15s;white-space:nowrap}.btn:hover{background:var(--surface2)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{filter:brightness(1.08)}.btn.ghost{border-color:transparent;background:transparent;color:var(--text2)}.btn.ghost:hover{background:var(--surface2);color:var(--text)}.btn.sm{padding:5px 10px;font-size:12px;border-radius:7px}.btn.danger{color:var(--red)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.icon-btn{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;border:1px solid var(--border);background:var(--surface);color:var(--text2);transition:all .15s}.icon-btn:hover{background:var(--surface2);color:var(--text)}.icon-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.chip{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:99px;font-size:12px;font-weight:500;background:var(--surface2);color:var(--text2);border:1px solid transparent;cursor:pointer;transition:all .15s}.chip:hover{border-color:var(--border)}.chip.on{background:var(--accent-soft);color:var(--accent-text);font-weight:600}.tag{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;font-size:11.5px;font-weight:600}.tag.green{background:var(--green-soft);color:var(--green)}.tag.red{background:var(--red-soft);color:var(--red)}.tag.amber{background:var(--amber-soft);color:var(--amber)}.tag.gray{background:var(--surface2);color:var(--text2)}.dot{width:8px;height:8px;border-radius:50%;flex:none}.minitag{display:inline-flex;align-items:center;padding:1px 7px;border-radius:99px;font-size:10.5px;font-weight:600;background:var(--accent-soft);color:var(--accent-text);margin:3px 3px 0 0;cursor:pointer}.input,.select{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:8px 12px;font-size:13px;outline:none;transition:border .15s}.input:focus,.select:focus{border-color:var(--accent)}.input::placeholder{color:var(--text3)}.search-wrap{position:relative;flex:1;max-width:320px}.search-wrap svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:15px;height:15px;stroke:var(--text3);fill:none;stroke-width:2;stroke-linecap:round}.search-wrap .input{width:100%;padding-left:34px}.progress{height:7px;border-radius:99px;background:var(--surface2);overflow:hidden}.progress>div{height:100%;border-radius:99px;background:var(--accent);transition:width .4s}.progress.thin{height:5px}table.tbl{width:100%;border-collapse:collapse}.tbl th{text-align:left;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text3);padding:10px 14px;border-bottom:1px solid var(--border)}.tbl td{padding:11px 14px;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle}.tbl tr:last-child td{border-bottom:none}.tbl tr.row:hover td{background:var(--surface2)}.amount{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.amount.pos{color:var(--green)}.cat-pill{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:99px;font-size:12px;font-weight:500;background:var(--surface2);cursor:pointer;white-space:nowrap}.cat-pill:hover{outline:1px solid var(--border)}.empty{padding:48px 20px;text-align:center;color:var(--text3)}.empty .big{font-size:32px;margin-bottom:10px}.list-row{display:flex;align-items:center;gap:12px;padding:13px 20px;border-bottom:1px solid var(--border)}.list-row:last-child{border-bottom:none}.list-row .grow{flex:1;min-width:0}.list-row .title{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-row .sub{font-size:12px;color:var(--text3);margin-top:1px}.ico-circle{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;font-size:16px;flex:none;background:var(--surface2)}.overlay{position:fixed;inset:0;background:#0a0c1473;backdrop-filter:blur(2px);z-index:90;display:none;align-items:center;justify-content:center;padding:20px}.overlay.open{display:flex}.modal{background:var(--surface);border-radius:18px;box-shadow:var(--shadow-lg);width:100%;max-width:480px;max-height:86vh;overflow:auto;border:1px solid var(--border)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 0}.modal-head h3{font-size:16px;font-weight:700}.modal-body{padding:16px 22px 22px}.field{margin-bottom:14px}.field label{display:block;font-size:12px;font-weight:600;color:var(--text2);margin-bottom:6px}.field .input,.field .select{width:100%}#toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%) translateY(20px);background:var(--text);color:var(--bg);padding:10px 18px;border-radius:10px;font-size:13px;font-weight:600;opacity:0;pointer-events:none;transition:all .25s;z-index:200;box-shadow:var(--shadow-lg);max-width:90vw;text-align:center}#toast.show{opacity:1;pointer-events:auto;transform:translate(-50%) translateY(0)}#toast button{color:#9db1ff;font-weight:700;margin-left:10px}.bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);z-index:60;padding:6px 8px calc(6px + env(safe-area-inset-bottom));grid-template-columns:repeat(5,1fr)}.bottom-nav button{display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 0;font-size:10px;font-weight:600;color:var(--text3);border-radius:10px}.bottom-nav button.active{color:var(--accent-text)}.bottom-nav svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sheet{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-radius:20px 20px 0 0;z-index:95;transform:translateY(100%);transition:transform .28s cubic-bezier(.3,.9,.3,1);box-shadow:var(--shadow-lg);padding:10px 16px calc(20px + env(safe-area-inset-bottom));max-height:75vh;overflow:auto}.sheet.open{transform:translateY(0)}.sheet .handle{width:38px;height:4px;border-radius:99px;background:var(--border);margin:4px auto 14px}.sheet-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.sheet-grid button{display:flex;flex-direction:column;align-items:center;gap:7px;padding:14px 4px;border-radius:14px;font-size:11px;font-weight:600;color:var(--text2);background:var(--surface2)}.sheet-grid button svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.chart-tooltip{position:fixed;background:var(--text);color:var(--bg);font-size:12px;font-weight:600;padding:6px 10px;border-radius:8px;pointer-events:none;z-index:150;opacity:0;transition:opacity .12s;white-space:nowrap}.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--text2)}.legend span{display:inline-flex;align-items:center;gap:6px}.health{display:flex;align-items:center;gap:18px}.health-ring{position:relative;width:108px;height:108px;flex:none}.health-ring .pct{position:absolute;inset:0;display:grid;place-items:center;font-size:21px;font-weight:700;text-align:center}.health-ring .pct small{display:block;font-size:10px;font-weight:600;color:var(--text3)}.chat-box{display:flex;flex-direction:column;height:520px}.chat-msgs{flex:1;overflow:auto;padding:20px;display:flex;flex-direction:column;gap:14px}.msg{max-width:78%;padding:11px 15px;border-radius:16px;font-size:13.5px;line-height:1.5;white-space:pre-line}.msg.user{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:5px}.msg.ai{align-self:flex-start;background:var(--surface2);border-bottom-left-radius:5px}.chat-input{display:flex;gap:8px;padding:14px;border-top:1px solid var(--border)}.chat-input .input{flex:1}.suggestions{display:flex;gap:8px;flex-wrap:wrap;padding:0 14px 14px}.dropzone{border:2px dashed var(--border);border-radius:var(--radius);padding:44px 20px;text-align:center;color:var(--text2);cursor:pointer;transition:all .2s}.dropzone:hover,.dropzone.drag{border-color:var(--accent);background:var(--accent-soft)}.steps{display:flex;margin-bottom:22px}.step{flex:1;text-align:center;position:relative;font-size:12px;font-weight:600;color:var(--text3);padding-top:26px}.step:before{content:"";position:absolute;top:8px;left:50%;transform:translate(-50%);width:18px;height:18px;border-radius:50%;background:var(--surface2);border:2px solid var(--border)}.step:after{content:"";position:absolute;top:16px;left:calc(50% + 12px);right:calc(-50% + 12px);height:2px;background:var(--border)}.step:last-child:after{display:none}.step.done:before,.step.act:before{background:var(--accent);border-color:var(--accent)}.step.act{color:var(--accent-text)}.step.done{color:var(--text2)}.bank-logo{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;font-weight:800;color:#fff;font-size:12px;flex:none;background:var(--accent);overflow:hidden}.bank-logo img{width:100%;height:100%;object-fit:cover}.switch{position:relative;width:38px;height:22px;border-radius:99px;background:var(--surface2);border:1px solid var(--border);cursor:pointer;transition:background .2s;flex:none}.switch:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--text3);transition:all .2s}.switch.on{background:var(--accent)}.switch.on:after{left:18px;background:#fff}body.privacy .amount,body.privacy .kpi .value,body.privacy .health-ring .pct{filter:blur(6px)}.fab-wrap{position:fixed;right:16px;bottom:calc(86px + env(safe-area-inset-bottom));z-index:55;display:none;flex-direction:column;align-items:center;gap:10px}.fab-main{width:54px;height:54px;border-radius:50%;background:var(--accent);color:#fff;font-size:26px;box-shadow:var(--shadow-lg);display:grid;place-items:center;transition:transform .2s}.fab-wrap.open .fab-main{transform:rotate(45deg)}.fab-mini{width:46px;height:46px;border-radius:50%;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);font-size:18px;display:grid;place-items:center;opacity:0;transform:translateY(10px) scale(.6);pointer-events:none;transition:all .2s}.fab-wrap.open .fab-mini{opacity:1;transform:none;pointer-events:auto}.tx-cards{display:none}.tx-card{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border)}.tx-card:last-child{border-bottom:none}.tx-card .grow{min-width:0;flex:1}.tx-card .t1{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tx-card .t2{font-size:11.5px;color:var(--text3);margin-top:1px}.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow-lg);padding:30px 28px}.auth-card .brand{justify-content:center;padding-bottom:6px}.auth-tabs{display:flex;gap:6px;background:var(--surface2);border-radius:10px;padding:4px;margin:14px 0 18px}.auth-tabs button{flex:1;padding:8px;border-radius:8px;font-weight:600;font-size:13px;color:var(--text2)}.auth-tabs button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.auth-err{background:var(--red-soft);color:var(--red);border-radius:9px;padding:9px 12px;font-size:12.5px;font-weight:600;margin-bottom:12px}.two-col{grid-template-columns:1.6fr 1fr}.three-col{grid-template-columns:repeat(3,1fr)}.cards-2{grid-template-columns:repeat(2,1fr)}.section-gap{margin-top:16px}.mt8{margin-top:8px}.mt16{margin-top:16px}.mb16{margin-bottom:16px}.muted{color:var(--text3);font-size:12px}.flex{display:flex;align-items:center;gap:10px}.spread{justify-content:space-between}.view{display:none;animation:fadeIn .22s ease}.view.on{display:block}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.spinner{width:22px;height:22px;border:3px solid var(--surface2);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;margin:30px auto}@keyframes spin{to{transform:rotate(360deg)}}.period-nav{display:flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:3px}.period-nav b{min-width:128px;text-align:center;font-size:13px;text-transform:capitalize}.period-nav .icon-btn{border:none;width:28px;height:28px}.show-m{display:none}@media (max-width:1100px){.kpis{grid-template-columns:repeat(2,1fr)}.two-col,.three-col,.cards-2{grid-template-columns:1fr}}@media (max-width:900px){.sidebar{display:none}.main{margin-left:0;padding:18px 16px 90px}.bottom-nav{display:grid}.topbar{position:sticky;top:0;z-index:35;background:var(--bg);padding:10px 0;margin-bottom:14px;border-bottom:1px solid var(--border)}.topbar h1{font-size:18px}.hide-m{display:none!important}.show-m{display:block}.fab-wrap{display:flex}.input,.select{font-size:16px}.chip{padding:8px 13px;font-size:13px}.btn.sm{padding:8px 12px}.icon-btn{width:40px;height:40px}input[type=checkbox]{width:18px;height:18px}.list-row{padding-top:14px;padding-bottom:14px}.chat-box{height:calc(100vh - 270px)}}@media (max-width:700px){table.tbl{display:none}.tx-cards{display:block}}@media (max-width:640px){.overlay{align-items:flex-end;padding:0}.modal{max-width:100%;border-radius:20px 20px 0 0;max-height:88vh;animation:sheetUp .25s ease}.modal:before{content:"";display:block;width:38px;height:4px;border-radius:99px;background:var(--border);margin:10px auto 0}}@keyframes sheetUp{0%{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}@media (max-width:480px){.kpis{grid-template-columns:repeat(2,1fr)}.kpi .value{font-size:18px}.main{padding:14px 12px 90px}}@media (display-mode:standalone){.topbar{padding-top:calc(10px + env(safe-area-inset-top))}.sidebar{padding-top:calc(20px + env(safe-area-inset-top))}}
