/* CUSTOM DROPDOWN */
.dropdown-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* .dropdown-wrapper {
  z-index: 999;
} */

.dropdown-wrapper:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* KANBAN BORDER ON HOVER */

.kanban-block {
  border: 2px solid transparent;
}

.kanban-block.highlight {
  border: 2px dashed #4a90e2;
}

/* SIDEBAR  */

.sidebarModal {
  width: 350px;
  max-width: calc(100% - 1rem);
  height: calc(-2rem + 100vh);
  position: fixed;
  z-index: 999;
  border-radius: 1rem;
  top: 1rem;
  right: 1rem;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(2px);
  padding: 1rem;
  transform: translateX(calc(100% + 1rem));
  transition: 0.3s;
}

.sidebarModal.active {
  transform: translateX(0px);
  box-shadow: rgba(0, 0, 0, 0.1) -15px 5px 20px;
}

@media (max-width: 575px) {
  .sidebarModal {
    width: 300px;
  }
}

/* LIST DESIGN */
.list-checked {
  display: flex;
  flex-flow: column;
}

.list-checked li {
  margin: 5px 0;
  position: relative;
  padding-left: 20px;
}

.list-checked li:before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 600;
  font-size: 12px;
  color: #e54f38;
  position: absolute;
  left: 0;
}

@media (max-width: 575px) {
  #notificationContainer .list-checked li,
  #notificationContainer-mobile .list-checked li {
    padding-left: 26px !important; 
  }

  #notificationContainer .list-checked li:before,
  #notificationContainer-mobile .list-checked li:before {
    left: 4px !important; 
    top: 4px !important; 
    line-height: 1 !important;
  }
}

.sidebar {
  width: 75px;
  display: flex;
  flex-flow: column;
  align-items: center;
  padding: 15px;
}

.sidebox {
  opacity: 0;
  transition: 0.3s;
  top: 0;
  height: 100vh;
  top: 75px;
  visibility: hidden;
  font-size: 0.85rem;
}

/* Hover no longer shows sidebox — click toggle is used instead */

/* Show sidebox when sideboxmain has sidebox-active class */
.sideboxmain.sidebox-active .sidebox {
  opacity: 1;
  visibility: visible;
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(3px);
}

.sideboxmain {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  padding: 5px;
  border-radius: 50%;
  background-color: #0000000e;
  transition: 0.3s;
}

/* Comment this line for dynamic theme */
/* .sideboxmain:hover {
  background-color: #e34e38;
} */

/* Apply image filter when sidebox is active */
.sideboxmain.sidebox-active img {
  filter: brightness(0) invert(1);
}

.sideboxmain.active {
  background-color: #e34e38;
}

.sideboxmain img {
  width: 20px;
}

.sideboxmain.active img {
  filter: brightness(0) invert(1);
}

.sidebox ul li {
  border-bottom: 1px solid #0000000c;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.sidebox ul li a {
  transition: 0.3s;
  display: flex;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 5px;
  position: relative;
  transition: 0.3s;
  overflow: hidden;
}

.sidebox ul li a:after {
  content: "";
  position: absolute;
  width: 2px;
  height: 100%;
  /* Comment this line for dynamic theme */
  /* background-color: #e34e38; */
  opacity: 0;
  inset: 0;
  right: 0;
  left: auto;
  transition: 0.3s;
}

.sidebox ul li a:hover {
  background: rgb(227 78 56 / 10%);
  /* Comment this line for dynamic theme  */
  /* color: #e34e38; */
  /* border-right: 2px solid #e54f38; */
}

.sidebox ul li a:hover:after,
.sidebox ul li a.active:after {
  opacity: 1;
}

.sidebox ul li a.active {
  background: rgb(227 78 56 / 10%);
  color: #e34e38;
}

.breadcrumb {
  display: flex;
  flex-flow: wrap;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: #333;
}

@media (max-width: 767px) {
  .breadcrumb {
    row-gap: 0;
  }
}

.breadcrumb li {
  position: relative;
}

.breadcrumb li:not(:last-child):before {
  content: "\f105";
  font-family: "Font Awesome 6 Free";
  font-weight: 600;
  font-size: 10px;
  position: absolute;
  right: -15px;
  top: 4px;
  bottom: 0;
  margin: auto;
}

.breadcrumb li:last-child {
  color: #e54f38;
  font-weight: 500;
}

.breadcrumb li a {
  transition: 0.3s;
}

.breadcrumb li a:hover {
  color: #e54f38;
}

.stickyleft {
  position: sticky;
  left: 0;
  background-color: white;
}

.stickyleft-second {
  position: sticky;
  left: 38px;
  background-color: white;
}

.stickyright {
  position: sticky;
  right: 0;
  background-color: white;
}

/* CHECK IN OUT */
.check {
  padding: 8px 20px;
  border-radius: 5px;
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  width: 135px;
  height: 38px;
}

.check.checkin {
  color: #15ca0c;
  background: rgb(33 209 23 / 10%);
}

.check.checkout {
  color: #e9910d;
  background: rgb(233 145 13 / 10%);
}

.check .date,
.check .con {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.check .date {
  opacity: 1;
  z-index: 1;
}

.check .con {
  opacity: 0;
  z-index: 2;
}

/* On hover: show .con, hide .date */
.check:hover .date {
  opacity: 0;
}

.check:hover .con {
  opacity: 1;
}

@media (max-width: 991px) {
  .check {
    display: none;
  }
}

/* FORM DESIGN */
.myform input,
.myform select,
.myform textarea {
  padding: 0.5rem;
  border-radius: 5px;
  width: 100%;
  font-size: 0.75rem;
  border: 1px solid #e6e6e6;
  transition: 0.3s;
}

.myform input:focus,
.myform select:focus,
.myform textarea:focus {
  outline: unset;
  border: 1px solid #e54f38;
}

.myform label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
}

.btn {
  background: #e54f38;
  color: white;
  font-size: 13px;
  min-width: max-content;
  padding: 3px 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: 0.3s;
}

.btn:hover {
  background: #ac3b2a;
}

/* TOGGLE BUTTON */
.toggle-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: #aeaeb2;
  border-radius: 9999px;
  transition: background-color 0.3s;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-input:checked+.toggle-switch::after {
  transform: translateX(16px);
}

/* MULTI SELECT */
.select2-container--default .select2-selection--multiple {
  border: 1px solid #e7e7e7;
}

.select2-container--default .select2-selection--multiple:focus {
  outline: unset;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  font-size: 10px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  /* Comment this line for dynamic theme */
  /* background-color: #e54f38; */
  color: white;
  border: unset;
  height: 23px;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
  line-height: 18px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border-right: 1px solid #ffffff57;
  color: white;
  font-size: 10px;
  height: 100%;
}

.select2-results__option {
  font-size: 12px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #fff5f1;
  color: #e54f38;
}

.select2-container--default .select2-results__option--selected {
  background-color: #fff5f1;
  color: #e54f38;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
  border: solid #e7e7e7 1px;
  outline: 0;
}

.select2-container .select2-search--inline .select2-search__field {
  height: 25px;
}

.select2-dropdown {
  border: 1px solid #e7e7e7;
}

/* .select2-container {
  width: 100% ;
} */

.userbox {
  border: 1px solid #ebebeb;
  transition: 0.3s;
}

.userbox.active,
.userbox:hover {
  border: 1px solid #e34e38;
}

.userlist {
  display: flex;
}

/* .userlist li span {
  display: flex;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
  align-items: center;
  justify-content: center;
}
.userlist li span img {
  width: 100%;
}
.userlist li:nth-child(2) {
  margin-left: -10px;
}
.userlist li:nth-child(3) {
  margin-left: -10px;
}
.userlist li:nth-child(4) {
  margin-left: -10px;
}
.userlist li:nth-child(4) span {
  border: 3px solid white;
  background-color: #dbdbdb;
  font-size: 12px;
} */
.userlist li span {
  display: flex;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.userlist li span img {
  width: 100%;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.userlist li span a {
  display: block;
  width: 100%;
  height: 100%;
}

.userlist li:not(:first-child) {
  margin-left: -10px;
}

.userlist li:last-child span:not(:has(> a)) {
  border: 3px solid white;
  background-color: #dbdbdb;
  font-size: 12px;
  color: #666;
}

.userlist li:hover span {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
  position: relative;
}

.userlist li:hover span img {
  transform: scale(1.05);
}

.userlist li:not(:hover) span {
  transform: translateY(0) scale(1);
}

.usertablist {
  display: flex;
  flex-flow: wrap;
  gap: 10px;
}

.usertablist li button {
  border: 1px solid #e7e7e7;
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 0.8rem;
  transition: 0.3s;
  color: #333;
}

.usertablist li button.active,
.usertablist li button:hover {
  background-color: #e54f38;
  border: 1px solid #e54f38;
  color: white;
}

/* TAB DESIGN */

.mytab {
  border: 1px solid #e34e38;
  border-radius: 50px;
  overflow: hidden;
  padding: 5px;
  background-color: white;
  z-index: 9;
}

.mytab .tab-button.active {
  color: white;
  background: #e34e38;
  border-radius: 50px;
}

/* FOLDING KANBAN */
.compact {
  width: max-content !important;
}

.compact .task-card {
  display: none;
}

.compact .kanban-head {
  height: 100%;
  display: flex;
  align-items: flex-start;
  flex-flow: column;
  width: 50px;
}

.compact h5 {
  transform: rotate(90deg) translateX(0);
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 40px;
  width: max-content;
}

.compact-mode {
  display: flex !important;
}

.compact-mode> :not(.kanban-block.compact) {
  width: 300px;
}

.compact .collapse-content,
.compact .fa-square-plus,
.compact .fa-square-plus,
.compact .fa-ellipsis-vertical {
  display: none;
}

@media (max-width: 767px) {
  .compact-mode {
    /* display: flow !important; */
    flex-flow: wrap;
  }
}

.btn-com {
  padding: 5px 15px;
  font-size: 13px;
  border-radius: 5px;
  width: max-content;
  transition: 0.3s;
}

.btn-com.clr1 {
  border: 1px solid #d71d00;
  color: #d71d00;
}

.btn-com.clr2 {
  border: 1px solid #ffa800;
  color: #ffa800;
}

.btn-com.clr3 {
  border: 1px solid #0e79dc;
  color: #0e79dc;
}

.btn-com.clr4 {
  border: 1px solid #00c490;
  color: #00c490;
}

.btn-com.clr5 {
  border: 1px solid #00d319;
  color: #00d319;
}

.btn-com.clr1:hover,
.btn-com.clr2:hover,
.btn-com.clr3:hover,
.btn-com.clr4:hover,
.btn-com.clr5:hover {
  color: white;
}

.btn-com.clr1:hover {
  background-color: #d71d00;
}

.btn-com.clr2:hover {
  background-color: #ffa800;
}

.btn-com.clr3:hover {
  background-color: #0e79dc;
}

.btn-com.clr4:hover {
  background-color: #00c490;
}

.btn-com.clr5:hover {
  background-color: #00d319;
}

.btn-square {
  padding: 10px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.btn-square:hover {
  color: white;
}

.btn-square1:hover {
  background-color: #00c700;
}

.btn-square2:hover {
  background-color: red;
}

.btn-square3:hover {
  background-color: #001affd5;
}

/* SELECT DROPDOWN */
.select2-container--default .select2-selection--single {
  background-color: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  height: 35px;
  display: flex;
  align-items: center;
  font-size: 13px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #e6e6e6;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 13px;
  outline: unset;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 4px;
}

.select2-dropdown {
  box-shadow: 0 5px 7px 1px #00000014;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.date-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: #666;
}

.date-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  bottom: 0;
  margin: auto;
  border-radius: 50%;
}

/*
.date-list li:nth-child(1)::before {
  background-color: #00c490;
}
.date-list li:nth-child(2)::before {
  background-color: #0e79dc;
}
.date-list li:nth-child(3)::before {
  background-color: #ee1b18;
}
.date-list li:nth-child(4)::before {
  background-color: #fe8a3d;
}
.date-list li:nth-child(5)::before {
  background-color: #fec53d;
}
.date-list li:nth-child(6)::before {
  background-color: #ee1b18;
} */

.datebox {
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  margin: auto;
}

/* .datebox.box1 {
  background-color: #00c490;
}
.datebox.box2 {
  background-color: #ee1b18;
}
.datebox.box3 {
  background-color: #0e79dc;
}
.datebox.box4 {
  background-color: #fec53d;
}
.datebox.box5 {
  background-color: #fe8a3d;
} */
.date-list li:nth-child(1)::before {
  background-color: #00c490;
}

.date-list li:nth-child(2)::before {
  background-color: #808080;
}

.date-list li:nth-child(3)::before {
  background-color: #fec53d;
}

.date-list li:nth-child(4)::before {
  background-color: #a8b1ff;
}

.date-list li:nth-child(5)::before {
  background-color: #fe8a3d;
}

.date-list li:nth-child(6)::before {
  background-color: #ee1b18;
}

.datebox {
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  margin: auto;
}

.datebox.present {
  background-color: #00c490;
}

.datebox.conflict {
  background-color: #ee1b18;
}

.datebox.absent {
  background-color: #a8b1ff;
}

.datebox.half-day {
  background-color: #fec53d;
}

.datebox.leave-present {
  background-color: #fe8a3d;
}

.datebox.leave {
  background-color: #808080;
}

.date-table thead tr th:first-child {
  border-top-left-radius: 10px;
}

.date-table thead tr th:last-child {
  border-top-right-radius: 10px;
}

.holiday {
  background: #ecf3fb;
}

input[type="radio"].red-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background-color: #e9edf7;
  border: 2px solid #ccc;
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}

input[type="radio"].red-radio:checked {
  border-color: #e54f38;
  background-color: #e54f38;
}

input[type="radio"].red-radio:checked::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

input[type="checkbox"].custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  background-color: #e9edf7;
  border: 2px solid #ccc;
  border-radius: 0.25rem;
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}

table input[type="checkbox"] {
  margin-top: 8px;
}

input[type="checkbox"].custom-checkbox:checked {
  background-color: #e54f38;
  border-color: #e54f38;
}

input[type="checkbox"].custom-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"].custom-checkbox:hover {
  border-color: #e54f38;
}

.tooltip {
  position: relative;
}

.tooltip .tooltiptext {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  top: -30px;
  background: black;
  border-radius: 3px;
  font-size: 10px;
  padding: 3px 5px;
  opacity: 0;
  transition: 0.3s;
  width: max-content;
}

.tooltip:hover .tooltiptext {
  opacity: 1;
}

.progress {
  display: flex;
  justify-content: space-between;
}

.progress li {
  position: relative;
  width: 50%;
}

.progress li .sec::before {
  content: "";
  position: absolute;
  height: 4px;
  width: 100%;
  background-color: #ffe5e1;
  left: 0;
  top: 15px;
  bottom: 0;
}

.progress li.active .sec::before {
  background-color: #e54f38;
}

.progress li span {
  position: relative;
  z-index: 1;
}

.progress li:nth-child(2),
.progress li:nth-child(3) {
  display: flex;
  justify-content: center;
}

.progress li:nth-child(4) {
  display: flex;
  justify-content: flex-end;
  width: 30%;
}

.progress li:nth-child(1) {
  width: 30%;
}

/* .select2-container--default {
  padding-bottom: 0.75rem;
} */
#accordionToggle:focus-visible {
  outline: none;
}

.btn-square.disable {
  background: #ededed;
  color: #a9a9a9;
  cursor: no-drop;
}

/* .bg-primary-900 {
  background-color: #672419;
}
.bg-primary-800 {
  background-color: #AC3B2A;
}
.bg-primary-700 {
  background-color: #ce4732;
}
.bg-primary-600 {
  background-color: #E54F38;
}
.bg-primary-500 {
  background-color: #F7C8C1;
}
.bg-primary-400 {
  background-color: #FBE5E1;
}
.bg-primary-300 {
  background-color: #FCEDEB;
}
.bg-primary-200 {
  background-color: #FEF6F5;
}
.bg-primary-100 {
  background-color: #FFF5F1;
}
.bg-primary-50 {
  background-color: #f6f6f6;
}
.text-primary-600 {
  color: #e54f38;
} */
.dropdown-wrapper:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sha {
  position: relative;
}

.sha::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(360deg, #ffffff, transparent);
}

#sidebar nav .sidebox {
  /* background-color: #1b1b1b; */
  left: 78px;
}

.material-icons.fw-lighter.fs-5 {
  font-size: 1.1rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
  list-style: none;
  font-size: 0.7rem;
  height: auto;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  height: auto;
}

#year {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 5px;
}

.fixed-table th,
.fixed-table td {
  border: 1px solid #efefef;
  border-radius: 2px;
}

.oh-input[type="color"] {
  height: 38px !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 6px;
  border-radius: 5px;
  overflow: hidden;
}

::-webkit-scrollbar-track {
  background-color: #eee;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: #acacac;
  border-radius: 5px;
  transition: 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #8a8a8a;
}


/* =============================================================================
   Responsiveness (tables/lists) — ported from Responsiveness/18-Mar-2026
   Commit 46687f8 — prime_theme/assets/css/global.css (from line 455)
   ============================================================================= */

/* In scrollable containers (dashboard/list heightContainer), let all columns scroll together */
.heightContainer .stickyleft,
.heightContainer .stickyleft-second,
.heightContainer .stickyright {
  position: static !important;
  left: auto !important;
  right: auto !important;
}

.heightContainer {
  -webkit-overflow-scrolling: touch;
}
.heightContainer .fixed-table {
  width: max-content;
  min-width: 100%;
}

/* Prevent overlapping text in compact dashboard/list tables (all screen sizes) */
#task-list-container .fixed-table th,
#task-list-container .fixed-table td,
.heightContainer .fixed-table th,
.heightContainer .fixed-table td {
  height: auto !important;
  line-height: 1.4 !important;
  padding-top: 6px;
  padding-bottom: 6px;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

/* Options column header: keep "Options" on one line (override white-space: normal above) */
.heightContainer .fixed-table tr > th:nth-last-child(2),
.heightContainer .fixed-table tr > th:nth-last-child(2) > div {
  white-space: nowrap !important;
}

/* Checkbox column in tables (desktop + mobile) ΓÇô keep narrow.
   IMPORTANT: only apply when the cell actually contains a checkbox. */
.heightContainer .fixed-table th.stickyleft:has(input[type="checkbox"]),
.heightContainer .fixed-table td.stickyleft:has(input[type="checkbox"]) {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

@media (max-width: 1024px) {
  .heightContainer .fixed-table th[id$="-probation_date-header"],
  .heightContainer .fixed-table th[id$="-job_position_id-header"],
  .heightContainer .fixed-table th.stickyright,
  .heightContainer .fixed-table td:has(input[name="probation_end"]),
  .heightContainer .fixed-table td:has(.joining-date),
  .heightContainer .fixed-table td.stickyright {
    min-width: 180px !important;
  }

  .heightContainer .fixed-table th.stickyright,
  .heightContainer .fixed-table td.stickyright {
    min-width: 220px !important;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-start;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn {
    width: auto !important;
    min-width: 34px;
    padding: 0.25rem 0.4rem !important;
  }
}

/* Dashboard "Work Type Request" table: stickyleft is a DATA column (Employee), not checkbox */
@media (max-width: 767.98px) {
  .heightContainer .fixed-table th[id^="work-shift-"][id$="-employee_id-header"].stickyleft,
  .heightContainer .fixed-table td.stickyleft:has(.oh-profile),
  .heightContainer .fixed-table th[id^="work-shift-"][id$="-employee_id-header"].stickyleft > div {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 180px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  .heightContainer .fixed-table th[id^="work-shift-"][id$="-employee_id-header"].stickyleft > div {
    flex-wrap: wrap !important;
    min-width: 0;
  }

  /* Keep Actions column compact */
  .heightContainer .fixed-table th[id^="work-shift-"].stickyright,
  .heightContainer .fixed-table td.stickyright {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100px !important;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn-group {
    gap: 0.2rem;
    justify-content: center;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.35rem !important;
    min-width: 0 !important;
  }

  /* Work Type Request (dashboard): avoid text/button overlap on very small screens */
  #work-shift .heightContainer {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #work-shift .fixed-table {
    width: max-content !important;
    min-width: 480px !important;
    table-layout: auto !important;
  }

  #work-shift .fixed-table th[id$="-employee_id-header"],
  #work-shift .fixed-table td.stickyleft {
    min-width: 160px !important;
  }

  #work-shift .fixed-table th[id$="-work_type_id-header"],
  #work-shift .fixed-table td:nth-child(2) {
    min-width: 150px !important;
  }

  #work-shift .fixed-table th[id^="work-shift-"].stickyright,
  #work-shift .fixed-table td.stickyright {
    width: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
  }

  #work-shift .fixed-table td.stickyright .oh-btn-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    gap: 0.25rem;
  }

  #work-shift .fixed-table td.stickyright .oh-btn {
    width: 2rem !important;
    min-width: 2rem !important;
    padding: 0.25rem !important;
  }

  /* Dashboard "Shift Request" table: Employee is a DATA column (no checkbox) */
  .heightContainer .fixed-table th[id^="shift-container-1-employee_id-header"].stickyleft,
  .heightContainer .fixed-table th[id^="shift-container-1-employee_id-header"].stickyleft > div,
  #shift-container .fixed-table tbody td.stickyleft {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 180px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  .heightContainer .fixed-table th[id^="shift-container-1-employee_id-header"].stickyleft > div {
    flex-wrap: wrap !important;
    min-width: 0;
  }

  #shift-container .fixed-table tbody td.stickyleft .oh-profile {
    min-width: 0 !important; /* override min-w-[200px] */
    max-width: 100% !important;
  }

  #shift-container .fixed-table tbody td.stickyleft .oh-profile span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  /* Shift request table: wrap by words (not character-by-character) */
  #shift-container .fixed-table th,
  #shift-container .fixed-table td,
  #shift-container .fixed-table th > div,
  #shift-container .fixed-table .truncate {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }

  #shift-container .fixed-table th span,
  #shift-container .fixed-table td span {
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* Keep Employee header text in one line */
  #shift-container .fixed-table th#shift-container-1-employee_id-header,
  #shift-container .fixed-table th#shift-container-1-employee_id-header > div,
  #shift-container .fixed-table th#shift-container-1-employee_id-header span:last-child {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  #shift-container .fixed-table th#shift-container-1-employee_id-header > div {
    flex-wrap: nowrap !important;
    align-items: center;
  }

  #shift-container .fixed-table th#shift-container-1-employee_id-header > div > span:last-child {
    display: inline-block;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  /* Shift Actions column: compact */
  .heightContainer .fixed-table th.stickyright,
  .heightContainer .fixed-table td.stickyright {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100px !important;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn-group {
    gap: 0.2rem;
    justify-content: center;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.35rem !important;
    min-width: 0 !important;
  }
}

#task-list-container .fixed-table td .truncate,
.heightContainer .fixed-table td .truncate {
  /* Override Tailwind "truncate" on data tables so text can wrap */
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Recruitment dashboard ΓÇô Current Hiring Pipeline table
   Compact columns + word-by-word wrapping (no character stacking). */
.heightContainer .fixed-table th[id$="-job_position-header"],
.heightContainer .fixed-table th[id$="-job_position-header"] > div,
.heightContainer .fixed-table td.stickyleft {
  width: 140px !important;
  min-width: 140px !important;
  max-width: 180px !important;
}

.heightContainer .fixed-table th[id$="-job_position-header"] span,
.heightContainer .fixed-table td.stickyleft .truncate {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none;
}

/* Recruitment pipeline headers: don't break inside words (override global word-break: break-word) */
.heightContainer .fixed-table th[id$="-job_position-header"],
.heightContainer .fixed-table th[id$="-initial_count-header"],
.heightContainer .fixed-table th[id$="-test_count-header"],
.heightContainer .fixed-table th[id$="-interview_count-header"],
.heightContainer .fixed-table th[id$="-hired_count-header"],
.heightContainer .fixed-table th[id$="-cancelled_count-header"] {
  word-break: keep-all !important;
  overflow-wrap: normal !important; /* wrap only at spaces */
}

.heightContainer .fixed-table th[id$="-job_position-header"] span.flex.w-max,
.heightContainer .fixed-table th[id$="-initial_count-header"] span.flex.w-max,
.heightContainer .fixed-table th[id$="-test_count-header"] span.flex.w-max,
.heightContainer .fixed-table th[id$="-interview_count-header"] span.flex.w-max,
.heightContainer .fixed-table th[id$="-hired_count-header"] span.flex.w-max,
.heightContainer .fixed-table th[id$="-cancelled_count-header"] span.flex.w-max {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

.heightContainer .fixed-table th[id$="-initial_count-header"],
.heightContainer .fixed-table th[id$="-initial_count-header"] > div,
.heightContainer .fixed-table th[id$="-test_count-header"],
.heightContainer .fixed-table th[id$="-test_count-header"] > div,
.heightContainer .fixed-table th[id$="-hired_count-header"],
.heightContainer .fixed-table th[id$="-hired_count-header"] > div {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 60px !important;
}

.heightContainer .fixed-table th[id$="-interview_count-header"],
.heightContainer .fixed-table th[id$="-interview_count-header"] > div {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 72px !important;
}

.heightContainer .fixed-table th[id$="-cancelled_count-header"],
.heightContainer .fixed-table th[id$="-cancelled_count-header"] > div {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 84px !important;
}

/* Allow long profile names in Skill Zone Status etc. to wrap within the first column */
.heightContainer .fixed-table .oh-profile {
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: nowrap;
  align-items: center;
}

.heightContainer .fixed-table .oh-profile span {
  display: block;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* ============================
 * Employee Profile ΓÇô layout
 * ============================ */

/* Top profile header: avatars + arrows/settings */
@media (max-width: 767.98px) {
  /* Let the top row wrap instead of forcing everything in one line */
  .oh-card .col-lg-12.d-flex.justify-content-between.align-items-center.mb-4 {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 0.5rem;
  }

  /* Avatar strip and right controls should each take full width on small screens */
  .oh-card .members-container {
    flex: 1 1 100%;
  }

  .oh-card .members-container + .d-flex {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* Profile info (name/email/phone) ΓÇô stack cleanly on small screens */
@media (max-width: 767.98px) {
  .oh-profile__info-container {
    margin-top: 0.35rem;
  }

  .oh-profile__info-name {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .oh-profile__info-designation {
    font-size: 0.85rem;
    word-break: break-word;
  }

  .oh-profile__info-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0;
    margin-bottom: 0;
  }

  .oh-profile__info-list-item {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.25rem;
    row-gap: 0.15rem;
  }

  .oh-profile__info-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
  }

  .oh-profile__info-value {
    font-size: 0.85rem;
    word-break: break-word;
  }
}

/* Profile tabs: avoid overflow, allow wrapping/scrolling */
@media (max-width: 767.98px) {
  .oh-general__tabs--profile {
    flex-wrap: wrap;
    row-gap: 0.25rem;
    column-gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .oh-general__tabs--profile .oh-general__tab {
    flex: 0 0 auto;
  }
}

/* Generic dropdown menus (Settings, tab actions, document menus) ΓÇô small screens */
@media (max-width: 767.98px) {
  .dropdown-menu.absolute.right-0.min-w-\[100px\].shadow-card {
    /* Constrain width and keep inside viewport, make box smaller */
    min-width: 0;
    width: min(55vw, 11rem);
    right: 0.5rem;
    left: auto;
  }

  .dropdown-menu > ul.text-xs li a,
  .dropdown-menu > ul.text-xs li p {
    /* Smaller text & tighter padding inside popup */
    font-size: 0.7rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    width: 100%;
    line-height: 1.2;
    white-space: normal;
  }
}

/* On small screens, position Settings dropdowns (cog menus) just below & aligned with their button */
@media (max-width: 767.98px) {
  .relative.inline-block > .dropdown-menu.absolute.right-0.min-w-\[100px\].shadow-card {
    left: 0;
    right: auto;
    transform: none;
    margin-top: 0.25rem;
  }
}

/* ============================
 * Employee Profile ΓÇô tab strip
 * ============================ */

/* Base styling for profile tab list */
.usertablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0 0 0.75rem 0;
  list-style: none;
}

.usertablist li button {
  border-radius: 9999px;
  border: 1px solid #e0e4f2;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  background-color: #f8fafc;
  color: #111827;
  white-space: nowrap;
}

.usertablist li button.active {
  background-color: #3498db;
  color: #ffffff;
  border-color: #3498db;
}

/* Small screens: horizontal scroll with compact pills */
@media (max-width: 767.98px) {
  .usertablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    column-gap: 0.4rem;
  }

  .usertablist li {
    flex: 0 0 auto;
  }

  .usertablist li button {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }
}

/* ============================
 * Permission / Group accordions
 * ============================ */

/* Keep header content and +/- icon on one line, responsive */
.accordion-btn-gp {
  /* Button is already flex; ensure children sit on same row by default */
  column-gap: 0.75rem;
}

.accordion-btn-gp > div:first-child {
  min-width: 0;
}

.accordion-btn-gp > div:last-child {
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .accordion-btn-gp {
    /* Let inner content wrap but keep action/icon block pinned to the right */
    flex-wrap: nowrap !important;
    align-items: flex-start;
  }

  .accordion-btn-gp > div:first-child {
    flex: 1 1 auto;
  }

  .accordion-btn-gp > div:last-child {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .accordion-btn-gp .icon {
    font-size: 1rem;
  }
}

/* Permission accordions ΓÇô ensure all sections have the same table alignment */
.accordion-panel-gp .inner-accordion-content table {
  width: 100%;
  border-collapse: collapse;
}

.accordion-panel-gp .inner-accordion-content thead th,
.accordion-panel-gp .inner-accordion-content tbody td {
  vertical-align: middle;
}

/* First column: checkbox ΓÇô always left aligned */
.accordion-panel-gp .inner-accordion-content th.w-12,
.accordion-panel-gp .inner-accordion-content td.left {
  text-align: left !important;
}

/* Second column: model info (avatar + name) ΓÇô always left aligned */
.accordion-panel-gp .inner-accordion-content thead th:nth-child(2),
.accordion-panel-gp .inner-accordion-content tbody td:nth-child(2) {
  text-align: left !important;
}

/* Permission columns (Create / View / Edit / Delete): center switches/icons */
.accordion-panel-gp .inner-accordion-content thead th:nth-child(n + 3),
.accordion-panel-gp .inner-accordion-content tbody td:nth-child(n + 3) {
  text-align: center;
}

@media (max-width: 767.98px) {
  /* On small screens keep tables readable and scrolling consistently */
  .accordion-panel-gp .inner-accordion-content {
    max-height: 60vh;
  }

  .accordion-panel-gp .inner-accordion-content > .p-4.pt-0 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .accordion-panel-gp .inner-accordion-content table {
    display: table;
    width: 100%;
  }
}

/* Permission inner headers (Base, Employee, Prime documents, etc.) */
.inner-accordion-toggle {
  justify-content: space-between;
}

.inner-accordion-toggle span:first-child {
  text-align: left;
}

.inner-accordion-toggle .permission-badge {
  margin-left: auto;
}

/* Let Alpine x-show control visibility for dropdowns (override Bootstrap default 'display:none') */
.dropdown-menu[x-show] {
  display: block;
}

/* Prime Recruitment Pipeline: show full Email and Stage values in candidate tables */

/* Email column (3rd): replace truncated inner text with full value from title attribute */
#pipelineContainer .fixed-table td:nth-child(3) .truncate span[title]:not(.oh-dot) {
  font-size: 0; /* hide 'benjamin.ΓÇª' etc. */
}

#pipelineContainer .fixed-table td:nth-child(3) .truncate span[title]:not(.oh-dot)::after {
  content: attr(title);
  font-size: 0.7rem;
}

/* Stage column (4th): give more width and allow dropdown text to occupy full cell */
#pipelineContainer .fixed-table th:nth-child(4),
#pipelineContainer .fixed-table td:nth-child(4) {
  min-width: 240px;
}

#pipelineContainer .fixed-table td:nth-child(4) .truncate {
  white-space: normal;
}

