/* Control panel «الأعضاء» (#logins) and «السجل» (#fps) on narrow screens only (<=600px).
   The table keeps its ORIGINAL look (same 9 columns, fonts, padding, widths, long IP/device text wrapping).
   Only the container changes: the table scrolls horizontally by itself (the side menu and the search bar stay
   in place) and the last column (🔍 ⚙ buttons) is pinned to the edge so it is always visible and tappable.
   Wider screens are untouched. */
@media (max-width: 600px) {
  :is(#logins, #fps) table.tablesorter { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  :is(#logins, #fps) table.tablesorter th:last-child,
  :is(#logins, #fps) table.tablesorter td:last-child { position: sticky; right: 0; z-index: 2; background-color: inherit; }
  :is(#logins, #fps) table.tablesorter th:last-child,
  :is(#logins, #fps) table.tablesorter td:last-child { width: 82px; min-width: 82px; max-width: 82px; box-sizing: border-box; box-shadow: -3px 0 4px -2px rgba(0,0,0,.35); }
  :is(#logins, #fps) table.tablesorter td:last-child { background-color: #fff; vertical-align: top; }
  :is(#logins, #fps) table.tablesorter tbody tr:nth-child(odd) td:last-child { background-color: rgb(250,250,255); }
  :is(#logins, #fps) table.tablesorter tbody tr:nth-child(even) td:last-child { background-color: rgb(255,250,250); }
  /* the gear pop-up (.ppop, position:fixed) lives inside this cell: lift the cell that owns it above the pinned cells of the rows below */
  :is(#logins, #fps) table.tablesorter td:last-child:has(.ppop) { z-index: 50; }
  :is(#logins, #fps) input { max-width: 100%; box-sizing: border-box; }
}

/* Any width: when JS (CpFit) finds the table wider than its box (narrow desktop window, tablet, desktop-site mode of a phone) it adds .cp-pin and the same pinned-column scroller applies. A table that fits is untouched. */
  :is(#logins, #fps) table.tablesorter.cp-pin { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  :is(#logins, #fps) table.tablesorter.cp-pin th:last-child,
  :is(#logins, #fps) table.tablesorter.cp-pin td:last-child { position: sticky; right: 0; z-index: 2; background-color: inherit; }
  :is(#logins, #fps) table.tablesorter.cp-pin th:last-child,
  :is(#logins, #fps) table.tablesorter.cp-pin td:last-child { width: 82px; min-width: 82px; max-width: 82px; box-sizing: border-box; box-shadow: -3px 0 4px -2px rgba(0,0,0,.35); }
  :is(#logins, #fps) table.tablesorter.cp-pin td:last-child { background-color: #fff; vertical-align: top; }
  :is(#logins, #fps) table.tablesorter.cp-pin tbody tr:nth-child(odd) td:last-child { background-color: rgb(250,250,255); }
  :is(#logins, #fps) table.tablesorter.cp-pin tbody tr:nth-child(even) td:last-child { background-color: rgb(255,250,250); }
  /* the gear pop-up (.ppop, position:fixed) lives inside this cell: lift the cell that owns it above the pinned cells of the rows below */
  :is(#logins, #fps) table.tablesorter.cp-pin td:last-child:has(.ppop) { z-index: 50; }

