
/* FINCU V14.6 · Navegación en contexto, no panel completo de Ajustes */
#inversionesView .investment-budget-panel{gap:12px;grid-template-columns:minmax(0,0.72fr) minmax(0,1.28fr)}
#inversionesView .investment-reserve-card,#inversionesView .investment-surplus-card{padding:16px!important;min-height:0!important}
#inversionesView .investment-budget-number{font-size:clamp(23px,3vw,30px);margin:5px 0 8px}
#inversionesView .investment-source-breakdown{gap:8px;margin-top:7px}
#inversionesView .investment-source-card{padding:10px}
#inversionesView .investment-source-money{font-size:21px;margin:5px 0}
#inversionesView .investment-surplus-total{margin-top:10px;padding-top:10px}
#inversionesView .investment-kpis{margin-top:10px;gap:8px}
#inversionesView .investment-summary-card{padding:13px!important}
#inversionesView .investment-pro-panel{margin-top:13px;padding:18px!important}
#inversionesView .investment-budget-notice{font-size:12px;margin:8px 0}
#inversionesView .projection-group-fields{display:none}
#inversionesView .projection-category-box:has(#projectionCategories){display:none!important}
#inversionesView .investment-panel{padding:14px!important;margin-top:12px}
#inversionesView .investment-list{max-height:200px;overflow:auto}
#inversionesView .projection-group-grid{gap:10px}
#inversionesView .projection-group-card{padding:14px}
.ux-two-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0}
.ux-invest-card{border:1px solid var(--line);background:var(--card);border-radius:18px;padding:18px;min-width:0}
.ux-invest-top{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:8px}
.ux-invest-top h3{font-size:18px;margin:0}
.ux-invest-card p{margin:6px 0 12px;font-size:13px;color:var(--muted);line-height:1.55}
.ux-empty{padding:15px;border:1px dashed var(--line);border-radius:12px;line-height:1.6;font-size:13px;color:var(--muted);background:var(--soft)}
.ux-instrument{padding:12px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ux-instrument strong{font-size:15px}
.ux-muted{font-size:12px;color:var(--muted);line-height:1.6}
.ux-yield-line{font-size:12px;line-height:1.65;color:var(--muted);margin-top:4px}
.ux-actions{display:flex;flex-wrap:wrap;gap:6px;flex-shrink:0;justify-content:flex-end}
.ux-actions .btn{padding:7px 9px!important;font-size:12px!important;border-radius:12px!important}
.ux-help{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;border:1px solid var(--line);border-radius:50%;height:19px;width:19px;cursor:pointer;background:var(--soft);font-size:12px;font-weight:800;color:var(--text)}
.ux-plus{display:inline-flex;align-items:center;justify-content:center;font-weight:900;border:1px solid var(--line);background:var(--soft);color:var(--text);border-radius:10px;height:29px;width:29px;margin-left:8px;cursor:pointer;vertical-align:middle}
.ux-plus:hover,.ux-help:hover{border-color:var(--accent)}
.ux-weighted{font-size:12px;color:var(--text);border-top:1px solid var(--line);padding-top:10px;margin-top:6px;font-weight:700}
.ux-portfolio-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);background:var(--soft);border-radius:14px;padding:12px 16px;margin-bottom:10px}
.ux-portfolio-meta strong{font-size:20px}
.ux-guide{font-size:13px;line-height:1.7;color:var(--muted)}
.ux-guide p{margin:3px 0 10px}
.ux-sim-overview{padding:12px 14px;border-radius:12px;background:var(--soft);margin:14px 0;font-size:13px}
.ux-right{text-align:right}
.ux-period{background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:14px}
.ux-overlay{z-index:4200}
.ux-overlay .modal{max-height:91vh;overflow-y:auto}
.ux-overlay .modal.ux-wide{width:min(740px,98vw)}
.ux-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.ux-form-grid .field{min-width:0}
.ux-explain{color:var(--muted);line-height:1.7;font-size:13px;margin:6px 0 16px}
#uxProtection{margin:16px 0;border:1px solid var(--line);border-radius:14px;padding:16px;background:var(--soft);font-size:13px;line-height:1.65}
#uxProtection p{margin:10px 0}
#uxProtection a{text-decoration:underline;color:var(--accent)}
#uxHistoric{font-size:12px;padding-bottom:8px}
#uxHistoric summary{cursor:pointer;color:var(--muted)}
@media(max-width:950px){.ux-two-cards{grid-template-columns:1fr}.ux-instrument{flex-wrap:wrap}.ux-actions{justify-content:flex-start}#inversionesView .investment-budget-panel{grid-template-columns:1fr}}
@media(max-width:580px){.ux-form-grid{grid-template-columns:1fr}.ux-invest-card{padding:13px}.ux-portfolio-meta{align-items:flex-start}.ux-actions{width:100%}}

#modalUxAyuda.ux-overlay{z-index:4500}
#inversionesView #ahorroInversionLista{display:none}


/* FINCU V14.6.2 · Limpieza de duplicados, listas compactas y conciliación */
#inversionesView .investment-surplus-total.hidden,
#inversionesView .ux-portfolio-meta.hidden,
#inversionesView .projection-group-grid,
#inversionesView .investment-panel,
#inversionesView #projectionInstrumentBreakdown,
#inversionesView .projection-category-box.hidden {display:none!important}
#inversionesView .ux-recording-note {
  margin:10px 0 12px;padding:10px 13px;
  border:1px solid var(--line);border-radius:12px;
  color:var(--text);background:var(--soft);
  line-height:1.5;font-size:12px;
}
#inversionesView .ux-recording-note strong{font-weight:800}
#inversionesView .investment-kpis.ux-valuation-kpis{margin-top:16px;gap:9px}
#inversionesView .ux-valuation-kpis .investment-summary-card{padding:13px}
#inversionesView .ux-valuation-panel{padding:17px!important}
#inversionesView .ux-valuation-row{gap:12px;align-items:center}
#inversionesView .ux-value-caption{flex:1;min-width:190px}
#inversionesView .ux-value-delta{display:block;margin-top:5px;font-size:12px}
#inversionesView .ux-gain{color:var(--green)!important}
#inversionesView .ux-loss{color:#fa757b!important}
#inversionesView .ux-valuation-entry{display:flex;align-items:flex-end;flex-wrap:wrap}
#inversionesView .ux-value-label{font-size:12px;color:var(--muted);width:100%}
#inversionesView .ux-instrument-compact{padding:11px 0;align-items:center}
#inversionesView .ux-instrument-main{min-width:0;flex:1}
#inversionesView .ux-inst-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:4px}
#inversionesView .ux-inst-title strong{font-size:15px}
#inversionesView .ux-inst-rate{font-size:12px;font-weight:700;color:var(--text)}
#inversionesView .ux-inst-finance{display:flex;gap:14px;align-items:baseline;flex-wrap:wrap;font-size:12px;color:var(--muted)}
#inversionesView .ux-inst-finance span{display:inline-flex;gap:6px;align-items:baseline}
#inversionesView .ux-green{font-size:16px;font-weight:800;color:var(--green)}
#inversionesView .ux-yield-line{font-size:11px;line-height:1.4;margin:3px 0;color:var(--muted)}
#inversionesView .ux-actions .btn{padding:6px 9px!important;font-size:11px!important}
#inversionesView .ux-two-cards{gap:12px}
#inversionesView .ux-invest-card{padding:14px}
#inversionesView .ux-details{padding:13px 16px;margin-top:11px}
#inversionesView .ux-details summary{cursor:pointer;font-weight:750;font-size:14px;list-style-position:outside}
#inversionesView .ux-details[open] summary{margin-bottom:11px}
#inversionesView .ux-advice{font-size:11px;color:var(--muted);line-height:1.55;margin:6px 0}
#inversionesView .ux-advice summary{cursor:pointer;color:var(--text)}
#inversionesView .ux-advice p{font-size:11px;margin:5px 0 8px}
#inversionesView .ux-history-line{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}
#inversionesView .ux-history-line:last-child{border-bottom:0}
#inversionesView .ux-projection-details{border:1px solid var(--line);border-radius:12px;background:var(--soft);margin:12px 0}
@media(max-width:780px){
  #inversionesView .ux-instrument-compact{align-items:flex-start;flex-direction:column}
  #inversionesView .ux-actions{justify-content:flex-start;width:100%}
  #inversionesView .ux-valuation-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #inversionesView .ux-valuation-kpis .investment-summary-value{font-size:17px}
}
@media(max-width:520px){
  #inversionesView .ux-valuation-kpis{grid-template-columns:1fr}
  #inversionesView .valuation-entry{width:100%}
}


