/* My Finance Records · V15.2.1 desktop UX quick wins */
@media (min-width:851px){
  .cloud-sync-technical-details{margin-top:8px;padding-top:8px;border-top:1px solid var(--line);font-size:.72rem;color:var(--muted)}
  .cloud-sync-technical-details summary{cursor:pointer;font-weight:700;color:var(--text)}
  .cloud-sync-technical-details code{display:block;margin-top:6px;max-height:88px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
  button[aria-busy="true"]{cursor:progress}
  .productivity-text-dialog{width:min(440px,calc(100vw - 48px))}

  .income-active-filter-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
  .empty-state-actions{display:flex;justify-content:center;gap:8px;margin-top:10px}
  .budget-planner-more-menu,.pc-event-more-menu{position:relative}
  .budget-planner-more-panel,.pc-event-more-panel{min-width:180px}
}

/* V15.2.2 · Income versus expenses: one primary chart + compact monthly summary. */
#dashCashFlowChart .cash-flow-chart-grid{
  grid-template-columns:minmax(0,7fr) minmax(190px,3fr);
  gap:10px;
  align-items:stretch;
}
#dashCashFlowChart .cash-flow-chart-main{
  display:flex;
  min-width:0;
  flex-direction:column;
}
#dashCashFlowChart .cash-flow-chart-main .chart-svg{
  flex:1 1 auto;
  min-height:170px;
}
#dashCashFlowChart .cash-flow-chart-main .chart-legend{
  flex:0 0 auto;
  margin:6px 0 0;
  padding-top:6px;
  border-top:1px solid var(--line);
}
#dashCashFlowChart .cash-flow-summary-panel{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:9px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:var(--talaan-card-radius);
  background:var(--surface-soft);
}
#dashCashFlowChart .cash-flow-summary-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding-bottom:7px;
  border-bottom:1px solid var(--line);
}
#dashCashFlowChart .cash-flow-summary-head h4{
  margin:0;
}
#dashCashFlowChart .cash-flow-summary-head strong{
  color:var(--text);
  font-size:.72rem;
  text-align:right;
  white-space:nowrap;
}
#dashCashFlowChart .cash-flow-summary-metrics{
  display:grid;
  gap:6px;
}
#dashCashFlowChart .cash-flow-summary-metric{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  min-width:0;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:var(--talaan-control-radius);
  background:var(--surface);
}
#dashCashFlowChart .cash-flow-summary-metric span{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  color:var(--muted);
  font-size:.66rem;
  font-weight:750;
}
#dashCashFlowChart .cash-flow-summary-metric i{
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:999px;
}
#dashCashFlowChart .cash-flow-summary-metric i.income{background:var(--green)}
#dashCashFlowChart .cash-flow-summary-metric i.expense{background:var(--red)}
#dashCashFlowChart .cash-flow-summary-metric i.balance{background:var(--blue)}
#dashCashFlowChart .cash-flow-summary-metric strong{
  min-width:0;
  font-size:.75rem;
  font-variant-numeric:tabular-nums;
  text-align:right;
  white-space:nowrap;
}
#dashCashFlowChart .cash-flow-summary-metric .income-value{color:var(--green)}
#dashCashFlowChart .cash-flow-summary-metric .expense-value{color:var(--red)}
#dashCashFlowChart .cash-flow-summary-metric .balance-value{color:var(--blue)}
#dashCashFlowChart .cash-flow-summary-change{
  margin-top:auto;
  padding:8px;
  border:1px solid var(--line);
  border-radius:var(--talaan-control-radius);
  background:var(--surface-soft);
}
#dashCashFlowChart .cash-flow-summary-change span{
  display:block;
  color:var(--muted);
  font-size:.61rem;
  font-weight:750;
}
#dashCashFlowChart .cash-flow-summary-change strong{
  display:block;
  margin-top:2px;
  font-size:.72rem;
  font-variant-numeric:tabular-nums;
}

@media (min-width:701px) and (max-width:1100px){
  #dashCashFlowChart .cash-flow-chart-grid{
    grid-template-columns:minmax(0,3fr) minmax(180px,2fr);
  }
}

@media (max-width:700px){
  #dashCashFlowChart .cash-flow-chart-grid{
    grid-template-columns:1fr;
  }
  #dashCashFlowChart .cash-flow-summary-panel{
    gap:7px;
  }
  #dashCashFlowChart .cash-flow-summary-metrics{
    grid-template-columns:1fr;
  }
  #dashCashFlowChart .cash-flow-summary-change{
    margin-top:0;
  }
}

/* V15.2.4 · More tools Appearance keeps the theme icon and Auto/Light/Dark title on one centered row. */
#topbarToolsPanel #themeToggleButton{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
}
#topbarToolsPanel #themeToggleButton > .toolbar-icon{
  align-self:center !important;
  margin:0 !important;
}
#topbarToolsPanel #themeToggleButton > span:last-child{
  display:flex !important;
  align-items:center !important;
  min-width:0 !important;
  min-height:20px !important;
  margin:0 !important;
  padding:0 !important;
}
#topbarToolsPanel #themeToggleButton > span:last-child > strong{
  display:none !important;
  margin:0 !important;
}
#topbarToolsPanel #themeToggleText{
  display:inline-flex !important;
  align-items:center !important;
  height:20px !important;
  min-height:20px !important;
  margin:0 !important;
  padding:0 !important;
  line-height:20px !important;
  white-space:nowrap !important;
}
#topbarToolsPanel #themeToggleText::after{
  display:block;
  line-height:20px !important;
}

