/* Shared visual system and deliberate, reduced motion. */
:root { --mlg-accent:#47c9a2; --mlg-border:rgba(128,144,158,.20); }
.mlg-dialog {width:min(480px,calc(100vw - 32px));max-height:92dvh;border:1px solid #303c43;border-radius:24px;background:#11191d;color:#edf3f3;padding:30px;box-shadow:0 32px 100px #0008;font-family:Inter,system-ui,sans-serif}
.mlg-dialog::backdrop {background:#080d12ed}
.mlg-account-form {display:grid;gap:17px}
.mlg-account-form h1 {font-size:38px;font-weight:700;letter-spacing:-2px;margin:0;line-height:1.1}
.mlg-account-form h2 {font-size:20px;font-weight:600;margin:0 0 6px}
.mlg-account-form p,.mlg-account-form small {margin:0;color:#9fb0b8;line-height:1.6}
.mlg-account-form small {font-size:12px}
.mlg-account-form label {display:grid;gap:8px;font-size:13px;font-weight:500}
.mlg-account-form input {width:100%;padding:12px 14px;border:1px solid #344248;background:#182328;border-radius:10px;color:#fff;font:inherit;outline:none}
.mlg-account-form input:focus {border-color:#47c9a2;box-shadow:0 0 0 3px #47c9a21a}
.mlg-account-form button {padding:12px 18px;border-radius:10px;border:1px solid #344248;background:#202c32;color:#f2f8f7;font-weight:600;cursor:pointer}
.mlg-account-form button.mlg-primary,.mlg-primary {background:#47c9a2;color:#08251c;border-color:#47c9a2}
.mlg-account-form [role=status]:not(:empty) {color:#ffb4ab;font-size:13px}
.mlg-brand-image {width:48px;height:48px;object-fit:contain;border-radius:12px}
.mlg-subtitle {letter-spacing:.16em;font-size:12px;text-transform:lowercase}
.mlg-form-actions {display:flex;gap:10px;justify-content:flex-end}
.mlg-profile-badge {display:flex!important;align-items:center;gap:10px;width:auto!important;height:auto!important;min-width:42px;border-radius:50px!important;padding:6px 12px 6px 6px!important;background:transparent!important;border:1px solid var(--mlg-border);font-size:13px;box-shadow:none!important}
.mlg-profile-badge img {height:32px;width:32px;object-fit:cover;border-radius:50%}
.mlg-profile-badge span {max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body {font-feature-settings:'cv11','ss01';}
html.dark body {background:#0c1115!important;background-image:none!important;color:#e9eff2}
html.dark .mlg-profile-badge {color:#e9eff2}
.app-brand-title {text-transform:none!important;letter-spacing:-.03em!important;font-size:24px!important}
.indicator-card::before {display:none!important}
body.modal-open.calculator-only #main-app-container {filter:none!important;pointer-events:auto!important}
html:not(.dark) body:not(:has(#screen)) {background:#f4f7f7;background-image:none}
.sheet-panel,.indicator-card,.item-entry-card {box-shadow:none!important;border:1px solid var(--mlg-border)!important;background-image:none!important}
html.dark .sheet-panel,html.dark .indicator-card,html.dark .item-entry-card {background-color:#121a20!important}
.sheet-panel {border-radius:18px!important}
.indicator-card {border-radius:14px!important;padding:18px!important}
.indicator-card h3 {font-size:12px;line-height:1.5}
.indicator-card p {font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.item-entry-card {border-radius:12px!important;transition:border-color .18s,background-color .18s!important}
.item-entry-card:hover {transform:none!important;border-color:#47c9a266!important}
.item-entry-card::before {width:2px!important;opacity:.65}
.item-entry-title {font-size:14px!important;line-height:1.5}
.item-entry-value {font-size:17px!important;letter-spacing:-.025em;font-variant-numeric:tabular-nums}
.item-entry-meta-chip {font-size:10px!important;border-radius:5px!important;letter-spacing:0!important}
.item-entry-actions {opacity:1!important}
.item-entry-actions button {min-height:30px;min-width:30px}
.scroll-morph-stage,.item-entry-card {transform:none!important;opacity:1!important;filter:none!important;animation:none!important}
.column-expanded-list,.list-scroll-shell {max-height:none!important;height:auto!important;overflow:visible!important;mask-image:none!important;display:grid;gap:10px}
.calendar-grid-modal {width:min(520px,calc(100vw - 32px))!important}
.calendar-grid-stage {height:auto!important;min-height:0!important}
.calendar-grid-panel {position:relative!important;inset:auto!important;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
.calendar-grid-panel.is-hidden {display:none!important}
.calendar-grid-panel button {min-width:0!important;width:100%;height:66px!important;padding:10px!important;transform:none!important;border-radius:12px!important;box-shadow:none!important}
.item-date-picker-grid {display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px!important}
.item-date-picker-grid > * {min-width:0;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:0!important}
body.modal-open:has(#calculator-window:not(.hidden)):not(:has([id$='-modal']:not(.hidden))) #main-app-container {filter:none!important;pointer-events:auto!important}
#calculator-window {backdrop-filter:none!important;background:#fff}
html.dark #calculator-window {background:#152028}
body.simulation-active::after {animation:none!important;opacity:.1!important}
body.simulation-active {background-image:none!important}
#simulation-banner {border:1px solid #4385c3!important;border-radius:14px;background:#11263a!important;color:#e6f2ff}
.mlg-ai {border:1px solid var(--mlg-border);border-radius:16px;margin:0 0 24px;padding:14px 16px;background:#ffffff08}
.mlg-ai form {display:flex;align-items:center;gap:10px}
.mlg-ai input {flex:1;min-width:0;background:transparent;padding:10px 0;color:inherit;outline:none;border:0;font-size:14px}
.mlg-ai button {border:1px solid var(--mlg-border);border-radius:10px;min-height:40px;padding:8px 14px;font-size:13px}
.mlg-ai [role=status] {font-size:12px;color:#7f969f;margin-top:8px;line-height:1.6}
.mlg-ai .mlg-ai-review {padding:14px 0 0;display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:13px}
.mlg-ai .mlg-ai-review[hidden] {display:none}
.mlg-ai button:disabled {opacity:.45;cursor:not-allowed}
.mlg-ai [aria-pressed=true] {color:#ff8181;border-color:#ff8181}
button {transition:background-color .18s,border-color .18s,box-shadow .18s}
button:focus-visible,a:focus-visible {outline:2px solid #47c9a2;outline-offset:3px}
.profile-picture-border {animation:none!important;background:#47c9a2!important}
.profile-header {box-shadow:none!important;backdrop-filter:none!important}
.profile-header:hover {transform:none!important}
@media(max-width:640px){.mlg-dialog{padding:22px}.item-entry-main{flex-wrap:wrap!important;gap:8px}.item-entry-main>.text-right{min-width:0!important;text-align:left}.mlg-ai form{flex-wrap:wrap}.mlg-ai input{flex-basis:70%}.mlg-ai .mlg-primary{flex:1}#caixinhas-list-container>div{flex-wrap:wrap;gap:12px}.mlg-profile-badge span{max-width:70px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* One visual language across the portal, finance and profile. */
:root{--mlg-accent:#168aff;--presence:#36c990;--mlg-border:#ffffff18}
[hidden]{display:none!important}
.mlg-boot #screen,.mlg-boot #main-app-container,.mlg-locked body>:not(dialog){visibility:hidden!important;pointer-events:none!important}
.mlg-locked dialog{visibility:visible!important}
#pin-wrapper,#secondary-pin-wrapper{display:none!important}
html:not(.light) #screen,html.dark body{background:#16171a!important;background-image:none!important}
html.dark .sheet-panel,html.dark .indicator-card,html.dark .item-entry-card{background:#202125!important;border-color:#ffffff12!important}
.mlg-dialog{background:#202125;border-color:#ffffff20;box-sizing:border-box;overflow:auto;color:#f0f0f0;animation:mlg-enter .18s ease-out}
.mlg-dialog::backdrop{background:#101114ed}
.mlg-account-form input,.mlg-account-form select,.mlg-account-form textarea{box-sizing:border-box;width:100%;padding:12px 14px;border:1px solid #ffffff22;background:#2c2d32;border-radius:10px;color:#f0f0f0;font:inherit}
.mlg-account-form input:focus,.mlg-account-form textarea:focus{border-color:#168aff;box-shadow:0 0 0 3px #168aff22}
.mlg-account-form button.mlg-primary,.mlg-primary{background:#168aff;color:white;border-color:#168aff}
.mlg-account-form input[type=range]{padding:0;accent-color:#168aff}
.mlg-account-form details{padding:12px 0;border-top:1px solid #ffffff18;display:grid;gap:12px}
.mlg-account-form details label{margin-top:12px}.mlg-account-form summary{cursor:pointer;font-size:14px}
.mlg-account-form button:disabled{opacity:.55;cursor:wait}.mlg-grow{flex:1}.mlg-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mlg-photo-drop{width:100%;display:flex;align-items:center;gap:16px;text-align:left;border:1px dashed #ffffff45!important;background:#292a2f!important;min-height:100px;font-size:13px}
.mlg-photo-drop img{width:64px;height:64px;object-fit:cover;border-radius:50%;background:#16171a;flex-shrink:0}
.mlg-photo-drop.is-over{background:#168aff25!important;border-color:#168aff!important;transform:scale(1.01)}
.mlg-photo-remove{margin-top:8px;font-size:12px;padding:5px 10px!important;background:transparent!important}
.mlg-crop{width:100%;max-width:320px;aspect-ratio:1;justify-self:center;border-radius:50%;cursor:grab;touch-action:none;border:2px solid #168aff}
.mlg-crop:active{cursor:grabbing}.mlg-danger{color:#ffa9b4}.mlg-account-form .mlg-danger p{font-size:12px;margin:10px 0}
.mlg-profile-badge img{box-shadow:0 0 0 3px var(--presence);margin:2px}.profile-picture-border{background:var(--presence)!important}
.mlg-presence-control{font:inherit;font-size:12px;color:var(--presence);margin-top:8px;background:transparent;border:0;cursor:pointer}
.mlg-finance-logo{width:48px;height:48px;object-fit:contain}.app-brand-subtitle{letter-spacing:0!important;text-transform:none!important;font-size:12px!important}
.mlg-box-menu{position:relative;font-size:13px}.mlg-box-menu>summary{cursor:pointer;list-style:none;border:1px solid #ffffff25;border-radius:12px;padding:10px 14px;display:flex;gap:16px;align-items:center}
.mlg-box-menu>summary::-webkit-details-marker{display:none}.mlg-box-menu[open]>summary span{transform:rotate(180deg)}
.mlg-box-popover{position:absolute;right:0;top:calc(100% + 8px);width:min(370px,85vw);padding:18px;border:1px solid #ffffff25;border-radius:16px;background:#202125;box-shadow:0 16px 50px #0006;z-index:70;color:#f0f0f0;animation:mlg-enter .18s ease-out}
.mlg-box-popover>p{font-size:12px;color:#a8abb3;margin-bottom:10px}.mlg-box-popover button{display:block;width:100%;text-align:left;border:1px solid #ffffff16;border-radius:10px;background:#ffffff08;padding:10px 12px;margin-top:8px;color:inherit}
.mlg-box-popover button small{display:block;color:#a8abb3;margin-top:4px}.mlg-box-popover #mlg-box-create{background:#168aff;color:white}.mlg-box-popover #mlg-box-list{max-height:330px;overflow:auto}
header.sheet-panel{overflow:visible!important;position:relative;z-index:40}
.column-expanded-list.mlg-scroll-list{max-height:420px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable;padding:3px 6px 3px 3px;align-content:start}
.column-expanded-list.mlg-scroll-list.is-expanded{max-height:none!important;overflow:visible!important}
.mlg-list-expand{width:100%;padding:9px;margin-top:10px;font-size:12px;border:1px solid #ffffff20;border-radius:9px;color:inherit}
.item-entry-card.is-paid .item-entry-title,.item-entry-card.is-paid .item-entry-value{text-decoration:line-through;opacity:.55}
.item-entry-card.is-selected{outline:2px solid #168aff;outline-offset:-1px;background:#168aff14!important}
#calculator-window{transition:opacity .15s ease!important}#calculator-window.dragging{opacity:.55!important;cursor:grabbing!important;box-shadow:none!important}
html.dark #calculator-window{background:#202125!important}.sheet-panel-subtitle,.sheet-panel-note,.annotation-helper,.annotation-tip{display:none!important}
.annotation-textarea{min-height:100px!important}.sheet-panel-toolbar-note{font-size:11px!important;opacity:.7}
.mlg-notes{max-width:850px;margin:20px auto}.mlg-notes h2{font-size:26px}.mlg-notes p{color:#9095a0;margin:10px 0 20px}.mlg-notes textarea{width:100%;min-height:55vh;resize:vertical;border:1px solid #ffffff25;background:#ffffff08;color:inherit;border-radius:16px;padding:20px;font:inherit;line-height:1.7}.mlg-notes small{display:block;margin:8px;color:#36c990}
button:active:not(:disabled){scale:.97}button:focus-visible,a:focus-visible{outline:2px solid #168aff;outline-offset:3px}
@keyframes mlg-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:640px){.mlg-two{grid-template-columns:1fr}.mlg-box-popover{right:-60px}.mlg-profile-badge span{display:none}.column-expanded-list.mlg-scroll-list{max-height:360px!important}.mlg-account-form{gap:12px}}
@media(prefers-reduced-motion:reduce){.mlg-dialog,.mlg-box-popover{animation:none}button:active:not(:disabled){scale:1}}
.mlg-graphs-page{margin:0;background:#16171a;color:#f0f0f2;font:15px/1.5 Inter,system-ui,sans-serif}.mlg-graphs-page main{max-width:1150px;margin:auto;padding:30px 24px}.mlg-graphs-header{display:flex;align-items:center;gap:16px}.mlg-graphs-header h1,.mlg-graphs-header p{margin:0}.mlg-graphs-header #mlg-profile{margin-left:auto}.mlg-graphs-page nav{display:flex;gap:24px;align-items:center;margin:32px 0}.mlg-graphs-page nav label{margin-left:auto}.mlg-graphs-page a{color:#69b4ff;text-decoration:none}.mlg-graphs-page select{background:#25272c;color:inherit;border:1px solid #45474d;border-radius:8px;padding:8px}.mlg-graph-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.mlg-graph-totals article,.mlg-graph-panel{background:#202125;border:1px solid #34363d;border-radius:18px;padding:24px}.mlg-graph-totals p{margin:0 0 8px;color:#aaaeb8}.mlg-graph-totals strong{font-size:clamp(20px,2.8vw,32px)}.mlg-graph-panel{margin-top:24px}.mlg-graph-panel h2{font-size:18px;margin:0}.mlg-graph-bars{display:flex;gap:14px;height:250px;margin-top:30px}.mlg-graph-month{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px;text-align:center;font-size:12px;color:#aaaeb8}.mlg-graph-pair{flex:1;display:flex;align-items:flex-end;justify-content:center;gap:3px;border-bottom:1px solid #45474d}.mlg-graph-pair span{display:block;width:40%;border-radius:5px 5px 0 0;transition:height .4s}.mlg-income-bar{background:#168aff}.mlg-expense-bar{background:#bb91ec}.mlg-legend-income{color:#69b4ff}.mlg-legend-expense{color:#bb91ec}.mlg-table-scroll{overflow:auto}.mlg-graphs-page table{border-collapse:collapse;width:100%;white-space:nowrap}.mlg-graphs-page td,.mlg-graphs-page th{padding:12px;text-align:right;border-bottom:1px solid #34363d}.mlg-graphs-page td:first-child,.mlg-graphs-page th:first-child{text-align:left}.mlg-graph-footnote{color:#999da7;font-size:13px}@media(max-width:600px){.mlg-graph-totals{grid-template-columns:1fr}.mlg-graphs-page main{padding:20px 14px}.mlg-graph-bars{gap:5px}.mlg-graph-panel{padding:16px}.mlg-graphs-page nav{gap:12px;font-size:13px}}
.mlg-finance-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center!important;gap:18px!important}
.mlg-header-navigation{justify-content:flex-start!important}.mlg-header-center{justify-self:center;min-width:0;text-align:center}.mlg-header-tools{justify-content:flex-end!important;min-width:0}
.mlg-finance-header .header-button,.mlg-finance-header .calendar-launch-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;padding:8px!important;line-height:1}
.mlg-finance-header .header-button i,.mlg-finance-header .calendar-launch-button i{display:inline-flex;align-items:center;justify-content:center;width:20px!important;height:20px!important;font-size:18px;line-height:1}
.mlg-finance-header .header-button svg{width:20px;height:20px;flex-shrink:0}.mlg-header-tools #mlg-profile{flex-shrink:0}
#main-app-container{width:min(1560px,100%)!important;margin-inline:auto!important}
#analytics-modal .mlg-analytics-dialog{width:min(1440px,100%)!important;max-width:1440px!important;max-height:94dvh;box-shadow:0 16px 60px #0005}
#analytics-modal .analytics-card{background:#fafafa;transform:none!important;filter:none!important;min-width:0}
html.dark #analytics-modal .analytics-card{background:#202125}
.mlg-chart-frame{position:relative;width:100%;height:360px;min-width:0}.mlg-chart-frame canvas{display:block;max-width:100%;filter:none!important;transform:none!important}
.mlg-clear-finance{display:flex;align-items:center;gap:12px;width:100%;padding:12px;text-align:left;border:1px solid #dc454540;border-radius:10px;color:#df5555}.mlg-clear-finance:hover{background:#df555510}.mlg-clear-confirm{background:#b92e3c!important;color:white!important;border:0!important}
@media(max-width:1100px){.mlg-finance-header{grid-template-columns:1fr 1fr}.mlg-header-center{grid-column:1/-1;grid-row:1}.mlg-header-navigation{grid-column:1;grid-row:2}.mlg-header-tools{grid-column:2;grid-row:2}.mlg-chart-frame{height:330px}}
@media(max-width:640px){.mlg-finance-header{display:flex!important;flex-direction:column}.mlg-header-center{order:0}.mlg-header-navigation{order:1;justify-content:center!important}.mlg-header-tools{order:2;justify-content:center!important}.mlg-finance-header #date-display{font-size:23px}.mlg-chart-frame{height:300px}#analytics-modal{padding:6px}#analytics-modal .mlg-analytics-dialog>div{padding:16px}#analytics-modal h2{font-size:22px}}
.mlg-analytics-controls{display:flex;flex-wrap:wrap!important;align-items:flex-end;min-width:0}.mlg-analytics-options{display:flex;flex-wrap:wrap;justify-content:flex-end;min-width:0;flex:1}.mlg-analytics-options>div{display:flex;flex-wrap:wrap;min-width:0}.mlg-analytics-options .analytics-filter-shell{min-width:150px;flex:1}.mlg-analytics-options .analytics-select{min-width:0;width:100%}.mlg-analytics-options .analytics-action-button{max-width:220px;flex-shrink:0}#analytics-modal .mlg-analytics-dialog{overflow-x:hidden}.mlg-analytics-options>p{max-width:250px!important;flex:1 1 180px}@media(max-width:640px){.mlg-analytics-options{width:100%;justify-content:flex-start}.mlg-analytics-options>p{flex-basis:auto;max-width:none!important}.mlg-analytics-options>div{width:100%}.mlg-analytics-options .analytics-action-button{max-width:none;width:100%}}

.mlg-password-warning{padding:12px;border:1px solid #f1bd5d55;border-radius:12px;background:#f1bd5d0c;font-size:12px!important;color:#e8c589!important}.mlg-account-form .mlg-ack{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.5}.mlg-account-form .mlg-ack input{width:17px;height:17px;flex-shrink:0;margin-top:1px}.mlg-account-form .mlg-forgot{background:transparent;border:0;padding:0;text-align:left;font-size:12px;color:#84c1ff}
