/* ========================================
 *  IND Global HR Design System Tokens (DESIGN.md)
 *  Single source of truth for Light surfaces, IND Navy brand, ink hierarchy,
 *  and space-separated RGB triplets consumed by compiled tailwind.css.
 * ====================================== */
:root {
  --primary-50: #f7f7f6;
  --primary-100: #eaf0f7;
  --primary-200: #dde7f3;
  --primary-300: #c7d6e8;
  --primary-400: #8faecf;
  --primary-500: #2a5e8c;
  --primary-600: #16325c;
  --primary-700: #0e1e33;
  --primary-800: #081220;
  --primary-900: #050b14;

  /* Space-separated RGB channels required by compiled tailwind.css rgb(var(--color-*) / alpha) */
  --color-primary-50: 247 247 246;
  --color-primary-100: 234 240 247;
  --color-primary-200: 221 231 243;
  --color-primary-300: 199 214 232;
  --color-primary-400: 143 174 207;
  --color-primary-500: 42 94 140;
  --color-primary-600: 22 50 92;
  --color-primary-700: 14 30 51;
  --color-primary-800: 8 18 32;
  --color-primary-900: 5 11 20;

  --color-secondary-50: 247 247 246;
  --color-secondary-100: 242 242 241;
  --color-secondary-200: 228 228 226;
  --color-secondary-300: 210 210 208;
  --color-secondary-600: 22 50 92;
  --color-secondary-900: 14 30 51;

  --color-dark-50: 228 228 226;
  --color-dark-100: 138 138 136;
  --color-dark-200: 94 94 92;
  --color-dark-300: 68 68 66;
  --color-dark-400: 94 94 92;
  --color-dark-500: 28 28 28;
  --color-dark-600: 14 30 51;

  --secondary-100: #f2f2f1;

  /* Layered Surfaces (Light — Warm Architectural Stone + Pure White Cards) */
  --surface-canvas: #f7f7f6;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-subtle: #f2f2f1;
  --surface-hover: #f4f6f9;
  --surface-input: #ffffff;
  --surface-input-disabled: #f2f2f1;

  /* Borders & Hairlines (Light) */
  --border-subtle: #efefee;
  --border-default: #e4e4e2;
  --border-strong: #d2d2d0;

  /* Typography & Ink Hierarchy (Light) */
  --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-primary: #1c1c1c;
  --text-secondary: #444442;
  --text-muted: #5e5e5c;
  --text-subtle: #8a8a88;

  /* Semantic Status Tokens (IND Brand Handoff v2) */
  --status-success: #1e7a54;
  --status-success-bg: #e4f2ea;
  --status-success-border: #bfe0cd;
  --status-warning: #9a6b12;
  --status-warning-bg: #faf0dc;
  --status-warning-border: #efdcb4;
  --status-danger: #8e2e22;
  --status-danger-bg: #f7e4e0;
  --status-danger-border: #e8bdb4;
  --status-info: #1f4c74;
  --status-info-bg: #e6eef5;
  --status-info-border: #c9dbea;
  --status-cyan: #0e7490;
  --status-purple: #5b21b6;
  --status-neutral: #5e5e5c;

  /* Gender / Analytics Tokens */
  --gender-male: #16325c;
  --gender-female: #0d9488;

  /* Radii, Two-Layer Shadows & Shell Dimensions */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --shadow-card: 0 1px 2px rgba(28, 28, 28, 0.04), 0 8px 24px -12px rgba(28, 28, 28, 0.08);
  --shadow-dropdown: 0 10px 28px -6px rgba(14, 30, 51, 0.14), 0 2px 6px rgba(14, 30, 51, 0.06);
  --shadow-modal: 0 24px 48px -12px rgba(14, 30, 51, 0.24), 0 4px 12px rgba(14, 30, 51, 0.08);
  --sidebar-width-collapsed: 4rem;
  --sidebar-width-expanded: 13rem;
  --header-height: 4rem;
}