#pipelineContainer .fixed-table td:nth-child(4) select.row-dropdown {
  width: 100%;
  font-size: 0.75rem;
}

/* Small screens: stage column readable (native <select> has no reliable ::after) */
@media (max-width: 767.98px) {
  #pipelineContainer .fixed-table th:nth-child(4),
  #pipelineContainer .fixed-table td:nth-child(4) {
    min-width: 10.5rem !important;
    max-width: 16rem;
  }

  #pipelineContainer .fixed-table td:nth-child(4) select.row-dropdown {
    width: 100% !important;
    max-width: 100%;
    font-size: 0.7rem !important;
    line-height: 1.35;
    color: hsl(0, 0%, 11%) !important;
    white-space: normal;
    word-break: break-word;
  }
}

/* Recruitment pipeline list / recruitment containers — horizontal scroll + tabs (ref. 46687f8) */
@media (max-width: 991.98px) {
  #recruitment-container,
  #pipelineContainer,
  #skill_zone_container,
  #cand_container,
  #stage-container,
  #policyContainer,
  #chart_target,
  #actionContainer,
  .oh-wrapper:has(> #view-container) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #pipelineContainer .oh-tabs__movable-area,
  #pipelineContainer .oh-tabs__movable-body {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #pipelineContainer .heightContainer .fixed-table.w-full,
  #pipelineContainer .oh-tabs__movable-body .fixed-table {
    min-width: 720px;
  }
}

@media (max-width: 767.98px) {
  #pipelineContainer .stickyleft,
  #pipelineContainer .stickyleft-second,
  #pipelineContainer .stickyright {
    position: static !important;
    left: auto !important;
    right: auto !important;
    box-shadow: none !important;
  }

  #pipelineContainer .fixed-table th.stickyright,
  #pipelineContainer .fixed-table td.stickyright {
    width: auto !important;
    min-width: 0 !important;
    max-width: 6rem !important;
  }

  #pipelineContainer .fixed-table th.stickyright > div {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0.3rem 0.2rem !important;
    box-sizing: border-box !important;
  }

  #pipelineContainer .fixed-table td.stickyright .flex.justify-center.gap-1 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 0.3rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  #pipelineContainer .fixed-table td.stickyright .oh-btn {
    width: 1.85rem !important;
    min-width: 1.85rem !important;
    height: 1.85rem !important;
    padding: 0.15rem !important;
  }

  #pipelineContainer .fixed-table td.stickyright ion-icon {
    font-size: 1rem !important;
  }

  #pipelineContainer .fixed-table td:nth-child(3) .truncate {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere;
  }
}

/* Recruitment Pipeline Kanban card view: stack stages vertically + alignment fixes */
@media (max-width: 991.98px) {
  #pipelineContainer .groupContainer {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem;
    overflow-x: hidden;
    overflow-y: visible;
  }

  #pipelineContainer .groupContainer .kanban-block {
    width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 0;
    min-height: auto;
  }

  /* Stage header alignment */
  #pipelineContainer .kanban-head {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  #pipelineContainer .kanban-head .flex.gap-2.items-center {
    flex: 1;
    min-width: 0;
  }

  #pipelineContainer .kanban-head .kanban-title h5 {
    flex-wrap: wrap;
    word-break: break-word;
    white-space: normal;
    text-align: left;
  }

  #pipelineContainer .kanban-head .oh-kanban__button-contaner {
    flex-shrink: 0;
  }
}

/* Kanban task card alignment (all screen sizes) */
#pipelineContainer .groupContainer .task-card > div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 1.25rem;
}

/* Avatar + name row */
#pipelineContainer .groupContainer .task-card .flex.items-center.gap-5 {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  min-width: 0;
}

#pipelineContainer .groupContainer .task-card .flex.items-center.gap-5 > div:last-child {
  flex: 1;
  min-width: 0;
}

#pipelineContainer .groupContainer .task-card .flex.items-center.gap-5 h5 {
  margin: 0;
  word-break: break-word;
}

/* Email / Position rows ΓÇô aligned labels and values */
#pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative {
  display: grid !important;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
}

#pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative span.font-medium {
  white-space: nowrap;
}

#pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative p {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

#pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative p span {
  display: block;
  overflow-wrap: break-word;
}

/* Pipeline card: action icon rows stay on one horizontal line (scroll if needed) */
@media (max-width: 767.98px) {
  #pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative:has(.oh-btn) {
    align-items: center !important;
  }

  #pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative:has(.oh-btn) p {
    min-width: 0;
    overflow: hidden;
  }

  #pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative:has(.oh-btn) p span {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.35rem;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overflow-wrap: normal !important;
    word-break: normal !important;
    max-width: 100%;
  }

  #pipelineContainer .groupContainer .task-card .flex.gap-2.items-center.relative:has(.oh-btn) p span .flex {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    display: flex !important;
    width: max-content;
    max-width: none;
  }
}

/* Card dropdown ΓÇô avoid overlap */
#pipelineContainer .groupContainer .task-card .dropdown-wrapper {
  top: 0.75rem;
  right: 0.75rem;
}

/* On small screens, let the column-toggle dropdown escape the table/card scroll area */
@media (max-width: 767.98px) {
  .heightContainer {
    max-height: none !important;
    overflow-y: visible !important;
  }

  /* Cards like Skill Zone Status wrap prime list tables inside this overflow-hidden container */
  .bg-white.p-6.rounded-md.shadow-card > .overflow-hidden.overflow-x-auto {
    overflow-x: auto !important;
    overflow-y: visible !important;
    overflow: visible !important;
  }

  /* Allow three-dots column-toggle dropdown to extend (avoid clipping by parent) */
  .oh-sticky-dropdown--header,
  .oh-sticky-dropdown--header .oh-dropdown {
    overflow: visible !important;
  }

  @media (max-width: 767.98px) {
    .bg-white.p-6.rounded-md.shadow-card {
      position: relative !important;
    }

    .bg-white.p-5.pe-2.pt-3.rounded-md.shadow-card {
      position: static !important;
    }

    .bg-white.p-6.rounded-md.shadow-card .oh-sticky-dropdown--header {
      position: absolute !important;
      top: 0.75rem !important;
      right: 0.75rem !important;
      left: auto !important;
      transform: none !important;
    }
  }

  /* Make column-toggle dropdowns more compact on small screens */
  .oh-sticky-table_dropdown {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
    width: min(70vw, 13rem);
    max-width: min(70vw, 13rem);
    max-height: min(280px, calc(100vh - 10rem));
    overflow-y: auto;
    overflow-x: visible;
    z-index: 9999;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .oh-sticky-table_dropdown::-webkit-scrollbar {
    display: none;
  }

  .oh-sticky-table_dropdown .oh-dropdown_btn-header.oh-btn-group {
    flex-direction: column;
    gap: 0.25rem;
  }

  .oh-sticky-table_dropdown .oh-dropdown_btn-header .oh-btn {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
    width: 100%;
  }

  .oh-sticky-table_dropdown .oh-sticy-dropdown-item {
    gap: 0.5rem;
    padding: 0.2rem 0.4rem;
  }

  .oh-sticky-table_dropdown .oh-sticy-dropdown-item span.text-sm {
    font-size: 0.68rem;
  }

  .oh-sticky-table_dropdown .oh-table__checkbox input,
  .oh-sticky-table_dropdown input[type="checkbox"] {
    transform: scale(0.8);
  }
}

/* Hide scrollbar on column-toggle popup (content still scrollable) */
.oh-sticky-table_dropdown {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.oh-sticky-table_dropdown::-webkit-scrollbar {
  display: none;
}

/* Nudge "No. of Candidates" column slightly to the right */
.heightContainer .fixed-table th:nth-child(2),
.heightContainer .fixed-table td:nth-child(2) {
  padding-left: 1rem;
}

/* CHECK IN OUT */
.check {
  padding: 8px 20px;
  border-radius: 5px;
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  width: 135px;
  height: 38px;
}

.check.checkin {
  color: #15ca0c;
  background: rgb(33 209 23 / 10%);
}

.check.checkout {
  color: #e9910d;
  background: rgb(233 145 13 / 10%);
}

.check .date,
.check .con {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.check .date {
  opacity: 1;
  z-index: 1;
}

.check .con {
  opacity: 0;
  z-index: 2;
}

/* On hover: show .con, hide .date */
.check:hover .date {
  opacity: 0;
}

.check:hover .con {
  opacity: 1;
}

@media (max-width: 991px) {
  .check {
    display: none;
  }
}

/* FORM DESIGN */
.myform input,
.myform select,
.myform textarea {
  padding: 0.5rem;
  border-radius: 5px;
  width: 100%;
  font-size: 0.75rem;
  border: 1px solid #e6e6e6;
  transition: 0.3s;
}

.myform input:focus,
.myform select:focus,
.myform textarea:focus {
  outline: unset;
  border: 1px solid #3498db;
}

.myform label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
}

.btn {
  background: #3498db;
  color: white;
  font-size: 13px;
  min-width: max-content;
  padding: 3px 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: 0.3s;
}

.btn:hover {
  background: #ac3b2a;
}

/* TOGGLE BUTTON */
.toggle-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: #aeaeb2;
  border-radius: 9999px;
  transition: background-color 0.3s;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* When checked */
.toggle-input:checked+.toggle-switch {
  background-color: #3498db;
}

.toggle-input:checked+.toggle-switch::after {
  transform: translateX(16px);
}

/* MULTI SELECT */
.select2-container--default .select2-selection--multiple {
  border: 1px solid #e7e7e7;
}

.select2-container--default .select2-selection--multiple:focus {
  outline: unset;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  font-size: 10px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #3498db;
  color: white;
  border: unset;
  height: 23px;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
  line-height: 18px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border-right: 1px solid #ffffff57;
  color: white;
  font-size: 10px;
  height: 100%;
}

.select2-results__option {
  font-size: 12px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #D4E9FF;
  color: #3498db;
}

.select2-container--default .select2-results__option--selected {
  background-color: #D4E9FF;
  color: #3498db;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
  border: solid #e7e7e7 1px;
  outline: 0;
}

.select2-container .select2-search--inline .select2-search__field {
  height: 25px;
}

.select2-dropdown {
  border: 1px solid #e7e7e7;
}

/* .select2-container {
  width: 100% ;
} */

.userbox {
  border: 1px solid #ebebeb;
  transition: 0.3s;
}

.userbox.active,
.userbox:hover {
  border: 1px solid #3498db;
}

.userlist {
  display: flex;
}

/* .userlist li span {
  display: flex;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
  align-items: center;
  justify-content: center;
}
.userlist li span img {
  width: 100%;
}
.userlist li:nth-child(2) {
  margin-left: -10px;
}
.userlist li:nth-child(3) {
  margin-left: -10px;
}
.userlist li:nth-child(4) {
  margin-left: -10px;
}
.userlist li:nth-child(4) span {
  border: 3px solid white;
  background-color: #dbdbdb;
  font-size: 12px;
} */
.userlist li span {
  display: flex;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.userlist li span img {
  width: 100%;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.userlist li span a {
  display: block;
  width: 100%;
  height: 100%;
}

.userlist li:not(:first-child) {
  margin-left: -10px;
}

.userlist li:last-child span:not(:has(> a)) {
  border: 3px solid white;
  background-color: #dbdbdb;
  font-size: 12px;
  color: #666;
}

.userlist li:hover span {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
  position: relative;
}

.userlist li:hover span img {
  transform: scale(1.05);
}

.userlist li:not(:hover) span {
  transform: translateY(0) scale(1);
}

.usertablist {
  display: flex;
  flex-flow: wrap;
  gap: 10px;
}

.usertablist li button {
  border: 1px solid #e7e7e7;
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 0.8rem;
  transition: 0.3s;
  color: #333;
}

.usertablist li button.active,
.usertablist li button:hover {
  background-color: #3498db;
  border: 1px solid #3498db;
  color: white;
}

/* TAB DESIGN */

.mytab {
  border: 1px solid #3498db;
  border-radius: 50px;
  overflow: hidden;
  padding: 5px;
  background-color: white;
  z-index: 9;
}

.mytab .tab-button.active {
  color: white;
  background: #3498db;
  border-radius: 50px;
}

/* FOLDING KANBAN */
.compact {
  width: max-content !important;
}

.compact .task-card {
  display: none;
}

.compact .kanban-head {
  height: 100%;
  display: flex;
  align-items: flex-start;
  flex-flow: column;
  width: 50px;
}

.compact h5 {
  transform: rotate(90deg) translateX(0);
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 40px;
  width: max-content;
}

.compact-mode {
  display: flex !important;
}

.compact-mode> :not(.kanban-block.compact) {
  width: 300px;
}

.compact .collapse-content,
.compact .fa-square-plus,
.compact .fa-square-plus,
.compact .fa-ellipsis-vertical {
  display: none;
}

@media (max-width: 767px) {
  .compact-mode {
    /* display: flow !important; */
    flex-flow: wrap;
  }
}

.btn-com {
  padding: 5px 15px;
  font-size: 13px;
  border-radius: 5px;
  width: max-content;
  transition: 0.3s;
}

.btn-com.clr1 {
  border: 1px solid #d71d00;
  color: #d71d00;
}

.btn-com.clr2 {
  border: 1px solid #ffa800;
  color: #ffa800;
}

.btn-com.clr3 {
  border: 1px solid #0e79dc;
  color: #0e79dc;
}

.btn-com.clr4 {
  border: 1px solid #00c490;
  color: #00c490;
}

.btn-com.clr5 {
  border: 1px solid #00d319;
  color: #00d319;
}

.btn-com.clr1:hover,
.btn-com.clr2:hover,
.btn-com.clr3:hover,
.btn-com.clr4:hover,
.btn-com.clr5:hover {
  color: white;
}

.btn-com.clr1:hover {
  background-color: #d71d00;
}

.btn-com.clr2:hover {
  background-color: #ffa800;
}

.btn-com.clr3:hover {
  background-color: #0e79dc;
}

.btn-com.clr4:hover {
  background-color: #00c490;
}

.btn-com.clr5:hover {
  background-color: #00d319;
}

.btn-square {
  padding: 10px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.btn-square:hover {
  color: white;
}

.btn-square1:hover {
  background-color: #00c700;
}

.btn-square2:hover {
  background-color: red;
}

.btn-square3:hover {
  background-color: #001affd5;
}

/* SELECT DROPDOWN */
.select2-container--default .select2-selection--single {
  background-color: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  height: 35px;
  display: flex;
  align-items: center;
  font-size: 13px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #e6e6e6;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 13px;
  outline: unset;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 4px;
}

.select2-dropdown {
  box-shadow: 0 5px 7px 1px #00000014;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.date-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: #666;
}

.date-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  bottom: 0;
  margin: auto;
  border-radius: 50%;
}

/*
.date-list li:nth-child(1)::before {
  background-color: #00c490;
}
.date-list li:nth-child(2)::before {
  background-color: #0e79dc;
}
.date-list li:nth-child(3)::before {
  background-color: #ee1b18;
}
.date-list li:nth-child(4)::before {
  background-color: #fe8a3d;
}
.date-list li:nth-child(5)::before {
  background-color: #fec53d;
}
.date-list li:nth-child(6)::before {
  background-color: #ee1b18;
} */

.datebox {
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  margin: auto;
}

/* .datebox.box1 {
  background-color: #00c490;
}
.datebox.box2 {
  background-color: #ee1b18;
}
.datebox.box3 {
  background-color: #0e79dc;
}
.datebox.box4 {
  background-color: #fec53d;
}
.datebox.box5 {
  background-color: #fe8a3d;
} */
.date-list li:nth-child(1)::before {
  background-color: #00c490;
}

.date-list li:nth-child(2)::before {
  background-color: #808080;
}

.date-list li:nth-child(3)::before {
  background-color: #fec53d;
}

.date-list li:nth-child(4)::before {
  background-color: #a8b1ff;
}

.date-list li:nth-child(5)::before {
  background-color: #fe8a3d;
}

.date-list li:nth-child(6)::before {
  background-color: #ee1b18;
}

.datebox {
  color: white;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  margin: auto;
}

.datebox.present {
  background-color: #00c490;
}

.datebox.conflict {
  background-color: #ee1b18;
}

.datebox.absent {
  background-color: #a8b1ff;
}

.datebox.half-day {
  background-color: #fec53d;
}

.datebox.leave-present {
  background-color: #fe8a3d;
}

.datebox.leave {
  background-color: #808080;
}

.date-table thead th,
.date-table tbody td {
  text-align: center;
}

.date-table thead th.stickyleft,
.date-table tbody td.stickyleft {
  text-align: left;
}

.date-table thead tr th:first-child {
  border-top-left-radius: 10px;
}

.date-table thead tr th:last-child {
  border-top-right-radius: 10px;
}

.holiday {
  background: #ecf3fb;
}

/* Work Records ΓÇô compact, readable timeline on small screens */
@media (max-width: 767.98px) {
  .date-table {
    /* keep one compact row, but allow horizontal scroll instead of squeezing all days */
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
  }

  .date-table thead th,
  .date-table tbody td {
    padding: 0.25rem 0.2rem;
    font-size: 10px;
    white-space: nowrap;
  }

  /* Employee column: a bit wider for names */
  .date-table thead th.stickyleft,
  .date-table tbody td.stickyleft {
    min-width: 90px;
    max-width: 120px;
  }

  /* Keep date status boxes centered in their narrow cells */
  .datebox {
    margin: 0 auto;
  }
}

/* My Leave Requests ΓÇô compact available leave / pending request badges on small screens */
@media (max-width: 767.98px) {
  .available-leave-count {
    height: auto !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .available-leave-count #messageDiv,
  .available-leave-count #pendingDiv {
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 10px !important;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  /* Avoid extra left margin between the two badges on mobile */
  .available-leave-count #pendingDiv.ms-2 {
    margin-left: 0 !important;
  }
}

input[type="radio"].red-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background-color: #e9edf7;
  border: 2px solid #ccc;
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}

input[type="radio"].red-radio:checked {
  border-color: #3498db;
  background-color: #3498db;
}

input[type="radio"].red-radio:checked::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

input[type="checkbox"].custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  background-color: #e9edf7;
  border: 2px solid #ccc;
  border-radius: 0.25rem;
  position: relative;
  cursor: pointer;
  transition: 0.2s;
}

table input[type="checkbox"] {
  margin-top: 8px;
}

input[type="checkbox"].custom-checkbox:checked {
  background-color: #3498db;
  border-color: #3498db;
}

input[type="checkbox"].custom-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"].custom-checkbox:hover {
  border-color: #3498db;
}

.tooltip {
  position: relative;
}

.tooltip .tooltiptext {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  top: -30px;
  background: black;
  border-radius: 3px;
  font-size: 10px;
  padding: 3px 5px;
  opacity: 0;
  transition: 0.3s;
  width: max-content;
}

.tooltip:hover .tooltiptext {
  opacity: 1;
}

.progress {
  display: flex;
  justify-content: space-between;
}

.progress li {
  position: relative;
  width: 50%;
}

.progress li .sec::before {
  content: "";
  position: absolute;
  height: 4px;
  width: 100%;
  background-color: #D4E9FF;
  left: 0;
  top: 15px;
  bottom: 0;
}

.progress li.active .sec::before {
  background-color: #3498db;
}

.progress li span {
  position: relative;
  z-index: 1;
}

.progress li:nth-child(2),
.progress li:nth-child(3) {
  display: flex;
  justify-content: center;
}

.progress li:nth-child(4) {
  display: flex;
  justify-content: flex-end;
  width: 30%;
}

.progress li:nth-child(1) {
  width: 30%;
}

/* .select2-container--default {
  padding-bottom: 0.75rem;
} */
#accordionToggle:focus-visible {
  outline: none;
}

.btn-square.disable {
  background: #ededed;
  color: #a9a9a9;
  cursor: no-drop;
}

/* .bg-primary-900 {
  background-color: #672419;
}
.bg-primary-800 {
  background-color: #AC3B2A;
}
.bg-primary-700 {
  background-color: #ce4732;
}
.bg-primary-600 {
  background-color: #3498db;
}
.bg-primary-500 {
  background-color: #F7C8C1;
}
.bg-primary-400 {
  background-color: #FBE5E1;
}
.bg-primary-300 {
  background-color: #FCEDEB;
}
.bg-primary-200 {
  background-color: #FEF6F5;
}
.bg-primary-100 {
  background-color: #d4e9ff;
}
.bg-primary-50 {
  background-color: #f6f6f6;
}
.text-primary-600 {
  color: #3498db;
} */
.dropdown-wrapper:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================
 * Recruitment Survey ΓÇô layout
 * ============================ */

/* Header: stack title and controls vertically on small screens */
@media (max-width: 767.98px) {
  .survey-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .survey-header > h3 {
    margin-bottom: 0.25rem;
  }

  .survey-header > div {
    width: 100%;
    justify-content: space-between;
  }

  .survey-header input[type="text"] {
    width: 100%;
  }
}

/* Card container: allow vertical stacking and full-width tabs on narrow screens */
@media (max-width: 767.98px) {
  .survey-content {
    padding: 0.75rem;
  }

  .survey-content .oh-tabs__tab {
    width: 100%;
  }

  .survey-content .tab-button {
    width: 100%;
    justify-content: space-between;
  }
}

/* Template table: horizontal scroll on small screens (row layout preserved) */
@media (max-width: 991.98px) {
  .survey-template-table-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .survey-template-table-wrapper table {
    min-width: 26rem;
    max-width: 100%;
    table-layout: fixed;
  }

  /* Recruitment Survey (Template tab): tighter columns + wrapping (horizontal table kept) */
  .survey-template-table-wrapper th,
  .survey-template-table-wrapper td {
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
    padding: 0.45rem 0.5rem !important;
    box-sizing: border-box;
  }

  /* On small screens, disable sticky first column so "Type" doesn't get hidden */
  .survey-template-table-wrapper .stickyleft {
    position: static;
    left: auto;
    background-color: transparent;
  }

  .survey-template-table-wrapper th:nth-child(1),
  .survey-template-table-wrapper td:nth-child(1) {
    width: 36%;
    min-width: 0;
    max-width: 10rem;
  }

  .survey-template-table-wrapper th:nth-child(2),
  .survey-template-table-wrapper td:nth-child(2) {
    width: 34%;
    min-width: 0;
    max-width: 6.75rem;
  }

  .survey-template-table-wrapper th:nth-child(3),
  .survey-template-table-wrapper td:nth-child(3) {
    width: 5rem;
    min-width: 4.75rem;
    max-width: 5.25rem;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
    white-space: nowrap;
  }

  .survey-template-table-wrapper td:nth-child(3) .oh-btn-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
  }

  .survey-template-table-wrapper td:nth-child(3) .oh-btn,
  .survey-template-table-wrapper td:nth-child(3) a.oh-btn {
    width: auto !important;
    min-width: 0;
    padding: 0.3rem 0.4rem !important;
  }

  .survey-template-table-wrapper td .flex {
    align-items: flex-start;
  }

  .survey-template-table-wrapper td.stickyleft .flex.gap-3 {
    gap: 0.45rem;
  }

  .survey-template-table-wrapper td.stickyleft img.rounded-full {
    width: 26px !important;
    height: 26px !important;
    object-fit: cover;
  }

  /* Let the question text wrap next to the avatar */
  .survey-template-table-wrapper td.stickyleft span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Recruitment Survey ΓÇô question "Details" modal: align label/value nicely */
