.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9); /* Light overlay */
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}

#loader {
  width: 4.8px;
  height: 4.8px;
  display: block;
  margin: 20px auto;
  position: relative;
  border-radius: 4px;
  color: #115109;
  background: currentColor;
  box-sizing: border-box;
  animation: animloader 0.3s 0.3s linear infinite alternate;
}
#loader::after,
#loader::before {
  content: "";
  box-sizing: border-box;
  width: 4.8px;
  height: 4.8px;
  border-radius: 4px;
  background: currentColor;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 15px;
  animation: animloader 0.3s 0.45s linear infinite alternate;
}
#loader::after {
  top: -15px;
  animation-delay: 0s;
}

@keyframes animloader {
  0% {
    width: 4.8px;
  }
  100% {
    width: 48px;
  }
}

.custom-bg-sidebar {
  background-color: #4e73df;
  background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
  background-size: cover;
}

.custom-bg-sidebar-header {
  background-color: #4e73df;
  background-size: cover;
}

/* Toast */
.colored-toast.swal2-icon-success {
  background-color: #a5dc86 !important;
}

.colored-toast.swal2-icon-error {
  background-color: #f27474 !important;
}

.colored-toast.swal2-icon-warning {
  background-color: #f8bb86 !important;
}

.colored-toast.swal2-icon-info {
  background-color: #0dcaf0 !important;
}

.colored-toast.swal2-icon-question {
  background-color: #87adbd !important;
}

.colored-toast .swal2-title {
  color: white;
}

.colored-toast .swal2-close {
  color: white;
}

.colored-toast .swal2-html-container {
  color: white;
}
/* Toast end */

/* landing page */

.custom-header-img-logo {
  height: 100px;
}

.custom-img-height {
  height: 250px;
}

/* landing page end */

/* Datatable page entry text */
div .dt-length .dt-input {
  margin-right: 5px !important;
}

/* TIMELINE */

.tracking-list {
  /* border: 1px solid #e5e5e5; */
  background: #fff;
  border-radius: 10px;
}

.tracking-list .tracking-item:first-child {
  font-weight: 700;
}

.tracking-item {
  border-left: 2px solid #e5e5e5;
  position: relative;
  padding: 2rem 1.5rem 0.5rem 2.5rem;
  font-size: 0.9rem;
  margin-left: 3rem;
  min-height: 5rem;
}

.tracking-item:last-child {
  padding-bottom: 4rem;
}

.tracking-item .tracking-date {
  margin-bottom: 0.5rem;
}

.tracking-item .tracking-date span {
  color: #888;
  font-size: 85%;
  padding-left: 0.4rem;
}

.tracking-item .tracking-content {
  padding: 0.5rem 0.8rem;
  background-color: #f4f4f4;
  border-radius: 0.5rem;
}

.tracking-item .tracking-content span {
  display: block;
  color: #888;
  font-size: 85%;
}

.tracking-item .tracking-icon {
  line-height: 2.6rem;
  position: absolute;
  left: -1.3rem;
  width: 2.6rem;
  height: 2.6rem;
  text-align: center;
  border-radius: 50%;
  font-size: 1.1rem;
  /* background-color: #e5e5e5; */
  /* color: #fff; */
  /* background-color: #d2f4e8; */
}

.tracking-bg-success {
  background-color: #d2f4e8;
}

.tracking-icon-success {
  color: #0f6848;
}

.tracking-bg-fail {
  background-color: #f8d7da;
}

.tracking-icon-fail {
  color: #78261f;
}

.tracking-item .tracking-icon {
  color: #fff;
  font-size: 1rem;
  padding-top: 12;
}

.tracking-item .tracking-icon i {
  padding-top: 12px;
  /* color: #0f6848; */
}

@media (min-width: 992px) {
  .tracking-item {
    margin-left: 11rem;
  }
  .tracking-item .tracking-date {
    position: absolute;
    left: -11rem;
    width: 8.5rem;
    text-align: right;
  }
  .tracking-item .tracking-date span {
    display: block;
  }
  .tracking-item .tracking-content {
    padding: 0;
    background-color: transparent;
  }
}

/* TIMELINE END */

/* custom font size */

.fs-12 {
  font-size: 12px;
}

