@font-face {
  font-family: 'Gulzar';
  src: url('../font/Gulzar-Regular.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gulzar';
  src: url('../font/Gulzar-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gulzar';
  src: url('../font/Gulzar-Regular.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gulzar';
  src: url('../font/Gulzar-Regular.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-size: 0.95rem;
}

.brand-link .brand-text {
  font-weight: 600 !important;
}

.table td, .table th {
  vertical-align: middle;
}

.perm-th-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  font-weight: 600;
}

.perm-th-label input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 1rem;
  height: 1rem;
}

.perm-check {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.role-permissions-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.role-permissions-header .select2-container {
  width: 50% !important;
  max-width: 50%;
}

table.dataTable tr.dtrg-group td {
  background-color: #343a40 !important;
  color: #fff;
  font-weight: 600;
  vertical-align: middle;
}

table.dataTable tr.dtrg-group td.perm-parent-title {
  cursor: pointer;
  white-space: nowrap;
}

table.dataTable tr.dtrg-group.collapsed .perm-caret {
  transform: rotate(-90deg);
}

html[dir="rtl"] table.dataTable tr.dtrg-group.collapsed .perm-caret {
  transform: rotate(90deg);
}

.perm-caret {
  display: inline-block;
  width: 1rem;
  transition: transform 0.15s ease;
}

.perm-child-page {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1.85rem;
}

html[dir="rtl"] .perm-child-page {
  padding-left: 0;
  padding-right: 1.85rem;
}

.perm-child-page .perm-child-dot {
  font-size: 0.45rem;
  opacity: 0.65;
}

.leave-required::after,
.form-group:has(> [data-val-required]:not([type="hidden"]):not([type="checkbox"]):not([readonly])) > label:not(.form-check-label):not(.custom-control-label)::after {
  content: " *";
  color: #dc3545;
}

.dt-buttons {
  margin-bottom: 0.75rem;
}

.dt-buttons .btn {
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.dt-buttons .btn.btn-secondary {
  background-color: #fff;
  color: inherit;
}

.dt-buttons .btn-outline-info {
  color: #17a2b8;
  background-color: #fff;
  border-color: #17a2b8;
}

.dt-buttons .btn-outline-info:hover {
  color: #fff;
  background-color: #17a2b8;
  border-color: #17a2b8;
}

.dt-buttons .btn-outline-success {
  color: #28a745;
  background-color: #fff;
  border-color: #28a745;
}

.dt-buttons .btn-outline-success:hover {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.dt-buttons .btn-outline-danger {
  color: #dc3545;
  background-color: #fff;
  border-color: #dc3545;
}

.dt-buttons .btn-outline-danger:hover {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

div.dataTables_wrapper div.dataTables_filter {
  text-align: right;
}

div.dataTables_wrapper div.dataTables_filter input {
  margin-left: 0.5rem;
}

.card-body.datatable-body {
  padding: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

div.dataTables_wrapper {
  width: 100%;
}

div.dataTables_wrapper div.dataTables_scroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

div.dataTables_wrapper table.dataTable {
  width: 100% !important;
  margin: 0;
}

div.dataTables_wrapper table.dataTable th,
div.dataTables_wrapper table.dataTable td {
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .card-body.datatable-body {
    padding: 0.75rem;
  }

  div.dataTables_wrapper div.dataTables_filter {
    text-align: left;
    float: none;
    margin-top: 0.5rem;
  }

  div.dataTables_wrapper div.dataTables_filter input {
    width: 100%;
    margin-left: 0;
    display: block;
  }

  div.dataTables_wrapper div.dataTables_info,
  div.dataTables_wrapper div.dataTables_paginate {
    text-align: left;
    float: none;
    margin-top: 0.5rem;
  }

  div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

html[dir="rtl"],
html[dir="rtl"] body,
html[dir="rtl"] body.layout-rtl,
html[dir="rtl"] .wrapper,
html[dir="rtl"] .content-wrapper,
html[dir="rtl"] .main-header,
html[dir="rtl"] .main-sidebar,
html[dir="rtl"] .main-footer,
html[dir="rtl"] .navbar,
html[dir="rtl"] .nav-sidebar,
html[dir="rtl"] .card,
html[dir="rtl"] .form-control,
html[dir="rtl"] .btn,
html[dir="rtl"] .table,
html[dir="rtl"] .login-box,
html[dir="rtl"] .login-page {
  font-family: 'Gulzar', 'Segoe UI', Tahoma, sans-serif !important;
}

.login-demo-link {
  color: #0f4c81;
  font-weight: 600;
}
.login-demo-link i { margin-inline-end: 4px; }

html[dir="rtl"] .fas,
html[dir="rtl"] .far,
html[dir="rtl"] .fal {
  font-family: "Font Awesome 5 Free" !important;
}

html[dir="rtl"] .fab {
  font-family: "Font Awesome 5 Brands" !important;
}

html[dir="rtl"],
body.layout-rtl {
  direction: rtl;
  text-align: right;
  line-height: 1.7;
}

html[dir="rtl"] body.layout-rtl .main-sidebar,
html[dir="rtl"] body.layout-rtl.layout-fixed .main-sidebar {
  left: auto !important;
  right: 0 !important;
}

html[dir="rtl"] body.layout-rtl .content-wrapper,
html[dir="rtl"] body.layout-rtl .main-footer,
html[dir="rtl"] body.layout-rtl .main-header,
html[dir="rtl"] body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav).layout-rtl .content-wrapper,
html[dir="rtl"] body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav).layout-rtl .main-footer,
html[dir="rtl"] body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav).layout-rtl .main-header {
  margin-left: 0 !important;
  margin-right: 250px !important;
}

html[dir="rtl"] body.layout-rtl.sidebar-mini.sidebar-collapse .content-wrapper,
html[dir="rtl"] body.layout-rtl.sidebar-mini.sidebar-collapse .main-footer,
html[dir="rtl"] body.layout-rtl.sidebar-mini.sidebar-collapse .main-header {
  margin-left: 0 !important;
  margin-right: 4.6rem !important;
}

html[dir="rtl"] body.layout-rtl .main-header .navbar-nav.ml-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html[dir="rtl"] body.layout-rtl .brand-text.ml-3 {
  margin-left: 0 !important;
  margin-right: 1rem !important;
}

html[dir="rtl"] body.layout-rtl .nav-sidebar .nav-link p {
  display: inline;
  margin-right: 0.35rem;
}

html[dir="rtl"] body.layout-rtl .nav-sidebar .nav-icon {
  margin-right: 0;
  margin-left: 0.2rem;
}

.nav-sidebar .nav-treeview {
  padding-left: 0.75rem;
}

.nav-sidebar .nav-treeview .nav-icon {
  font-size: 0.8rem;
}

html[dir="rtl"] body.layout-rtl .nav-sidebar .nav-treeview {
  padding-left: 0;
  padding-right: 0.75rem;
}

html[dir="rtl"] body.layout-rtl .nav-sidebar .nav-link > p > .right {
  right: auto;
  left: 1rem;
}

html[dir="rtl"] body.layout-rtl .dt-buttons .btn {
  margin-right: 0;
  margin-left: 0.35rem;
}

html[dir="rtl"] div.dataTables_wrapper div.dataTables_filter {
  text-align: left;
}

html[dir="rtl"] div.dataTables_wrapper div.dataTables_filter input {
  margin-left: 0;
  margin-right: 0.5rem;
}

html[dir="rtl"] .card-header > .card-title {
  float: right;
}

html[dir="rtl"] .login-box .input-group {
  flex-direction: row-reverse;
}

html[dir="rtl"] .login-box .input-group > .form-control {
  border-radius: 0 0.25rem 0.25rem 0;
}

html[dir="rtl"] .login-box .input-group-append .input-group-text {
  border-left: 1px solid #ced4da;
  border-right: 0;
  border-radius: 0.25rem 0 0 0.25rem;
}

@media (max-width: 991.98px) {
  html[dir="rtl"] body.layout-rtl .content-wrapper,
  html[dir="rtl"] body.layout-rtl .main-footer,
  html[dir="rtl"] body.layout-rtl .main-header {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html[dir="rtl"] body.layout-rtl .main-sidebar,
  html[dir="rtl"] body.layout-rtl .main-sidebar::before {
    margin-left: 0 !important;
    margin-right: -250px;
  }

  html[dir="rtl"] body.layout-rtl.sidebar-open .main-sidebar,
  html[dir="rtl"] body.layout-rtl.sidebar-open .main-sidebar::before {
    margin-right: 0;
  }
}

@media (max-width: 767.98px) {
  html[dir="rtl"] div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
  }

  html[dir="rtl"] div.dataTables_wrapper div.dataTables_info,
  html[dir="rtl"] div.dataTables_wrapper div.dataTables_paginate {
    text-align: right;
  }
}


/* Role badge colors */
.badge-role {
  color: #fff !important;
  font-weight: 600;
  padding: 0.4em 0.65em;
  border-radius: 0.25rem;
}

.badge-role-worker {
  background-color: #17a2b8 !important; /* teal — Worker */
}

.badge-role-supervisor {
  background-color: #007bff !important; /* blue — Supervisor */
}

.badge-role-admin {
  background-color: #dc3545 !important; /* red — Admin */
}

.badge-role-other {
  background-color: #6c757d !important;
}

/* Status badge colors */
.badge-status-active {
  background-color: #28a745 !important;
  color: #fff !important;
}

.badge-status-pending {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.badge-status-rejected {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.badge-status-inactive {
  background-color: #6c757d !important;
  color: #fff !important;
}

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

.select2-container--bootstrap4 .select2-selection {
  min-height: calc(1.5em + 0.75rem + 2px);
}

.select2-container--bootstrap4 .select2-selection--multiple {
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 3px 28px 3px 4px;
  border: 1px solid #6c757d;
  border-radius: 0.25rem;
  background-color: #fff;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--multiple,
.select2-container--bootstrap4.select2-container--open .select2-selection--multiple {
  border-color: #495057;
  box-shadow: none;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
  display: inline-flex;
  align-items: center;
  float: none;
  margin: 3px 4px 3px 0;
  padding: 2px 8px 2px 6px;
  background-color: #e9ecef;
  border: 1px solid #adb5bd;
  border-radius: 0.25rem;
  color: #212529;
  font-weight: 700;
  line-height: 1.4;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
  float: none;
  position: static;
  order: -1;
  margin-right: 6px;
  margin-left: 0;
  padding: 0;
  color: #6c757d;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: #343a40;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
  float: none;
  position: absolute;
  top: 50%;
  right: 8px;
  margin: 0;
  transform: translateY(-50%);
  font-size: 1.15rem;
  font-weight: 700;
  color: #6c757d;
  line-height: 1;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-search--inline .select2-search__field {
  margin-top: 4px;
  height: 22px;
}

.select2-dropdown.select2-multi-check {
  border: 1px solid #6c757d;
  border-top: 1px solid #dee2e6;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.select2-dropdown.select2-multi-check .select2-results__options {
  max-height: 220px;
}

.select2-dropdown.select2-multi-check .select2-results__option {
  padding: 0;
  font-weight: 700;
  color: #212529;
  background: #fff;
}

.select2-dropdown.select2-multi-check .select2-results__option[aria-selected="true"] {
  background: #e9ecef;
  color: #212529;
}

.select2-dropdown.select2-multi-check .select2-results__option--highlighted,
.select2-dropdown.select2-multi-check .select2-results__option--highlighted[aria-selected="true"] {
  background: #007bff !important;
  color: #fff !important;
}

.select2-check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.85rem;
}

.select2-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid #adb5bd;
  border-radius: 3px;
  background: #fff;
  position: relative;
}

.select2-dropdown.select2-multi-check .select2-results__option[aria-selected="true"] .select2-check {
  background: #f5a623;
  border-color: #f5a623;
}

.select2-dropdown.select2-multi-check .select2-results__option[aria-selected="true"] .select2-check::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.select2-dropdown.select2-multi-check .select2-results__option--highlighted .select2-check {
  border-color: #fff;
}

.select2-dropdown.select2-multi-check .select2-results__option--highlighted[aria-selected="true"] .select2-check {
  background: #f5a623;
  border-color: #f5a623;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple {
  padding: 3px 4px 3px 28px;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
  margin: 3px 0 3px 4px;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
  margin-right: 0;
  margin-left: 6px;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
  right: auto;
  left: 8px;
}

.form-inline .select2-container {
  margin-right: 0.5rem;
  margin-bottom: 0.35rem;
}

html[dir="rtl"] .form-inline .select2-container {
  margin-right: 0;
  margin-left: 0.5rem;
}

html[dir="rtl"] .select2-container--bootstrap4 .select2-selection,
html[dir="rtl"] .select2-container--bootstrap4 .select2-search--dropdown .select2-search__field,
html[dir="rtl"] .select2-container--bootstrap4 .select2-results__option {
  font-family: 'Gulzar', 'Segoe UI', Tahoma, sans-serif !important;
}

.org-chart-card,
.org-chart-card > .card-body {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.org-chart {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.5rem 0.75rem 2.25rem;
  -webkit-overflow-scrolling: touch;
}

.org-chart-canvas {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2rem;
  width: max-content;
  min-width: 100%;
  direction: ltr;
}

.org-tree {
  display: flex;
  justify-content: center;
  width: max-content;
  margin: 0 auto;
}

.org-tree,
.org-tree ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.org-tree ul {
  padding-top: 24px;
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  width: max-content;
  margin: 0 auto;
}

.org-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  text-align: center;
  position: relative;
  padding: 24px 10px 0;
}

.org-tree li::before,
.org-tree li::after {
  content: "";
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #c5d4d3;
  width: 50%;
  height: 24px;
}

.org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #c5d4d3;
}

.org-tree li:only-child {
  padding-top: 0;
}

.org-tree li:only-child::before,
.org-tree li:only-child::after {
  display: none;
}

.org-tree li:first-child::before,
.org-tree li:last-child::after {
  border: 0 none;
}

.org-tree li:last-child::before {
  border-right: 2px solid #c5d4d3;
  border-radius: 0 6px 0 0;
}

.org-tree li:first-child::after {
  border-radius: 6px 0 0 0;
}

.org-tree ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #c5d4d3;
  width: 0;
  height: 24px;
}

.org-tree li.org-collapsed::before,
.org-tree li.org-collapsed::after {
  display: none;
}

.org-tree li.org-collapsed {
  padding-top: 0;
}

.org-tree li.org-collapsed > ul {
  display: none;
}

.org-node {
  display: inline-block;
  min-width: 180px;
  max-width: 240px;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  text-align: center;
  position: relative;
  vertical-align: top;
}

.org-node strong,
.org-node small {
  display: block;
}

.org-node strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.org-node small {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  opacity: 0.9;
}

.org-node .org-eff {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 1;
  line-height: 1.3;
}

.org-node-admin .org-eff,
.org-node-supervisor .org-eff {
  color: #fff;
}

.org-node-admin,
.org-node-supervisor {
  background: #0f766e;
  border: 2px solid #0f766e;
  color: #fff;
}

.org-node-worker {
  background: #fff;
  border: 2px solid #0f766e;
  color: #1f2933;
}

.org-node-worker small {
  color: #5b6b73;
  opacity: 1;
}

.org-node-unassigned {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  color: #334155;
}

.org-node-unassigned small {
  color: #64748b;
  opacity: 1;
}

.org-toggle {
  position: absolute;
  left: 50%;
  bottom: -11px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #0f766e;
  border-radius: 50%;
  background: #fff;
  color: #0f766e;
  font-size: 11px;
  line-height: 18px;
  cursor: pointer;
  z-index: 2;
}

.org-toggle:hover {
  background: #0f766e;
  color: #fff;
}

.org-unassigned {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.company-organogram {
  border: 1px solid #d9e7e5;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #fff;
}

.company-organogram-child {
  margin-left: 2rem;
  border-left: 4px solid #0f766e;
}

.company-organogram-title {
  color: #0f766e;
  font-weight: 600;
  border-bottom: 1px solid #e6f4f3;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

@media print {
  .main-sidebar,
  .main-header,
  .main-footer,
  .leave-page-actions,
  .leave-breadcrumb,
  .org-unassigned,
  .org-toggle {
    display: none !important;
  }

  .content-wrapper,
  .org-module {
    margin: 0 !important;
  }

  .org-chart {
    overflow: visible;
  }

  .org-chart-canvas {
    min-width: 0;
    width: auto;
  }
}

.leave-breadcrumb {
  background: transparent;
  padding: 0;
  font-size: 0.85rem;
}

.leave-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
}

.leave-page-actions .btn {
  margin-left: 0.35rem;
  margin-bottom: 0.25rem;
}

.leave-module .leave-balance-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.leave-module .leave-card-filters,
.payroll-module .leave-card-filters,
.org-module .leave-card-filters,
.leave-card-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
}

.leave-module .leave-balance-filters > .select2-container,
.leave-module .leave-balance-filters > select,
.leave-module .leave-card-filters > .select2-container,
.leave-module .leave-card-filters > select,
.payroll-module .leave-card-filters > .select2-container,
.payroll-module .leave-card-filters > select,
.org-module .leave-card-filters > .select2-container,
.org-module .leave-card-filters > select {
  flex: 0 0 40%;
  max-width: 40%;
  width: 40% !important;
}

.leave-module .leave-card-filters,
.payroll-module .leave-card-filters,
.org-module .leave-card-filters {
  flex-wrap: nowrap;
}

.org-summary-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.org-summary-section-header > .card-title {
  float: none;
  margin: 0;
}

.org-summary-section-filter {
  flex: 1 1 240px;
  max-width: 360px;
  margin-left: auto;
}

.org-summary-section-filter .select2-container,
.org-summary-section-filter > select {
  width: 100% !important;
}

html[dir="rtl"] .org-summary-section-filter {
  margin-left: 0;
  margin-right: auto;
}

.leave-module .leave-card-filter-actions,
.org-module .leave-card-filter-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.leave-module .leave-card-filter-actions .btn,
.org-module .leave-card-filter-actions .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.leave-card-filters-half {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
}

.leave-card-filters > .select2-container,
.leave-card-filters > select,
.leave-card-filters-half > .select2-container,
.leave-card-filters-half > select,
.org-module .leave-card-filters-half > .select2-container,
.org-module .leave-card-filters-half > select {
  flex: 0 0 50%;
  max-width: 50%;
  width: 50% !important;
}

.leave-card-filters .leave-card-filter-actions,
.leave-card-filters-half .leave-card-filter-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.leave-card-filters .leave-card-filter-actions .btn,
.leave-card-filters-half .leave-card-filter-actions .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.leave-module .card:has(#approvalsTable) > .card-footer,
#bulkApproveForm > .card > .card-footer {
  display: none;
}

.leave-page-actions form.d-inline-flex {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  gap: 0.75rem;
}

.leave-page-actions form.d-inline-flex > .select2-container,
.leave-page-actions form.d-inline-flex > select {
  flex: 0 0 40%;
  max-width: 40%;
  width: 40% !important;
}

.leave-module .card:has(.leave-total-row) > .card-footer {
  display: none;
}

html[dir="rtl"] .leave-page-actions {
  text-align: left !important;
}

html[dir="rtl"] .leave-module .leave-back .fa-arrow-left {
  transform: scaleX(-1);
}

.leave-module {
  --leave-maroon: #7e1b32;
  --leave-maroon-hover: #651526;
  --leave-pink: #fdeaea;
  --leave-pink-border: #f3c5cd;
}

.leave-module .btn-primary {
  background-color: var(--leave-maroon);
  border-color: var(--leave-maroon);
}

.leave-module .btn-primary:hover,
.leave-module .btn-primary:focus {
  background-color: var(--leave-maroon-hover);
  border-color: var(--leave-maroon-hover);
}

.leave-module .card {
  box-shadow: none;
  border: 1px solid #e9ecef;
}

.leave-module .table thead th {
  background: #f8f4f5;
  color: #343a40;
  font-weight: 600;
  border-bottom: 1px solid #e5d0d4;
  white-space: nowrap;
}

.leave-module .table tbody tr:nth-child(even) {
  background: #faf7f8;
}

.leave-module .table tfoot tr,
.leave-module .leave-total-row {
  background: var(--leave-pink);
  font-weight: 600;
}

.leave-module .leave-info-banner {
  background: var(--leave-pink);
  color: var(--leave-maroon);
  border: 1px solid var(--leave-pink-border);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin: 0;
}

.leave-module form[action*="RequestCreate"] .leave-info-banner,
.leave-module form[action*="RequestEdit"] .leave-info-banner,
.leave-module form[action*="Decide"] .leave-info-banner {
  display: none;
}

.leave-module .leave-back {
  color: var(--leave-maroon);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.leave-module .leave-back:hover {
  color: var(--leave-maroon-hover);
}

.leave-module .leave-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.leave-module .leave-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
}

.leave-module .leave-meta span {
  color: #6c757d;
  margin-right: 0.35rem;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  border: 1px solid;
  background: #fff;
  margin: 0 0.15rem 0.15rem 0;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.btn-icon-approve {
  color: #28a745;
  border-color: #28a745;
}

.btn-icon-approve:hover {
  background: #28a745;
  color: #fff;
}

.btn-icon-reject {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-icon-reject:hover {
  background: #dc3545;
  color: #fff;
}

.btn-icon-view {
  color: #6c757d;
  border-color: #ced4da;
}

.btn-icon-view:hover {
  background: #6c757d;
  color: #fff;
}

.btn-icon-edit {
  color: #007bff;
  border-color: #007bff;
}

.btn-icon-edit:hover {
  background: #007bff;
  color: #fff;
}

.btn-icon-delete {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-icon-delete:hover {
  background: #dc3545;
  color: #fff;
}

.btn-icon-assign {
  color: #28a745;
  border-color: #28a745;
}

.btn-icon-assign:hover {
  background: #28a745;
  color: #fff;
}

.leave-toggle-form {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 0 0 0.15rem;
}

.leave-toggle-form .custom-control {
  min-height: 1.5rem;
  padding-left: 2.5rem;
  margin: 0;
}

.leave-toggle-form .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--leave-maroon, #7e1b32);
  border-color: var(--leave-maroon, #7e1b32);
}

.leave-entitlements-title {
  color: var(--leave-maroon);
  font-weight: 600;
  margin: 0.5rem 0 0.75rem;
}

.leave-entitlements-table thead th {
  background: var(--leave-pink) !important;
  color: var(--leave-maroon);
  border-bottom-color: var(--leave-pink-border);
}

html[dir="rtl"] .leave-toggle-form .custom-control {
  padding-left: 0;
  padding-right: 2.5rem;
}

.leave-badge {
  display: inline-block;
  min-width: 78px;
  padding: 0.35em 0.7em;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0.25rem;
}

.leave-badge-pending {
  background: #fff3cd;
  color: #856404;
}

.leave-badge-approved,
.leave-badge-active {
  background: #d4edda;
  color: #155724;
}

.leave-badge-rejected,
.leave-badge-inactive {
  background: #f8d7da;
  color: #721c24;
}

.leave-badge-cancelled {
  background: #e9ecef;
  color: #495057;
}

.leave-detail-list {
  margin: 0;
}

.leave-detail-list dt {
  font-weight: 600;
  color: #6c757d;
  margin-top: 0.85rem;
}

.leave-detail-list dd {
  margin-bottom: 0;
}

.detail-table,
.leave-detail-table {
  margin: 0;
  background: #fff;
}

.detail-table th,
.detail-table td,
.leave-detail-table th,
.leave-detail-table td {
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  vertical-align: middle;
}

.detail-table tbody tr:first-child th,
.detail-table tbody tr:first-child td,
.leave-detail-table tbody tr:first-child th,
.leave-detail-table tbody tr:first-child td {
  border-top: 0;
}

.detail-table th,
.leave-detail-table th {
  width: 32%;
  font-weight: 400;
  color: #888;
  background: #fff;
  white-space: nowrap;
}

.detail-table td,
.leave-detail-table td {
  color: #333;
  font-weight: 700;
}

.leave-module .table.detail-table tbody tr,
.leave-module .table.leave-detail-table tbody tr,
.org-module .table.detail-table tbody tr,
.org-module .table.leave-detail-table tbody tr,
.payroll-module .table.detail-table tbody tr,
.payroll-module .table.leave-detail-table tbody tr,
.detail-table tbody tr,
.leave-detail-table tbody tr {
  background: #fff;
}

.detail-table .leave-badge,
.leave-detail-table .leave-badge {
  background: transparent !important;
  padding: 0;
  min-width: 0;
  font-size: inherit;
  font-weight: 700;
  text-align: inherit;
  border-radius: 0;
}

.detail-table .leave-badge-pending,
.leave-detail-table .leave-badge-pending {
  color: #e6a23c;
}

.detail-table .leave-badge-approved,
.detail-table .leave-badge-active,
.leave-detail-table .leave-badge-approved,
.leave-detail-table .leave-badge-active {
  color: #28a745;
}

.detail-table .leave-badge-rejected,
.detail-table .leave-badge-inactive,
.leave-detail-table .leave-badge-rejected,
.leave-detail-table .leave-badge-inactive {
  color: #dc3545;
}

.detail-table .leave-badge-cancelled,
.leave-detail-table .leave-badge-cancelled {
  color: #6c757d;
}

.detail-status-pending { color: #e6a23c; }
.detail-status-active { color: #28a745; }
.detail-status-rejected { color: #dc3545; }
.detail-status-muted { color: #6c757d; }

.detail-table ul,
.leave-detail-table ul {
  margin: 0;
  padding-left: 1.15rem;
}

html[dir="rtl"] .detail-table ul,
html[dir="rtl"] .leave-detail-table ul {
  padding-left: 0;
  padding-right: 1.15rem;
}

.leave-module .btn-approve {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
}

.leave-module .btn-reject {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.leave-module .card-footer {
  background: #fff;
  border-top: 1px solid #e9ecef;
}

.org-module {
  --org-teal: #0f766e;
  --org-teal-hover: #115e59;
  --org-mint: #e6f4f3;
  --org-mint-border: #b7e0dc;
}

.org-module .btn-primary {
  background-color: var(--org-teal);
  border-color: var(--org-teal);
}

.org-module .btn-primary:hover,
.org-module .btn-primary:focus {
  background-color: var(--org-teal-hover);
  border-color: var(--org-teal-hover);
}

.org-module .card {
  box-shadow: none;
  border: 1px solid #e9ecef;
}

.org-module .table thead th {
  background: #f3f8f8;
  color: #343a40;
  font-weight: 600;
  border-bottom: 1px solid #cfe4e2;
  white-space: nowrap;
}

.org-module .table tbody tr:nth-child(even) {
  background: #f7fbfb;
}

.org-module .table tfoot tr {
  background: #e6f4f3;
  font-weight: 600;
}

.org-module .leave-info-banner {
  background: var(--org-mint);
  color: var(--org-teal);
  border: 1px solid var(--org-mint-border);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin: 0;
}

.org-module .leave-back {
  color: var(--org-teal);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.org-module .leave-back:hover {
  color: var(--org-teal-hover);
}

.org-module .leave-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.org-module .org-filter {
  width: 30%;
  min-width: 12rem;
  max-width: 100%;
  margin-bottom: 0.75rem;
}

.org-module .org-filter label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.org-module .org-filter .select2-container {
  width: 100% !important;
}

@media (max-width: 768px) {
  .org-module .org-filter {
    width: 100%;
  }
}

.org-module .leave-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
}

.org-module .leave-meta span {
  color: #6c757d;
  margin-right: 0.35rem;
}

.org-module .card-footer {
  background: #fff;
  border-top: 1px solid #e9ecef;
}

.payroll-module {
  --pay-brown: #5d4037;
  --pay-brown-hover: #4e342e;
  --pay-tan: #f5efe8;
  --pay-tan-border: #e6d5c3;
  --pay-amber: #fff6e5;
  --pay-amber-border: #f0d9a8;
  --pay-orange: #e67e22;
}

.payroll-module .btn-primary {
  background-color: var(--pay-brown);
  border-color: var(--pay-brown);
}

.payroll-module .btn-primary:hover,
.payroll-module .btn-primary:focus {
  background-color: var(--pay-brown-hover);
  border-color: var(--pay-brown-hover);
}

.payroll-module .btn-pay-calc {
  background: var(--pay-orange);
  border-color: var(--pay-orange);
  color: #fff;
}

.payroll-module .btn-pay-calc:hover {
  background: #cf6d17;
  border-color: #cf6d17;
  color: #fff;
}

.payroll-module .card {
  box-shadow: none;
  border: 1px solid #e9ecef;
}

.payroll-module .table thead th {
  background: var(--pay-tan);
  color: #343a40;
  font-weight: 600;
  border-bottom: 1px solid var(--pay-tan-border);
  white-space: nowrap;
}

.payroll-module .table tbody tr:nth-child(even) {
  background: #faf7f4;
}

.payroll-module .table tfoot tr {
  background: var(--pay-tan);
  font-weight: 600;
}

.payroll-module .leave-info-banner {
  background: var(--pay-amber);
  color: #6d4c1b;
  border: 1px solid var(--pay-amber-border);
  border-radius: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin: 0;
}

.payroll-module .leave-back {
  color: var(--pay-brown);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.payroll-module .leave-back:hover {
  color: var(--pay-brown-hover);
}

.payroll-module .leave-card-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.payroll-module .leave-card-filter-actions .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.payroll-module .payroll-run-filters .select2-container {
  width: 100% !important;
}

.payroll-module .leave-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.payroll-module .leave-toolbar > .select2-container {
  flex: 0 0 calc(100% / 12 * 4 - 0.35rem);
  max-width: calc(100% / 12 * 4 - 0.35rem);
  width: calc(100% / 12 * 4 - 0.35rem) !important;
}

.payroll-module .leave-toolbar > .btn {
  flex: 0 0 calc(100% / 12 * 2);
  max-width: calc(100% / 12 * 2);
}

.payroll-module .card-footer:has(.leave-info-banner) {
  display: none;
}

.payroll-module .leave-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
}

.payroll-module .leave-meta span {
  color: #6c757d;
  margin-right: 0.35rem;
}

.payroll-module .card-footer {
  background: #fff;
  border-top: 1px solid #e9ecef;
}

/* ── Sidebar width override: 260px → 300px ── */
/* No !important on width/margin so collapsed-state (80px) rules still win */
.vertical-layout.vertical-menu-modern .main-menu,
.vertical-layout.vertical-menu-modern.menu-expanded .main-menu {
  width: 300px;
}
.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.expanded {
  width: 300px;
}
/* Navbar brand header always 300px (never collapses) */
.vertical-layout.vertical-menu-modern .navbar .navbar-header,
.vertical-layout.vertical-menu-modern .navbar-header {
  width: 300px !important;
}
.vertical-layout.vertical-menu-modern.menu-collapsed .navbar .navbar-header.expanded {
  width: 300px !important;
}
.vertical-layout.vertical-menu-modern.menu-expanded .footer {
  margin-left: 300px;
}
.vertical-overlay-menu .navbar .navbar-header {
  width: 300px !important;
}
.vertical-overlay-menu .main-menu,
.vertical-overlay-menu.menu-hide .main-menu {
  width: 300px;
  left: -300px;
}
.vertical-overlay-menu.menu-open .main-menu {
  transform: translate3d(300px, 0, 0);
}
/* Content area — loaded after components.css so same-specificity rule wins */
html .content {
  margin-left: 300px;
}

.pay-missing {
  color: #c0392b;
  font-weight: 600;
}

.summary-count-link {
  min-width: 2.15rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  text-align: center;
  font-weight: 700;
  border-radius: 0.2rem;
}

table.dataTable tbody td.dt-control {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}

table.dataTable tbody tr.shown {
  background-color: #eaf4fb;
}

table.dataTable tbody tr.child td,
div.dataTables_wrapper table.dataTable tbody td.child {
  background: #f4f6f9;
  padding: 0.75rem 1rem !important;
  white-space: normal !important;
}

.nested-grid {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.75rem;
}

.nested-grid-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.nested-grid table {
  margin-bottom: 0;
  width: 100%;
}

#summaryPeopleModal .modal-body {
  padding: 0;
}

#summaryPeopleModal .table {
  margin-bottom: 0;
}

#assignShiftModal .modal-header,
#assignSiteModal .modal-header {
  background-color: #28a745;
  border-bottom: 0;
  color: #fff;
}

#assignShiftModal .modal-header .close,
#assignSiteModal .modal-header .close {
  color: #fff;
  opacity: 0.9;
  text-shadow: none;
}

#confirmDeleteModal .modal-header {
  background-color: #dc3545;
  border-bottom: 0;
  color: #fff;
}

#confirmDeleteModal .modal-header .close {
  color: #fff;
  opacity: 0.9;
  text-shadow: none;
}

.validation-summary-errors ul {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
}

.field-validation-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

input.is-invalid,
select.is-invalid {
  border-color: #dc3545;
}

/* Organogram: company root node */
.org-node-company {
  background: #1f2937;
  border: 2px solid #1f2937;
  color: #fff;
}

.org-node-company strong,
.org-node-company small {
  color: #fff;
}