#genericModalBody #detailViewContainer .oh-timeoff-modal__stat {
  display: grid;
  grid-template-columns: minmax(130px, 42%) 1fr;
  column-gap: 0.75rem;
  align-items: flex-start;
  margin-right: 0;
}

#genericModalBody #detailViewContainer .oh-timeoff-modal__stat-title {
  margin-bottom: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  grid-column: 1;
}

#genericModalBody #detailViewContainer .oh-timeoff-modal__stat-count {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  grid-column: 2;
}

/* Stack each detail row full-width so all labels start at same x-position */
#genericModalBody #detailViewContainer .row > [class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Ensure page content starts below fixed Prime header on small screens */
@media (max-width: 767.98px) {
  #main > .oh-wrapper:first-of-type {
    margin-top: 4.75rem;
  }
}

@media (max-width: 767.98px) {
  /* Recruitment > Skill Zone (list view): title left, icon actions right (same as desktop) */
  #skill_zone_container .oh-accordion-meta__header,
  #skill_zone_container .oh-accordion-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    height: auto;
    min-height: 3rem;
    padding: 0.5rem 0.75rem;
  }

  #skill_zone_container .oh-accordion-meta__title {
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
  }

  #skill_zone_container .oh-accordion-header > .flex:first-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
    flex-wrap: nowrap;
    align-items: center;
  }

  /* Theme list: full skill zone name (wrap if needed; no ellipsis) */
  #skill_zone_container .oh-accordion-header > .flex:first-child > span.w-6,
  #skill_zone_container .oh-accordion-header > .flex:first-child > span[class*="rounded-full"] {
    flex-shrink: 0;
  }

  #skill_zone_container .oh-accordion-header > .flex:first-child > span.text-base {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  /* Recruitment oh-accordion-meta list: title row + badge */
  #skill_zone_container .oh-accordion-meta__header .oh-accordion-meta__title {
    max-width: 100%;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-tabs__input-badge-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    overflow: visible;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-tabs__input-badge-container > .oh-badge {
    flex-shrink: 0;
  }

  #skill_zone_container .oh-accordion-meta__header .sz-accordion-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-btn-group,
  #skill_zone_container .oh-accordion-header .oh-btn-group {
    width: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.15rem;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-btn-group .w-100,
  #skill_zone_container .oh-accordion-header .oh-btn-group .w-100 {
    width: auto;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-btn-group .oh-btn,
  #skill_zone_container .oh-accordion-meta__header .oh-btn-group button,
  #skill_zone_container .oh-accordion-header .oh-btn-group .oh-btn,
  #skill_zone_container .oh-accordion-header .oh-btn-group button {
    min-width: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-btn-group .oh-btn ion-icon,
  #skill_zone_container .oh-accordion-meta__header .oh-btn-group button ion-icon,
  #skill_zone_container .oh-accordion-header .oh-btn-group .oh-btn ion-icon,
  #skill_zone_container .oh-accordion-header .oh-btn-group button ion-icon {
    font-size: 0.875rem;
    width: 0.875rem;
    height: 0.875rem;
  }

  #skill_zone_container .oh-accordion-meta__header .oh-btn-group form,
  #skill_zone_container .oh-accordion-header .oh-btn-group form {
    width: auto;
  }

  /* Theme Skill Zone candidate table: un-pin first column; allow name + cells to wrap */
  #skill_zone_container .fixed-table th.stickyleft,
  #skill_zone_container .fixed-table td.stickyleft {
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
  }

  #skill_zone_container .fixed-table {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }

  #skill_zone_container .fixed-table td.stickyleft .oh-profile {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
  }

  #skill_zone_container .fixed-table td.stickyleft .oh-profile span {
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
  }

  #skill_zone_container .fixed-table td:has(.oh-btn-group) .oh-btn-group {
    flex-wrap: nowrap;
    gap: 0.2rem;
    justify-content: flex-start;
  }

  #skill_zone_container .fixed-table td:has(.oh-btn-group) .oh-btn,
  #skill_zone_container .fixed-table td:has(.oh-btn-group) .oh-btn-group button {
    min-width: 1.65rem;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
  }

  #skill_zone_container .fixed-table td:has(.oh-btn-group) ion-icon {
    font-size: 0.9rem;
    width: 0.9rem;
    height: 0.9rem;
  }

  /* Recruitment skill_zone_list (oh-sticky-table): un-pin first column */
  #skill_zone_container .oh-sticky-table__sd,
  #skill_zone_container .oh-sticky-table__thead .oh-sticky-table__th:first-child {
    position: relative !important;
    left: auto !important;
    box-shadow: none !important;
  }

  #skill_zone_container .oh-sticky-table__table {
    min-width: 0 !important;
  }

  #skill_zone_container .oh-sticky-table__sd .oh-profile {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
  }

  #skill_zone_container .oh-sticky-table__sd .oh-profile__name,
  #skill_zone_container .oh-sticky-table__sd .oh-profile span {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
  }
}

@media (max-width: 767.98px) {
  /* Employee profile actions dropdown: keep fully visible on small screens */
  .dropdown-menu.profile-action-dropdown {
    position: absolute !important;
    top: calc(100% + 0.5rem) !important;
    right: 0 !important;
    left: auto !important;
    width: min(70vw, 12rem) !important;
    max-width: calc(100vw - 1.5rem) !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 10000 !important;
    transform: none !important;
  }

  .dropdown-menu.profile-action-dropdown p {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    font-size: 0.7rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .profile-action-wrapper {
    overflow: visible;
    z-index: 20;
  }
}

/* Prime fixed header: prevent content from hiding on small screens */
@media (max-width: 991.98px) {
  main {
    padding-top: 5.5rem;
  }
}

@media (max-width: 767.98px) {
  main {
    padding-top: 8.25rem;
  }

  main #dashboard {
    margin-top: -8.0rem;
  }

  /* Payroll dashboard: month/year selector row ΓÇô compact & aligned on mobile */
  main #dashboard .flex.ms-2.mt-3.justify-between.align-center {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    margin-left: 0 !important;
  }

  main #dashboard label[for="monthYearField"] {
    width: auto !important; /* override inline width:300px */
    flex: 1 1 100%;
    margin: 0 !important;
  }

  main #dashboard #monthYearField {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important; /* override m-1 */
    padding: 0.4rem 0.5rem !important; /* tighter than p-2 */
    box-sizing: border-box;
  }

  /* Payroll > Contract: compact card + aligned header on small screens */
  #personal.oh-profile-section {
    padding: 1rem !important; /* override p-10 */
    margin-bottom: 1rem !important;
  }

  #personal .oh-profile-section__card {
    padding: 1rem !important; /* override p-10 */
  }

  #personal .oh-payslip__header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
  }

  #personal .oh-payslip__header-left h2 {
    margin-bottom: 0 !important;
  }

  #personal .oh-payslip__header-right {
    width: 100%;
    justify-content: flex-start !important;
  }

  /* Status dropdown wrapper is w-[10%] on desktop ΓÇô make it full-width on mobile */
  #personal .oh-payslip__header-right .w-\[10\%\] {
    width: 100% !important;
  }

  #personal .oh-payslip__header-right .select2,
  #personal .oh-payslip__header-right .select2-container,
  #personal .oh-payslip__header-right select.oh-select {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Reduce form vertical density slightly */
  #personal .oh-input__group {
    margin-bottom: 0.75rem;
  }

  /* Asset dashboard: give charts a real height on phones */
  #assetAvailableChartContainer,
  #assetCategoryChartContainer {
    height: 260px;
  }

  #assetAvailableChartContainer canvas,
  #assetCategoryChartContainer canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  /* Small screens: Actions cells with many icon buttons should wrap (Recruitment pipeline, etc.) */
  .heightContainer .fixed-table td.stickyright .flex.justify-center.gap-1 {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.25rem !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn.w-100,
  .heightContainer .fixed-table td.stickyright .oh-btn.w-50 {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 0.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .heightContainer .fixed-table td.stickyright ion-icon {
    margin: 0 !important;
    font-size: 16px;
  }

  /* Leave Allocation Request To Approve ΓÇô Employee column is DATA, not checkbox */
  .heightContainer .fixed-table th[id$="-employee_id-header"].stickyleft,
  .heightContainer .fixed-table th[id$="-employee_id-header"].stickyleft > div,
  .heightContainer .fixed-table td.stickyleft .oh-profile {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 190px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  .heightContainer .fixed-table th[id$="-employee_id-header"].stickyleft > div {
    flex-wrap: wrap !important;
    min-width: 0;
  }

  .heightContainer .fixed-table td.stickyleft .oh-profile {
    min-width: 0 !important;   /* override min-w-[200px] */
    max-width: 100% !important;
  }

  /* Leave Allocation card: keep sort icon + label aligned, never overlap */
  #all-leave-container .fixed-table th[id$="-requested_days-header"] {
    min-width: 0 !important; /* override min-w-[150px] */
    overflow: hidden;
  }

  #all-leave-container .fixed-table th[id$="-requested_days-header"] > div {
    display: grid !important;
    grid-template-columns: 14px minmax(0, 1fr);
    column-gap: 0.25rem;
    align-items: center;
    width: 100% !important;
    min-width: 0;
    overflow: hidden;
  }

  /* Sort icon stays in first grid column */
  #all-leave-container .fixed-table th[id$="-requested_days-header"] > div > span.text-xs {
    width: 14px;
    min-width: 14px;
  }

  /* Label can wrap within its own column, but icon stays aligned */
  #all-leave-container .fixed-table th[id$="-requested_days-header"] > div > span.flex.w-max {
    width: auto !important; /* override Tailwind w-max */
    max-width: 100% !important;
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Requested Days column: give a bit more width on mobile */
  #all-leave-container .fixed-table th[id$="-requested_days-header"],
  #all-leave-container .fixed-table th[id$="-requested_days-header"] > div,
  #all-leave-container .fixed-table td[id*="-requested_days-"],
  #all-leave-container .fixed-table td:nth-child(3) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 120px !important;
  }

  /* Leave Allocation dashboard card: make Actions column a bit narrower */
  #all-leave-container .fixed-table th.stickyright,
  #all-leave-container .fixed-table td.stickyright,
  #all-leave-container .fixed-table th.stickyright > div {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 90px !important;
  }


  /* Header: only long paths should wrap/stack; short paths stay centered */
  [data-header-debug="true"] {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.35rem;
  }

  /* Long breadcrumb path: put on its own row */
  [data-header-debug="true"] .breadcrumb:not(.breadcrumb--short) {
    flex: 1 1 100%;
    flex-wrap: wrap;
    row-gap: 0.15rem;
    font-size: 0.8rem;
    line-height: 1.25;
  }

  /* Short breadcrumb path: keep original styling + vertically centered */
  [data-header-debug="true"] .breadcrumb.breadcrumb--short {
    flex: 0 1 auto;
    align-self: center;
  }

  /* Keep right-side controls (timer/profile) on a separate row if needed */
  [data-header-debug="true"] > div.flex.items-center.gap-8 {
    margin-left: auto;
    flex: 0 0 auto;
  }

  [data-header-debug="true"] .breadcrumb li:last-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  [data-header-debug="true"] .breadcrumb li:last-child a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  main {
    padding-top: 9rem;
  }
}

/* Recruitment dashboard: joinings chart fills tile width; height set in dashboard template on mobile */
.rec-joinings-chart {
  width: 100%;
  min-width: 0;
  position: relative;
}

.rec-joinings-chart canvas {
  box-sizing: border-box;
}

/* Recruitment dashboard charts: prevent over-stretching on small screens */
@media (max-width: 991.98px) {
  .rec-joinings-chart {
    height: 220px;
  }
  .rec-joinings-chart canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }
}

/* Recruitment dashboard charts (desktop): give chart a comfortable height */
@media (min-width: 992px) {
  .rec-joinings-chart {
    height: 320px;
  }
  .rec-joinings-chart canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }
}

@media (max-width: 575.98px) {
  .rec-joinings-chart {
    height: 280px;
  }
}

.sha {
  position: relative;
}

.sha::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(360deg, #ffffff, transparent);
}

.header-icon--primary {
  background-color: #d4e9ff !important;
}

.header-icon--primary:hover {
  background-color: #3498db !important;
  color: #ffffff !important;
}

/* ============================
 * Employee Profile ΓÇô Leave cards
 * ============================ */

/* Layout: icon on the left, text on the right, responsive spacing */
.leave-balance-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.leave-balance-card .oh-profile {
  flex-shrink: 0;
}

.leave-balance-card .ps-1 {
  flex: 1 1 auto;
}

/* Label/value rows: keep labels readable and values aligned */
.leave-balance-card .flex.justify-between {
  column-gap: 0.5rem;
}

.leave-balance-card .flex.justify-between p:first-child {
  flex: 1 1 auto;
  white-space: normal;
}

.leave-balance-card .flex.justify-between p:last-child {
  flex: 0 0 auto;
  text-align: right;
}

@media (max-width: 575.98px) {
  .leave-balance-card {
    padding: 0.85rem 0.9rem;
  }

  .leave-balance-card h5 {
    font-size: 0.9rem;
  }

  .leave-balance-card .flex.justify-between {
    align-items: flex-start;
  }

  .leave-balance-card .flex.justify-between p:last-child {
    font-size: 0.8rem;
  }
}

/* ============================
 * Employee Profile ΓÇô History cards
 * ============================ */

/* Small screens: stack cards vertically, no overlap */
@media (max-width: 767.98px) {
  .oh-history-timeline {
    max-width: 100% !important;
    margin-right: 0 !important;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
  }

  .oh-history-timeline ul.space-y-10 {
    padding-left: 0;
    padding-right: 0;
  }

  .oh-history-timeline ul.space-y-10 > li {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start !important;
    gap: 0;
    padding-bottom: 1.5rem;
  }

  /* Date badge: full width, left-aligned */
  .oh-history-timeline ul.space-y-10 > li > div:first-child {
    width: 100% !important;
    max-width: 100%;
    text-align: left !important;
    padding-right: 0 !important;
    order: 1;
    margin-top: 0 !important;
    margin-bottom: 0.5rem;
  }

  /* Avatar: flow in document, centered */
  .oh-history-timeline ul.space-y-10 > li > div:nth-child(2) {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 auto 0.75rem auto !important;
    order: 2;
    flex-shrink: 0;
  }

  /* Content block: full width, no left padding */
  .oh-history-timeline ul.space-y-10 > li > div:last-child {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    padding-left: 0 !important;
    text-align: left !important;
    order: 3;
  }

  /* Changes box: ensure proper wrapping */
  .oh-history-timeline .list-checked li {
    word-break: break-word;
    white-space: normal;
  }
}

/* ============================
 * Employee Module ΓÇô small-screen responsiveness
 * (Profile, Employees, Document Requests, Shift/Work Type, Rotating, Disciplinary, Policies, Org Chart)
 * ============================ */

/* Wrappers: prevent overflow, consistent padding */
@media (max-width: 767.98px) {
  .oh-wrapper {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 100%;
  }

  #view-container,
  #policyContainer,
  #listContainer {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow-x: hidden;
  }

  /* Disciplinary list: table scroll, no sticky so all columns scroll together */
  #dis-container .fixed-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #dis-container .fixed-table table {
    min-width: 600px;
  }

  #dis-container .stickyleft,
  #dis-container .stickyleft-second,
  #dis-container .stickyright {
    position: static !important;
    left: auto !important;
    right: auto !important;
  }

  /* Disciplinary list: compact columns, aligned, reduced whitespace on small screens */
  #dis-container .fixed-table table {
    table-layout: fixed;
    min-width: 0;
  }
  #dis-container .fixed-table th,
  #dis-container .fixed-table td {
    vertical-align: middle !important;
    padding: 0.35rem 0.4rem !important;
  }
  #dis-container .fixed-table th.stickyleft,
  #dis-container .fixed-table td.stickyleft {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
  #dis-container .fixed-table th.stickyleft-second,
  #dis-container .fixed-table td.stickyleft-second {
    width: 140px !important;
    min-width: 80px !important;
    max-width: 160px !important;
  }
  #dis-container .fixed-table td.stickyleft-second .truncate {
    white-space: normal !important;
    word-break: break-word !important;
  }
  #dis-container .fixed-table th:nth-child(3),
  #dis-container .fixed-table td:nth-child(3) {
    width: 100px !important;
    min-width: 80px !important;
    max-width: 120px !important;
  }
  #dis-container .fixed-table th:nth-child(4),
  #dis-container .fixed-table td:nth-child(4) {
    width: 60px !important;
    min-width: 50px !important;
    max-width: 70px !important;
  }
  #dis-container .fixed-table th:nth-child(5),
  #dis-container .fixed-table td:nth-child(5) {
    width: 90px !important;
    min-width: 75px !important;
    max-width: 95px !important;
  }
  #dis-container .fixed-table th:nth-child(6),
  #dis-container .fixed-table td:nth-child(6) {
    width: 100px !important;
    min-width: 80px !important;
    max-width: 120px !important;
  }
  #dis-container .fixed-table th:nth-child(7),
  #dis-container .fixed-table td:nth-child(7) {
    width: 90px !important;
    min-width: 70px !important;
    max-width: 110px !important;
  }
  #dis-container .fixed-table td:nth-child(3) .truncate,
  #dis-container .fixed-table td:nth-child(6) .truncate,
  #dis-container .fixed-table td:nth-child(7) .truncate {
    white-space: normal !important;
    word-break: break-word !important;
  }
  #dis-container .fixed-table th.stickyright,
  #dis-container .fixed-table td.stickyright {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  #dis-container .fixed-table th.stickyright {
    white-space: nowrap !important;
    text-align: center !important;
  }
  #dis-container .fixed-table td.stickyright .oh-btn-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.08rem;
  }
  #dis-container .fixed-table td.stickyright .oh-btn,
  #dis-container .fixed-table td.stickyright .oh-btn-group .oh-btn,
  #dis-container .fixed-table td.stickyright .oh-btn-group form .oh-btn {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
    min-width: 0 !important;
  }
  #dis-container .fixed-table td.stickyright .oh-btn-group form {
    flex: 0 0 auto !important;
    width: auto !important;
  }
  #dis-container .fixed-table td.stickyright ion-icon {
    font-size: 0.85rem !important;
    margin: 0 !important;
  }

  /* Organisation chart: title bar stacks; chart scrollable */
  .oh-main__titlebar.oh-main__titlebar--left {
    flex-wrap: wrap;
  }

  .oh-main__titlebar.oh-main__titlebar--left .flex.gap-2 {
    flex-wrap: wrap;
  }

  #chart_target {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    padding: 0.25rem 0;
  }

  .oh-main__org-chart-container {
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    min-height: calc(100vh - 220px);
    max-height: calc(100vh - 140px);
  }

  /* On small screens, disable rotated left-to-right org chart so native scrollbars work */
  .oh-main__org-chart-container .orgchart.l2r {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
  }

  /* Modals: fit viewport on small screens */
  .oh-modal__dialog {
    max-width: calc(100vw - 1.5rem) !important;
    margin: 0.75rem;
  }

  .oh-modal__dialog.custom-dialog {
    max-width: calc(100vw - 1.5rem) !important;
  }

  #dynamicCreateModalBody {
    max-width: 100%;
  }

  /* Policy / document nav bars: stack or wrap */
  .oh-wrapper .d-flex.flex-row-reverse,
  .oh-wrapper .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .oh-wrapper {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  #view-container,
  #policyContainer,
  #listContainer {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .oh-modal__dialog {
    max-width: calc(100vw - 1rem) !important;
    margin: 0.5rem;
  }
}

/* Shift / Work type request nav and list (loaded into #view-container): reuse generic list rules */
#view-container .fixed-table {
  width: 100%;
}

#view-container .heightContainer .fixed-table th,
#view-container .heightContainer .fixed-table td {
  white-space: normal;
  word-break: break-word;
}

/* Policies records / cards: responsive grid */
#policyContainer .row {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
}

#policyContainer [class*="col-"] {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

@media (max-width: 767.98px) {
  #policyContainer [class*="col-md-"],
  #policyContainer [class*="col-lg-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #policyContainer {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #policyContainer .oh-pagination__nav {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.35rem;
  }
}

/* Organization chart (/employee/organisation-chart/) */
@media (max-width: 767.98px) {
  main:has(#chart_target) .oh-main__titlebar--left > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }

  main:has(#chart_target) #mangerSelect {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  #chart_target {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
  }

  .oh-main__org-chart-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}

/* Disciplinary actions list (hx #actionContainer) */
@media (max-width: 767.98px) {
  #actionContainer {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #actionContainer .fixed-table,
  #actionContainer .oh-sticky-table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Leave tab (Employee Profile): kanban cards ΓÇô scrollable on small screens, smaller min-width */
@media (max-width: 767.98px) {
  .kanban-card-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .oh-kanban-card {
    min-width: 280px;
    flex-basis: 280px;
    flex-shrink: 0;
  }
}

@media (max-width: 575.98px) {
  .oh-kanban-card {
    min-width: 260px;
    flex-basis: 260px;
  }
}

/* ============================
 * Employees: list, card, individual view
 * ============================ */
/* Employee card grid: responsive columns */
@media (max-width: 575.98px) {
  .oh-layout--grid-3 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Generic prime card grid (used by Employees card view and others) */
  #gridView .grid.grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .oh-layout--grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* 2-column grid on small/medium screens */
  #gridView .grid.grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  /* Employees list (group_by or prime_list_table inside #listContainer) */
  #listContainer .fixed-table,
  #listContainer .heightContainer .fixed-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #listContainer .fixed-table table,
  #listContainer .heightContainer .fixed-table table {
    min-width: 700px;
  }

  #listContainer .stickyleft,
  #listContainer .stickyleft-second,
  #listContainer .stickyright {
    position: static !important;
    left: auto !important;
    right: auto !important;
  }

  /* Employees: oh-sticky-table (group_by employee list) */
  #listContainer .oh-sticky-table,
  #view-container .oh-sticky-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #listContainer .oh-sticky-table__table,
  #view-container .oh-sticky-table__table {
    min-width: 700px;
  }

  /* Employees #view-container: un-pin sticky table columns (list + group_by) */
  #view-container .oh-sticky-table__sd,
  #view-container .oh-sticky-table__thead .oh-sticky-table__th {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    box-shadow: none !important;
  }

  #view-container .oh-sticky-table__right,
  #view-container .oh-sticky-table__td.oh-sticky-table__right,
  #view-container .oh-sticky-table__thead .oh-sticky-table__th.oh-sticky-table__right {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  #view-container .fixed-table,
  #view-container .heightContainer .fixed-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #view-container .fixed-table table,
  #view-container .heightContainer .fixed-table table {
    min-width: 600px;
  }

  #view-container .stickyleft,
  #view-container .stickyleft-second,
  #view-container .stickyright {
    position: static !important;
    left: auto !important;
    right: auto !important;
  }

  /* Nav bar (prime_nav): filter dropdown, search, view toggles */
  .navFilterForm {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .navFilterForm .dropdown-content {
    min-width: 0 !important;
    width: min(90vw, 22rem) !important;
    max-width: calc(100vw - 1.5rem);
  }

  /* Candidate grid card ΓÇô ensure no horizontal scroll on mobile */
  #gridView {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    overflow-x: hidden !important;
  }

  #gridView .grid.grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  #gridView .grid.grid-cols-4 > .border.border-\[\#ebebeb\].rounded-md.shadow-card {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Same as grid-cols-4 rules: responsive grid now uses grid-cols-1 on small screens */
  #gridView .grid > .border.border-\[\#ebebeb\].rounded-md.shadow-card {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
  }

  #gridView .grid.grid-cols-4 .text-xs {
    white-space: normal !important;
    word-break: break-word !important;
  }

  #gridView .grid .text-xs {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Card row avatar: do not shrink with flex sibling + img max-width:100% (Tailwind preflight) */
  #gridView .avatar-thumb {
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
  }
}

/* Document request list rows: desktop table grid (template uses .document-request-list-row) */
@media (min-width: 768px) {
  .document-request-list-row {
    grid-template-columns: 60px minmax(0, 1fr) 120px 120px minmax(140px, 180px);
  }
}

/* ============================
 * Document Requests: pipeline, list
 * ============================ */
