/* ============================================================
   responsive.css — make the HRMS dashboard usable on phones,
   tablets and small windows. Layered ON TOP of index-*.css
   without rebuilding the React bundle.

   Strategy
   - Layout uses stable semantic classes (.app/.sidebar/.main/
     .content/.topbar/.stat-grid/.grid-.kanban/...) which we
     target directly.
   - The sidebar is already position:fixed, so on phones it
     becomes a slide-in drawer toggled by body.sidebar-open
     (set by hrms-mobile.js).
   - Modals / floating widgets use React INLINE styles (no
     classes), so they are clamped via [style*=...] attribute
     selectors with !important (inline styles otherwise win).
   ============================================================ */

/* Toast / pop notifications (e.g. "Interview created") slide down from the
   top-center. The component uses this keyframe by name; it must preserve the
   horizontal centering transform so the toast stays centered. */
@keyframes hrmsToastDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-18px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Hamburger + backdrop are injected by hrms-mobile.js. Hidden on
   desktop; revealed inside the mobile breakpoint below. */
#hrms-hamburger { display: none; }
#hrms-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.22s ease;
}

/* ------------------------------------------------------------
   Tablets / small laptops (<= 1024px): relax the densest grids
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .topbar-search { width: 160px; }
}

/* ------------------------------------------------------------
   Phones / narrow windows (<= 768px): single column + drawer
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  /* Use the dynamic viewport height so mobile browser chrome
     (address bar) doesn't crop the layout. */
  .app { height: 100vh; height: 100dvh; }

  /* Sidebar -> off-canvas drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.26s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    width: 264px;
    max-width: 84vw;
    z-index: 100;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open #hrms-sidebar-backdrop { display: block; opacity: 1; }

  /* Main column spans full width once the sidebar is detached */
  .main { margin-left: 0; }

  /* Hamburger sits first in the topbar */
  #hrms-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 2px;
    border: none;
    background: transparent;
    color: var(--text, #e8edf7);
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
  }
  #hrms-hamburger:hover { background: var(--bg3, rgba(255,255,255,0.06)); }
  #hrms-hamburger svg { width: 22px; height: 22px; }

  /* The same button closes the drawer it opened.

     It could not before: the drawer is 264px wide and starts at top:0, so
     while open it covered the button's own corner. A tap there landed on the
     sidebar, not the button, and nothing happened — the toggle had been
     wired up all along, it was simply unreachable. Lifting the button above
     the drawer (which is z-index 100) puts it back in reach. */
  body.sidebar-open #hrms-hamburger {
    /* Pinned to the drawer's own top-right corner while it is open. Left in
       place it would sit on the logo, and a cross over the branding reads as
       damage rather than as a control. The drawer is 264px wide but clamped
       to 84vw on a narrow screen, so the same min() decides both edges. */
    position: fixed;
    top: 9px;
    left: min(264px, 84vw);
    transform: translateX(-100%);
    margin-left: -8px;
    z-index: 101;
  }

  /* Bars when shut, a cross when open, so it reads as "close". */
  #hrms-hamburger .hrms-burger-close { display: none; }
  body.sidebar-open #hrms-hamburger .hrms-burger-open { display: none; }
  body.sidebar-open #hrms-hamburger .hrms-burger-close { display: block; }

  /* Locking the page behind the drawer stops the list underneath scrolling
     when the drawer is flicked. */
  body.sidebar-open { overflow: hidden; }

  /* Nothing in the topbar may float over the open drawer.

     The Live Interviews pill carries an inline z-index of 998 from the days
     it was a standalone floating button. It is position:static, which would
     normally make that z-index inert — but the topbar is a flex container,
     and z-index DOES apply to flex items whatever their position. So it beat
     the drawer's z-index of 100 and sat on top of the menu.

     Only the hamburger is meant to stay above the drawer, so that it can
     close it; everything else in the bar goes behind. */
  body.sidebar-open .topbar > *:not(#hrms-hamburger) { z-index: auto !important; }

  /* Topbar: tighter, no fixed-width search hogging space */
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-title { font-size: 15px; }
  .topbar-search { display: none; }

  /* Content breathing room */
  .content { padding: 16px 14px; }

  
/* Statistic cards: all four in one row on phones and small tablets. Below
   480px they switch to the compact form further down (no icon, no sub-line),
   which is what keeps four across readable. */
.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px;
}
/* leave room for the icon in the card's top-right corner */
.stat-card .stat-label { padding-right: 28px; }

/* Keep other grids in a single column on mobile */
.grid-2,
.grid-3,
.grid-2-1,
.grid-1-2,
.kanban {
  grid-template-columns: minmax(0, 1fr);
}

  /* Section headers stack (title above the action button) */
  .sec-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .sec-head .btn-primary,
  .sec-head .ai-btn { width: 100%; justify-content: center; }

  /* Cards / interview toggles: a little tighter */
  .card { padding: 16px; }
  .interview-type-toggle { gap: 8px; }

  /* Tables already have .table-wrap{overflow-x:auto}; make sure
     they scroll horizontally instead of overflowing the page. */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table { min-width: 560px; }

  /* --- Modals / dialogs (React inline-styled overlays) ---
     Only the CENTERED overlays (justify-content:center) are dialog
     boxes — target their inner card. This avoids clamping non-centered
     fullscreen panels (e.g. the AI interview view). */
  div[style*="position: fixed"][style*="inset: 0px"][style*="justify-content: center"] > div {
    max-width: 94vw !important;
    width: auto !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
  }
  /* Overlay padding shrink so the card isn't edge-to-edge */
  div[style*="position: fixed"][style*="inset: 0px"][style*="justify-content: center"] {
    padding: 14px !important;
  }

  /* Floating widgets (AI chat panel, "Live Interviews" button)
     anchored bottom/right with a fixed pixel width. */
  div[style*="position: fixed"][style*="width: 380px"] {
    width: min(380px, 92vw) !important;
    right: 12px !important;
    max-height: 78vh !important;
  }

  /* --- Horizontal-overflow guard ---------------------------------
     Nothing should make the page scroll sideways. The wide inline-
     styled rows below get their own internal scroll / wrapping so
     content stops being clipped on both edges. */
  .main,
  .content { max-width: 100%; overflow-x: hidden; }

  /* Sub-tab bar (Dashboard / AI Interviewer / Schedule & Links /
     Follow-up Emails / Recordings). It is an inline-styled flex row
     with width:fit-content, so on a phone its five tabs stretched
     past the viewport and dragged the whole page wider. Let the bar
     scroll horizontally on its own instead. */
  div[style*="width: fit-content"] {
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox: hide the scrollbar */
  }
  div[style*="width: fit-content"]::-webkit-scrollbar { display: none; }
  /* Keep each tab at its natural width so labels don't get squashed. */
  div[style*="width: fit-content"] > button { flex-shrink: 0; }

  /* Candidate Follow-up status rows: avatar + name + score badge +
     the three Selected / Waitlisted / Rejected buttons don't fit on
     one phone line, which clipped the buttons off the right edge.
     Allow the row to wrap so every button stays on screen. */
  div[style*="padding: 13px 0px"] { flex-wrap: wrap !important; }
  div[style*="padding: 13px 0px"] > div[style*="width: 110px"] {
    width: auto !important;
  }
}

/* ------------------------------------------------------------
   Injected Recruit controls — filter toolbars (.hr-toolbar) and
   paginators (.hr-pager). Tagged with stable classes so they
   adapt cleanly instead of overflowing on phones.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  /* Search input takes its own row; the filter <select>s sit
     two-per-row below it. */
  .hr-toolbar { gap: 8px; }
  .hr-toolbar > input  { flex: 1 1 100% !important; min-width: 0; }
  .hr-toolbar > select { flex: 1 1 calc(50% - 4px) !important; min-width: 0; }
  /* 16px font-size stops iOS Safari auto-zooming when they focus. */
  .hr-toolbar > input,
  .hr-toolbar > select { font-size: 16px !important; }

  /* Paginator: let the "Showing …" count and the Prev/Next
     buttons wrap onto two rows instead of being squashed. */
  .hr-pager { flex-wrap: wrap; row-gap: 10px; }
  .hr-pager > div:last-child { margin-left: auto; }
}

/* ------------------------------------------------------------
   Very small phones (<= 420px): final polish
   ------------------------------------------------------------ */
@media (max-width: 420px) {
  .content { padding: 12px 10px; }
  .stat-value { font-size: 24px; }
  .sec-head h2 { font-size: 18px; }
  .auth-card { padding: 26px 20px; }

  /* On the tiniest screens stack the filters one per row. */
  .hr-toolbar > select { flex: 1 1 100% !important; }
}

/* ------------------------------------------------------------
   Phones (<= 480px, e.g. 375x940): compact cards on every page
   - Two stat cards per row instead of one tall card each.
     theme-overrides.css sets `.content .stat-grid` to auto-fit
     200px columns (specificity 0,2,0), which collapses to ONE
     column on a phone, so these selectors match that specificity
     and win by loading later.
   - Less padding on ordinary cards.
   - The slide-in quick-view panels (Pipeline / Recruiter Quick
     View: React inline styles, fixed, 320px wide, right:0 when
     open) fill the screen width.
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .content .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }
  .content .stat-card { padding: 10px 12px; min-width: 0; }
  .content .stat-label { font-size: 9.5px; letter-spacing: .4px; margin-bottom: 4px; white-space: normal; }
  .content .stat-value { font-size: 22px; }
  .content .stat-sub,
  .content .stat-trend { font-size: 10px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .content .card { padding: 12px; }
  .content .card-title { font-size: 13px; margin-bottom: 10px; }

  div[style*="position: fixed"][style*="width: 320px"][style*="right: 0px"] {
    width: 100vw !important;
    max-width: 100% !important;
    left: 0 !important;
  }

  /* Account drawer (avatar menu): full width on phones. */
  .hrms-drawer { width: 100vw; max-width: 100%; }
}

