/* Finishing refinements — logo, budget choices, planned expenses. */
#dashboard .page-header .dashboard-topbar {
  min-height:54px;
  margin-block:15px 17px;
  padding-block:5px;
}
#dashboard .dashboard-brand {
  font-size:1.72rem!important;
  line-height:1.35;
}
#dashboard .page-header .dashboard-topbar {
  direction:rtl;
  justify-content:flex-start!important;
}
#dashboard .dashboard-brand {
  direction:ltr;
  margin-inline:0;
}
/* Respect the original V design: no added transform or independent stretching. */
#dashboard .dashboard-brand .brand-v {
  transform:none;
}
#dashboard .page-header .dashboard-title-row .dashboard-title {
  font-size:clamp(20px,2.9vw,33px);
  line-height:1.3;
}
.tracker-grid .budget-center-card .budget-center-open-hint {
  min-height:var(--finance-add-action-height,60px)!important;
  height:var(--finance-add-action-height,60px)!important;
  padding:10px 12px!important;
}
@media(max-width:640px){
  #dashboard .page-header .dashboard-topbar {
    min-height:49px;
    margin-block:13px 16px;
  }
  #dashboard .dashboard-brand {font-size:1.56rem!important;}
  #dashboard .page-header .dashboard-title-row .dashboard-title {
    font-size:clamp(17px,4.15vw,24px);
  }
  .tracker-grid .budget-center-card .budget-center-open-hint {
    min-height:var(--finance-add-action-height,56px)!important;
    height:var(--finance-add-action-height,56px)!important;
    padding:9px 7px!important;
  }
}
/* Choose from the real entries even before typing. Groups are individually
   labeled and scroll within the sheet without making it taller than the phone. */
.budget-allocation-modal .budget-center-choices {
  height:265px;
  max-height:min(43dvh,305px);
  overflow-y:auto!important;
  overscroll-behavior:contain;
  display:block;
  padding-inline:2px;
  -webkit-overflow-scrolling:touch;
}
.budget-allocation-modal .budget-allocation-choice-group {
  display:grid;
  gap:8px;
  min-width:0;
  margin-bottom:15px;
}
.budget-allocation-modal .budget-allocation-choice-heading {
  margin:0;
  padding:2px 3px;
  font-size:14px;
  font-weight:700;
  color:#87d1ff;
  text-align:right;
}
.budget-allocation-modal .budget-center-choice {
  text-align:right;
  white-space:normal;
  word-break:break-word;
}
.budget-allocation-modal .budget-allocation-balance {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  direction:rtl;
}
.budget-allocation-balance-money {
  direction:ltr;
  unicode-bidi:isolate;
  display:inline-block;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  color:inherit;
}
.kama-pending-amount-hint {
  display:block;
  color:#9cb5cd;
  font-size:12px;
  font-weight:500;
  line-height:1.45;
  text-align:right;
  margin-top:4px;
}
.amount-editor .amount-input::placeholder {
  color:#9bb8d4;
  opacity:1;
  font-size:clamp(12px,3vw,14px);
}
@media(prefers-reduced-motion:reduce) {
  .budget-allocation-modal .budget-center-choice,
  .tracker-grid .finance-card {scroll-behavior:auto!important;}
}

/* Keep the familiar V proportions while making the entire wordmark readable.
   Budget CTA and all add-row controls share one button height; compact budget
   content as a group instead of stretching an empty grid row between them. */
#dashboard .dashboard-brand .brand-v,
#kf-view .brand-wordmark .brand-v { transform:none!important; }
#dashboard .tracker-grid { --finance-add-action-height:60px; }
#dashboard .tracker-grid .add-row-btn,
#dashboard .tracker-grid .budget-center-card .budget-center-open-hint {
  box-sizing:border-box;
  min-height:var(--finance-add-action-height)!important;
  height:var(--finance-add-action-height)!important;
}
#dashboard .tracker-grid .budget-center-card .budget-center-launch {
  grid-template-rows:max-content max-content!important;
  align-content:center!important;
  row-gap:14px!important;
}
#dashboard .tracker-grid .budget-center-card .budget-center-open-hint {
  align-self:start!important;
  margin:0!important;
}
@media (max-width:640px) {
  #dashboard .tracker-grid { --finance-add-action-height:56px; }
  #dashboard .tracker-grid .budget-center-card .budget-center-launch {
    grid-template-rows:max-content max-content!important;
    align-content:center!important;
    row-gap:11px!important;
  }
}