/* custom font size end*/

/* custom modal content */

.custom-modal-content {
  height: 100% !important;
}

.custom-modal-xxl {
  --bs-modal-width: 1400px !important;
}

/* custom modal content end */

/* custom bg-color */

.bg-gray3 {
  background-color: #858796;
}

.badge-custom-gray {
  background-color: #858796;
}

.bg-custom-gray {
  background-color: #f8fafc;
}
/* custom bg-color end */

/* select2 size */
.select2-container .select2-selection--single {
  height: 40px !important;
}

.select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
  line-height: 2 !important;
}

.is-invalid + .select2-container--bootstrap-5 .select2-selection,
.was-validated select:invalid + .select2-container--bootstrap-5 .select2-selection {
  border-width: 2px;
}
/* select2 size */

/* Make the two columns look like one continuous block */
#refsRow .accordion .accordion-item {
  border-radius: 0;
}

/* kill the middle seam (since gx-0 removes the gap) */
.acc-col-left .accordion-item {
  border-right: 0;
}
.acc-col-right .accordion-item {
  border-left: 0;
}

/* Card spacing harmony */
#refsTabs {
  --pill-radius: 0.75rem;
}

/* Base pill */
#refsTabs .refs-pill {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-radius: var(--pill-radius);
  padding: 0.625rem 0.75rem;
  text-align: left;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.02s;
  white-space: nowrap;
  overflow: hidden;
}

/* Hover/focus */
#refsTabs .refs-pill:hover {
  background: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color-translucent);
}
#refsTabs .refs-pill:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Active */
#refsTabs .refs-pill.active {
  background: var(--bs-primary-bg-subtle);
  border-color: var(--bs-primary-border-subtle);
  color: var(--bs-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Remove default borders (if any) and keep soft corners */
#refsTabs .nav-link {
  border: 0 !important;
  border-radius: var(--pill-radius);
}

/* Compact on small screens */
@media (max-width: 991.98px) {
  #refsTabs .refs-pill {
    padding: 0.5rem 0.625rem;
  }
}

/* * Custom Modern Modal */
:root {
  --modern-accent: #1572e8; /* your brand color */
  --modern-accent-light: #4a9af2;
  --modern-focus: rgba(21, 114, 232, 0.25);
}

/* Modal wrapper */
.modern-modal .modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

/* Header with gradient */
.modern-header {
  background: linear-gradient(135deg, var(--modern-accent) 0%, var(--modern-accent-light) 100%);
  color: #fff;
}

/* Icon bubble */
.modern-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  font-size: 1.2rem;
  color: #fff;
}

/* Section kicker */
.section-kicker {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
  color: #2d2e32;
  margin-bottom: 0.5rem;
  display: block;
}

/* Modern card */
.modern-card {
  border-radius: 1rem;
  background: #fff;
}

/* Sticky footer */
.sticky-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  box-shadow: 0 -6px 16px rgba(16, 24, 40, 0.06);
}

#employee_profile_modal .modal-content {
  max-height: calc(100vh - 2rem);
}

#employee_profile_form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#employee_profile_modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.min-w-0 {
  min-width: 0;
}

.employee-details-tabs {
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

#employee_details_content {
  min-height: 52vh;
}

#employee_details_content > .tab-pane {
  min-height: 52vh;
}

.employee-detail-section {
  margin-bottom: 1.35rem;
}

.employee-detail-section .section-kicker {
  margin-bottom: 0.65rem;
  font-size: 0.875rem;
}

.employee-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.employee-detail-item,
.employee-detail-empty {
  min-height: 3.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.75rem 0.875rem;
}

.employee-detail-label {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
}

.employee-detail-label-text {
  display: block;
  overflow-wrap: anywhere;
}

.employee-detail-label-text.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.employee-detail-label-toggle {
  display: inline-flex;
  margin-top: 0.25rem;
  border: 0;
  background: transparent;
  color: #1572e8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0;
}

.employee-detail-label-toggle:hover,
.employee-detail-label-toggle:focus {
  color: #0b5ed7;
  text-decoration: underline;
  outline: none;
}