/* ------------------------------------------------------------
   Filter / column side panels on phones (<= 768px).
   They were sized height:100vh (KPI dashboard, Job Board,
   Candidate Compare) or top:0 + height:100% (Recruit › Pipeline /
   Recruiter Quick View). A phone browser measures both as if its
   address bar were hidden, so the panel ended below the visible
   screen and its footer — Reset / Cancel / Apply Filter — was cut
   off. dvh is the height actually visible. Full width too (the
   94vw cap left a strip of page showing).
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .kpi-fd, .jt-dr, .cc-dr, .bss-dw, .ob-dw {
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; height: 100dvh !important; max-height: 100dvh !important;
    border-left: none !important;
  }
  div[style*="position: fixed"][style*="top: 0px"][style*="height: 100%"] {
    height: 100dvh !important; max-height: 100dvh !important;
  }
  .kpi-fd-f, .jt-df, .cc-df, .bss-cd-f, [data-hrms-qv-footer] {
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .kpi-fd-f > button, .jt-df > button, .cc-df > button, .bss-cd-f > button,
  [data-hrms-qv-footer] > button { min-height: 44px; }
}

/* ------------------------------------------------------------
   Time & Attendance: nothing gets crushed at narrower widths.
   - The Live Team Presence / Today's Attendance pair and the attendance
     card pairs stack from 1100px down, instead of squeezing the second
     card (its search box, filter and log rows) into half of a small window.
   - The Live Team Presence chart keeps all four columns, including Absent,
     inside its card: gaps shrink with the width and the labels get smaller.
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .grid-2.hram-grid,
  .grid-2:has(#hrms-presence-chart) { grid-template-columns: 1fr !important; }  /* the page sets 0.8fr 1.2fr inline */
}
#hrms-presence-chart { container-type: inline-size; max-width: 100%; }
#hrms-presence-chart .hrms-pc-bars { gap: clamp(6px, 3cqw, 18px) !important; }
#hrms-presence-chart .hrms-pc-chip { min-width: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 360px) {
  #hrms-presence-chart .hrms-pc-chip { padding: 4px 6px !important; font-size: 10px !important; gap: 4px !important; }
  #hrms-presence-chart .hrms-pc-bars { gap: 6px !important; }
  #hrms-presence-chart .hrms-pc-chip-dot { display: none !important; }
  #hrms-presence-chart .hrms-pc-val { font-size: 14px !important; }
}

