/* MI BALANCE R8 PREMIUM — CSS DE PRESENTACION INDEPENDIENTE | v1.0 */
/* MI BALANCE 3.9 — Premium Skin Lab / SOLO PRESENTACION
   Conserva el DOM, los cinco destinos, acciones, datos y formulas del ZIP original.
   Inspiracion: fintech monocromatica con acentos lima y lavanda; dos temas. */
:root{
  --skin-lime:#C6FF3D;--skin-lav:#B9ACFF;--skin-red:#F07983;
  --skin-bg:#F7F8FA;--skin-panel:#FFFFFF;--skin-alt:#F1F3F6;
  --skin-text:#16181F;--skin-sub:#626B7A;--skin-edge:#E5E8ED;
  --skin-rgb:20,24,31;--skin-depth:0 9px 28px rgba(19,23,31,.055);
  --ink:var(--skin-text);--navy:#15171D;--lime:var(--skin-lime);
  --green:#3D5E16;--muted:var(--skin-sub);--border:var(--skin-edge);
  --pale:#F3F8E9;--canvas:var(--skin-bg);--cream:var(--skin-panel);--red:#BE515D;
  background:var(--skin-bg);color:var(--skin-text);color-scheme:light;
  font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
html[data-mbv-theme="dark"]{
  --skin-bg:#0C0D11;--skin-panel:#17191F;--skin-alt:#23262E;
  --skin-text:#F8FAFD;--skin-sub:#B4BBC7;--skin-edge:#30343D;
  --skin-rgb:0,0,0;--skin-depth:0 10px 28px rgba(0,0,0,.2);
  --ink:var(--skin-text);--navy:#252830;--green:#C6FF3D;
  --muted:var(--skin-sub);--border:var(--skin-edge);
  --pale:#232932;--canvas:var(--skin-bg);--cream:var(--skin-panel);--red:#FF9CA6;
  background:var(--skin-bg);color:var(--skin-text);color-scheme:dark;
}
html,body{background:var(--skin-bg);color:var(--skin-text)}
body{accent-color:var(--skin-lime);-webkit-font-smoothing:antialiased}
body,button,input,select,textarea{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
button,a,summary{ -webkit-tap-highlight-color:transparent }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
 outline:3px solid #A5DE39;outline-offset:2px}
.app-shell{max-width:1220px}.page{color:var(--skin-text)}
/* Encabezado: conserva posicion y acciones existentes */
.topbar{gap:10px}.brand{color:var(--skin-text);font-size:18px;font-weight:860;letter-spacing:-.55px}
.brand-icon{background:#15171B;color:var(--skin-lime);border-radius:13px;box-shadow:0 5px 17px rgba(0,0,0,.12)}
.brand>span{color:var(--skin-sub)!important;font-size:10px!important;letter-spacing:.04em;font-weight:750!important}
.date-chip{background:var(--skin-alt);color:var(--skin-sub)}
.header-actions{gap:7px}
.round-button,.mbv-theme-toggle{
 width:42px;height:42px;min-width:42px;display:inline-flex;align-items:center;justify-content:center;
 border:1px solid var(--skin-edge);border-radius:14px;background:var(--skin-panel);color:var(--skin-text);
 box-shadow:0 2px 8px rgba(var(--skin-rgb),.025);padding:0;flex:none}
.mbv-theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mbv-theme-label{display:none;font-size:12px;font-weight:750}
.titleline h1{color:var(--skin-text);font-weight:850;letter-spacing:-1.25px}
.subtitle{color:var(--skin-sub);font-size:13px;line-height:1.55}
.eyebrow,.tiny-label,.ux-kicker,.ux-finance-kicker{color:var(--skin-sub);letter-spacing:.105em;font-weight:790}
.section-title h2,.ux-block-heading h2{font-weight:825;color:var(--skin-text);letter-spacing:-.6px}
/* Tarjetas: cambian materiales y detalles, no el orden ni las columnas */
:is(.surface,.kpi,.quick,.ux-quick-card,.ux-plan-choices button,.ux-stat,.item-card,.ux-small-panel,.ux-today .surface,.mb-settings-section,.mb-settings-hub-item,.mb-biz-card,.mb35-project,.ux-account-card){
 background:var(--skin-panel);border-color:var(--skin-edge);color:var(--skin-text);
 box-shadow:var(--skin-depth);border-radius:21px}
:is(.surface,.item-card,.ux-quick-card,.ux-stat){border-width:1px}
:is(.ux-quick-card,.quick,.ux-plan-choices button,.mb-settings-hub-item){transition:border-color .18s,box-shadow .18s,transform .18s}
:is(.ux-quick-card,.quick,.ux-plan-choices button,.mb-settings-hub-item):hover{
 border-color:#B5D775;box-shadow:0 10px 30px rgba(var(--skin-rgb),.09)}
.ux-quick-card:active,.quick:active,.btn:active{transform:scale(.985)}
.ux-quick-card b,.ux-plan-choices button b{color:var(--skin-text);font-weight:790}
.ux-quick-card small,.quick small,.ux-plan-choices button small,.ux-stat span,.row-sub,.detail span,.metric span,.inline-note,.note,.empty p,.ux-period{color:var(--skin-sub)}
.ux-quick-icon,.quick-ic,.row-icon,.ux-mini-ic,.badgeicon,.ux-next-icon{
 background:#EAF7CC;color:#263918;border-radius:14px}
.ux-quick-icon,.quick-ic{border-radius:15px}
/* Hero financiero del diseño original: misma informacion/acciones con piel premium. */
.ux-finance-hub,.ux-primary-balance,.hero,.mb-settings-hero,.mb35-hero{
 color:#FAFBFC;border:1px solid #30343A;
 background:radial-gradient(ellipse at 100% -5%,rgba(198,255,61,.18),transparent 45%),linear-gradient(145deg,#17191E 4%,#23272C 100%);
 box-shadow:0 20px 44px rgba(9,13,18,.16);border-radius:26px;position:relative;overflow:hidden}
.ux-finance-hub:before,.ux-primary-balance:before,.hero:before{
 content:"";position:absolute;right:-50px;top:-125px;width:310px;height:310px;border-radius:50%;
 border:1px solid rgba(198,255,61,.15);box-shadow:0 0 0 39px rgba(198,255,61,.022),0 0 0 88px rgba(198,255,61,.012);pointer-events:none}
.ux-finance-hub>*{position:relative;z-index:1}
.ux-finance-hub .ux-finance-kicker,.ux-finance-hub .ux-finance-note{color:#CCD3DC}
.ux-finance-grand>span,.ux-primary-balance>span,.hero-label{color:#D4DBE2}
.ux-finance-grand>strong,.ux-primary-balance>strong,.hero-amount{
 color:#FFFFFF;font-weight:860;letter-spacing:-1.35px;font-variant-numeric:tabular-nums}
.ux-finance-grand p,.ux-primary-balance p,.hero .hero-note{color:#D6DCE4}
.ux-finance-tile{
 border-radius:17px;background:rgba(255,255,255,.075);border:1px solid rgba(255,255,255,.155);
 color:#FFF;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.ux-finance-tile>span{color:#F1F4F8}.ux-finance-tile>strong{color:#FFFFFF}
.ux-finance-tile>small{color:#D0D6DF}
.ux-finance-tile:hover{background:rgba(255,255,255,.125)}
.ux-finance-liquid>div{background:rgba(0,0,0,.19);border:1px solid rgba(255,255,255,.13);border-radius:15px}
.ux-finance-liquid span,.ux-finance-explain summary{color:#D7DEE7}
.ux-finance-hub :is(.ux-finance-line,.ux-finance-warning){color:#DFE6E7}
.ux-finance-hub .ux-negative{color:#FFB0BD}
.ux-finance-hub .btn{background:var(--skin-lime);color:#151915}
/* Botones originales: mismos enlaces, mismo orden, sin acciones bancarias nuevas */
.btn{border-radius:13px;background:#1A1C22;color:white;border:1px solid transparent;
 font-weight:770;box-shadow:none;min-height:42px}
.btn.accent{background:var(--skin-lime);color:#12170D}
.btn.ghost{background:var(--skin-alt);color:var(--skin-text);border-color:transparent}
.btn.subtle{background:var(--skin-panel);color:var(--skin-text);border:1px solid var(--skin-edge)}
.btn.danger{background:#FDEDEF;color:#A93B4B}
.small-link{color:var(--green);font-weight:800}
.round-button:hover,.mbv-theme-toggle:hover,.btn:hover{filter:brightness(.97)}
.tabs button{background:var(--skin-alt);color:var(--skin-sub);border-radius:999px}
.tabs button.active{background:var(--skin-lime);color:#151915}
.chip{border-radius:999px;background:#E9F7CE;color:#32421D}
.chip.neutral{background:var(--skin-alt);color:var(--skin-sub)}
.chip.danger{background:#FAE7E8;color:#A43E4A}
.month-control{background:var(--skin-alt);border-radius:14px}.month-control button{color:var(--skin-text)}
.progress{background:var(--skin-edge)}.progress span{background:var(--skin-lime)}
.row-card{border-bottom-color:var(--skin-edge)}.row-title,.row-value{color:var(--skin-text)}
.row-icon.red{background:#FFE6E9;color:#A94553}.row-icon.blue{background:#E5E4FF;color:#544AA6}
.note,.detail,.metric,.ux-finance-explain,.mb-review-step{background:var(--skin-alt);color:var(--skin-text);border-color:var(--skin-edge)}
.soft,.ux-next-alert,.ux-side-note,.ux-next-card{background:#F1F7E8;color:#273323;border-color:#E1ECCF;border-radius:20px}
.soft p,.ux-next-alert p,.ux-side-note p{color:#57644F}
.ux-stat strong,.detail strong,.metric b{color:var(--skin-text)}
.positive{color:#347842}.negative{color:#B84F5C}
/* Formularios, popovers y overlays: legibilidad consistente. */
.modal{background:var(--skin-panel);color:var(--skin-text);border:1px solid var(--skin-edge);box-shadow:0 -16px 56px rgba(0,0,0,.22)}
.modal-backdrop{background:rgba(5,6,11,.65)}.modal-grip{background:var(--skin-edge)}
.modal-head h2{color:var(--skin-text)}
.field>label{color:var(--skin-text);font-weight:750}
.field input,.field select,.field textarea,.chat-form textarea,.chat-form input{
 background:var(--skin-panel);border:1px solid var(--skin-edge);border-radius:13px;
 color:var(--skin-text);min-height:46px;box-shadow:none}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#A7CC58;box-shadow:0 0 0 3px rgba(198,255,61,.22)}
input::placeholder,textarea::placeholder{color:var(--skin-sub);opacity:1}
/* Barra inferior: CINCO destinos originales y su distribucion original */
.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));background:rgba(255,255,255,.96);
 border-top:1px solid var(--skin-edge);box-shadow:0 -8px 30px rgba(12,15,22,.075);backdrop-filter:blur(18px)}
.nav-btn{color:#737D8B;font-weight:750;gap:5px}
.nav-btn span{font-size:11px}.nav-btn.active{color:#131814}
.nav-btn.active svg{background:var(--skin-lime);color:#182015;border-radius:12px;padding:7px;width:36px;height:34px;stroke-width:2.3}
.nav-btn:not(.active) svg{width:22px;height:22px}
/* Distintas pantallas existentes: sin mover componentes */
.ux-accounts-hero,.mb-biz-overview,.ux-inv-overview,.ux-advisor-hero,
.mb35-hero,.mb36-feature,.mb-settings-hero{border-radius:23px}
.ux-accounts-hero,.ux-inv-overview,.ux-advisor-hero{border-color:var(--skin-edge)}
.mb-settings-hero h2,.mb35-hero>strong{color:#FFFFFF}
.mb-settings-hero p,.mb35-hero p{color:#D2DAE4}
.ux-accounts-filter,.mb35-filters,.mb-alert-tabs,.mb37-controls{background:var(--skin-alt);border-color:var(--skin-edge)}
.ux-account-action,.mb-settings-hub-item,.mb-more-link,.ux-advisor-prompts button{color:var(--skin-text)}
.ux-accounts-breakdown,.ux-account-transactions,.ux-budget-row,.ux-movement-guide,.mb-agenda,.mb-review-integrity,.mb34-profile,.mb36-choice,.mb37-choice,
.mb36-horizon-tile,.mb37-result,.mb35-client,.mb-settings-callout,.mb-alert-settings-card,.mb-more-guide{
 border-color:var(--skin-edge)}
/* Desktop: original sidebar, no new routes or reorganization */
@media(min-width:760px){
 .app-shell{grid-template-columns:228px 1fr;max-width:1160px}
 .bottom-nav{left:max(0px,calc((100vw - 1160px)/2));width:228px;top:0;bottom:auto;height:100vh;
 padding:94px 15px 15px;background:var(--skin-panel);border-right:1px solid var(--skin-edge);border-top:0;box-shadow:none;display:flex;flex-direction:column;gap:7px}
 .nav-btn{flex-direction:row;gap:13px;justify-content:flex-start;min-height:54px;border-radius:15px;padding:10px 12px;font-size:13px;color:var(--skin-sub)}
 .nav-btn span{font-size:13px}
 .nav-btn.active{background:var(--skin-alt);color:var(--skin-text)}
 .nav-btn.active svg{padding:6px;width:34px;height:34px}
 .page{padding:0 34px 76px}
 .mbv-theme-label{display:none}
}
@media(max-width:759px){
 .page{padding-bottom:calc(115px + env(safe-area-inset-bottom))}
 .bottom-nav{height:calc(73px + env(safe-area-inset-bottom));padding-top:8px}
 .ux-finance-hub{border-radius:23px;padding:18px 15px}
 .ux-finance-grand{margin:15px 0}
 .ux-finance-grand>strong{font-size:clamp(28px,8vw,36px)}
 .ux-finance-grid{gap:9px}
 .ux-finance-tile{padding:12px 11px}
 .ux-quick-card{border-radius:19px}
 .ux-quick-icon{border-radius:15px}
}
@media(max-width:360px){
 .brand{font-size:16px}.brand-icon{height:35px;width:35px}
 .round-button,.mbv-theme-toggle{width:37px;height:37px;min-width:37px}
 .header-actions{gap:4px}
}
/* Modo nocturno: todas las piezas usan superficies oscuras, no blanco heredado. */
html[data-mbv-theme="dark"] .brand-icon{background:var(--skin-lime);color:#161A14}
html[data-mbv-theme="dark"] .bottom-nav{background:rgba(22,24,30,.96);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] .nav-btn{color:#AEB6C3}
html[data-mbv-theme="dark"] .nav-btn.active{color:#EAF3DF}
html[data-mbv-theme="dark"] .nav-btn.active svg{color:#162014}
html[data-mbv-theme="dark"] :is(.surface,.kpi,.quick,.ux-quick-card,.ux-plan-choices button,.ux-stat,.item-card,.ux-small-panel,
 .mb-settings-section,.mb-settings-hub-item,.mb-biz-card,.mb35-project,.ux-account-card,.mb35-client,.mb-alert-settings-card,
 .mb36-choice,.mb37-choice,.mb-review-step,.mb34-profile,.mb36-horizon-tile,.mb37-result,.mb-agenda,.ux-advisor-task,
 .ux-advisor-insight,.ux-finance-explain,.mb-settings-callout,.mb36-event,.mb-more-guide,.mb37-shortcut,
 .mb-impact-preview,.mb-biz-feature,.mb35-receipt,.mb-push-card){
 background:var(--skin-panel);color:var(--skin-text);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] :is(.soft,.ux-next-alert,.ux-side-note,.note,.detail,.metric,.mb-form-summary,.mb-ux-guidance,
 .mb-ux-focus,.mb-mini-guide,.mb-biz-kpis,.mb34-profile summary,.mb-review-integrity,.ux-movement-guide,.ux-account-transactions,
 .mb-settings-content,.mb-alert-tabs,.mb35-filters,.mb37-hint,.mb37-controls,.ux-accounts-filter,.mb-bill-more,
 .mb-form-more,.mb37-shortcut,.mb37-result,.mb-practice-stats,.mb38-data-preview,.mb36-inline-link,
 .ux-advisor-reason,.ux-advisor-evidence){background:var(--skin-alt);color:var(--skin-text);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] :is(.soft p,.ux-next-alert p,.ux-side-note p,.ux-stat span,.ux-quick-card small,.mb-settings-content p,
 .row-sub,.note,.inline-note,.detail span,.metric span,.field small,.empty p,.mb-settings-hub-item small,
 .ux-advisor-reason p,.mb35-project small,.mb-alert-empty p){color:var(--skin-sub)}
html[data-mbv-theme="dark"] :is(.soft,.ux-next-alert,.ux-side-note,.mb-settings-content,.mb-settings-hub-item) :is(h2,h3,strong,b){color:var(--skin-text)}
html[data-mbv-theme="dark"] :is(.quick-ic,.row-icon,.ux-quick-icon,.ux-mini-ic,.badgeicon,.ux-next-icon){background:#35452A;color:#D6FF8D}
html[data-mbv-theme="dark"] :is(.row-icon.red,.chip.danger){background:#473038;color:#FFC0CB}
html[data-mbv-theme="dark"] :is(.row-icon.blue,.chip.neutral){background:#33324D;color:#D5D0FF}
html[data-mbv-theme="dark"] :is(.chip,.soft .chip){background:#364A28;color:#E3FFB4}
html[data-mbv-theme="dark"] .btn{background:var(--skin-lime);color:#11160E}
html[data-mbv-theme="dark"] .btn.ghost{background:var(--skin-alt);color:var(--skin-text)}
html[data-mbv-theme="dark"] .btn.subtle{background:var(--skin-panel);color:var(--skin-text);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] .btn.danger{background:#472B35;color:#FFB7C4}
html[data-mbv-theme="dark"] .ux-finance-hub .btn{background:var(--skin-lime);color:#151915}
html[data-mbv-theme="dark"] .tabs button{background:#282C34;color:#C6CEDB}
html[data-mbv-theme="dark"] .tabs button.active{background:var(--skin-lime);color:#171A12}
html[data-mbv-theme="dark"] .month-control{background:var(--skin-alt)}
html[data-mbv-theme="dark"] .month-control button{color:var(--skin-text)}
html[data-mbv-theme="dark"] :is(.field input,.field select,.field textarea,.chat-form textarea,.chat-form input,input:not([type="checkbox"]):not([type="radio"]),select,textarea){
 background:#23262D;color:var(--skin-text);border-color:#3A3E49}
html[data-mbv-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1)}
html[data-mbv-theme="dark"] :is(.modal,.mb-more-sheet){background:var(--skin-panel);color:var(--skin-text);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] :is(.modal-head h2,.field>label,.section-title h2,.ux-block-heading h2,.ux-quick-card b,.row-title,.row-value){color:var(--skin-text)}
html[data-mbv-theme="dark"] .small-link{color:var(--skin-lime)}
html[data-mbv-theme="dark"] :is(.positive,.ux-positive){color:#A7F19B}
html[data-mbv-theme="dark"] :is(.negative,.ux-negative){color:#FFADB7}
html[data-mbv-theme="dark"] .mb-settings-hero h2{color:#FFF}
html[data-mbv-theme="dark"] .mb-settings-hero p{color:#D4DAE4}
html[data-mbv-theme="dark"] .ux-finance-tile{background:rgba(255,255,255,.075);color:white;border-color:rgba(255,255,255,.15)}
html[data-mbv-theme="dark"] .ux-finance-tile :is(span,strong){color:white}
html[data-mbv-theme="dark"] .ux-finance-tile small{color:#C9D2DC}
html[data-mbv-theme="dark"] .ux-finance-liquid>div{background:rgba(0,0,0,.18);border-color:rgba(255,255,255,.13)}
html[data-mbv-theme="dark"] .ux-finance-liquid span{color:#D4DDE5}
html[data-mbv-theme="dark"] .ux-finance-hub .ux-finance-grand p{color:#D8DFE5}
@media (prefers-reduced-motion:reduce){.ux-quick-card,.quick,.btn,.mbv-theme-toggle{transition:none!important}}
@media print{html,html[data-mbv-theme="dark"]{color-scheme:light;--skin-bg:#FFF;--skin-panel:#FFF;--skin-text:#1A1A1A;--skin-sub:#595959} .mbv-theme-toggle{display:none}}

/* PASS 2: legibilidad en secciones preexistentes, manteniendo geometria */
.ux-accounts-hero{background:radial-gradient(circle at 96% 0%,rgba(198,255,61,.14),transparent 35%),linear-gradient(145deg,#17191F,#242832);color:#fff;border:1px solid #363B44;box-shadow:0 16px 32px rgba(0,0,0,.14)}
.ux-accounts-hero>p,.ux-accounts-breakdown small{color:#D0D7DF}
.ux-accounts-hero :is(.ux-kicker,.tiny-label,.eyebrow){color:#CBF3A0}
.ux-accounts-hero :is(h2,h3,strong,b){color:#FFFFFF}
.ux-accounts-hero .ux-accounts-breakdown{border-color:rgba(255,255,255,.19)}
.ux-account-action{border:1px solid var(--skin-edge);background:var(--skin-panel);color:var(--skin-text);border-radius:18px;box-shadow:var(--skin-depth)}
.ux-account-action b{color:var(--skin-text)}.ux-account-action small{color:var(--skin-sub)}
.ux-plan-intro{background:#F0F6E6;color:#1C3026;border:1px solid #DBE6D1;border-radius:23px}
.ux-plan-intro :is(h1,h2,h3,.ux-plan-intro-first h1){color:#1D362A}
.ux-plan-intro p{color:#496253}
.ux-plan-intro :is(.ux-kicker,.tiny-label){color:#56734D}
.ux-plan-intro :is(.ux-plan-mini,.ux-plan-intro-mini){background:rgba(255,255,255,.7);color:#26372E;border-color:#E6EBD9}
.ux-plan-intro :is(.ux-plan-mini,.ux-plan-intro-mini) :is(span,strong,b){color:#26372E}
.mb-biz-overview>strong{color:var(--skin-text)}
.mb-biz-overview-grid>div,.mb-biz-kpis>div{background:var(--skin-alt);border:1px solid var(--skin-edge);border-radius:14px}
.mb-biz-overview-grid span,.mb-biz-kpis span{color:var(--skin-sub)}
.mb-biz-overview-grid b,.mb-biz-kpis strong{color:var(--skin-text)}
.mb-biz-feature{background:#EFF7E4;border-color:#DDEBCF;color:#263B2B}
.mb-biz-feature :is(span,small){color:#50654F}.mb-biz-feature strong{color:#25472C}
.ux-block-heading h2,.ux-block-heading p{color:var(--skin-text)}
.ux-plan-choices button{background:var(--skin-panel);color:var(--skin-text);border-color:var(--skin-edge)}
#modal-root .form-actions{background:linear-gradient(180deg,color-mix(in srgb,var(--skin-panel) 87%,transparent),var(--skin-panel) 38%);border-radius:12px}
#modal-root .mb-form-sticky-summary{color:var(--skin-text)}
#modal-root .mb-form-sticky-summary button{color:var(--green)}
#modal-root .mb-form-steps span{color:#324A32;background:#EAF5DE}
#modal-root .mb-movement-choice{background:#F7F9F6;color:#344E3B;border-color:#E1E6E1}
#modal-root .mb-movement-choice.selected{background:#E1F4C7;color:#253B20;border-color:#A7D76C}
#modal-root .mb-ux-guidance,#modal-root .mb-form-summary,#modal-root .mb-mini-guide{color:#284B36;background:#EDF7E6;border-color:#D2E7CC}
#modal-root .mb-ux-guidance :is(strong,b,p){color:#284B36}
html[data-mbv-theme="dark"] .ux-account-action{background:var(--skin-panel);color:var(--skin-text);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] .ux-account-action :is(b,strong){color:var(--skin-text)}
html[data-mbv-theme="dark"] .ux-account-action small{color:var(--skin-sub)}
html[data-mbv-theme="dark"] .ux-plan-intro{background:#1A1E23;color:#F5F7FC;border:1px solid #394336;box-shadow:var(--skin-depth)}
html[data-mbv-theme="dark"] .ux-plan-intro :is(h1,h2,h3,.ux-plan-intro-first h1){color:#FFFFFF}
html[data-mbv-theme="dark"] .ux-plan-intro p{color:#C1CAD5}
html[data-mbv-theme="dark"] .ux-plan-intro :is(.ux-kicker,.tiny-label){color:#C6FF91}
html[data-mbv-theme="dark"] .ux-plan-intro :is(.ux-plan-mini,.ux-plan-intro-mini){background:#2B3033;color:#F0F4FA;border-color:#42494C}
html[data-mbv-theme="dark"] .ux-plan-intro :is(.ux-plan-mini,.ux-plan-intro-mini) :is(span,strong,b){color:#F1F4F7}
html[data-mbv-theme="dark"] .mb-biz-overview>strong{color:#EAFBF0}
html[data-mbv-theme="dark"] .mb-biz-overview-grid>div,
html[data-mbv-theme="dark"] .mb-biz-kpis>div{background:#272A33;border-color:#343B43}
html[data-mbv-theme="dark"] .mb-biz-overview-grid :is(b,strong),
html[data-mbv-theme="dark"] .mb-biz-kpis :is(b,strong){color:#F6F8FC}
html[data-mbv-theme="dark"] .mb-biz-overview-grid span,
html[data-mbv-theme="dark"] .mb-biz-kpis span{color:#C3CAD5}
html[data-mbv-theme="dark"] .mb-biz-feature{background:#20292C;color:#F5F8FB;border-color:#3C4948}
html[data-mbv-theme="dark"] .mb-biz-feature :is(strong,b){color:#EBFFF0}
html[data-mbv-theme="dark"] .mb-biz-feature :is(span,small){color:#BECBD0}
html[data-mbv-theme="dark"] .ux-block-heading :is(h2,h3,p){color:var(--skin-text)}
html[data-mbv-theme="dark"] #modal-root .form-actions{background:linear-gradient(180deg,rgba(23,25,31,.88),#17191F 38%)}
html[data-mbv-theme="dark"] #modal-root .mb-form-sticky-summary{color:#E8EDF6}
html[data-mbv-theme="dark"] #modal-root .mb-form-sticky-summary button{color:#C6FF3D}
html[data-mbv-theme="dark"] #modal-root .mb-form-steps span{background:#27332A;color:#DFF5CA}
html[data-mbv-theme="dark"] #modal-root .mb-movement-choice{background:#242830;color:#F4F6FA;border-color:#414650}
html[data-mbv-theme="dark"] #modal-root .mb-movement-choice.selected{background:#3C4D2B;border-color:#B2E36C;color:#E8FFC9}
html[data-mbv-theme="dark"] #modal-root :is(.mb-ux-guidance,.mb-form-summary,.mb-mini-guide){background:#25312B;color:#ECFFF0;border-color:#385044}
html[data-mbv-theme="dark"] #modal-root .mb-ux-guidance :is(strong,b,p){color:#ECFFF0}
html[data-mbv-theme="dark"] #modal-root .mb-form-more{background:var(--skin-alt);color:var(--skin-text);border-color:var(--skin-edge)}
html[data-mbv-theme="dark"] #modal-root .mb-form-more :is(summary,p){color:var(--skin-text)}
/* Contraste en cabeceras de ayuda de Cuentas, Negocios, Plan */
html[data-mbv-theme="dark"] .ux-accounts-hero :is(.ux-kicker,.tiny-label){color:#D0F69B}
html[data-mbv-theme="dark"] .ux-accounts-hero :is(.ux-accounts-breakdown small,p){color:#CBD5DD}
html[data-mbv-theme="dark"] .ux-accounts-hero :is(strong,b){color:#FFFFFF}
/* Un acento lime intencional en el panel protagonista, sin cambiar su contenido */
.ux-finance-grid>.ux-finance-tile:first-child{background:#C6FF3D;color:#142013;border-color:#C6FF3D}
.ux-finance-grid>.ux-finance-tile:first-child :is(span,strong,small,svg){color:#172015}
.ux-finance-grid>.ux-finance-tile:first-child:hover{background:#D7FF7B}
html[data-mbv-theme="dark"] .ux-finance-grid>.ux-finance-tile:first-child{background:#C6FF3D;color:#172015;border-color:#C6FF3D}
html[data-mbv-theme="dark"] .ux-finance-grid>.ux-finance-tile:first-child :is(span,strong,small,svg){color:#172015}

/* QA 03: encabezados y notas de Plan legibles en tema oscuro */
.ux-plan-actions-label h2{color:var(--skin-text)}.ux-plan-actions-label p{color:var(--skin-sub)}
.ux-inline-note{color:var(--skin-sub)}
html[data-mbv-theme="dark"] .ux-plan-actions-label h2{color:#F5F7FA}
html[data-mbv-theme="dark"] .ux-plan-actions-label p{color:#BEC6D2}
html[data-mbv-theme="dark"] :is(.ux-inline-note,.mb-ux-guidance small,.ux-plan-note,.ux-finance-warning){color:#BFC7D4}
html[data-mbv-theme="dark"] #modal-root .mb-form-sticky-summary button{color:#D2FF89}

/* Refinamientos QA de pantallas reales R8 */
/* LAB ONLY — CSS inyectado en el navegador para revisar la piel visual; no es paquete técnico. */
:root{--skin-lime:#C6FF3D;--skin-lav:#B9ACFF;--skin-bg:#F7F8FA;--skin-panel:#FFFFFF;--skin-alt:#F0F2F5;--skin-edge:#E2E6EB;--skin-sub:#626B7A}
html[data-mbv-theme="dark"]{--skin-bg:#0C0D11;--skin-panel:#17191F;--skin-alt:#24262E;--skin-edge:#32353F;--skin-sub:#B4BBC7}
/* 01: La tarjeta grafito contrasta del mismo modo en ambas variantes. */
.ux-finance-hub,.ux-accounts-hero,.mb-settings-hero{background:radial-gradient(circle at 99% 0%,rgba(198,255,61,.10),transparent 42%),linear-gradient(145deg,#1B1D23,#20232A)!important;color:#F8FAFD;border:1px solid #343943}
.ux-finance-hub .ux-finance-grid>.ux-finance-tile:first-child{background:rgba(198,255,61,.17)!important;color:#F7F9FD!important;border-color:rgba(198,255,61,.36)!important}
.ux-finance-hub .ux-finance-grid>.ux-finance-tile:first-child :is(span,strong,small,svg){color:#F6F8FC!important}
.ux-accounts-hero :is(h2,h3,strong,b),.mb-settings-hero :is(h2,strong,b){color:#FFFFFF!important}
.ux-accounts-hero :is(p,small,.mb-learn-tip),.mb-settings-hero p{color:#D1D9E3!important}
/* 02: no todo el verde antiguo debe permanecer: elementos no semanticos y de soporte. */
.ux-mini-ic,.ux-quick-icon,.quick-ic,.mb-settings-icon{background:#EAF5D1;color:#2B3917;border-radius:13px}
.ux-account-action,.mb-settings-hub-item,.mb-settings-section,.mb-agenda,.mb37-result,.mb35-client,.mb-review-step,.monthly-priority-card{background:var(--skin-panel);color:var(--skin-text);border:1px solid var(--skin-edge)}
.ux-account-action :is(b,strong),.mb-settings-hub-item :is(b,strong){color:var(--skin-text)}
.ux-account-action small,.mb-settings-hub-item small,.mb-settings-content p,.mb-review-integrity small,.mb-agenda-item small{color:var(--skin-sub)}
/* 03: versiones de fondo neutro de paneles y ayudas de la arquitectura R8. */
.mb-settings-callout,.mb-settings-content .mb-alert-settings-card,.mb-review-integrity,.mb-subsection,
.mb-agenda-item,.mb-settings-content,.ux-accounts-help,.ux-accounts-accordion-body,
.monthly-priority-card,.goal-pocket-summary,.goal-pocket-item,.goal-split,.simple-goal-overview,
.simple-guidance,.simple-goal-preview,.alloc-income-head,.alloc-overview,.alloc-details,.assign-context,
.pocket-row,.pocket-how-body,.pocket-intro,.mb-ux-guidance,.mb-mini-guide,.mb-form-summary,
.mb-more-guide,.mb-more-link,.mb-more-sheet{
  background:var(--skin-panel);border-color:var(--skin-edge);color:var(--skin-text)
}
/* 04: sistema de campos, foco y acciones, sin tocar el DOM ni los eventos. */
button,select,input,textarea{font-variant-numeric:tabular-nums}
:where(button,input,textarea,select,summary,a):focus-visible{outline:3px solid #C6FF3D!important;outline-offset:2px}
:where(.field input,.field select,.field textarea){background:var(--skin-panel);border-color:var(--skin-edge);color:var(--skin-text)}
.btn.accent,.tabs button.active{background:#C6FF3D!important;color:#171B12!important;border-color:#C6FF3D!important}
.btn.danger{background:#FCECEF;color:#AE4355}
/* 05: modo nocturno exige redefinir más que las variables generales. */
html[data-mbv-theme="dark"] :is(.ux-account-action,.mb-settings-hub-item,.mb-settings-section,.mb-settings-content .mb-alert-settings-card,
 .mb-settings-callout,.mb-review-integrity,.mb-subsection,.mb-agenda-item,.monthly-priority-card,.goal-pocket-summary,
 .goal-pocket-item,.goal-split,.simple-goal-overview,.simple-guidance,.simple-goal-preview,.alloc-income-head,
 .alloc-overview,.alloc-details,.assign-context,.pocket-row,.pocket-how-body,.mb-ux-guidance,.mb-mini-guide,
 .mb-form-summary,.mb-more-guide,.mb-more-link,.mb-more-sheet,.ux-accounts-accordion-body,.ux-accounts-help){
 background:#20232A!important;color:#F5F7FB!important;border-color:#363B45!important
}
html[data-mbv-theme="dark"] :is(.mb-settings-hub-item,.mb-settings-section,.mb-settings-content,.mb-settings-callout,.mb-review-integrity,
 .mb-subsection,.monthly-priority-card,.goal-pocket-summary,.goal-pocket-item,.goal-split,.simple-goal-overview,
 .alloc-income-head,.alloc-overview,.alloc-details,.assign-context,.pocket-row,.pocket-how-body,.mb-ux-guidance,
 .mb-mini-guide,.mb-form-summary,.mb-more-guide,.mb-more-link,.mb-more-sheet,.ux-accounts-help,.ux-accounts-accordion-body)
 :is(p,small,span,li,summary,label){color:#CBD3DF!important}
html[data-mbv-theme="dark"] :is(.mb-settings-hub-item,.mb-settings-section,.mb-settings-content,.mb-settings-callout,.mb-review-integrity,
 .mb-subsection,.monthly-priority-card,.goal-pocket-summary,.goal-pocket-item,.goal-split,.simple-goal-overview,
 .alloc-income-head,.alloc-overview,.alloc-details,.assign-context,.pocket-row,.pocket-how-body,.mb-ux-guidance,
 .mb-mini-guide,.mb-form-summary,.mb-more-guide,.mb-more-link,.mb-more-sheet,.ux-accounts-help,.ux-accounts-accordion-body)
 :is(h2,h3,strong,b){color:#F8FAFD!important}
html[data-mbv-theme="dark"] .mb-settings-section>summary{color:#F8FAFD!important;background:#17191F}
html[data-mbv-theme="dark"] .mb-settings-hub-item{background:#20232A!important;color:#F8FAFD!important}
html[data-mbv-theme="dark"] .ux-account-action{background:#20232A!important;color:#F8FAFD!important}
html[data-mbv-theme="dark"] .ux-account-action :is(b,strong){color:#F8FAFD!important}
html[data-mbv-theme="dark"] .ux-account-action small{color:#C0C9D5!important}
html[data-mbv-theme="dark"] .mb-settings-hero :is(.ux-kicker,.mb-settings-keyfacts span){color:#DBE4ED!important}
html[data-mbv-theme="dark"] :is(.mb-settings-content .mb-alert-settings-card,.mb-settings-callout,.mb-review-integrity) :is(p,small){color:#D1D9E2!important}
html[data-mbv-theme="dark"] :is(.mb-settings-content .btn,.mb-settings-section .btn):not(.danger){color:#F4F7FD}
html[data-mbv-theme="dark"] :is(.ux-quick-icon,.quick-ic,.ux-mini-ic,.row-icon,.mb-settings-icon){background:#35412B;color:#DFFFA2}
html[data-mbv-theme="dark"] .bottom-nav{background:#17191F!important;border-color:#343A44}
/* 06: emblema lavanda solo para visualizaciones / indicadores; no botones principales. */
:is(.progress,.mb37-progress) span:nth-child(even){background:#B9ACFF}
/* 07: menu mas / modal de captura con campos visibles y estados. */
html[data-mbv-theme="dark"] .modal,html[data-mbv-theme="dark"] .mb-more-sheet{background:#17191F!important;color:#F8FAFD!important;border-color:#32353F!important}
html[data-mbv-theme="dark"] .modal :is(h2,h3,b,strong,label){color:#F8FAFD}
html[data-mbv-theme="dark"] .modal :is(p,small,.row-sub,.inline-note){color:#C2CBD8}
html[data-mbv-theme="dark"] .modal :is(input,select,textarea){background:#24262E!important;color:#F8FAFD!important;border-color:#3B414D!important}
html[data-mbv-theme="dark"] .modal :is(input,select,textarea)::placeholder{color:#ADB9C9}
html[data-mbv-theme="dark"] .modal .btn.ghost{background:#292D35;color:#F4F7FC}
/* 08: interfaz 320px e iconos lineales, sin reordenar la navegación. */
:where(.nav-btn svg,.round-button svg,.ux-mini-ic svg,.ux-quick-icon svg){stroke-linecap:round;stroke-linejoin:round}
@media(max-width:360px){.brand{font-size:15px}.brand>span{font-size:9px!important}.header-actions{gap:4px}.date-chip{display:none}.mbv-theme-toggle,.round-button{width:38px;min-width:38px;height:38px}}
/* QA selectivo: texto de revisión preventiva y botón informativo sobre superficies. */
.mb39-safety-status h2{color:#173E34!important}
.mb39-safety-status p{color:#486658!important}
html[data-mbv-theme="dark"] .mb39-safety-status h2{color:#F8FAFD!important}
html[data-mbv-theme="dark"] .mb39-safety-status p{color:#CAD3DF!important}
.ux-accounts-hero .mb-learn-tip{background:#EEF8E2!important;color:#244C37!important;border-color:#C3D6C0!important}
.ux-accounts-hero .mb-learn-tip svg{color:#244C37!important}
.ux-plan-caption{color:#536277!important}
html[data-mbv-theme="dark"] .ux-plan-caption{color:#C8D1DF!important}
html[data-mbv-theme="dark"] .ux-plan-caption b{color:#F3F7FD!important}
/* QA modales: ejercicios, formulario y disabled; evitar texto claro en cajas blancas. */
html[data-mbv-theme="dark"] #modal-root .mb-learn-option,
html[data-mbv-theme="dark"] #modal-root .mb-learn-options button{
 background:#242830!important;border-color:#424854!important;color:#F6F8FC!important
}
html[data-mbv-theme="dark"] #modal-root .mb-learn-option strong{color:#F6F8FC!important}
html[data-mbv-theme="dark"] #modal-root .mb-learn-option small{color:#C6D0DD!important}
html[data-mbv-theme="dark"] #modal-root .mb-learn-option-icon{background:#35472F!important;color:#C6FF8F!important}
html[data-mbv-theme="dark"] #modal-root .ux-movement-guide{
 background:#26332D!important;color:#E3F4E8!important;border-color:#405546!important
}
html[data-mbv-theme="dark"] #modal-root .ux-movement-guide :is(strong,span,summary,p){color:#E3F4E8!important}
html[data-mbv-theme="dark"] #modal-root .mb-form-kicker{color:#CBD5E2!important}
html[data-mbv-theme="dark"] #modal-root .mb-form-steps span{background:#28342C!important;color:#E1F3DD!important}
html[data-mbv-theme="dark"] #modal-root :is(input,select,textarea):disabled{opacity:1!important;color:#C8D0DC!important;background:#2A2D34!important}
html[data-mbv-theme="dark"] #modal-root .btn:disabled{opacity:1!important;background:#454952!important;color:#CED4DD!important;border-color:#454952!important;cursor:not-allowed}
html[data-mbv-theme="dark"] #modal-root .mb-form-sticky-summary button:disabled{opacity:1!important;color:#C2CAD5!important}

/* Laboratorio temporal de estrés visual: no integrar en R8. */
html[data-mbv-theme="dark"] #modal-root select:disabled,
html[data-mbv-theme="dark"] #modal-root input:disabled,
html[data-mbv-theme="dark"] #modal-root textarea:disabled {
 color:#CAD3DF!important;background:#2D313B!important;border:1px solid #454B57!important;
 -webkit-text-fill-color:#CAD3DF!important;opacity:1!important;
}
html[data-mbv-theme="dark"] #modal-root .mb-form-sticky-summary button:disabled {color:#D0D9E5!important;opacity:1!important}
html[data-mbv-theme="dark"] #modal-root .mb-form-save-status,
html[data-mbv-theme="dark"] #modal-root .mb-form-save-status-warning{
 background:#313027!important;color:#F2DEBA!important;border-left-color:#D4B175!important
}
html[data-mbv-theme="dark"] #modal-root .mb-form-sticky-summary{color:#D2DCE8!important}
html[data-mbv-theme="dark"] .mb39-safety-status {background:#20272A!important;border-color:#39464A!important}
html[data-mbv-theme="dark"] .mb39-safety-status p{color:#CAD3DF!important}
html[data-mbv-theme="light"] .ux-finance-hub .ux-finance-grand>span{color:#D0DCE3!important}
.ux-finance-grand>strong,.ux-finance-tile>strong,.ux-finance-liquid strong{overflow-wrap:anywhere;word-break:normal;max-width:100%;font-variant-numeric:tabular-nums}
@media(max-width:360px){.ux-finance-grand>strong{font-size:clamp(25px,6.5vw,31px)!important}}
/* Último ajuste exploratorio: las notificaciones tienen tarjetas claras heredadas y texto de poco contraste. */
html[data-mbv-theme="dark"] .mb-alert-empty{background:#252A2B!important;border:1px solid #3D4744!important;color:#EAF2EC!important}
html[data-mbv-theme="dark"] .mb-alert-empty b{color:#F4F8F5!important}
html[data-mbv-theme="dark"] .mb-alert-empty p{color:#C9D7D0!important}
html[data-mbv-theme="dark"] .mb-alert-settings{color:#C6FF3D!important}
html[data-mbv-theme="dark"] .mb-alert-tabs button:not(.active){background:#242832!important;color:#F0F3F8!important;border:1px solid #3E4652!important}
html[data-mbv-theme="dark"] .mb-alert-tabs button.active{background:#C6FF3D!important;color:#151A12!important}
html[data-mbv-theme="dark"] .mb-agenda summary,html[data-mbv-theme="dark"] .mb-agenda summary strong{color:#F2F6FC!important}
html[data-mbv-theme="dark"] .mb-agenda summary small{color:#C3CDD9!important}
html[data-mbv-theme="dark"] .mb-agenda-summary-icon{background:#303A35!important;color:#C6FF3D!important}
/* Corregir panel de desglose heredado: nunca debe convertirse en bloque blanco dentro del hero grafito. */
.ux-finance-hub .ux-finance-explain{
 background:transparent!important;color:#F8FAFD!important;
 border:0!important;border-top:1px solid #444A54!important;
 padding-top:10px!important
}
.ux-finance-hub .ux-finance-explain>summary{color:#EAF0F7!important;background:transparent!important;display:flex;align-items:center;min-height:38px}
.ux-finance-hub .ux-finance-explain :is(p,span,strong,b){color:#DFE6EF!important}

/* Solo laboratorio visual, nunca escribir sobre R8. */
/* Ajuste del ancho util de las tarjetas en telefono muy estrecho sin alterar la reticula. */
@media (max-width:360px){
 .ux-finance-grid>.ux-finance-tile{padding-inline:6px!important;}
}
@media (min-width:361px) and (max-width:420px){
 .ux-finance-grid>.ux-finance-tile{padding-inline:9px!important;}
}
/* La fuente se adapta mediante el ajuste visual temporal solo cuando no cabe el importe. */
.ux-finance-tile>strong,
.ux-finance-grand>strong,
.ux-finance-liquid strong {
  display:block;
  max-width:100%;
  white-space:nowrap;
  overflow-wrap:normal!important;
  word-break:normal!important;
  font-variant-numeric:tabular-nums;
}
/* Anillo doble visible tanto sobre el blanco como sobre el grafito. */
html[data-mbv-theme='light'] :is(button,input,select,textarea,summary,a):focus-visible {
  outline:2px solid #1B1D23!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 4px #C6FF3D!important;
}
html[data-mbv-theme='dark'] :is(button,input,select,textarea,summary,a):focus-visible {
  outline:2px solid #C6FF3D!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 4px #0C0D11!important;
}
/* Menor sensibilidad al movimiento. */
@media(prefers-reduced-motion:reduce){
 .ux-finance-tile,button, input, select{transition-duration:0.01ms!important;animation-duration:0.01ms!important}
}
/* En contenedor flex, el importe debe medir todo el ancho disponible, no usar shrink-to-fit. */
.ux-finance-grid>.ux-finance-tile>strong{width:100%;min-width:0;}
@media(max-width:360px){.ux-finance-liquid>div{padding-inline:6px!important}}
.ux-finance-liquid strong{width:100%;min-width:0}
@media(max-width:360px){.ux-finance-liquid>div{padding-inline:4px!important}}


/* ========================================================================
   MI BALANCE R8 — CIERRE VISUAL PREMIUM 1.0 | AISLADO, SIN REESTRUCTURAR R8
   El CSS solo interviene en presentación. Modo claro/oscuro y contraste.
   ======================================================================== */
:root {
 --mbp-brand-lime:#C6FF3D;--mbp-accent-lavender:#B9ACFF;
 --mbp-light-bg:#F7F8FA;--mbp-dark-bg:#0C0D11;
 --mbp-hero:#1B1D23;--mbp-hero-border:#39404A;
 --mbp-success:#236C45;--mbp-error:#AA3347;--mbp-warning:#856019;
 --mbp-radius-sm:12px;--mbp-radius-md:16px;--mbp-radius-lg:20px;--mbp-radius-xl:24px;
 --mbp-space-1:4px;--mbp-space-2:8px;--mbp-space-3:12px;--mbp-space-4:16px;
 --mbp-space-6:24px;--mbp-space-8:32px;
 --mbp-focus:#C6FF3D;
 --skin-text:#16181F; --skin-sub:#626B7A;
 --skin-bg:#F7F8FA; --skin-panel:#FFFFFF; --skin-alt:#F0F2F5; --skin-edge:#E2E6EB;
 --font-system:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}
html[data-mbv-theme="dark"]{
 --skin-bg:#0C0D11; --skin-panel:#17191F; --skin-alt:#24262E;
 --skin-text:#F8FAFD; --skin-sub:#B4BBC7; --skin-edge:#32353F;
 --mbp-success:#A1E7BB; --mbp-error:#FFB3C0; --mbp-warning:#F2D397;
}
html,body,button,input,textarea,select{font-family:var(--font-system)}
:where(.ux-finance-grand,.ux-finance-tile,.ux-finance-liquid) strong{font-variant-numeric:tabular-nums lining-nums;}
/* Gráfico / indicador: lavanda secundaria, NUNCA CTA principal. */
:is(.progress,.mb37-progress) span:nth-child(even){background:#B9ACFF}
/* Hero de Inicio, sí; no pintar panel de Ajustes o clientes como si fuera saldo disponible. */
.ux-finance-hub,.ux-primary-balance,.ux-accounts-hero{
 background:radial-gradient(circle at 96% -20%,rgba(198,255,61,.12),transparent 43%),linear-gradient(145deg,#1B1D23,#22252B)!important;
 border:1px solid #39404A!important;color:#F8FAFD!important;
}
.ux-finance-hub .ux-finance-grid>.ux-finance-tile:first-child{
 background:rgba(198,255,61,.16)!important;border:1px solid rgba(198,255,61,.32)!important;
 color:#F8FAFD!important;
}
.ux-finance-hub .ux-finance-grid>.ux-finance-tile:first-child :is(span,strong,small,svg){color:#F8FAFD!important}
.ux-finance-hub .ux-finance-explain,.ux-finance-hub .ux-finance-explain *{background:transparent!important}
.ux-finance-hub .ux-finance-explain{border-top:1px solid #444A54!important;color:#E5EBF2!important}
/* Estado de foco en ambos temas: doble señal visible, no basado solo en color de fondo. */
html[data-mbv-theme="light"] :is(button,a,input,textarea,select,summary):focus-visible{
 outline:2px solid #1B1D23!important;outline-offset:2px!important;box-shadow:0 0 0 4px #C6FF3D!important;
}
html[data-mbv-theme="dark"] :is(button,a,input,textarea,select,summary):focus-visible{
 outline:2px solid #C6FF3D!important;outline-offset:2px!important;box-shadow:0 0 0 4px #0C0D11!important;
}
/* Cifras completas: JS aplica --mbp-fit-font solo si el valor desborda. */
.ux-finance-grid>.ux-finance-tile>strong,.ux-finance-grand>strong,.ux-finance-liquid strong{
 width:100%;min-width:0;max-width:100%;white-space:nowrap!important;
 overflow-wrap:normal!important;word-break:normal!important;
 font-size:var(--mbp-fit-font,inherit)!important;letter-spacing:-.035em;
 font-variant-numeric:tabular-nums;
}
.ux-finance-tile{min-width:0;}
@media (max-width:360px){
 .ux-finance-grid>.ux-finance-tile{padding-inline:6px!important}
 .ux-finance-liquid>div{padding-inline:4px!important}
 .header-actions{gap:4px!important}
 .mbv-theme-toggle{width:38px!important;height:38px!important;min-width:38px!important}
}
/* Asegurar que ambas familias de tarjetas compartan superficies y textos. */
html[data-mbv-theme="dark"] :is(.ux-account-action,.mb-settings-hub-item,.mb-settings-section,
 .mb-settings-callout,.mb-settings-content,.mb-review-integrity,.mb-subsection,.mb-agenda,
 .mb-agenda-item,.mb-alert-empty,.mb-alert-row,.mb-alert-list,.mb35-client,.mb37-result,
 .goal-pocket-summary,.goal-pocket-item,.goal-split,.simple-goal-overview,
 .simple-guidance,.simple-goal-preview,.alloc-overview,.alloc-income-head,.alloc-details,
 .assign-context,.pocket-row,.pocket-how-body,.mb-ux-guidance,.mb-mini-guide,
 .mb-form-summary,.mb-more-guide,.mb-more-link,.mb-more-sheet){
 background:#20232A!important;color:#F8FAFD!important;border-color:#3A3E48!important;
}
html[data-mbv-theme="dark"] :is(.ux-account-action,.mb-settings-hub-item,.mb-settings-content,
 .mb-settings-callout,.mb-agenda,.mb-alert-empty,.mb-more-guide,.mb-more-link)
 :is(p,small,span,li){color:#C8D0DC!important}
html[data-mbv-theme="dark"] :is(.mb-settings-hero,.ux-accounts-hero) :is(h2,h3,b,strong){color:#F8FAFD!important}
html[data-mbv-theme="dark"] :is(.mb-settings-hero,.ux-accounts-hero) :is(p,small){color:#D2DCE8!important}
html[data-mbv-theme="dark"] .mb-alert-tabs button:not(.active){background:#242832!important;color:#F0F3F8!important;border:1px solid #3E4652!important}
html[data-mbv-theme="dark"] .mb-alert-tabs button.active{background:#C6FF3D!important;color:#151A12!important}
html[data-mbv-theme="dark"] .mb-agenda summary,html[data-mbv-theme="dark"] .mb-agenda summary strong{color:#F2F6FC!important}
html[data-mbv-theme="dark"] .mb-agenda summary small{color:#C3CDD9!important}
html[data-mbv-theme="dark"] .mb-agenda-summary-icon{background:#303A35!important;color:#C6FF3D!important}
/* Forms & disabled controls; never rely on default opacity alone. */
html[data-mbv-theme="dark"] #modal-root :is(input,select,textarea):disabled{
 background:#2D313B!important;border-color:#454B57!important;color:#CAD3DF!important;
 -webkit-text-fill-color:#CAD3DF!important;opacity:1!important;
}
html[data-mbv-theme="dark"] #modal-root .btn:disabled{background:#454952!important;border-color:#454952!important;color:#CED4DD!important;opacity:1!important}
html[data-mbv-theme="light"] #modal-root .btn:disabled{background:#E6E9ED!important;border-color:#D5D9DE!important;color:#596270!important;opacity:1!important}
html[data-mbv-theme="dark"] #modal-root :is(.mb-form-save-status,.mb-form-save-status-warning){background:#313027!important;color:#F2DEBA!important;border-left-color:#D4B175!important}
html[data-mbv-theme="dark"] .mb39-safety-status{background:#20272A!important;border-color:#39464A!important}
html[data-mbv-theme="dark"] .mb39-safety-status :is(h2,strong){color:#F8FAFD!important}
html[data-mbv-theme="dark"] .mb39-safety-status p{color:#CAD3DF!important}
html[data-mbv-theme="dark"] .ux-plan-caption{color:#C8D1DF!important}
html[data-mbv-theme="light"] .ux-plan-caption{color:#536277!important}
/* Selector en ajustes, insertado como panel sin reordenar herramientas existentes. */
.mbv-appearance{margin:13px 0 17px;padding:17px;border:1px solid var(--skin-edge);
 border-radius:20px;background:var(--skin-panel);color:var(--skin-text);box-shadow:var(--skin-depth)}
.mbv-appearance-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.mbv-appearance-heading strong{color:var(--skin-text);font-size:15px}
.mbv-appearance-heading svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8}
.mbv-appearance p{font-size:12px;line-height:1.55;color:var(--skin-sub);margin:0 0 12px}
.mbv-theme-choices{display:flex;gap:8px;flex-wrap:wrap}
.mbv-theme-choice{min-height:44px;min-width:112px;padding:9px 15px;display:flex;align-items:center;justify-content:center;gap:8px;
 border:1px solid var(--skin-edge);background:var(--skin-alt);color:var(--skin-text);border-radius:14px;
 font-size:14px;font-weight:750;cursor:pointer}
.mbv-theme-choice[aria-pressed="true"]{background:#C6FF3D!important;color:#151B10!important;border-color:#C6FF3D!important}
.mbv-theme-toggle{cursor:pointer;min-width:42px;min-height:42px}
.mbv-theme-toggle svg,.mbv-theme-choice svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.mbv-theme-toggle[aria-pressed="true"]{border-color:#55652D}
.mbv-theme-choices button:disabled{opacity:0.5}
/* The brand green does not substitute destructive/error statuses. */
.btn.danger{background:#FDEDEF!important;color:#A93B4B!important}
html[data-mbv-theme="dark"] .btn.danger{background:#472B35!important;color:#FFB7C4!important}
/* Standard data line icons. Never synthesize unverified bank card actions. */
:where(.nav-btn svg,.round-button svg,.ux-mini-ic svg,.ux-quick-icon svg,
 .mb-settings-icon svg){stroke-linecap:round;stroke-linejoin:round}
@media(prefers-reduced-motion:reduce){
 button,input,select,textarea,.ux-quick-card,.ux-finance-tile{animation:none!important;transition-duration:.01ms!important}
}


/* Ajuste final de jerarquía numérica: el fallback no debe heredar tamaños de 14px. */
.ux-finance-grand>strong{font-size:var(--mbp-fit-font,clamp(30px,7vw,40px))!important}
.ux-finance-grid>.ux-finance-tile>strong{font-size:var(--mbp-fit-font,clamp(17px,4.8vw,22px))!important}
.ux-finance-liquid strong{font-size:var(--mbp-fit-font,clamp(15px,3.8vw,18px))!important}

/* Integración R8 · calidad móvil. Se preserva orden y estructura. */
.mbv-theme-toggle,.round-button{width:44px;height:44px;min-width:44px;min-height:44px}
@media(max-width:360px){
 .mbv-theme-toggle,.round-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
 .topbar{gap:6px}
 .date-chip{display:none}
}
html[data-mbv-theme="dark"] .mbv-theme-toggle{background:var(--skin-panel);color:var(--skin-text)}
/* Reserva espacio a importes extensos y mantiene scroll solamente dentro del importe. */
.ux-finance-grand>strong,.ux-finance-grid>.ux-finance-tile>strong,.ux-finance-liquid strong{display:block;min-width:0}
/* Encabezado de 320 px: evita partir el nombre en dos líneas; nombre BETA sigue
   disponible en el título y en la descripción de la instalación de prueba. */
@media(max-width:360px){
 .brand{font-size:14px;white-space:nowrap;gap:7px}
 .brand>span{display:none!important}
 .brand-icon{width:34px;height:34px;min-width:34px}
}
/* ============================================================================
   MI BALANCE 3.9 PREMIUM — V2 / NIGHT SURFACES · 2026-10-09
   Estilos SOLO de presentación. Nada de DOM, rutas, lógica ni dinero.
   El oscuro usa 4 alturas de grafito, sin contenedores marfil heredados.
   NO afecta html[data-mbv-theme="light"].
   ========================================================================== */
html[data-mbv-theme="dark"] {
  --mbv2-base: #0C0D11;
  --mbv2-card: #191C23;
  --mbv2-card-raised: #22262F;
  --mbv2-card-nested: #2A2F38;
  --mbv2-line: #373D48;
  --mbv2-line-strong: #48505B;
  --mbv2-title: #F6F8FC;
  --mbv2-secondary: #C0C9D6;
  --mbv2-tertiary: #ACB7C6;
  --mbv2-lime: #C6FF3D;
  --mbv2-lavender: #C9BFFF;
  --skin-panel: var(--mbv2-card);
  --skin-alt: var(--mbv2-card-raised);
  --skin-edge: var(--mbv2-line);
  --skin-sub: var(--mbv2-secondary);
  --skin-text: var(--mbv2-title);
}

/* A: Surfaces — Inicio, Cuentas, Plan, Negocios, inversiones, Asesor, Ajustes,
   modales y secciones reutilizadas; preserve any approved hero gradients. */
html[data-mbv-theme="dark"] :is(
  .ux-more, .ux-help, .ux-accounts-panel, .ux-accounts-accordion,
  .ux-plan-accordion, .ux-advisor-accordion, .ux-advisor-chat,
  .ux-advisor-insight, .ux-account-action, .ux-account-card,
  .ux-account-transactions, .ux-accounts-accordion-body,
  .income-alert, .mb34-profile-summary, .mb34-profile,
  .pocket-summary, .pocket-summary>div,
  .pocket-widget, .pocket-row, .goal-card, .goal-coach,
  .goal-pocket-summary, .goal-pocket-item, .goal-split,
  .simple-goal-overview, .simple-guidance, .simple-goal-preview,
  .monthly-priority-card, .allocation-total,
  .alloc-income-head, .alloc-overview, .alloc-details, .alloc-ai-details,
  .mb38-ai-explain, .privacy-panel, .ux-accounts-empty,
  .ux-advisor-evidence, .ux-advisor-task,
  .mb-learn-explain-example, .mb-learn-explain-body,
  .mb-biz-feature, .mb-biz-card, .mb35-client, .mb35-project,
  .mb-settings-section, .mb-settings-content, .mb-settings-callout,
  .mb-settings-hub-item, .mb-review-integrity,
  .mb-alert-settings-card, .mb-alert-empty, .mb-alert-row,
  .mb-agenda, .mb-agenda-item, .mb-more-guide, .mb-more-link,
  .mb-more-sheet, .mbv-appearance, .mb-practice-stats,
  .mb-form-summary, .mb-ux-guidance, .mb-mini-guide,
  .ux-next-card, .mb-bill-more, .mb-form-more,
  .mb36-choice, .mb37-choice, .mb36-horizon-tile,
  .mb37-result, .mb-settings-hub, .mb39-safety-status
) {
  background: var(--mbv2-card) !important;
  border-color: var(--mbv2-line) !important;
  color: var(--mbv2-title) !important;
  box-shadow: 0 6px 22px rgba(0,0,0,.12);
}

/* B: Elevated and inset sections: never bone-white in dark mode. */
html[data-mbv-theme="dark"] :is(
  .ux-more-content, .ux-panel-body, .ux-accounts-help,
  .mb-settings-content, .alloc-overview-row, .pocket-how-body,
  .mb36-event, .mb37-controls, .mb37-hint,
  .mb-form-more, .mb-settings-callout, .mb-form-summary,
  .goal-split-status, .mb34-profile-summary, .mb-practice-step,
  .mb38-data-preview, .mb-biz-kpis, .mb-settings-shortcut,
  .mb-review-step, .mb-learn-explain-example
) {
  background: var(--mbv2-card-raised) !important;
  border-color: var(--mbv2-line) !important;
  color: var(--mbv2-title) !important;
}
html[data-mbv-theme="dark"] :is(.ux-plan-accordion,.ux-accounts-accordion,.ux-more,.ux-help,.ux-advisor-accordion)[open] > summary {
  border-bottom: 1px solid var(--mbv2-line) !important;
}
html[data-mbv-theme="dark"] :is(.ux-panel-body,.ux-accounts-accordion-body,.mb-more-sheet){border-color:var(--mbv2-line)!important}

/* C: Typography — reset evergreen green text surviving from original R8. */
html[data-mbv-theme="dark"] :is(
 .ux-plan-accordion,.ux-accounts-panel,.ux-accounts-accordion,.ux-more,.ux-help,
 .income-alert,.ux-advisor-chat,.ux-advisor-accordion,.mb34-profile-summary,
 .ux-accounts-empty,.mb38-ai-explain,.privacy-panel,.mb-biz-feature,
 .alloc-income-head,.alloc-overview,.alloc-details,.alloc-ai-details,
 .goal-coach,.goal-split,.mb-more-link,.mb-settings-callout
) :is(h1,h2,h3,h4,b,strong,label){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] :is(
 .ux-plan-accordion,.ux-accounts-panel,.ux-accounts-accordion,.ux-more,.ux-help,
 .income-alert,.ux-advisor-chat,.ux-advisor-accordion,.mb34-profile-summary,
 .ux-accounts-empty,.mb38-ai-explain,.privacy-panel,.mb-biz-feature,
 .alloc-income-head,.alloc-overview,.alloc-details,.alloc-ai-details,
 .goal-coach,.goal-split,.mb-more-link,.mb-settings-callout
) :is(p,small,.inline-note,.row-sub,.alloc-desc,.pocket-description){color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] :is(
 .ux-plan-accordion>summary,.ux-accounts-accordion>summary,
 .ux-advisor-accordion>summary,.ux-more>summary,.ux-help>summary,
 .alloc-details>summary,.alloc-ai-details>summary,
 .pocket-how>summary,.ux-accounts-more>summary
){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] .ux-plan-accordion>summary small,
html[data-mbv-theme="dark"] .ux-accounts-accordion>summary small,
html[data-mbv-theme="dark"] .ux-advisor-accordion>summary small,
html[data-mbv-theme="dark"] .mb-more-link small{color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] :is(.ux-accounts-more,.alloc-overview-row,.row-card,.allocation-list,.alloc-row,.goal-split-row,.pocket-how,.ux-advisor-log-head){border-color:var(--mbv2-line)!important}

/* D: Plan accordion — graphite and distinct lime-supported indicators. */
html[data-mbv-theme="dark"] .ux-plan-accordion {
  background:var(--mbv2-card)!important;
  border:1px solid var(--mbv2-line)!important;
  box-shadow:0 4px 18px rgba(0,0,0,.15)!important;
}
html[data-mbv-theme="dark"] .ux-plan-accordion .ux-chapter-number{
  background:#303B2B!important;color:#D3FF90!important;
  border:1px solid #425836!important;
}
html[data-mbv-theme="dark"] .ux-plan-accordion .ux-arrow{color:#B8E98F!important}
html[data-mbv-theme="dark"] .ux-plan-accordion[open]>summary{background:#20242C!important}
html[data-mbv-theme="dark"] .ux-plan-actions-label :is(h2,h3){color:var(--mbv2-title)!important}

/* E: Income distributor — graphite container and discreet item separators. */
html[data-mbv-theme="dark"] .income-alert {
  background:#222830!important;
  border:1px solid #485647!important;
  color:var(--mbv2-title)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
html[data-mbv-theme="dark"] .income-alert :is(.row-card,.alloc-row){
  background:transparent!important;
  border-bottom-color:#414A50!important;
}
html[data-mbv-theme="dark"] .income-alert :is(.row-title,.row-value,strong,b){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] .income-alert :is(.row-sub,small,p,span:not(.chip)){color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] .income-alert .btn{background:var(--mbv2-lime)!important;color:#13180F!important}
html[data-mbv-theme="dark"] .income-alert .btn :is(span,b,strong){color:#13180F!important}
html[data-mbv-theme="dark"] .alloc-income-head strong,
html[data-mbv-theme="dark"] .alloc-overview-row :is(strong,b){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] .alloc-income-head :is(span,small),
html[data-mbv-theme="dark"] .alloc-overview-row small,
html[data-mbv-theme="dark"] .alloc-steps p{color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] .alloc-details[open]>summary{border-color:var(--mbv2-line)!important}
html[data-mbv-theme="dark"] .allocation-total{background:#2C382D!important;color:#E4F7DC!important}

/* F: Transaction lists — container and child rows in same dark material. */
html[data-mbv-theme="dark"] .ux-accounts-panel{background:var(--mbv2-card)!important}
html[data-mbv-theme="dark"] .ux-accounts-panel :is(.row-card,.ux-account-transactions){
  background:transparent!important;border-color:var(--mbv2-line)!important
}
html[data-mbv-theme="dark"] .ux-accounts-panel :is(.row-title,.row-value,label){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] .ux-accounts-panel :is(.row-sub,.inline-note){color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] .ux-accounts-panel .icon-btn{color:#BDC8CB!important;min-width:36px;min-height:40px}
html[data-mbv-theme="dark"] .ux-transfer-icon{background:#293A3D!important;color:#B8ECDD!important}
html[data-mbv-theme="dark"] .ux-transfer-amount{color:#A1E7BB!important}
html[data-mbv-theme="dark"] .ux-accounts-empty{background:#242B32!important}
html[data-mbv-theme="dark"] .ux-accounts-accordion>summary .ux-arrow{color:#B8E98F!important}

/* G: Advisor — remove pale suggestion cards and white conversation block. */
html[data-mbv-theme="dark"] .ux-advisor-prompts button,
html[data-mbv-theme="dark"] .suggestions button{
  background:var(--mbv2-card-nested)!important;
  border:1px solid #434B56!important;
  color:#F0F3F8!important;
  box-shadow:none!important;
}
html[data-mbv-theme="dark"] .ux-advisor-prompts button:active,
html[data-mbv-theme="dark"] .ux-advisor-prompts button:hover{background:#333A42!important;border-color:#5A6949!important}
html[data-mbv-theme="dark"] :is(.ux-advisor-log,.chat-log){
  background:#101319!important;border:1px solid #303640!important;color:var(--mbv2-title)!important;
}
html[data-mbv-theme="dark"] :is(.chat-msg.bot,.ux-advisor-log .chat-msg.bot){
  background:#262B34!important;border:1px solid #3B4350!important;color:#EDF2F9!important;
}
html[data-mbv-theme="dark"] .chat-msg.user{background:#374525!important;color:#F6FFE8!important;border:1px solid #586F35!important}
html[data-mbv-theme="dark"] .chat-msg :is(p,span,small){color:inherit!important}
html[data-mbv-theme="dark"] .ux-advisor-severity{
  background:#2A3B30!important;color:#CFF3D9!important;border:1px solid #3E5C49!important;
}
html[data-mbv-theme="dark"] .ux-advisor-insight.attention .ux-advisor-severity{background:#423226!important;color:#FFDFB1!important}
html[data-mbv-theme="dark"] .ux-advisor-insight.review .ux-advisor-severity{background:#303345!important;color:#DBD6FF!important}
html[data-mbv-theme="dark"] .ux-advisor-reason summary{color:#C8F0B8!important}
html[data-mbv-theme="dark"] .ux-advisor-disclaimer{color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] .ux-advisor-accordion>summary:after{color:var(--mbv2-lime)!important}
html[data-mbv-theme="dark"] .mb38-ai-explain,
html[data-mbv-theme="dark"] .privacy-panel{background:#252A31!important;border-color:#3E4650!important}
html[data-mbv-theme="dark"] .privacy-choice{color:var(--mbv2-secondary)!important}

/* H: More overlay — premium graphite icon trays rather than bone white. */
html[data-mbv-theme="dark"] .mb-more-link{
  background:#22252C!important;border-color:#363D47!important;
}
html[data-mbv-theme="dark"] .mb-more-link :is(b,strong){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] .mb-more-link :is(p,small,span){color:var(--mbv2-secondary)!important}
html[data-mbv-theme="dark"] :is(.mb-more-link .ux-mini-ic,.mb-more-link .mb-more-icon,.mb-more-link .mb-settings-icon,.mb-settings-icon){
  background:#313B39!important;color:#C2F3A3!important;border:1px solid #46564A!important;
}
html[data-mbv-theme="dark"] .mb-more-link :is(svg,path){stroke:currentColor}
html[data-mbv-theme="dark"] .mb-more-link:hover{border-color:#657D48!important;background:#292E35!important}
html[data-mbv-theme="dark"] .mb-more-sheet{background:#1D2028!important}

/* I: Help, explanations, warnings — semantic colors remain distinct. */
html[data-mbv-theme="dark"] :is(.callout,.callout:not(.warn),.ux-help,.goal-coach,.mb-learn-tip,.ux-help button,.ux-more,.ux-accounts-help){
  background:#242A32!important;color:#D8E1EB!important;border-color:#3B464C!important;
}
html[data-mbv-theme="dark"] :is(.mb-learn-tip,.ux-help>summary,.mb-learn-explain-example strong){color:#CBF4BB!important}
html[data-mbv-theme="dark"] .callout.warn,
html[data-mbv-theme="dark"] .topwarn{
  background:#382D27!important;border:1px solid #64513B!important;color:#F8DAB0!important;
}
html[data-mbv-theme="dark"] .callout.warn :is(p,small,span,strong){color:#F8DAB0!important}
html[data-mbv-theme="dark"] .mb-learn-tip-light{background:rgba(255,255,255,.11)!important;color:#E4F7E8!important;border-color:#64746D!important}
html[data-mbv-theme="dark"] .mb-alert-counter{background:#29372B!important;color:#D6F8C0!important}
html[data-mbv-theme="dark"] :is(.inline-note,.mb-ux-guidance,.mb38-ai-explain) {border-color:var(--mbv2-line)!important}
html[data-mbv-theme="dark"] :is(.inline-note,.mb-learn-explain-body,.goal-coach,.mb38-ai-explain,.privacy-panel) :is(p,small,li,span){color:var(--mbv2-secondary)!important}

/* J: Controls, dividers, charts. Brand lime only for actions; keep semantic red. */
html[data-mbv-theme="dark"] :is(.ux-accounts-filter,.mb35-filters,.mb-alert-tabs,.mb37-controls,.month-control){
  background:#292E37!important;border-color:var(--mbv2-line)!important;color:var(--mbv2-title)!important;
}
html[data-mbv-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
  background:#282D36!important;color:var(--mbv2-title)!important;border-color:#46505A!important;
}
html[data-mbv-theme="dark"] :is(input,textarea)::placeholder{color:#AAB5C4!important;opacity:1}
html[data-mbv-theme="dark"] :is(.mbv-theme-toggle,.round-button,.icon-btn){border-color:var(--mbv2-line)!important}
html[data-mbv-theme="dark"] :is(.ux-chapter-number,.row-icon,.ux-quick-icon,.quick-ic,.mb-settings-icon){box-shadow:none}
html[data-mbv-theme="dark"] .row-icon.red{background:#49313C!important;color:#FFBAC7!important}
html[data-mbv-theme="dark"] .row-icon.blue{background:#303851!important;color:#D8D6FF!important}
html[data-mbv-theme="dark"] .chip.danger{background:#49313C!important;color:#FFBAC7!important}
html[data-mbv-theme="dark"] .chip.neutral{background:#313A44!important;color:#C7D4E1!important}
html[data-mbv-theme="dark"] :is(.detail-table td,.finance-table td,.finance-table th,.row-card,hr){border-color:var(--mbv2-line)!important}
html[data-mbv-theme="dark"] .progress{background:#343944!important}
html[data-mbv-theme="dark"] :is(.chart-legend span,.bar){background:#B9ACFF}
html[data-mbv-theme="dark"] :is(.chart-legend span.out,.bar.out){background:#B2E4D1}

/* K: Preserve legible action labels even inside generic text-reset containers. */
html[data-mbv-theme="dark"] :is(.btn,.btn.accent,.tabs button.active,.ux-advisor-input button,.mbv-theme-choice[aria-pressed="true"]) {
  font-weight:780;
}
html[data-mbv-theme="dark"] :is(.btn:not(.ghost):not(.subtle):not(.danger),.tabs button.active,.mbv-theme-choice[aria-pressed="true"]),
html[data-mbv-theme="dark"] :is(.btn:not(.ghost):not(.subtle):not(.danger),.tabs button.active,.mbv-theme-choice[aria-pressed="true"]) :is(span,b,strong){
  color:#12170D!important;
}
html[data-mbv-theme="dark"] :is(.btn.ghost,.btn.subtle){color:var(--mbv2-title)!important}
html[data-mbv-theme="dark"] :is(.btn.danger,.btn.danger :is(b,span,strong)){color:#FFBEC9!important}
html[data-mbv-theme="dark"] .positive{color:#9DE9B9!important}
html[data-mbv-theme="dark"] .negative{color:#FFA9B8!important}

/* L: accessibility — tap targets and wrapping but never change DOM/navigation. */
@media(max-width:759px){
 html[data-mbv-theme="dark"] :is(.ux-plan-accordion>summary,.ux-accounts-accordion>summary,.ux-advisor-accordion>summary){min-height:64px}
 html[data-mbv-theme="dark"] .ux-advisor-prompts button{min-height:58px}
}
@media(prefers-reduced-motion:reduce){
 html[data-mbv-theme="dark"] :is(.ux-plan-accordion,.ux-advisor-prompts button,.mb-more-link){transition:none!important}
}
/* V2 QA contrast: original legacy green ink must never sit on graphite. */
html[data-mbv-theme="dark"] .mb36-home-link :is(b,strong){color:#F2F6FB!important}
html[data-mbv-theme="dark"] .mb36-home-link small{color:#C0CAD8!important}
html[data-mbv-theme="dark"] .mb36-home-mark{background:#303A39!important;color:#D2FF9E!important}
html[data-mbv-theme="dark"] .ux-small-panel p{color:#C0CAD8!important}
html[data-mbv-theme="dark"] :is(.ux-link,.ux-accounts-more>summary){color:#C7F8A0!important}
html[data-mbv-theme="dark"] .mb34-total{color:#D1F8B9!important}
html[data-mbv-theme="dark"] .mb-agenda .inline-note{
  background:#242A32!important;border:1px solid #3B434E!important;
  color:#C8D2DF!important;
}
html[data-mbv-theme="dark"] .mb-agenda .inline-note b{color:#EEF4FB!important}
html[data-mbv-theme="dark"] .mb-agenda-foot{color:#BDCAD7!important}
html[data-mbv-theme="dark"] .ux-advisor-mini{color:#C7FA9D!important}
html[data-mbv-theme="dark"] .ux-advisor-evidence>span,
html[data-mbv-theme="dark"] .ux-advisor-task>span{color:#BDF0A5!important}
html[data-mbv-theme="dark"] .ux-advisor-evidence p,
html[data-mbv-theme="dark"] .ux-advisor-task p,
html[data-mbv-theme="dark"] .ux-advisor-reason p{color:#D5DDE8!important}
html[data-mbv-theme="dark"] .mb38-data-preview summary{color:#D1F5BF!important}
html[data-mbv-theme="dark"] .mb38-data-preview :is(p,pre){color:#D5DFEA!important}
html[data-mbv-theme="dark"] :is(.mb38-data-preview pre,.privacy-panel pre){background:#111419!important;border-color:#363D47!important}
/* =======================================================================
   MI BALANCE 3.9 — PREMIUM V3 / DARK MATERIALS AUDIT
   Presentational overrides only. No financial logic or DOM modifications.
   Dark theme: no large ivory/white secondary cards, incl. forecast + desktop.
   ======================================================================= */
html[data-mbv-theme="dark"] {
  --mbv3-base:#0C0D11;
  --mbv3-outer:#181B22;
  --mbv3-raised:#232730;
  --mbv3-nested:#2A303A;
  --mbv3-stroke:#3C434E;
  --mbv3-high:#F5F7FB;
  --mbv3-medium:#CDD5E0;
  --mbv3-lower:#B3BFCD;
  --mbv3-warn-bg:#392D25;
  --mbv3-warn-line:#6B5540;
  --mbv3-warn-ink:#F9D7AA;
  --mbv3-safe-bg:#26382F;
  --mbv3-safe-line:#426C54;
  --mbv3-safe-ink:#DAF4DF;
}

/* Pronósticos, incl. visualización del mismo panel en pantalla de escritorio.
   Las tarjetas de métricas NO deben heredar la paleta clara de styles.css. */
html[data-mbv-theme="dark"] :is(
  .mb36-stat, .mb36-equation, .mb36-horizon-tile,
  .mb36-info, .mb36-inline-link, .mb36-forecast-detail,
  .mb36-warnings p, .mb36-event, .mb36-choice,
  .mb36-forecast-notes .inline-note
) {
  background:var(--mbv3-raised)!important;
  border-color:var(--mbv3-stroke)!important;
  color:var(--mbv3-high)!important;
  box-shadow:none!important;
}
html[data-mbv-theme="dark"] .mb36-stat {
  border:1px solid var(--mbv3-stroke)!important;
  border-radius:16px;
  background:linear-gradient(155deg,#242A34,#20242C)!important;
}
html[data-mbv-theme="dark"] .mb36-stat :is(span,small),
html[data-mbv-theme="dark"] .mb36-feature :is(span,small),
html[data-mbv-theme="dark"] .mb36-event small,
html[data-mbv-theme="dark"] .mb36-forecast-notes>p,
html[data-mbv-theme="dark"] .mb36-forecast-detail summary,
html[data-mbv-theme="dark"] .mb36-info p,
html[data-mbv-theme="dark"] .mb36-inline-link p {
  color:var(--mbv3-medium)!important;
}
html[data-mbv-theme="dark"] .mb36-stat strong,
html[data-mbv-theme="dark"] .mb36-equation b,
html[data-mbv-theme="dark"] .mb36-event :is(b,strong),
html[data-mbv-theme="dark"] .mb36-horizon-tile b,
html[data-mbv-theme="dark"] .mb36-inline-link strong,
html[data-mbv-theme="dark"] .mb36-forecast-notes :is(h2,b,strong){color:var(--mbv3-high)!important}
html[data-mbv-theme="dark"] .mb36-stat strong.negative,
html[data-mbv-theme="dark"] .mb36-horizon-tile .negative,
html[data-mbv-theme="dark"] .mb36-feature .negative{color:#FFAEBD!important}
html[data-mbv-theme="dark"] .mb36-horizon-tile {
  background:#252B33!important;
  border:1px solid #48515B!important;
  border-radius:13px;
}
html[data-mbv-theme="dark"] .mb36-horizon-tile.active{
  background:#2E3E2B!important;
  border:2px solid #B1F25B!important;
}
html[data-mbv-theme="dark"] .mb36-horizon-tile span,
html[data-mbv-theme="dark"] .mb36-horizon-tile b{color:#E9F0F8!important}
html[data-mbv-theme="dark"] .mb36-choice.active{
  background:#C6FF3D!important;border-color:#C6FF3D!important;color:#151B0A!important;
}
html[data-mbv-theme="dark"] .mb36-feature{
  background:linear-gradient(135deg,#1D242C,#28323B)!important;
  color:var(--mbv3-high)!important;border:1px solid #3D464F!important;
}
html[data-mbv-theme="dark"] .mb36-feature>strong{color:#FFFFFF!important}
html[data-mbv-theme="dark"] .mb36-equation {
  background:#29313A!important;
  border:1px solid var(--mbv3-stroke)!important;
  color:#E2EAF5!important;
  overflow-wrap:anywhere;
}
html[data-mbv-theme="dark"] .mb36-equation span{color:#CBD4E1!important}
html[data-mbv-theme="dark"] .mb36-risk.fine{
  background:var(--mbv3-safe-bg)!important;
  border:1px solid var(--mbv3-safe-line)!important;
  color:var(--mbv3-safe-ink)!important;
}
html[data-mbv-theme="dark"] .mb36-risk.warn,
html[data-mbv-theme="dark"] .mb36-warnings p{
  background:var(--mbv3-warn-bg)!important;
  border:1px solid var(--mbv3-warn-line)!important;
  color:var(--mbv3-warn-ink)!important;
}
html[data-mbv-theme="dark"] .mb36-risk :is(p,b,strong,span),
html[data-mbv-theme="dark"] .mb36-warnings p :is(b,strong,span){color:inherit!important}
html[data-mbv-theme="dark"] .mb36-risk svg,
html[data-mbv-theme="dark"] .mb36-warnings p svg{color:inherit!important;flex:none}
html[data-mbv-theme="dark"] .mb36-event{
  background:transparent!important;border-bottom:1px solid var(--mbv3-stroke)!important;
}
html[data-mbv-theme="dark"] .mb36-event strong.positive{color:#A5F4BE!important}
html[data-mbv-theme="dark"] .mb36-event strong.negative{color:#FFB3C1!important}
html[data-mbv-theme="dark"] .mb36-footer-note{color:var(--mbv3-medium)!important}
html[data-mbv-theme="dark"] .mb36-home-link{
  background:linear-gradient(120deg,#242C31,#1E242A)!important;
  border-color:#3F5147!important;color:#F5F8F9!important;
}
html[data-mbv-theme="dark"] .mb36-home-link :is(b,small){color:#E5EEF1!important}
html[data-mbv-theme="dark"] .mb36-home-mark{
  background:#343F37!important;color:#D4FFA2!important;
}

/* Simulador de deudas: baseline, resultados y advertencias sin tarjetas claras. */
html[data-mbv-theme="dark"] :is(
 .mb37-shortcut,.mb37-debt-chip,.mb37-savings,.mb37-notice,
 .mb37-result.baseline,.mb37-hint,.mb37-info,
 .mb37-all,.mb37-table,.mb37-panel
){
  background:var(--mbv3-raised)!important;
  border-color:var(--mbv3-stroke)!important;
  color:var(--mbv3-high)!important;
}
html[data-mbv-theme="dark"] .mb37-panel,
html[data-mbv-theme="dark"] :is(.mb37-info,.mb37-hint,.mb37-all,.mb37-table){
  background:transparent!important;
}
html[data-mbv-theme="dark"] .mb37-result{
  background:#24322D!important;
  border:1px solid #3F6551!important;
  color:var(--mbv3-high)!important;
}
html[data-mbv-theme="dark"] .mb37-result.baseline{
  background:#272D37!important;
  border:1px solid #46505B!important;
  color:var(--mbv3-high)!important;
}
html[data-mbv-theme="dark"] .mb37-result :is(span,small,strong){color:inherit!important}
html[data-mbv-theme="dark"] .mb37-shortcut :is(b,small),
html[data-mbv-theme="dark"] .mb37-heading :is(h2,b,strong),
html[data-mbv-theme="dark"] .mb37-controls :is(label,small),
html[data-mbv-theme="dark"] .mb37-table :is(th,td,summary),
html[data-mbv-theme="dark"] .mb37-hint {color:var(--mbv3-medium)!important}
html[data-mbv-theme="dark"] .mb37-shortcut b,
html[data-mbv-theme="dark"] .mb37-heading :is(h2,b,strong){color:var(--mbv3-high)!important}
html[data-mbv-theme="dark"] .mb37-shortcut-icon{background:#313F38!important;color:#D3FF98!important}
html[data-mbv-theme="dark"] .mb37-debt-chip.active{
  background:#C6FF3D!important;border-color:#C6FF3D!important;color:#151B0D!important;
}
html[data-mbv-theme="dark"] .mb37-savings{
  background:var(--mbv3-safe-bg)!important;border:1px solid var(--mbv3-safe-line)!important;
  color:var(--mbv3-safe-ink)!important;
}
html[data-mbv-theme="dark"] .mb37-notice{
  background:#29313A!important;border:1px solid #414D59!important;
  color:#DAE3EF!important;
}
html[data-mbv-theme="dark"] :is(.mb37-result-grid,.mb37-table,.mb37-controls) :is(input,select,textarea){
  background:#272C35!important;color:#F1F5FA!important;border-color:#4C5661!important;
}
html[data-mbv-theme="dark"] .mb37-table :is(th,td){border-color:var(--mbv3-stroke)!important}

/* Settings and older edge-case surfaces discovered in the desktop audit. */
html[data-mbv-theme="dark"] :is(
 .mb-push-status,.mb-test-scenarios,.mb36-forecast-notes .mb36-risk,
 .mb-review-integrity,.mb-review-integrity .mb-review-step,
 .mb-review-step,.mb37-all .mb37-notice,
 .mb-alert-row,.mb-settings-callout,.mb-agenda-item,
 .mb37-portfolio-results,.mb-test-card
){
  background:#242A33!important;
  border-color:var(--mbv3-stroke)!important;
  color:var(--mbv3-high)!important;
}
html[data-mbv-theme="dark"] .mb-push-status :is(p,small),
html[data-mbv-theme="dark"] .mb-test-scenarios :is(p,small,summary),
html[data-mbv-theme="dark"] .mb-review-step :is(p,small){color:var(--mbv3-medium)!important}
html[data-mbv-theme="dark"] .mb-test-scenarios summary{font-weight:700}
html[data-mbv-theme="dark"] .ux-account-type{
  background:#293B33!important;color:#D7F6DA!important;border:1px solid #496555!important;
}

/* Legacy badges that used white-on-white text when foreground inherited hero ink. */
html[data-mbv-theme="dark"] .mb36-forecast-notes .mb36-warnings p,
html[data-mbv-theme="dark"] .mb36-forecast-notes .mb36-warnings p :is(span,b,strong){
  color:var(--mbv3-warn-ink)!important;
}

@media(max-width:380px){
 html[data-mbv-theme="dark"] .mb36-stat-grid{grid-template-columns:1fr}
 html[data-mbv-theme="dark"] .mb36-stat strong{font-size:18px}
 html[data-mbv-theme="dark"] .mb36-horizon-tile{min-width:0}
}
@media(prefers-reduced-motion:reduce){
 html[data-mbv-theme="dark"] :is(.mb36-choice,.mb36-horizon-tile,.mb37-debt-chip){transition:none!important}
}
/* Secondary actions in Settings stay graphite instead of off-white in dark. */
html[data-mbv-theme="dark"] .mb-settings-content .btn:not(.accent):not(.danger):not(.ghost),
html[data-mbv-theme="dark"] .mb-settings-hub .btn:not(.accent):not(.danger):not(.ghost){
  background:#2B313A!important;color:#E9F1F9!important;
  border:1px solid #49545E!important;
}
/* Small-screen headline controls: allow a full-width CTA instead of overflow. */
@media(max-width:380px){
  .titleline{flex-wrap:wrap;align-items:flex-start}
  .titleline>div:first-child{min-width:0;flex:1 1 100%}
  .titleline>.btn{flex-shrink:1;max-width:100%;white-space:normal}
}
html[data-mbv-theme="dark"] .mb-settings-mainbuttons .btn:not(.ghost):not(.danger):not(.accent){
  background:#2B313A!important;color:#F0F5FA!important;border:1px solid #505A64!important;
}
/* ============================================================================
   MI BALANCE 3.9 / PREMIUM V4 — AUDITORÍA PROFUNDA DE SUPERFICIES Y CONTRASTE
   Solo presentación: se conserva el DOM, datos, movimientos, lógica y navegación.
   Scope estricto de tema oscuro; no se afecta la interfaz en modo claro.
   ============================================================================ */
html[data-mbv-theme="dark"] {
  --mbv4-card: #22262F;
  --mbv4-nested: #2B303A;
  --mbv4-subtle: #293139;
  --mbv4-edge: #414957;
  --mbv4-ink: #F5F7FB;
  --mbv4-caption: #C6D0DE;
  --mbv4-lime: #C6FF3D;
  --mbv4-positive-bg: #24372F;
  --mbv4-positive-ink: #DBF9E3;
  --mbv4-warning-bg: #392F25;
  --mbv4-warning-ink: #FFE0B8;
}

/* Pagos mensuales / recordatorios: todas las capas de una misma tarjeta oscuras. */
html[data-mbv-theme="dark"] .mb-bill-card {
  background: var(--mbv4-card)!important;
  border: 1px solid var(--mbv4-edge)!important;
  color:var(--mbv4-ink)!important;
  box-shadow: none!important;
}
html[data-mbv-theme="dark"] .mb-bill-names strong,
html[data-mbv-theme="dark"] .mb-bill-amount {
  color:var(--mbv4-ink)!important;
}
html[data-mbv-theme="dark"] .mb-bill-names span,
html[data-mbv-theme="dark"] .mb-bill-amount small,
html[data-mbv-theme="dark"] .mb-bill-source,
html[data-mbv-theme="dark"] .mb-bill-source b,
html[data-mbv-theme="dark"] .mb-bill-more p,
html[data-mbv-theme="dark"] .mb-bill-more>summary {
  color:var(--mbv4-caption)!important;
}
html[data-mbv-theme="dark"] .mb-bill-more {
  background:transparent!important;
  border-top:1px solid var(--mbv4-edge)!important;
  color:var(--mbv4-caption)!important;
}
html[data-mbv-theme="dark"] .mb-bill-state {
  background:#354038!important;
  color:#E0F8E1!important;
  border:1px solid #516458!important;
}
html[data-mbv-theme="dark"] .mb-bill-state.is-late {
  background:var(--mbv4-warning-bg)!important;
  color:var(--mbv4-warning-ink)!important;
  border-color:#6B5740!important;
}
html[data-mbv-theme="dark"] .mb-bill-state.is-paid {
  background:var(--mbv4-positive-bg)!important;
  color:var(--mbv4-positive-ink)!important;
  border-color:#45705B!important;
}

/* Prioridades: franja, tarjetas y campos que heredaban color menta con texto lavado. */
html[data-mbv-theme="dark"] .monthly-priority-card {
  background:var(--mbv4-card)!important;
  border-color:var(--mbv4-edge)!important;
  color:var(--mbv4-ink)!important;
}
html[data-mbv-theme="dark"] .monthly-priority-main strong,
html[data-mbv-theme="dark"] .priority-item>strong {
  color:var(--mbv4-ink)!important;
}
html[data-mbv-theme="dark"] .priority-hint,
html[data-mbv-theme="dark"] .priority-advice {
  background:var(--mbv4-subtle)!important;
  border:1px solid var(--mbv4-edge)!important;
  color:#D5DFEA!important;
}
html[data-mbv-theme="dark"] .priority-hint :is(b,strong,span),
html[data-mbv-theme="dark"] .priority-advice :is(b,strong,span) {
  color:inherit!important;
}
html[data-mbv-theme="dark"] .priority-month-row :is(input,select) {
  background:var(--mbv4-nested)!important;
  color:var(--mbv4-ink)!important;
  border-color:var(--mbv4-edge)!important;
}
html[data-mbv-theme="dark"] .monthly-priority-card .inline-note {
  color:var(--mbv4-caption)!important;
}

/* Resúmenes de metas, bolsillos, deuda y distribución: nivel secundario uniforme. */
html[data-mbv-theme="dark"] :is(
  .goal-split-status.negative, .goal-assign-hint, .goal-primary-note,
  .goal-pocket-summary, .simple-goal-overview, .simple-goal-preview,
  .simple-guidance, .goal-split, .goal-coach, .goal-pocket-item,
  .goal-split-row, .alloc-income-head, .alloc-overview,
  .alloc-details, .alloc-ai-details, .assign-context,
  .pocket-summary>div, .pocket-how-body,
  .priority-advice, .plan-detail[open] .row-sub,
  .mb34-profile-summary, .mb35-receipt-summary
) {
  background:var(--mbv4-subtle)!important;
  border-color:var(--mbv4-edge)!important;
  color:var(--mbv4-ink)!important;
  box-shadow:none!important;
}
html[data-mbv-theme="dark"] :is(
  .goal-split-status.negative,.goal-assign-hint,.goal-pocket-summary,
  .simple-goal-overview,.simple-goal-preview,.simple-guidance,
  .goal-split,.goal-pocket-item,.goal-split-row,.alloc-income-head,
  .alloc-overview,.alloc-details,.alloc-ai-details,.assign-context
) :is(p,small,span,li) {
  color:var(--mbv4-caption)!important;
}
html[data-mbv-theme="dark"] :is(
  .goal-split-status.negative,.goal-assign-hint,.goal-pocket-summary,
  .simple-goal-overview,.simple-goal-preview,.simple-guidance,
  .goal-split,.goal-pocket-item,.goal-split-row,.alloc-income-head,
  .alloc-overview,.alloc-details,.alloc-ai-details,.assign-context
) :is(strong,b,h2,h3) {
  color:var(--mbv4-ink)!important;
}

/* Avisos, estados vacíos, inventario, negocios y pruebas de recuperación. */
html[data-mbv-theme="dark"] :is(
  .mb-stock-compare, .mb-impact-preview, .mb-impact-preview-highlight,
  #form-product .mb-impact-preview, #form-stock-adjust .mb-impact-preview,
  .mb35-status, .mb35-receipt-summary, .mb34-profile-summary,
  .mb-biz-kpis>div, .mb-biz-overview-grid>div,
  .ux-inv-current, .ux-inv-stats>div, .ux-inv-move-preview,
  .ux-advisor-severity, .mb-agenda-content>.inline-note,
  .mb-agenda-summary-icon, .mb-agenda-chip, .mb-alert-empty,
  .mb-alert-tabs button, .mb-alert-counter, .mb-alert-days select,
  .mb-settings-callout, .mb-impact-preview, .mb-form-save-status,
  .mb-review-num, .mb-guide-steps>div, .mb-guide-note,
  .mb-learn-option, .mb-learn-assurance, .mb-practice-stats>div,
  .mb-learn-tip, .mb-learn-explain-example, .mb-form-steps span,
  .mb-form-summary, .mb-alloc-check, .mb-mini-guide,
  .mb-ux-guidance, .mb38-data-preview, .mb38-ai-explain,
  .mb36-forecast-detail, .mb-test-scenarios, .mb39-safety-status
) {
  background:var(--mbv4-subtle)!important;
  border-color:var(--mbv4-edge)!important;
  color:var(--mbv4-ink)!important;
}
html[data-mbv-theme="dark"] :is(
  .mb-stock-compare, .mb-impact-preview, .mb-biz-kpis>div,
  .mb-biz-overview-grid>div, .mb-agenda-content>.inline-note,
  .mb-alert-empty, .mb-settings-callout, .mb-form-summary,
  .mb38-data-preview, .mb39-safety-status
) :is(p,small,span,li) {color:var(--mbv4-caption)!important;}
html[data-mbv-theme="dark"] :is(
  .mb-stock-compare, .mb-impact-preview, .mb-biz-kpis>div,
  .mb-biz-overview-grid>div, .mb-settings-callout,
  .mb-form-summary,.mb39-safety-status
) :is(b,strong,h2,h3){color:var(--mbv4-ink)!important;}

/* No olvidar variantes: avisos requieren distinción semántica sin fondo blanco. */
html[data-mbv-theme="dark"] :is(
  .mb-impact-warning, .mb-form-save-status-warning,
  .mb-alloc-check.mb-alloc-error, .mb-alert-row.mb-alert-important,
  .mb-push-status[data-state="error"], .mb35-status.late,
  .topwarn,.callout.warn
) {
  background:var(--mbv4-warning-bg)!important;
  color:var(--mbv4-warning-ink)!important;
  border:1px solid #705B43!important;
}
html[data-mbv-theme="dark"] :is(
  .mb-impact-warning, .mb-form-save-status-warning,
  .mb-alloc-check.mb-alloc-error, .mb-alert-row.mb-alert-important,
  .mb-push-status[data-state="error"], .mb35-status.late,
  .topwarn,.callout.warn
) :is(p,span,small,b,strong){color:inherit!important;}

/* Diálogos y campos: nunca se mezclan paneles pastel con texto blanco. */
html[data-mbv-theme="dark"] :is(
  .mb-confirm-sheet, .mb-tour-panel, .mb-movement-choice,
  .mb-form-more,.mb-guide-note, .mb-impact-preview,
  .ux-advisor-prompts button, .ux-advisor-log, .mb-form-steps span
) {
  background:var(--mbv4-card)!important;
  border-color:var(--mbv4-edge)!important;
  color:var(--mbv4-ink)!important;
}
html[data-mbv-theme="dark"] :is(
  .mb34-rate input,.mb34-rate select,.mb34-month-picker input,
  .mb-alert-days select,.priority-month-row input,.chat-form input,
  .ux-advisor-input input,.alloc-row input,.mb-practice-stage input,
  .field input,.field select,.field textarea
) {
  background:var(--mbv4-nested)!important;
  border-color:#596371!important;
  color:var(--mbv4-ink)!important;
}
html[data-mbv-theme="dark"] :is(.mb-bill-card,.monthly-priority-card,.mb-confirm-sheet,.mb-tour-panel) .btn:not(.accent):not(.danger):not(.primary) {
  border-color:#4B5563;
}

/* No alteramos CTA lima, gráficos lavanda, píldoras de estado o el modo claro. */
@media (prefers-reduced-motion:reduce) {
  html[data-mbv-theme="dark"] .mb-bill-card, html[data-mbv-theme="dark"] .monthly-priority-card {transition:none!important;}
}

/* V4 / segundo barrido de contraste (vistas con datos, no solo pantallas vacías). */
html[data-mbv-theme="dark"] .mb-alert-home-link {background:#29372E!important;color:#E5F9D8!important;border:1px solid #536947!important}
html[data-mbv-theme="dark"] .mb-alert-home-link :is(span,b,strong,svg){color:inherit!important}
html[data-mbv-theme="dark"] .goal-card-more>summary,
html[data-mbv-theme="dark"] .ux-inv-explain summary{color:#D5E5F2!important}
html[data-mbv-theme="dark"] .ux-inv-overview-grid :is(b,strong),
html[data-mbv-theme="dark"] .ux-inv-stats :is(b,strong),
html[data-mbv-theme="dark"] .ux-inv-current strong{color:#F5F8FD!important}
html[data-mbv-theme="dark"] .ux-inv-stats span,
html[data-mbv-theme="dark"] .ux-inv-current span,
html[data-mbv-theme="dark"] .ux-inv-caveat,
html[data-mbv-theme="dark"] .ux-inv-explain p,
html[data-mbv-theme="dark"] .ux-inv-next p {color:#C9D5E1!important}
html[data-mbv-theme="dark"] .mb37-heading span,
html[data-mbv-theme="dark"] .mb-alert-date{color:#C6D0DE!important}
html[data-mbv-theme="dark"] .mb-alert-row p,
html[data-mbv-theme="dark"] .mb-alert-category{color:#D3DEE7!important}
html[data-mbv-theme="dark"] .mb-review-count{background:#304034!important;border:1px solid #526D56!important;color:#E3F6DD!important}
html[data-mbv-theme="dark"] .ux-inv-explain-line :is(b,strong){color:#F1F6FA!important}
html[data-mbv-theme="dark"] .ux-inv-explain-line :is(span,small){color:#C7D1DC!important}


/* ==============================================================
   MI BALANCE PREMIUM V4.1 — MÁS HERRAMIENTAS / DARK MODE
   Exclusively visual; the existing controls, routes and behavior stay intact.
   =============================================================== */
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link{
  background:#2C3039!important;
  border:1px solid #515866!important;
  color:#F5F8FD!important;
  box-shadow:0 3px 12px rgba(0,0,0,.19), inset 0 1px 0 rgba(255,255,255,.045)!important;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link:hover,
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link:focus-visible{
  background:#353B46!important;
  border-color:#91A66F!important;
  box-shadow:0 5px 17px rgba(0,0,0,.24),inset 0 1px 0 rgba(220,255,170,.07)!important;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link:active{
  background:#394333!important;transform:translateY(1px)
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link.selected{
  background:#313C35!important;border-color:#9ABA62!important;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link .mb-more-ic{
  background:#3A493C!important;
  color:#D3FF97!important;
  border:1px solid #647C5C!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link .mb-more-ic svg{
  color:#D3FF97!important;stroke:currentColor!important;
  stroke-width:2.05;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link .mb-more-desc strong{
  color:#FFFFFF!important;font-weight:760;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link .mb-more-desc small{
  color:#D3DAE5!important;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link > svg:last-child{
  flex:0 0 32px;
  width:32px!important;height:32px!important;
  padding:7px;box-sizing:border-box;
  border-radius:10px;
  background:#424954;
  color:#F0F6FD!important;
  stroke:currentColor!important;stroke-width:2.4;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-guide{
  min-height:62px;
  background:#303C30!important;
  border:1px solid #6F8B58!important;
  color:#F5FBEF!important;
  font-size:14px;font-weight:760;
  box-shadow:0 3px 13px rgba(0,0,0,.18),inset 0 1px 0 rgba(216,255,150,.065)!important;
  transition:background-color .16s ease,border-color .16s ease;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-guide:hover,
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-guide:focus-visible{
  background:#3A4938!important;border-color:#B6D97A!important;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-guide > svg{
  color:#C9FF73!important;stroke:currentColor!important;flex-shrink:0;
}
html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-guide > svg:last-child{
  margin-left:auto;width:20px!important;height:20px!important;stroke-width:2.4;
}
html[data-mbv-theme="dark"] .mb-more-sheet :is(.mb-more-guide,.mb-more-link):focus-visible{
  outline:3px solid #C6FF3D!important;outline-offset:3px!important;
}
@media (prefers-reduced-motion:reduce){
  html[data-mbv-theme="dark"] .mb-more-sheet :is(.mb-more-link,.mb-more-guide){transition:none!important;transform:none!important}
}

/* iPhone/touch: prevent sticky :hover from highlighting the guide when
   the bottom-right Más tab has just been tapped. */
@media (hover:none){
  html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-link:hover:not(:focus-visible):not(.selected){
    background:#2C3039!important;border-color:#515866!important;
    box-shadow:0 3px 12px rgba(0,0,0,.19),inset 0 1px 0 rgba(255,255,255,.045)!important;
  }
  html[data-mbv-theme="dark"] .mb-more-sheet .mb-more-guide:hover:not(:focus-visible){
    background:#303C30!important;border-color:#6F8B58!important;
  }
}


/* V4.2 Multiplataforma — adaptación de tablet, escritorio y guía de instalación.
   Únicamente presentación: no modifica los cálculos ni el almacenamiento. */
.mb-platform-install{margin:14px 0 22px;padding:19px;border:1px solid var(--skin-edge);border-radius:21px;background:var(--skin-panel);color:var(--skin-text);box-shadow:var(--skin-depth)}
.mb-platform-install h3{font-size:17px;line-height:1.3;margin:0 0 7px;color:var(--skin-text)}
.mb-platform-install p{font-size:13px;line-height:1.55;color:var(--skin-sub);margin:6px 0 10px}
.mb-platform-install .mb-platform-help{margin:12px 0 0;padding:13px 14px;background:var(--skin-alt);border:1px solid var(--skin-edge);border-radius:13px;font-size:13px;line-height:1.65;color:var(--skin-text)}
.mb-platform-install .mb-platform-help strong{color:var(--skin-text)}
.mb-platform-install .mb-platform-help ol{margin:8px 0 0;padding-left:20px}
.mb-platform-install .mb-platform-help li{padding:3px 0}
.mb-platform-install .mb-platform-privacy{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--skin-sub)}
.mb-platform-install .mb-platform-install-button{display:none;margin-top:12px;width:100%;min-height:48px;background:var(--skin-lime);color:#14180f;border:0;border-radius:13px;font-size:15px;font-weight:800;cursor:pointer}
.mb-platform-install .mb-platform-install-button[data-available="true"]{display:block}
.mb-platform-install .mb-platform-install-button:focus-visible{outline:3px solid var(--skin-lime);outline-offset:3px}
/* En tablets en vertical y portátiles angostos, cinco destinos abajo:
   evita que una barra lateral de 228 px reduzca el contenido financiero. */
@media (min-width:760px) and (max-width:900px){
 .app-shell{display:block;max-width:820px;min-height:100dvh;margin:0 auto}
 .app-shell>#app{display:block;grid-column:auto;width:100%;min-width:0}
 .page{padding:0 26px calc(110px + env(safe-area-inset-bottom));min-height:100dvh}
 .bottom-nav{position:fixed;left:0;right:0;top:auto;bottom:0;width:100%;height:calc(76px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;padding:7px 14px calc(7px + env(safe-area-inset-bottom));border-top:1px solid var(--skin-edge);border-right:0;background:var(--skin-panel);box-shadow:0 -8px 30px rgba(12,15,22,.075)}
 .nav-btn{display:flex;flex-direction:column;gap:5px;justify-content:center;min-height:54px;padding:5px 3px;font-size:12px;border-radius:12px;color:var(--skin-sub)}
 .nav-btn span{font-size:12px}
 .nav-btn.active{background:transparent;color:var(--skin-text)}
 .nav-btn.active svg{background:var(--skin-lime);color:#182015}
 html[data-mbv-theme="dark"] .bottom-nav{background:rgba(22,24,30,.97)}
 .mb-more-sheet{max-width:700px}
}
/* Dispositivos Android compactos y pantallas con recorte: área útil segura. */
@media(max-width:759px){
 .bottom-nav{padding-left:max(5px,env(safe-area-inset-left));padding-right:max(5px,env(safe-area-inset-right))}
 .page{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
}
/* En portátiles bajos, el menú lateral sigue accesible por scroll. */
@media (min-width:901px) and (max-height:650px){
 .bottom-nav{overflow-y:auto;overscroll-behavior:contain;padding-top:68px;gap:2px}
 .bottom-nav .nav-btn{min-height:46px}
}
@media(prefers-reduced-motion:reduce){.mb-platform-install *{transition:none!important}}
/* Encabezado Android de 412-560 px: priorizar acciones sobre chip de fecha. */
@media(max-width:560px){.topbar .date-chip{display:none}}


/* V4.2 — PWA update banner aligned with premium light/dark themes */
#mb-pwa-update-banner{
  width:min(460px,calc(100vw - 24px));
  padding:18px 18px 16px;
  border-radius:24px;
  border:1px solid #DDE3EA;
  background:rgba(255,255,255,.98);
  color:#17202A;
  box-shadow:0 22px 60px rgba(13,19,30,.18);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
#mb-pwa-update-banner strong{font-size:15px;font-weight:850;letter-spacing:-.02em;color:#17202A}
#mb-pwa-update-banner p{margin:10px 0 14px;font-size:14px;line-height:1.45;color:#627081}
#mb-pwa-update-banner>div{display:flex;gap:12px;flex-wrap:wrap}
#mb-pwa-update-banner button{
  min-height:48px;
  padding:12px 20px;
  border-radius:16px;
  font-size:15px;
  font-weight:800;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
#mb-pwa-update-banner .mb-pwa-update-now{
  border:1px solid #C6FF3D;
  background:#C6FF3D;
  color:#13180F;
  box-shadow:0 8px 22px rgba(198,255,61,.18);
}
#mb-pwa-update-banner .mb-pwa-update-later{
  border:1px solid #CCD4DE;
  background:#FFFFFF;
  color:#283544;
}
#mb-pwa-update-banner button:hover{transform:translateY(-1px)}
#mb-pwa-update-banner .mb-pwa-update-now:hover{box-shadow:0 10px 26px rgba(198,255,61,.24)}
#mb-pwa-update-banner .mb-pwa-update-later:hover{background:#F5F7FA;border-color:#BEC8D5}
#mb-pwa-update-banner button:focus-visible{outline:3px solid rgba(198,255,61,.48);outline-offset:2px}
#mb-pwa-update-banner button:disabled{opacity:1;cursor:wait}
#mb-pwa-update-banner .mb-pwa-update-now:disabled{background:#9EBE54;border-color:#9EBE54;color:#1B2018;box-shadow:none}
#mb-pwa-update-banner .mb-pwa-update-later:disabled{background:#EEF2F6;border-color:#D6DEE7;color:#7B8795}
html[data-mbv-theme="dark"] #mb-pwa-update-banner{
  border-color:#323845;
  background:rgba(24,28,34,.98);
  color:#F5F8FD;
  box-shadow:0 26px 72px rgba(0,0,0,.45);
}
html[data-mbv-theme="dark"] #mb-pwa-update-banner strong{color:#F7FAFE}
html[data-mbv-theme="dark"] #mb-pwa-update-banner p{color:#C4CFDB}
html[data-mbv-theme="dark"] #mb-pwa-update-banner .mb-pwa-update-now{
  border-color:#C6FF3D;
  background:#C6FF3D;
  color:#11160E;
  box-shadow:0 12px 28px rgba(198,255,61,.16);
}
html[data-mbv-theme="dark"] #mb-pwa-update-banner .mb-pwa-update-later{
  border-color:#394150;
  background:#232934;
  color:#EEF3FA;
}
html[data-mbv-theme="dark"] #mb-pwa-update-banner .mb-pwa-update-later:hover{background:#2A3140;border-color:#4B5566}
@media (max-width:480px){
  #mb-pwa-update-banner{padding:16px 16px 15px;border-radius:22px}
  #mb-pwa-update-banner>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  #mb-pwa-update-banner button{width:100%;padding-inline:12px}
}
