/* Update 5 | Nov 5 targeted iPhone visual corrections. Appearance-only;
   leaves budget calculations, financial records and existing button actions intact. */

/* Rollover rules use v12524-rule, NOT the older u5-budget-rollover-row.
   Reserve an explicit track for the label and cap the selector's width. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-section .v12524-rule {
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(94px,112px)!important;
  align-items:center!important;gap:10px!important;min-width:0!important;
  padding:12px 0!important;box-sizing:border-box!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-rule-copy{
  min-width:0!important;max-width:100%!important;overflow:visible!important;
  overflow-wrap:break-word!important;word-break:normal!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-rule-copy b{
  display:block!important;max-width:100%!important;font-size:clamp(13px,3.7vw,16px)!important;
  line-height:1.24!important;white-space:normal!important;overflow-wrap:break-word!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-rule-copy span{
  display:block!important;font-size:12px!important;line-height:1.35!important;white-space:normal!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-rule select {
  justify-self:end!important;display:block!important;width:112px!important;max-width:100%!important;
  min-width:0!important;min-height:42px!important;height:42px!important;
  margin:0!important;padding:7px 28px 7px 10px!important;
  flex:none!important;box-sizing:border-box!important;
  border:1px solid var(--baakee-glass-border)!important;border-radius:13px!important;
  background:var(--baakee-card-fill)!important;color:var(--baakee-ink)!important;
  font-size:13px!important;font-weight:650!important;line-height:1.2!important;
  box-shadow:none!important;
}
@media(max-width:370px){
 html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-section .v12524-rule{
  grid-template-columns:minmax(0,1fr) 100px!important;gap:7px!important;
 }
 html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .v12524-rule select{
  width:100px!important;padding-inline-start:7px!important;
 }
}

/* Sinking funds: .list plus .row caused the apparent double card border. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .u5-sinking-existing-list,
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .u5-sinking-existing-list.list{
  background:transparent!important;border:0!important;border-radius:0!important;
  outline:0!important;box-shadow:none!important;filter:none!important;
  padding:0!important;overflow:visible!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .u5-sinking-existing-list>.row{
  border:1px solid var(--baakee-glass-border)!important;
  background:var(--baakee-card-fill)!important;border-radius:17px!important;
  box-shadow:none!important;outline:0!important;overflow:hidden!important;margin:0!important;
}
html[data-baakee-theme] body #modal-root .u5-sinking-existing-list::before,
html[data-baakee-theme] body #modal-root .u5-sinking-existing-list::after,
html[data-baakee-theme] body #modal-root .u5-sinking-existing-list>.row::before,
html[data-baakee-theme] body #modal-root .u5-sinking-existing-list>.row::after{content:none!important;display:none!important}

/* Unbudgeted Spending is a neutral planning widget, not a green alert. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .r3-budget-quick-layout :is(.u2-unbudgeted-card,.u2-unbudgeted-toggle),
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .r3-budget-quick-row>.u2-unbudgeted-card{
  background:var(--baakee-card-fill)!important;background-image:none!important;
  border-color:var(--baakee-glass-border)!important;color:var(--baakee-body-ink)!important;
  box-shadow:none!important;outline:none!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .r3-budget-quick-layout .u2-unbudgeted-toggle :is(b,span,em,svg){
  color:var(--baakee-ink)!important;-webkit-text-fill-color:var(--baakee-ink)!important;
  stroke:currentColor!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .r3-budget-quick-layout :is(.u2-unbudgeted-breakdown,.u2-unbudgeted-breakdown>button){
  border-color:var(--baakee-glass-border)!important;background:var(--baakee-card-fill)!important;
  color:var(--baakee-body-ink)!important;
}

/* Search: remove the WebKit radial mask that produced a hard seam at the pill cap.
   Clip the entire painted surface to one rounded rectangle, not separate layers. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .header .baakee-u5-header-search-shell{
  -webkit-mask-image:none!important;mask-image:none!important;
  -webkit-clip-path:inset(0 round 999px)!important;clip-path:inset(0 round 999px)!important;
  border-radius:999px!important;border:1px solid var(--baakee-glass-border)!important;
  background:var(--baakee-card-fill)!important;background-image:none!important;
  background-clip:padding-box!important;overflow:hidden!important;
  isolation:isolate!important;transform:translateY(-50%) translateZ(0)!important;
  -webkit-transform:translateY(-50%) translateZ(0)!important;
  box-shadow:0 9px 22px color-mix(in srgb,var(--baakee-ink) 8%,transparent)!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .header .baakee-u5-header-search-shell input[type=search]{
  -webkit-appearance:none!important;appearance:none!important;
  border:0!important;outline:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  -webkit-box-shadow:none!important;
}

/* Transaction amount hierarchy: consistent size even across specialized types.
   Do not recolor meaningful positive/negative amounts. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .tx-date-group .qa-minimal-row .qa-tx-value strong,
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .tx-date-group .tx-row-amount-final-v128{
  font-size:clamp(14px,3.7vw,16px)!important;line-height:1.24!important;
  letter-spacing:-.015em!important;font-weight:720!important;
  font-variant-numeric:tabular-nums lining-nums!important;white-space:nowrap!important;
  font-feature-settings:'tnum' 1,'lnum' 1!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .tx-date-group .qa-minimal-row .qa-tx-value small{
  font-size:10px!important;line-height:1.15!important;
}

/* Aavi alone should own the Smart Home card border. Remove rectangular host
   decoration/halo without touching non-Aavi widgets or insight severity. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .smart-home-item-v1295c:has(.mini-laari),
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .smart-home-item-v1295c:has(.mini-aavi),
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .u3-aavi-host {
  border:0!important;outline:0!important;box-shadow:none!important;
  background:transparent!important;background-image:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  border-radius:0!important;overflow:visible!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .smart-home-item-v1295c:has(.mini-laari)>.home-widget,
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .smart-home-item-v1295c:has(.mini-aavi)>.home-widget{
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  overflow:visible!important;padding:0!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .smart-home-item-v1295c:has(.mini-laari)::before,
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .smart-home-item-v1295c:has(.mini-laari)::after,
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .u3-aavi-host::before,
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .u3-aavi-host::after{content:none!important;display:none!important}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .mini-laari,
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .home-widgets .mini-aavi{
  border:1px solid var(--baakee-glass-border)!important;
  outline:0!important;border-radius:24px!important;
  background:var(--baakee-card-fill)!important;background-image:none!important;
  box-shadow:0 9px 20px color-mix(in srgb,var(--baakee-ink) 6%,transparent)!important;
}

/* Notification list: compact rows, same hierarchy, retained dismiss and filters.
   Keep text and timestamp visible and allow long content to wrap naturally. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-center-v129{gap:8px!important}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-list-v1286{gap:7px!important}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-row-v1286{
  border-radius:14px!important;grid-template-columns:minmax(0,1fr) 28px!important;
  background:var(--baakee-card-fill)!important;border:1px solid var(--baakee-glass-border)!important;
  box-shadow:none!important;min-height:0!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-row-v1286>button:first-child{
  display:grid!important;grid-template-columns:27px minmax(0,1fr)!important;
  gap:9px!important;align-items:start!important;
  padding:10px 2px 9px 11px!important;min-height:0!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-row-v1286>button:first-child>div{
  min-width:0!important;display:grid!important;gap:2px!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-cat-icon-v129{
  width:27px!important;height:27px!important;border-radius:9px!important;font-size:12px!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-row-v1286 b{
  font-size:12px!important;font-weight:730!important;line-height:1.25!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-row-v1286 :is(span,small){
  font-size:11px!important;line-height:1.28!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-meta-v129{
  display:flex!important;flex-wrap:wrap!important;gap:2px 7px!important;align-items:center!important;margin:0!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-meta-v129 :is(em,i){
  font-size:10px!important;line-height:1.2!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-delete-v1286{
  padding:7px 4px!important;align-self:start!important;font-size:19px!important;
}
@media(max-width:390px){
 html[data-baakee-theme] body.rufiyaa-liquid-glass #modal-root .notification-row-v1286>button:first-child{padding:9px 1px 8px 10px!important}
}
/* One outline around the unbudgeted card; its interior is a borderless row. */
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .r3-budget-quick-layout .u2-unbudgeted-card{
 border:1px solid var(--baakee-glass-border)!important;border-radius:16px!important;
 overflow:hidden!important;
}
html[data-baakee-theme] body.rufiyaa-liquid-glass #app .r3-budget-quick-layout .u2-unbudgeted-toggle{
 border:0!important;border-radius:0!important;background:transparent!important;
 box-shadow:none!important;outline:0!important;
}