/* ------------------------------------------------------------
   Phones: the last row of a page must scroll clear of the floating
   chat bar (bottom-left) and the AI button (bottom-right). With the
   normal 16px of bottom padding they sat on top of pagination and
   action buttons and nothing could be scrolled out from under them.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .content { padding-bottom: 92px; }
}

/* ------------------------------------------------------------
   Dashboard on phones: cards may shrink with the screen.
   A grid column sized `1fr` cannot get narrower than its content,
   and a chart canvas keeps the width it was drawn at, so turning
   the phone (or narrowing the window) left the attendance card
   wider than the screen and the page scrolled sideways.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .hrms-dash .hrms-dash-3col-row,
  .hrms-dash .hrms-dash-charts { grid-template-columns: minmax(0, 1fr) !important; }
  .hrms-dash .hrms-dash-pro-card,
  .hrms-dash .card { min-width: 0; max-width: 100%; }
  .hrms-dash canvas { max-width: 100%; }
}

/* ------------------------------------------------------------
   Phones (<= 480px): compact statistic tiles, four in one row.
   Two-per-row cards took almost a third of the screen. Each tile
   now shows a short label, the number and one status line; the
   corner icon and the grey sub-line are dropped because there is
   no room for them at this width. Labels reserve two lines so the
   numbers line up across the row.
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .content .stat-grid { gap: 6px; margin-bottom: 14px; }
  .content .stat-card { padding: 9px 6px 8px; min-width: 0; }  /* 6px sides: "Monthly pay schedule" fits */
  .content .stat-card::after { display: none !important; }
  .content .stat-card > svg,
  .content .stat-card .stat-icon { display: none !important; }
  .content .stat-card .stat-label {
    font-size: 8.5px; letter-spacing: .2px; line-height: 1.25;
    margin-bottom: 5px; padding-right: 0; white-space: normal; min-height: 2.5em;
  }
  .content .stat-card .stat-value {
    font-size: clamp(14px, 4.6vw, 19px);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .content .stat-card .stat-sub { display: none; }
  .content .stat-card .stat-trend {
    font-size: 8px; letter-spacing: -.1px; margin-top: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}

/* ------------------------------------------------------------
   Phones: nothing may be wider than the screen.
   - A bare `1fr` column cannot shrink below its content, so one wide
     row inside a card stretched the whole card past the screen
     (Benefits). minmax(0, 1fr) above lets the column shrink.
   - A table placed straight inside a card (no scroll wrapper, e.g.
     Settings > Leave Policy) scrolls sideways inside the card instead
     of dragging the page with it.
   - Cards themselves never exceed the content width.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .content .card { min-width: 0; max-width: 100%; }
  .content .card > table {
    display: block; max-width: 100%; min-width: 0 !important; width: auto;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .content img, .content canvas, .content video { max-width: 100%; }
}

/* ------------------------------------------------------------
   Phones: shared polish found on a page-by-page pass.
   - A long page title ("Bench Work Submissions", "Payroll &
     Compensation") ran underneath the Live Interviews pill; it now
     ends in an ellipsis instead.
   - The first column of a scrolling table (the person's name) stays
     on one line rather than breaking into three.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  /* Page title: the full name, on up to two short lines, in the space left
     of the top-bar buttons. One line cut off mid-word ("Contractor of Re")
     looked broken; two lines fit every page name, the long USA ones too. */
  .topbar .topbar-title {
    flex: 1 1 0; min-width: 0;
    font-size: 14px !important; line-height: 1.15; font-weight: 600;
    white-space: normal; overflow-wrap: break-word;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .content .table-wrap td:first-child,
  .content .table-wrap th:first-child { white-space: nowrap; }

  /* Wide tables swipe sideways with every column moving together. Each cell
     stays on one line, so rows are the same height and "Full-Stack Dev" does
     not break into three lines. The table is as wide as its content needs. */
  body:not(:has(.sidebar a.nav-item.active[href="/hr/hris"])) .content .card .table-wrap { overflow-x: auto; max-width: 100%; }
  body:not(:has(.sidebar a.nav-item.active[href="/hr/hris"])) .content .card .table-wrap table { width: max-content; min-width: 100%; }
  body:not(:has(.sidebar a.nav-item.active[href="/hr/hris"])) .content .card .table-wrap th,
  body:not(:has(.sidebar a.nav-item.active[href="/hr/hris"])) .content .card .table-wrap td { white-space: nowrap; }
  body:not(:has(.sidebar a.nav-item.active[href="/hr/hris"])) .content .card .table-wrap td:first-child > div { flex-wrap: nowrap; }
}
@media (max-width: 480px) {
  /* Tile labels wrap onto a second line; none are cut to "Resume…". */
  .content .stat-card .stat-label { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }

  /* Payroll Run tiles: two per row and compact, instead of four tall
     full-width cards. Two (not four) because money values are long. */
  .pr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; margin-bottom: 14px !important; }
  .pr-stat-card { padding: 10px 12px !important; gap: 3px !important; min-width: 0; }
  .pr-stat-label { font-size: 10px !important; }
  .pr-stat-val { font-size: 17px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pr-stat-sub { font-size: 9.5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ------------------------------------------------------------
   Small phones: Settings > Company cards.
   Their grid asks for columns at least 360px wide (inline style), which
   is wider than a 360px phone has room for, so the cards stuck out past
   the screen. On phones the grid is simply one flexible column.
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .content [style*="minmax(360px"] { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Small phones: give the page title more room and a slightly smaller font,
   so a long single word ("Compensation") is never split in the middle. */
@media (max-width: 400px) {
  .topbar { padding: 0 10px !important; gap: 6px !important; }
  .topbar .topbar-title { font-size: 13px !important; -webkit-line-clamp: 3; }  /* three short lines still fit the 56px bar */
}

/* Phones: the page never scrolls sideways. While a page is fading in, a
   slide-in panel parked off-screen (Recruit / Interview quick view) is
   briefly measured against the page and made it scrollable to the right
   for a moment. Wide tables keep their own sideways scrolling boxes. */
@media (max-width: 768px) {
  .content { overflow-x: hidden; }
}

/* ------------------------------------------------------------
   Payroll & Compensation on phones.
   - The four tabs did not fit and the row could not scroll, so the last
     one (Salary Components) was unreachable. The row now scrolls
     sideways and each tab stays on one line.
   - Tables with eight columns were cut off at the screen edge. Each row
     becomes a card: the first cell is the heading, the rest are
     "label ... value" lines (labels come from data-label, set by
     hrms-payroll.js).
   - The page heading is sized for a phone.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .pr-tabs { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px !important; }
  .pr-tabs::-webkit-scrollbar { display: none; }
  .pr-tab { flex: 0 0 auto; white-space: nowrap; padding: 10px 12px !important; font-size: 12.5px !important; }
  .pr-title-group h2 { font-size: 20px !important; }
  .pr-title-group p { font-size: 12.5px !important; }
  .pr-header { margin-bottom: 16px !important; gap: 12px !important; }
  .pr-toolbar { padding: 12px !important; }
  .pr-search { min-width: 0 !important; flex: 1 1 100%; }
  .pr-select { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  /* One card per record, not one long box holding them all. */
  .pr-card { background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible !important; margin-bottom: 8px !important; }
  .pr-toolbar { background: var(--bg2); border: 1px solid var(--border2, rgba(128,128,128,.25)) !important; border-radius: 12px; margin-bottom: 10px; }
  .pr-table-wrap { overflow-x: visible !important; }
  .pr-table thead { display: none; }
  .pr-table, .pr-table tbody { display: block; width: 100% !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box; }
  .pr-table tr {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px;
    width: 100% !important; min-width: 0 !important; box-sizing: border-box;
    padding: 13px 14px;
    margin-bottom: 10px;
    background: var(--bg2);
    border: 1px solid var(--border2, rgba(128,128,128,.25));
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  }
  /* a field: small label above its value */
  .pr-table td {
    display: block; min-width: 0;
    padding: 0 !important; border: 0 !important;
    text-align: left; font-size: 13px; font-weight: 600;
    overflow-wrap: anywhere; background: transparent !important;
  }
  .pr-table td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 9.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
    color: var(--text3, #8a9bb8);
  }
  .pr-table td.pr-empty { display: none; }
  /* heading: the person / pay period / component, across the top */
  .pr-table td:first-child {
    grid-column: 1 / -1;
    padding: 0 86px 10px 0 !important;      /* room for the status badge */
    border-bottom: 1px solid var(--border2, rgba(128,128,128,.22)) !important;
    font-size: 13.5px;
  }
  .pr-table td:first-child::before { display: none; }
  /* status badge sits in the card's top-right corner */
  .pr-table td[data-label="Status"] { position: absolute; top: 12px; right: 12px; }
  .pr-table td[data-label="Status"]::before { display: none; }
  /* action buttons and downloads take the full width at the bottom */
  .pr-table td[data-label="Actions"],
  .pr-table td[data-label="Eversoft Payslip"] { grid-column: 1 / -1; }
  .pr-table td[data-label="Actions"]::before,
  .pr-table td[data-label="Eversoft Payslip"]::before { display: none; }
  /* "nothing here" rows */
  .pr-table td[colspan] { grid-column: 1 / -1; padding: 6px 0 !important; border: 0 !important; text-align: center; font-weight: 500; }
  .pr-table td[colspan]::before { display: none; }
}

/* ------------------------------------------------------------
   Payroll & Compensation: the page must scroll.
   The payroll screen is drawn in its own container beside the normal
   page area, and that container had no scrolling, while the area
   around it hides overflow. Anything taller than the screen (a long
   Salary Components list, every list on a phone) could not be reached.
   The container now fills the space under the top bar and scrolls.
   ------------------------------------------------------------ */
#hrms-payroll-root {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
  /* same side padding as other pages, and room at the bottom for the
     floating chat bar and AI button */
  #hrms-payroll-root { padding: 16px 14px 92px !important; }
}

/* ------------------------------------------------------------
   Recruit pipeline (Applied / Screening / Interview / Offer).
   Candidates are listed newest first. On a phone each stage shows its
   two latest candidates and a "Show N more" control opens the rest, so
   four stages fit in a couple of screens instead of one long list.
   On desktop nothing changes: up to five cards per stage, as before,
   and no control.
   ------------------------------------------------------------ */
.kb-more { display: none; }
@media (min-width: 769px) {
  .kanban-col .kb-cap { display: none; }
}
@media (max-width: 768px) {
  .kanban-col:not(.kb-open) .kb-extra { display: none; }
  .kanban-col .kb-more {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; min-height: 40px; margin-top: 8px; padding: 8px 12px;
    font: inherit; font-size: 12.5px; font-weight: 600;
    color: var(--accent, #2563eb);
    background: color-mix(in srgb, var(--accent, #2563eb) 7%, transparent);
    border: 1px dashed color-mix(in srgb, var(--accent, #2563eb) 40%, transparent);
    border-radius: 10px; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .kanban-col .kb-more:active { background: color-mix(in srgb, var(--accent, #2563eb) 14%, transparent); }
  .kanban-col .kb-more-open { display: none; }
  .kanban-col.kb-open .kb-more-open { display: inline; }
  .kanban-col.kb-open .kb-more-closed { display: none; }
  .kanban-col .kb-more-caret { display: inline-block; transition: transform .18s ease; }
  .kanban-col.kb-open .kb-more-caret { transform: rotate(180deg); }
}

/* ------------------------------------------------------------
   F2F Interview on phones.
   - Search and filter boxes above the lists were set to 16px text for
     every phone, so they looked oversized next to 12-13px content. The
     16px exists only to stop iPhone Safari zooming in when a field is
     tapped, so it now applies on iPhone/iPad only; other phones get
     the normal compact size.
   - Schedule & Links: the empty "Share Interview Link" panel was 36px
     of padding top and bottom around one line of text.
   - Schedule & Links / Follow-ups: the links table keeps each row on
     one line and scrolls sideways, instead of wrapping every cell into
     three short lines.
   - AI Interviewer: in "Select Candidate to Screen" the name column was
     squeezed to one word per line. Name on the first line, status and
     the button on the second.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .hr-toolbar > input,
  .hr-toolbar > select { font-size: 13px !important; padding: 8px 10px !important; min-height: 38px; }
  /* #root: has to outrank the desktop rule that makes this placeholder 340px
     tall so it lines up with the card beside it; on a phone the cards stack. */
  #root .content .card > div[style*="padding: 36px 0px"] { padding: 14px 0 !important; min-height: 0 !important; }
  .content .card:has(.hr-toolbar) .table-wrap th,
  .content .card:has(.hr-toolbar) .table-wrap td { white-space: nowrap; }

  .hrms-iv-screen-candidate-card > div[style*="border-bottom"] { flex-wrap: wrap; row-gap: 8px; }
  .hrms-iv-screen-candidate-card > div[style*="border-bottom"] > div[style*="flex: 1"] { flex: 1 1 calc(100% - 52px) !important; min-width: 0; }
  .hrms-iv-screen-candidate-card > div[style*="border-bottom"] > .badge { margin-left: 50px; }
  .hrms-iv-screen-candidate-card > div[style*="border-bottom"] > button { margin-left: auto; }
}
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .hr-toolbar > input,
    .hr-toolbar > select { font-size: 16px !important; }
  }
}

/* ------------------------------------------------------------
   F2F Interview > Follow-up Emails on phones: same layout as the
   "All Interview Links" card. Filters one per row, then the
   candidates as single-line rows under column headings, scrolling
   sideways together, instead of each candidate being a three-line
   block.
   The rows sit directly inside the card, so the card is the sideways
   scroller and its title, filters and footer are pinned in place.
   ------------------------------------------------------------ */
.hrms-iv-fu-head { display: none; }
@media (max-width: 760px) {
  .content .card:has(> .hrms-iv-fu-row) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content .card:has(> .hrms-iv-fu-row) > :not(.hrms-iv-fu-row):not(.hrms-iv-fu-head) { position: sticky; left: 0; }
  .content .card:has(> .hrms-iv-fu-row) > .hr-toolbar > input,
  .content .card:has(> .hrms-iv-fu-row) > .hr-toolbar > select { flex: 1 1 100% !important; }

  /* doubled class: must outrank the interview script's own phone rule, which
     and a desktop rule in theme-overrides.css (which uses #root) both set a
     different column gap with !important */
  #root .content .card > .hrms-iv-fu-row.hrms-iv-fu-row.hrms-iv-fu-row,
  #root .content .card > .hrms-iv-fu-head.hrms-iv-fu-head.hrms-iv-fu-head {
    display: grid !important;
    grid-template-columns: 34px 190px 110px 261px 158px 28px !important;
    gap: 0 12px !important;
    justify-content: start !important;
    align-items: center !important;
    width: 852px !important; min-width: 100%; max-width: none; box-sizing: border-box;
  }
  #root .content .card > .hrms-iv-fu-row > * { grid-column: auto !important; grid-row: auto !important; justify-self: stretch !important; }
  #root .content .card > .hrms-iv-fu-row > .hrms-iv-fu-outcomes { width: 261px !important; min-width: 261px !important; }
  #root .content .card > .hrms-iv-fu-row > .hrms-iv-fu-actions { width: 158px !important; min-width: 158px !important; justify-self: start !important; justify-content: start !important; }
  #root .content .card > .hrms-iv-fu-row > :nth-child(2) { min-width: 0; }
  #root .content .card > .hrms-iv-fu-row > :nth-child(2) > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  #root .content .card > .hrms-iv-fu-head {
    padding: 10px 0 10px 10px; margin-top: 2px;
    background: var(--bg3); border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--border2);
    font-size: 12px; font-weight: 600; color: var(--text2);
  }
  #root .content .card > .hrms-iv-fu-head > span:first-child { grid-column: 1 / 3; }
  #root .content .card > .hrms-iv-fu-row { padding-left: 10px !important; }
}

/* ------------------------------------------------------------
   Recording player pop-up (F2F Interview > Recordings > Play) on
   phones. Its single column was `1fr`, which cannot shrink below its
   content, so the player and the transcript stayed about 500px wide
   and ran off a 430px screen. The column can now shrink, the padding
   is phone-sized, and the header buttons wrap under the name.
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  #hvp-active-modal .hvp-main-grid { grid-template-columns: minmax(0, 1fr) !important; }
  #hvp-active-modal .hvp-player-slot,
  #hvp-active-modal .hvp-trans-slot,
  #hvp-active-modal .hvp-player-box,
  #hvp-active-modal .hvp-trans-panel { min-width: 0 !important; max-width: 100%; }
}
@media (max-width: 600px) {
  #hvp-active-modal .hvp-modal { width: 100% !important; max-width: 100vw !important; }
  #hvp-active-modal .hvp-body { padding: 12px !important; gap: 12px !important; }
  #hvp-active-modal .hvp-head { flex-wrap: wrap; gap: 8px; padding: 10px 12px !important; }
  #hvp-active-modal .hvp-title-wrap { min-width: 0; flex: 1 1 auto; }
  #hvp-active-modal .hvp-actions { flex-wrap: wrap; gap: 6px; }
}

/* ------------------------------------------------------------
   F2F Interview > Schedule & Links header on phones.
   The "+ Create Interview" button was squeezed until its label broke
   onto two lines, leaving a tall block that took nearly half the row.
   The button keeps its label on one line at a compact size and the
   title takes the remaining width.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .content div[style*="justify-content: space-between"][style*="margin-bottom: 14px"]:has(> button.btn-primary) { gap: 10px; align-items: center !important; }
  .content div[style*="justify-content: space-between"][style*="margin-bottom: 14px"]:has(> button.btn-primary) > div:first-child { flex: 1 1 auto; min-width: 0; }
  .content div[style*="justify-content: space-between"][style*="margin-bottom: 14px"] > button.btn-primary {
    flex: 0 0 auto; width: auto !important;
    white-space: nowrap; justify-content: center;
    gap: 5px !important; padding: 8px 12px !important;
    font-size: 12.5px !important; min-height: 36px;
  }
}

/* ------------------------------------------------------------
   Attendance Administration & Live Map pop-up (Check In / Out >
   Attendance Settings) on phones.
   - It was a floating panel with margins, so the tab row had to give
     up height and was clipped under the header. It is now a full-screen
     sheet and the tab row keeps its own height and scrolls sideways.
   - Forms put every field on its own row, which made "Create a shift"
     taller than the screen. Fields now sit two per row; when a form has
     an odd number of fields the first one (the name) takes a full row.
   - Tables scroll sideways inside their own box, with each row on one
     line, instead of running off the edge of the panel.
   `body` in front: outranks the pop-up's own phone rules, which use
   the same selectors with !important.
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  body .haa-back { padding: 0 !important; align-items: stretch !important; }
  body .haa-back .haa-panel {
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; max-height: 100dvh !important;
    border-radius: 0 !important;
  }
  body .haa-back .haa-head { flex: 0 0 auto; padding: 10px 12px !important; gap: 10px !important; }
  body .haa-back .haa-title { font-size: 14.5px !important; line-height: 1.25 !important; }
  body .haa-back .haa-head .haa-btn { padding: 7px 12px !important; font-size: 12.5px !important; flex: 0 0 auto; }

  body .haa-back .haa-tabs {
    flex: 0 0 auto !important; min-height: 42px;
    padding: 8px 10px 0 !important; gap: 4px !important;
    border-bottom: 1px solid var(--haa-line);
    align-items: flex-end;
  }
  body .haa-back .haa-tab { padding: 8px 11px !important; font-size: 12.5px !important; }

  body .haa-back .haa-body { padding: 12px 12px 22px !important; overflow-x: hidden !important; }
  body .haa-back .haa-card { padding: 12px !important; margin-bottom: 12px !important; }

  body .haa-back .haa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  body .haa-back .haa-grid > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  body .haa-back .haa-grid > * { min-width: 0; }
  body .haa-back .haa-lbl { font-size: 10px !important; margin-bottom: 3px !important; }
  body .haa-back .haa-in { min-width: 0; padding: 8px 9px !important; font-size: 13px !important; }

  body .haa-back .haa-tbl {
    display: block; width: auto !important; min-width: 0 !important; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  body .haa-back .haa-tbl th,
  body .haa-back .haa-tbl td { white-space: nowrap; padding: 8px 10px !important; }
  body .haa-back .haa-empty { padding: 18px 10px !important; }
}
/* iPhone/iPad only: 16px text stops Safari zooming in when a field is tapped. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) {
    body .haa-back .haa-in { font-size: 16px !important; }
  }
}

/* Attendance Administration pop-up: the fixed 360px home-location map is scaled to fit small phones */
@media (max-width: 400px) {
  body .haa-back .haa-mini-map-wrap { zoom: 0.8; }
}

/* ============================================================
   Work Submissions on a phone: the Submission Queue header, a
   size down. (The queue itself is left as the original table,
   swiped sideways inside its card.)
   ============================================================ */
@media (max-width: 600px) {
  /* --- the queue's own header, a size down for phones ---------------
     Title and the New Submission button share one row, the helper
     sentence is dropped, and the filter tabs and search are slimmer. */
  #root .content .wsq .wsq-card { padding: 12px !important; }
  #root .content .wsq .wsq-head {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important; gap: 10px !important;
    margin-bottom: 10px !important; padding: 0 !important;
  }
  #root .content .wsq .wsq-head > div:first-child { min-width: 0; padding-left: 10px !important; }
  #root .content .wsq .wsq-head h2 { font-size: 17px !important; line-height: 1.25 !important; margin: 0 !important; }
  #root .content .wsq .wsq-head p { display: none !important; }
  #root .content .wsq .wsq-head > button {
    padding: 0 12px !important; min-height: 34px !important; height: 34px !important;
    font-size: 12.5px !important; border-radius: 10px !important; white-space: nowrap;
    width: auto !important; margin: 0 !important;
  }
  #root .content .wsq .wsq-filters { gap: 8px !important; margin-bottom: 10px !important; }
  #root .content .wsq .wsq-tabs { padding: 3px !important; }
  #root .content .wsq .wsq-tabs > button { padding: 5px 10px !important; font-size: 12.5px !important; min-height: 0 !important; }
  #root .content .wsq .wsq-tabs > button > span { font-size: 10.5px !important; min-width: 16px !important; height: 16px !important; line-height: 16px !important; padding: 0 5px !important; }
}

/* ============================================================
   Employee profile / My Profile (HRIS) on a phone.
   Was: everything one-per-row (avatar, name, 4 big tiles, every
   field as label-over-value) — about 3,500px of scrolling.
   Now: avatar beside the name, small chips, two equal buttons,
   tiles 2 x 2, every field on ONE line (label left, value
   right), reporting numbers three across.
   Layout only: no text, link or button behaviour changes.
   ============================================================ */
@media (max-width: 640px) {
  body #hrms-hris-root { padding: 12px !important; }
  body #hrms-hris-root .hp-top { margin-bottom: 10px !important; }

  /* --- header: [avatar] name / email / chips, then the buttons --- */
  body #hrms-hris-root .hp-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start !important;
    column-gap: 12px !important; row-gap: 12px !important;
    padding: 14px !important; margin-bottom: 12px !important;
    background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  }
  body #hrms-hris-root .hp-av { width: 56px !important; height: 56px !important; font-size: 19px !important; }
  body #hrms-hris-root .hp-who { width: auto !important; min-width: 0 !important; }
  body #hrms-hris-root .hp-who h2 {
    font-size: 19px !important; line-height: 1.25 !important; margin-bottom: 3px !important;
    overflow-wrap: anywhere;
  }
  body #hrms-hris-root .hp-sub { font-size: 12.5px !important; margin-bottom: 8px !important; gap: 4px 8px !important; }
  body #hrms-hris-root .hp-sub .hp-ic { width: 14px; height: 14px; }
  body #hrms-hris-root .hp-chips { gap: 6px !important; }
  body #hrms-hris-root .hp-chip { font-size: 11px !important; padding: 3px 8px !important; gap: 5px !important; border-radius: 7px !important; }
  body #hrms-hris-root .hp-chip .hp-ic { width: 12px; height: 12px; }
  body #hrms-hris-root .hp-actions {
    grid-column: 1 / -1; width: 100% !important;
    display: flex !important; gap: 8px !important; flex-wrap: wrap;
  }
  body #hrms-hris-root .hp-actions > * {
    flex: 1 1 0 !important; min-width: 120px; min-height: 40px !important;
    display: inline-flex !important; align-items: center; justify-content: center !important;
    padding: 0 12px !important; font-size: 13.5px !important; margin: 0 !important;
  }

  /* --- stat tiles: 2 x 2 --- */
  body #hrms-hris-root .hp-strip {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important; margin-bottom: 12px !important;
  }
  body #hrms-hris-root .hp-tile { padding: 10px !important; gap: 9px !important; min-width: 0; }
  body #hrms-hris-root .hp-tile > div:last-child { min-width: 0; }
  body #hrms-hris-root .hp-tile-ic { width: 34px !important; height: 34px !important; border-radius: 9px !important; }
  body #hrms-hris-root .hp-tile-ic svg { width: 19px; height: 19px; }
  body #hrms-hris-root .hp-tl { font-size: 10.5px !important; }
  body #hrms-hris-root .hp-tv { font-size: 18px !important; line-height: 1.2 !important; margin: 1px 0 !important; }
  body #hrms-hris-root .hp-ts { font-size: 10.5px !important; line-height: 1.3 !important; overflow-wrap: anywhere; }

  /* --- tab row --- */
  body #hrms-hris-root .hp-tabs { gap: 2px !important; margin-bottom: 12px !important; scrollbar-width: none; }
  body #hrms-hris-root .hp-tabs::-webkit-scrollbar { display: none; }
  body #hrms-hris-root .hp-tab { padding: 9px 11px !important; font-size: 13px !important; gap: 6px !important; white-space: nowrap; flex: 0 0 auto; }
  body #hrms-hris-root .hp-tab .hp-ic { width: 15px; height: 15px; }

  /* --- cards: tighter, and each field on one line --- */
  body #hrms-hris-root .hp-ov { gap: 10px !important; margin-bottom: 10px !important; }
  body #hrms-hris-root .hp-card { margin-bottom: 10px; border-radius: 14px !important; }
  body #hrms-hris-root .hp-ov .hp-card { margin-bottom: 0; }
  body #hrms-hris-root .hp-ov .hp-ch,
  body #hrms-hris-root .hp-org .hp-ch { padding: 11px 14px !important; font-size: 14px !important; }
  body #hrms-hris-root .hp-cb { padding: 4px 14px 8px !important; }
  body #hrms-hris-root .hp-row,
  body #hrms-hris-root .hp-ov .hp-row {
    display: grid !important;
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr) !important;
    column-gap: 12px !important; align-items: baseline;
    padding: 8px 0 !important; font-size: 13px !important;
  }
  body #hrms-hris-root .hp-row > :first-child { font-size: 12px !important; }
  body #hrms-hris-root .hp-row > :last-child {
    text-align: right !important; overflow-wrap: anywhere; word-break: normal !important; min-width: 0;
  }
  body #hrms-hris-root .hp-today-empty { padding: 14px 8px !important; gap: 8px !important; font-size: 13px !important; }
  body #hrms-hris-root .hp-today-art { width: 84px !important; height: 70px !important; }

  /* --- work setup: two cells per row, the long ones full width --- */
  body #hrms-hris-root .hp-ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body #hrms-hris-root .hp-ws-cell { padding: 10px 12px !important; min-width: 0; border-bottom: 1px solid var(--border2); }
  body #hrms-hris-root .hp-ws-cell:nth-child(odd):not(:last-child) { border-right: 1px solid var(--border2) !important; }
  body #hrms-hris-root .hp-ws-cell:last-child:nth-child(odd) { grid-column: 1 / -1; border-bottom: 0; }
  body #hrms-hris-root .hp-ws-v { font-size: 13.5px !important; overflow-wrap: anywhere; }
  body #hrms-hris-root .hp-ws-s { font-size: 11.5px !important; line-height: 1.4 !important; overflow-wrap: anywhere; }

  /* --- team & reporting: the three numbers side by side --- */
  body #hrms-hris-root .hp-org-body { padding: 0 12px 12px !important; gap: 12px !important; }
  body #hrms-hris-root .hp-org-stats { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body #hrms-hris-root .hp-ostat {
    flex-direction: column-reverse; align-items: flex-start !important; gap: 6px;
    padding: 10px !important; border-bottom: 0 !important; border-right: 1px solid var(--border2); min-width: 0;
  }
  body #hrms-hris-root .hp-ostat:last-child { border-right: 0; }
  body #hrms-hris-root .hp-ostat small { font-size: 10.5px !important; line-height: 1.25; }
  body #hrms-hris-root .hp-ostat b { font-size: 19px !important; }
  body #hrms-hris-root .hp-ostat .hp-tile-ic { width: 28px !important; height: 28px !important; }
  body #hrms-hris-root .hp-ostat .hp-tile-ic svg { width: 16px; height: 16px; }
  body #hrms-hris-root .hp-node { padding: 10px 12px !important; }
  body #hrms-hris-root .hp-node .hp-pav { width: 40px !important; height: 40px !important; font-size: 14px !important; }
}