.employee-detail-value {
  margin-top: 0.2rem;
  color: #1f2937;
  font-size: 0.925rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.employee-detail-empty {
  min-height: auto;
  color: #6b7280;
  font-size: 0.925rem;
}

.employee-detail-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.employee-detail-table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.employee-detail-table thead th {
  border-bottom: 1px solid #e5e7eb;
  background: #f3f4f6;
  padding: 0.9rem 1.1rem;
}

.employee-detail-table th {
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.employee-detail-table td {
  border-top: 0;
  padding: 0.95rem 1.1rem;
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.55;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.employee-detail-table tbody tr + tr td {
  border-top: 1px solid #eef2f7;
}

.employee-detail-table tbody td {
  background-color: #ffffff !important;
}

.employee-detail-table a {
  font-weight: 700;
  white-space: nowrap;
}

.employee-detail-table th:first-child,
.employee-detail-table td:first-child {
  padding-left: 1.25rem;
}

.employee-detail-table th:last-child,
.employee-detail-table td:last-child {
  padding-right: 1.25rem;
}

@media (max-width: 575.98px) {
  #employee_details_content,
  #employee_details_content > .tab-pane {
    min-height: 58vh;
  }
}

/** Custom class for disabling form fields */
/* 1) Block interaction on all form controls (except hidden) */
.readonly-form input:not([type="hidden"]),
.readonly-form select,
.readonly-form textarea,
.readonly-form button:not([type="submit"]) {
  pointer-events: none; /* no clicks / typing / wheel */
  cursor: not-allowed;
}

/* 2) Labels should not toggle radios/checkboxes */
.readonly-form label {
  pointer-events: none;
}

/* 3) Visual treatment (optional but nice) */
.readonly-form input:not([type="hidden"]),
.readonly-form select,
.readonly-form textarea,
.readonly-form button:not([type="submit"]) {
  background-color: #e9ecef; /* subtle gray */
  opacity: 0.9; /* slightly dim */
}

/* 4) Keep hidden inputs functional (important for ids/csrf) */
.readonly-form input[type="hidden"] {
  pointer-events: auto;
  background: none;
  opacity: 1;
}

/* 5) File inputs: match look */
.readonly-form input[type="file"] {
  color: #6c757d;
}

/* 6) Common plugin shells (optional but helpful) */
.readonly-form .select2,
.readonly-form .select2-selection,
.readonly-form .choices,
.readonly-form .choices__inner,
.readonly-form .flatpickr-input,
.readonly-form .form-check,                    /* Bootstrap check/radio wrapper */
.readonly-form .form-check-label,
.readonly-form .form-switch,                   /* Bootstrap switch */
.readonly-form .input-group {
  /* prevent clicks on addons */
  pointer-events: none;
}

/* 7) If you use contenteditable regions */
.readonly-form [contenteditable="true"] {
  pointer-events: none;
  user-select: none;
}

/* Default: dark text when not selected */
.toggle-text-color {
  color: #212529; /* bootstrap text-dark */
}

/* When the radio is checked, label text becomes white */
.btn-check:checked + .toggle-text-color {
  color: #fff !important;
}

/* ESS Calendar */
/* Scope to your calendar to avoid affecting others */
#request_calendar .fc-daygrid-event {
  white-space: normal; /* allow wrapping */
  overflow: visible; /* don't cut text */
}

/* HR Calendar */
.calendar-wrapper {
  min-height: 350px;
}

.calendar-loader {
  position: absolute;
  inset: 0;
  z-index: 50;
}

.calendar-loader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
}

.calendar-loader-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Ensure the main title wrapper can wrap */
#request_calendar .fc-daygrid-event .fc-event-title {
  white-space: normal;
}

/* Optional: nicer pill style for Bootstrap look */
#request_calendar .fc-daygrid-event.fc-event {
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 0.75rem;
  line-height: 1.2;
}
/* Wrapper for better spacing inside the modal */
.calendar-info-wrapper {
  text-align: left;
  margin-top: 4px;
}

/* Soft card background */
.calendar-info-card {
  background: #f8f9fa;
  border: 1px solid #e2e5ec;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Table styling */
.calendar-info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.calendar-info-table .label {
  width: 32%;
  font-weight: 600;
  color: #6c757d;
  white-space: nowrap;
}

/* Use monospace for logs */
.calendar-info-table .monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Status pill */
.calendar-info-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: #e9ecef;
  color: #495057;
}

