
/* V438H - Revenue Report Mobile Professional UI */
@media(max-width:760px){

  /* Page rhythm */
  .v197-revenue-report{
    overflow-x:hidden;
  }
  .v197-revenue-report > *{
    max-width:100%;
  }

  /* Applied-result strip */
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:513"]{
    margin-bottom:9px!important;
    padding:10px!important;
    border-radius:10px!important;
    align-items:flex-start!important;
  }
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:518"]{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:519"]{
    grid-column:1/-1!important;
    font-size:8px!important;
    line-height:1.35!important;
  }
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:518"] button{
    width:100%!important;
    min-width:0!important;
    height:34px!important;
    padding:0 8px!important;
    font-size:8px!important;
  }

  /* Revenue intelligence sections */
  .v438c-revenue-health,
  .v438c-attention,
  .v438c-comparison,
  .v438c-trend,
  .v438c-forecast{
    margin-bottom:8px!important;
    padding:9px!important;
    border-radius:10px!important;
  }

  .v438c-section-head{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:3px!important;
    margin-bottom:8px!important;
  }
  .v438c-section-head>div>span{
    font-size:6.8px!important;
    letter-spacing:.075em!important;
  }
  .v438c-section-head h2,
  .v438c-section-head h3{
    margin-top:2px!important;
    font-size:11px!important;
    line-height:1.25!important;
  }
  .v438c-section-head>small{
    max-width:none!important;
    text-align:left!important;
    font-size:7px!important;
    line-height:1.35!important;
  }

  /* Revenue health cards */
  .v438c-health-grid{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }
  .v438c-health-grid article{
    min-height:104px!important;
    padding:9px!important;
    border-radius:9px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
  }
  .v438c-health-grid article:last-child:nth-child(odd){
    grid-column:1/-1!important;
  }
  .v438c-health-grid span{
    font-size:6.9px!important;
    line-height:1.28!important;
    letter-spacing:.01em!important;
  }
  .v438c-health-grid b{
    margin-top:6px!important;
    font-size:15px!important;
    line-height:1.05!important;
    overflow-wrap:anywhere!important;
  }
  .v438c-health-grid small{
    margin-top:5px!important;
    font-size:6.7px!important;
    line-height:1.3!important;
  }
  .v438g-period-badge{
    margin-top:6px!important;
    padding:3px 6px!important;
    border-radius:999px!important;
    font-size:6.6px!important;
    font-weight:700!important;
    line-height:1.2!important;
  }

  /* Strong visual distinction for completed KPIs */
  .v438f-completed-card,
  .v438f-completed-profit-card{
    min-height:108px!important;
  }
  .v438f-completed-card{
    box-shadow:inset 0 -3px 0 #2563eb;
  }
  .v438f-completed-profit-card{
    box-shadow:inset 0 -3px 0 #16a34a;
  }

  /* Attention */
  .v438d-attention-grid{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }
  .v438d-attention-grid article{
    min-height:88px!important;
    padding:9px!important;
    border-radius:9px!important;
  }
  .v438d-attention-grid article:last-child:nth-child(odd){
    grid-column:1/-1!important;
  }
  .v438d-attention-grid b{
    font-size:15px!important;
    line-height:1.05!important;
    overflow-wrap:anywhere!important;
  }
  .v438d-attention-grid span{
    margin-top:4px!important;
    font-size:7.2px!important;
    line-height:1.3!important;
  }
  .v438d-attention-grid small{
    margin-top:4px!important;
    font-size:6.7px!important;
    line-height:1.35!important;
  }

  /* Comparison */
  .v438c-compare-grid{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }
  .v438c-compare-grid article{
    min-height:88px!important;
    padding:9px!important;
    border-radius:9px!important;
  }
  .v438c-compare-grid article:last-child:nth-child(odd){
    grid-column:1/-1!important;
  }
  .v438c-compare-grid span{
    font-size:6.9px!important;
    line-height:1.3!important;
  }
  .v438c-compare-grid b{
    margin-top:5px!important;
    font-size:14px!important;
    line-height:1.05!important;
    overflow-wrap:anywhere!important;
  }
  .v438c-compare-grid small{
    margin-top:4px!important;
    font-size:6.7px!important;
  }

  /* Trend chart */
  .v438c-chart-card{
    padding:7px!important;
    border-radius:9px!important;
    overflow:hidden!important;
  }
  .v438c-chart-card .recharts-responsive-container{
    height:205px!important;
    min-height:205px!important;
  }
  .v438c-chart-card svg{
    max-width:100%!important;
  }

  /* Forecast */
  .v438c-forecast-grid{
    grid-template-columns:1fr!important;
    gap:6px!important;
  }
  .v438c-forecast-grid article{
    min-height:78px!important;
    padding:9px!important;
    border-radius:9px!important;
  }
  .v438c-forecast-grid span{
    font-size:7px!important;
  }
  .v438c-forecast-grid b{
    margin-top:5px!important;
    font-size:14px!important;
  }
  .v438c-forecast-grid small{
    font-size:6.8px!important;
  }

  /* Orders section */
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:542"]{
    margin-bottom:9px!important;
    padding:9px!important;
    border-radius:10px!important;
  }
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:545"]{
    font-size:11px!important;
    line-height:1.3!important;
  }
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:546"]{
    margin-top:4px!important;
    font-size:7.2px!important;
    line-height:1.4!important;
  }

  .v199-report-orders-mobile{
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
  }
  .v199-report-order-card{
    border-radius:10px!important;
    overflow:hidden!important;
  }
  .v199-report-order-head{
    padding:9px!important;
    gap:7px!important;
    align-items:flex-start!important;
  }
  .v199-report-order-head .stamp{
    flex:none!important;
    max-width:44%!important;
    font-size:6.8px!important;
    padding:3px 6px!important;
    white-space:normal!important;
    text-align:center!important;
    line-height:1.2!important;
  }
  .v199-report-order-grid{
    grid-template-columns:1fr 1fr!important;
    gap:0!important;
  }
  .v199-report-order-grid>div{
    min-width:0!important;
    padding:8px!important;
  }
  .v199-report-order-grid span{
    font-size:6.8px!important;
    line-height:1.3!important;
  }
  .v199-report-order-grid strong{
    margin-top:3px!important;
    font-size:8.8px!important;
    line-height:1.35!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .v199-report-order-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    padding:8px!important;
  }
  .v199-report-order-actions button{
    width:100%!important;
    height:34px!important;
    min-width:0!important;
    font-size:8px!important;
  }

  /* Tabs */
  .v197-revenue-report [role="tablist"]{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:5px!important;
    height:auto!important;
    padding:5px!important;
    border-radius:10px!important;
  }
  .v197-revenue-report [role="tab"]{
    width:100%!important;
    min-width:0!important;
    min-height:34px!important;
    padding:6px 7px!important;
    font-size:7.6px!important;
    line-height:1.2!important;
    white-space:normal!important;
    text-align:center!important;
    border-radius:7px!important;
  }

  /* Product/detail cards */
  .v200-product-card{
    border-radius:10px!important;
  }
  .v200-product-head{
    padding:9px!important;
    gap:7px!important;
  }
  .v200-product-meta{
    grid-template-columns:1fr 1fr!important;
  }
  .v200-product-meta>div{
    padding:8px!important;
  }
  .v200-product-meta span{
    font-size:6.8px!important;
  }
  .v200-product-meta strong{
    font-size:8.5px!important;
    line-height:1.3!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  /* Generic pager inside report */
  .v197-revenue-report .v296-pager,
  .v197-revenue-report .v299-detail-pager{
    width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
  }

  /* Avoid accidental horizontal overflow from old report tables/charts */
  .v197-revenue-report .ledger-cell{
    max-width:100%;
  }
}

@media(max-width:390px){
  .v438c-health-grid,
  .v438d-attention-grid,
  .v438c-compare-grid{
    grid-template-columns:1fr!important;
  }
  .v438c-health-grid article:last-child:nth-child(odd),
  .v438d-attention-grid article:last-child:nth-child(odd),
  .v438c-compare-grid article:last-child:nth-child(odd){
    grid-column:auto!important;
  }
  .v197-revenue-report [data-loc="client/src/pages/Reports.tsx:518"],
  .v199-report-order-actions,
  .v197-revenue-report [role="tablist"]{
    grid-template-columns:1fr!important;
  }
  .v199-report-order-grid,
  .v200-product-meta{
    grid-template-columns:1fr!important;
  }
}