/* ============================================================
   HRIS employee list on a phone: keep the full table and allow
   horizontal swiping, like the dashboard employee directory.
   ============================================================ */
body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card .table-wrap th {
  text-align: left !important;
}

@media (max-width: 600px) {
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border2); border-radius: 14px; background: var(--bg2);
  }
  /* --- the Employee Records header, a size down for phones ----------
     Title and Add Employee share one row; the department chips stay
     on ONE row that swipes sideways instead of wrapping to two. */
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head:has(+ div > .chip) {
    display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
    align-items: center !important; justify-content: space-between !important;
    gap: 10px !important; margin-bottom: 10px !important;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head:has(+ div > .chip) > div { min-width: 0; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head:has(+ div > .chip) h2 { font-size: 17px !important; line-height: 1.25 !important; margin: 0 !important; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head:has(+ div > .chip) > .btn-primary {
    width: auto !important; flex: 0 0 auto !important; margin: 0 !important;
    min-height: 34px !important; height: 34px !important; padding: 0 12px !important;
    font-size: 12.5px !important; border-radius: 10px !important; white-space: nowrap;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head + div:has(> .chip) {
    flex-wrap: nowrap !important; overflow-x: auto !important; gap: 6px !important;
    margin-bottom: 10px !important; padding-bottom: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head + div:has(> .chip)::-webkit-scrollbar { display: none; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head + div:has(> .chip) > .chip {
    flex: 0 0 auto !important; white-space: nowrap; padding: 5px 11px !important; font-size: 12.5px !important;
  }
}

/* HRIS Employee Records on a phone / tablet: still the full table, but
   roomier and cleaner. Generous cell padding, a soft header band, one line
   per row, a rounded outline and a gentle row highlight. It swipes sideways
   when the columns are wider than the screen. */
@media (max-width: 1020px) {
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap {
    overflow-x: auto !important; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border2); border-radius: 14px; background: var(--bg2);
    scrollbar-width: thin;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap table {
    border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100% !important;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap thead th {
    padding: 12px 14px !important; background: var(--bg3); white-space: nowrap;
    font-size: 11px !important; font-weight: 700; letter-spacing: .6px !important; text-transform: uppercase;
    color: var(--text3); border-bottom: 1px solid var(--border2) !important; border-radius: 0 !important;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap tbody td {
    padding: 14px 14px !important; white-space: nowrap; font-size: 13px !important;
    border-bottom: 1px solid var(--border2) !important; vertical-align: middle;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap tbody tr:last-child td { border-bottom: 0 !important; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap tbody tr:hover td { background: color-mix(in srgb, var(--accent) 6%, var(--bg2)); }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap th:first-child,
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap td:first-child { min-width: 176px; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap td[colspan] { white-space: normal; text-align: center; }
}
/* tablet: a little tighter so all columns fit; title and button on one row */
@media (min-width: 601px) and (max-width: 1020px) {
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap thead th,
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap tbody td { padding-left: 9px !important; padding-right: 9px !important; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap th:first-child,
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head ~ .table-wrap td:first-child { min-width: 0; padding-left: 14px !important; }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head:has(+ div > .chip) {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    justify-content: space-between !important; gap: 12px !important;
  }
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .card > .sec-head:has(+ div > .chip) > .btn-primary {
    width: auto !important; flex: 0 0 auto !important; white-space: nowrap;
  }
}

/* ============================================================
   Work Submissions on a phone: the four top cards use the same
   tile design as Leave Management (and the dashboard): four
   across, small label on top, number under it, a thin coloured
   rule along the top, soft tint, the icon beside the number,
   and no sub-line.
   ============================================================ */
@media (max-width: 600px) {
  #root .content .wsq .wsq-kpis.wsq-kpis {
    display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important; margin-bottom: 10px !important;
  }
  #root .content .wsq .wsq-kpis.wsq-kpis > div {
    position: relative; overflow: hidden; min-width: 0;
    display: block !important; aspect-ratio: auto !important;
    min-height: 0 !important; height: auto !important;
    padding: 9px 6px 8px !important;
    border: 1px solid var(--border2) !important; border-radius: 12px !important;
    box-shadow: none !important; transform: none !important;
    background: linear-gradient(158deg, color-mix(in srgb, currentColor 9%, var(--bg2)), var(--bg2) 62%) !important;
  }
  /* the thin coloured rule along the top, in the card's own colour */
  #root .content .wsq .wsq-kpis.wsq-kpis > div::after {
    content: "" !important; display: block !important; position: absolute !important;
    inset: 0 0 auto 0 !important; height: 2px !important; opacity: 1 !important;
    background: currentColor !important;
  }
  /* label on top; under it the icon sits beside the number, as on Leave Management */
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div {
    display: grid !important; grid-template-columns: auto minmax(0, 1fr);
    column-gap: 6px; row-gap: 3px; align-items: center !important;
  }
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div > div:first-child { display: contents !important; }
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div > div:last-child:has(svg) {
    grid-row: 2; grid-column: 1; display: flex !important; align-items: center;
    padding: 0 !important; background: transparent !important; border-radius: 0 !important;
  }
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div > div:last-child:has(svg) svg { width: 18px; height: 18px; }
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div > div:first-child > div:nth-child(1) {
    font-size: 10px !important; font-weight: 600 !important; letter-spacing: .04em !important;
    line-height: 1.25 !important; color: var(--text2) !important;
    white-space: normal !important; overflow-wrap: anywhere; min-height: 21px;
    grid-row: 1; grid-column: 1 / -1;
  }
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div > div:first-child > div:nth-child(2) {
    font-size: 19px !important; font-weight: 700 !important; line-height: 1 !important;
    margin: 0 !important; color: var(--text) !important; letter-spacing: 0 !important;
    grid-row: 2; grid-column: 2;
  }
  #root .content .wsq .wsq-kpis.wsq-kpis > div > div > div:first-child > div:nth-child(3) { display: none !important; }
}

/* ============================================================
   Bench Work Submissions on a phone.

   Toolbar: was search + five full-width controls stacked (286px
   tall). Now search on top, then two per row, with New
   Submission as the one full-width button.

   New Submission / Edit form: the two columns were unequal
   (215px / 156px) and a label that wrapped pushed its box out of
   line with its neighbour. Now two EQUAL columns with every box
   on the same line as its neighbour, the date-and-time field
   full width, and Cancel / Create as two thumb-sized buttons
   pinned to the bottom of the sheet.
   ============================================================ */
@media (max-width: 600px) {
  #hrms-bs-root .bss-toolbar {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important; margin-bottom: 12px !important; align-items: stretch !important;
  }
  #hrms-bs-root .bss-toolbar > * { min-width: 0; width: 100% !important; max-width: none !important; margin: 0 !important; }
  #hrms-bs-root .bss-toolbar > .bss-search,
  #hrms-bs-root .bss-toolbar > .bss-btn.primary,
  #hrms-bs-root .bss-toolbar > .bss-count { grid-column: 1 / -1; }
  #hrms-bs-root .bss-toolbar > .bss-btn,
  #hrms-bs-root .bss-toolbar > .bss-sel,
  #hrms-bs-root .bss-toolbar > div > .bss-btn { min-height: 38px; width: 100% !important; }
  #hrms-bs-root .bss-toolbar > .bss-btn.primary { min-height: 40px; }

  #hrms-bs-modal .bss-dw-h { padding: 14px 16px !important; }
  #hrms-bs-modal .bss-dw-b {
    padding: 14px 16px 0 !important;
    display: flex !important; flex-direction: column;
  }
  #hrms-bs-modal .bss-f {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
  }
  /* label on top, box at the bottom of the cell: neighbours always line up */
  #hrms-bs-modal .bss-f > div { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
  #hrms-bs-modal .bss-f > div:has(input[type="datetime-local"]) { grid-column: 1 / -1; }
  #hrms-bs-modal .bss-f .bss-lb { font-size: 11.5px !important; line-height: 1.3; margin-bottom: 5px !important; }
  #hrms-bs-modal .bss-f .bss-in,
  #hrms-bs-modal .bss-f .bss-sel,
  #hrms-bs-modal .bss-f .bss-ta { width: 100% !important; max-width: none !important; min-height: 40px; box-sizing: border-box; }
  #hrms-bs-modal .bss-f .bss-ta { min-height: 84px; }
  #hrms-bs-modal .bss-err { order: 2; margin: 8px 0 0 !important; }
  #hrms-bs-modal .bss-err:empty { display: none; }
  #hrms-bs-modal .bss-dw-b { background: inherit; }
  #hrms-bs-modal .bss-act {
    order: 3; margin-top: auto !important;
    position: sticky; bottom: 0; z-index: 2;
    display: flex !important; flex-direction: row-reverse; gap: 10px !important;
    padding: 12px 0 14px !important; background: inherit;
  }
  #hrms-bs-modal .bss-act > .bss-btn { flex: 1 1 0 !important; min-height: 42px; font-size: 14px !important; justify-content: center; }
}
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) {
    #hrms-bs-modal .bss-f .bss-in,
    #hrms-bs-modal .bss-f .bss-sel,
    #hrms-bs-modal .bss-f .bss-ta { font-size: 16px !important; }
  }
}

/* ============================================================
   List pagers — one small size everywhere (desktop AND phone).

   The pagers had grown to different sizes (Dashboard 36px
   buttons, Payroll / HRIS 30px, Onboarding up to 34px, Work
   Submissions 27-29px, F2F Interview 23-24px) and the larger
   ones looked heavy under a table. All of them now use the same
   small control: 26px tall, 11.5px text, tight spacing.
   Only sizes change here; the phone layout (centred, two
   lines) is in the next block.
   ============================================================ */
body #hrms-payroll-root .pr-pager { padding: 8px 12px !important; font-size: 11.5px !important; gap: 6px 10px !important; }
body #hrms-hris-pager { margin-top: 8px !important; font-size: 11.5px !important; gap: 6px 10px !important; }
body .hrms-dir-pagination { min-height: 0 !important; padding: 8px 2px !important; gap: 6px 8px !important; font-size: 11.5px !important; }
body .hrms-dir-pagination .hrms-dir-pagination-controls { gap: 6px !important; }
body .ob-pg { font-size: 11.5px !important; gap: 6px !important; }
#root .content .hr-pager { margin-top: 10px !important; }
body .hrms-iv-pager { margin-top: 8px !important; font-size: 11.5px !important; gap: 8px !important; }

body #hrms-payroll-root .pr-pager button,
body #hrms-hris-pager button,
#root .content .wsq .wsq-pager button,
#root .content .wsq .wsq-pager select,
#root .content .hr-pager button,
body .hrms-iv-pager button,
body .hrms-dir-pagination .hrms-dir-page-size select,
body .hrms-dir-pagination .hrms-dir-page-btn,
body .ob-pg .ob-btn,
body .ob-pg .ob-sel {
  height: 26px !important; min-height: 0 !important;
  padding-top: 0 !important; padding-bottom: 0 !important;
  font-size: 11.5px !important; line-height: 1 !important;
  border-radius: 7px !important;
}
body #hrms-payroll-root .pr-pager button,
body #hrms-hris-pager button,
#root .content .wsq .wsq-pager button { min-width: 26px !important; width: auto !important; padding-left: 8px !important; padding-right: 8px !important; }
#root .content .hr-pager button,
body .hrms-iv-pager button,
body .ob-pg .ob-btn { padding-left: 9px !important; padding-right: 9px !important; }
body .hrms-dir-pagination .hrms-dir-page-btn { min-width: 44px !important; padding-left: 9px !important; padding-right: 9px !important; }

/* ============================================================
   List pagers on a phone — one look for all of them.

   Each page grew its own pager and they did not agree on a
   phone: F2F Interview's buttons were 23-24px tall, Work
   Submissions' 27px, and Onboarding squeezed everything onto
   one line so its buttons wrapped to two lines (51px). Now, on
   every page: the "Showing ..." count sits on the left and the
   controls on the right, on one line whenever they fit (they
   wrap to a second line only on the narrowest screens or where
   there is also a page-size box), and every button / page-size
   box is 34px tall, big enough to tap.

   Covers: Payroll (.pr-pager), HRIS (#hrms-hris-pager), Work
   Submissions (.wsq-pager), F2F Interview (.hr-pager,
   .hrms-iv-pager), Dashboard directory (.hrms-dir-pagination)
   and Onboarding (.ob-pg). Desktop is not touched.
   ============================================================ */
@media (max-width: 600px) {
  /* --- F2F Interview: Upcoming / Completed lists, Select Candidate to Screen --- */
  body .hrms-iv-pager { flex-wrap: wrap; gap: 8px 10px !important; margin-top: 12px !important; font-size: 11.5px !important; }
  body .hrms-iv-pager button { min-height: 26px; padding: 0 9px !important; font-size: 11.5px !important; }

  /* --- F2F Interview: Schedule & Links, Follow-up Emails, Recordings --- */
  #root .content .hr-pager {
    flex-wrap: wrap !important; justify-content: space-between !important;
    gap: 6px 10px !important; row-gap: 6px !important; margin-top: 10px !important;
  }
  #root .content .hr-pager > div:first-child { flex: 0 1 auto; font-size: 11.5px !important; }
  #root .content .hr-pager > div:last-child { margin-left: auto !important; align-items: center; gap: 6px !important; }
  #root .content .hr-pager button {
    min-height: 26px; padding: 0 9px !important; font-size: 11.5px !important;
  }

  /* --- Work Submissions --- */
  #root .content .wsq .wsq-pager {
    flex-wrap: wrap !important; justify-content: center !important; gap: 8px !important;
  }
  #root .content .wsq .wsq-pager > div:first-child { flex: 1 1 100%; text-align: center; }
  #root .content .wsq .wsq-pager > div:last-child { justify-content: center; flex-wrap: wrap; gap: 6px !important; }
  #root .content .wsq .wsq-pager button,
  #root .content .wsq .wsq-pager select { min-height: 26px; min-width: 26px; font-size: 11.5px !important; }

  /* --- Dashboard employee directory --- */
  body .hrms-dir-pagination { justify-content: flex-end !important; min-height: 0 !important; padding: 8px 2px !important; gap: 6px 8px !important; }
  body .hrms-dir-pagination .hrms-dir-page-size select,
  body .hrms-dir-pagination .hrms-dir-page-btn { height: 26px !important; }

  /* --- Onboarding lists: count + page size on one line, Prev / Page / Next under it --- */
  body .ob-pg {
    flex-wrap: wrap !important; justify-content: center !important; align-items: center !important;
    gap: 8px !important; font-size: 12px;
  }
  body .ob-pg .sp { flex: 1 1 100% !important; height: 0; margin: 0 !important; }
  body .ob-pg > span { white-space: nowrap; }
  body .ob-pg .ob-btn { white-space: nowrap; min-height: 26px; padding: 0 9px !important; }
  body .ob-pg .ob-sel { min-height: 26px; }
  /* --- Payroll and HRIS (their own styles set 34px): same compact size --- */
  /* count on the left, controls on the right, on ONE line whenever they fit */
  body #hrms-payroll-root .pr-pager { padding: 8px 4px 2px !important; gap: 6px 8px !important; font-size: 11.5px !important; justify-content: space-between !important; }
  body #hrms-payroll-root .pr-pager .pr-pager-info,
  body #hrms-hris-pager .hpg-info { width: auto !important; text-align: left !important; }
  body #hrms-payroll-root .pr-pager .pr-pager-nav,
  body #hrms-hris-pager .hpg-nav { margin-left: auto; }
  body #hrms-hris-pager { justify-content: space-between !important; }
  body #hrms-payroll-root .pr-pager button,
  body #hrms-hris-pager button { height: 26px !important; min-width: 26px !important; padding: 0 9px !important; font-size: 11.5px !important; }
  body #hrms-hris-pager { gap: 6px 8px !important; margin-top: 10px !important; font-size: 11.5px !important; }
  body .hrms-dir-pagination .hrms-dir-page-btn { min-width: 44px !important; padding: 0 9px !important; font-size: 11.5px !important; }
  body #hrms-iv-screen-pager button { min-height: 26px !important; padding: 0 9px !important; }
  body .ob-pg { gap: 3px 8px !important; padding-top: 8px !important; padding-bottom: 8px !important; }
}