/* Status color variants (optional) */
.calendar-info-status.approved {
  background: #d1e7dd;
  color: #0f5132;
}

.calendar-info-status.pending {
  background: #fff3cd;
  color: #664d03;
}

.calendar-info-status.disapproved,
.calendar-info-status.denied {
  background: #f8d7da;
  color: #842029;
}

.ob-label {
  display: inline !important;
  font-size: 12px !important;
  font-style: italic;
}

/* use this instead of readonly or disabled */
.custom-disabled {
  pointer-events: none; /* Prevents clicking/focus */
  background-color: #e9ecef; /* Typically a disabled/readonly color */
}

/* rounded + compressed photo (settings/org/head-oic) */
.employee-photo-outer {
  width: 60px; /* adjust as needed */
  height: 60px;
  margin: auto;

  border-radius: 50%;
  background: #ffffff; /* white ring */
  padding: 4px; /* ring thickness */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.employee-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden; /* this clips the image */
  background: #ffffff; /* prevent dark bg peeking through */
  line-height: 0; /* remove inline gaps */
  font-size: 0;
}

.employee-photo-img {
  width: 100% !important;
  height: 100% !important; /* override global img { height:auto } */
  object-fit: cover; /* zoom & crop to fill circle */
  display: block;
  cursor: pointer;
}

#history_header .text-bg-info {
  background-color: rgba(59, 130, 246, 0.12) !important;
  color: #1d4ed8 !important;
}
#history_header .text-bg-primary {
  background-color: rgba(79, 70, 229, 0.12) !important;
  color: #3730a3 !important;
}
#history_header .text-bg-dark {
  background-color: rgba(17, 24, 39, 0.08) !important;
  color: #111827 !important;
}

/* Scoped styles just for this modal content */
.bulk-table-wrap {
  max-height: 55vh;
  overflow: auto;
}
.bulk-table {
  min-width: 1150px; /* IMPORTANT: prevents column collapse */
  width: 100%;
  table-layout: fixed; /* stable column sizes */
}
.bulk-table th {
  white-space: nowrap; /* prevent vertical header letters */
  font-weight: 600;
}
.bulk-table td {
  vertical-align: top;
  word-break: normal; /* avoid breaking per letter */
  overflow-wrap: anywhere; /* wrap long error sentences nicely */
}
.bulk-nowrap {
  white-space: nowrap;
}
.bulk-col-employee {
  width: 180px;
}
.bulk-col-leave {
  width: 180px;
}
.bulk-col-credit-type {
  width: 140px;
}
.bulk-col-balance {
  width: 210px;
}
.bulk-col-error {
  width: 340px;
}

.bulk-balance-card {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
}

/* Base */
.special-select + .select2-container--bootstrap-5 {
  width: 100% !important;
}

/* SINGLE select only */
.special-select + .select2-container--bootstrap-5 .select2-selection--single {
  min-height: calc(3.5rem + 2px);
  padding: 1rem 0.75rem 0.375rem 0.75rem;
  display: flex;
  align-items: center;
}

.special-select + .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 1.5rem;
  padding-left: 0;
  padding-right: 1.5rem;
}

.special-select + .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: calc(3.5rem + 2px);
}

/* MULTIPLE select */
.special-select + .select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: auto;
  height: auto;
  padding: 0.375rem 0.5rem;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 140px;
}

/* selected items wrapper */
.special-select + .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* each selected tag */
.special-select + .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* remove button spacing */
.special-select + .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
  margin-right: 0.35rem;
}

/* search field inside multi select */
.special-select + .select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
  margin: 0;
}

.special-select + .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
  margin-top: 0 !important;
  min-height: 28px;
}

/* optional: cleaner modal dropdown */
.select2-container--bootstrap-5 .select2-dropdown {
  z-index: 9999;
}

/* wrapper */
.select2-floating {
  position: relative;
}

/* hide native select visually but keep it for form behavior */
.select2-floating > .special-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

/* select2 container */
.select2-floating .select2-container--bootstrap-5 {
  width: 100% !important;
}

/* multiple selection box */
.select2-floating .select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: calc(3.5rem + 2px);
  padding: 1.625rem 0.75rem 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background-color: #fff;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 140px;
}