/* V15.2.4-r2 · Compact Appearance row aligns with the other More tools items. */
#topbarToolsPanel #themeToggleButton{
  width:100% !important;
  min-width:0 !important;
  height:38px !important;
  min-height:38px !important;
  max-height:38px !important;
  justify-content:flex-start !important;
  gap:6px !important;
  padding:6px 10px !important;
  text-align:left !important;
}
#topbarToolsPanel #themeToggleButton > .toolbar-icon{
  width:20px !important;
  min-width:20px !important;
  height:20px !important;
  flex:0 0 20px !important;
}
#topbarToolsPanel #themeToggleButton > span:last-child{
  flex:0 1 auto !important;
  min-height:20px !important;
}
#topbarToolsPanel #themeToggleText{
  height:20px !important;
  min-height:20px !important;
  line-height:20px !important;
}

/* V15.2.5 · Finance disclosure controls share one desktop target size. */
@media (min-width:851px){
  #money{
    --budget-disclosure-reference-size:var(--ui-disclosure-size,30px);
    --budget-disclosure-reference-inset:17px;
    --budget-available-card-inset:12px;
  }
  #income{
    --budget-disclosure-reference-size:var(--ui-disclosure-size,30px);
    --budget-disclosure-reference-inset:17px;
  }
  #money .period-card .collapse-toggle,
  #money #availableMoneySection [data-collapse-toggle="available-money"],
  #income #monthlyBudgetPlannerToggle{
    width:var(--budget-disclosure-reference-size) !important;
    min-width:var(--budget-disclosure-reference-size) !important;
    height:var(--budget-disclosure-reference-size) !important;
    min-height:var(--budget-disclosure-reference-size) !important;
    padding:0 !important;
    flex:0 0 var(--budget-disclosure-reference-size) !important;
  }
  #money .period-card .period-header{
    padding-right:var(--budget-disclosure-reference-inset) !important;
  }
  #money #availableMoneySection .card-header{
    padding-right:calc(var(--budget-disclosure-reference-inset) - var(--budget-available-card-inset)) !important;
  }
  #money #availableMoneySection [data-collapse-toggle="available-money"]{
    margin-right:0 !important;
  }
  #income #monthlyBudgetPlannerCard.is-planner-collapsed .budget-planner-actions{
    right:var(--budget-disclosure-reference-inset) !important;
  }
  #income #monthlyBudgetPlannerCard:not(.is-planner-collapsed) #monthlyBudgetPlannerToggle{
    margin-right:0 !important;
  }
}

/* V15.2.5-r2 · Approved scalloped badge shape for current Bank / E-wallet logos. */
:is(
  .record-icon:has(> img[alt="UnionBank icon" i]),
  .record-icon:has(> img[alt="RCBC icon" i]),
  .record-icon:has(> img[alt="Maya icon" i]),
  .record-icon:has(> img[alt="GCash icon" i]),
  .record-icon:has(> img[alt="GoTyme icon" i])
){
  border-radius:0 !important;
  background:#e3e7ed !important;
  -webkit-mask-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEVQTFRFAAAA3+/v4+fu4+ft4+ju4ufs4+bt3+fs5Oft4uft5+fv4+fs4+bs59/v5Ojt5Ofv4+bt5OTv5OTq4ufs4ubt3+Tv4+jsMCIv+AAAABd0Uk5TABC//89g/2Cf/yD//yCPn+8wMP//MK9rXdHQAAABiklEQVR4nK2WUXODIAyAQVa03ebV7v//we1ha3tWh8UWUFBJELxrnjySjyQkQSjZLPRlCKWU0PsWZKeWJSFZl4zkdn+UwZBd7z4xBkEmgkmMmSHFpOUC7NN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6iAwKrfoK2OQGXqIfqCjc2lh5Q1FyODZaXX7C/GdTGP3WI2+9kv6d8pl11tneY3H1GxZV0gGS4++6mjkPGqLsaNTozJ0w/QYxOpYrSxlcjJo0Ns8+L0hmjxuR+ZHCOCLyX1CPj6xlWve1ytyRMuvYMzfn/h6gAAAABJRU5ErkJggg==") !important;
  -webkit-mask-repeat:no-repeat !important;
  mask-repeat:no-repeat !important;
  -webkit-mask-position:center !important;
  mask-position:center !important;
  -webkit-mask-size:100% 100% !important;
  mask-size:100% 100% !important;
}
:is(
  .record-icon:has(> img[alt="UnionBank icon" i]),
  .record-icon:has(> img[alt="RCBC icon" i]),
  .record-icon:has(> img[alt="Maya icon" i]),
  .record-icon:has(> img[alt="GCash icon" i]),
  .record-icon:has(> img[alt="GoTyme icon" i])
) > img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  border-radius:0 !important;
}