/* ============================================================
   Phones: minimum sizes. A number of tiles, badges and buttons use
   fixed pixel sizes picked for desktop (8-10px text, 20-28px buttons).
   On a phone those are hard to read and hard to hit, so:
   - small text is lifted to 10.5px (tile labels, trends, badges, axis
     and ring labels); values and headings are not touched;
   - small buttons, pills, selects and pagination get a 32px tap height.
   ============================================================ */
@media (max-width: 600px) {
  #root .content .stat-label { font-size: 10.5px !important; line-height: 1.25; padding-right: 0 !important; overflow-wrap: anywhere; }
  /* the note under a tile number wraps instead of being cut to "Live Calculat..." */
  #root .content .c-nm { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
  #root .content .stat-trend, #root .content .stat-sub { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.25; }
  /* text whose size is written inline in the page (8-9.5px) is lifted too */
  #root .content [style*="font-size: 8px"], #root .content [style*="font-size: 8.5px"],
  #root .content [style*="font-size: 9px"], #root .content [style*="font-size: 9.5px"],
  #root .content [style*="font-size:8px"], #root .content [style*="font-size:8.5px"],
  #root .content [style*="font-size:9px"], #root .content [style*="font-size:9.5px"] { font-size: 10.5px !important; }
  #root .content .stat-trend,
  #root .content .hram-rate-label,
  #root .content .chart-bar-label,
  #root .content .hram-ring-label,
  #root .content .haa-ci-l,
  #root .content .haa-stat-l,
  #root .content .hrms-pc-chip,
  #root .content .hrms-pill-count,
  #root .content .hram-status-badge,
  #root .content .c-status { font-size: 10.5px !important; }

  #root .content .cc-quick-job-pill,
  #root .content .cc-quick-jobs-total,
  #root .content .cc-expand-btn,
  #root .content .hrms-pro-pill-btn,
  #root .content .hrms-filter-pill,
  #root .content .hram-pill,
  #root .content .hram-period-btn,
  #root .content .hrms-dir-page-btn,
  #root .content .haa-flt,
  #root .content .btn-sm, #root .content .chip, #root .content .subs-why-btn,
  #root .content .hrms-cs-day-btn, #root .content .lp-x, #root .content button.on,
  #root .content .cc-toggle-tab,
  #root .content .hrms-iv-sel,
  #root .content .hrms-iv-q,
  #root .content .cc-job-code-input,
  #root .content button:not([class]) {
    min-height: 32px; box-sizing: border-box;
  }
  #root .content .cc-quick-job-pill,
  #root .content .hrms-pro-pill-btn,
  #root .content .hrms-filter-pill,
  #root .content .hram-pill,
  #root .content .hram-period-btn,
  #root .content .cc-quick-jobs-total,
  #root .content .cc-expand-btn,
  #root .content button:not([class]) { display: inline-flex; align-items: center; justify-content: center; }
  #root .content .hrms-dir-page-btn,
  #root .content .hram-ta-search, #root .content .hram-ta-status,
  #root .content .hram-ms-search, #root .content .hram-ms-rate,
  #root .content .hram-range, #root .content .hram-status,
  #root .content .hram-search, #root .content .hram-btn,
  #root .content .haa-search,
  #root .content select:not([class]),
  #root .content input:not([class]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
    min-height: 34px !important; box-sizing: border-box;
  }
}