/* rendered tags container */
.select2-floating .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* tags */
.select2-floating .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  display: inline-flex;
  align-items: center;
  float: none;
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

/* search field */
.select2-floating .select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
  margin: 0;
}

.select2-floating .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
  margin-top: 0 !important;
  min-height: 28px;
}

/* floating label default */
.select2-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  height: 100%;
  padding: 1rem 0.75rem;
  pointer-events: none;
  transform-origin: 0 0;
  transition: all 0.15s ease-in-out;
  color: #6c757d;
}

/* floated state */
.select2-floating.is-filled > label,
.select2-floating.is-focus > label {
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
  opacity: 0.65;
}

/* focus state */
.select2-floating.is-focus .select2-selection--multiple {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* invalid state if needed */
.select2-floating.is-invalid .select2-selection--multiple {
  border-color: #dc3545;
}

.select2-floating.is-invalid > label {
  color: #dc3545;
}

/* Calendar Info Styles */
/* =============================================================
   Calendar — Ultra-Modern Light
   Add to base template:
   @import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Mono:wght@400;500&display=swap');
   ============================================================= */

.page-inner {
  --cal-surface: #ffffff;
  --cal-surface2: #f8f9fc;
  --cal-border: #e8eaef;
  --cal-border2: #d4d8e4;
  --cal-text: #0f1117;
  --cal-muted: #9098a8;
  --cal-muted2: #6b7280;
  --cal-accent: #4f6ef7;
  --cal-accent-dim: #eef1fe;
  --cal-accent-text: #2d4fd6;
  --cal-green: #059669;
  --cal-green-dim: #d1fae5;
  --cal-green-text: #065f46;
  --cal-amber: #d97706;
  --cal-amber-dim: #fef3c7;
  --cal-amber-text: #92400e;
  --cal-red: #dc2626;
  --cal-red-dim: #fee2e2;
  --cal-red-text: #991b1b;
  --cal-purple: #7c3aed;
  --cal-purple-dim: #ede9fe;
  --cal-purple-text: #4c1d95;

  /* Event pill colors (status-driven) */
  --cal-ev-pending: #fcecbb;
  --cal-ev-approved: #c5f4de;
  --cal-ev-cancelled: #fcd7d7;
  --cal-ev-pending-bar: #d97706;
  --cal-ev-approved-bar: #059669;
  --cal-ev-cancelled-bar: #dc2626;
  --cal-ev-pending-text: #7c4a00;
  --cal-ev-approved-text: #065f46;
  --cal-ev-cancelled-text: #991b1b;

  --cal-r: 12px;
  --cal-r-lg: 16px;
  --cal-font: "DM Sans", system-ui, sans-serif;
  --cal-mono: "DM Mono", monospace;

  font-family: var(--cal-font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  padding: 1.5rem;
}

/* --- Header --- */
.cal-hdr {
  margin-bottom: 1.6rem;
}
.cal-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cal-accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.4rem;
}
.cal-eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--cal-accent);
}
.cal-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cal-text);
  margin: 0;
}
.cal-sub {
  font-size: 0.85rem;
  color: var(--cal-muted);
  font-weight: 300;
  margin: 0.2rem 0 0;
}