@media (max-width: 767.98px) {
  /* Document pipeline stages */
  #view-container .accordion-wrapper .oh-accordion-body .fixed-table,
  #view-container [id*="doc"] .fixed-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #view-container .accordion-wrapper .fixed-table table {
    min-width: 600px;
  }

  /* Document list (hlv-container) */
  .hlv-container .fixed-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hlv-container .fixed-table table {
    min-width: 600px;
  }

  /* Document request CBV list (Tailwind grid inside .hlv-container, not .fixed-table) */
  #view-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #view-container .hlv-container,
  #view-container .hlv-container > .bg-white.rounded-md.shadow-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #view-container .hlv-container .heightContainer {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .oh-tabs__movable-body .hlv-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .document-request-list-row {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Leave Allocation Requests (#all-leave-container): compact, aligned, reduce whitespace */
  #all-leave-container .fixed-table {
    table-layout: fixed;
  }

  #all-leave-container .fixed-table th,
  #all-leave-container .fixed-table td {
    padding: 0.35rem 0.45rem !important;
    font-size: 0.75rem;
    vertical-align: middle !important;
  }

  /* Checkbox column (only when actual bulk-select checkbox exists) */
  #all-leave-container .fixed-table thead th.stickyleft:has(.bulk-list-table-row),
  #all-leave-container .fixed-table tbody td.stickyleft:has(.bulk-list-table-row) {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }

  /* Employee column (override inline 220px !important) ΓÇô treat as DATA column */
  #all-leave-container .fixed-table th[id$="-employee_id-header"].stickyleft,
  #all-leave-container .fixed-table th[id$="-employee_id-header"].stickyleft > div,
  #all-leave-container .fixed-table td.stickyleft .oh-profile {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 190px !important;
  }

  /* Description column (override inline 180px !important) */
  #all-leave-container .fixed-table th[id$="-description-header"],
  #all-leave-container .fixed-table th[id$="-description-header"] > div {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }

  /* Options column (second-to-last) */
  #all-leave-container .fixed-table tr > th:nth-last-child(2),
  #all-leave-container .fixed-table tr > td:nth-last-child(2) {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Actions column (last) ΓÇô override inline 180px !important */
  #all-leave-container .fixed-table th.stickyright,
  #all-leave-container .fixed-table td.stickyright {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  /* Actions header: align left (not centered) */
  #all-leave-container .fixed-table th.stickyright > div {
    text-align: left !important;
  }

  #all-leave-container .fixed-table td.stickyright .oh-btn-group {
    gap: 0.2rem;
    justify-content: center;
  }

  #all-leave-container .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.35rem !important;
    min-width: 0 !important;
  }

  /* Employee profile in table */
  #all-leave-container .fixed-table td.stickyleft-second .oh-profile {
    min-width: 150px !important;
  }

  #all-leave-container .fixed-table td.stickyleft-second .oh-profile__image {
    width: 22px !important;
    height: 22px !important;
  }

  /* Dashboard "Leave Allocation Approve" table: Employee is a DATA column (no checkbox) */
  .heightContainer .fixed-table th[id^="all-leave-container-1-employee_id-header"].stickyleft,
  .heightContainer .fixed-table th[id^="all-leave-container-1-employee_id-header"].stickyleft > div,
  .heightContainer .fixed-table td.stickyleft:has(.oh-profile) {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 180px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  .heightContainer .fixed-table th[id^="all-leave-container-1-employee_id-header"].stickyleft > div {
    flex-wrap: wrap !important;
    min-width: 0;
  }

  /* Actions column: compact but readable */
  .heightContainer .fixed-table th.stickyright,
  .heightContainer .fixed-table td.stickyright {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100px !important;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn-group {
    gap: 0.2rem;
    justify-content: center;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.35rem !important;
    min-width: 0 !important;
  }

  /* Reimbursements (#hlvd6ea): compact, aligned, reduce whitespace */
  #hlvd6ea .fixed-table {
    table-layout: fixed;
  }

  /* Make reimbursements table visibly tighter than default */
  #hlvd6ea .fixed-table th,
  #hlvd6ea .fixed-table td {
    padding: 0.25rem 0.3rem !important;
    font-size: 0.7rem;
    vertical-align: middle !important;
  }

  /* Checkbox column */
  #hlvd6ea .fixed-table thead th.stickyleft,
  #hlvd6ea .fixed-table tbody td.stickyleft {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
  }

  /* Employee column (override inline 220px !important) */
  #hlvd6ea .fixed-table th[id$="-employee_id-header"],
  #hlvd6ea .fixed-table th[id$="-employee_id-header"] > div {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }

  /* Description column (override inline 250px !important) */
  #hlvd6ea .fixed-table th[id$="-description-header"],
  #hlvd6ea .fixed-table th[id$="-description-header"] > div {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 150px !important;
  }

  /* Options column (second-to-last) */
  #hlvd6ea .fixed-table tr > th:nth-last-child(2),
  #hlvd6ea .fixed-table tr > td:nth-last-child(2) {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Actions column (last) ΓÇô override inline 200px !important */
  #hlvd6ea .fixed-table th.stickyright,
  #hlvd6ea .fixed-table td.stickyright {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  #hlvd6ea .fixed-table td.stickyright .oh-btn-group {
    gap: 0.2rem;
    justify-content: center;
  }

  #hlvd6ea .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.35rem !important;
    min-width: 0 !important;
  }

  /* Employee profile in table */
  #hlvd6ea .fixed-table td.stickyleft-second .oh-profile {
    min-width: 150px !important;
  }

  #hlvd6ea .fixed-table td.stickyleft-second .oh-profile__image {
    width: 22px !important;
    height: 22px !important;
  }

  /* Federal Tax (Filing Status ΓÇô #hlvbd19): compact, aligned, reduce whitespace */
  #hlvbd19 .fixed-table {
    table-layout: fixed;
  }

  #hlvbd19 .fixed-table th,
  #hlvbd19 .fixed-table td {
    padding: 0.25rem 0.35rem !important;
    font-size: 0.75rem;
    vertical-align: middle !important;
  }

  /* Tax Rate column (first data column, stickyleft) */
  #hlvbd19 .fixed-table th.stickyleft,
  #hlvbd19 .fixed-table td.stickyleft {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 120px !important;
  }

  /* Min. Income / Max. Income columns */
  #hlvbd19 .fixed-table th[id$="-min_income-header"],
  #hlvbd19 .fixed-table th[id$="-min_income-header"] > div,
  #hlvbd19 .fixed-table th[id$="-get_display_max_income-header"],
  #hlvbd19 .fixed-table th[id$="-get_display_max_income-header"] > div {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 120px !important;
  }

  /* Actions column ΓÇô tighter width */
  #hlvbd19 .fixed-table th.stickyright,
  #hlvbd19 .fixed-table td.stickyright {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100px !important;
  }

  #hlvbd19 .fixed-table td.stickyright .oh-btn-group,
  #hlvbd19 .fixed-table td.stickyright .flex.justify-center.gap-1 {
    gap: 0.25rem;
    justify-content: center;
  }

  #hlvbd19 .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.35rem !important;
    min-width: 0 !important;
  }

  /* Generic: tighten any payroll tables that still use 250px Description header */
  th[id$="-description-header"][style*="width:250px"],
  th[id$="-description-header"][style*="width: 250px"] {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 150px !important;
  }

  th[id$="-description-header"][style*="width:250px"] > div,
  th[id$="-description-header"][style*="width: 250px"] > div {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 150px !important;
  }

  /* Generic: tighten any Actions header still using 200px width */
  th.stickyright[style*="width:200px"],
  th.stickyright[style*="width: 200px"] {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100px !important;
  }

  th.stickyright[style*="width:200px"] > div,
  th.stickyright[style*="width: 200px"] > div {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 100px !important;
  }

  /* Recruitment / pipeline Actions: override inline width:400px (header_attrs.action) */
  th.stickyright[style*="width:400px"],
  th.stickyright[style*="width: 400px"] {
    width: 4.75rem !important;
    min-width: 4.75rem !important;
    max-width: 5.25rem !important;
  }

  th.stickyright[style*="width:400px"] > div,
  th.stickyright[style*="width: 400px"] > div {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0.35rem 0.2rem !important;
    box-sizing: border-box !important;
  }

  /* Tax Rate (%) header: wrap label cleanly without overlapping */
  .heightContainer .fixed-table th[id$="-tax_rate-header"].stickyleft,
  .heightContainer .fixed-table th[id$="-tax_rate-header"].stickyleft > div {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 90px !important;
  }

  th[id$="-tax_rate-header"] > div {
    flex-wrap: wrap !important;
    gap: 0.15rem;
  }

  th[id$="-tax_rate-header"] span {
    display: block;
    width: 100%;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    text-align: left;
  }

  /* Attendance To Validate (dashboard): compact, aligned, reduce whitespace */
  [hx-get*="dashboard-attendance-validate"] .fixed-table table {
    table-layout: fixed;
    min-width: 0;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table th,
  [hx-get*="dashboard-attendance-validate"] .fixed-table td {
    vertical-align: middle !important;
    padding: 0.35rem 0.4rem !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table th.stickyleft,
  [hx-get*="dashboard-attendance-validate"] .fixed-table td.stickyleft {
    min-width: 150px !important;
    width: 160px !important;
    max-width: 180px !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table td.stickyleft .oh-profile {
    min-width: 0 !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table td.stickyleft .oh-profile span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table th:nth-child(2),
  [hx-get*="dashboard-attendance-validate"] .fixed-table td:nth-child(2) {
    width: 95px !important;
    min-width: 85px !important;
    max-width: 100px !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table th:nth-child(3),
  [hx-get*="dashboard-attendance-validate"] .fixed-table td:nth-child(3) {
    width: 85px !important;
    min-width: 70px !important;
    max-width: 95px !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table th.stickyright,
  [hx-get*="dashboard-attendance-validate"] .fixed-table td.stickyright {
    width: 95px !important;
    min-width: 90px !important;
    max-width: 100px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table th.stickyright {
    white-space: nowrap !important;
    text-align: center !important;
  }
  [hx-get*="dashboard-attendance-validate"] .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.75rem !important;
  }

  /* Overtime To Approve (dashboard): compact, aligned, reduce whitespace ΓÇô same as Attendance To Validate */
  [hx-get*="dashboard-overtime-approve"] .fixed-table table {
    table-layout: fixed;
    min-width: 0;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table th,
  [hx-get*="dashboard-overtime-approve"] .fixed-table td {
    vertical-align: middle !important;
    padding: 0.35rem 0.4rem !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table th.stickyleft,
  [hx-get*="dashboard-overtime-approve"] .fixed-table td.stickyleft {
    min-width: 150px !important;
    width: 160px !important;
    max-width: 180px !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table td.stickyleft .oh-profile {
    min-width: 0 !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table td.stickyleft .oh-profile span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table th:nth-child(2),
  [hx-get*="dashboard-overtime-approve"] .fixed-table td:nth-child(2) {
    width: 95px !important;
    min-width: 85px !important;
    max-width: 100px !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table th:nth-child(3),
  [hx-get*="dashboard-overtime-approve"] .fixed-table td:nth-child(3) {
    width: 85px !important;
    min-width: 70px !important;
    max-width: 95px !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table th.stickyright,
  [hx-get*="dashboard-overtime-approve"] .fixed-table td.stickyright {
    width: 95px !important;
    min-width: 90px !important;
    max-width: 100px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table th.stickyright {
    white-space: nowrap !important;
    text-align: center !important;
  }
  [hx-get*="dashboard-overtime-approve"] .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.75rem !important;
  }
}

/* ============================
 * Document Requests ΓÇô movable header (mobile)
 * Keep title + three-dots on one line
 * ============================ */
@media (max-width: 767.98px) {
  .oh-tabs__movable-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem;
    flex-wrap: nowrap !important;
  }

  /* Title should truncate instead of pushing dots down */
  .oh-tabs__movable-header .oh-tabs__movable-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Keep the dropdown button sized to content */
  .oh-tabs__movable-header .oh-dropdown {
    flex: 0 0 auto !important;
  }

  .oh-tabs__movable-header .oh-accordion-meta__btn {
    padding: 0.15rem 0.25rem !important;
    min-width: 0 !important;
  }
}

/* ============================
 * Interviews list ΓÇô compact, aligned columns
 * ============================ */
@media (max-width: 991.98px) {
  /* Base cell alignment for this HLView/list */
  #interviewdelete .fixed-table th,
  #interviewdelete .fixed-table td {
    vertical-align: middle !important;
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
  }

  /* Checkbox column: narrow */
  #interviewdelete .fixed-table th.stickyleft,
  #interviewdelete .fixed-table td.stickyleft {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Candidate (name + chevron) column ΓÇô more compact */
  #interviewdelete .fixed-table th.stickyleft-second,
  #interviewdelete .fixed-table td.stickyleft-second {
    min-width: 140px !important;
    width: 140px !important;
    max-width: 180px !important;
  }

  /* Ensure "toggle + name" row stays compact and centered */
  #interviewdelete .fixed-table .oh-permission-table__tr,
  #interviewdelete .fixed-table .oh-permission-table--toggle,
  #interviewdelete .fixed-table .oh-permission-table__user {
    display: flex !important;
    align-items: center !important;
  }
  #interviewdelete .fixed-table .oh-permission-table__collapse {
    padding: 0 !important;
    margin-right: 0.25rem !important;
  }

  /* Date / Time / Stage columns: shrink to content */
  #interviewdelete .fixed-table th:nth-child(4),
  #interviewdelete .fixed-table td:nth-child(4),
  #interviewdelete .fixed-table th:nth-child(5),
  #interviewdelete .fixed-table td:nth-child(5),
  #interviewdelete .fixed-table th:nth-child(6),
  #interviewdelete .fixed-table td:nth-child(6) {
    white-space: nowrap !important;
    min-width: auto !important;
    width: 1% !important;
  }

  /* Status column ("Upcoming Interview") ΓÇô wrap by words (not letters) */
  #interviewdelete .fixed-table td:nth-child(7),
  #interviewdelete .fixed-table th:nth-child(7) {
    min-width: 90px !important;
    width: auto !important;
  }

  #interviewdelete .fixed-table td:nth-child(7) .flex.items-center {
    justify-content: flex-start;
    white-space: normal !important;
  }

  #interviewdelete .fixed-table td:nth-child(7) .flex.items-center span {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Actions column buttons: tight group */
  #interviewdelete .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    gap: 0.25rem;
  }
  #interviewdelete .fixed-table td.stickyright .oh-btn-group .oh-btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
  }
}

/* ============================
 * Recruitment list ΓÇô compact, aligned columns
 * ============================ */
@media (max-width: 991.98px) {
  /* Base alignment for recruitment HLView */
  #rec-view-container .fixed-table th,
  #rec-view-container .fixed-table td {
    vertical-align: middle !important;
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
  }

  /* Checkbox column (first) */
  #rec-view-container .fixed-table th.stickyleft,
  #rec-view-container .fixed-table td.stickyleft {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Recruitment title (toggle + job title) column ΓÇô more compact */
  #rec-view-container .fixed-table th.stickyleft-second,
  #rec-view-container .fixed-table td.stickyleft-second {
    min-width: 130px !important;
    width: 130px !important;
    max-width: 170px !important;
  }

  #rec-view-container .fixed-table .oh-permission-table--toggle,
  #rec-view-container .fixed-table .oh-permission-table__user {
    display: flex !important;
    align-items: center !important;
  }
  #rec-view-container .fixed-table .oh-permission-table__collapse {
    padding: 0 !important;
    margin-right: 0.25rem !important;
  }

  /* Manager and Job columns ΓÇô tighter width to reduce whitespace */
  #rec-view-container .fixed-table td:nth-child(3),
  #rec-view-container .fixed-table td:nth-child(4) {
    min-width: 130px !important;
    max-width: 170px !important;
  }
  #rec-view-container .fixed-table td:nth-child(3) .oh-profile,
  #rec-view-container .fixed-table td:nth-child(4) .oh-profile {
    max-width: 100% !important;
  }

  /* 'Open Jobs' / counts column */
  #rec-view-container .fixed-table td:nth-child(5) {
    white-space: nowrap !important;
    width: 1% !important;
    max-width: 70px !important;
  }

  /* "0 Hired of 0 Candidates" column ΓÇô allow wrapping but cap width */
  #rec-view-container .fixed-table td:nth-child(6) {
    max-width: 140px !important;
  }

  /* Date columns (start / end) ΓÇô shrink to content */
  #rec-view-container .fixed-table td:nth-child(7),
  #rec-view-container .fixed-table td:nth-child(8) {
    white-space: nowrap !important;
    width: 1% !important;
  }

  /* Status column ΓÇô small but readable */
  #rec-view-container .fixed-table td:nth-child(9) {
    white-space: nowrap !important;
    width: 1% !important;
  }

  /* Actions column ΓÇô tighter cell & button group */
  #rec-view-container .fixed-table td.stickyright {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    width: 1% !important;
    max-width: 120px !important;
  }

  #rec-view-container .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    gap: 0.15rem;
    justify-content: center;
  }

  #rec-view-container .fixed-table td.stickyright .oh-btn-group .oh-btn {
    padding: 0.2rem 0.25rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
    max-width: 2rem;
  }
}

/* ============================
 * Recruitment stages list ΓÇô compact, aligned columns
 * ============================ */
@media (max-width: 991.98px) {
  /* Base alignment for stages HLView */
  #hlv0ef8 .fixed-table th,
  #hlv0ef8 .fixed-table td {
    vertical-align: middle !important;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }

  /* Checkbox column (first) */
  #hlv0ef8 .fixed-table th.stickyleft,
  #hlv0ef8 .fixed-table td.stickyleft {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Stage name (toggle + label) column ΓÇô more compact */
  #hlv0ef8 .fixed-table th.stickyleft-second,
  #hlv0ef8 .fixed-table td.stickyleft-second {
    min-width: 120px !important;
    width: 120px !important;
    max-width: 150px !important;
  }

  #hlv0ef8 .fixed-table .oh-permission-table--toggle,
  #hlv0ef8 .fixed-table .oh-permission-table__user {
    display: flex !important;
    align-items: center !important;
  }
  #hlv0ef8 .fixed-table .oh-permission-table__collapse {
    padding: 0 !important;
    margin-right: 0.25rem !important;
  }

  /* "Managers" and "Description" columns ΓÇô cap width to avoid big whitespace */
  #hlv0ef8 .fixed-table td:nth-child(3),
  #hlv0ef8 .fixed-table td:nth-child(4) {
    max-width: 130px !important;
  }

  /* Let cell content wrap so columns can shrink */
  #hlv0ef8 .fixed-table td .truncate {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Actions column ΓÇô tight */
  #hlv0ef8 .fixed-table td.stickyright {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    width: 1% !important;
    max-width: 120px !important;
  }

  #hlv0ef8 .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    gap: 0.15rem;
    justify-content: center;
  }

  #hlv0ef8 .fixed-table td.stickyright .oh-btn-group .oh-btn {
    padding: 0.2rem 0.25rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
    max-width: 2rem;
  }
}

/* ============================
 * Stage view (list-stage HLView) ΓÇô tighten Managers / Type / Actions
 * ============================ */
@media (max-width: 991.98px) {
  /* Base cell alignment for this view */
  #hlvc228 .fixed-table th,
  #hlvc228 .fixed-table td {
    vertical-align: middle !important;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
  }

  /* Managers column (3rd) ΓÇô more compact */
  #hlvc228 .fixed-table th:nth-child(3),
  #hlvc228 .fixed-table td:nth-child(3) {
    min-width: 110px !important;
    width: 110px !important;
    max-width: 130px !important;
  }

  /* Type column (4th) ΓÇô narrow, shrink to content */
  #hlvc228 .fixed-table th:nth-child(4),
  #hlvc228 .fixed-table td:nth-child(4) {
    white-space: nowrap !important;
    min-width: 80px !important;
    width: 80px !important;
    max-width: 90px !important;
  }

  /* Actions header & cell ΓÇô reduce column width */
  #hlvc228 .fixed-table th.stickyright,
  #hlvc228 .fixed-table td.stickyright {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    width: 110px !important;
    max-width: 110px !important;
  }

  /* Actions button group ΓÇô minimize gaps */
  #hlvc228 .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    gap: 0.1rem;
    justify-content: center;
  }

  #hlvc228 .fixed-table td.stickyright .oh-btn-group .oh-btn {
    padding: 0.18rem 0.22rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
  }

  /* Delete button inside form (last action) ΓÇô remove flex:1 and full width */
  #hlvc228 .fixed-table td.stickyright .oh-btn-group form.w-50 .oh-btn {
    flex: 0 0 auto !important;   /* override flex: 1 1 auto on .oh-btn */
    width: auto !important;      /* override w-100 */
    padding-left: 0.18rem !important;
    padding-right: 0.18rem !important;
  }
}

/* On very small screens, also override the generic '#listContainer .oh-btn-group' flex rule
   for stage-view delete action, which is inside a 'form.w-50'. */
@media (max-width: 767.98px) {
  /* Stop the form itself from flexing to fill the row */
  #hlvc228 .oh-btn-group form.w-50 {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  /* And ensure the delete button inside does not stretch */
  #hlvc228 .oh-btn-group form.w-50 .oh-btn {
    flex: 0 0 auto !important;
    width: auto !important;
  }
}

/* ============================
 * Generic employee list actions ΓÇô compact buttons & column
 * ============================ */
@media (max-width: 991.98px) {
  /* Tighten Actions column (fixed-table stickyright): list + employee #view-container */
  #listContainer .fixed-table th.stickyright,
  #listContainer .fixed-table td.stickyright,
  #view-container .fixed-table th.stickyright,
  #view-container .fixed-table td.stickyright,
  #actionContainer .fixed-table th.stickyright,
  #actionContainer .fixed-table td.stickyright {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  #listContainer .fixed-table th.stickyright > div,
  #view-container .fixed-table th.stickyright > div,
  #actionContainer .fixed-table th.stickyright > div {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  #listContainer .fixed-table td.stickyright .oh-btn-group,
  #view-container .fixed-table td.stickyright .oh-btn-group,
  #actionContainer .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    gap: 0.08rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap !important;
  }

  #listContainer .fixed-table td.stickyright .oh-btn-group .oh-btn,
  #view-container .fixed-table td.stickyright .oh-btn-group .oh-btn,
  #actionContainer .fixed-table td.stickyright .oh-btn-group .oh-btn {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
    font-size: 0.65rem !important;
    white-space: nowrap;
  }

  #listContainer .fixed-table td.stickyright .oh-btn-group > *,
  #view-container .fixed-table td.stickyright .oh-btn-group > *,
  #actionContainer .fixed-table td.stickyright .oh-btn-group > * {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  #listContainer .fixed-table td.stickyright .oh-btn-group ion-icon,
  #view-container .fixed-table td.stickyright .oh-btn-group ion-icon,
  #actionContainer .fixed-table td.stickyright .oh-btn-group ion-icon {
    font-size: 0.85rem !important;
  }

  /* Employee oh-sticky-table Actions column (inline widths e.g. 313px) */
  #view-container .oh-sticky-table__td.oh-sticky-table__right .oh-btn-group,
  #view-container .oh-sticky-table__right .oh-btn-group {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 0.15rem;
    justify-content: flex-start;
    align-items: center;
  }

  #view-container .oh-sticky-table__td.oh-sticky-table__right .oh-btn,
  #view-container .oh-sticky-table__td.oh-sticky-table__right .oh-btn-group .oh-btn,
  #view-container .oh-sticky-table__td.oh-sticky-table__right button {
    min-width: 1.5rem !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
  }

  #view-container .oh-sticky-table__td.oh-sticky-table__right ion-icon {
    font-size: 0.85rem !important;
  }
}

/* ============================
 * Shift Requests & Work Type Requests
 * ============================ */
@media (max-width: 767.98px) {
  /* Shift/Work type nav: titlebar stacks */
  section.oh-wrapper.oh-main__topbar .oh-main__titlebar--left,
  section.oh-wrapper.oh-main__topbar .oh-main__titlebar--right {
    flex: 1 1 100%;
  }

  section.oh-wrapper.oh-main__topbar form.d-flex {
    flex-wrap: wrap;
    width: 100%;
  }

  /* Quick filters (Rejected, Approved) */
  .oh-wrapper .d-flex.flex-row-reverse {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .oh-wrapper .d-flex.flex-row-reverse .m-3,
  .oh-wrapper .d-flex.flex-row-reverse .me-3 {
    margin: 0.25rem !important;
  }

  /* Shift/Work type tabs */
  .oh-tabs__tablist {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .oh-tabs__tab {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }

  /* Shift request content: sticky table scroll */
  #view-container .oh-sticky-table,
  #view-container .oh-sticky-table__table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #view-container .oh-sticky-table__table {
    min-width: 650px;
  }

  /* Shift Requests list (prime_list_table HLView) ΓÇô compact, aligned columns */
  #shift-container .fixed-table {
    table-layout: fixed;
  }

  #shift-container .fixed-table th,
  #shift-container .fixed-table td {
    vertical-align: middle !important;
    padding: 0.3rem 0.35rem !important;
  }

  /* Checkbox column */
  #shift-container .fixed-table th.stickyleft,
  #shift-container .fixed-table td.stickyleft {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
  }

  /* Employee column (avatar + name) */
  #shift-container .fixed-table th.stickyleft-second,
  #shift-container .fixed-table td.stickyleft-second {
    left: 30px !important;
    min-width: 140px !important;
    width: 140px !important;
    max-width: 170px !important;
    padding-left: 0.25rem !important;
  }
  #shift-container .fixed-table th.stickyleft-second > div {
    gap: 0.35rem !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }
  #shift-container .fixed-table td.stickyleft-second .oh-profile {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #shift-container .fixed-table td.stickyleft-second .oh-profile span {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  /* Shift columns (old/new shift) ΓÇô keep tight */
  #shift-container .fixed-table td:nth-child(3),
  #shift-container .fixed-table td:nth-child(4) {
    max-width: 130px !important;
  }

  /* Date columns ΓÇô shrink to content */
  #shift-container .fixed-table td:nth-child(5),
  #shift-container .fixed-table td:nth-child(6) {
    white-space: nowrap !important;
    width: 1% !important;
  }

  /* Description ΓÇô cap width and wrap */
  #shift-container .fixed-table td:nth-child(7) .truncate {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
  #shift-container .fixed-table th:nth-child(7),
  #shift-container .fixed-table td:nth-child(7) {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
  }

  /* Comment icon column */
  #shift-container .fixed-table td:nth-child(8) {
    width: 48px !important;
    max-width: 48px !important;
    text-align: center;
  }
  #shift-container .fixed-table td:nth-child(8) .oh-btn {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
  }

  /* Row actions column (Edit/Duplicate/Delete) ΓÇô compact */
  #shift-container .fixed-table th:nth-child(9),
  #shift-container .fixed-table td:nth-child(9) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    text-align: center !important;
  }

  /* Ensure the inner header wrapper (div.p-3) is centered and not wider than the cell */
  #shift-container .fixed-table th:nth-child(9) > div {
    width: 100% !important;      /* override inline 190px width */
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    white-space: nowrap !important;    /* keep "Actions" on a single line */
  }

  #shift-container .fixed-table td:nth-child(9) .oh-btn-group {
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.08rem;
  }
  #shift-container .fixed-table td:nth-child(9) .oh-btn-group .oh-btn {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
  }

  /* Approve/Reject column (stickyright) ΓÇô compact icons */
  #shift-container .fixed-table td.stickyright {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    width: 1% !important;
    max-width: 90px !important;
  }
  #shift-container .fixed-table th.stickyright {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    white-space: nowrap !important;   /* keep "Actions" on one line */
    text-align: center !important;
  }
  #shift-container .fixed-table td.stickyright .oh-btn-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.08rem;
  }
  #shift-container .fixed-table td.stickyright .oh-btn {
    width: 1.55rem !important;
    height: 1.55rem !important;
    padding: 0 !important;
    justify-content: center;
  }
  #shift-container .fixed-table td.stickyright ion-icon {
    font-size: 0.9rem !important;
    margin: 0 !important;
  }

  /* Work type activity sidebar */
  .oh-activity-sidebar {
    max-width: 100%;
    width: 100%;
  }
}

@media (min-width: 768px) {
  #shift_request_approve #shift-container .fixed-table thead tr th.stickyleft:first-child:has(.cursor-pointer),
  #shift_request_approve #shift-container .fixed-table tbody tr td.stickyleft:first-child:has(.oh-profile) {
    min-width: 150px !important;
    width: 150px !important;
    max-width: 200px !important;
  }
  #shift_request_approve #shift-container .fixed-table thead tr th.stickyleft:first-child:has(.cursor-pointer) > div {
    box-sizing: border-box;
    min-width: 150px !important;
    width: 150px !important;
    max-width: 200px !important;
  }
  #shift_request_approve #shift-container .fixed-table :is(thead tr th:nth-child(2), tbody tr td:nth-child(2)) {
    min-width: 170px !important;
    width: 170px !important;
    max-width: 220px !important;
  }
  #shift_request_approve #shift-container .fixed-table thead tr th:nth-child(2) > div {
    box-sizing: border-box;
    min-width: 170px !important;
    width: 170px !important;
    max-width: 220px !important;
  }

  #work_type_request_approve #work-shift .fixed-table :is(thead tr th:nth-child(2), tbody tr td:nth-child(2)) {
    min-width: 220px !important;
    width: 220px !important;
    max-width: 280px !important;
  }
  #work_type_request_approve #work-shift .fixed-table thead tr th:nth-child(2) > div {
    box-sizing: border-box;
    min-width: 220px !important;
    width: 220px !important;
    max-width: 280px !important;
  }

  #employee_work_info #pending .fixed-table thead tr th:nth-child(2) {
    min-width: 260px !important;
    width: 260px !important;
    max-width: 420px !important;
  }
  #employee_work_info #pending .fixed-table tbody tr td:nth-child(2) {
    min-width: 260px !important;
    width: 260px !important;
    max-width: none !important;
  }
  #employee_work_info #pending .fixed-table tbody tr td:nth-child(2) .truncate {
    overflow: visible !important;
    max-width: none !important;
    white-space: normal !important;
  }
  #employee_work_info #pending .fixed-table tbody tr td:nth-child(2) .flex.gap-3.items-center {
    min-width: 220px !important;
  }
  #employee_work_info #pending .fixed-table tbody tr td:nth-child(2) .flex.gap-3.items-center > .text-sm.font-medium {
    flex-shrink: 0 !important;
    min-width: 3.5rem !important;
  }
}

/* ============================
 * Attendance module ΓÇô small screens
 * ============================ */