/* very small phones (360px and under): tile labels a little tighter so long words like
   ATTENDANCE / ENROLLMENT still fit a quarter-width tile on one line */
@media (max-width: 380px) {
  #root .content .stat-label { font-size: 9.5px !important; letter-spacing: 0 !important; }
}

/* HRIS "Data Completeness": the tiles stay four across. The one long word, COMPLETENESS, is set a
   little smaller (and a touch tighter) than its neighbours so it stays whole on its line instead of
   dropping its last letter. */
@media (max-width: 480px) {
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .stat-grid .stat-card:nth-child(2) .stat-label {
    font-size: 8.5px !important; letter-spacing: 0 !important; overflow-wrap: normal !important;
  }
}
@media (max-width: 380px) {
  body:has(.sidebar a.nav-item.active[href="/hr/hris"]) #root .content .stat-grid .stat-card:nth-child(2) .stat-label { font-size: 8px !important; }
}

/* ============================================================
   Work Submissions: every column fits its content, pills line up.
   - TYPE, EMPLOYEE and REVIEWER were a few pixels too narrow, so the "Code Review" and
     "Presentation" pills and a long name ("Yaswanth Telaprolu") were cut by the column
     edge. Column shares are rebalanced so each has room for the widest thing in it.
   - The type pills (42-90px wide) and status pills (92-107px) are each set to one width,
     text centred, so the pills line up as a column instead of a ragged edge.
   - The fixed-share layout needs a table about 1050px wide (a window of ~1400px). Below
     that the table uses auto layout and scrolls inside its card, so nothing is cut off.
   ============================================================ */