/* FINCU V14.6.3 · Intereses confirmados una vez y correcciones opcionales */
#inversionesView .ux-header-tip{height:30px;width:30px;flex:0 0 30px}
#inversionesView .ux-value-fixed{display:flex;flex-direction:column;align-items:flex-end;min-width:205px;gap:5px}
#inversionesView .ux-value-fixed-amount{display:flex;align-items:flex-end;gap:6px;flex-direction:column}
#inversionesView .ux-value-fixed-amount b{font-size:20px;color:var(--text);font-variant-numeric:tabular-nums}
#inversionesView .ux-value-correction{font-size:12px;color:var(--muted);max-width:320px}
#inversionesView .ux-value-correction summary{cursor:pointer;color:var(--text);font-size:12px}
#inversionesView .ux-value-correction[open]{background:var(--soft);padding:9px;border-radius:10px}
#inversionesView .ux-value-correction-input{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0}
#inversionesView .ux-value-correction-input input{min-width:90px;max-width:150px}
.ux-reconciliation-info{font-size:12px;line-height:1.6;color:var(--muted);padding:10px 13px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
@media(max-width:720px){
 #inversionesView .ux-value-fixed{align-items:flex-start;width:100%}
 #inversionesView .ux-value-fixed-amount{align-items:flex-start}
}


/* FINCU V14.6.4 · Tarjetas apilables en web, móvil y PWA.
   Aplicar sticky solo tras comprobar la altura de cada tarjeta en JS. */
.fincu-stack-group{position:relative;isolation:isolate;align-items:start;padding-bottom:44px}
.fincu-stack-group>.fincu-stack-card{
 position:sticky!important;
 top:var(--fincu-stack-top,18px)!important;
 z-index:var(--fincu-stack-z,15)!important;
 transform-origin:50% 0;
 transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;
 box-shadow:0 10px 22px rgba(0,0,0,.10),0 0 0 1px color-mix(in srgb,var(--line) 65%,transparent);
}
.fincu-stack-group>.fincu-stack-card.fincu-stack-stuck{
 transform:scale(calc(1 - var(--fincu-stack-depth,0)*.007))!important;
 box-shadow:0 16px 32px rgba(0,0,0,.18),0 0 0 1px color-mix(in srgb,var(--line) 80%,transparent);
}
.fincu-stack-group>.fincu-stack-card:focus-within{
 box-shadow:0 15px 35px rgba(0,0,0,.20),0 0 0 2px var(--accent,#3b82f6);
}
#homeView .hub-grid.fincu-stack-group{row-gap:15px;column-gap:13px}
#homeView .hub-grid.fincu-stack-group .hub-card{min-width:0}
@media(max-width:820px){
  /* Desactivar regla móvil antigua (6 tarjetas) para evitar doble apilamiento. */
  #homeView .hub-grid .hub-card{position:relative!important;top:auto!important;z-index:auto!important}
  #homeView .hub-grid.fincu-stack-group .hub-card.fincu-stack-card{
    position:sticky!important;
    top:var(--fincu-stack-top,18px)!important;
    z-index:var(--fincu-stack-z,15)!important;
  }
  #homeView .hub-grid.fincu-stack-group{padding-bottom:80px}
  #inversionesView .investment-budget-panel.fincu-stack-group,
  #inversionesView .ux-two-cards.fincu-stack-group,
  #ahorroView .savings-custody-grid.fincu-stack-group{
    padding-bottom:42px;
  }
}
@media(prefers-reduced-motion:reduce){
  .fincu-stack-group>.fincu-stack-card{
    position:relative!important;top:auto!important;transform:none!important;
    transition:none!important;box-shadow:inherit!important;
  }
}


/* Inversiones: instrumentos apilables aun cuando la lista cambia en tiempo real. */
#fincuFixedList.fincu-stack-group,
#fincuVariableList.fincu-stack-group{padding-bottom:32px}
#fincuFixedList.fincu-stack-group>.ux-instrument.fincu-stack-card,
#fincuVariableList.fincu-stack-group>.ux-instrument.fincu-stack-card{
  background:var(--card);border-radius:13px;
  outline:1px solid var(--line);
}
@supports (animation-timeline: view()){
 @media(prefers-reduced-motion:no-preference){
  #inversionesView.active>.panel:not(.fincu-stack-card),
  #ahorroView.active>.savings-hero,
  #gastosView.active>.panel{
    animation:fincu-enter-card linear both;
    animation-timeline:view(block);
    animation-range:entry 0% entry 75%;
  }
  @keyframes fincu-enter-card{
    from{transform:translateY(10px) scale(.995)}
    to{transform:translateY(0) scale(1)}
  }
 }
}


/* FINCU V14.6.5 · FIX VERIFICADO EN CHROME ANDROID.
 * La regla heredada html,body{overflow-x:hidden} convertía body en un
 * contenedor de scroll que no se desplaza y desactivaba position:sticky.
 * overflow-x:clip recorta horizontalmente sin crear un nuevo scrollport.
 * En prueba móvil (390x844): con hidden las tarjetas salen por arriba,
 * con clip las tarjetas previas permanecen en top:18px y se superponen.
 */