@media (max-width: 767.98px) {
  /* Attendances: tab header list ΓÇô allow horizontal scroll when many tabs */
  #attendance-container .oh-tabs__tablist {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
  }

  #attendance-container .oh-tabs__tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Attendances subsection (Validate / OT / Validated tabs): compact table, aligned, reduce column widths */
  #attendance-container .hlv-container .fixed-table table {
    table-layout: fixed;
    min-width: 0;
  }
  #attendance-container .hlv-container .fixed-table th,
  #attendance-container .hlv-container .fixed-table td {
    vertical-align: middle !important;
    padding: 0.3rem 0.35rem !important;
    /* Wrap by words (no mid-word breaks) */
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  #attendance-container .hlv-container .fixed-table th.stickyleft,
  #attendance-container .hlv-container .fixed-table td.stickyleft {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
  }
  #attendance-container .hlv-container .fixed-table th.stickyleft-second,
  #attendance-container .hlv-container .fixed-table td.stickyleft-second {
    min-width: 100px !important;
    width: 130px !important;
    max-width: 160px !important;
  }
  #attendance-container .hlv-container .fixed-table td.stickyleft-second .oh-profile {
    min-width: 0 !important;
  }
  #attendance-container .hlv-container .fixed-table td.stickyleft-second .oh-profile span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  /* Data columns (3ΓÇô14): compact widths ΓÇô exclude Options column (nth-last-child(2)) */
  #attendance-container .hlv-container .fixed-table th:nth-child(n+3):not(.stickyright):not(:last-child):not(:nth-last-child(2)),
  #attendance-container .hlv-container .fixed-table td:nth-child(n+3):not(.stickyright):not(:last-child):not(:nth-last-child(2)) {
    max-width: 85px !important;
    min-width: 0 !important;
  }
  #attendance-container .hlv-container .fixed-table td:nth-child(n+3):not(.stickyright):not(:last-child):not(:nth-last-child(2)) .truncate {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  /* Options header + column: keep "Options" on one line, fixed width */
  #attendance-container .hlv-container .fixed-table th:nth-last-child(2) {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    white-space: nowrap !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
  #attendance-container .hlv-container .fixed-table th:nth-last-child(2) > div {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) .oh-btn-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.08rem;
  }
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) .oh-btn,
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) .oh-btn-group .oh-btn,
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) .oh-btn-group form .oh-btn {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
    min-width: 0 !important;
  }
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) .oh-btn-group form {
    flex: 0 0 auto !important;
    width: auto !important;
  }
  #attendance-container .hlv-container .fixed-table td:nth-last-child(2) ion-icon {
    font-size: 0.85rem !important;
  }
  /* Actions column (Validate button) */
  #attendance-container .hlv-container .fixed-table th.stickyright,
  #attendance-container .hlv-container .fixed-table td.stickyright {
    width: 95px !important;
    min-width: 90px !important;
    max-width: 100px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  #attendance-container .hlv-container .fixed-table th.stickyright {
    display: table-cell !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    text-align: right !important;
    padding-right: 0.45rem !important;
  }
  #attendance-container .hlv-container .fixed-table th.stickyright > div {
    width: 100%;
    text-align: right !important;
    padding-right: 0.15rem !important;
  }
  /* Attendance Requests: nudge icon actions (eye / reject) slightly right */
  #attendance-container .hlv-container .fixed-table td.stickyright.flex {
    justify-content: flex-end !important;
    padding-right: 0.45rem !important;
  }
  #attendance-container .hlv-container .fixed-table td.stickyright.flex .oh-btn-group {
    justify-content: flex-end !important;
  }
  #attendance-container .hlv-container .fixed-table td.stickyright .oh-btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.75rem !important;
  }
  /* Attendance Requests: Approve/Reject (w-24) in sticky column */
  #attendance-container .hlv-container .fixed-table td.stickyright.flex .oh-btn-group.w-100 {
    display: flex !important;
    flex-flow: row nowrap;
    justify-content: flex-end !important;
    align-items: center;
    gap: 0.12rem !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  #attendance-container .hlv-container .fixed-table td.stickyright.flex .oh-btn-group.w-100 > a {
    width: auto !important;
    min-width: 1.65rem !important;
    flex: 0 0 auto;
    padding: 0.2rem 0.3rem !important;
    height: auto !important;
    min-height: 1.6rem !important;
    max-width: none !important;
  }
  #attendance-container .hlv-container .fixed-table td.stickyright.flex .oh-btn-group.w-100 > a img {
    width: 11px !important;
  }

  /* Hour Account (ot-table): compact, aligned columns on small screens */
  #ot-table .fixed-table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #ot-table .fixed-table table {
    table-layout: auto !important;
    width: max-content !important;
    min-width: 980px !important;
  }
  #ot-table .fixed-table th,
  #ot-table .fixed-table td {
    vertical-align: middle !important;
    padding: 0.3rem 0.35rem !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  #ot-table .fixed-table th.stickyleft,
  #ot-table .fixed-table td.stickyleft {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
  }
  #ot-table .fixed-table th.stickyleft-second,
  #ot-table .fixed-table td.stickyleft-second {
    left: 32px !important;
    width: 150px !important;
    min-width: 140px !important;
    max-width: 200px !important;
  }
  #ot-table .fixed-table td.stickyleft-second {
    height: auto !important;
    min-height: 45px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
  }
  #ot-table .fixed-table td.stickyleft-second .oh-profile {
    min-width: 0 !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
  }
  #ot-table .fixed-table td.stickyleft-second .oh-profile span {
    display: block !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  /* Data columns: Month/Year/Hours - keep compact */
  #ot-table .fixed-table th:nth-child(n+3):not(.stickyright):not(:last-child),
  #ot-table .fixed-table td:nth-child(n+3):not(.stickyright):not(:last-child) {
    min-width: 95px !important;
    max-width: none !important;
  }
  #ot-table .fixed-table td:nth-child(n+3):not(.stickyright):not(:last-child) .truncate {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  /* Hour Account: keep long header readable without overlap (use horizontal scroll on phone) */
  #ot-table .fixed-table th[id$="-not_approved_ot_hrs-header"] {
    overflow: visible;
    min-width: 140px !important;
  }
  #ot-table .fixed-table th[id$="-not_approved_ot_hrs-header"] > div {
    flex-wrap: nowrap !important;
    min-width: 140px !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  #ot-table .fixed-table th[id$="-not_approved_ot_hrs-header"] span {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    width: auto !important;
    max-width: none !important;
    display: inline !important;
  }
  #ot-table .fixed-table th[id$="-not_approved_ot_hrs-header"] span.w-max {
    width: auto !important;
    max-width: none !important;
  }
  /* Actions column: compact edit/delete icons */
  #ot-table .fixed-table th.stickyright,
  #ot-table .fixed-table td.stickyright {
    width: 95px !important;
    min-width: 90px !important;
    max-width: 100px !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
  #ot-table .fixed-table th.stickyright {
    white-space: nowrap !important;
    text-align: center !important;
  }
  #ot-table .fixed-table td.stickyright .oh-btn-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.08rem;
  }
  #ot-table .fixed-table td.stickyright .oh-btn,
  #ot-table .fixed-table td.stickyright .oh-btn-group .oh-btn,
  #ot-table .fixed-table td.stickyright .oh-btn-group form .oh-btn {
    width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
    min-width: 0 !important;
  }
  #ot-table .fixed-table td.stickyright ion-icon {
    font-size: 0.85rem !important;
    margin: 0 !important;
  }

  /* Hour Account: keep Options icons in one horizontal row on phones */
  #listContainer #ot-table .fixed-table td:nth-last-child(2):not(.stickyright) .oh-btn-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.1rem !important;
  }
  #listContainer #ot-table .fixed-table td:nth-last-child(2):not(.stickyright) .oh-btn-group > * {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
  }
  #listContainer #ot-table .fixed-table td:nth-last-child(2):not(.stickyright) .oh-btn-group form.w-50 {
    width: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
  }
  #listContainer #ot-table .fixed-table td:nth-last-child(2):not(.stickyright) .oh-btn-group .oh-btn,
  #listContainer #ot-table .fixed-table td:nth-last-child(2):not(.stickyright) .oh-btn-group form .oh-btn {
    width: 1.5rem !important;
    min-width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 !important;
  }

  /* Attendance Requests (All Attendances tab): allow "Approved By" header to wrap */
  #attendance-container .hlv-container .fixed-table th[id$="-request_approved_by-header"] > div {
    flex-wrap: wrap !important;
    min-width: 0;
  }
  #attendance-container .hlv-container .fixed-table th[id$="-request_approved_by-header"] span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
  #attendance-container .hlv-container .fixed-table th[id$="-request_approved_by-header"] span.w-max {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Attendance dashboard: chart filter rows ΓÇô contain inside card, no overflow */
  .attendance-dashboard .flex.gap-2.justify-between.items-center,
  #attendance_analytic .flex.gap-2.justify-between.items-center,
  #attendance_analytic .attendance-analytic-filters {
    flex-wrap: wrap !important;
    row-gap: 0.5rem;
    align-items: stretch;
    min-width: 0;
    max-width: 100%;
  }

  .attendance-dashboard .flex.gap-2.justify-between.items-center > *,
  #attendance_analytic .flex.gap-2.justify-between.items-center > *,
  #attendance_analytic .attendance-analytic-filters > * {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
  }

  .attendance-dashboard .oh-input.w-40,
  #attendance_analytic .oh-input.w-40 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Card containing Attendance Analytics chart ΓÇô keep filters inside on small screens */
  .bg-white.rounded-md.shadow-card:has(#dailyAnalytic) .flex.gap-2.justify-between.items-center,
  .bg-white.rounded-md.shadow-card:has(#dailyAnalytic) .attendance-analytic-filters {
    flex-wrap: wrap !important;
    min-width: 0;
    max-width: 100%;
  }

  .bg-white.rounded-md.shadow-card:has(#dailyAnalytic) .flex.gap-2.justify-between.items-center .oh-input.w-40,
  .bg-white.rounded-md.shadow-card:has(#dailyAnalytic) .attendance-analytic-filters .oh-input.w-40 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Home / tile dashboard: #dailyAnalytic not under .attendance-dashboard ΓÇô same canvas sizing */
  #attendance_analytic canvas#dailyAnalytic {
    max-width: 100%;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    display: block;
  }

  #attendance_analytic .relative.w-full {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Department Overtime Chart: keep filters inside card on small screens */
  #departmentChartCard .flex.gap-2.justify-between.items-center {
    flex-wrap: wrap !important;
    row-gap: 0.5rem;
    align-items: stretch;
    min-width: 0;
    max-width: 100%;
  }

  #departmentChartCard .flex.gap-2.justify-between.items-center > * {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
  }

  #departmentChartCard .flex.gap-2.justify-between.items-center .oh-input.w-40 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .attendance-dashboard canvas {
    max-width: 100%;
    width: 100% !important;
    height: 100% !important;
    min-height: 220px;
  }

  /* Ensure Tailwind h-[350px] wrappers don't force tiny charts on phones */
  .attendance-dashboard [class*="h-[350px]"] {
    height: auto !important;
    min-height: 220px;
  }

  /* Work Records (legacy template): filter + legend bar stacks on small screens */
  .work-record-header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .work-record-header > .d-flex {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
}

/* ============================
 * Rotating Shift Assign & Rotating Work Type Assign
 * ============================ */

/* Rotating Shift Assign list – Actions column width (same as Shift Requests / Work Type Request) */
#rotating-shift-container .fixed-table,
#rotating-work-container .fixed-table {
  table-layout: fixed;
}
#rotating-shift-container .fixed-table th.lastTh,
#rotating-shift-container .fixed-table td.lastTd,
#rotating-work-container .fixed-table th.lastTh,
#rotating-work-container .fixed-table td.lastTd {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}
#rotating-shift-container .fixed-table th.lastTh,
#rotating-work-container .fixed-table th.lastTh {
  white-space: nowrap !important;
  text-align: center !important;
}
#rotating-shift-container .fixed-table td.lastTd .oh-btn-group,
#rotating-work-container .fixed-table td.lastTd .oh-btn-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center;
  align-items: center;
  gap: 0.08rem;
}
#rotating-shift-container .fixed-table td.lastTd .oh-btn,
#rotating-shift-container .fixed-table td.lastTd .oh-btn-group .oh-btn,
#rotating-work-container .fixed-table td.lastTd .oh-btn,
#rotating-work-container .fixed-table td.lastTd .oh-btn-group .oh-btn {
  width: 1.5rem !important;
  height: 1.5rem !important;
  padding: 0 !important;
  min-width: 0 !important;
}
#rotating-shift-container .fixed-table td.lastTd ion-icon,
#rotating-work-container .fixed-table td.lastTd ion-icon {
  font-size: 0.85rem !important;
  margin: 0 !important;
}

@media (max-width: 767.98px) {
  /* Checkpoint badges: wrap */
  .oh-wrapper .oh-checkpoint-badge {
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }

  /* Rotating shift table */
  #rotating-shift-table .oh-sticky-table,
  #rotating-work-type-table .oh-sticky-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
  }

  #rotating-shift-table .oh-sticky-table__table,
  #rotating-work-type-table .oh-sticky-table__table {
    min-width: 700px;
  }

  /* Rotating table: reduce sticky column pinning on small screens */
  #rotating-shift-table .oh-sticky-table__sd,
  #rotating-shift-table .oh-sticky-table__th:first-child,
  #rotating-work-type-table .oh-sticky-table__sd,
  #rotating-work-type-table .oh-sticky-table__th:first-child {
    position: relative !important;
  }

  #rotating-shift-table .oh-sticky-table__right,
  #rotating-work-type-table .oh-sticky-table__right {
    position: relative !important;
  }
}

/* ============================
 * Employee Individual View (profile wrapper)
 * ============================ */
@media (max-width: 767.98px) {
  /* Profile/individual wrapper stacks */
  .oh-wrapper[hx-get*="profile"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Profile HTMX tab target: avoid fixed (100vh - 450px) on phones; use dynamic viewport */
  .oh-profile-tab-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    max-height: min(72vh, calc(100dvh - 9.5rem));
    min-height: 14rem;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* List tables inside profile tabs: allow horizontal scroll (overflow-hidden+y-auto leaves overflow-x hidden) */
  [id$="profileTab"] .hlv-container,
  [id$="profileTab"] .hlv-quick-actions {
    min-width: 0;
    max-width: 100%;
  }

  [id$="profileTab"] .fixed-table,
  [id$="profileTab"] .heightContainer .fixed-table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100% !important;
  }

  [id$="profileTab"] .fixed-table table,
  [id$="profileTab"] .heightContainer .fixed-table table {
    width: max-content !important;
    min-width: 640px !important;
    table-layout: auto !important;
  }

  /* Un-pin sticky columns in profile tab so wide tables scroll as one unit on phones */
  [id$="profileTab"] .stickyleft,
  [id$="profileTab"] .stickyleft-second,
  [id$="profileTab"] .stickyright {
    position: static !important;
    left: auto !important;
    right: auto !important;
    box-shadow: none !important;
  }

  /* Override attendance profile subsection: allow natural column widths + scroll */
  [id$="profileTab"] #attendance-container .hlv-container .fixed-table table {
    min-width: 640px !important;
    table-layout: auto !important;
    width: max-content !important;
  }

  [id$="profileTab"]
    #attendance-container
    .hlv-container
    .fixed-table
    th:nth-child(n + 3):not(.stickyright):not(:last-child):not(:nth-last-child(2)),
  [id$="profileTab"]
    #attendance-container
    .hlv-container
    .fixed-table
    td:nth-child(n + 3):not(.stickyright):not(:last-child):not(:nth-last-child(2)) {
    max-width: none !important;
    min-width: 4.5rem !important;
  }

  /* Module sub-tabs (e.g. Attendance): stack toolbar, scroll pills horizontally */
  [id$="profileTab"] .oh-tabs > div.flex.flex-wrap.gap-2.justify-between.mb-3 {
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
  }

  [id$="profileTab"] .oh-tabs .flex.gap-1.flex-wrap {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    width: 100%;
    padding-bottom: 0.25rem;
  }

  [id$="profileTab"] .oh-tabs .oh-tabs__tab {
    flex-shrink: 0;
  }

  /* Inner sidebar layout (if present) */
  .oh-inner-sidebar-content__header {
    flex-wrap: wrap;
    padding: 0.75rem;
  }
}

/* ============================
 * Employee Edit Page (/employee/employee-view-update/) ΓÇô small screens
 * ============================ */
@media (max-width: 767.98px) {
  #view-container.oh-wrapper {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .oh-profile-section__topbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
  }

  .oh-profile-section__topbar .oh-main__titlebar,
  .oh-profile-section__topbar .oh-main__titlebar--left {
    width: 100%;
  }

  .oh-profile-section__tab {
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .oh-profile-section__tab .oh-general__tab-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
  }

  .oh-profile-section__tab .oh-general__tab {
    flex: 0 0 auto;
    max-width: none;
    display: flex;
    justify-content: center;
  }

  .oh-profile-section__tab .oh-general__tab-link {
    width: auto;
  }

  .oh-profile-section__card {
    padding: 1rem !important;
  }

  .oh-profile-section__card .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .oh-profile-section__card .oh-profile-section__edit-photo {
    margin-right: 0 !important;
  }

  .oh-profile-section__card .col-12.col-sm-12.col-md-12.col-lg-6.d-flex.align-items-center {
    justify-content: center;
  }

  .oh-profile-section__card .oh-input,
  .oh-profile-section__card .oh-select,
  .oh-profile-section__card .select2-selection {
    font-size: 0.8rem;
  }
}

/* ============================
 * Document Request Nav / Policy Nav (loaded into page)
 * ============================ */
@media (max-width: 767.98px) {
  .oh-main__titlebar--left + .oh-main__titlebar--right {
    margin-top: 0.5rem;
  }

  /* Filter/dropdown in nav ΓÇô constrain width */
  .oh-dropdown__menu.oh-dropdown__filter {
    max-width: calc(100vw - 2rem);
    min-width: 0;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure filter body scrolls fully on small screens */
  .oh-dropdown__menu.oh-dropdown__filter .oh-dropdown__filter-body {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .oh-dropdown__menu.oh-dropdown__filter .oh-dropdown__filter-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 0.5rem;
  }

  /* Filter popups: allow full scroll on small screens */
  .navFilterForm .dropdown-content.absolute.z-10.bg-white.rounded-lg {
    max-height: calc(100vh - 6rem) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    /* Horilla nav filter: Tailwind min-w-[400px] is wider than phone viewports beside sidebar */
    min-width: 0 !important;
    width: min(400px, calc(100vw - 5.5rem)) !important;
    max-width: calc(100vw - 5.5rem) !important;
    box-sizing: border-box !important;
  }

  .navFilterForm .dropdown-content.absolute.z-10.bg-white.rounded-lg .accordion-wrapper,
  .navFilterForm .dropdown-content.absolute.z-10.bg-white.rounded-lg .oh-dropdown__filter-body {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* ============================
 * Document Requests (prime_theme requests.html): accordion & document rows
 * ============================ */
@media (max-width: 767.98px) {
  .accordion-btn.flex.justify-between {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Document row: stack checkbox, icon, text */
  .accordion-panel .border.border-dark-50.p-3.rounded-md.flex.justify-between,
  .accordion-panel [class*="flex"][class*="justify-between"] {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .accordion-panel .flex.gap-1 {
    flex-wrap: wrap;
  }
}

@media (max-width: 767.98px) {
  #faqList .accordion-item .accordion-btn.flex.justify-between {
    flex-wrap: nowrap !important;
    align-items: flex-start;
  }

  #faqList .accordion-item .accordion-btn > div:first-of-type {
    min-width: 0;
    flex: 1 1 auto;
  }

  #faqList .accordion-item .accordion-btn > div:last-of-type {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

/* Employee card view: quick filters (Online/Offline) */
@media (max-width: 767.98px) {
  .d-flex.flex-row-reverse.m-2 {
    flex-wrap: wrap;
    margin: 0.5rem !important;
  }
}

/* ============================
 * Small-screen device coverage (phones ΓåÆ tablets)
 * ============================ */

/* Tablets (portrait/landscape) ΓÇô keep layouts from squeezing */
@media (max-width: 1199.98px) {
  /* Sticky-table pattern: allow horizontal scroll instead of squashing */
  .oh-sticky-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Sticky-table--no-overflow: allow horizontal scroll on small screens */
  .oh-sticky-table.oh-sticky-table--no-overflow {
    overflow-x: auto !important;
  }

  /* Fixed-table pattern: allow horizontal scroll when present */
  .fixed-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Generic dropdown menus (filter/action) should stay within viewport and scroll internally */
  .dropdown-content,
  .oh-dropdown__menu,
  .dropdown-menu {
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
}

/* iPad-ish widths: ensure modals and filters fit */
@media (max-width: 1024px) {
  .oh-modal__dialog {
    max-width: calc(100vw - 2rem) !important;
  }

  .navFilterForm .dropdown-content {
    width: min(92vw, 26rem) !important;
  }
}

/* Compact tables & lists on small screens (reduce whitespace, keep readability) */
@media (max-width: 767.98px) {
  /* Sticky-table cells */
  .oh-sticky-table__th,
  .oh-sticky-table__td,
  .oh-sticky-table__sd,
  .oh-sticky-table__right {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.2;
    font-size: 0.78rem;
  }

  /* Fixed-table / prime_list_table cells */
  .fixed-table th,
  .fixed-table td {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.2;
    font-size: 0.78rem;
  }

  /* Legacy Bootstrap tables */
  .oh-wrapper table.table th,
  .oh-wrapper table.table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.2;
    font-size: 0.78rem;
  }

  /* Tailwind utility-heavy table cells (e.g. prime_list_table): override large padding/row height */
  table td.p-3,
  table th.p-3 {
    padding: 0.25rem 0.35rem !important;
  }

  table td.h-\[45px\],
  table th.h-\[45px\] {
    height: auto !important;
    min-height: 1.8rem;
  }

  /* Reduce forced min-widths inside table rows on mobile */
  table .oh-profile.min-w-\[200px\] {
    min-width: 0 !important;
  }

  /* Tailwind text sizing inside tables */
  table td.text-sm,
  table th.text-sm {
    font-size: 0.72rem !important;
    line-height: 1.15;
  }

  /* Tighten profile row spacing inside table cells */
  table .oh-profile.oh-profile--md {
    gap: 0.4rem;
  }

  table .oh-profile__avatar.mr-1 {
    margin-right: 0.25rem !important;
  }

  /* Common list rows (permissions/document request rows etc.) */
  .oh-user_permission-list_item,
  .oh-user_permission-list_profile,
  .oh-user_permission-list_item .oh-user_permission-list_profile {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  /* Pagination gets tighter too */
  .oh-pagination {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .oh-pagination__input {
    height: 2rem;
  }
}

/* Compact utility-driven table rows on small screens (phones + tablets) */
@media (max-width: 991.98px) {
  /* Remove extra space between columns (border spacing) */
  .fixed-table,
  .fixed-table.border-separate,
  .heightContainer .fixed-table,
  .heightContainer .fixed-table.border-separate {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
  }

  /* Reduce padding directly on utility-heavy cells */
  td.p-3,
  th.p-3 {
    padding: 0.25rem 0.35rem !important;
  }

  /* Remove fixed utility row heights */
  td.h-\[45px\],
  th.h-\[45px\] {
    height: auto !important;
    min-height: 1.8rem !important;
  }

  /* Tighten common table text utilities */
  td.text-sm,
  th.text-sm {
    font-size: 0.72rem !important;
    line-height: 1.15 !important;
  }

  /* Reduce forced widths inside table/list rows */
  td .min-w-\[200px\],
  th .min-w-\[200px\] {
    min-width: 0 !important;
  }

  /* Tighten profile/avatar spacing when rendered in rows */
  td .oh-profile,
  th .oh-profile {
    gap: 0.4rem;
  }

  td .oh-profile__avatar.mr-1,
  th .oh-profile__avatar.mr-1 {
    margin-right: 0.25rem !important;
  }

  /* Prime list tables: keep Actions column always visible */
  .fixed-table th.lastTh,
  .fixed-table td.lastTd {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 3;
    box-shadow: -8px 0 12px -12px rgba(0, 0, 0, 0.35);
  }

  .fixed-table th.lastTh {
    z-index: 4;
  }

  .fixed-table td.lastTd .oh-btn-group {
    justify-content: flex-end;
    gap: 0.25rem;
  }

  /* Height-limited list tables: override existing roomy defaults */
  .heightContainer .fixed-table th,
  .heightContainer .fixed-table td {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    line-height: 1.15 !important;
    font-size: 0.72rem !important;
  }

  /* ============================
   * Table/list action buttons ΓåÆ icon-only on small screens
   * ============================ */

  /* Base compact icon-button style inside tables/lists */
  .heightContainer .fixed-table td .oh-btn,
  .heightContainer .fixed-table th .oh-btn,
  .oh-sticky-table__td .oh-btn,
  .oh-user_permission-list_item .oh-btn {
    padding: 0.3rem !important;
    min-width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  /* Generic rule: hide text label but keep icon elements visible */
  .heightContainer .fixed-table td .oh-btn span,
  .heightContainer .fixed-table td .oh-btn strong,
  .heightContainer .fixed-table td .oh-btn small,
  .oh-sticky-table__td .oh-btn span,
  .oh-sticky-table__td .oh-btn strong,
  .oh-sticky-table__td .oh-btn small,
  .oh-user_permission-list_item .oh-btn span,
  .oh-user_permission-list_item .oh-btn strong,
  .oh-user_permission-list_item .oh-btn small {
    display: none;
  }

  /* If a button has no inner icon element, convert it to an icon-only button using pseudo-elements.
     We scope this to common action styles to avoid affecting primary page CTAs. */

  /* Validate / approve style (info buttons) ΓåÆ check icon */
  .heightContainer .fixed-table td .oh-btn--info:not(:has(i, ion-icon, svg)) {
    position: relative;
    text-indent: -9999px;
  }

  .heightContainer .fixed-table td .oh-btn--info:not(:has(i, ion-icon, svg))::before {
    content: "\f00c"; /* Font Awesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
  }

  /* Danger buttons (delete / reject) ΓåÆ trash icon */
  .heightContainer .fixed-table td .oh-btn--danger:not(:has(i, ion-icon, svg)),
  .oh-user_permission-list_item .oh-btn--danger:not(:has(i, ion-icon, svg)) {
    position: relative;
    text-indent: -9999px;
  }

  .heightContainer .fixed-table td .oh-btn--danger:not(:has(i, ion-icon, svg))::before,
  .oh-user_permission-list_item .oh-btn--danger:not(:has(i, ion-icon, svg))::before {
    content: "\f2ed"; /* Font Awesome trash */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
  }

  /* Secondary edit-style buttons ΓåÆ pencil icon */
  .heightContainer .fixed-table td .oh-btn--secondary:not(:has(i, ion-icon, svg)),
  .oh-user_permission-list_item .oh-btn--secondary:not(:has(i, ion-icon, svg)) {
    position: relative;
    text-indent: -9999px;
  }

  .heightContainer .fixed-table td .oh-btn--secondary:not(:has(i, ion-icon, svg))::before,
  .oh-user_permission-list_item .oh-btn--secondary:not(:has(i, ion-icon, svg))::before {
    content: "\f303"; /* Font Awesome pencil */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
  }

  /* Tighten header/content flex gaps and padding in list tables */
  .fixed-table th > .flex,
  .fixed-table td > .flex {
    column-gap: 0.25rem !important;
    padding: 0.25rem 0.35rem !important;
  }

  /* Allow narrower columns on mobile */
  .fixed-table th.min-w-\[150px\],
  .fixed-table td.min-w-\[150px\] {
    min-width: 110px !important;
  }

  /* Compact action buttons inside tables */
  .fixed-table td .oh-btn,
  .fixed-table th .oh-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
  }

  /* Shrink Actions column itself and remove inner padding gap */
  .heightContainer .fixed-table th.stickyright,
  .heightContainer .fixed-table td.stickyright {
    min-width: 72px !important;
    width: 72px !important;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
  }

  .heightContainer .fixed-table td.stickyright .oh-btn {
    width: 100%;
    max-width: 1.8rem;
    height: 1.6rem;
    padding: 0.15rem 0.25rem !important;
    font-size: 0.62rem !important;
    justify-content: center;
  }

  /* Options column (second-to-last): wide enough so "Options" header does not wrap (was 54px) */
  .heightContainer .fixed-table tr > th:nth-last-child(2),
  .heightContainer .fixed-table tr > td:nth-last-child(2) {
    min-width: 72px !important;
    width: 72px !important;
    padding-right: 0.35rem !important;
  }
  .heightContainer .fixed-table tr > th:nth-last-child(2),
  .heightContainer .fixed-table tr > th:nth-last-child(2) > div {
    white-space: nowrap !important;
  }

  /*
   * Prime list (#listContainer): Options column (nth-last-child(2)) — room + horizontal icon row.
   * Default 72px + w-100 children stacks icons vertically; keep one compact row like stickyright actions.
   */
  #listContainer .heightContainer .fixed-table tr > th:nth-last-child(2),
  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) {
    min-width: 7.25rem !important;
    width: 7.25rem !important;
    max-width: 8.5rem !important;
  }

  /* Options header: center label; inline width on th/div (e.g. 230px) is wider than constrained cell */
  #listContainer .heightContainer .fixed-table tr > th:nth-last-child(2) {
    text-align: center !important;
  }

  #listContainer .heightContainer .fixed-table tr > th:nth-last-child(2) > div {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) .oh-btn-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 0.08rem;
  }

  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) .oh-btn-group > * {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
  }

  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) .oh-btn-group .oh-btn,
  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) .oh-btn-group form .oh-btn {
    width: 1.5rem !important;
    max-width: 1.5rem !important;
    min-width: 0 !important;
    padding: 0.15rem !important;
  }

  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) .oh-btn-group form {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  #listContainer .heightContainer .fixed-table tr > td:nth-last-child(2):not(.stickyright) .oh-btn-group ion-icon {
    font-size: 0.85rem !important;
  }

  /* Reduce card padding around HLView containers (all sides) */
  .hlv-container > .bg-white.rounded-md.shadow-card {
    padding: 0.75rem 0.5rem !important;
  }

  /* Offline Employees ΓÇô aggressively tighten all three columns */
  #offlineEmployees-1-get_full_name-header,
  #offlineEmployees td.stickyleft {
    min-width: 110px !important;
    width: 110px !important;
  }

  /* Leave Requests To Approve ΓÇô tighten Employee column whitespace */
  #leaveRequestsView-1-employee-header {
    min-width: 140px !important;
    width: 140px !important;
  }

  #leaveRequestsView td .oh-profile.oh-profile--md.min-w-\[200px\] {
    min-width: 0 !important;
    width: auto !important;
  }

  #leaveRequestsView td .oh-profile.oh-profile--md.min-w-\[200px\] span {
    white-space: normal !important;
  }

  #offlineEmployees-2-get_leave_status-header,
  #offlineEmployees tr > td:nth-child(2) {
    min-width: 60px !important;
    width: 60px !important;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
  }

  #offlineEmployees-3-send_mail_button-header,
  #offlineEmployees tr > td:nth-child(3) {
    min-width: 48px !important;
    width: 48px !important;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
  }

  #online_employees .flex-col.items-center.justify-center.h-\[400px\] {
    height: auto !important;
    max-height: 400px;
    align-items: stretch;
  }

  #onlineEmployees-1-get_full_name-header,
  #onlineEmployees td.stickyleft {
    min-width: 120px !important;
    width: 120px !important;
    max-width: 120px !important;
  }

  #onlineEmployees-1-get_full_name-header > div {
    max-width: 120px !important;
  }

  #onlineEmployees-2-get_custom_forecasted_info_col-header,
  #onlineEmployees tr > td:nth-child(2) {
    min-width: 130px !important;
    width: 130px !important;
  }

  #onlineEmployees td,
  #onlineEmployees th {
    padding: 0.35rem 0.5rem !important;
  }

  #onlineEmployees .oh-profile.oh-profile--md.min-w-\[200px\] {
    min-width: 0 !important;
    width: auto !important;
  }

  /* ============================
   * Employee Work Information card (table 'pending')
   * ============================ */

  /* Center progress bar vertically within its row */
  #pending .fixed-table td {
    vertical-align: middle !important;
  }

  /* Keep percentage on same line as progress bar, but compact */
  #pending .fixed-table td:nth-child(2) .flex {
    column-gap: 0.35rem;
    align-items: center;
    flex-wrap: nowrap;
  }

  #pending .fixed-table td:nth-child(2) .flex > div:last-child {
    white-space: nowrap;
    font-size: 0.72rem;
  }
}

