/* BitaSolve desktop v7 — structural desktop layout. Mobile/tablet remain untouched. */
@media (min-width:900px){
  :root{--bs7-sidebar:252px;--bs7-jade:#1e6b5e;--bs7-jade-dark:#15483f;--bs7-ink:#22262b;--bs7-line:rgba(112,108,99,.18)}

  body:not(.bs-authenticated) #appRoot{display:none!important;visibility:hidden!important;pointer-events:none!important}

  .shell{max-width:none!important;min-height:100vh!important;margin-left:292px!important;padding:24px 34px 64px 24px!important}
  .view{max-width:1120px!important;margin-left:auto!important;margin-right:auto!important}
  .topbar{max-width:1120px!important;margin:0 auto 2px!important}

  /* Desktop rail */
  .bottomnav{position:fixed!important;z-index:40!important;left:18px!important;top:18px!important;bottom:18px!important;right:auto!important;width:252px!important;height:auto!important;border:1px solid rgba(122,116,105,.20)!important;border-radius:34px!important;background:linear-gradient(160deg,rgba(250,247,241,.97),rgba(241,235,225,.97))!important;box-shadow:0 22px 50px rgba(52,48,42,.11),inset 1px 1px 0 rgba(255,255,255,.9)!important;overflow:hidden!important}
  .bottomnav-inner{height:100%!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:28px 18px 24px!important;gap:7px!important}
  .bottomnav-inner::before{content:'BitaSolve'!important;display:flex!important;align-items:center!important;min-height:48px!important;margin:0 4px 20px!important;padding-left:42px!important;background:url('/icons/bitasolve-icon.svg') left 4px center/28px 28px no-repeat!important;color:var(--bs7-ink)!important;font-size:23px!important;font-weight:800!important;letter-spacing:-.035em!important}
  .bottomnav-inner::after{content:'Tu vida, resuelta.'!important;order:8!important;margin:18px 8px 0!important;padding:18px 12px 0!important;border-top:1px solid rgba(112,108,99,.14)!important;color:#7a7b78!important;font-size:12px!important}
  .navbtn{position:relative!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;min-height:54px!important;margin:0!important;padding:0 16px!important;gap:14px!important;border:1px solid transparent!important;border-radius:18px!important;background:transparent!important;color:#50545a!important;font-size:14px!important;font-weight:560!important;text-align:left!important}
  .navbtn.active{color:#165f53!important;font-weight:700!important;background:linear-gradient(135deg,rgba(225,239,232,.96),rgba(210,229,219,.92))!important;border-color:rgba(63,121,105,.16)!important;box-shadow:inset 1px 1px 0 rgba(255,255,255,.88),0 8px 18px rgba(30,107,94,.07)!important}
  .navbtn span:first-child{display:grid!important;place-items:center!important;width:26px!important;min-width:26px!important;height:26px!important;font-size:20px!important}
  .fab{order:5!important;position:relative!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;height:56px!important;min-height:56px!important;margin:20px 0 0!important;padding:0 15px!important;border:1px solid rgba(21,72,63,.16)!important;border-radius:25px 20px 27px 22px/21px 27px 22px 25px!important;background:linear-gradient(135deg,#2b7d6e 0%,#1e6b5e 48%,#15483f 100%)!important;box-shadow:0 12px 24px rgba(26,91,79,.16),inset 1px 1px 0 rgba(255,255,255,.18)!important;color:#fff!important;font-size:0!important}
  .fab::before{content:'+'!important;display:grid!important;place-items:center!important;flex:0 0 32px!important;width:32px!important;height:32px!important;margin-right:11px!important;border-radius:12px 10px 13px 11px/11px 13px 10px 12px!important;background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.13)!important;font-size:22px!important;font-weight:400!important}
  .fab::after{content:'Nuevo gasto'!important;font-size:13px!important;font-weight:760!important}

  /* Structural home dashboard: old :scope direct-child desktop rules no longer apply to these moved nodes. */
  #homeView.active{display:block!important;max-width:1120px!important;margin:0 auto!important}
  #homeView>.bs-home-dashboard{display:grid!important;grid-template-columns:420px minmax(500px,1fr)!important;column-gap:42px!important;align-items:start!important;width:100%!important;min-height:438px!important;margin:0 0 8px!important}
  .bs-home-left{display:flex!important;flex-direction:column!important;align-items:flex-start!important;min-width:0!important}
  .bs-home-right{display:flex!important;flex-direction:column!important;min-width:0!important;padding-top:116px!important}

  .bs-home-left>.home-intro{width:100%!important;margin:0!important;padding:30px 0 2px 8px!important}
  .bs-home-left>.home-intro h1{margin:0!important;font-size:38px!important;line-height:1.02!important;letter-spacing:-.045em!important;font-weight:760!important}
  .bs-home-left>.home-intro p{margin:7px 0 0!important;font-size:18px!important;line-height:1.3!important;color:#666b70!important}

  /* Approved mobile Balance Island: free-standing, no white container. */
  .bs-home-left>#balanceHero[data-hero-v7="true"]{position:relative!important;width:420px!important;max-width:420px!important;height:350px!important;min-height:350px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;overflow:visible!important;transform:none!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-art,.bs-home-left>#balanceHero[data-hero-v7="true"] .bs-hero-tail{display:none!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"]::before{display:block!important;left:-4px!important;top:-230px!important;width:430px!important;height:586px!important;background-size:100% 100%!important;background-position:center!important;background-repeat:no-repeat!important;filter:drop-shadow(0 24px 54px rgba(30,107,94,.17)) drop-shadow(0 8px 18px rgba(34,38,43,.12))!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"]::after{right:106px!important;top:-89px!important;width:15px!important;height:15px!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy{left:50%!important;top:116px!important;width:286px!important;max-width:286px!important;transform:translateX(-50%)!important;text-align:left!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy>small{font-size:14px!important;line-height:19px!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy>.amount{font-size:43px!important;line-height:46px!important;letter-spacing:-.045em!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy>.sub{font-size:17px!important;line-height:22px!important;margin-top:7px!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy>.hero-context{font-size:12px!important;line-height:17px!important;margin-top:4px!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy>.hero-actions{margin-top:16px!important;gap:9px!important;justify-content:flex-start!important}
  .bs-home-left>#balanceHero[data-hero-v7="true"] .bs-balance-copy>.hero-actions .btn{height:42px!important;min-height:42px!important;padding:0 14px!important;font-size:12.5px!important}

  /* Compact action buttons to the right. */
  .bs-home-right>.home-quick-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;width:100%!important;margin:0!important;padding:0!important}
  .bs-home-right>.home-quick-actions button{position:relative!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;height:64px!important;min-height:64px!important;padding:0 24px 0 10px!important;gap:7px!important;border:1px solid rgba(163,157,146,.30)!important;background:linear-gradient(151deg,rgba(255,255,255,.86),rgba(244,239,231,.78))!important;color:var(--bs7-ink)!important;font-size:11.8px!important;line-height:1.08!important;font-weight:690!important;text-align:left!important;box-shadow:0 7px 18px rgba(34,38,43,.05),inset 1px 1px 2px rgba(255,255,255,.96)!important}
  .bs-home-right>.home-quick-actions button:nth-child(1){border-radius:24px 18px 27px 20px/19px 27px 20px 25px!important}
  .bs-home-right>.home-quick-actions button:nth-child(2){border-radius:18px 27px 21px 26px/26px 19px 28px 21px!important}
  .bs-home-right>.home-quick-actions button:nth-child(3){border-radius:26px 20px 28px 18px/21px 28px 19px 26px!important}
  .bs-home-right>.home-quick-actions button:nth-child(4){border-radius:21px 28px 19px 27px/28px 21px 26px 19px!important}
  .bs-home-right>.home-quick-actions button::after{content:'›'!important;position:absolute!important;right:8px!important;top:50%!important;transform:translateY(-52%)!important;color:#858985!important;font-size:18px!important;font-weight:300!important}
  .bs-home-right>.home-quick-actions .qicon{display:grid!important;place-items:center!important;flex:0 0 34px!important;width:34px!important;height:34px!important;min-height:34px!important;border-radius:50%!important;background:rgba(224,236,227,.92)!important;color:var(--bs7-jade)!important;font-size:0!important}
  .bs-home-right>.home-quick-actions .qicon svg{width:17px!important;height:17px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.7!important}

  .bs-home-right>.home-metrics{display:grid!important;grid-template-columns:1fr 1fr!important;gap:13px!important;width:100%!important;margin:14px 0 0!important;padding:0!important}
  .bs-home-right>.home-metrics>.card{min-height:142px!important;padding:23px 23px 20px!important;overflow:hidden!important;border:1px solid rgba(163,157,146,.28)!important;background:radial-gradient(ellipse at 84% 10%,rgba(255,255,255,.92),transparent 25%),linear-gradient(150deg,rgba(255,255,255,.80),rgba(244,239,231,.75) 58%,rgba(228,222,210,.61))!important;box-shadow:0 9px 23px rgba(34,38,43,.055),inset 1px 1px 2px rgba(255,255,255,.96)!important}
  .bs-home-right>.home-metrics>.card:first-child{border-radius:30px 23px 33px 21px/23px 33px 24px 30px!important}
  .bs-home-right>.home-metrics>.card:last-child{border-radius:23px 33px 22px 31px/32px 23px 31px 22px!important}
  .bs-home-right>.home-metrics .metric-title{font-size:14px!important;font-weight:720!important;margin-bottom:8px!important}
  .bs-home-right>.home-metrics .kpi{font-size:40px!important;line-height:1!important;letter-spacing:-.04em!important;color:#173f38!important}
  .bs-home-right>.home-metrics .kpi-label{margin-top:7px!important;font-size:12px!important}

  #homeView>.section-head{margin:12px 2px 8px!important}
  #homeGroups{margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;gap:10px!important}
  #homeGroups>.row{min-height:76px!important;padding:0 20px!important;border:0!important;border-radius:28px 23px 30px 24px/23px 30px 24px 28px!important;background:linear-gradient(110deg,#40534f,#26302f 62%,#20282a)!important;color:#f7f2ea!important;box-shadow:0 10px 26px rgba(31,45,42,.08)!important}
  #homeGroups>.row:nth-child(even){border-radius:23px 30px 24px 29px/30px 24px 29px 23px!important;background:linear-gradient(110deg,#368c7c,#17685b 55%,#20282a)!important}
  #homeGroups .row-title,#homeGroups .money{color:#fff!important}
  #homeGroups .row-sub{color:rgba(247,242,234,.76)!important}

  .modal-card:has(.balance-breakdown-toolbar){width:min(1180px,calc(100vw - 72px))!important;max-width:1180px!important;max-height:91vh!important;padding:24px!important;overflow:auto!important}
  .balance-breakdown-table{width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-gutter:stable!important;-webkit-overflow-scrolling:touch!important}
  .balance-breakdown-head,.balance-breakdown-row{min-width:1010px!important;grid-template-columns:92px minmax(190px,1.65fr) minmax(175px,1.35fr) 115px 135px 165px!important;gap:12px!important;padding:11px 14px!important}

  @media (max-width:1199px){
    .shell{margin-left:278px!important;padding-left:14px!important;padding-right:20px!important}
    #homeView>.bs-home-dashboard{grid-template-columns:360px minmax(420px,1fr)!important;column-gap:24px!important}
    .bs-home-left>#balanceHero[data-hero-v7="true"]{transform:scale(.86)!important;transform-origin:left top!important;margin-bottom:-48px!important}
    .bs-home-right{padding-top:92px!important}
    .bs-home-right>.home-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .bs-home-right>.home-quick-actions button{height:58px!important;min-height:58px!important}
    .bs-home-right>.home-metrics>.card{min-height:130px!important;padding:20px!important}
  }
}

/* Wrappers are neutral outside desktop so mobile keeps its approved layout/order. */
@media (max-width:899px){
  .bs-home-dashboard,.bs-home-left,.bs-home-right{display:contents!important}
}
