/* Sigma OS mobile dashboard charts + floating-nav clearance.
   Layout only: preserves dashboard data, routes, permissions and interactions. */
@media (max-width:900px){
  /* Keep every dashboard section safely above the fixed floating nav. */
  #root{padding-bottom:0!important}
  .sdr-shell,.sdr-dashboard,.sdr-wrap,.sdr-main{padding-bottom:calc(190px + env(safe-area-inset-bottom,0px))!important}
  .sdr-grid-bottom{margin-bottom:24px!important}

  /* Chart cards: compact, stable mobile proportions. */
  .sdr-grid-top{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
  .sdr-grid-top .sdr-card{height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  .sdr-grid-top .sdr-card:first-child{min-height:270px!important}
  .sdr-grid-top .sdr-card:last-child{min-height:285px!important}

  /* Service Mix: remove huge empty area and keep the donut + labels together. */
  .sdr-mix{min-height:220px!important;height:auto!important;display:grid!important;grid-template-columns:116px minmax(0,1fr)!important;align-items:center!important;gap:16px!important;padding:18px 16px 20px!important;overflow:hidden!important}
  .sdr-donut{width:108px!important;height:108px!important;min-width:108px!important;aspect-ratio:1!important}
  .sdr-donut:after{width:64px!important;height:64px!important}
  .sdr-donut strong{font-size:16px!important;line-height:1.1!important}
  .sdr-donut span{font-size:10px!important;line-height:1.2!important}
  .sdr-mix ul{width:100%!important;max-height:190px!important;margin:0!important;padding:0!important;overflow-y:auto!important;overflow-x:hidden!important}
  .sdr-mix li{grid-template-columns:9px minmax(0,1fr) auto!important;gap:8px!important;min-width:0!important;font-size:11px!important;line-height:1.25!important}
  .sdr-mix li span{min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .sdr-mix li b{font-size:11px!important;white-space:nowrap!important}

  /* Revenue Trend: neutral canvas, readable months and no black polygon/fill. */
  .sdr-line{position:relative!important;height:210px!important;min-height:210px!important;max-height:210px!important;margin:14px 16px 34px!important;background:#fff!important;overflow:visible!important;isolation:isolate!important}
  .sdr-line:before{content:""!important;position:absolute!important;inset:8px 0 0!important;background:repeating-linear-gradient(to bottom,transparent 0,transparent 49px,#edf0f4 50px,#edf0f4 51px)!important;z-index:0!important;pointer-events:none!important}
  .sdr-line svg{position:relative!important;z-index:1!important;width:100%!important;height:100%!important;overflow:visible!important;background:transparent!important}
  .sdr-line svg polygon,.sdr-line svg path[fill]:not([fill="none"]){fill:rgba(222,41,73,.08)!important}
  .sdr-line svg path[stroke]{stroke:#de2949!important;stroke-width:2!important;vector-effect:non-scaling-stroke!important}
  .sdr-line svg circle{fill:#fff!important;stroke:#de2949!important;stroke-width:2!important}
  .sdr-months{position:absolute!important;left:0!important;right:0!important;bottom:-27px!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:center!important;gap:0!important;width:100%!important;font-size:10px!important;line-height:1!important;color:#687386!important;white-space:nowrap!important}
  .sdr-months>*{text-align:center!important;min-width:0!important}

  /* Bottom dashboard cards should finish before the nav clearance. */
  .sdr-grid-bottom{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}
  .sdr-grid-bottom .sdr-card{height:auto!important;min-height:250px!important;max-height:none!important}
}

@media (max-width:480px){
  .sdr-shell,.sdr-dashboard,.sdr-wrap,.sdr-main{padding-bottom:calc(205px + env(safe-area-inset-bottom,0px))!important}
  .sdr-grid-top{gap:14px!important}
  .sdr-grid-top .sdr-card:first-child{min-height:250px!important}
  .sdr-grid-top .sdr-card:last-child{min-height:270px!important}
  .sdr-mix{grid-template-columns:102px minmax(0,1fr)!important;gap:12px!important;min-height:200px!important;padding:14px 12px 16px!important}
  .sdr-donut{width:94px!important;height:94px!important;min-width:94px!important}.sdr-donut:after{width:56px!important;height:56px!important}
  .sdr-mix li,.sdr-mix li b{font-size:10px!important}
  .sdr-line{height:190px!important;min-height:190px!important;max-height:190px!important;margin:12px 12px 34px!important}
  .sdr-months{font-size:9px!important;bottom:-26px!important}
}