/* Modal bodies: scroll internally when content is taller than viewport */
.oh-modal__dialog-body {
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

/* Ensure whole dialog itself never exceeds viewport height (any zoom) */
.oh-modal__dialog {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* Small phones: tighten spacing and prevent button overflow */
@media (max-width: 420px) {
  .oh-wrapper {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .oh-btn,
  .oh-btn--small {
    font-size: 0.75rem;
  }

  .oh-checkpoint-badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
  }

  .oh-tabs__tab {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
  }
}

/* Very small phones: last-mile guardrails */
@media (max-width: 360px) {
  .oh-modal__dialog {
    max-width: calc(100vw - 0.75rem) !important;
    margin: 0.4rem;
  }

  .navFilterForm .dropdown-content {
    width: calc(100vw - 1rem) !important;
  }
}

/* ============================
 * Add Employee ΓÇô Personal Info form
 * ============================ */
@media (max-width: 767.98px) {
  /* Card padding a bit tighter on small screens */
  .oh-profile-section__card.p-10 {
    padding: 1.25rem 1rem !important;
  }

  /* Every column inside the Add Employee card should stack full-width */
  .oh-profile-section__card .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Avatar row: center image */
  .oh-profile-section__card .oh-profile-section__edit-photo {
    margin-right: 0 !important;
  }

  .oh-profile-section__card .col-12.col-sm-12.col-md-12.col-lg-6.d-flex.align-items-center {
    justify-content: center;
  }

  /* Inputs: keep labels and controls readable but compact */
  .oh-profile-section__card .oh-input__group {
    margin-bottom: 0.75rem;
  }

  .oh-profile-section__card .oh-label {
    font-size: 0.8rem;
  }

  .oh-profile-section__card .oh-input,
  .oh-profile-section__card .oh-select,
  .oh-profile-section__card .select2-selection {
    font-size: 0.8rem;
  }

  /* Submit button row: ensure it fits small widths */
  .oh-profile-section__card .col-lg-12.d-flex {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Attendance Request ΓÇô Validate popup layout */
  #validateAttendanceRequest .oh-modal__dialog {
    max-width: calc(100vw - 1.5rem) !important;
    margin: 0.75rem;
  }

  #validateAttendanceRequest .oh-modal__dialog-body {
    padding: 0.75rem 0.75rem 1rem;
  }

  /* Header: stack avatar and text on very small screens */
  #validateAttendanceRequest .validate-attendance-header .oh-profile {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #validateAttendanceRequest .validate-attendance-header .oh-timeoff-modal__profile-info {
    min-width: 0;
  }

  /* Details table: allow horizontal scroll inside wrapper, not page */
  #validateAttendanceRequest .validate-attendance-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #validateAttendanceRequest .validate-attendance-table {
    min-width: 480px;
  }

  #validateAttendanceRequest .validate-attendance-table th,
  #validateAttendanceRequest .validate-attendance-table td {
    white-space: nowrap;
  }

  /* Action buttons: stack vertically with full width */
  #validateAttendanceRequest .oh-modal__button-container .oh-btn-group.d-flex.flex-row-reverse {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.5rem;
  }

  #validateAttendanceRequest .oh-modal__button-container .oh-btn-group .oh-btn {
    width: 100%;
  }

  /* Prev/next round buttons: keep tight and aligned */
  #validateAttendanceRequest .validate-attendance-nav .oh-modal__diaglog-nav {
    width: 2.25rem;
    height: 2.25rem;
  }

  /* Validate Attendance Request ΓÇô Tailwind modal content (detailViewContainer) */
  #validateAttendanceRequestModalBody .modal-box {
    width: 100%;
    max-width: 100%;
  }

  #validateAttendanceRequestModalBody #detailViewContainer {
    padding: 0.75rem 0.75rem 1rem;
  }

  /* Header row: avatar + text should wrap nicely on small screens */
  #validateAttendanceRequestModalBody #detailViewContainer > .flex.items-center.gap-5 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #validateAttendanceRequestModalBody #detailViewContainer > .flex.items-center.gap-5 > div:last-child {
    min-width: 0;
  }

  /* Details table: scroll horizontally inside section, not page */
  #validateAttendanceRequestModalBody #detailViewContainer > .my-5 {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #validateAttendanceRequestModalBody #detailViewContainer > .my-5 > table {
    min-width: 480px;
  }

  #validateAttendanceRequestModalBody #detailViewContainer > .my-5 > table th,
  #validateAttendanceRequestModalBody #detailViewContainer > .my-5 > table td {
    white-space: nowrap;
  }

  /* Footer: stack action buttons and keep prev/next aligned on small screens */
  #validateAttendanceRequestModalBody .flex.flex-wrap.justify-between.gap-2.md\:gap-1 {
    flex-direction: column;
    align-items: stretch;
    row-gap: 0.75rem;
  }

  #validateAttendanceRequestModalBody .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .oh-btn-group {
    width: 100%;
  }

  #validateAttendanceRequestModalBody .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .oh-btn-group .oh-btn {
    width: 100%;
  }

  #validateAttendanceRequestModalBody .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .flex.gap-1.ml-auto {
    margin-left: 0;
    align-self: flex-end;
  }

  /* List/profile quick actions: stack Select/bulk row above filter chips (no overlap) */
  .hlv-quick-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    row-gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hlv-quick-actions__bulk {
    flex: 0 0 auto !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .hlv-quick-actions__filters {
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 0.35rem;
    box-sizing: border-box;
  }

  /* Generic attendance detail view (Tailwind content inside #genericModalBody) */
  /* Make sure the modal can scroll fully on small screens */
  #genericModalBody {
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #genericModalBody .modal-box {
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #genericModalBody #detailViewContainer {
    padding: 0.75rem 0.75rem 1rem;
  }

  /* Header row: title + close icon should wrap cleanly */
  #genericModalBody #detailViewContainer > .flex.justify-between.items-center {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #genericModalBody #detailViewContainer > .flex.justify-between.items-center h2 {
    font-size: 0.95rem;
  }

  /* Profile row: avatar + text */
  #genericModalBody #detailViewContainer > .flex.items-center.gap-5 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #genericModalBody #detailViewContainer > .flex.items-center.gap-5 > div:last-child {
    min-width: 0;
  }

  /* Profile avatar: keep square, perfectly circular and undistorted */
  #genericModalBody #detailViewContainer > .flex.items-center.gap-5 img.rounded-full {
    width: 50px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 9999px !important;
    display: block;
  }

  /* Details grid: ensure label/value pairs wrap instead of causing horizontal scroll */
  #genericModalBody #detailViewContainer .grid.grid-cols-1.md\:grid-cols-12.gap-3 > .flex.gap-5 {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  #genericModalBody #detailViewContainer .grid.grid-cols-1.md\:grid-cols-12.gap-3 > .flex.gap-5 > span.w-32 {
    width: 6.5rem;
    white-space: normal;
  }

  #genericModalBody #detailViewContainer .grid.grid-cols-1.md\:grid-cols-12.gap-3 > .flex.gap-5 > div {
    min-width: 0;
  }

  /* Loan installments table in detail modal: keep date column readable on phones */
  #genericModalBody #deductionContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #genericModalBody #deductionContainer .fixed-table {
    width: max-content;
    min-width: 480px;
    table-layout: auto;
  }

  #genericModalBody #deductionContainer .fixed-table th:nth-child(2),
  #genericModalBody #deductionContainer .fixed-table td:nth-child(2) {
    min-width: 115px;
    white-space: nowrap;
  }

  #genericModalBody #deductionContainer .fixed-table th:nth-child(3),
  #genericModalBody #deductionContainer .fixed-table td:nth-child(3) {
    min-width: 120px;
  }

  #genericModalBody #deductionContainer .fixed-table input[name="amount"] {
    min-width: 88px;
    width: 100%;
  }

  /* Footer: stack edit button and keep prev/next aligned on small screens */
  #genericModalBody #detailViewContainer .flex.flex-wrap.justify-between.gap-2.md\:gap-1 {
    flex-direction: column;
    align-items: stretch;
    row-gap: 0.75rem;
  }

  #genericModalBody #detailViewContainer .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .flex.gap-1:first-child {
    width: 100%;
  }

  #genericModalBody #detailViewContainer .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .flex.gap-1:first-child .oh-btn {
    width: 100%;
  }

  #genericModalBody #detailViewContainer .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .flex.gap-1.ml-auto {
    margin-left: 0;
    align-self: flex-end;
  }

  /* Prev/next circular buttons: keep consistent tap size on mobile */
  #genericModalBody #detailViewContainer .flex.flex-wrap.justify-between.gap-2.md\:gap-1 > .flex.gap-1.ml-auto > button {
    width: 2.25rem;
    height: 2.25rem;
  }

  /* =========================================
   * Tabs (used across Payroll/other modules)
   * ========================================= */

  /* Allow horizontal scrolling of long tab lists instead of wrapping awkwardly */
  .oh-tabs {
    overflow-x: auto;
  }

  .oh-tabs__tablist {
    display: flex;
    flex-wrap: nowrap;
    column-gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .oh-tabs__tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* =========================================
   * Leave Module ΓÇô small-screen responsiveness
   * ========================================= */

  /* Leave / Attendance dashboards: stack left/right columns on mobile */
  .oh-dashboard__left,
  .oh-dashboard__right {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .oh-dashboard__right {
    margin-top: 1.5rem;
  }

  /* Dashboard cards inside rows: ensure full-width cards and comfortable spacing */
  .oh-dashboard__cards .col-12,
  .oh-dashboard__movable-cards .col-12 {
    margin-bottom: 0.75rem;
  }

  /* Any tables embedded in dashboard cards should scroll inside the card, not page */
  .oh-dashboard__cards .oh-sticky-table,
  .oh-dashboard__movable-cards .oh-sticky-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Legacy Bootstrap tables (e.g. old My Leave Requests) ΓÇô add horizontal scroll on mobile */
  .oh-wrapper table.table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .oh-wrapper table.table thead,
  .oh-wrapper table.table tbody {
    width: 100%;
  }

  /* Leave dashboard ΓÇô \"Leave Type - Count of leaves\" card */
  .leave-type-count-card {
    width: 100% !important;
  }

  .leave-type-count-card .w-full.max-w-xs.mx-auto {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .leave-type-count-card #leave_type_canvas {
    min-height: 260px;
  }

  /* Leave dashboard ΓÇô "Weekly Leave Analytics" card */
  .weekly-leave-card {
    width: 100% !important;
  }

  .weekly-leave-card__body {
    min-height: 260px;
  }

  .weekly-leave-card__body canvas#leavePeriod,
  .oh-card-dashboard__body canvas#leavePeriod {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
  }

  /* Leave Types ΓÇô grid & stats cards */
  .oh-layout--grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Leave type stats: avoid 3 cramped columns on mobile */
  .oh-timeoff-modal__stats-container {
    grid-template-columns: 1fr 1fr;
    row-gap: 0.5rem;
  }

  /* Pagination: allow wrapping so controls stay within viewport */
  .oh-pagination__nav {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .oh-pagination__input-container {
    margin-bottom: 0.25rem;
  }

  /* =========================================
   * Section 1: Payroll ΓÇô gaps & specifics
   * ========================================= */

  /* Federal Tax / Filing Status / Tax Bracket forms: remove large side margins on mobile */
  main div[style*="margin-right: 100px"],
  main div[style*="margin-left: 100px"] {
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
  }

  /* Payroll dashboard: month selector + Export row ΓÇô allow wrap on small screens */
  #dashboard .flex.ms-2.mt-3.justify-between,
  #dashboard .flex.justify-between.align-center {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  /* Payroll dashboard: Export dropdown stays within viewport */
  #dashboard .oh-dropdown__menu.w-\[350px\] {
    max-width: calc(100vw - 1.5rem);
  }

  /* Loan/Reimbursement card view (oh-faq-cards): ensure single column on phones */
  .oh-wrapper.oh-faq-cards,
  .oh-faq-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Loan card view: profile + actions row wrap cleanly */
  .oh-faq-card .d-flex.justify-content-between {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  /* =========================================
   * Section 2: Performance (PMS) ΓÇô small-screen responsiveness
   * ========================================= */

  /* PMS dashboard: uses oh-dashboard__left/right ΓÇô already covered by Leave rules */
  /* PMS dashboard cards: ensure proper stacking */
  #dashboard .oh-dashboard__cards .col-12,
  #dashboard .oh-dashboard__movable-cards .col-12 {
    margin-bottom: 0.75rem;
  }

  /* PMS dashboard charts: constrain width to avoid horizontal overflow */
  #dashboard .oh-card-dashboard__body canvas {
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
    min-height: 200px;
  }

  /* PMS objectives-at-risk sidebar: full width on mobile */
  #dashboard .oh-dashboard__right .oh-card-dashboard {
    margin-top: 0.5rem;
  }

  /* PMS back button / titlebar */
  #back_button,
  #employeeKeyRes {
    width: 100% !important;
    max-width: 100%;
  }

  /* =========================================
   * Section 3: Offboarding ΓÇô small-screen responsiveness
   * ========================================= */

  /* Offboarding dashboard: uses oh-dashboard ΓÇô already covered by global rules */
  #offboardingDashboard #dashboard .oh-dashboard__cards .col-12,
  #offboardingDashboard .row.mt-4 .col-12 {
    margin-bottom: 0.75rem;
  }

  /* Offboarding dashboard: task/asset/feedback cards and charts */
  #offboardingDashboard .oh-offboarding-card .oh-card-dashboard__body canvas {
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
    min-height: 200px;
  }

  /* Offboarding dashboard: tables inside cards scroll horizontally */
  #offboardingDashboard .oh-card-dashboard .oh-sticky-table__table,
  #offboardingDashboard .oh-card-dashboard [style*="overflow-x"] {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Exit Process (Pipeline): tabs ΓÇô already covered by oh-tabs rules */
  /* Pipeline: Add Stage button row wraps on mobile */
  #offboardingContainer .d-flex.flex-row-reverse .oh-btn--secondary {
    width: 100%;
    min-width: 0;
  }

  /* Pipeline: accordion header (stage title + badge + actions) wraps */
  #offboardingContainer .oh-accordion-meta__header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #offboardingContainer .oh-accordion-meta__header .oh-accordion-meta__title,
  #offboardingContainer .oh-accordion-meta__header .oh-accordion-meta__actions {
    flex: 1 1 auto;
  }

  /* Pipeline: stage table container ΓÇô ensure horizontal scroll */
  #offboardingContainer .oh-accordion-meta__body [style*="overflow-x"] {
    -webkit-overflow-scrolling: touch;
  }

  /* Pipeline: pagination inside accordion stages */
  #offboardingContainer .oh-accordion-meta .oh-pagination__nav {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  /* Resignation Letters: filter badges (Rejected/Requested/Approved) ΓÇô covered by d-flex.flex-row-reverse */
  /* Resignation Letters: table view ΓÇô covered by oh-sticky-table */
  /* Resignation Letters: card view ΓÇô covered by oh-faq-cards */
  /* Resignation modals: ensure full width on small screens */
  #resignationModal .oh-modal__dialog,
  #resignationEditModal .oh-modal__dialog {
    max-width: calc(100vw - 1.5rem) !important;
    margin: 0.75rem;
  }

  /* Offboarding pipeline nav: titlebar stacks on mobile */
  .oh-wrapper.oh-main__topbar .oh-main__titlebar--left,
  .oh-wrapper.oh-main__topbar .oh-main__titlebar--right {
    width: 100%;
    max-width: 100%;
  }

  /* =========================================
   * Section 4: Assets ΓÇô small-screen responsiveness
   * ========================================= */

  /* Asset dashboard: cards stack, charts and tables constrained */
  #dashboard .oh-dashboard__cards .col-12.filter,
  #dashboard .oh-dashboard__movable-cards .col-12 {
    margin-bottom: 0.75rem;
  }

  /* Asset dashboard: chart containers */
  #assetAvailableChartContainer canvas,
  #assetCategoryChartContainer canvas {
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
    min-height: 0; /* let Chart.js control aspect ratio */
  }

  /* Asset dashboard: request/allocate tables inside cards ΓÇô horizontal scroll */
  #dashboardAssetRequests .oh-sticky-table,
  #dashboardAssetRequests .oh-sticky-table__table,
  #dashboardAssetAllocates .oh-sticky-table,
  #dashboardAssetAllocates .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Asset View (category accordion): header wraps on mobile */
  #assetFiltered .oh-accordion-meta__header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #assetFiltered .oh-accordion-meta__header .d-flex,
  #assetFiltered .oh-accordion-meta__header .oh-accordion-meta__actions {
    flex: 1 1 auto;
  }

  /* Asset list inside accordion: oh-sticky-table--no-overflow already covered */
  /* Asset Batches: oh-sticky-table, oh-pagination ΓÇô covered by global rules */
  /* Request and Allocation: oh-tabs ΓÇô covered by global rules */
  /* Request and Allocation: nested accordions and tables ΓÇô covered */

  /* Asset History: filter dropdown (in nav) ΓÇô covered by global oh-dropdown__menu max-width */

  /* Asset modals: ensure full width on small screens */
  #addAssetReport .oh-modal__dialog,
  #assetFineModal .oh-modal__dialog {
    max-width: calc(100vw - 1.5rem) !important;
    margin: 0.75rem;
  }

  /* Asset request/allocation list container */
  #listContainer .oh-sticky-table,
  #listContainer .oh-tabs__contents .oh-sticky-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* =========================================
   * Section 5: Help Desk ΓÇô small-screen responsiveness
   * ========================================= */

  /* Helpdesk FAQ filter dropdown: shrink and keep within viewport on mobile */
  .oh-main__topbar .oh-dropdown__filter {
    width: min(80vw, 210px) !important;
    padding: 0.45rem 0.55rem !important;
    max-height: 220px;
    overflow-y: auto;
  }

  .oh-main__topbar .oh-dropdown__filter .oh-label {
    font-size: 0.75rem;
  }

  .oh-main__topbar .oh-dropdown__filter .select2-selection--multiple {
    min-height: 1.7rem;
    padding: 0.05rem 0.3rem;
    font-size: 0.75rem;
  }

  .oh-main__topbar .oh-dropdown__filter-footer .oh-btn {
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
  }

  /* Position the FAQ filter dropdown just below its button ΓÇô override any fixed/centered rules */
  .oh-main__topbar .oh-dropdown__menu.oh-dropdown__filter {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin-top: 0.25rem;
  }

  /* Three-dots dropdown menus (Tailwind-style) ΓÇô shrink content and keep within viewport */
  .dropdown-menu.absolute.right-0.min-w-\[100px\].bg-white.rounded-lg.shadow-card.py-2,
  .absolute.right-0.min-w-\[100px\].bg-white.rounded-lg.shadow-card.py-2 {
    max-width: calc(100vw - 1.5rem);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .absolute.right-0.min-w-\[100px\].bg-white.rounded-lg.shadow-card.py-2 ul.text-xs li a {
    font-size: 0.8rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  /* =========================================
   * Section 6: Project ΓÇô small-screen responsiveness
   * ========================================= */

  /* Project dashboard: cards and charts stack (oh-dashboard already covered by Leave/PMS rules) */
  main .oh-dashboard .oh-dashboard__cards .col-12,
  main .oh-dashboard .oh-dashboard__movable-cards .col-12 {
    margin-bottom: 0.75rem;
  }

  /* Project dashboard: chart canvases ΓÇô no horizontal overflow */
  #projectStatusCanvas,
  #taskStatusCanvas {
    max-width: 100%;
    height: auto;
  }

  /* Project dashboard: "Projects due in this month" table ΓÇô scroll inside card */
  main .oh-dashboard .oh-card-dashboard__body .oh-sticky-table,
  main .oh-dashboard .oh-card-dashboard__body .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Project modals: full width on small screens */
  #ProjectModal .oh-modal__dialog,
  #ProjectModalShow .oh-modal__dialog,
  #projectImport .oh-modal__dialog,
  #TaskModal .oh-modal__dialog,
  #TimeSheetModal .oh-modal__dialog {
    max-width: calc(100vw - 1.5rem) !important;
    margin: 0.75rem;
  }

  /* Projects list: status filter pills (New, In progress, Completed, etc.) ΓÇô wrap */
  #view-container .d-flex.flex-row-reverse.m-3,
  #view-container .d-flex.flex-row-reverse {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #view-container .d-flex.flex-row-reverse .m-3.draft,
  #view-container .d-flex.flex-row-reverse > span {
    margin: 0.25rem !important;
  }

  /* Project list / Task-all list: sticky table scroll */
  #view-container .oh-sticky-table,
  #view-container .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Tasks within project: #projectStages accordion ΓÇô stage header wraps */
  #projectStages .oh-accordion-meta__header,
  #projectStages .oh-accordion-meta__header.oh-accordion-meta__header--custom {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    min-height: unset;
  }

  #projectStages .oh-accordion-meta__header .d-flex,
  #projectStages .oh-accordion-meta__header .oh-accordion-meta__title,
  #projectStages .oh-accordion-meta__header .oh-btn-group {
    flex: 1 1 auto;
  }

  /* Task stage body: table scroll */
  #projectStages .oh-accordion-meta__body .oh-sticky-table,
  #projectStages .oh-accordion-meta__body .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Task view Add Stage / Add Task row ΓÇô wrap on mobile */
  #projectStages .oh-kanban__add-container,
  #projectStages .oh-accordion-meta__header .oh-btn-group.ml-3 {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  /* Task view container (#viewContainer used in task navbar hx-target) */
  #viewContainer .oh-sticky-table,
  #viewContainer .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Timesheet list wrapper and table */
  #TimeSheetList {
    max-width: 100%;
    overflow-x: auto;
  }

  #TimeSheetList .oh-sticky-table,
  #TimeSheetList .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Timesheet list: status pills row ΓÇô wrap */
  #TimeSheetList .d-flex.flex-row-reverse {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  #TimeSheetList .d-flex.flex-row-reverse > span {
    margin: 0.25rem !important;
  }

  /* Project/Task/Timesheet nav: titlebar stacks (shared with other modules) */
  .oh-wrapper.oh-main__topbar .oh-main__titlebar--left,
  .oh-wrapper.oh-main__topbar .oh-main__titlebar--right {
    width: 100%;
    max-width: 100%;
  }

  .oh-main__titlebar-button-container .oh-btn-group.ml-2 {
    margin-left: 0 !important;
  }

  /* =========================================
   * Section 7: Reports ΓÇô small-screen responsiveness
   * (Employee, Recruitment, Attendance, Leave, Payroll, Asset, PMS reports)
   * Scoped with :has() so only report pages are affected
   * ========================================= */

  /* Report page wrapper (only when filter or pivot is present) */
  .oh-wrapper.mt-3:has(#filterForm) .d-flex.mt-3.mb-3,
  .oh-wrapper.mt-3:has(#pivot-container) .d-flex.mt-3.mb-3 {
    flex-wrap: wrap;
    row-gap: 0.75rem;
    align-items: flex-start;
  }

  /* Report title + Filter/Export row: stack on small screens */
  .oh-wrapper.mt-3:has(#filterForm) .d-flex.mt-3.mb-3 .oh-main__titlebar-title,
  .oh-wrapper.mt-3:has(#pivot-container) .d-flex.mt-3.mb-3 .oh-main__titlebar-title {
    width: 100%;
    margin-bottom: 0;
  }

  .oh-wrapper.mt-3:has(#filterForm) .d-flex.mt-3.mb-3 > div[style*="inline-flex"],
  .oh-wrapper.mt-3:has(#filterForm) .d-flex.mt-3.mb-3 > div:last-child,
  .oh-wrapper.mt-3:has(#pivot-container) .d-flex.mt-3.mb-3 > div[style*="inline-flex"],
  .oh-wrapper.mt-3:has(#pivot-container) .d-flex.mt-3.mb-3 > div:last-child {
    width: 100%;
    max-width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
  }

  /* Report filter form: allow shrink */
  .oh-wrapper.mt-3 #filterForm {
    min-width: 0;
    margin-right: 0;
    margin-top: 0 !important;
  }

  /* Report Export button: no overflow */
  .oh-wrapper.mt-3 #export-btn {
    margin-top: 0 !important;
    flex-shrink: 0;
  }

  /* Report pivot container: constrain and scroll */
  #pivot-container {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-left: 0;
    margin-right: 0;
  }

  .pivot-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* PMS report: model select and pivot wrappers */
  .oh-wrapper.mt-3 #model-select {
    max-width: 100%;
    width: 100% !important;
  }

  #pivot-feedback,
  #pivot-objective,
  #pivot-employeeobjective {
    max-width: 100%;
    overflow-x: auto;
  }

  /* Report filter dropdown: ensure filter body columns stack on report pages */
  .oh-wrapper.mt-3:has(#filterForm) .oh-dropdown__filter-body .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* =========================================
   * Section 8: Configuration (Settings) ΓÇô small-screen responsiveness
   * Base settings + Prime theme settings; General, Base, Department, etc.
   * ========================================= */

  /* Base settings template: topbar already covered by shared titlebar rules */
  .oh-wrapper .oh-card .row > .col-12.col-lg-3,
  .oh-wrapper .oh-card .row > .col-12.col-lg-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Base settings: inner sidebar (All Settings menu) ΓÇô full width, scroll if long */
  .oh-wrapper .oh-card .oh-inner-sidebar,
  .oh-wrapper .oh-card #mobileMenu {
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .oh-wrapper .oh-card .oh-inner-sidebar-toggle {
    width: 100%;
  }

  /* Base settings: accordion headers and links in sidebar */
  .oh-wrapper .oh-card .oh-inner-sidebar .oh-accordion-header {
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .oh-wrapper .oh-card .oh-inner-sidebar .oh-inner-sidebar__link {
    word-break: break-word;
  }

  /* Base settings: content column (block settings) ΓÇô avoid overflow */
  .oh-wrapper .oh-card .row .col-lg-9 {
    min-width: 0;
    overflow-x: auto;
  }

  /* Base settings: sticky table inside settings content ΓÇô allow scroll */
  .oh-wrapper .oh-card .oh-sticky-table {
    max-height: min(70vh, 500px) !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Prime theme settings: grid layout ΓÇô stack columns */
  .grid.grid-cols-12.gap-4 .col-span-12 {
    max-width: 100%;
  }

  /* Prime theme settings: left column (sidebar) ΓÇô no right border on small screens */
  .grid.grid-cols-12.gap-4 > div:first-child {
    border-right: none !important;
    padding-right: 0.5rem;
  }

  /* Prime theme settings: accordion items ΓÇô prevent overflow */
  .accordion-wrapper .accordion-item .accordion-btn-stng,
  .accordion-wrapper .accordion-item .accordion-panel {
    word-break: break-word;
  }

  .accordion-wrapper .accordion-btn-stng {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Prime theme settings: right column content area ΓÇô scroll */
  .grid.grid-cols-12.gap-4 > div:last-child {
    min-width: 0;
    overflow-x: auto;
  }

  .grid.grid-cols-12.gap-4 > div:last-child [class*="overflow-y-auto"] {
    min-height: 300px;
    max-height: calc(100vh - 8rem);
  }

  /* Settings sub-pages (department, company, job position, etc.): listContainer and tables */
  #listContainer .oh-sticky-table,
  .oh-wrapper#listContainer .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Settings forms (General Settings, etc.): stack form columns on small screens */
  .oh-wrapper .oh-card .row .col-lg-9 .row .col-md-6,
  .oh-wrapper .oh-card .row .col-lg-9 .row .col-lg-6,
  .oh-wrapper .oh-card .row .col-lg-9 .row [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* =========================================
   * Section 1: General (Settings) ΓÇô small-screen responsiveness
   * General Settings, Employee Permission, User Group, Accessibility,
   * Date & Time Format, History Tags, Mail Server
   * ========================================= */

  /* --- 1.1 General Settings: included blocks (attendance/payroll/encashment etc.) --- */
  .oh-wrapper .oh-card .row .col-lg-9 .flex.space-x-2,
  .oh-wrapper .oh-card .row .col-lg-9 .prefix.flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .prefix .btn {
    width: 100%;
    max-width: 100%;
  }

  /* --- 1.2 Employee Permission: header stack, permission table overflow --- */
  .oh-inner-sidebar-content .oh-inner-sidebar-content__header.d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .oh-inner-sidebar-content .oh-inner-sidebar-content__header .d-flex {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
  }
  .oh-inner-sidebar-content .oh-inner-sidebar-content__header .oh-input-group,
  .oh-inner-sidebar-content .oh-inner-sidebar-content__header .oh-btn {
    min-width: 0;
  }
  #permissionContainer .panel .oh-sticky-table,
  #permissionContainer .panel .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #permissionContainer .perm-accordion .d-flex.flex-row,
  #permissionContainer .oh-user_permission-list_item .d-flex.flex-row {
    flex-wrap: wrap;
  }
  #permissionContainer .perm-accordion .bd-highlight,
  #permissionContainer .perm-accordion .p-2 {
    min-width: 0;
  }

  /* --- 1.3 User Group: header, group list item, editable input, pagination --- */
  #permissionContainer .oh-user_permission-list_profile {
    flex-wrap: wrap;
    min-width: 0;
  }
  #permissionContainer .oh-user_permission-list_profile .oh-feedback-card__name-container {
    flex: 1 1 auto;
    min-width: 0;
  }
  #permissionContainer .oh-table__editable-input[style*="width: 250px"],
  #permissionContainer input.oh-tabs__movable-title.oh-table__editable-input {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  #permissionContainer .oh-user_permission-list_item .btn-group {
    flex-wrap: wrap;
    margin-top: 0.25rem;
  }
  .oh-wrapper.w-100 .oh-pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .oh-wrapper.w-100 .oh-pagination__nav {
    flex-wrap: wrap;
  }
  .oh-wrapper.w-100 .oh-pagination__input-container {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }

  /* --- 1.4 Accessibility Restriction: header, accordion, form --- */
  #accessibilityContainer .oh-inner-sidebar-content__header {
    flex-wrap: wrap;
  }
  #accessibilityContainer .oh-accordion-meta__header {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  #accessibilityContainer .oh-accordion-meta__title {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
  }
  #accessibilityContainer .oh-accordion-meta__actions {
    flex-shrink: 0;
  }
  #accessibilityContainer .oh-accordion-meta__body .col-12.col-md-6 {
    max-width: 100%;
  }
  #accessibilityContainer .oh-accordion-meta__body .select2-container {
    max-width: 100%;
  }

  /* --- 1.5 Date & Time Format: full width, stack select + button --- */
  .oh-inner-sidebar-content .oh-inner-sidebar-content__header.mt-3 {
    margin-top: 0.5rem;
  }
  .oh-inner-sidebar-content .w-75.d-flex {
    width: 100% !important;
    max-width: 100%;
    flex-wrap: wrap;
  }
  .oh-inner-sidebar-content .w-75.d-flex .oh-select,
  .oh-inner-sidebar-content .w-75.d-flex .oh-select-2,
  .oh-inner-sidebar-content .w-75.d-flex select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }
  .oh-inner-sidebar-content .w-75.d-flex .w-100 {
    flex: 0 0 100%;
    width: 100%;
  }
  .oh-inner-sidebar-content .w-75.d-flex .oh-btn {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    width: 100%;
  }

  /* --- 1.6 History Tags: listContainer already in Section 8; modal --- */
  .oh-inner-sidebar-content .oh-checkpoint-badge {
    max-width: 100%;
  }

  /* --- 1.7 Mail Server: listContainer + table already in Section 8; modal body --- */
  #mailServerModal .oh-modal__dialog-body {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Section 1: Modals (Employee Permission, User Group) ΓÇô constrain on small screens --- */
  #Permissions .oh-modal__dialog[style*="max-width: 880px"],
  #Permissions.oh-modal .oh-modal__dialog {
    max-width: min(95vw, 880px) !important;
    width: 100%;
  }
  #Permissions .oh-modal__dialog-body,
  #groupAssign .oh-modal__dialog-body {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #groupAssign .oh-modal__dialog {
    max-width: min(95vw, 500px);
    width: 100%;
  }

  /* =========================================
   * Section 2: Base (Settings) ΓÇô small-screen responsiveness
   * Department, Job Positions, Job Role, Company
   * ========================================= */

  /* --- 2.1 Shared: content loaded in .oh-inner-sidebar-content (with or without #listContainer) --- */
  .oh-inner-sidebar-content .oh-sticky-table,
  .oh-inner-sidebar-content .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .oh-inner-sidebar-content .heightContainer,
  .oh-inner-sidebar-content .fixed-table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* --- 2.2 Nav bar (prime_nav) used by Department, Job Position, Job Role, Company: wrap and filter dropdown --- */
  .oh-inner-sidebar-content .flex.flex-wrap.justify-between.items-center {
    gap: 0.5rem;
  }
  .oh-inner-sidebar-content .flex.flex-wrap.justify-between .flex.flex-wrap.gap-1 {
    width: 100%;
    max-width: 100%;
  }
  .oh-inner-sidebar-content .navFilterForm {
    width: 100%;
    max-width: 100%;
  }
  .oh-inner-sidebar-content .dropdown-wrapper .dropdown-content {
    min-width: 0 !important;
    max-width: min(95vw, 400px);
    width: 100%;
  }
  .oh-inner-sidebar-content .dropdown-wrapper .accordion-wrapper .row [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* --- 2.3 Department: table, action buttons --- */
  #listContainer .oh-btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  #listContainer .oh-btn-group .oh-btn,
  #listContainer .oh-btn-group .w-50 {
    min-width: 0;
    /* flex: 1 1 auto;  removed on small screens to avoid over-wide action buttons */
  }

  /* --- 2.4 Job Position / Job Role: permission table, collapse row, user panel --- */
  #listContainer .oh-permission-table__tr .oh-sticky-table__sd .d-flex {
    flex-wrap: wrap;
    min-width: 0;
  }
  #listContainer .oh-permission-table__user {
    word-break: break-word;
  }
  #listContainer .oh-user-panel,
  #listContainer .oh-collapse-panel {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  #listContainer .oh-user-panel .oh-profile,
  #listContainer .oh-user-panel .d-flex {
    min-width: 0;
  }
  #listContainer .oh-user-panel .d-flex {
    flex-wrap: wrap;
  }

  /* PMS Objective list (allobjContainer): keep Managers/Key Results readable on phones */
  #listContainer .fixed-table th[id*="-manager_col-header"],
  #listContainer .fixed-table th[id*="-key_res_col-header"] {
    min-width: 170px !important;
  }

  #listContainer .fixed-table td:nth-child(3),
  #listContainer .fixed-table td:nth-child(4) {
    min-width: 170px;
    vertical-align: top;
  }

  #listContainer .fixed-table td:nth-child(3) .oh-user-panel,
  #listContainer .fixed-table td:nth-child(3) .oh-collapse-panel,
  #listContainer .fixed-table td:nth-child(4) .oh-user-panel,
  #listContainer .fixed-table td:nth-child(4) .oh-collapse-panel {
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.35rem;
  }

  #listContainer .fixed-table td:nth-child(3) .oh-profile,
  #listContainer .fixed-table td:nth-child(4) .oh-profile {
    min-width: 0;
  }

  #listContainer .fixed-table td:nth-child(3) .oh-profile__name,
  #listContainer .fixed-table td:nth-child(4) .oh-profile__name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Asset dashboard card: keep request table inside parent card on small screens */
  #asset_request_approve,
  #asset_request_approve .hlv-container,
  #asset_request_approve .bg-white.p-5.pe-2.pt-3.rounded-md.shadow-card.relative {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #asset_request_approve .heightContainer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #asset_request_approve .fixed-table {
    width: max-content !important;
    min-width: 100%;
    table-layout: auto !important;
  }

  #asset_request_approve .fixed-table th,
  #asset_request_approve .fixed-table td {
    white-space: nowrap;
  }

  /* Keep previous behavior only on mobile; reset for desktop/tablet */
  @media (min-width: 768px) {
    #asset_request_approve .heightContainer {
      overflow-x: auto !important;
    }

    #asset_request_approve .fixed-table {
      width: 100% !important;
      min-width: 0 !important;
      table-layout: auto !important;
    }
  }

  /* --- 2.5 Company: list uses prime_list_table (fixed-table) ΓÇô covered by 2.1; modal --- */
  .oh-inner-sidebar-content .hlv-container {
    max-width: 100%;
    overflow-x: auto;
  }
  .oh-inner-sidebar-content .bg-white.p-5.pe-2.pt-3 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* --- 2.6 Base section modals: Department, Job Position, Job Role create/update --- */
  #objectCreateModal .oh-modal__dialog,
  #objectUpdateModal .oh-modal__dialog,
  #jobPositionModal .oh-modal__dialog,
  #jobRoleModal .oh-modal__dialog {
    max-width: min(95vw, 500px);
    width: 100%;
  }
  #objectCreateModal .oh-modal__dialog-body,
  #objectUpdateModal .oh-modal__dialog-body,
  #jobPositionModal .oh-modal__dialog-body,
  #jobRoleModal .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* =========================================
   * Section 3: Recruitment (Settings) ΓÇô small-screen responsiveness
   * Candidate Self Tracking, Candidate Reject Reason, Skills
   * ========================================= */

  /* --- 3.1 Candidate Self Tracking: card grid and toggle rows --- */
  .oh-wrapper .oh-card .row .col-lg-9 .grid.grid-cols-12.gap-4.myform {
    max-width: 100%;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .grid.grid-cols-12.gap-4.myform > [class*="col-span"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .grid .flex.items-center.justify-between {
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .grid .flex.space-x-2 {
    min-width: 0;
    flex: 1 1 auto;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .grid .toggle-label {
    flex-shrink: 0;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .border.rounded-md.overflow-hidden.mb-5 {
    max-width: 100%;
    overflow-x: hidden;
  }
  .oh-wrapper .oh-card .row .col-lg-9 .border.rounded-md .p-4 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* --- 3.2 Candidate Reject Reason & Skills: listContainer + tables already in Section 2/8; modals --- */
  #rejectReasonModal .oh-modal__dialog,
  #skillsModal .oh-modal__dialog {
    max-width: min(95vw, 550px) !important;
    width: 100%;
  }
  #rejectReasonModal .oh-modal__dialog-body,
  #skillsModal .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* =========================================
   * Section 4: Employee (Settings) ΓÇô small-screen responsiveness
   * Work Type, Rotating Work Type, Employee Shift, Rotating Shift,
   * Employee Shift Schedule, Employee Type, Disciplinary Action Type, Employee Tags
   * ========================================= */

  /* --- 4.1 Shared: listContainer + nav already in Section 2; tables in Section 2/8 --- */

  /* --- 4.2 Employee Shift: grace time cell (text + switch) wrap --- */
  #listContainer .oh-sticky-table__td .d-flex.align-items-center,
  #listContainer .oh-sticky-table__td .d-flex {
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
  }
  #listContainer .oh-sticky-table__td .oh-switch {
    flex-shrink: 0;
  }

  /* --- 4.3 Employee Shift Schedule: permission table + user panel (same as Job Position/Role) ΓÇô Section 2.4 already applies --- */

  /* --- 4.4 Employee section modals: Work Type, Employee Shift, Employee Type --- */
  #workTypeModal .oh-modal__dialog,
  #shiftModal .oh-modal__dialog,
  #employeeTypeModal .oh-modal__dialog {
    max-width: min(95vw, 500px);
    width: 100%;
  }
  #workTypeModal .oh-modal__dialog-body,
  #shiftModal .oh-modal__dialog-body,
  #employeeTypeModal .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- 4.5 Rotating Work Type, Rotating Shift, Action Type, Employee Tags: use objectCreateModal/objectUpdateModal ΓÇô Section 2.6 already applies --- */

  /* =========================================
   * Section 5: Attendance (Settings) ΓÇô small-screen responsiveness
   * Track Late Come & Early Out, Attendance Break Point, Check In/Check Out,
   * Grace Time, Biometric Attendance, IP Restriction, Geo & Face Config
   * ========================================= */

  /* --- 5.1 Track Late Come & Early Out: form row wrap --- */
  .oh-input__group div[style*="display: flex"] {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .oh-input__group .oh-switch {
    flex-shrink: 0;
  }

  /* --- 5.2 Attendance Break Point: listContainer + nav ΓÇô Section 2 covers --- */

  /* --- 5.3 Check In/Check Out: listContainer + nav ΓÇô Section 2 covers --- */

  /* --- 5.4 Grace Time: #grace-time-container (not listContainer) ΓÇô table overflow --- */
  #grace-time-container .oh-sticky-table,
  #grace-time-container .oh-sticky-table__table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #grace-time-container .oh-btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  #grace-time-container .oh-sticky-table__td .d-flex {
    flex-wrap: wrap;
    min-width: 0;
  }

  /* --- 5.5 Biometric Attendance: header + switch row --- */
  .oh-inner-sidebar-content.mb-4 .oh-inner-sidebar-content__header.d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .oh-inner-sidebar-content.mb-4 .oh-switch.ms-3 {
    flex-wrap: wrap;
    min-width: 0;
  }

  /* --- 5.6 IP Restriction: header, label+switch row, table --- */
  .oh-inner-sidebar-content .oh-label__info.fw-bold,
  .oh-inner-sidebar-content .oh-label__info:has(.oh-switch) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
  .oh-inner-sidebar-content .oh-label__info .oh-switch {
    flex-shrink: 0;
  }
  .oh-inner-sidebar-content .oh-modal__dialog-footer.p-0 .oh-btn {
    width: 100%;
    max-width: 100%;
  }
  /* IP table + btn-group already in .oh-inner-sidebar-content ΓÇô Section 2.1 covers table */

  /* --- 5.7 Geo & Face Config: HTMX-loaded content --- */
  #geo,
  #face {
    max-width: 100%;
    overflow-x: auto;
  }
  #geo > div,
  #face > div {
    min-width: 0;
  }

  /* --- 5.8 Attendance settings modals: objectDetailsModalW25 (Add/Edit IP, etc.) --- */
  #objectDetailsModalW25 .oh-modal__dialog {
    max-width: min(95vw, 500px);
    width: 100%;
  }
  #objectDetailsModalW25 .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* =========================================
   * Section 6: Leave (Settings) ΓÇô small-screen responsiveness
   * Restrictions (Past Leave), Compensatory Leave
   * ========================================= */

  /* --- 6.1 Restrict Past Leave: card + grid + toggle ΓÇô Section 3 rules apply (same structure) --- */

  /* --- 6.2 Compensatory Leave: card + grid + toggle ΓÇô Section 3 rules apply; #leave_type_div content --- */
  #leave_type_div {
    max-width: 100%;
    overflow-x: hidden;
  }
  #leave_type_div .oh-layout--grid-3 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 100%;
  }
  #leave_type_div .oh-kanban-card {
    flex: 1 1 100%;
    min-width: 0;
  }
  #leave_type_div .oh-timeoff-card__stat-container,
  #leave_type_div .oh-timeoff-modal__stats-container {
    grid-template-columns: 1fr;
  }

  /* =========================================
   * Section 7: Payroll (Settings) ΓÇô small-screen responsiveness
   * Payslip Auto Generation
   * ========================================= */

  /* --- 7.1 Payslip Auto Generation: listContainer + nav ΓÇô Section 2 covers; modal Section 2.6 --- */

  /* =========================================
   * Section 8: Performance (Settings) ΓÇô small-screen responsiveness
   * Bonus Point Setting
   * ========================================= */

  /* --- 8.1 Bonus Point Setting: listContainer + nav (prime_nav), genericModal ΓÇô Section 2 covers --- */
  .oh-wrapper.animated-background[style*="height:80px"] {
    min-height: 60px;
  }

  /* =========================================
   * Section 9: Help Desk (Settings) ΓÇô small-screen responsiveness
   * Department Managers, Ticket Type, Helpdesk Tags
   * ========================================= */

  /* --- 9.1 Department Managers: header + listContainer ΓÇô Section 1/2 cover header wrap and table; objectCreateModal/objectUpdateModal Section 2.6 --- */
  .oh-inner-sidebar-content .oh-inner-sidebar-content__header .text-lg.font-semibold {
    min-width: 0;
    word-break: break-word;
  }

  /* --- 9.2 Ticket Type: listContainer ΓÇô Section 2; modals #ticketModal, #ticketEditModal --- */
  #ticketModal .oh-modal__dialog,
  #ticketEditModal .oh-modal__dialog {
    max-width: min(95vw, 500px);
    width: 100%;
  }
  #ticketModal .oh-modal__dialog-body,
  #ticketEditModal .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- 9.3 Helpdesk Tags: listContainer ΓÇô Section 2; modals #tagModal, #tagEditModal --- */
  #tagModal .oh-modal__dialog,
  #tagEditModal .oh-modal__dialog {
    max-width: min(95vw, 500px);
    width: 100%;
  }
  #tagModal .oh-modal__dialog-body,
  #tagEditModal .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* =========================================
   * Section 10: Integrations (Settings) ΓÇô small-screen responsiveness
   * Gdrive Backup, Linkedin, Google Meet, Whatsapp
   * ========================================= */

  /* --- 10.1 Gdrive Backup: form (as_p) ΓÇô ensure form and alerts don't overflow --- */
  .oh-wrapper .oh-card .row .col-lg-9 > form,
  .oh-wrapper .oh-card .row .col-lg-9 > .oh-wrapper {
    max-width: 100%;
  }
  .oh-wrapper .oh-card .row .col-lg-9 > form .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* --- 10.2 Linkedin: card + grid + toggle ΓÇô Section 3 applies; listContainer ΓÇô Section 2 --- */

  /* --- 10.3 Google Meet: card + grid ΓÇô Section 3; #credContainer (not listContainer) ΓÇô table overflow --- */
  #credContainer .oh-sticky-table,
  #credContainer .oh-sticky-table__table,
  #credContainer .heightContainer,
  #credContainer .fixed-table {
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #credContainer .oh-btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  /* --- 10.4 Whatsapp: card + grid ΓÇô Section 3; listContainer ΓÇô Section 2; #whatsappModal --- */
  #whatsappModal .oh-modal__dialog {
    max-width: min(95vw, 550px) !important;
    width: 100%;
  }
  #whatsappModal .oh-modal__dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #whatsappModal .hr-biometric-container {
    max-width: 100%;
  }
  #whatsappModal .hr-biometric {
    max-width: 100%;
    height: auto;
  }
}

