html{background:var(--bg,#f6f7f9)}
body{-webkit-tap-highlight-color:transparent}
@media(display-mode:standalone){
  body{overscroll-behavior-y:none}
  .shell{padding-top:max(20px,env(safe-area-inset-top));padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .bottomnav{padding-bottom:env(safe-area-inset-bottom)}
  .modal{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  .auth-wrap{padding-top:calc(22px + env(safe-area-inset-top));padding-bottom:calc(22px + env(safe-area-inset-bottom))}
}
#pwaUpdateBanner{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:10000;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 28px);padding:10px 12px;border-radius:14px;background:#202421;color:#fff;box-shadow:0 10px 30px rgba(0,0,0,.22);font-size:12px;font-weight:750}
#pwaUpdateBanner button{border:0;border-radius:9px;padding:7px 10px;background:#fff;color:#1d6b55;font-size:11px;font-weight:850}
@media(min-width:900px){#pwaUpdateBanner{bottom:24px}}

/* BitaSolve V1 desktop premium pass — desktop only. Mobile remains untouched. */
@media(min-width:900px){
  :root{--bs-desk-side:clamp(236px,20vw,272px);--bs-pearl:#f5f0e8;--bs-ink:#25292d;--bs-jade:#1e6b5e;--bs-jade-deep:#123f37;--bs-line:rgba(82,89,86,.16)}
  html body{background:
    radial-gradient(circle at 70% 12%,rgba(255,255,255,.96),transparent 30%),
    radial-gradient(circle at 48% 48%,rgba(95,184,166,.075),transparent 34%),
    linear-gradient(135deg,#f7f2ea 0%,#f4efe7 48%,#f8f5ef 100%)!important;color:var(--bs-ink)!important}
  html body #appRoot .shell{max-width:none!important;margin-left:calc(var(--bs-desk-side) + 30px)!important;padding:30px clamp(28px,3vw,48px) 64px!important;min-height:100vh!important}

  /* Floating desktop rail */
  html body #appRoot .bottomnav{position:fixed!important;left:16px!important;top:16px!important;bottom:16px!important;right:auto!important;width:var(--bs-desk-side)!important;height:auto!important;padding:0!important;border:1px solid rgba(112,105,94,.18)!important;border-radius:38px!important;background:linear-gradient(180deg,rgba(249,245,238,.97),rgba(244,239,231,.94))!important;box-shadow:0 24px 60px rgba(38,45,43,.10),inset 0 1px 0 rgba(255,255,255,.92)!important;backdrop-filter:blur(22px)!important;-webkit-backdrop-filter:blur(22px)!important;overflow:hidden!important}
  html body #appRoot .bottomnav-inner{height:100%!important;max-width:none!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:26px 18px 22px!important;gap:4px!important}
  html body #appRoot .bottomnav-inner::before{content:'BitaSolve'!important;height:62px!important;display:flex!important;align-items:center!important;padding:0 10px 0 54px!important;margin:0 0 20px!important;background:url('/icons/bitasolve-icon.svg') no-repeat 10px 50%/34px 34px!important;color:#262b2f!important;font-size:23px!important;line-height:1!important;font-weight:800!important;letter-spacing:-.035em!important}
  html body #appRoot .bottomnav .navbtn{position:relative!important;width:100%!important;min-height:58px!important;margin:0 0 7px!important;padding:0 17px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:15px!important;border:1px solid transparent!important;border-radius:20px!important;background:transparent!important;color:#4d5559!important;font-size:14px!important;font-weight:560!important;letter-spacing:-.01em!important;transition:background .18s ease,border-color .18s ease,transform .18s ease!important}
  html body #appRoot .bottomnav .navbtn:hover{background:rgba(255,255,255,.64)!important;border-color:rgba(82,89,86,.10)!important;transform:translateX(2px)!important}
  html body #appRoot .bottomnav .navbtn.active{background:linear-gradient(135deg,rgba(224,236,228,.96),rgba(207,224,215,.82))!important;border-color:rgba(30,107,94,.16)!important;color:#14594e!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.72),0 5px 16px rgba(30,107,94,.06)!important;font-weight:700!important}
  html body #appRoot .bottomnav .navbtn span:first-child{width:24px!important;min-width:24px!important;display:grid!important;place-items:center!important;color:currentColor!important;font-size:22px!important;line-height:1!important}
  html body #appRoot .bottomnav .navbtn[data-view='groupsView']{margin-bottom:22px!important}
  html body #appRoot .bottomnav .fab{order:10!important;align-self:center!important;width:112px!important;height:112px!important;min-height:112px!important;margin:auto auto 0!important;border:1px solid rgba(255,255,255,.34)!important;border-radius:50%!important;background:radial-gradient(circle at 32% 26%,#2f8272 0%,#19594f 46%,#103d36 100%)!important;color:#fff!important;box-shadow:0 20px 38px rgba(18,63,55,.22),inset 0 1px 0 rgba(255,255,255,.26)!important;font-size:0!important;line-height:1!important}
  html body #appRoot .bottomnav .fab::after{content:'＋\A Nuevo gasto'!important;white-space:pre-line!important;font-size:14px!important;line-height:1.35!important;font-weight:760!important;letter-spacing:-.01em!important}
  html body #appRoot .bottomnav .fab:hover{transform:translateY(-2px)!important;box-shadow:0 24px 44px rgba(18,63,55,.27),inset 0 1px 0 rgba(255,255,255,.28)!important}

  /* Header controls */
  html body #appRoot .topbar{max-width:1180px!important;min-height:62px!important;margin:0 auto 18px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;border:0!important;background:transparent!important;box-shadow:none!important}
  html body #appRoot .topbar .top-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important}
  html body #appRoot .topbar .module-btn,
  html body #appRoot .topbar #modeSwitch,
  html body #appRoot .topbar .icon-btn{min-height:46px!important;padding:0 18px!important;border:1px solid rgba(82,89,86,.14)!important;border-radius:999px!important;background:rgba(255,255,255,.72)!important;color:#394247!important;box-shadow:0 7px 20px rgba(38,45,43,.055),inset 0 1px 0 rgba(255,255,255,.92)!important;backdrop-filter:blur(14px)!important;-webkit-backdrop-filter:blur(14px)!important;font-weight:700!important}
  html body #appRoot .topbar .avatar{width:48px!important;height:48px!important;border:1px solid rgba(255,255,255,.38)!important;border-radius:50%!important;background:linear-gradient(145deg,#2d8171,#145248 65%,#103b35)!important;color:white!important;box-shadow:0 8px 22px rgba(18,63,55,.18)!important;font-size:14px!important}

  /* Content width and visual rhythm */
  html body #appRoot .view{max-width:1180px!important}
  html body #appRoot #homeView .home-intro{padding:0!important;margin:10px 0 20px!important}
  html body #appRoot #homeView .home-intro h1{font-size:34px!important;line-height:1.08!important;letter-spacing:-.045em!important;color:#24292d!important}
  html body #appRoot #homeView .home-intro p{margin-top:4px!important;font-size:18px!important;color:#596066!important}

  /* Quick actions become true desktop cards */
  html body #appRoot #homeView .home-quick-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:26px 0 0!important}
  html body #appRoot #homeView .home-quick-actions button{position:relative!important;height:94px!important;min-height:94px!important;padding:0 46px 0 18px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:14px!important;border:1px solid rgba(112,105,94,.18)!important;border-radius:25px!important;background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(247,242,234,.82))!important;color:#2d3236!important;box-shadow:0 10px 26px rgba(38,45,43,.055),inset 0 1px 0 rgba(255,255,255,.92)!important;font-size:13px!important;font-weight:720!important;text-align:left!important}
  html body #appRoot #homeView .home-quick-actions button::after{content:'›'!important;position:absolute!important;right:18px!important;top:50%!important;transform:translateY(-52%)!important;color:#7a817e!important;font-size:27px!important;font-weight:300!important}
  html body #appRoot #homeView .home-quick-actions button:hover{transform:translateY(-2px)!important;box-shadow:0 14px 30px rgba(38,45,43,.075),inset 0 1px 0 rgba(255,255,255,.96)!important}
  html body #appRoot #homeView .home-quick-actions .qicon{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;display:grid!important;place-items:center!important;border-radius:50%!important;background:linear-gradient(145deg,#eef2e9,#e1eadf)!important;color:#176255!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.88)!important}
  html body #appRoot #homeView .home-quick-actions .qicon svg{width:25px!important;height:25px!important}

  /* Summary cards */
  html body #appRoot #homeView .home-metrics{display:grid!important;grid-template-columns:1fr 1fr!important;gap:18px!important;margin:28px 0 10px!important}
  html body #appRoot #homeView .home-metrics>.card{min-height:152px!important;padding:24px 26px!important;border:1px solid rgba(112,105,94,.17)!important;border-radius:30px!important;background:radial-gradient(circle at 85% 10%,rgba(255,255,255,.98),transparent 23%),linear-gradient(145deg,rgba(255,255,255,.80),rgba(245,240,232,.84))!important;box-shadow:0 12px 28px rgba(38,45,43,.06),inset 0 1px 0 rgba(255,255,255,.92)!important}
  html body #appRoot #homeView .home-metrics .metric-title{font-size:15px!important;font-weight:760!important;color:#2d3236!important}
  html body #appRoot #homeView .home-metrics .kpi{margin-top:8px!important;font-size:43px!important;line-height:1!important;letter-spacing:-.045em!important;color:#173f38!important}
  html body #appRoot #homeView .home-metrics .kpi-label{margin-top:8px!important;font-size:12px!important;color:#5c6468!important}
  html body #appRoot #homeView .section-head{margin-top:28px!important}
  html body #appRoot #homeView .section-head h2{font-size:18px!important;letter-spacing:-.02em!important;color:#2b3034!important}
  html body #appRoot #homeView .section-head button{font-size:13px!important;color:#176255!important}
}

/* Larger desktop composition: greeting left, balance object right, then full-width daily actions. */
@media(min-width:1120px){
  html body #appRoot #homeView.view.active{display:grid!important;grid-template-columns:minmax(250px,.72fr) minmax(460px,1.28fr)!important;column-gap:clamp(28px,4vw,58px)!important;align-items:start!important}
  html body #appRoot #homeView.view.active>*{grid-column:1 / -1!important}
  html body #appRoot #homeView.view.active>.home-intro{grid-column:1!important;grid-row:1!important;align-self:center!important;margin:70px 0 0!important;padding-left:6px!important}
  html body #appRoot #homeView.view.active>#balanceHero{grid-column:2!important;grid-row:1!important;align-self:start!important;margin-top:0!important;margin-bottom:8px!important}
  html body #appRoot #homeView.view.active>.home-quick-actions{grid-row:2!important}
  html body #appRoot #homeView.view.active>.home-metrics{grid-row:3!important}
}

/* Mid-size desktop keeps one-column flow rather than squeezing the dashboard. */
@media(min-width:900px) and (max-width:1119px){
  html body #appRoot #homeView .home-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
