/* CTR Suite 2.0.0 RC2 — tablet landscape density layer.
   Goal: keep 8–13 inch tablets feeling like a native tablet UI instead of a
   desktop canvas scaled too large. No DOM/logic changes; density only. */

@media (orientation:landscape) and (min-width:768px) and (max-width:1366px) and (min-height:500px){
  :root{
    --ctr-tablet-pad-x:16px;
    --ctr-tablet-control-h:36px;
    --ctr-tablet-radius:12px;
  }

  /* Generic workspace canvas */
  body .module-page,
  body .content{
    scrollbar-gutter:stable;
  }

  body .module-page{
    padding-left:var(--ctr-tablet-pad-x)!important;
    padding-right:var(--ctr-tablet-pad-x)!important;
  }

  body .module-head,
  body .page-head{
    gap:10px;
  }
  body .module-head h1,
  body .page-head h1{
    font-size:18px;
    line-height:1.18;
  }
  body .module-head p,
  body .page-head p{
    font-size:11px;
    line-height:1.45;
  }

  /* Dense filters / actions without using CSS zoom. */
  body .module-page input:not([type="checkbox"]):not([type="radio"]),
  body .module-page select,
  body .module-page button,
  body .module-page .btn,
  body .module-page .m-btn,
  body .module-page .filter-btn,
  body .module-page .date-quick-btn{
    min-height:var(--ctr-tablet-control-h);
  }

  /* Shared table wrappers. Keep the table readable but materially denser. */
  body .m-table-wrap,
  body .table-wrap,
  body .table-card,
  body .table-scroll,
  body .responsive-table,
  body .pmx-table-scroll,
  body .pb-table-wrap,
  body .sales-table-wrap,
  body .attendance-matrix-wrap{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  body .m-table-wrap table,
  body .table-wrap table,
  body .table-card table,
  body .table-scroll table,
  body .responsive-table table,
  body .pmx-table-scroll table,
  body .pb-table-wrap table,
  body .sales-table-wrap table,
  body .attendance-matrix-wrap table{
    font-size:10.5px!important;
  }

  body .m-table-wrap th,
  body .table-wrap th,
  body .table-card th,
  body .table-scroll th,
  body .responsive-table th,
  body .pmx-table-scroll th,
  body .pb-table-wrap th,
  body .sales-table-wrap th,
  body .attendance-matrix-wrap th{
    padding:8px 9px!important;
    font-size:9px!important;
    line-height:1.25!important;
    white-space:nowrap;
  }

  body .m-table-wrap td,
  body .table-wrap td,
  body .table-card td,
  body .table-scroll td,
  body .responsive-table td,
  body .pmx-table-scroll td,
  body .pb-table-wrap td,
  body .sales-table-wrap td,
  body .attendance-matrix-wrap td{
    padding:8px 9px!important;
    font-size:10.5px!important;
    line-height:1.35!important;
  }

  /* Generic legacy cards are also slightly tighter on tablet landscape. */
  body .module-page .m-card-head,
  body .module-page .card-head{
    padding:10px 12px!important;
  }
  body .module-page .m-card-body,
  body .module-page .card-body{
    padding:12px!important;
  }
  body .module-page .m-kpi,
  body .module-page .kpi-card,
  body .module-page .summary-card{
    padding:11px 12px!important;
  }
}

/* Short landscape: reserve vertical room for the sticky topbar / printer dock. */
@media (orientation:landscape) and (min-width:768px) and (max-width:1366px) and (min-height:500px) and (max-height:760px){
  body .module-page{
    padding-top:12px!important;
    padding-bottom:20px!important;
  }
  body .module-head,
  body .page-head{
    margin-bottom:10px!important;
  }
}