/* --- Stats --- */
.cal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
@media (max-width: 620px) {
  .cal-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.cal-stat {
  background: var(--cal-surface);
  border: 1px solid var(--cal-border);
  border-radius: var(--cal-r-lg);
  padding: 1.1rem 1.15rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
  cursor: default;
}
.cal-stat:hover {
  border-color: var(--cal-border2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.cal-stat-shine {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  border-radius: 0 var(--cal-r-lg) 0 60px;
  opacity: 0.06;
  pointer-events: none;
}
.cal-stat.total .cal-stat-shine {
  background: var(--cal-accent);
}
.cal-stat.pending .cal-stat-shine {
  background: var(--cal-amber);
}
.cal-stat.approved .cal-stat-shine {
  background: var(--cal-green);
}
.cal-stat.cancelled .cal-stat-shine {
  background: var(--cal-red);
}

.cal-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-sdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-sdot.total {
  background: var(--cal-accent);
}
.cal-sdot.pending {
  background: var(--cal-amber);
}
.cal-sdot.approved {
  background: var(--cal-green);
}
.cal-sdot.cancelled {
  background: var(--cal-red);
}

.cal-spill {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
}
.cal-spill.total {
  background: var(--cal-accent-dim);
  color: var(--cal-accent-text);
}
.cal-spill.pending {
  background: var(--cal-amber-dim);
  color: var(--cal-amber-text);
}
.cal-spill.approved {
  background: var(--cal-green-dim);
  color: var(--cal-green-text);
}
.cal-spill.cancelled {
  background: var(--cal-red-dim);
  color: var(--cal-red-text);
}

.cal-snum {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--cal-text);
}
.cal-slabel {
  font-size: 0.82rem;
  color: var(--cal-muted);
  font-weight: 400;
}

/* --- Combined filter bar --- */
.cal-filter-bar {
  background: var(--cal-surface);
  border: 1px solid var(--cal-border);
  border-radius: var(--cal-r-lg);
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.25rem;
  margin-bottom: 1rem;
}

.cal-filter-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cal-flabel {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cal-muted);
  white-space: nowrap;
}

.cal-filter-divider {
  width: 1px;
  height: 28px;
  background: var(--cal-border);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .cal-filter-divider {
    display: none;
  }
  .cal-filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.cal-filter-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cal-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--cal-border);
  background: var(--cal-surface2);
  color: var(--cal-muted2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--cal-font);
}
.cal-chip:hover {
  border-color: var(--cal-border2);
  background: #eef0f8;
  color: var(--cal-text);
}

.cal-chip.active {
  background: var(--cal-accent);
  border-color: var(--cal-accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 110, 247, 0.22);
}
.cal-chip.pending.active {
  background: var(--cal-amber);
  border-color: var(--cal-amber);
  color: #fff;
  box-shadow: none;
}
.cal-chip.approved.active {
  background: var(--cal-green);
  border-color: var(--cal-green);
  color: #fff;
  box-shadow: none;
}
.cal-chip.cancelled.active {
  background: var(--cal-red);
  border-color: var(--cal-red);
  color: #fff;
  box-shadow: none;
}
.cal-chip.type-chip.active {
  background: var(--chip-color, var(--cal-accent));
  border-color: var(--chip-color, var(--cal-accent));
  color: #fff;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--chip-color, var(--cal-accent)) 35%, transparent);
}

.cal-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-btn-reset {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--cal-muted2);
  background: var(--cal-surface2);
  border: 1px solid var(--cal-border);
  border-radius: 99px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--cal-font);
}
.cal-btn-reset:hover {
  background: #eef0f8;
  border-color: var(--cal-border2);
  color: var(--cal-text);
}

/* --- Main calendar card --- */
.cal-main-card {
  background: var(--cal-surface);
  border: 1px solid var(--cal-border);
  border-radius: var(--cal-r-lg);
  overflow: hidden;
}
.cal-main-top {
  padding: 0.95rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--cal-border);
}
.cal-main-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cal-text);
  letter-spacing: -0.01em;
}
.cal-main-sub {
  font-size: 0.78rem;
  color: var(--cal-muted);
  margin-top: 1px;
}
.cal-main-body {
  padding: 0.85rem 1rem 1.25rem;
}

/* ===== FullCalendar overrides ===== */
.cal-main-body .fc {
  font-family: var(--cal-font) !important;
  font-size: 14px;
}

.cal-main-body .fc-toolbar-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--cal-text) !important;
  letter-spacing: -0.02em;
}

.cal-main-body .fc-button,
.cal-main-body .fc-button-primary {
  background: var(--cal-surface2) !important;
  border: 1px solid var(--cal-border) !important;
  color: var(--cal-muted2) !important;
  box-shadow: none !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  padding: 5px 11px !important;
  transition: all 0.15s !important;
  font-family: var(--cal-font) !important;
}
.cal-main-body .fc-button:hover,
.cal-main-body .fc-button-primary:hover {
  background: #eef0f8 !important;
  border-color: var(--cal-border2) !important;
  color: var(--cal-text) !important;
}
.cal-main-body .fc-button-active,
.cal-main-body .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--cal-accent-dim) !important;
  color: var(--cal-accent-text) !important;
  border-color: rgba(79, 110, 247, 0.3) !important;
  font-weight: 600 !important;
}