@supports (overflow-x:clip){
  html,body{overflow-x:clip!important}
}
/* Las cuentas bancarias también son tarjetas del mazo. */
#cuentasGrid.fincu-stack-group{
  padding-bottom:56px;
  align-items:start;
}
#cuentasGrid.fincu-stack-group>.account-card.fincu-stack-card{
  background:var(--card);
  border-radius:17px;
  border:1px solid var(--line);
}
@media(max-width:720px) and (prefers-reduced-motion:no-preference){
  /* En Inicio hay respaldo CSS, incluso si el script de capas no se carga. */
  #homeView .hub-grid{
    position:relative;
    isolation:isolate;
    display:block;
    padding-bottom:100px;
  }
  #homeView .hub-grid>.hub-card{
    position:sticky!important;
    top:18px!important;
    min-height:118px;
    margin-bottom:15px;
  }
  #homeView .hub-grid>.hub-card:nth-child(1){top:18px!important;z-index:11!important}
  #homeView .hub-grid>.hub-card:nth-child(2){top:29px!important;z-index:12!important}
  #homeView .hub-grid>.hub-card:nth-child(3){top:40px!important;z-index:13!important}
  #homeView .hub-grid>.hub-card:nth-child(4){top:51px!important;z-index:14!important}
  #homeView .hub-grid>.hub-card:nth-child(5){top:62px!important;z-index:15!important}
  #homeView .hub-grid>.hub-card:nth-child(6){top:73px!important;z-index:16!important}
  #homeView .hub-grid>.hub-card:nth-child(7){top:84px!important;z-index:17!important}
}
@media(prefers-reduced-motion:reduce){
  #homeView .hub-grid>.hub-card{
    position:relative!important;
    top:auto!important;
    z-index:auto!important;
    transform:none!important;
  }
}


/* FINCU V14.6.6 · Deck de Inversiones en escritorio.
   Evita apilar dos columnas que comparten una sola fila, sin recorrido sticky. */
.fincu-investment-deck{display:block;max-width:100%;margin:0 auto}
@media(min-width:821px) and (prefers-reduced-motion:no-preference){
  #inversionesView .fincu-investment-deck{
    max-width:1320px;
    margin:0 auto 10px;
  }
  #inversionesView .fincu-investment-deck.fincu-desktop-deck-active{
    padding-bottom:clamp(80px,15vh,160px);
  }
  #inversionesView .fincu-investment-deck>.fincu-desktop-layer{
    width:100%;
    margin-left:auto;
    margin-right:auto;
    position:sticky!important;
    box-shadow:0 16px 38px rgba(0,0,0,.22);
  }
  #inversionesView .fincu-investment-deck>.investment-budget-panel.fincu-desktop-layer{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:20px;
    padding:10px;
    margin-bottom:16px;
  }
  #inversionesView .fincu-investment-deck>.ux-two-cards.fincu-desktop-layer{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:20px;
    padding:10px;
    margin-top:0;
    margin-bottom:16px;
  }
  #inversionesView .fincu-investment-deck>.ux-valuation-panel.fincu-desktop-layer{
    max-width:none!important;
    background:var(--card);
    border-radius:20px;
    margin-top:0;
  }
  #inversionesView .fincu-investment-deck>.fincu-desktop-layer:focus-within{
    z-index:120!important;
    box-shadow:0 12px 34px rgba(0,0,0,.20);
  }
  /* Los paneles de proyección e historial vuelven al scroll normal,
     pero a lo ancho coherente con la secuencia anterior. */
  #inversionesView>.panel.investment-pro-panel,
  #inversionesView>details.panel.investment-pro-panel{
    width:100%;
    max-width:1320px;
  }
  #homeView .hub-grid.fincu-stack-group{
    padding-bottom:clamp(140px,24vh,230px);
  }
}
@media(min-width:821px) and (prefers-reduced-motion:reduce){
  #inversionesView .fincu-investment-deck>.fincu-desktop-layer{
    position:relative!important;
    top:auto!important;
    transform:none!important;
  }
}