/* =========================================
 * FAQ filter dropdown ΓÇô applies at ALL screen sizes
 * Overrides _responsive.scss / style.min.css fixed/centered positioning
 * ========================================= */
.oh-main__topbar .oh-dropdown__menu.oh-dropdown__filter {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  margin-top: 0.25rem;
  width: min(80vw, 240px) !important;
  max-height: 280px;
  overflow-y: auto;
}

/* Any "Filter" dropdown aligned to the right (desktop + mobile):
   keep it inside viewport (avoid horizontal page scroll). */
.oh-dropdown__menu.oh-dropdown__menu--right.oh-dropdown__filter {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  max-width: calc(100vw - 2rem) !important;
  width: min(90vw, 26rem) !important;
  overflow-x: hidden !important;
}

/* Fallback: some pages render filter popups without --right or as .dropdown-content.
   Constrain ALL filter popups to viewport on desktop too. */
@media (min-width: 768px) {
  .oh-dropdown {
    position: relative;
  }

  .oh-dropdown__menu.oh-dropdown__filter {
    max-width: calc(100vw - 2rem) !important;
    width: min(90vw, 26rem) !important;
    overflow-x: hidden !important;
  }

  /* Tailwind-style dropdown-content filter popups (only inside filter forms) */
  .navFilterForm .dropdown-content.absolute.z-10.bg-white.rounded-lg,
  .navFilterForm .dropdown-wrapper > .dropdown-content {
    max-width: calc(100vw - 2rem) !important;
    width: min(90vw, 26rem) !important;
    right: 0 !important;
    left: auto !important;
    overflow-x: hidden !important;
  }
}

/* =========================================
 * FAQ page ONLY (helpdesk/faq-view/<id>/) ΓÇô Filter popup
 * prime_theme faq_nav has no .oh-main__topbar; use #faqContainer
 * ========================================= */
#faqContainer .oh-dropdown__menu.oh-dropdown__filter {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  margin-top: 0.25rem;
  width: min(85vw, 260px) !important;
  max-height: 280px;
  overflow-y: auto;
  z-index: 9999;
}
#faqContainer .oh-dropdown__filter .oh-label {
  font-size: 0.8rem;
}
#faqContainer .oh-dropdown__filter-footer .oh-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

/* =============================================================================
   Horilla HLView: markup is <table class="fixed-table"> (not .fixed-table table).
   Mirror 46687f8 rules so dashboard tiles load attendance validate correctly.
   Loaded after rules above so these win when needed.
   ============================================================================= */
@media (max-width: 767.98px) {
  [hx-get*="dashboard-attendance-validate"] table.fixed-table {
    table-layout: fixed;
    min-width: 0;
  }

  [hx-get*="dashboard-overtime-approve"] table.fixed-table {
    table-layout: fixed;
    min-width: 0;
  }
}

/* When list is not under an hx-get wrapper, scope by dashboard tile body */
#attendance_validate .heightContainer table.fixed-table,
#attendance_validate [hx-get*="dashboard-attendance-validate"] table.fixed-table {
  table-layout: fixed;
  min-width: 0;
}

/* =============================================================================
   Large screens: laptops, desktops, ELO touch panels (mirrors layout/_general.scss
   when CSS build is not run — keeps content readable on ultrawide)
   ============================================================================= */
@media (min-width: 1280px) {
  .oh-wrapper {
    max-width: min(95%, 1680px);
  }

  .dashboard-home-layout {
    gap: 1.5rem;
    max-width: min(100%, 2048px);
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-home-layout #tileContainer {
    gap: 1.25rem;
  }
}

@media (min-width: 1536px) {
  .oh-wrapper {
    max-width: min(95%, 1920px);
  }

  .dashboard-home-layout #tileContainer {
    gap: 1.5rem;
  }
}

@media (min-width: 1920px) {
  .oh-wrapper {
    max-width: min(95%, 2048px);
  }

  .dashboard-home-layout #tileContainer {
    gap: 1.75rem;
  }

  #tileContainer .shadow-card canvas {
    max-width: 100%;
  }
}

/* =============================================================================
   Attendance To Validate (dashboard tile): wider Employee column, word-wrap
   (overrides narrow header_attrs + global overflow-wrap:anywhere on names)
   ============================================================================= */
#attendance_validate .heightContainer table.fixed-table {
  table-layout: auto !important;
}

