@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');
:root{--bg:#f5f7fb;--surface:#fff;--surface2:#f9fafc;--text:#172033;--muted:#7b8497;--line:#e6e9f0;--brand:#5b5ce2;--brand2:#7475ef;--green:#18a875;--red:#e45765;--amber:#e8a33b;--nav:#151923;--nav2:#202635;--shadow:0 8px 28px rgba(28,39,67,.06);--radius:16px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Nunito,system-ui,sans-serif;color:var(--text);background:var(--bg)}body{display:flex}.sidebar{width:238px;background:var(--nav);color:#c8cfdb;position:fixed;inset:0 auto 0 0;padding:22px 14px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:10px;padding:0 10px 22px;color:#fff;font-size:19px;font-weight:800}.brand-mark{width:33px;height:33px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand),#8d78ff);box-shadow:0 8px 18px rgba(91,92,226,.35)}.nav{display:flex;flex-direction:column;gap:3px;overflow:auto}.nav-label{font-size:10px;letter-spacing:.12em;color:#6e7789;font-weight:800;padding:18px 12px 7px}.nav-link{color:#aeb6c5;text-decoration:none;display:flex;gap:11px;align-items:center;padding:10px 12px;border-radius:10px;font-size:13px}.nav-link span{width:18px;text-align:center;font-size:15px}.nav-link b{font-weight:700}.nav-link:hover{background:#1c2230;color:#fff}.nav-link.active{background:linear-gradient(90deg,rgba(91,92,226,.26),rgba(91,92,226,.08));color:#fff}.nav-link.active:before{content:"";width:3px;height:20px;background:#8587ff;border-radius:3px;position:absolute;left:14px}.sidebar-footer{margin-top:auto;border-top:1px solid #262d3c;padding:17px 8px 0;display:flex;align-items:center;gap:10px}.avatar{width:34px;height:34px;border-radius:50%;background:#2a3142;display:grid;place-items:center;color:#fff;font-weight:800;font-size:11px}.sidebar-footer strong{display:block;color:#fff;font-size:12px}.sidebar-footer small{font-size:10px;color:#7f899b}.sidebar-footer button{margin-left:auto;background:none;border:0;color:#7f899b;font-size:18px}.app{margin-left:238px;width:calc(100% - 238px);min-height:100vh}.topbar{height:66px;background:rgba(255,255,255,.88);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px;padding:0 26px;position:sticky;top:0;z-index:15}.top-spacer{flex:1}.icon-btn,.help-btn{height:36px;border:1px solid var(--line);background:#fff;border-radius:9px;padding:0 11px;color:#667085;font-family:inherit}.help-btn{display:flex;gap:7px;align-items:center}.primary-btn{height:38px;border:0;border-radius:10px;background:#252b38;color:#fff;font-family:inherit;font-weight:800;padding:0 16px;cursor:pointer}.primary-btn:hover{background:#151923}.mobile-menu{display:none;border:0;background:none;font-size:22px}.content{padding:28px 30px 50px;max-width:1600px;margin:auto}.page-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:25px}.page-head h1{font-size:24px;margin:0 0 5px;font-weight:800}.page-head p{margin:0;color:var(--muted);font-size:13px}.head-actions{display:flex;align-items:center;gap:10px}.select,.ghost-btn{border:1px solid var(--line);background:#fff;border-radius:10px;height:39px;padding:0 12px;font-family:inherit;color:#394156}.select{min-width:180px;font-weight:700}.ghost-btn{cursor:pointer}.kpis{display:grid;grid-template-columns:1.25fr repeat(3,1fr);gap:14px;margin-bottom:18px}.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow)}.kpi-label{font-size:12px;color:var(--muted);font-weight:700;margin-bottom:8px}.kpi-main{font-size:25px;font-weight:800;letter-spacing:-.02em}.kpi-sub{font-size:11px;color:var(--muted);margin-top:7px}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.badge{font-size:11px;padding:4px 7px;border-radius:99px;font-weight:800;margin-left:5px}.badge.pos{background:#e9f8f3;color:var(--green)}.badge.neg{background:#fdecef;color:var(--red)}.grid-main{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(320px,.75fr);gap:18px;margin-bottom:24px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.panel-head{padding:18px 20px 13px;display:flex;align-items:center;justify-content:space-between}.panel-title{font-size:14px;font-weight:800}.panel-sub{font-size:11px;color:var(--muted);margin-top:2px}.segmented{display:flex;background:#f3f5f8;padding:3px;border-radius:8px;gap:2px}.segmented button{border:0;background:none;border-radius:6px;padding:6px 9px;font:700 10px Nunito;color:#7b8497}.segmented button.active{background:#fff;color:#30384b;box-shadow:0 1px 4px rgba(0,0,0,.08)}.chart-wrap{height:282px;padding:4px 18px 18px}.chart-wrap svg{width:100%;height:100%;overflow:visible}.grid-line{stroke:#edf0f5;stroke-width:1}.axis-label{font-size:9px;fill:#9aa2b2}.line-patrimony{fill:none;stroke:#5b5ce2;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.line-invested{fill:none;stroke:#b9bfca;stroke-width:2;stroke-dasharray:4 5}.area{fill:url(#areaGradient)}.chart-legend{display:flex;gap:17px;font-size:10px;color:#7c8596;padding:0 20px 14px}.legend-dot{display:inline-block;width:8px;height:8px;border-radius:3px;margin-right:5px;background:var(--brand)}.legend-dot.gray{background:#b9bfca}.allocation{padding:4px 20px 21px}.donut-row{display:flex;align-items:center;justify-content:center;gap:28px;padding:10px 0 17px}.donut{width:150px;height:150px;border-radius:50%;background:conic-gradient(#5b5ce2 0 45.2%,#22b8a7 45.2% 78%,#6ea8fe 78% 93.4%,#f2b84b 93.4% 97.2%,#d9dde6 97.2%);position:relative}.donut:after{content:"";position:absolute;inset:32px;border-radius:50%;background:#fff}.donut-center{position:absolute;inset:0;display:grid;place-items:center;z-index:2;text-align:center;font-size:10px;color:var(--muted)}.donut-center strong{display:block;font-size:20px;color:var(--text)}.alloc-list{display:flex;flex-direction:column;gap:10px}.alloc-item{display:grid;grid-template-columns:9px 1fr auto;gap:8px;align-items:center;font-size:11px}.alloc-color{width:8px;height:8px;border-radius:3px}.alloc-item strong{font-size:11px}.section-title{display:flex;align-items:end;justify-content:space-between;margin:3px 0 11px}.section-title h2{margin:0;font-size:17px}.section-title small{color:var(--muted)}.class-card{background:#fff;border:1px solid var(--line);border-radius:14px;margin-bottom:10px;overflow:hidden;box-shadow:0 3px 13px rgba(28,39,67,.035)}.class-head{display:grid;grid-template-columns:minmax(220px,1fr) repeat(5,minmax(80px,110px)) 28px;align-items:center;gap:10px;padding:14px 16px;cursor:pointer}.class-name{display:flex;align-items:center;gap:11px;font-size:13px;font-weight:800}.class-icon{width:30px;height:30px;border-radius:9px;background:#f0f1ff;color:var(--brand);display:grid;place-items:center}.metric{text-align:right}.metric small{display:block;color:#9aa2b2;font-size:9px}.metric strong{font-size:11px}.chevron{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#f4f6f9;transition:.2s;position:relative}.chevron:before{content:"";width:6px;height:6px;border-right:1.8px solid #7a8393;border-bottom:1.8px solid #7a8393;transform:rotate(45deg) translate(-1px,-1px);transition:.2s}.class-card.closed .chevron:before{transform:rotate(-45deg) translate(0,0)}.class-card.closed .asset-table{display:none}.asset-table{border-top:1px solid var(--line);overflow:auto}.asset-table table{width:100%;border-collapse:collapse;min-width:980px}.asset-table th{font-size:9px;color:#929aab;text-transform:none;text-align:right;padding:9px 13px;background:#fafbfc;border-bottom:1px solid var(--line);white-space:nowrap}.asset-table th:first-child{text-align:left}.asset-table td{font-size:11px;text-align:right;padding:11px 13px;border-bottom:1px solid #eff1f5}.asset-table tr:last-child td{border-bottom:0}.asset-table td:first-child{text-align:left}.ticker{display:flex;align-items:center;gap:9px}.ticker-logo{width:27px;height:27px;border-radius:8px;background:#f1f3f7;display:grid;place-items:center;font-weight:800;color:#535c6d}.ticker strong{display:block;font-size:11px}.ticker small{display:block;font-size:9px;color:#9aa2b2;margin-top:1px}.weightbar{width:54px;height:4px;border-radius:9px;background:#edf0f4;overflow:hidden;margin-left:auto;margin-top:3px}.weightbar span{display:block;height:100%;background:#7375e8;border-radius:9px}.pill{padding:3px 6px;border-radius:99px;font-weight:800;font-size:9px}.pill.pos{background:#eaf8f3;color:var(--green)}.pill.neg{background:#fdecef;color:var(--red)}.footer-note{font-size:10px;color:#a0a7b4;text-align:right;margin-top:17px}.empty-page{min-height:510px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);display:grid;place-items:center;text-align:center;padding:40px}.empty-page .big-icon{font-size:40px;color:var(--brand);margin-bottom:10px}.empty-page h2{margin:0 0 8px}.empty-page p{color:var(--muted);max-width:450px;margin:0 auto 18px;font-size:13px}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(15,18,27,.45);z-index:50;align-items:center;justify-content:center;padding:18px}.modal-backdrop.show{display:flex}.modal{width:min(540px,100%);background:#fff;border-radius:18px;box-shadow:0 25px 80px rgba(0,0,0,.2);overflow:hidden}.modal-head{padding:20px 22px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0;font-size:17px}.modal-head button{border:0;background:none;font-size:22px}.modal-body{padding:20px 22px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.field label{font-size:10px;color:#7f8796;font-weight:800;display:block;margin-bottom:5px}.field input,.field select{width:100%;height:40px;border:1px solid var(--line);border-radius:9px;padding:0 10px;font:600 12px Nunito}.field.full{grid-column:1/-1}.modal-actions{border-top:1px solid var(--line);padding:14px 22px;display:flex;justify-content:flex-end;gap:8px}.modal-actions button{height:38px;border-radius:9px;padding:0 14px;font:800 11px Nunito}.btn-secondary{background:#fff;border:1px solid var(--line)}.btn-save{background:var(--brand);color:#fff;border:0}.toast{position:fixed;right:24px;bottom:24px;background:#171b26;color:#fff;border-radius:10px;padding:12px 16px;font-size:12px;box-shadow:0 12px 35px rgba(0,0,0,.2);transform:translateY(20px);opacity:0;pointer-events:none;transition:.25s;z-index:60}.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:1150px){.kpis{grid-template-columns:1fr 1fr}.grid-main{grid-template-columns:1fr}.class-head{grid-template-columns:minmax(220px,1fr) repeat(3,minmax(80px,100px)) 28px}.class-head .metric:nth-of-type(4),.class-head .metric:nth-of-type(5){display:none}}
@media(max-width:780px){.sidebar{transform:translateX(-100%);transition:.25s}.sidebar.open{transform:translateX(0)}.app{margin-left:0;width:100%}.mobile-menu{display:block}.topbar{padding:0 14px}.help-btn span{display:none}.content{padding:20px 14px 40px}.page-head{flex-direction:column;gap:14px}.head-actions{width:100%}.select{flex:1}.kpis{grid-template-columns:1fr}.grid-main{grid-template-columns:1fr}.class-head{grid-template-columns:minmax(180px,1fr) 90px 28px}.class-head .metric{display:none}.class-head .metric:nth-of-type(1){display:block}.kpi-main{font-size:22px}.donut-row{flex-direction:column}.modal-body{grid-template-columns:1fr}.field.full{grid-column:auto}}

/* Wallet V2 refinements */
.wallet-select-wrap{display:flex;align-items:center;gap:8px;height:39px;padding-left:10px;border:1px solid var(--line);background:#fff;border-radius:10px}.wallet-select-wrap>span{font-size:8px;letter-spacing:.08em;color:#9aa2b2;font-weight:900}.wallet-select-wrap .select{border:0;height:37px;min-width:145px;padding-left:2px;box-shadow:none;outline:none}.refresh-btn{display:flex;align-items:center;gap:7px}.refresh-icon{width:12px;height:12px;border:1.7px solid #737b8d;border-right-color:transparent;border-radius:50%;display:inline-block;position:relative}.refresh-icon:after{content:"";position:absolute;right:-2px;top:-2px;width:4px;height:4px;border-top:1.5px solid #737b8d;border-right:1.5px solid #737b8d;transform:rotate(15deg)}.class-head:hover{background:#fbfcfe}.class-card.closed .class-head{background:#fff}.class-card.closed .class-head:hover{background:#fbfcfe}@media(max-width:780px){.wallet-select-wrap{flex:1}.wallet-select-wrap .select{min-width:0;width:100%}}

/* Carteiras / fundação de banco */
.system-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff8e8;border:1px solid #f0dfb4;border-radius:14px;padding:15px 17px;margin-bottom:18px}.system-notice strong{display:block;font-size:13px}.system-notice span{display:block;color:#81745a;font-size:11px;margin-top:3px}.system-notice .primary-btn{text-decoration:none;display:flex;align-items:center;white-space:nowrap}.portfolio-overview{background:linear-gradient(135deg,#22293a,#30384f);color:#fff;border-radius:16px;padding:20px 22px;margin-bottom:18px;min-height:112px;display:flex;align-items:center}.portfolio-overview .eyebrow{font-size:9px;letter-spacing:.12em;color:#aab2c4;font-weight:900;display:block}.portfolio-overview strong{font-size:31px;display:block;line-height:1.15;margin:3px 0}.portfolio-overview small{color:#b7bfce;font-size:11px}.portfolio-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.portfolio-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:17px;box-shadow:var(--shadow);position:relative;transition:.18s}.portfolio-card:hover{transform:translateY(-1px);box-shadow:0 9px 26px rgba(31,42,67,.075)}.portfolio-card.selected{border-color:#c9c8ff;box-shadow:0 0 0 2px rgba(91,92,226,.07),var(--shadow)}.portfolio-card-top{display:flex;align-items:center;gap:10px}.portfolio-avatar{width:38px;height:38px;border-radius:11px;background:#f0f1ff;color:var(--brand);display:grid;place-items:center;font-weight:900}.portfolio-card-title{min-width:0}.portfolio-card-title h3{margin:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portfolio-card-title span{color:var(--muted);font-size:10px}.active-chip{margin-left:auto;font-size:9px;font-weight:900;color:#14856c;background:#e8f8f3;border-radius:99px;padding:4px 7px}.portfolio-owner{margin:18px 0 10px;padding-top:13px;border-top:1px solid #eef0f4}.portfolio-owner span{display:block;color:#9aa2b2;font-size:9px;text-transform:uppercase;letter-spacing:.05em}.portfolio-owner strong{font-size:12px}.portfolio-notes{font-size:11px;color:#737d90;min-height:31px;margin:9px 0}.portfolio-card-actions{display:flex;align-items:center;gap:7px;margin-top:15px}.portfolio-card-actions .ghost-btn{text-decoration:none;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;height:34px}.portfolio-use{margin-right:auto}.icon-action{border:0;background:#f5f6f8;color:#596275;border-radius:8px;height:34px;padding:0 9px;font:800 9px Nunito;cursor:pointer}.icon-action:hover{background:#eceff4}.icon-action.danger{color:#d04e60;background:#fff2f4}.inline-form{display:inline-flex}.field textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px;font:600 12px Nunito;resize:vertical;min-height:78px}.toast.toast-error{background:#9f2336}.btn-save:disabled,.field input:disabled,.field select:disabled,.field textarea:disabled{opacity:.55;cursor:not-allowed}@media(max-width:1100px){.portfolio-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.portfolio-grid{grid-template-columns:1fr}.system-notice{align-items:flex-start;flex-direction:column}.portfolio-card-actions{flex-wrap:wrap}}
.primary-link{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.flash{padding:12px 14px;border-radius:11px;margin:-8px 0 16px;font-size:12px;font-weight:700}.flash-success{background:#eaf8f3;color:#137d68;border:1px solid #ccefe3}.flash-error{background:#fff0f2;color:#aa3044;border:1px solid #f6d7dc}.data-panel{overflow:hidden}.data-table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:920px}.data-table th{font-size:9px;color:#929aab;text-align:left;padding:10px 14px;background:#fafbfc;border-top:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap}.data-table td{font-size:11px;padding:12px 14px;border-bottom:1px solid #eff1f5;vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table td:not(:first-child),.data-table th:not(:first-child){text-align:right}.data-table th:nth-child(2),.data-table td:nth-child(2){text-align:left}.actions-cell{white-space:nowrap}.table-empty{text-align:center!important;color:var(--muted);padding:36px!important}.row-muted{opacity:.55}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px}.status-dot.on{background:#18a681}.status-dot.off{background:#aeb4c0}.tx-type{font-size:9px;font-weight:900;padding:4px 7px;border-radius:99px;background:#f1f3f7;color:#596275}.tx-type.buy{background:#eaf8f3;color:#14856c}.tx-type.sell{background:#fdecef;color:#c24055}.muted{color:var(--muted)}.wallet-select-wrap{display:flex;flex-direction:column;gap:3px}.wallet-select-wrap>span{font-size:8px;color:#9aa2b2;font-weight:900;letter-spacing:.08em}

.field-hint{display:block;color:#9aa2b2;font-size:9px;margin-top:5px;line-height:1.35}.market-note{background:#f7f8fb;border:1px solid #eceef3;border-radius:10px;padding:12px 13px}.market-note strong{display:block;font-size:10px;color:#596275;margin-bottom:3px}.market-note span{display:block;font-size:10px;color:#8a93a4;line-height:1.45}.actions-cell{white-space:nowrap}.actions-cell .inline-form{margin-left:4px}
.settings-panel{max-width:1050px}.settings-body{padding:4px 22px 24px}.settings-form{padding:18px 0}.settings-form .full{width:100%}.settings-actions{display:flex;justify-content:flex-end;margin-top:14px}.sheet-contract{border-top:1px solid #edf0f5;padding-top:20px;margin-top:4px}.sheet-contract-title{font-weight:800;font-size:15px;color:#252b3a}.sheet-contract-sub,.settings-note{color:#7e8799;font-size:12px;margin:5px 0 14px}.sync-row{margin-top:20px;padding-top:18px;border-top:1px solid #edf0f5;display:flex;align-items:center;justify-content:space-between;gap:20px}.sync-row>div{display:flex;flex-direction:column;gap:3px}.sync-row span{font-size:12px;color:#8791a5}.primary-btn:disabled{opacity:.45;cursor:not-allowed}.data-table.compact td,.data-table.compact th{padding:10px 12px;white-space:nowrap}.sync-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}.sync-badge.ok{background:#ecfdf5;color:#047857}.sync-badge.pending{background:#fff7ed;color:#c2410c}.sync-time{display:block;color:#9aa3b3;margin-top:3px;font-size:10px}@media(max-width:700px){.sync-row{align-items:flex-start;flex-direction:column}.sync-row form,.sync-row .primary-btn{width:100%}}