@media (min-width: 1401px) {
  .wsq thead th:nth-child(1), .wsq tbody td:nth-child(1) { width: 17%; }
  .wsq thead th:nth-child(2), .wsq tbody td:nth-child(2) { width: 11%; }
  .wsq thead th:nth-child(3), .wsq tbody td:nth-child(3) { width: 18%; }
  .wsq thead th:nth-child(4), .wsq tbody td:nth-child(4) { width: 9%; }
  .wsq thead th:nth-child(5), .wsq tbody td:nth-child(5) { width: 16.5%; }
  .wsq thead th:nth-child(6), .wsq tbody td:nth-child(6) { width: 13%; }
  .wsq thead th:nth-child(7), .wsq tbody td:nth-child(7) { width: 7%; }
  .wsq thead th:nth-child(8), .wsq tbody td:nth-child(8) { width: 8.5%; }
}
@media (min-width: 1201px) and (max-width: 1400px) {
  .wsq table { table-layout: auto !important; min-width: 900px !important; }
  .wsq thead th, .wsq tbody td { padding: 11px 9px !important; }
  .wsq thead th:nth-child(n), .wsq tbody td:nth-child(n) { width: auto; }
  .wsq tbody td:nth-child(8) > div { flex-wrap: nowrap !important; }
  .wsq thead th:nth-child(8), .wsq tbody td:nth-child(8) { min-width: 190px; white-space: nowrap; }
}
/* one width for the type pills, one for the status pills (all screen sizes) */
.wsq tbody td:nth-child(2) > span,
.wsq tbody td:nth-child(2) > div {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 92px; box-sizing: border-box; text-align: center;
}
.wsq tbody td:nth-child(6) > span,
.wsq tbody td:nth-child(6) > button,
.wsq tbody td:nth-child(6) > div {
  min-width: 112px; box-sizing: border-box; justify-content: center;
}

/* where the table scrolls (1400px and below) the people columns keep a floor so a name is
   one line in both EMPLOYEE and REVIEWER, and the type / status pills are never squeezed */
@media (max-width: 1400px) {
  .wsq thead th:nth-child(1), .wsq tbody td:nth-child(1),
  .wsq thead th:nth-child(5), .wsq tbody td:nth-child(5) { min-width: 180px; }
  .wsq thead th:nth-child(2), .wsq tbody td:nth-child(2) { min-width: 114px; }
  .wsq thead th:nth-child(6), .wsq tbody td:nth-child(6) { min-width: 134px; }
}

/* Cards in a two-column grid: content starts at the top.
   theme-overrides.css makes every ".grid-2 .card" a column with justify-content: space-between
   (written for the Performance chart cards, where the chart is pushed to the bottom). On any
   other card that sits beside a taller one - Claims Summary beside Benefits Plans - it pulled
   the title to the top and the table to the bottom, leaving a big empty gap between them.
   Only cards that hold a chart keep the spread-out layout. */
.grid-2 .card:not(:has(.chart-bars)) { justify-content: flex-start !important; }

/* Room for the floating buttons.
   The AI bot (bottom-right, 24px up, 52px tall) and the Guide pill beside it (28px up) are fixed
   to the screen, so at the end of a long page they sat on top of whatever was last - on Attendance
   Policies, the Create profile button. The page area now ends 96px above the bottom edge, so the
   last row can always be scrolled clear of them. (The chat page has its own bottom bar and is
   left alone.) */
.hrms-sc-root { padding-bottom: 96px !important; }
#root .hrms-sc-root[data-sc] { padding-bottom: 96px !important; }
body:not(:has(#hrms-chat-page)) .content { padding-bottom: 96px; }
/* on a phone the Guide pill rides higher (about 88px up, above the chat bar), so the page area ends 140px above the bottom */
@media (max-width: 768px) {
  .hrms-sc-root { padding-bottom: 140px !important; }
  #root .hrms-sc-root[data-sc] { padding-bottom: 140px !important; }
  body:not(:has(#hrms-chat-page)) .content { padding-bottom: 140px; }
}

/* Form W-4 uses the full page width.
   The page script caps it at 860px (inline) inside a 1280px column, so on a wide screen the form
   sat in a narrow strip with large empty bands left and right. Other pages fill the page area;
   this one now does too. */
#root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-page { max-width: none !important; }

/* Form W-4: hover effects on everything you can point at.
   Same language as the cards inside the rest of HRMS: a 2px lift, a soft shadow and a lightly
   tinted border over 0.2s. Cards and notices lift; inputs and dropdowns get an accent border;
   checkbox rows get a soft highlight; buttons lift (the main button also brightens).
   Only on devices that really hover, and not for people who asked for reduced motion. */
#root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-card, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-step, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-info, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-ok, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-empty,
#root .hrms-sc-root[data-sc="/my-pay/w4"] .input-field, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-check, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-sm, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-primary, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-head select {
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, border-color .2s ease, background .2s ease, filter .2s ease;
}
@media (hover: hover) {
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-card:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-step:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-info:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-ok:hover {
    transform: translateY(-2px);
    box-shadow: var(--hv-sh);
    border-color: color-mix(in srgb, var(--accent) 20%, var(--border2));
  }
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .input-field:hover:not(:focus) {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border2));
    box-shadow: 0 4px 14px rgba(12, 20, 40, .08);
  }
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-check:hover {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    border-radius: 8px;
    cursor: pointer;
  }
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-sm:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border2));
    box-shadow: 0 6px 16px rgba(12, 20, 40, .12);
  }
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  }
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-sm:active, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-primary:active { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-card, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-step, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-info, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-ok, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-check, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-sm, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-primary { transition: none; }
  #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-card:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-step:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-info:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .pus-ok:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-sm:hover, #root .hrms-sc-root[data-sc="/my-pay/w4"] .btn-primary:hover { transform: none; }
}

/* Tax Declaration: proper hover on everything, except the regime box.
   - The blue box on the selected regime and the blue hover on the regime card are kept: they go
     with the "Show the side-by-side calculation" drop-down.
   - Every other box used the global dark-theme hover (a blue ring and blue glow). Here it is the
     same hover as the rest of HRMS: a 2px lift, a soft shadow and a lightly tinted border over 0.2s.
     Only the innermost boxes lift (deduction sections, the status card), so a card and the box
     inside it never move together. Fields get an accent border, rows and checkboxes a soft
     highlight, buttons lift, links brighten. Only for devices that really hover, and not with
     reduced motion. */
/* the selected regime keeps its blue box: it goes with the side-by-side calculation below it */
#root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-reg.on:hover { border-color: var(--accent); }
#root .hrms-sc-root[data-sc="/my-pay/tax"] .card, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-reg, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-sec, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-info, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-banner, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-proof,
#root .hrms-sc-root[data-sc="/my-pay/tax"] .input-field, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-check, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-item, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-chip, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-tab,
#root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-sm, #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-primary, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-link, #root .hrms-sc-root[data-sc="/my-pay/tax"] summary {
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease, filter .2s ease;
}
@media (hover: hover) {
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .card:not(:has(.ptax-reg, .ptax-sec)):hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-reg:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-sec:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--hv-sh);
    border-color: color-mix(in srgb, var(--accent) 20%, var(--border2));
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-info:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-banner:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-proof:hover {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border2));
    box-shadow: 0 4px 14px rgba(12, 20, 40, .08);
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .input-field:hover:not(:focus) {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border2));
    box-shadow: 0 4px 14px rgba(12, 20, 40, .08);
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-check:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-item:hover {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    border-radius: 8px;
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-chip:hover:not(.on) {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border2));
    color: var(--text);
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-tab:hover:not(.on) { color: var(--text); background: color-mix(in srgb, var(--accent) 7%, transparent); }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-sm:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border2));
    box-shadow: 0 6px 16px rgba(12, 20, 40, .12);
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
  }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-sm:active, #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-primary:active { transform: translateY(0); }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-link:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] summary:hover { filter: brightness(1.2); text-decoration-thickness: 2px; }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] summary { cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .card, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-reg, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-sec, #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-sm, #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-primary { transition: none; }
  #root .hrms-sc-root[data-sc="/my-pay/tax"] .card:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-reg:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .ptax-sec:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-sm:hover, #root .hrms-sc-root[data-sc="/my-pay/tax"] .btn-primary:hover { transform: none !important; }
}