.cal-main-body .fc-col-header-cell-cushion {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cal-muted);
  text-decoration: none;
}
.cal-main-body .fc-day-sat .fc-col-header-cell-cushion,
.cal-main-body .fc-day-sun .fc-col-header-cell-cushion {
  color: #d4d8e4;
}

.cal-main-body .fc-daygrid-day-number {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cal-muted2);
  text-decoration: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 2px;
  transition: background 0.12s;
}
.cal-main-body .fc-day-today {
  background: var(--cal-accent-dim) !important;
}
.cal-main-body .fc-day-today .fc-daygrid-day-number {
  background: var(--cal-accent);
  color: #fff !important;
  font-weight: 700;
}
.cal-main-body .fc-day-weekend {
  background: #fafbfc !important;
}
.cal-main-body .fc-day-weekend .fc-daygrid-day-number {
  color: #c8cdd8 !important;
}
.cal-main-body .fc-day-other {
  opacity: 0.3;
}

.cal-main-body .fc-theme-standard td,
.cal-main-body .fc-theme-standard th {
  border-color: var(--cal-border) !important;
}
.cal-main-body .fc-scrollgrid,
.cal-main-body .fc-scrollgrid-section > td {
  border-color: var(--cal-border) !important;
}

.cal-main-body .fc-more-link {
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--cal-mono);
  color: var(--cal-muted2);
}
.cal-main-body .fc-event {
  border: none !important;
  border-radius: 5px !important;
  background: transparent !important;
}
.cal-main-body .fc-h-event {
  background: transparent !important;
}
.cal-main-body .fc-daygrid-event-harness {
  margin: 1px 2px;
}

.cal-main-body .fc-popover {
  background: var(--cal-surface) !important;
  border: 1px solid var(--cal-border2) !important;
  border-radius: var(--cal-r) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}
.cal-main-body .fc-popover-header {
  background: transparent !important;
  border-bottom: 1px solid var(--cal-border) !important;
  color: var(--cal-text) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

@media (max-width: 575px) {
  .cal-main-body .fc-toolbar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .cal-main-body .fc-toolbar-chunk {
    width: 100%;
  }
  .cal-main-body .fc-toolbar-title {
    font-size: 0.9rem !important;
  }
  .cal-main-body .fc-button {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
  }
}

/* ===== Event pill — status-driven colors ===== */
.cal-ev-pill {
  display: flex;
  align-items: stretch;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  transition:
    opacity 0.12s,
    transform 0.1s;
}
.cal-ev-pill:hover {
  opacity: 0.78;
  transform: scale(0.988);
}
.cal-ev-bar {
  width: 3px;
  flex-shrink: 0;
}
.cal-ev-body {
  padding: 2px 5px 2px 4px;
  flex: 1;
  min-width: 0;
}
.cal-ev-name {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.cal-ev-meta {
  font-size: 0.7rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
@media (max-width: 575px) {
  .cal-ev-meta {
    display: none;
  }
  .cal-ev-name {
    font-size: 0.6rem;
  }
}

/* ===== Detail modal ===== */
.cal-detail-wrap {
  padding: 0.1rem 0;
}
.cal-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.cal-detail-table tr + tr td {
  border-top: 1px solid #f3f4f6;
}
.cal-detail-table td {
  padding: 8px 4px;
  vertical-align: top;
}
.cal-detail-key {
  color: var(--cal-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  width: 108px;
}
.cal-detail-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}
.cal-detail-status.approved {
  background: var(--cal-ev-approved);
  color: var(--cal-ev-approved-text);
}
.cal-detail-status.pending {
  background: var(--cal-ev-pending);
  color: var(--cal-ev-pending-text);
}
.cal-detail-status.cancelled {
  background: var(--cal-ev-cancelled);
  color: var(--cal-ev-cancelled-text);
}
.cal-detail-status.default {
  background: #f3f4f6;
  color: var(--cal-muted2);
}
.cal-mono {
  font-family: var(--cal-mono);
  font-size: 0.8rem;
}

.cal-top-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 20px;
}

.cal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cal-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.cal-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cal-filter-divider {
  width: 1px;
  align-self: stretch;
  background: #e5e7eb;
}

.cal-filter-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cal-flabel {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .cal-top-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .cal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cal-filter-bar {
    align-items: flex-start;
  }

  .cal-filter-right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .cal-filter-divider {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .cal-stats {
    grid-template-columns: 1fr;
  }

  .cal-filter-group,
  .cal-filter-right {
    width: 100%;
  }

  .cal-btn-reset {
    width: 100%;
  }
}

/* leave_type_balance_hint design */
#leave_type_balance_hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 5px 10px;
  background: #e1f5ee; /* teal-50 */
  border-left: 3px solid #1d9e75; /* teal-400 — matches the checkmark */
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #085041; /* teal-800 for readability */
}

#leave_type_balance_hint strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f6e56; /* teal-600 */
}

/* ── Schedule type dot on event pill ── */
.cal-sched-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Legend strip ── */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 6px 2px;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--bs-secondary-color, #6b7280);
  white-space: nowrap;
}