#attendance_validate .heightContainer .fixed-table th[id$="-employee_id-header"],
#attendance_validate .heightContainer .fixed-table th[id$="-employee_id-header"] > div {
  min-width: 220px !important;
  width: auto !important;
  max-width: min(40vw, 380px) !important;
}

#attendance_validate .heightContainer .fixed-table td.stickyleft {
  max-width: none !important;
  min-width: 220px !important;
  width: auto !important;
}

#attendance_validate .heightContainer .fixed-table th[id$="-attendance_date-header"],
#attendance_validate .heightContainer .fixed-table td:nth-child(2):not(.stickyleft) {
  min-width: 150px !important;
}

#attendance_validate .heightContainer .fixed-table .oh-profile {
  min-width: 0;
  flex-wrap: nowrap;
  align-items: flex-start;
}

#attendance_validate .heightContainer .fixed-table .oh-profile span {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  hyphens: manual;
}

/* Dashboard OT / online / offline HLView: width follows tile (container query); OT Employee col ~legacy 220-240px on normal tiles */
#tileContainer :is(#overtime_approve, #offline_employees, #online_employees, #attendance_analytic, #late_employees, #half_day_employees, #hours_worked_list) {
  min-width: 0;
  max-width: 100%;
}

:is(#overtime_approve, #offline_employees, #online_employees) {
  container-type: inline-size;
  container-name: dash-hx-tile;
}

:is(#overtime_approve, #offline_employees, #online_employees, #late_employees, #half_day_employees, #hours_worked_list)
  :is(.hlv-container, .hlv-container > .bg-white.rounded-md.shadow-card),
:is(#overtime_approve, #offline_employees, #online_employees, #late_employees, #half_day_employees, #hours_worked_list)
  .heightContainer {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

:is(#late_employees, #half_day_employees, #hours_worked_list) .hlv-container,
:is(#late_employees, #half_day_employees, #hours_worked_list) .hlv-container .oh-table_sticky--wrapper {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

:is(#late_employees, #half_day_employees, #hours_worked_list) .hlv-container .table-wrapper {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

:is(#late_employees, #half_day_employees, #hours_worked_list) .hlv-container table.fixed-table {
  table-layout: auto;
  width: max-content;
  max-width: none;
}

#overtime_approve .heightContainer table.fixed-table {
  min-width: 0;
  table-layout: auto !important;
  width: 100% !important;
}

#overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"],
#overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"] > div {
  max-width: 420px !important;
  min-width: 240px !important;
  width: auto !important;
}

#overtime_approve .heightContainer .fixed-table td.stickyleft {
  max-width: none !important;
  min-width: 240px !important;
  width: auto !important;
}

#overtime_approve .heightContainer .fixed-table :is(th, td):nth-child(2) {
  min-width: 128px !important;
  width: auto !important;
}

#overtime_approve .heightContainer .fixed-table .oh-profile span {
  overflow-wrap: break-word !important;
  white-space: normal !important;
  word-break: normal !important;
}

@container dash-hx-tile (max-width: 400px) {
  #overtime_approve .heightContainer table.fixed-table {
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  #overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"],
  #overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"] > div,
  #overtime_approve .heightContainer .fixed-table td.stickyleft {
    max-width: none !important;
    min-width: 0 !important;
    width: 36% !important;
  }

  #overtime_approve .heightContainer .fixed-table :is(th, td):nth-child(2) {
    min-width: 0 !important;
    width: 26% !important;
  }

  #overtime_approve .heightContainer .fixed-table th[id$="-attendance_overtime-header"],
  #overtime_approve .heightContainer .fixed-table th[id$="-attendance_overtime-header"] > div,
  #overtime_approve .heightContainer .fixed-table td:nth-child(3):not(.stickyright) {
    max-width: none !important;
    min-width: 0 !important;
    width: 18% !important;
  }

  #overtime_approve .heightContainer .fixed-table :is(th.stickyright, th.stickyright > div, td.stickyright) {
    max-width: 104px !important;
    min-width: 0 !important;
    width: 20% !important;
  }

  #overtime_approve .heightContainer .fixed-table .oh-profile {
    max-width: 100%;
    min-width: 0 !important;
  }

  #overtime_approve .heightContainer .fixed-table td.stickyright .oh-btn-group a {
    font-size: 0.65rem !important;
    max-width: 100%;
    min-width: 0 !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
}

@supports not (container-type: inline-size) {
  @media (max-width: 767.98px) {
    #overtime_approve .heightContainer table.fixed-table {
      min-width: 0 !important;
      table-layout: fixed !important;
      width: 100% !important;
    }

    #overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"],
    #overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"] > div,
    #overtime_approve .heightContainer .fixed-table td.stickyleft {
      max-width: none !important;
      min-width: 0 !important;
      width: 36% !important;
    }

    #overtime_approve .heightContainer .fixed-table :is(th, td):nth-child(2) {
      min-width: 0 !important;
      width: 26% !important;
    }

    #overtime_approve .heightContainer .fixed-table th[id$="-attendance_overtime-header"],
    #overtime_approve .heightContainer .fixed-table th[id$="-attendance_overtime-header"] > div,
    #overtime_approve .heightContainer .fixed-table td:nth-child(3):not(.stickyright) {
      max-width: none !important;
      min-width: 0 !important;
      width: 18% !important;
    }

    #overtime_approve .heightContainer .fixed-table :is(th.stickyright, th.stickyright > div, td.stickyright) {
      max-width: 104px !important;
      min-width: 0 !important;
      width: 20% !important;
    }

    #overtime_approve .heightContainer .fixed-table .oh-profile {
      max-width: 100%;
      min-width: 0 !important;
    }

    #overtime_approve .heightContainer .fixed-table td.stickyright .oh-btn-group a {
      font-size: 0.65rem !important;
      max-width: 100%;
      min-width: 0 !important;
      padding-left: 0.35rem !important;
      padding-right: 0.35rem !important;
    }
  }
}

/* =============================================================================
   Dashboard responsiveness consolidation (non-destructive override layer)
   Keeps legacy rules intact, narrows scope to dashboard cards only.
   ============================================================================= */
#tileContainer > :is(#attendance_analytic, #overtime_approve, #online_employees, #offline_employees) {
  min-width: 0;
  max-width: 100%;
}

#tileContainer :is(#overtime_approve, #online_employees, #offline_employees)
  :is(.hlv-container, .hlv-container > .bg-white.rounded-md.shadow-card, .heightContainer) {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

@media (min-width: 768px) {
  #overtime_approve .heightContainer table.fixed-table {
    table-layout: auto !important;
  }

  #overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"],
  #overtime_approve .heightContainer .fixed-table th[id$="-employee_id-header"] > div,
  #overtime_approve .heightContainer .fixed-table td.stickyleft {
    min-width: 240px !important;
    width: auto !important;
    max-width: 420px !important;
  }

  #overtime_approve .heightContainer .fixed-table :is(th, td):nth-child(2) {
    min-width: 128px !important;
  }
}

/* =============================================================================
   Recruitment responsiveness consolidation (non-destructive override layer)
   Extends old 46687f8-style behavior with stable selectors in latest templates.
   ============================================================================= */
@media (max-width: 991.98px) {
  .recruitment-tabs-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .survey-header .oh-main__titlebar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .application-form-layout .application-form-preview-col.sticky {
    position: static !important;
    top: auto !important;
  }

  .application-form-layout .application-form-preview-frame {
    height: 55vh !important;
  }
}

@media (min-width: 768px) {
  .open-recruitments-intro {
    max-width: 50%;
  }
}

@media (max-width: 767.98px) {
  .open-recruitments-intro {
    max-width: 100%;
  }

  .count-span ~ #listContainer .fixed-table {
    table-layout: fixed !important;
    width: 100% !important;
  }
}

/* Recruitment dashboard: Skill Zone Status table width + word wrapping */
.skill-zone-status-table .fixed-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.skill-zone-status-table .fixed-table th[id$="-title-header"],
.skill-zone-status-table .fixed-table th[id$="-title-header"] > div,
.skill-zone-status-table .fixed-table td.stickyleft {
  width: 48% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.skill-zone-status-table .fixed-table th[id$="-candidate_count_display-header"],
.skill-zone-status-table .fixed-table th[id$="-candidate_count_display-header"] > div,
.skill-zone-status-table .fixed-table :is(td):nth-child(2) {
  width: 52% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.skill-zone-status-table .fixed-table :is(th, td):nth-child(2),
.skill-zone-status-table .fixed-table th[id$="-candidate_count_display-header"] > div {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  text-align: center !important;
}

.skill-zone-status-table .fixed-table .oh-profile span,
.skill-zone-status-table .fixed-table th span,
.skill-zone-status-table .fixed-table td .truncate {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.skill-zone-status-table .fixed-table th span {
  width: auto !important;
  max-width: 100% !important;
}

@media (max-width: 767.98px) {
  .skill-zone-status-table .fixed-table {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
  }

  .skill-zone-status-table .fixed-table th {
    min-width: 0 !important;
  }

  .skill-zone-status-table .fixed-table th[id$="-title-header"],
  .skill-zone-status-table .fixed-table th[id$="-title-header"] > div,
  .skill-zone-status-table .fixed-table td.stickyleft {
    width: 62% !important;
  }

  .skill-zone-status-table .fixed-table th[id$="-candidate_count_display-header"],
  .skill-zone-status-table .fixed-table th[id$="-candidate_count_display-header"] > div,
  .skill-zone-status-table .fixed-table :is(td):nth-child(2) {
    width: 38% !important;
  }

  .skill-zone-status-table .fixed-table :is(th, td) {
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    font-size: 0.7rem !important;
  }

  .skill-zone-status-table .fixed-table th > div {
    gap: 0.2rem !important;
  }

  .skill-zone-status-table .fixed-table .oh-profile {
    gap: 0.2rem !important;
  }

  .skill-zone-status-table .fixed-table .oh-profile__avatar {
    margin-right: 0.2rem !important;
  }

  .skill-zone-status-table .fixed-table .oh-profile__image {
    width: 20px !important;
    height: 20px !important;
  }

  .current-hiring-pipeline-table .fixed-table,
  .ongoing-recruitments-table .fixed-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .current-hiring-pipeline-table .fixed-table th,
  .ongoing-recruitments-table .fixed-table th {
    min-width: 0 !important;
  }

  .current-hiring-pipeline-table .fixed-table th[id$="-job_position-header"],
  .current-hiring-pipeline-table .fixed-table th[id$="-job_position-header"] > div,
  .current-hiring-pipeline-table .fixed-table td.stickyleft {
    width: 40% !important;
  }

  .current-hiring-pipeline-table .fixed-table :is(th, td):nth-child(2),
  .current-hiring-pipeline-table .fixed-table :is(th, td):nth-child(3),
  .current-hiring-pipeline-table .fixed-table :is(th, td):nth-child(4),
  .current-hiring-pipeline-table .fixed-table :is(th, td):nth-child(5),
  .current-hiring-pipeline-table .fixed-table :is(th, td):nth-child(6) {
    width: 12% !important;
  }

  .ongoing-recruitments-table .fixed-table th[id$="-title-header"],
  .ongoing-recruitments-table .fixed-table th[id$="-title-header"] > div,
  .ongoing-recruitments-table .fixed-table td.stickyleft {
    width: 42% !important;
  }

  .ongoing-recruitments-table .fixed-table th[id$="-managers-header"],
  .ongoing-recruitments-table .fixed-table th[id$="-managers-header"] > div,
  .ongoing-recruitments-table .fixed-table :is(td):nth-child(2) {
    width: 58% !important;
  }

  .current-hiring-pipeline-table .fixed-table :is(th, td),
  .ongoing-recruitments-table .fixed-table :is(th, td) {
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
    font-size: 0.72rem !important;
  }

  .current-hiring-pipeline-table .fixed-table .truncate,
  .ongoing-recruitments-table .fixed-table .truncate,
  .current-hiring-pipeline-table .fixed-table th span,
  .ongoing-recruitments-table .fixed-table th span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
}

/*
 * Nav filter (horilla_nav): phones + small tablets.
 * Fixed, horizontally centered in main column (same left as before); top from --nav-filter-panel-top
 * set in horilla_nav.html so the card sits under the trigger without viewport vertical centering.
 */
@media (max-width: 991.98px) {
  .navFilterForm .dropdown-wrapper .dropdown-content.absolute.z-10.bg-white.rounded-lg,
  .navFilterForm .dropdown-wrapper > .dropdown-content {
    position: fixed !important;
    left: calc(50vw + 4.7rem / 2) !important;
    right: auto !important;
    top: var(--nav-filter-panel-top, 10rem) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: min(calc(100vw - 4.7rem - 1rem), 12rem) !important;
    min-width: 145px !important;
    margin: 0 !important;
    transform: translate(-50%, 10px) !important;
    z-index: 11000 !important;
    max-height: min(85vh, calc(100dvh - 2rem)) !important;
    box-sizing: border-box !important;
  }

  .navFilterForm .dropdown-wrapper:hover .dropdown-content,
  .navFilterForm .dropdown-wrapper:focus-within .dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) !important;
  }

  .navFilterForm .dropdown-wrapper .dropdown-content .accordion-wrapper,
  .navFilterForm .dropdown-wrapper .dropdown-content .oh-dropdown__filter-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .navFilterForm .dropdown-wrapper .dropdown-content .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  .navFilterForm .dropdown-wrapper .dropdown-content [class*="col-"] {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    max-width: 100% !important;
  }

  .navFilterForm .dropdown-wrapper .dropdown-content .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Nav Actions (horilla_nav): same fixed + centered panel as Filter; --nav-filter-panel-top from horilla_nav.html */
  .hlv-nav-bar-actions > .dropdown-wrapper > .dropdown-content.absolute.z-10.bg-white.rounded-lg,
  .hlv-nav-bar-actions > .dropdown-wrapper > .dropdown-content {
    position: fixed !important;
    left: calc(50vw + 4.7rem / 2) !important;
    right: auto !important;
    top: var(--nav-filter-panel-top, 10rem) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: min(calc(100vw - 4.7rem - 1rem), 170px) !important;
    min-width: 145px !important;
    margin: 0 !important;
    transform: translate(-50%, 10px) !important;
    z-index: 11000 !important;
    max-height: min(85vh, calc(100dvh - 2rem)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .hlv-nav-bar-actions > .dropdown-wrapper:hover > .dropdown-content,
  .hlv-nav-bar-actions > .dropdown-wrapper:focus-within > .dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) !important;
  }

  .hlv-nav-bar-actions > .dropdown-wrapper > .dropdown-content ul {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hlv-nav-bar-actions > .dropdown-wrapper > .dropdown-content a {
    min-width: 0;
  }

  /* After clicking an action link: hide menu (beats sticky :hover / :focus-within on touch; z-index was above modals) */
  .hlv-nav-bar-actions > .dropdown-wrapper.hlv-actions-dropdown-collapsed > .dropdown-content,
  .hlv-nav-bar-actions > .dropdown-wrapper.hlv-actions-dropdown-collapsed:hover > .dropdown-content,
  .hlv-nav-bar-actions > .dropdown-wrapper.hlv-actions-dropdown-collapsed:focus-within > .dropdown-content {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(-50%, 10px) !important;
  }
}

/* Actions menu collapsed (desktop: absolute panel — same hide rules, default transform) */
@media (min-width: 992px) {
  .hlv-nav-bar-actions > .dropdown-wrapper.hlv-actions-dropdown-collapsed > .dropdown-content,
  .hlv-nav-bar-actions > .dropdown-wrapper.hlv-actions-dropdown-collapsed:hover > .dropdown-content,
  .hlv-nav-bar-actions > .dropdown-wrapper.hlv-actions-dropdown-collapsed:focus-within > .dropdown-content {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(10px) !important;
  }
}

/*
 * Generic filter popups (Survey Templates, etc.): same fixed + column-centered pattern
 * as .navFilterForm (Pipeline). Top from --filter-dropdown-top set in global.js.
 * .navFilterForm rules above win on top (--nav-filter-panel-top) via higher specificity.
 */
@media (max-width: 991.98px) {
  /* Filter panel: direct .dropdown-content OR Alpine panel inside .oh-dropdown (e.g. Skill Zone) */
  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body),
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) {
    position: fixed !important;
    left: calc(50vw + 4.7rem / 2) !important;
    right: auto !important;
    top: var(--filter-dropdown-top, 10rem) !important;
    bottom: auto !important;
    width: min(400px, calc(100vw - 4.7rem - 1rem)) !important;
    max-width: calc(100vw - 4.7rem - 1rem) !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: translate(-50%, 10px) !important;
    z-index: 11000 !important;
    max-height: min(85vh, calc(100dvh - 2rem)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .dropdown-wrapper:hover > .dropdown-content:has(.oh-dropdown__filter-body),
  .dropdown-wrapper:focus-within > .dropdown-content:has(.oh-dropdown__filter-body),
  .dropdown-wrapper:hover .oh-dropdown > div:has(> .oh-dropdown__filter-body),
  .dropdown-wrapper:focus-within .oh-dropdown > div:has(> .oh-dropdown__filter-body) {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, 0) !important;
  }

  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) .accordion-wrapper,
  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) .oh-dropdown__filter-body,
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) .accordion-wrapper,
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) .oh-dropdown__filter-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) .row,
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) [class*="col-"],
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) [class*="col-"] {
    flex: 0 0 100% !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    max-width: 100% !important;
  }

  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) .select2-container,
  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) .oh-select,
  .dropdown-wrapper > .dropdown-content:has(.oh-dropdown__filter-body) .oh-input,
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) .select2-container,
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) .oh-select,
  .dropdown-wrapper .oh-dropdown > div:has(> .oh-dropdown__filter-body) .oh-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Leave dashboard (employee leaves): keep month pickers inside card on phones */
@media (max-width: 767.98px) {
  #dash_month,
  #dash_leave_type_month,
  #dash_department_month {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
    margin-left: 0 !important;
  }
}

/* Asset Requests dashboard card: always confine table overflow inside card */
#asset_request_approve {
  min-width: 0;
}

#asset_request_approve > .flex {
  min-width: 0;
  width: 100%;
}

#asset_request_approve .hlv-container,
#asset_request_approve .bg-white.p-5.pe-2.pt-3.rounded-md.shadow-card.relative {
  min-width: 0;
  max-width: 100%;
}

#asset_request_approve .bg-white.p-5.pe-2.pt-3.rounded-md.shadow-card.relative {
  overflow: hidden;
}

#asset_request_approve .heightContainer {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Work Type Requests card: keep columns readable in desktop + mobile */
#work-shift .heightContainer {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#work-shift .fixed-table {
  width: max-content !important;
  min-width: 520px !important;
  table-layout: auto !important;
}

#work-shift .fixed-table th,
#work-shift .fixed-table td {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#work-shift .fixed-table th[id$="-employee_id-header"],
#work-shift .fixed-table td.stickyleft {
  min-width: 180px !important;
}

#work-shift .fixed-table th[id$="-work_type_id-header"],
#work-shift .fixed-table td:nth-child(2) {
  min-width: 170px !important;
}

#work-shift .fixed-table th.stickyright,
#work-shift .fixed-table td.stickyright {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
}

#work-shift .fixed-table td.stickyright .oh-btn-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center;
  gap: 0.25rem;
}

@media (max-width: 991.98px) {
  html:has(body.prime-narrow-rail-page),
  html.prime-narrow-rail-mobile-active {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100%;
    overscroll-behavior-x: none;
  }

  @supports (overflow: clip) {
    html:has(body.prime-narrow-rail-page),
    html.prime-narrow-rail-mobile-active {
      overflow-x: clip !important;
    }
  }

  body.prime-narrow-rail-page,
  body.prime-narrow-rail-mobile-active {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100%;
    overscroll-behavior-x: none;
  }

  body.prime-narrow-rail-page #horilla-main-scroll-rail,
  body.prime-narrow-rail-mobile-active #horilla-main-scroll-rail {
    margin-left: 0 !important;
    padding-left: 4.7rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
  }

  body.prime-narrow-rail-page #horilla-main-scroll-rail > div,
  body.prime-narrow-rail-mobile-active #horilla-main-scroll-rail > div {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-reports #horilla-main-scroll-rail > div,
  body.prime-narrow-rail-reports.prime-narrow-rail-mobile-active #horilla-main-scroll-rail > div {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.prime-narrow-rail-reports #pivot-container,
  body.prime-narrow-rail-reports .pivot-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.prime-narrow-rail-reports .oh-wrapper.mt-3 {
    overflow-x: visible !important;
  }

  body.prime-narrow-rail-page #horilla-main-scroll-rail .p-6,
  body.prime-narrow-rail-mobile-active #horilla-main-scroll-rail .p-6 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 6.25rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between,
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between {
    width: 100% !important;
    max-width: 100vw !important;
    max-width: 100dvw !important;
    left: 0 !important;
    right: 0 !important;
    padding-left: 4.7rem !important;
    padding-right: 0.5rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.35rem !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between > *,
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between > * {
    min-width: 0 !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between ul.breadcrumb,
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between ul.breadcrumb {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    align-content: center !important;
    overflow: visible !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between #reloadMessages,
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between #reloadMessages {
    flex: 0 0 auto !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between > .flex.items-center.gap-8,
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between > .flex.items-center.gap-8 {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    gap: 0.375rem !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between .oh-alert-container,
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between .oh-alert-container {
    flex: 1 1 100% !important;
    order: 99 !important;
  }

  body.prime-narrow-rail-page #header > div.flex.justify-between button#reloadMessagesButton[hidden],
  body.prime-narrow-rail-mobile-active #header > div.flex.justify-between button#reloadMessagesButton[hidden] {
    display: none !important;
  }

  body.prime-narrow-rail-page .oh-wrapper-main,
  body.prime-narrow-rail-mobile-active .oh-wrapper-main {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page #main,
  body.prime-narrow-rail-mobile-active #main {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page #main-section,
  body.prime-narrow-rail-mobile-active #main-section {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page nav.oh-navbar,
  body.prime-narrow-rail-mobile-active nav.oh-navbar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page .oh-navbar__wrapper,
  body.prime-narrow-rail-mobile-active .oh-navbar__wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.prime-narrow-rail-page #view-container,
  body.prime-narrow-rail-page #view-container.oh-wrapper,
  body.prime-narrow-rail-mobile-active #view-container,
  body.prime-narrow-rail-mobile-active #view-container.oh-wrapper {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page #view-container .oh-wrapper,
  body.prime-narrow-rail-mobile-active #view-container .oh-wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page .oh-profile-section,
  body.prime-narrow-rail-page .oh-profile-section__card,
  body.prime-narrow-rail-mobile-active .oh-profile-section,
  body.prime-narrow-rail-mobile-active .oh-profile-section__card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page .oh-wrapper,
  body.prime-narrow-rail-mobile-active .oh-wrapper {
    max-width: 100% !important;
  }

  body.prime-narrow-rail-page .oh-main__topbar,
  body.prime-narrow-rail-page .oh-profile-section__topbar,
  body.prime-narrow-rail-mobile-active .oh-main__topbar,
  body.prime-narrow-rail-mobile-active .oh-profile-section__topbar {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.prime-narrow-rail-page .select2-container,
  body.prime-narrow-rail-mobile-active .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page .select2-dropdown,
  body.prime-narrow-rail-mobile-active .select2-dropdown {
    max-width: calc(100vw - 1.5rem) !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page .oh-input,
  body.prime-narrow-rail-page .form-control,
  body.prime-narrow-rail-page select.oh-select,
  body.prime-narrow-rail-mobile-active .oh-input,
  body.prime-narrow-rail-mobile-active .form-control,
  body.prime-narrow-rail-mobile-active select.oh-select {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.prime-narrow-rail-page img.preview,
  body.prime-narrow-rail-page .preview,
  body.prime-narrow-rail-mobile-active img.preview,
  body.prime-narrow-rail-mobile-active .preview {
    max-width: 100% !important;
    height: auto !important;
  }

  body.prime-narrow-rail-page .oh-general__tabs,
  body.prime-narrow-rail-mobile-active .oh-general__tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
  }

  body.prime-narrow-rail-page .row,
  body.prime-narrow-rail-mobile-active .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  body.prime-narrow-rail-page [class*="col-"],
  body.prime-narrow-rail-mobile-active [class*="col-"] {
    max-width: 100% !important;
  }
}

/* Onboarding + Late Come/Early Out lists: mobile/tablet overlap fixes */
@media (max-width: 991.98px) {
  #listContainer .heightContainer .fixed-table th[id$="-offer_letter-header"],
  #listContainer .heightContainer .fixed-table td:has(select[name="status"]) {
    min-width: 170px !important;
  }

  #listContainer .heightContainer .fixed-table :is(th.stickyright, td.stickyright) {
    width: 220px !important;
    min-width: 220px !important;
    max-width: none !important;
  }

  #listContainer .heightContainer .fixed-table td.stickyright .oh-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-start;
  }

  #listContainer .heightContainer .fixed-table td.stickyright :is(.oh-btn.w-100, .oh-btn.w-50, .oh-btn-group form .oh-btn) {
    width: auto !important;
    min-width: 32px !important;
    flex: 0 0 auto;
  }

  #listContainer .heightContainer .fixed-table td.stickyright .oh-btn-group form {
    display: inline-flex;
  }

  /* Hour Account: same Actions widths as #ot-table (undo 220px from rule above) */
  #listContainer #ot-table .heightContainer .fixed-table :is(th.stickyright, td.stickyright) {
    width: 95px !important;
    min-width: 90px !important;
    max-width: 100px !important;
  }
  #listContainer #ot-table .heightContainer .fixed-table td.stickyright .oh-btn-group {
    display: flex !important;
    flex-flow: row nowrap;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.1rem !important;
  }
  #listContainer #ot-table .heightContainer .fixed-table td.stickyright .oh-btn-group > a {
    width: auto !important;
    min-width: 1.5rem !important;
    flex: 0 0 auto;
    padding: 0.2rem 0.3rem !important;
    height: auto !important;
    min-height: 1.45rem !important;
    max-width: none !important;
  }
  #listContainer #ot-table .heightContainer .fixed-table td.stickyright .oh-btn-group > a img {
    width: 11px !important;
  }

  #listContainer .heightContainer .fixed-table tr:has([data-target="#penaltyModal"])
    > :is(th:nth-last-child(2), td:nth-last-child(2):not(.stickyright)) {
    min-width: 170px !important;
    width: 170px !important;
    max-width: none !important;
  }

  #listContainer .heightContainer .fixed-table tr:has([data-target="#penaltyModal"])
    > :is(th.stickyright, td.stickyright) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: none !important;
  }

  #listContainer .heightContainer .fixed-table tr:has([data-target="#penaltyModal"])
    > td.stickyright .oh-btn-group {
    flex-wrap: nowrap !important;
    justify-content: center;
    gap: 0.2rem;
  }

  #listContainer .heightContainer .fixed-table tr:has([data-target="#penaltyModal"])
    > td.stickyright :is(.oh-btn.w-50, .oh-btn-group form.w-50) {
    width: auto !important;
    min-width: 32px !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 767.98px) {
  #penaltyViewModal .oh-modal__dialog[style*="max-width"] {
    max-width: calc(100vw - 1rem) !important;
    width: calc(100vw - 1rem) !important;
    margin: 0.5rem !important;
  }

  #penaltyViewModal .oh-modal__dialog-body {
    max-height: calc(100vh - 6rem);
  }

  #penaltyViewModal .oh-modal__dialog-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: 0.25rem;
  }

  #penaltyViewModal .oh-modal__close--custom {
    position: absolute;
    top: 0.15rem;
    right: 0.4rem;
    z-index: 30;
  }

  #penaltyViewModal .oh-sticky-dropdown--header {
    top: 3rem !important;
    right: 0.75rem !important;
    z-index: 10;
  }
}