/* shadow colour for the hover lift: soft grey on light, deeper black on dark so it shows */
#root .hrms-sc-root[data-sc="/my-pay/w4"], #root .hrms-sc-root[data-sc="/my-pay/tax"] { --hv-sh: 0 10px 26px rgba(12, 20, 40, .10); }
:root[data-theme="dark"] #root .hrms-sc-root[data-sc="/my-pay/w4"], :root[data-theme="dark"] #root .hrms-sc-root[data-sc="/my-pay/tax"] { --hv-sh: 0 10px 26px rgba(0, 0, 0, .40); }
/* replaces the global dark-theme "blue ring + blue glow" card hover on this page */
:root[data-theme="dark"] body:not(:has(.sidebar a.nav-item.active[href="/employees/checkin"])):not(:has(#hrms-chat-page)) #root .hrms-sc-root[data-sc="/my-pay/tax"] .card:not(:has(.ptax-reg)):not(:has(.ptax-sec)):hover {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border2)) !important;
  box-shadow: var(--hv-sh) !important;
}
:root[data-theme="dark"] body:not(:has(.sidebar a.nav-item.active[href="/employees/checkin"])):not(:has(#hrms-chat-page)) #root .hrms-sc-root[data-sc="/my-pay/tax"] .card:has(.ptax-sec):not(:has(.ptax-reg)):hover {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border2)) !important;
  box-shadow: none !important;
}

/* Payouts & Banking → Integrations: long values (webhook URL) must wrap inside the card, not run past it. */
#root .hrms-sc-root .pbank-kv { flex-wrap: wrap; min-width: 0; }
#root .hrms-sc-root .pbank-kv span:last-child { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
#root .hrms-sc-root .pbank-kv .pbank-mono { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
#root .hrms-sc-root .pbank-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 600px) {
  #root .hrms-sc-root .pbank-kv { flex-direction: column; gap: 2px; align-items: stretch; }
  #root .hrms-sc-root .pbank-kv span:last-child { text-align: left; }
}

/* Payroll Run: Guided Wizard and extra card actions on phones. */
@media (max-width: 640px) {
  #hrms-payroll-root .pr-stepper { padding: 12px 10px !important; gap: 5px !important; justify-content: flex-start; scrollbar-width: none; }
  #hrms-payroll-root .pr-stepper::-webkit-scrollbar { display: none; }
  #hrms-payroll-root .pr-step-sep { display: none; }
  /* only the current step keeps its name; the rest shrink to their number */
  #hrms-payroll-root .pr-step-item { flex: 0 0 auto; gap: 6px; }
  #hrms-payroll-root .pr-step-item:not(.active) { font-size: 0; gap: 0; }
  #hrms-payroll-root .pr-step-item:not(.active) .pr-step-num { font-size: 11px; }
  #hrms-payroll-root .pr-step-num { width: 24px; height: 24px; }
  /* step body: the inline 24px padding is too deep for a 375px screen */
  #hrms-payroll-root .pr-card > div[style*="padding:24px"] { padding: 14px !important; }
  #hrms-payroll-root .pr-card > div[style*="padding:24px"] p { font-size: 13px; line-height: 1.5; }
  #hrms-payroll-root .pr-form-group label { font-size: 12px; }
  #hrms-payroll-root .pr-form-group input,
  #hrms-payroll-root .pr-form-group select,
  #hrms-payroll-root .pr-form-group textarea { font-size: 16px; min-width: 0; }
  #hrms-payroll-root [style*="max-width:750px"], #hrms-payroll-root [style*="max-width:600px"] { max-width: 100% !important; }
  /* "Action" column of a card, like "Actions" */
  .pr-table td[data-label="Action"] { grid-column: 1 / -1; }
  .pr-table td[data-label="Action"]::before { display: none; }
  .pr-table td .pr-btn { white-space: normal; }
}
@media (max-width: 640px) {
  /* Reports & Tax: the report picker wraps under its label instead of running off the card */
  #hrms-payroll-root .pr-toolbar > div[style*="display:flex"] { flex-wrap: wrap; width: 100%; min-width: 0; }
  #hrms-payroll-root .pr-toolbar .pr-select { min-width: 0; max-width: 100%; width: 100%; font-size: 13px; }
}
@media (max-width: 640px) {
  /* Payroll Run on phones: keep every size in phone range (nothing oversized, nothing tiny). */
  #hrms-payroll-root .pr-card h2, #hrms-payroll-root .pr-card h3 { font-size: 17px !important; line-height: 1.3; }
  #hrms-payroll-root .pr-card h4 { font-size: 14px !important; }
  #hrms-payroll-root .pr-card [style*="font-size:2"], #hrms-payroll-root .pr-card [style*="font-size: 2"],
  #hrms-payroll-root .pr-card [style*="font-size:3"], #hrms-payroll-root .pr-card [style*="font-size: 3"] { font-size: 20px !important; }
  #hrms-payroll-root .pr-card p { font-size: 13px !important; line-height: 1.5; max-width: 100% !important; }
  #hrms-payroll-root .pr-table small, #hrms-payroll-root .pr-stat-label, #hrms-payroll-root .pr-stat-sub { font-size: 10.5px !important; }
  #hrms-payroll-root .pr-btn { font-size: 13px; }
  #hrms-payroll-root .pr-btn-sm { font-size: 12px; min-height: 32px; }
}
@media (max-width: 640px) {
  /* Pagination under every Payroll Run list: stacked, wraps, thumb-sized buttons */
  #hrms-payroll-root .pr-pager { flex-direction: column; align-items: stretch; gap: 8px; padding: 6px 2px 12px; text-align: center; font-size: 12px; }
  #hrms-payroll-root .pr-pager-nav { flex-wrap: wrap; justify-content: center; gap: 6px; }
  #hrms-payroll-root .pr-pager-nav button { min-width: 36px; min-height: 34px; font-size: 12.5px; }
}
@media (max-width: 640px) {
  /* Prev / Next share the first row; page numbers wrap below */
  #hrms-payroll-root .pr-pager-nav button:first-child { order: 1; flex: 1 1 40%; }
  #hrms-payroll-root .pr-pager-nav button:last-child { order: 2; flex: 1 1 40%; }
  #hrms-payroll-root .pr-pager-nav button:not(:first-child):not(:last-child) { order: 3; }
}

/* Job Applications on phones: one card per applicant instead of a sideways-scrolling table. */
@media (max-width: 640px) {
  .cr-table-wrap { overflow-x: visible !important; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .cr-table thead { display: none; }
  .cr-table, .cr-table tbody { display: block; width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
  .cr-table tbody tr {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px;
    width: 100%; box-sizing: border-box; padding: 13px 14px; margin-bottom: 10px;
    background: var(--bg2); border: 1px solid var(--border2, rgba(128,128,128,.25)); border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  }
  .cr-table td { display: block; min-width: 0; padding: 0 !important; border: 0 !important; background: transparent !important; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
  .cr-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text3, #8a9bb8); }
  .cr-table td[data-label="Applicant"] { grid-column: 1 / -1; padding: 0 96px 10px 0 !important; border-bottom: 1px solid var(--border2, rgba(128,128,128,.22)) !important; font-size: 13.5px; }
  .cr-table td[data-label="Applicant"]::before { display: none; }
  .cr-table td[data-label="Status"] { position: absolute; top: 12px; right: 12px; }
  .cr-table td[data-label="Status"]::before { display: none; }
  .cr-table td .cr-muted { font-weight: 500; font-size: 11.5px; }
  .cr-table tbody tr:hover td, .cr-table tbody tr:focus td { background: transparent !important; }
}

/* ------------------------------------------------------------
   Dashboard: hover on the big cards and the rows inside them.
   The cards already changed shadow and border on hover, but the change
   was too faint on the grey light-theme page to notice (a 10% shadow, a
   barely tinted border). They now get a clear shadow and accent border
   (no movement), as do the rows and pill buttons inside.
   ------------------------------------------------------------ */
@media (hover: hover) {
  :root:not([data-theme="dark"]) .hrms-dash :is(.hrms-dash-pro-card, .hrms-dash-charts > .card, .card):hover {
    transform: none !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .15), 0 2px 6px rgba(15, 23, 42, .08) !important;
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border2)) !important;
  }
  :root[data-theme="dark"] .hrms-dash :is(.hrms-dash-pro-card, .hrms-dash-charts > .card, .card):hover {
    transform: none !important;
  }
  .hrms-dash :is(.hrms-dash-pro-card, .card) { will-change: auto; }
}
/* rows inside the cards */
.hrms-dash .hrms-action-row,
.hrms-dash .hrms-event-row {
  margin-left: -8px; margin-right: -8px; padding-left: 8px; padding-right: 8px;
  border-radius: 8px; transition: background .15s ease, box-shadow .15s ease;
}
.hrms-dash .hrms-action-row:hover,
.hrms-dash .hrms-event-row:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.hrms-dash .hrms-dept-row-item:hover {
  background: color-mix(in srgb, var(--accent) 11%, transparent) !important;
}
.hrms-dash .hrms-pro-pill-btn:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg2)) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 22%, transparent);
}
.hrms-dash .hrms-dash-opts-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent) !important;
  border-color: var(--accent) !important;
}
@media (prefers-reduced-motion: reduce) {
  .hrms-dash :is(.hrms-dash-pro-card, .card):hover { transform: none !important; }
}

/* Onboarding candidate drawer on phones: field values were 16px next to 12px labels. */
@media (max-width: 640px) {
  .ob-dw .ob-kv .v, .ob-dw .v, .ob-dw .ob-empty-val { font-size: 13.5px !important; line-height: 1.4; overflow-wrap: anywhere; }
  .ob-dw h3 { font-size: 16px; }
}

/* Onboarding on phones: the wide tables scroll sideways inside their own box, but a drag that
   ended at the box's edge, or ran slightly diagonal, was handed on to the page and made it sway
   left and right. Keep the sideways scroll inside the box and give vertical drags to the page. */
@media (max-width: 1020px) {
  body:has(.sidebar a.nav-item.active[href^="/onboarding"]),
  html:has(.sidebar a.nav-item.active[href^="/onboarding"]) { overscroll-behavior-x: none; }
  body:has(.sidebar a.nav-item.active[href^="/onboarding"]) .ob-wrap,
  body:has(.sidebar a.nav-item.active[href^="/onboarding"]) .table-wrap {
    overflow-x: auto !important; overflow-y: hidden !important;
    overscroll-behavior-x: contain; overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ob-tabs, .ob-dw .ob-tabs, .ob-dw-b { overscroll-behavior-x: contain; }
  .ob-dw { overscroll-behavior: contain; overflow-x: hidden; }
}

/* Onboarding tables at every width: no vertical scrolling inside the table box (the page scrolls). */
body:has(.sidebar a.nav-item.active[href^="/onboarding"]) .ob-wrap { overflow-y: hidden; overscroll-behavior-x: contain; }