.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-legend-label {
  font-weight: 500;
}

/* ============================================================
   More-link pill  (+N more)
   ============================================================ */
.cal-more-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.cal-more-link:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ============================================================
   More-link dropdown panel
   ============================================================ */
.cal-more-drop {
  position: absolute;
  /* sits just below the day cell's event list area */
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  /* animate in */
  animation: cal-drop-in 0.15s ease;
}

@keyframes cal-drop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Each event row inside the dropdown */
.cal-more-drop-item {
  border-radius: 6px;
  overflow: hidden;
}
.cal-more-drop-item .cal-ev-pill {
  /* full width inside the dropdown */
  width: 100%;
  box-sizing: border-box;
}
.cal-more-drop-item:hover .cal-ev-pill {
  filter: brightness(0.96);
}

/* Profile Page > Educational Background */

/* Subtitle: matches kaiAdmin .card-category */
.edu-card-sub {
  font-size: 12px;
  color: #8d9498;
  margin: 0;
}

/* ── Table wrapper ── */
.edu-table-wrap {
  overflow-x: auto;
}

/* ── Table: aligned with kaiAdmin .table styles ── */
.edu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

/* thead: matches kaiAdmin .table thead th */
.edu-table thead tr.col-labels th {
  background: #f6f9fc; /* kaiAdmin .thead-light */
  color: #8898aa;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 14px;
  border-bottom: 1px solid #ebecec;
  white-space: nowrap;
}

/* tbody rows: matches kaiAdmin .table td border */
.edu-table tbody tr {
  border-bottom: 1px solid #ebedf2;
  transition: background 0.15s ease;
}

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

.edu-table tbody tr:hover {
  background: #f9f9f9;
}

.edu-table tbody td {
  padding: 9px 14px;
  vertical-align: middle;
}

/* ── Level cell: plain text ── */
.level-cell {
  text-align: center;
  width: 108px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8898aa;
  white-space: nowrap;
}

/* Target the actual From/To td cells — these drive the column width */
.edu-table tbody td:nth-child(4),
.edu-table tbody td:nth-child(5),
.edu-table tbody td:nth-child(7) {
  width: 160px;
  min-width: 160px;
}

/* Profile Page > Educational Background end */
#work_schedule_modal .modal-dialog {
  max-width: 1140px;
}

#work_schedule_modal .modal-content {
  height: calc(100vh - 2rem);
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#work_schedule_modal .modern-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

#work_schedule_modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
}

#work_schedule_modal .modal-footer.sticky-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
}

#work_schedule_modal .modal-dialog.modal-xl {
  margin: 1rem auto;
}

@media (max-width: 768px) {
  #work_schedule_modal .modal-content {
    height: calc(100vh - 1rem);
    max-height: calc(100vh - 1rem);
  }
}

/* Forced first-login password-change layout: hide app chrome until the password is updated. */
body.force-password-change .sidebar,
body.force-password-change .main-header,
body.force-password-change .footer {
  display: none !important;
}

body.force-password-change .main-panel {
  width: 100% !important;
  min-height: 100vh;
  margin-left: 0 !important;
}

body.force-password-change #main_content.container {
  max-width: 720px;
  padding-top: 48px;
}

body.force-password-change #forced_password_logout_btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
}