/* FINCU V14.6.7 · Dos tipos de cuenta, explicación clara y sobres legibles. */
#cuentaTipoAyuda.account-type-help{
  padding:10px 12px;
  margin:8px 0 0;
  border-left:3px solid var(--accent,#60a5fa);
  border-radius:8px;
  background:var(--soft,rgba(100,140,200,.06));
  color:var(--muted,#aebccd);
  font-size:13px;
  line-height:1.55;
}
/* El fondo seleccionado es casi blanco: su texto no puede heredar blanco. */
.sobres-list-panel .sobre-row-selected,
.sobres-list-panel .sobre-row-selected .row-title,
.sobres-list-panel .sobre-row-selected .row-meta,
.sobres-list-panel .sobre-row-selected .row-main{
  color:#132231!important;
  font-weight:750!important;
}
.sobres-list-panel .sobre-row-selected .amount,
.sobres-list-panel .sobre-row-selected .amount.neutral{
  color:#132231!important;
  font-weight:750!important;
}
.sobres-list-panel .sobre-row-selected .amount.positive{color:#066346!important;font-weight:750!important}
.sobres-list-panel .sobre-row-selected .amount.negative{color:#9c2639!important;font-weight:750!important}
.sobres-list-panel .sobre-row-selected{outline:1px solid rgba(14,61,92,.20);outline-offset:0}


/* FINCU V14.7.3: se restaura el apilamiento de tarjetas que existía antes de R3.
   La ventana emergente permanece en body, por encima de las tarjetas. */
/* El formulario se fija a la pantalla, por delante de las tarjetas y sus gráficos. */
#modalInstrumentoUx.modal-overlay.ux-overlay {
  position:fixed !important;
  inset:0 !important;
  z-index:2147483000 !important;
  align-items:center;
  justify-content:center;
  overflow:auto;
  padding:clamp(12px,3vh,24px);
}
#modalInstrumentoUx.modal-overlay.ux-overlay.show { display:flex !important; }
#modalInstrumentoUx > .modal {
  position:relative;
  z-index:1;
  max-height:min(92dvh,900px);
  overflow-y:auto;
  overscroll-behavior:contain;
  width:min(740px,100%);
  margin:auto;
}
body:has(#modalInstrumentoUx.show) { overflow:hidden !important; }
@media (max-width:640px) {
  #modalInstrumentoUx.modal-overlay.ux-overlay {padding:10px;}
  #modalInstrumentoUx > .modal {max-height:calc(100dvh - 20px);}
}

/* FINCU 14.7.4: controles compactos y ayuda a tasas por tramos */
.fincu74-instrument-advanced{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:9px 0;background:var(--soft)}
.fincu74-instrument-advanced>summary{cursor:pointer;font-weight:700;font-size:13px}
.fincu74-instrument-advanced>.ux-form-grid{margin-top:12px}
.fincu74-paid-checkbox{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.5;border:1px solid #b38b45;border-radius:11px;padding:12px;margin:12px 0;color:var(--text);background:rgba(190,148,76,.09)}
.fincu74-paid-checkbox input{width:18px;height:18px;flex:none;margin-top:2px}
#modalInstrumentoUx .modal{max-width:680px}
#inversionesView .ux-instrument-compact .ux-yield-line{font-size:11px;line-height:1.45}
#inversionesView .ux-instrument-compact .ux-actions .btn{font-size:11px;padding:8px 10px}


/* FINCU V14.13.4 · Inversiones apila cada tarjeta como Inicio en celular y tablet. */
@media(max-width:820px) and (prefers-reduced-motion:no-preference){
  .fincu-investment-deck.fincu-deck-flat>.ux-two-cards{display:contents}
  .fincu-investment-deck.fincu-deck-flat .ux-two-cards .fincu-stack-card{
    position:sticky!important;
    top:var(--fincu-stack-top,18px)!important;
    z-index:var(--fincu-stack-z,15)!important;
    background:var(--card);
    border:1px solid var(--line);
    border-radius:17px;
    margin-bottom:14px;
    transform-origin:50% 0;
    transition:transform .24s ease,box-shadow .24s ease;
    box-shadow:0 10px 22px rgba(0,0,0,.12);
  }
  .fincu-investment-deck.fincu-deck-flat .ux-two-cards .fincu-stack-card.fincu-stack-stuck{
    transform:scale(calc(1 - var(--fincu-stack-depth,0)*.007))!important;
  }
  .fincu-investment-deck.fincu-deck-flat{padding-bottom:60px}
}

/* V14.13.4: la proyección ocupa el mismo ancho que las demás tarjetas apiladas */
#inversionesView .fincu-investment-deck>.fincu-proy-panel{max-width:none!important;margin-left:0!important;margin-right:0!important}

/* V14.13.4: la proyección (alta, no pegajosa) debe pasar POR ENCIMA de las tarjetas ya apiladas y con fondo sólido */
#inversionesView .fincu-investment-deck>.fincu-proy-panel,
#inversionesView .fincu-investment-deck>.ux-valuation-panel{background-color:#151c23!important;background-image:linear-gradient(#151c23,#151c23)!important}
#inversionesView .fincu-investment-deck>.fincu-proy-panel:not(.fincu-stack-card){position:relative;z-index:40}
#inversionesView .fincu-investment-deck>.fincu-proy-panel.fincu-stack-card{z-index:40}

/* V14.13.4: tarjetas de Inicio con el fondo del hero «Mi dinero disponible y registrado» */
#homeView .hub-grid>.hub-card{background-color:var(--fincu-hero-bg,#0b1f31)!important;background-image:var(--fincu-hero-img,none)!important;border:1px solid var(--fincu-hero-border,rgba(255,255,255,.12))!important;color:#fff}
#homeView .hub-grid>.hub-card .hub-title,#homeView .hub-grid>.hub-card .hub-number{color:#fff!important}
#homeView .hub-grid>.hub-card .hub-sub{color:rgba(255,255,255,.72)!important}
#homeView .hub-grid>.hub-card span:not(.plan-chip):not(.hub-number){color:rgba(255,255,255,.78)!important}
.fincu172-panel:has(.fincu172-solo-cuentas){padding:0!important;background:none!important;border:0!important;box-shadow:none!important}

/* V14.13.4: tarjeta grande de Inicio más compacta */
#homeView .balance-card{padding:14px 16px!important;margin-bottom:14px!important}
#homeView .balance-card .balance-value{font-size:28px!important;margin-top:2px!important}
#homeView .balance-card .fincu12-det-hero{margin-top:4px!important}
#homeView .balance-card .fincu12-home-extra{margin-top:8px!important;padding-top:8px!important}
#homeView .balance-card .fincu12-home-grid{gap:6px!important}
#homeView .balance-card .fincu12-home-item{padding:8px 12px!important}
#homeView .balance-card .fincu12-home-item>summary{display:flex!important;align-items:center;gap:8px;list-style:none}
#homeView .balance-card .fincu12-home-item>summary::-webkit-details-marker{display:none}
#homeView .balance-card .fincu12-home-item>summary>span{flex:1;min-width:0}
#homeView .balance-card .fincu12-home-item>summary>strong{margin:0!important;font-size:18px!important;line-height:1.1}
#homeView .balance-card .fincu12-home-item>summary::after{content:'▾';font-size:11px;opacity:.65}
#homeView .balance-card .fincu12-home-item[open]>summary::after{content:'▴'}
#homeView .balance-card .fincu12-det-note{margin-top:6px!important}

/* V14.13.4: ajustes de diseño */
.savings-system-explainer>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px}
.savings-system-explainer>summary::-webkit-details-marker{display:none}
.savings-system-explainer>summary::after{content:'▾';margin-left:auto;opacity:.65}
.savings-system-explainer[open]>summary::after{content:'▴'}
.savings-system-explainer .savings-explainer-body{margin-top:8px}
.fincu172-solo-cuentas .fincu172-stat strong{color:var(--green)!important}
.hist-anteriores-body{display:grid;gap:8px;padding:8px 0 0}
.hist-anteriores>summary{opacity:.9}
.fincu12-edit-dist{margin:12px 0}

/* V14.13.4: Ahorro y fondos simplificado */
#fincuLocalizacion,#fincuSaldoDetalles{display:none!important}
#ahorroView .fincu-meta-mini{position:relative}
#ahorroView .fincu-edit-pen{position:absolute;top:8px;right:8px;width:34px;height:34px;padding:0;border-radius:10px;border:1px solid var(--line,#344054);background:rgba(255,255,255,.06);font-size:16px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
#ahorroView .fincu-meta-mini:has(.fincu-edit-pen) .fincu-meta-top strong{padding-right:40px}

/* V14.13.5: Inversiones no repite la información de Ahorro; el distintivo PRO va junto al «?» */
#fincuCarteraUnificada .fincu-cu-top,#fincuCarteraUnificada .fincu-cu-grid{display:none!important}
#inversionesView .fincu-inv-tiprow{display:flex;align-items:center;gap:10px;flex-basis:100%;margin-top:6px}
#fincuCarteraUnificada.fincu-sin-tools{display:none!important}
#fincuCarteraUnificada .fincu-cu-details{display:none!important}

/* V14.13.5: modo claro: fondo blanco; tarjetas principales con el color del tema; textos legibles */
html[data-theme="light"] body{background:#fff!important}
html[data-theme="light"] .home-account-pill,html[data-theme="light"] .home-account-pill *:not(.bank-logo):not(.bank-logo *){color:#0f172a!important}
#inversionesView .fincu-fondos-mini{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;flex-basis:100%;width:100%;margin-top:8px;font-size:12px}
#inversionesView .fincu-fm-col{display:grid;gap:4px;align-content:start;min-width:0}
#inversionesView .fincu-fm-row{display:flex;flex-direction:column;gap:1px;min-width:0}
#inversionesView .fincu-fm-row span{opacity:.72;font-size:11px;line-height:1.2}
#inversionesView .fincu-fm-row b{font-size:14px;font-weight:600}
html[data-theme="light"] #homeView .hub-grid>.hub-card .home-account-pill span:not(.bank-logo){color:#0f172a!important}
html[data-theme="light"] .prorrateo-warning{color:#92400e!important}

/* V14.13.5: tarjeta principal de Inicio: gradiente 115° por tema (Marine Blue conserva el tono original) */
html[data-palette="revolut"] #homeView .balance-card{background:linear-gradient(115deg,#102940 0%,#0d365c 51%,#091723 100%)!important}
html[data-palette="emerald"] #homeView .balance-card{background:linear-gradient(115deg,#0b2f25 0%,#0b5a44 51%,#07201a 100%)!important}
html[data-palette="ivory"] #homeView .balance-card{background:linear-gradient(115deg,#2c2518 0%,#4a3b22 51%,#1e1810 100%)!important}
html[data-palette="graphite"] #homeView .balance-card{background:linear-gradient(115deg,#1f242b 0%,#343b45 51%,#15181d 100%)!important}
html[data-palette="burgundy"] #homeView .balance-card{background:linear-gradient(115deg,#3a1522 0%,#6a2339 51%,#26101a 100%)!important}
html[data-palette="purple"] #homeView .balance-card{background:linear-gradient(115deg,#1c0f33 0%,#3d2468 51%,#120a22 100%)!important}

/* V14.13.5: modo claro: fondo blanco y tarjetas con un tinte sutil del tema */
html[data-theme="light"][data-palette="revolut"]{--tint:#eef5fd;--tint-line:#cfe0f2}
html[data-theme="light"][data-palette="emerald"]{--tint:#ecf7f1;--tint-line:#c9e4d7}
html[data-theme="light"][data-palette="ivory"]{--tint:#faf5e8;--tint-line:#e6d8b6}
html[data-theme="light"][data-palette="graphite"]{--tint:#f0f2f5;--tint-line:#d3d8de}
html[data-theme="light"][data-palette="burgundy"]{--tint:#f9eef1;--tint-line:#ecd0d8}
html[data-theme="light"][data-palette="purple"]{--tint:#f3eefd;--tint-line:#dccff5}
html[data-theme="light"] .panel,html[data-theme="light"] .year-block,html[data-theme="light"] .account-card,html[data-theme="light"] .stat,html[data-theme="light"] .income-tab:not(.active),html[data-theme="light"] .prorrateo-box,html[data-theme="light"] .modal{background:var(--tint)!important;border-color:var(--tint-line)!important}
html[data-theme="light"] .panel .panel,html[data-theme="light"] .panel .stat,html[data-theme="light"] .panel .account-card,html[data-theme="light"] .modal .panel{background:#fff!important}
html[data-theme="light"] input:not([type=checkbox]):not([type=radio]),html[data-theme="light"] select,html[data-theme="light"] textarea{background:#fff!important}
html[data-theme="light"] .history-tools,html[data-theme="light"] .fincu-metas-gestion,html[data-theme="light"] .ux-invest-card,html[data-theme="light"] .gastos-kpi,html[data-theme="light"] .fincu172-panel,html[data-theme="light"] .fincu-liquidez-panel,html[data-theme="light"] .ux-recording-note{background:var(--tint)!important;border-color:var(--tint-line)!important}
html[data-theme="light"] .history-tools .btn,html[data-theme="light"] .ux-invest-card .btn:not(.btn-primary){background:#fff}
html[data-theme="light"]{--green:#0b8a5e}

/* V14.13.5 (final): modo claro = estilo de Ajustes (tinte del tema, tarjetas internas blancas); tarjetas principales de Inicio en color sólido del tema */
html[data-theme="light"] #homeView .balance-card,
html[data-theme="light"] #homeView .hub-grid>.hub-card{background:var(--accent)!important;background-image:none!important;border:1px solid transparent!important;color:#fff}
html[data-theme="light"] #homeView .hub-grid>.hub-card .arrow,html[data-theme="light"] #homeView .hub-grid>.hub-card .hub-arrow{color:#fff!important}
html[data-theme="light"] #homeView .balance-card .fincu12-home-item{background:rgba(255,255,255,.14)!important;border-color:rgba(255,255,255,.32)!important}
html[data-theme="light"] .fincu-investment-deck>.ux-valuation-panel,html[data-theme="light"] .fincu-investment-deck>.fincu-proy-panel,html[data-theme="light"] .ux-valuation-panel,html[data-theme="light"] .fincu-proy-panel{background:var(--tint)!important;background-image:none!important;border-color:var(--tint-line)!important;color:#0f172a;--text:#0f172a;--muted:#64748b}
html[data-theme="light"] :is(.ux-valuation-panel,.fincu-proy-panel) :is(h2,h3,h4,.panel-title,label,summary){color:#0f172a!important}
html[data-theme="light"] :is(.ux-valuation-panel,.fincu-proy-panel) :is(.ux-muted,.view-caption,.row-meta,p,small){color:#64748b}
html[data-theme="light"] :is(.ux-valuation-panel,.fincu-proy-panel) :is(.ux-details,.ux-details *){color:#0f172a}
html[data-theme="light"][data-palette="revolut"]{--card-solid:#1f6feb}
html[data-theme="light"][data-palette="emerald"]{--card-solid:#0b8562}
html[data-theme="light"][data-palette="ivory"]{--card-solid:#96722b}
html[data-theme="light"][data-palette="graphite"]{--card-solid:#5d6673}
html[data-theme="light"][data-palette="burgundy"]{--card-solid:#8b2943}
html[data-theme="light"][data-palette="purple"]{--card-solid:#7c3aed}
html[data-theme="light"] #homeView .balance-card,html[data-theme="light"] #homeView .hub-grid>.hub-card{background:var(--card-solid)!important}
html[data-theme="light"] #homeView .hub-grid>.hub-card .plan-chip{background:rgba(255,255,255,.22)!important;color:#fff!important;border-color:rgba(255,255,255,.4)!important}

/* V14.13.5 (destello): modo claro = tarjetas principales con tinte muy tenue del tema y borde tipo "destello" del logotipo (línea que brilla al centro y se desvanece a los lados) */
html[data-theme="light"] #homeView .balance-card,
html[data-theme="light"] #homeView .hub-grid>.hub-card{
 --glint:var(--accent);
 border:1.5px solid transparent!important;
 background:
  radial-gradient(ellipse 34% 2px at 50% 0,var(--glint),transparent 100%) border-box,
  radial-gradient(ellipse 34% 2px at 50% 100%,var(--glint),transparent 100%) border-box,
  linear-gradient(var(--tint),var(--tint)) padding-box,
  linear-gradient(90deg,color-mix(in srgb,var(--glint) 18%,transparent) 0%,var(--glint) 50%,color-mix(in srgb,var(--glint) 18%,transparent) 100%) border-box!important;
 background-image:
  radial-gradient(ellipse 34% 2px at 50% 0,var(--glint),transparent 100%),
  radial-gradient(ellipse 34% 2px at 50% 100%,var(--glint),transparent 100%),
  linear-gradient(var(--tint),var(--tint)),
  linear-gradient(90deg,color-mix(in srgb,var(--glint) 18%,transparent) 0%,var(--glint) 50%,color-mix(in srgb,var(--glint) 18%,transparent) 100%)!important;
 background-clip:border-box,border-box,padding-box,border-box!important;
 background-color:transparent!important;
 box-shadow:0 0 14px color-mix(in srgb,var(--glint) 16%,transparent),0 1px 2px rgba(15,23,42,.05)!important;
 color:#0f172a!important;--text:#0f172a;--muted:#475569}
html[data-theme="light"] #homeView .balance-card :is(h1,h2,h3,h4,strong,b,span,p,div,small,.amount,.hub-title,.hub-sub){color:#0f172a}
html[data-theme="light"] #homeView .balance-card .muted,html[data-theme="light"] #homeView .hub-grid>.hub-card :is(small,.muted,.hub-sub,p){color:#475569!important}
html[data-theme="light"] #homeView .hub-grid>.hub-card :is(h2,h3,h4,strong,b,.hub-title){color:#0f172a!important}
html[data-theme="light"] #homeView .hub-grid>.hub-card .arrow,html[data-theme="light"] #homeView .hub-grid>.hub-card .hub-arrow{color:var(--accent)!important}
html[data-theme="light"] #homeView .balance-card .fincu12-home-item{background:#fff!important;border-color:var(--tint-line)!important}
html[data-theme="light"] #homeView .hub-grid>.hub-card .plan-chip{background:#fff!important;color:#0f172a!important;border-color:var(--tint-line)!important}
html[data-theme="light"] #homeView .hub-grid>.hub-card .hub-number,html[data-theme="light"] #homeView .hub-grid>.hub-card .hub-number.money-neutral{color:#0f172a!important}
html[data-theme="light"] #homeView .balance-card :is(#homeTotal,.balance-amount,.balance-number,.big-number,.amount,.fincu12-home-total,.hero-amount){color:var(--accent)!important}
html[data-theme="light"] #homeView .balance-card :is(a,button.link,.fincu12-link,.ux-link,.balance-help,summary){color:var(--accent)!important}
html[data-theme="light"] #homeView .balance-card .balance-value{color:#0f172a!important}
html[data-theme="light"] #homeView .balance-card :is(.balance-label,.balance-foot){color:#475569!important;opacity:1}
html[data-theme="light"] #homeView .balance-card :is(.balance-label,.balance-foot) *{color:inherit!important}

/* V14.13.5 (destello 2): modo claro, fondo blanco y destello en los 4 lados, en todas las pantallas */
html[data-theme="light"]{
 --gl:var(--accent);
 --gl-h:linear-gradient(90deg,color-mix(in srgb,var(--gl) 12%,transparent) 0%,var(--gl) 50%,color-mix(in srgb,var(--gl) 12%,transparent) 100%);
 --gl-v:linear-gradient(180deg,color-mix(in srgb,var(--gl) 12%,transparent) 0%,var(--gl) 50%,color-mix(in srgb,var(--gl) 12%,transparent) 100%);
 --gl-layers:
  linear-gradient(#fff,#fff) padding-box padding-box no-repeat,
  var(--gl-h) top left/100% 1.5px no-repeat border-box,
  var(--gl-h) bottom left/100% 1.5px no-repeat border-box,
  var(--gl-v) top left/1.5px 100% no-repeat border-box,
  var(--gl-v) top right/1.5px 100% no-repeat border-box,
  linear-gradient(var(--tint-line),var(--tint-line)) border-box}
html[data-theme="light"] #homeView .balance-card,
html[data-theme="light"] #homeView .hub-grid>.hub-card,
html[data-theme="light"] :is(.panel,.year-block,.account-card,.stat,.prorrateo-box,.history-tools,.fincu-metas-gestion,.ux-invest-card,.gastos-kpi,.fincu172-panel,.fincu-liquidez-panel,.ux-valuation-panel,.fincu-proy-panel,.ux-recording-note):not(.panel .panel):not(.year-block .year-block){
 border:1.5px solid transparent!important;
 background:var(--gl-layers)!important;
 background-color:transparent!important;
 box-shadow:0 0 12px color-mix(in srgb,var(--gl) 14%,transparent),0 1px 2px rgba(15,23,42,.04)!important}
html[data-theme="light"] .fincu-investment-deck>.ux-valuation-panel,html[data-theme="light"] .fincu-investment-deck>.fincu-proy-panel{background:var(--gl-layers)!important;background-color:#fff!important}
html[data-theme="light"] .panel .panel,html[data-theme="light"] .year-block .year-block{background:#fff!important;border:1px solid var(--tint-line)!important;box-shadow:none!important}

/* V14.13.5: en modo claro los paneles de proyección/valoración NO usan el fondo oscuro fijo de V14.13.4 */
html[data-theme="light"] #inversionesView .fincu-investment-deck>.fincu-proy-panel,
html[data-theme="light"] #inversionesView .fincu-investment-deck>.ux-valuation-panel{
 background:var(--gl-layers)!important;background-color:transparent!important;color:#0f172a}

/* V14.13.5 (correcciones tras revisión por píxeles, modo claro) */
html[data-theme="light"] #homeView .hub-grid>.hub-card :is(.home-prorrateo-preview,.home-savings-preview,.home-prorrateo-preview *,.home-savings-preview *){color:#475569!important}
html[data-theme="light"] .income-tab.active{background:var(--accent)!important;background-image:none!important;border:1.5px solid var(--accent)!important;box-shadow:none!important}
html[data-theme="light"] .income-tab.active,html[data-theme="light"] .income-tab.active *{color:#fff!important}
html[data-theme="light"] .income-tab:not(.active){background:var(--gl-layers)!important;background-color:transparent!important}

/* V14.13.6 · Escritorio y pantallas grandes: un solo ancho en todas las pantallas (≥1000px).
   No toca colores ni el celular. */
@media(min-width:1000px){
 html body .app{max-width:1240px!important;margin-left:auto!important;margin-right:auto!important;padding-left:24px;padding-right:24px}
 html body .app .view>*:not(.fab):not(.modal),
 html body .app #inversionesView .fincu-investment-deck,
 html body .app #inversionesView>.panel.investment-pro-panel,
 html body .app #inversionesView>details.panel.investment-pro-panel,
 html body .app .view .investment-panel,
 html body .app .view .income-tabs,
 html body .app .view .filters,
 html body .app .view .history-summary,
 html body .app .view .gastos-analysis-grid{max-width:none!important;margin-left:0!important;margin-right:0!important;width:auto}
 html body .app #inversionesView .fincu-investment-deck{width:100%}
 html body .app #prorrateoView .prorrateo-box{max-width:860px!important;margin-left:auto!important;margin-right:auto!important}
 /* tarjetas del Inicio: misma altura por fila */
 #homeView .hub-grid{align-items:stretch!important}
 #homeView .hub-grid>.hub-card{height:100%}
 /* encabezado de Inversiones ordenado en dos columnas */
 #inversionesView>.view-head{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(300px,440px);grid-template-areas:"title fondos" "tip fondos";align-items:center;gap:6px 24px}
 #inversionesView>.view-head>.view-title-wrap{grid-area:title;min-width:0}
 #inversionesView>.view-head>.view-title-wrap h2{white-space:normal}
 #inversionesView>.view-head>.fincu-inv-tiprow{grid-area:tip;margin-top:0}
 #inversionesView>.view-head>.fincu-fondos-mini{grid-area:fondos;margin-top:0;align-self:center}
}

/* V14.13.6 · Modo claro, referencia Excel: títulos de sección en barra sólida del color del tema con letra blanca; montos principales en el color del tema */
html[data-theme="light"] :is(.panel,.sobres-list-panel)>.panel-title:first-child,
html[data-theme="light"] .panel>div>.panel-title:first-child,
html[data-theme="light"] #ahorroView .fincu-metas-gestion h3,
html[data-theme="light"] #inversionesView .ux-invest-top h3,
html[data-theme="light"] #inversionesView .panel>h3:first-child,
html[data-theme="light"] #inversionesView .fincu-investment-deck h3:not(.fincu16-guide h3),
html[data-theme="light"] #prorrateoView .income-pane .panel-title,
html[data-theme="light"] #prorrateoView .panel>h3:first-child{
 display:inline-block;background:var(--accent)!important;color:#fff!important;padding:7px 14px;border-radius:8px;font-size:14px;line-height:1.25;letter-spacing:.01em;margin-top:0;max-width:100%}
html[data-theme="light"] :is(.panel,.sobres-list-panel)>.panel-title:first-child *,
html[data-theme="light"] #ahorroView .fincu-metas-gestion h3 *,
html[data-theme="light"] #inversionesView .ux-invest-top h3 *,
html[data-theme="light"] #inversionesView .panel>h3:first-child *,
html[data-theme="light"] #inversionesView .fincu-investment-deck h3 *{color:#fff!important}
html[data-theme="light"] #homeView .hub-number,html[data-theme="light"] #homeView .balance-value{color:var(--accent)!important}
html[data-theme="light"] #homeView .hub-grid>.hub-card .hub-number.money-neutral{color:var(--accent)!important}
html[data-theme="light"] .panel-title :is(.ux-help,.ux-header-tip,button),html[data-theme="light"] #inversionesView h3 :is(.ux-help,button){color:var(--accent)!important;background:#fff!important;border-color:#fff!important}
html[data-theme="light"][data-palette] :is(.panel,.sobres-list-panel)>.panel-title:first-child button.ux-help,
html[data-theme="light"][data-palette] #inversionesView h3 button.ux-help,
html[data-theme="light"][data-palette] #ahorroView h3 button.ux-help{color:var(--accent)!important;background:#fff!important;border:1px solid #fff!important}

/* V14.13.6 · Inversiones: sin tarjetas huérfanas ni huecos (4 tarjetas => 2x2), alturas parejas */
#inversionesView .ux-two-cards{align-items:stretch}
@media(min-width:951px){
 #inversionesView .ux-two-cards[data-n="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
 #inversionesView .ux-two-cards[data-n="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
 #inversionesView .ux-two-cards[data-n="1"]{grid-template-columns:minmax(0,1fr)}
}
@media(min-width:1000px){
 html body .app #inversionesView .fincu-investment-deck>*{max-width:none!important;margin-left:0!important;margin-right:0!important;width:auto}
 html body .app #inversionesView .fincu-investment-deck>.panel,html body .app #inversionesView .fincu-investment-deck>.ux-two-cards{margin-top:0;margin-bottom:14px}
}

/* V14.13.6 · TEMA CLARO ÚNICO «Tinta y marfil»: marino + destello dorado, grises neutros, montos verdes. Independiente de la paleta elegida (las paletas son solo del modo oscuro). */
html[data-theme="light"][data-palette]{
 --navy:#0f2a47;--accent:#0f2a47;--accent-2:#2f5a8a;--accent-soft:#e6ecf4;--context-a:#eef2f7;--context-b:#f8f9fb;
 --tint:#f5f6f8;--tint-line:#e3e6ec;--gl:#b89b4a;--card-solid:#0b6b4a;--green:#0b7a55;
 --gl-layers:
  linear-gradient(#fff,#fff) padding-box padding-box no-repeat,
  var(--gl-h) top left/100% 1.5px no-repeat border-box,
  var(--gl-h) bottom left/100% 1.5px no-repeat border-box,
  var(--gl-v) top left/1.5px 100% no-repeat border-box,
  var(--gl-v) top right/1.5px 100% no-repeat border-box,
  linear-gradient(#ece6d2,#ece6d2) border-box}
html[data-theme="light"][data-palette]{
 --gl-h:linear-gradient(90deg,rgba(184,155,74,.12) 0%,#b89b4a 50%,rgba(184,155,74,.12) 100%);
 --gl-v:linear-gradient(180deg,rgba(184,155,74,.12) 0%,#b89b4a 50%,rgba(184,155,74,.12) 100%)}
.palette-light-note{display:none}
html[data-theme="light"] .palette-light-note{display:block}
html[data-theme="light"] #fieldPaletas .palette-grid{display:none}

/* Tarjeta principal «Mi dinero disponible y registrado» en verde */
html[data-theme="light"][data-palette] #homeView .balance-card{
 border:1.5px solid transparent!important;
 background:
  linear-gradient(135deg,#0d7352 0%,#0b6b4a 55%,#095a3e 100%) padding-box padding-box no-repeat,
  var(--gl-h) top left/100% 1.5px no-repeat border-box,
  var(--gl-h) bottom left/100% 1.5px no-repeat border-box,
  var(--gl-v) top left/1.5px 100% no-repeat border-box,
  var(--gl-v) top right/1.5px 100% no-repeat border-box,
  linear-gradient(#cdbd8a,#cdbd8a) border-box!important;
 background-color:transparent!important;
 box-shadow:0 10px 26px rgba(11,107,74,.22)!important;color:#fff!important}
html[data-theme="light"][data-palette] #homeView .balance-card,
html[data-theme="light"][data-palette] #homeView .balance-card *{color:#fff!important}
html[data-theme="light"][data-palette] #homeView .balance-card :is(.balance-label,.balance-foot){color:rgba(255,255,255,.82)!important}
html[data-theme="light"][data-palette] #homeView .balance-card .fincu12-home-item{background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.34)!important}
html[data-theme="light"][data-palette] #homeView .balance-card :is(summary,.fincu12-link,a){text-decoration-color:rgba(255,255,255,.6)}
html[data-theme="light"][data-palette] #homeView .balance-card .balance-value{color:#fff!important}
/* resto de tarjetas: cifras en tinta marino, textos secundarios en gris */
html[data-theme="light"][data-palette] #homeView .hub-number{color:#0f2a47!important}
html[data-theme="light"][data-palette] .context,html[data-theme="light"][data-palette] #contexto{background:#f5f6f8!important;background-image:none!important;border:1px solid #e3e6ec!important;box-shadow:none!important}
html[data-theme="light"][data-palette] #homeView .balance-card :is(summary,summary *,a,.fincu12-link,button.link){color:#fff!important}

/* V14.13.5 — desglose visible del fondo de emergencia (cuentas / renta fija / efectivo) */
.fincu-meta-desglose{margin:6px 0 4px;display:grid;gap:3px;font-size:13px;color:var(--muted)}
.fincu-meta-desglose[hidden]{display:none}
.fincu-meta-desglose>div{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.fincu-meta-desglose b{color:var(--text,inherit);font-weight:700;font-variant-numeric:tabular-nums}

/* V14.13.5 — botón desplegar/contraer en las tarjetas de la pantalla principal (celular y tablet) */
.fincu-colapsar-btn{display:none}
@media(max-width:1023px){
  #homeView .balance-card,#homeView .hub-grid>.hub-card{position:relative}
  #homeView .fincu-colapsar-btn{display:inline-flex;align-items:center;justify-content:center;position:absolute;top:10px;right:10px;z-index:3;width:34px;height:34px;padding:0;border-radius:50%;border:1px solid var(--line,rgba(255,255,255,.16));background:rgba(255,255,255,.07);color:inherit;font-size:16px;line-height:1;cursor:pointer;-webkit-tap-highlight-color:transparent}
  #homeView .fincu-colapsar-btn:active{transform:scale(.94)}
  #homeView .hub-card .hub-title{padding-right:42px}
  #homeView .balance-card .balance-label{padding-right:42px}
  #homeView .hub-card.fincu-colapsada>div:first-child>:not(.hub-title),
  #homeView .hub-card.fincu-colapsada>.hub-bottom{display:none!important}
  #homeView .hub-card.fincu-colapsada{min-height:0!important;height:auto!important}
  #homeView .balance-card.fincu-colapsada>:not(.balance-label):not(#homeDisponible):not(.fincu-colapsar-btn){display:none!important}
}

/* V14.14 · Resumen del panel OWNER */
.admin-resumen-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:10px}
.admin-stat{padding:14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03)}
.admin-stat-n{font-size:28px;font-weight:800;line-height:1.1}
.admin-stat-t{font-size:13px;margin-top:4px;opacity:.85}
.admin-stat-s{font-size:12px;margin-top:2px;opacity:.65}
.admin-trial{display:flex;gap:14px;align-items:center;justify-content:space-between;margin-top:16px;padding:14px;border:1px solid var(--line);border-radius:14px}
.admin-trial .settings-note{margin-top:4px}
@media(max-width:600px){.admin-trial{flex-direction:column;align-items:stretch}}

/* V14.14 · Plan FREE/PRO: avisos discretos y paletas bloqueadas */
.aviso-prueba{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:0 0 10px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;font-size:12.5px;opacity:.9}
.aviso-prueba.hidden{display:none}
.aviso-prueba .btn{padding:4px 10px;font-size:12px;white-space:nowrap}
.account-plan-trial{font-size:11.5px;opacity:.7;margin-top:4px;max-width:260px;text-align:right}
.account-plan-trial:empty{display:none}
[data-palette-option].palette-locked{opacity:.55}
[data-palette-option].palette-locked::after{content:" PRO";font-size:10px;font-weight:700}

/* V14.14 · Modo claro: un solo estilo y tres colores (azul oscuro, verde, morado). No afecta al modo oscuro. */
html[data-theme="light"][data-accent="azul"]{--navy:#0b2a4d;--accent:#0f3a68;--accent-2:#2f6db5;--accent-soft:#e3ecf6;--context-a:#e3ecf6;--context-b:#f4f8fc;--tint:#f1f5fa;--tint-line:#cfdbe8;--card-solid:#0f3a68}
html[data-theme="light"][data-accent="verde"]{--navy:#0a3a2c;--accent:#0b6b4d;--accent-2:#2da07a;--accent-soft:#e0f3ec;--context-a:#e0f3ec;--context-b:#f3fbf7;--tint:#f0f8f4;--tint-line:#cbe6da;--card-solid:#0b6b4d}
html[data-theme="light"][data-accent="morado"]{--navy:#2a1a52;--accent:#5b3a9b;--accent-2:#8a6cc9;--accent-soft:#ece6f7;--context-a:#ece6f7;--context-b:#f8f5fd;--tint:#f5f2fb;--tint-line:#dcd2f0;--card-solid:#5b3a9b}
html[data-theme="light"] body{background:#f0f2f5!important}

/* V14.14 · Modo claro sencillo: sin dorado ni marfil; tarjetas blancas con borde gris fino y el color elegido */
html[data-theme="light"][data-accent]{
 --gl:transparent;--gl-h:linear-gradient(transparent,transparent);--gl-v:linear-gradient(transparent,transparent);
 --gl-layers:linear-gradient(#fff,#fff) padding-box,linear-gradient(var(--tint-line),var(--tint-line)) border-box}
html[data-theme="light"][data-accent] #homeView .balance-card{
 border:1px solid transparent!important;
 background:linear-gradient(135deg,var(--card-solid) 0%,color-mix(in srgb,var(--card-solid) 84%,#000) 100%)!important;
 background-color:var(--card-solid)!important;
 box-shadow:0 6px 18px color-mix(in srgb,var(--card-solid) 22%,transparent)!important}
html[data-theme="light"][data-accent] #homeView .hub-grid>.hub-card{
 border:1px solid var(--tint-line)!important;
 background:#fff!important;background-image:none!important;
 box-shadow:0 1px 2px rgba(17,27,33,.08)!important}
html[data-theme="light"][data-accent] #homeView .hub-number{color:var(--accent)!important}
html[data-theme="light"][data-accent] #homeView .hub-grid>.hub-card .arrow,html[data-theme="light"][data-accent] #homeView .hub-grid>.hub-card .hub-arrow{color:var(--accent)!important}

/* V14.13.5e · accesos rápidos: crear cuenta y agregar sobre */
.cuentas-acciones{max-width:980px;margin:0 auto 10px;display:flex;justify-content:flex-start}
.cuentas-acciones .btn{width:auto;padding:9px 16px;font-size:13px}
.sobres-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.btn-plus{width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:#fff;color:#0f172a!important;font-size:20px;line-height:1;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}
.btn-plus:hover{background:var(--accent-soft,#eef2f7)}

/* V14.13.5i · Historial: mes en curso + años → meses */
.hist-vacio{padding:6px 2px 16px;opacity:.7;font-size:13px}
.hist-anio>.hist-anteriores-body{padding:0 10px 10px}
.hist-anio>.hist-anteriores-body .hist-mes{margin-bottom:8px}
.hist-actual>summary{font-size:15px}

/* V14.13.5i · Guía para usuarios nuevos */
.guia-card{position:fixed;left:12px;right:12px;bottom:84px;max-width:540px;margin:0 auto;z-index:45;border-radius:18px;padding:14px 16px;box-shadow:0 14px 40px rgba(2,8,23,.35);border:1px solid var(--line,#d5e2ee);background:#fff;color:#0f172a}
html[data-theme="dark"] .guia-card{background:#1a2436;border-color:#34445e;color:#e8eef9}
.guia-card.hidden{display:none}
.guia-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.guia-kick{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;opacity:.75}
.guia-min{width:28px;height:28px;border-radius:50%;border:1px solid currentColor;background:transparent;color:inherit;opacity:.7;font-size:16px;line-height:1;cursor:pointer}
.guia-title{font-size:16px;font-weight:850;margin:6px 0 4px}
.guia-text{font-size:13.5px;line-height:1.45;opacity:.92}
.guia-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.guia-actions .btn{width:auto;padding:9px 14px;font-size:13px}
.guia-card.guia-collapsed{left:auto;right:84px;max-width:none;padding:0;border-radius:999px}
.guia-pill{border:0;background:transparent;color:inherit;font-weight:800;font-size:13px;padding:11px 16px;cursor:pointer}
@media(min-width:851px){.guia-card{bottom:18px;left:auto;right:18px;width:420px}.guia-card.guia-collapsed{width:auto}}

/* V14.13.5j · Sobre por tarjeta */
.tc-hint{font-size:12.5px;line-height:1.45;opacity:.85;margin:8px 0 4px;padding:9px 11px;border-radius:12px;border:1px solid var(--line,#d5e2ee)}

/* V14.13.5m · casillas de consentimiento */
.consent-row{display:flex;gap:10px;align-items:flex-start;text-align:left;font-size:13px;line-height:1.45;margin:10px 0;color:var(--muted,#aab9ca);cursor:pointer}
.consent-row input{width:20px;height:20px;flex:none;margin:1px 0 0;padding:0;accent-color:var(--accent,#1f6feb)}
.consent-row a{color:inherit;text-decoration:underline}
#modalConsentimiento .guia-text a,.consent-row a{color:#77baff}
#conBtn:disabled{opacity:.45;cursor:not-allowed}
.consent-note{font-size:12px;line-height:1.45;color:var(--muted,#8fa3b8)}