body {
  font-family: var(--font-sans);
  background-color: var(--surface-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide Alpine-bound elements until Alpine has initialized, preventing a flash of the unhidden state (e.g. dropdown menus briefly showing on page load) */
[x-cloak] {
  display: none !important;
}

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

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

.dropdown-wrapper:hover .dropdown-content,
.dropdown-wrapper.is-open .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: min(380px, calc(100vw - 1.5rem));
  max-width: calc(100% - 1rem);
  height: calc(-2rem + 100vh);
  position: fixed;
  z-index: 999;
  border-radius: var(--radius-xl, 1rem);
  top: 1rem;
  right: 1rem;
  background-color: var(--surface-card, rgba(255, 255, 255, 0.96));
  border: 1px solid var(--border-default, #e2e8f0);
  backdrop-filter: blur(4px);
  padding: 1rem;
  transform: translateX(calc(100% + 1.5rem));
  transition: transform 0.25s ease;
}

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

@media (max-width: 575px) {
  .sidebarModal {
    width: calc(100vw - 1.5rem);
    right: 0.75rem;
  }
}

/* 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: var(--primary-600, #16325c);
  position: absolute;
  left: 0;
}

.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: #16325c;
} */

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

.sideboxmain.active {
  background-color: #16325c;
}

.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: #16325c; */
  opacity: 0;
  inset: 0;
  right: 0;
  left: auto;
  transition: 0.3s;
}

.sidebox ul li a:hover {
  background: rgba(22, 50, 92, 0.08);
  /* Comment this line for dynamic theme  */
  /* color: #16325c; */
  /* border-right: 2px solid #16325c; */
}

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

.sidebox ul li a.active {
  background: rgba(22, 50, 92, 0.08);
  color: var(--primary-600, #16325c);
}

.breadcrumb {
  display: flex;
  flex-flow: wrap;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #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.oh-breadcrumb-current {
  color: var(--primary-600, #16325c);
  font-weight: 500;
}

.breadcrumb li a {
  transition: 0.3s;
}

.breadcrumb li a:hover {
  color: var(--primary-600, #16325c);
}

.stickyleft {
  position: sticky;
  left: 0;
  background-color: var(--surface-card, #ffffff);
}

.stickyleft-second {
  position: sticky;
  left: 38px;
  background-color: var(--surface-card, #ffffff);
}

.stickyright {
  position: sticky;
  right: 0;
  background-color: var(--surface-card, #ffffff);
}

/* 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 var(--border-default, #e6e6e6);
  transition: 0.3s;
}

.myform input:focus,
.myform select:focus,
.myform textarea:focus {
  outline: unset;
  border: 1px solid var(--primary-600, #16325c);
}

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

.btn {
  background: var(--primary-600, #16325c);
  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: var(--primary-800, #081220);
}

/* 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: #16325c; */
  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[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--primary-100, #eaf0f7);
  color: var(--primary-600, #16325c);
}

.select2-container--default .select2-results__option--selected {
  background-color: var(--primary-100, #eaf0f7);
  color: var(--primary-600, #16325c);
}

.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 var(--border-default, #ebebeb);
  transition: 0.3s;
}

.userbox.active,
.userbox:hover {
  border: 1px solid var(--primary-600, #16325c);
}

.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: #16325c;
  border: 1px solid #16325c;
  color: white;
}

/* TAB DESIGN */

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

.mytab .tab-button.active {
  color: white;
  background: #16325c;
  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: var(--status-danger, #dc2626);
}

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

/* SELECT DROPDOWN */
.select2-container--default .select2-selection--single {
  background-color: var(--surface-input, #fff);
  border: 1px solid var(--border-default, #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 var(--border-default, #e6e6e6);
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 13px;
  outline: unset;
}

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

/* Select2 clear (x) button: sits at the right, beside the arrow, not after the text */
.select2-container--default .select2-selection--single .select2-selection__clear,
.select2-container--default .select2-selection--multiple .select2-selection__clear {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  margin: 0;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  color: #9ca3af;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover,
.select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
  background-color: var(--status-danger-bg, #fee2e2);
  color: var(--primary-600, #16325c);
}

/* Keep long selected text from running under the button */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-right: 48px;
}

.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.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: var(--primary-600, #16325c);
  background-color: var(--primary-600, #16325c);
}

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: var(--primary-600, #16325c);
  border-color: var(--primary-600, #16325c);
}

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: var(--primary-600, #16325c);
}

.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: var(--primary-600, #16325c);
}

.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: #050b14;
}
.bg-primary-800 {
  background-color: #081220;
}
.bg-primary-700 {
  background-color: #0e1e33;
}
.bg-primary-600 {
  background-color: #16325c;
}
.bg-primary-500 {
  background-color: #2a5e8c;
}
.bg-primary-400 {
  background-color: #b3c7df;
}
.bg-primary-300 {
  background-color: #c7d6e8;
}
.bg-primary-200 {
  background-color: #dde7f3;
}
.bg-primary-100 {
  background-color: #eaf0f7;
}
.bg-primary-50 {
  background-color: #f6f6f6;
}
.text-primary-600 {
  color: #16325c;
} */
.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;
}

/* Enterprise Readable Table System (DESIGN.md)
   Clean horizontal row dividers only — never 4-sided Excel cell boxes */
table.fixed-table:not(.table-fixed) {
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100%;
}

table.fixed-table.table-fixed {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.fixed-table th,
.fixed-table td {
  border: 0;
  border-bottom: 1px solid var(--border-subtle, #efefee);
  border-radius: 0;
}

.fixed-table thead th {
  background-color: var(--surface-subtle, #f2f2f1);
  color: var(--text-muted, #5e5e5c);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.3;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-default, #e4e4e2);
  white-space: nowrap;
  vertical-align: middle;
}

.fixed-table tbody td {
  padding: 0.625rem 0.875rem;
  min-height: 2.75rem;
  height: auto !important;
  color: var(--text-primary, #1c1c1c);
  font-size: 0.84375rem;
  line-height: 1.45;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  word-break: normal;
  overflow-wrap: break-word;
}

.fixed-table tbody tr:last-child td {
  border-bottom: 0;
}

.fixed-table tbody tr:hover td {
  background-color: var(--surface-hover, #f4f6f9);
}

.fixed-table thead th.stickyleft,
.fixed-table thead th.stickyleft-second,
.fixed-table thead th.stickyright {
  background-color: var(--surface-subtle, #f2f2f1);
}

.fixed-table tbody td.stickyleft,
.fixed-table tbody td.stickyleft-second,
.fixed-table tbody td.stickyright {
  background-color: var(--surface-card, #ffffff);
}

.fixed-table tbody tr:hover td.stickyleft,
.fixed-table tbody tr:hover td.stickyleft-second,
.fixed-table tbody tr:hover td.stickyright {
  background-color: var(--surface-hover, #f4f6f9);
}

@media (min-width: 768px) {
  .fixed-table .stickyright {
    border-left: 1px solid var(--border-subtle, #efefee);
    box-shadow: -4px 0 8px -4px rgba(14, 30, 51, 0.06);
  }
  .fixed-table .stickyleft {
    border-right: 1px solid var(--border-subtle, #efefee);
  }
}

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

.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;
}

/* ========================================
 *  Column configurator (list view toggle)
 *  Shared via generic/as_list.html
 * ====================================== */
.oh-sticky-table_dropdown:has(.oh-column-config) {
  width: 280px;
  min-width: 280px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  animation: oh-column-config-in 0.16s ease-out;
}

@keyframes oh-column-config-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.oh-column-config {
  display: flex;
  flex-direction: column;
  max-height: min(420px, calc(100vh - 120px));
  background: #fff;
  color: #333;
}

.oh-column-config__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.oh-column-config__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.oh-column-config__title {
  font-size: 13px;
  font-weight: 600;
  color: #1f1f1f;
  line-height: 1.2;
}

.oh-column-config__subtitle {
  font-size: 11px;
  color: #888;
  line-height: 1.3;
}

.oh-column-config__count {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #666;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.oh-column-config__search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 0;
  padding: 0 10px;
  height: 34px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.oh-column-config__search:focus-within {
  border-color: var(--primary-600, #16325c);
  background: var(--surface-input, #fff);
  box-shadow: 0 0 0 3px rgba(22, 50, 92, 0.12);
}

.oh-column-config__search ion-icon {
  flex-shrink: 0;
  font-size: 15px;
  color: #999;
}

.oh-column-config__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: #333;
  height: 100%;
}

.oh-column-config__search-input::placeholder {
  color: #aaa;
}

.oh-column-config__select-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 12px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f7f7;
  cursor: pointer;
  user-select: none;
}

.oh-column-config__select-all:hover {
  background: #f1f1f1;
}

.oh-column-config__select-all .oh-column-config__label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.oh-column-config__list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 6px 6px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.oh-column-config__item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}

.oh-column-config__item:hover {
  background: #f7f7f7;
}

.oh-column-config__item.is-filtered-out {
  display: none;
}

.oh-column-config__item.is-draggable {
  cursor: grab;
}

.oh-column-config__item.is-draggable.ui-sortable-helper {
  cursor: grabbing;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border: 1px solid #eee;
}

.oh-column-config__item.is-fixed .oh-column-config__handle {
  color: #c0c0c0;
  cursor: default;
}

.oh-column-config__item.is-fixed .oh-table__checkbox {
  opacity: 0.55;
  pointer-events: none;
}

.oh-column-config__item.is-fixed .toggle-column-checkbox {
  cursor: not-allowed;
}

.oh-column-config__handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #b0b0b0;
  border-radius: 6px;
  transition: color 0.12s ease, background 0.12s ease;
}

.oh-column-config__item.is-draggable:hover .oh-column-config__handle {
  color: #777;
  background: #ececec;
}

.oh-column-config__handle ion-icon {
  font-size: 16px;
  pointer-events: none;
}

.oh-column-config__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #444;
  line-height: 1.3;
}

.oh-column-config__item .oh-table__checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.oh-column-config__placeholder {
  height: 34px;
  margin: 0 2px;
  border-radius: 8px;
  border: 1px dashed var(--primary-600, #16325c);
  background: rgba(22, 50, 92, 0.06);
}

.oh-column-config__empty {
  display: none;
  margin: 0;
  padding: 18px 14px;
  text-align: center;
  font-size: 12px;
  color: #999;
}

.oh-column-config__empty.is-visible {
  display: block;
}

.oh-column-config__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  color: #999;
  font-size: 11px;
  line-height: 1.3;
}

.oh-column-config__footer ion-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.oh-sticky-dropdown_btn.is-column-config-trigger {
  color: #666;
}

.oh-sticky-dropdown_btn.is-column-config-trigger:hover,
.oh-sticky-dropdown_btn.is-column-config-trigger[aria-expanded="true"] {
  color: var(--primary-600, #16325c);
  border-color: var(--primary-500, #c7d6e8);
  background: var(--primary-100, #eaf0f7);
}

/* ====================================
*        Sticky Table
* Theme pages (extends "index.html" -> horilla_theme's override) don't
* load static/build/css/style.min.css, where the base .oh-sticky-table
* component normally lives — ported here so report/standard_report.html's
* KPI/drilldown tables render with the same sticky-header/sticky-first-
* column behavior used elsewhere in the app.
* ================================== */
.oh-table_sticky--wrapper {
  position: relative;
}

.oh-sticky-table {
  max-height: 75vh;
  overflow: auto;
  margin: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border-default, #e4e4e2);
  border-radius: var(--radius-lg, 0.75rem);
  background-color: var(--surface-card, #ffffff);
  box-shadow: var(--shadow-card);
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.oh-sticky-table--no-highlight .oh-sticky-table__tr:hover {
  background-color: transparent;
}

.oh-sticky-table--no-overflow {
  overflow-x: auto;
  overflow-y: visible;
}

.oh-sticky-table__table {
  display: table;
  position: relative;
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.oh-sticky-table__tr {
  display: table-row;
  transition: background-color 0.12s ease;
}
.oh-sticky-table__tr:hover {
  background-color: var(--surface-hover, #f4f6f9);
  cursor: pointer;
}

/* Clickable list rows (row_attrs with hx-get / onclick / data-toggle): show
   the pointer over the whole row, not only on its inner buttons. Covers the
   Tailwind <table> lists (generic/horilla_list_table.html, group rows, the
   pipeline/candidate tables) as well as the div-based sticky tables. */
tr[hx-get],
tr[hx-post],
tr[onclick],
tr[data-toggle],
tr[data-href],
tr[href],
tr[hx-get] > td,
tr[hx-post] > td,
tr[onclick] > td,
tr[data-toggle] > td,
tr[data-href] > td,
tr[href] > td {
  cursor: pointer;
}

.oh-sticky-table__td,
.oh-sticky-table__th,
.oh-sticky-table__sd {
  display: table-cell;
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle, #efefee);
  border-right: 0;
  vertical-align: middle;
  min-width: 140px;
  width: auto;
  word-break: normal;
  overflow-wrap: break-word;
  font-size: 0.84375rem;
  line-height: 1.45;
  color: var(--text-primary, #1c1c1c);
  font-variant-numeric: tabular-nums;
}

.oh-sticky-table__sd {
  background-color: var(--surface-card, #ffffff);
  z-index: 10 !important;
  min-width: 210px;
  max-width: 300px;
  font-weight: 500;
}

.oh-sticky-table__tr:hover .oh-sticky-table__sd,
.oh-sticky-table__tr:hover .oh-sticky-table__sr {
  background-color: var(--surface-hover, #f4f6f9);
}

.oh-sticky-table__th:first-child {
  z-index: 11 !important;
}

.oh-sticky-table__th {
  z-index: 10;
  background-color: var(--surface-subtle, #f2f2f1);
  color: var(--text-muted, #5e5e5c);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  white-space: nowrap;
  padding: 0.65rem 0.875rem !important;
}

.oh-sticky-table__thead {
  display: table-header-group;
  font-weight: 600;
  z-index: 1;
}

.oh-sticky-table__tbody {
  display: table-row-group;
}

.oh-sticky-table__th,
.oh-sticky-table__sd {
  position: sticky;
}

.oh-sticky-table__th {
  top: 0;
  border-bottom: 1px solid var(--border-default, #e4e4e2);
}

.oh-sticky-table__sd {
  left: 0;
  border-right: 1px solid var(--border-subtle, #efefee);
}

.oh-sticky-table--fit .oh-sticky-table__sd,
.oh-sticky-table--fit .oh-sticky-table__td,
.oh-sticky-table--fit .oh-sticky-table__th {
  padding: 0.65rem 0.875rem;
  width: fit-content;
}

.oh-sticky-table__thead div.oh-sticky-table__th:first-child,
.oh-sticky-table__tfoot div.oh-sticky-table__th:first-child {
  left: 0;
  z-index: 11;
  border-right: 1px solid var(--border-subtle, #efefee);
}

.oh-sticky-table__sr {
  position: sticky;
  right: 0;
  background-color: var(--surface-card, #ffffff);
  z-index: 9 !important;
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle, #efefee);
  border-left: 1px solid var(--border-subtle, #efefee);
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
}

.oh-sticky-table__th--sticky {
  right: 0;
  position: sticky;
  border-left: 1px solid var(--border-subtle, #efefee);
}

.oh-sticky-table__th--right {
  right: 0;
  border-left: 1px solid var(--border-subtle, #efefee);
}

@media (max-width: 767.98px) {
  .oh-sticky-table__sd,
  .oh-sticky-table__sr,
  .oh-sticky-table__th--sticky,
  .oh-sticky-table__thead div.oh-sticky-table__th:first-child,
  .oh-sticky-table__tfoot div.oh-sticky-table__th:first-child {
    position: static !important;
    left: auto !important;
    right: auto !important;
  }
}

.oh-sticky-table__button-container {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.oh-sticky-table__button-container > * {
  flex-shrink: 0;
}

.dark .oh-sticky-table {
  border-color: var(--border-default, #2a374d);
  background-color: var(--surface-card, #121a28);
}

.dark .oh-sticky-table__th {
  background: var(--surface-subtle, #1e2b3e);
  color: var(--text-muted, #94a3b8);
  border-color: var(--border-default, #2a374d);
}

.dark .oh-sticky-table__sd,
.dark .oh-sticky-table__sr {
  background: var(--surface-card, #121a28);
  color: var(--text-primary, #f1f5f9);
  border-color: var(--border-subtle, #1e293b);
}

.dark .oh-sticky-table__td {
  color: var(--text-primary, #f1f5f9);
  border-color: var(--border-subtle, #1e293b);
}

.dark .oh-sticky-table__tr:hover,
.dark .oh-sticky-table__tr:hover .oh-sticky-table__sd,
.dark .oh-sticky-table__tr:hover .oh-sticky-table__sr {
  background-color: var(--surface-hover, #223047);
}

/* Wide variant of the base .oh-modal__dialog (max-width: 700px, defined in
   v1_styles.css) — used by report/standard_report.html's drilldown modal,
   which needs room for a multi-column sticky table. */
.oh-modal__dialog--wide {
  max-width: min(1100px, 95vw);
}

/* .oh-card-dashboard's __header/__counts have their own spacing but the
   __body wrapper between them (report/standard_report.html's KPI cards)
   has never had a rule of its own. */
.oh-card-dashboard__body {
  margin-top: 6px;
}

/* Bare .oh-card (distinct from .oh-card-dashboard / .oh-card__*, which
   already have real rules) is used by report/explorer_picker.html and
   report/standard_report.html but was never actually defined anywhere the
   theme loads — those cards were rendering with zero border/shadow/padding.
   Tokens match the theme's own real card component
   (horilla_theme/templates/generic/horilla_card.html) for visual
   consistency with the Standard Reports catalog grid fixed earlier. */
.oh-card {
  background-color: var(--surface-card, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
}
.dark .oh-card {
  background-color: var(--surface-card, #131924);
  border-color: var(--border-default, #2a3548);
}

/* ========================================
 *  Enterprise Responsive & Component Primitives (M1.1 -> M1.2-M4)
 * ====================================== */

/* Drawer scroll lock (safe with body.overflow-hidden on index.html) */
body.oh-drawer-lock,
body.oh-sidebar-drawer-open {
  overflow: hidden !important;
}

/* Mobile Sidebar Backdrop & Drawer */
.oh-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.oh-sidebar-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.oh-mobile-nav-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-default, #e2e8f0);
  background-color: var(--surface-card, #ffffff);
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.oh-mobile-nav-btn:hover {
  background-color: var(--surface-subtle, #f1f5f9);
}

@media (max-width: 991.98px) {
  .oh-mobile-nav-btn {
    display: inline-flex;
  }

  #sidebar.oh-sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(272px, 85vw) !important;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 50;
    box-shadow: var(--shadow-modal);
    overflow-y: auto;
  }

  #sidebar.oh-sidebar-drawer.is-mobile-open,
  #sidebar.mobile-open {
    width: min(272px, 85vw) !important;
    transform: translateX(0) !important;
    z-index: 50 !important;
    box-shadow: var(--shadow-modal);
    overflow-y: auto;
  }

  #sidebar.oh-sidebar-drawer.is-mobile-open .oh-sidebar-label,
  #sidebar.mobile-open .oh-sidebar-label,
  #sidebar.oh-sidebar-drawer.is-mobile-open .sidebar-chevron,
  #sidebar.mobile-open .sidebar-chevron {
    opacity: 1 !important;
    pointer-events: auto !important;
    flex: 1 1 auto !important;
    width: auto !important;
    overflow: visible !important;
  }

  #sidebar.oh-sidebar-drawer.is-mobile-open .sideboxmain,
  #sidebar.mobile-open .sideboxmain {
    width: 100% !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding: 0.625rem 0.75rem !important;
    gap: 0.75rem !important;
    border-radius: 0.5rem !important;
  }

  #sidebar.oh-sidebar-drawer.is-mobile-open .sidebar-subnav:not(.hidden),
  #sidebar.mobile-open .sidebar-subnav:not(.hidden) {
    display: flex !important;
    flex-direction: column;
  }

  #sidebar.oh-sidebar-drawer ~ .oh-main-content {
    margin-left: 0 !important;
  }

  #sidebar.oh-sidebar-drawer ~ .oh-main-content .oh-main-header {
    left: 0 !important;
  }

  #sidebar.oh-sidebar-drawer ~ #floating-buttons .fab-container {
    left: 0 !important;
  }
}

/* Responsive Form & Card Grid Primitives */
.emp-grid-2,
.oh-form-grid--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.emp-grid-3,
.oh-form-grid--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.emp-grid-4,
.oh-form-grid--4,
.oh-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.emp-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.emp-photo-wrap {
  flex-shrink: 0;
}

@media (max-width: 1023.98px) {
  .emp-grid-3,
  .emp-grid-4,
  .oh-form-grid--3,
  .oh-form-grid--4,
  .oh-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .emp-layout {
    flex-direction: column;
  }

  .emp-photo-wrap {
    width: 100%;
    align-items: center;
  }
}

@media (max-width: 639.98px) {
  #view-container .emp-grid-2,
  #view-container .emp-grid-3,
  #view-container .emp-grid-4,
  .emp-grid-2,
  .emp-grid-3,
  .emp-grid-4,
  .oh-form-grid--2,
  .oh-form-grid--3,
  .oh-form-grid--4,
  .oh-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Responsive Toolbar */
.oh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Auth & Error Page Primitives */
.oh-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background-color: var(--surface-canvas, #f8fafc);
}

.oh-auth-card {
  box-sizing: border-box;
  width: min(440px, 100%);
  background-color: var(--surface-card, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-xl, 1rem);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.oh-error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background-color: var(--surface-canvas, #f8fafc);
  color: var(--text-primary, #0f172a);
}

.oh-error-card {
  box-sizing: border-box;
  width: min(520px, 100%);
  background-color: var(--surface-card, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-xl, 1rem);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 5vw, 2.75rem);
  text-align: center;
}

.oh-error-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--primary-600, #16325c);
  margin-bottom: 0.75rem;
}

/* Empty State (reusable across cards, tables, modals) */
.oh-empty__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-subtle, #f1f5f9);
  color: var(--text-muted, #64748b);
  margin-bottom: 0.75rem;
}

.oh-empty__actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Enterprise Semantic Badges */
.oh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.oh-badge--primary {
  background-color: var(--primary-100, #eaf0f7);
  color: var(--primary-700, #0e1e33);
  border-color: var(--primary-300, #c7d6e8);
}

.oh-badge--success {
  background-color: var(--status-success-bg, #f0fdf4);
  color: var(--status-success, #16a34a);
  border-color: var(--status-success-border, #bbf7d0);
}

.oh-badge--warning {
  background-color: var(--status-warning-bg, #fffbeb);
  color: var(--status-warning, #d97706);
  border-color: var(--status-warning-border, #fde68a);
}

.oh-badge--danger {
  background-color: var(--status-danger-bg, #fef2f2);
  color: var(--status-danger, #dc2626);
  border-color: var(--status-danger-border, #fecaca);
}

.oh-badge--info {
  background-color: var(--status-info-bg, #eff6ff);
  color: var(--status-info, #2563eb);
  border-color: var(--status-info-border, #bfdbfe);
}

.oh-badge--neutral {
  background-color: var(--surface-subtle, #f1f5f9);
  color: var(--text-secondary, #334155);
  border-color: var(--border-default, #e2e8f0);
}

/* Clean Button Modifiers */
.oh-btn--brand {
  background-color: var(--primary-600, #16325c);
  border: 1px solid var(--primary-600, #16325c);
  color: #ffffff;
}

.oh-btn--brand:hover,
.oh-btn--brand:focus-visible {
  background-color: var(--primary-700, #0e1e33);
  border-color: var(--primary-700, #0e1e33);
  color: #ffffff;
}

.oh-btn--outline {
  background-color: transparent;
  border: 1px solid var(--border-strong, #cbd5e1);
  color: var(--text-primary, #0f172a);
}

.oh-btn--outline:hover,
.oh-btn--outline:focus-visible {
  background-color: var(--surface-subtle, #f1f5f9);
  border-color: var(--border-strong, #cbd5e1);
}

.oh-btn--ghost {
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary, #334155);
}

.oh-btn--ghost:hover,
.oh-btn--ghost:focus-visible {
  background-color: var(--surface-subtle, #f1f5f9);
  color: var(--text-primary, #0f172a);
}

.oh-btn--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
}

.oh-btn--xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1rem;
}

/* ========================================
 *  DESIGN.md — CSS-First Brand Utilities, Readable Tables & Full Responsiveness
 * ====================================== */

/* Static CSS fallbacks for brand/primary utilities so buttons & links never
   render transparent even before or without Tailwind CDN runtime JS */
.bg-brand-600,
.bg-primary-600 {
  background-color: var(--primary-600, #16325c);
}

.hover\:bg-brand-700:hover,
.hover\:bg-primary-700:hover {
  background-color: var(--primary-700, #0e1e33);
}

.text-brand-600,
.text-primary-600 {
  color: var(--primary-600, #16325c);
}

.bg-primary-100 {
  background-color: var(--primary-100, #eaf0f7);
}

/* Auth Card Explicit Contrast Guarantees (Light & Dark) */
.oh-auth-shell {
  background:
    radial-gradient(900px circle at 50% -10%, rgba(22, 50, 92, 0.07), transparent 60%),
    var(--surface-canvas, #f7f7f6);
}

html.dark .oh-auth-shell,
body.dark .oh-auth-shell {
  background:
    radial-gradient(900px circle at 50% -10%, rgba(42, 94, 140, 0.18), transparent 60%),
    var(--surface-canvas, #0b111b);
}

.oh-auth-card {
  background-color: var(--surface-card, #ffffff);
  color: var(--text-primary, #1c1c1c);
  border: 1px solid var(--border-default, #e4e4e2);
  box-shadow: var(--shadow-modal);
}

html.dark .oh-auth-card,
body.dark .oh-auth-card {
  background-color: var(--surface-card, #121a28);
  color: var(--text-primary, #f1f5f9);
  border-color: var(--border-default, #2a374d);
}

.oh-auth-card h1,
.oh-auth-title {
  font-family: var(--font-display);
  color: var(--text-primary, #1c1c1c);
  letter-spacing: -0.02em;
}

html.dark .oh-auth-card h1,
body.dark .oh-auth-card h1,
html.dark .oh-auth-title,
body.dark .oh-auth-title {
  color: var(--text-primary, #f1f5f9);
}

.oh-auth-card label,
.oh-auth-label {
  color: var(--text-secondary, #444442);
  font-weight: 600;
}

html.dark .oh-auth-card label,
body.dark .oh-auth-card label,
html.dark .oh-auth-label,
body.dark .oh-auth-label {
  color: var(--text-secondary, #cbd5e1);
}

.oh-btn--auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md, 0.5rem);
  border: 1px solid var(--primary-600, #16325c);
  background-color: var(--primary-600, #16325c) !important;
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(22, 50, 92, 0.35);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.oh-btn--auth:hover,
.oh-btn--auth:focus-visible {
  background-color: var(--primary-700, #0e1e33) !important;
  border-color: var(--primary-700, #0e1e33);
  color: #ffffff !important;
}

.oh-btn--auth:active {
  background-color: var(--primary-800, #081220) !important;
  transform: scale(0.99);
}

/* Readable Enterprise Table Cells (No Blind 80px Truncation) */
.hlv-table-card {
  background-color: var(--surface-card, #ffffff);
  border: 1px solid var(--border-default, #e4e4e2);
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

html.dark .hlv-table-card,
body.dark .hlv-table-card {
  background-color: var(--surface-card, #121a28);
  border-color: var(--border-default, #2a374d);
}

.oh-cell-text {
  min-width: 135px;
  max-width: 360px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.45;
  color: var(--text-primary, #1c1c1c);
}

html.dark .oh-cell-text,
body.dark .oh-cell-text {
  color: var(--text-primary, #f1f5f9);
}

/* In synced colgroup leaf tables, expand gently within allocated col width */
table.table-fixed .oh-cell-text {
  min-width: 0;
  max-width: 100%;
}

.oh-cell-identity {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 200px;
  max-width: 320px;
}

table.table-fixed .oh-cell-identity {
  min-width: 0;
  max-width: 100%;
}

.oh-cell-identity__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--text-primary, #1c1c1c);
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

html.dark .oh-cell-identity__name,
body.dark .oh-cell-identity__name {
  color: var(--text-primary, #f1f5f9);
}

/* Crisp Table Action Icon Buttons */
.action-col-cell a,
.action-col-cell button,
.option-col-cell a,
.option-col-cell button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.875rem;
  min-height: 1.875rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* Neutral Toolbar & Filter Chrome (Replaces Noisy Colored Borders) */
.navFilterForm input[name="search"],
.navFilterForm .nav-view-btn,
.navFilterForm .dropdown-toggle,
.navFilterForm #modernFilterTrigger,
.oh-actions-dropdown > .dropdown-toggle,
.hlv-pagination {
  border-color: var(--border-default, #e4e4e2) !important;
  border-radius: var(--radius-md, 0.5rem);
}

.navFilterForm input[name="search"]:focus {
  border-color: var(--primary-600, #16325c) !important;
  box-shadow: 0 0 0 3px rgba(22, 50, 92, 0.12);
}

.navFilterForm .nav-view-btn.oh-view-btn--active {
  background-color: var(--primary-100, #eaf0f7) !important;
  border-color: var(--primary-300, #c7d6e8) !important;
  color: var(--primary-700, #0e1e33) !important;
  font-weight: 600;
}

html.dark .navFilterForm .nav-view-btn.oh-view-btn--active,
body.dark .navFilterForm .nav-view-btn.oh-view-btn--active {
  background-color: rgba(42, 94, 140, 0.28) !important;
  border-color: rgba(143, 174, 207, 0.45) !important;
  color: #f1f5f9 !important;
}

/* Global HTMX Loading Shimmer for Tables & Panels */
@keyframes oh-shimmer-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

/* Horizontal Scrollable Tabs Across All Modules (Zero Mobile Overflow) */
.oh-tabs__tablist,
.oh-general__tab {
  display: flex;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  gap: 0.25rem;
}

.oh-tabs__tablist::-webkit-scrollbar,
.oh-general__tab::-webkit-scrollbar {
  display: none;
}

.oh-tabs__tab,
.oh-general__tab-link {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Responsive Modals, Titlebars & Workspace Clamping (< 768px & < 640px) */
.oh-modal__dialog {
  width: min(680px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border-radius: var(--radius-xl, 1rem);
  box-shadow: var(--shadow-modal);
}

.oh-modal__dialog--wide {
  width: min(1100px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
}

.oh-main__titlebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 767.98px) {
  #ohMainContent {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
  }

  .oh-main__titlebar,
  .oh-main__titlebar-left,
  .oh-main__titlebar-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .oh-main__titlebar-search-input {
    width: 100% !important;
    max-width: 100% !important;
  }

  .navFilterForm {
    width: 100%;
  }

  .oh-filter-dropdown.dropdown-content {
    position: fixed !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    top: 4.5rem !important;
    width: auto !important;
    max-width: calc(100vw - 1.5rem) !important;
    max-height: calc(100dvh - 5.5rem) !important;
    overflow-y: auto !important;
  }

  .select2-container {
    max-width: 100% !important;
  }
}

/* Soft-tinted inline table row destructive buttons (Archive / Delete)
   Replaces heavy solid-red blocks on every row with Linear/Stripe subtle danger pills */
.action-col-cell .oh-btn--danger,
.action-col-cell .oh-btn--danger-outline,
.action-col-cell [class*="bg-red-"],
.action-col-cell [class*="bg-danger"],
.action-col-cell [class*="bg-[#d71d00]"],
.action-col-cell [class*="bg-[#dc2626]"],
.oh-sticky-table__button-container .oh-btn--danger,
.oh-sticky-table__button-container .oh-btn--danger-outline {
  background-color: var(--status-danger-bg, #f7e4e0) !important;
  color: var(--status-danger, #8e2e22) !important;
  border: 1px solid var(--status-danger-border, #e8bdb4) !important;
}

.action-col-cell .oh-btn--danger:hover,
.action-col-cell .oh-btn--danger-outline:hover,
.action-col-cell [class*="bg-red-"]:hover,
.action-col-cell [class*="bg-danger"]:hover,
.action-col-cell [class*="bg-[#d71d00]"]:hover,
.action-col-cell [class*="bg-[#dc2626]"]:hover,
.oh-sticky-table__button-container .oh-btn--danger:hover,
.oh-sticky-table__button-container .oh-btn--danger-outline:hover {
  background-color: var(--status-danger, #8e2e22) !important;
  color: #ffffff !important;
  border-color: var(--status-danger, #8e2e22) !important;
}

html.dark .action-col-cell .oh-btn--danger,
body.dark .action-col-cell .oh-btn--danger,
html.dark .action-col-cell .oh-btn--danger-outline,
body.dark .action-col-cell .oh-btn--danger-outline,
html.dark .action-col-cell [class*="bg-red-"],
body.dark .action-col-cell [class*="bg-red-"],
html.dark .action-col-cell [class*="bg-danger"],
body.dark .action-col-cell [class*="bg-danger"],
html.dark .action-col-cell [class*="bg-[#d71d00]"],
body.dark .action-col-cell [class*="bg-[#d71d00]"] {
  background-color: rgba(142, 46, 34, 0.22) !important;
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
}

html.dark .action-col-cell .oh-btn--danger:hover,
body.dark .action-col-cell .oh-btn--danger:hover,
html.dark .action-col-cell [class*="bg-red-"]:hover,
body.dark .action-col-cell [class*="bg-red-"]:hover,
html.dark .action-col-cell [class*="bg-danger"]:hover,
body.dark .action-col-cell [class*="bg-danger"]:hover {
  background-color: #b91c1c !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}
