:root {
  --sidebar-w: 264px;
  --sidebar-mini-w: 72px;
  --sidebar-bg: #2c3e50;
  --sidebar-ink: #c5d0da;
  --sidebar-ink-strong: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --accent: #1abc9c;
  --accent-ink: #0b2b26;
  --page-bg: #f3f5f6;
  --card-border: #8CDDCD;
  --card-ink: #37474f;
  --topbar-h: 62px;
}

body {
  font-family: "Open Sans", sans-serif;
  color: #373a3c;
  font-weight: 400;
  background: #e9e9e9;
  position: relative;
}

/* ---------- Layout ---------- */
.app {
  min-height: 100vh;
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s ease;
}

.content {
  flex: 1;
  padding: 1.5rem;
}

.footer {
  padding: 1rem 1.5rem;
  color: #6b7a80;
  font-size: .85rem;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease, width .25s ease;
}

.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1.25rem;
  color: var(--sidebar-ink-strong);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar__brand .bi {
  color: var(--accent);
  font-size: 1.25rem;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem .75rem;
}

.menu__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border-radius: .5rem;
  color: var(--sidebar-ink);
  text-decoration: none;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
}

.menu__link:hover {
  background: var(--sidebar-hover);
  color: #1abc9c;
}

.menu__link.is-active {
  background: rgba(26, 188, 156, .15);
  color: #1abc9c;
}

.menu__link.is-active>.bi:first-child {
  color: var(--accent);
}

.menu__text {
  flex: 1;
}

.menu__chevron {
  font-size: .75rem;
  transition: transform .2s;
}

.menu__link[aria-expanded="true"] .menu__chevron {
  transform: rotate(180deg);
}

.submenu {
  margin: 2px 0 6px 1.55rem;
  padding-left: .75rem;
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.submenu__link {
  display: block;
  padding: .45rem .75rem;
  border-radius: .4rem;
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: .93rem;
}

.submenu__link:hover {
  color: #1abc9c;
  background: var(--sidebar-hover);
}

.submenu__link.is-active {
  color: var(--accent);
  font-weight: 600;
}

/* Desktop: minimised (icon-only) sidebar */
@media (min-width: 992px) {
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-mini-w);
  }

  body.sidebar-collapsed .main {
    margin-left: var(--sidebar-mini-w);
  }

  body.sidebar-collapsed .sidebar__brand {
    justify-content: center;
    padding: 0;
  }

  body.sidebar-collapsed .sidebar__brand span,
  body.sidebar-collapsed .menu__text,
  body.sidebar-collapsed .menu__chevron {
    display: none;
  }

  body.sidebar-collapsed .sidebar__nav {
    overflow: visible;
    padding: 1rem 0;
  }

  body.sidebar-collapsed .menu__item {
    position: relative;
  }

  body.sidebar-collapsed .menu__link {
    justify-content: center;
    padding: .7rem 0;
    margin: 0 .5rem 2px;
  }

  body.sidebar-collapsed .menu__link>.bi:first-child {
    font-size: 1.2rem;
  }

  /* submenu becomes a flyout on hover */
  body.sidebar-collapsed .submenu {
    display: none !important;
  }

  body.sidebar-collapsed .menu__item:hover>.submenu {
    display: block !important;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 210px;
    margin: 0;
    padding: .5rem;
    background: var(--sidebar-bg);
    border: 0;
    border-radius: 0 .6rem .6rem 0;
    box-shadow: 8px 8px 22px rgba(0, 0, 0, .28);
    z-index: 1050;
  }

  body.sidebar-collapsed .menu__item:hover>.submenu::before {
    content: attr(data-label);
    display: block;
    padding: .4rem .75rem;
    margin-bottom: .35rem;
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }
}

/* Mobile / tablet: off-canvas */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 26, .55);
  z-index: 1035;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
}

@media (max-width: 991.98px) {
  .main {
    margin-left: 0;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .content {
    padding: 1.5rem 1rem 1rem;
  }
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1.25rem;
  background: #2c3e50;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.btn-icon {
  border: 0;
  background: transparent;
  color: #e3eaf0;
  padding: .4rem .55rem;
  border-radius: .5rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, .08);
  color: #1abc9c;
}

/* Logo hangs from the top bar, overlapping its lower edge. The Jeniss logo is dark on a
   transparent background, so it sits on a white plate to stay readable on the navy bar. */
.topbar__logo {
  align-self: flex-start;
  display: block;
  margin-left: .25rem;
  line-height: 0;
  background: #fff;
  padding: .35rem .7rem;
  border-radius: 0 0 .6rem .6rem;
  box-shadow: 0 5px 6px rgba(0, 0, 0, .3);
}

.topbar__logo img {
  display: block;
  height: 72px;
  width: auto;
}

@media (max-width: 575.98px) {
  .topbar__logo {
    padding: .3rem .5rem;
  }

  .topbar__logo img {
    height: 42px;
  }
}

.topbar__user {
  color: #fff;
}

.topbar__user:hover {
  color: #1abc9c;
}

.topbar .text-muted {
  color: #aebdca !important;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #d64545;
  border-radius: 50%;
  border: 2px solid #2c3e50;
}

/* ---------- Cards ---------- */
.card {
  border: 0;
  border-top: 3px solid #8CDDCD;
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(44, 62, 80, .08);
  color: #37474f;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #8CDDCD;
  font-weight: 600;
  padding: .9rem 1.1rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
}

.stat__icon {
  width: 46px;
  height: 46px;
  border-radius: .6rem;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: #e6eff2;
  color: #1d5468;
}

.stat__label {
  color: #37474f;
  opacity: .8;
  font-size: .85rem;
}

.stat__value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

/* Chart box keeps a sensible height on every screen */
.chart-box {
  position: relative;
  height: 340px;
}

@media (max-width: 575.98px) {
  .chart-box {
    height: 260px;
  }
}

/* DataTables / Select2 tweaks */
table.dataTable thead th {
  white-space: nowrap;
}

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

.dt-wrap {
  overflow-x: auto;
}

@media (prefers-reduced-motion: reduce) {

  .sidebar,
  .main {
    transition: none;
  }
}

/* ---------- Loading screen (circular progress) ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2c3e50;
  transition: opacity .4s ease, visibility .4s;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader__inner {
  text-align: center;
  color: #fff;
}

.preloader__ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 1.1rem;
}

.preloader__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.preloader__track,
.preloader__arc {
  fill: none;
  stroke-width: 6;
}

.preloader__track {
  stroke: rgba(255, 255, 255, .12);
}

.preloader__arc {
  stroke: #1abc9c;
  stroke-linecap: round;
  transition: stroke-dashoffset .12s linear;
}

.preloader__pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.preloader__name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .3px;
}

.preloader__msg {
  margin-top: .25rem;
  font-size: .85rem;
  color: #aebdca;
}

/* ---------- Employee directory: sticky ID + Name, other columns scroll ---------- */
.table-scroll {
  overflow-x: auto;
  width: 100%;
  border: 1px solid #dfe6e9;
  border-radius: .5rem;
  background: #fff;
}

/* Fixed layout + explicit widths: header cells and body cells always share the same column widths */
table.dataTable.sticky-cols {
  table-layout: fixed;
  width: 100%;
  min-width: 2052px;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0;
}

.sticky-cols th,
.sticky-cols td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #e6ecee;
}

.sticky-cols thead th {
  background-color: #f1f5f6;
  border-bottom: 2px solid #8CDDCD;
  font-weight: 600;
}

.sticky-cols tbody td {
  background-color: #fff;
}

.sticky-cols tbody tr:last-child td {
  border-bottom: 0;
}

.sticky-cols thead th:nth-child(1) {
  width: 72px;
}

.sticky-cols thead th:nth-child(2) {
  width: 220px;
}

.sticky-cols thead th:nth-child(3) {
  width: 130px;
}

.sticky-cols thead th:nth-child(4) {
  width: 240px;
}

.sticky-cols thead th:nth-child(5) {
  width: 130px;
}

.sticky-cols thead th:nth-child(6) {
  width: 150px;
}

.sticky-cols thead th:nth-child(7) {
  width: 100px;
}

.sticky-cols thead th:nth-child(8) {
  width: 130px;
}

.sticky-cols thead th:nth-child(9) {
  width: 100px;
}

.sticky-cols thead th:nth-child(10) {
  width: 110px;
}

.sticky-cols thead th:nth-child(11) {
  width: 140px;
}

.sticky-cols thead th:nth-child(12) {
  width: 140px;
}

.sticky-cols thead th:nth-child(13) {
  width: 140px;
}

.sticky-cols thead th:nth-child(14) {
  width: 140px;
}

/* sticky ID + Name (left offset of Name = width of ID) */
.sticky-cols> :is(thead, tbody)>tr> :nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
}

.sticky-cols> :is(thead, tbody)>tr> :nth-child(2) {
  position: sticky;
  left: 72px;
  z-index: 2;
  border-right: 2px solid #8CDDCD;
}

.sticky-cols>thead>tr> :nth-child(-n+2) {
  z-index: 3;
}

@media (max-width: 575.98px) {
  .sticky-cols thead th:nth-child(1) {
    width: 64px;
  }

  .sticky-cols thead th:nth-child(2) {
    width: 160px;
  }

  .sticky-cols> :is(thead, tbody)>tr> :nth-child(2) {
    left: 64px;
  }

  .emp__av {
    display: none !important;
  }
}

.emp {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.emp__av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dff5f0;
  color: #117864;
  font-size: .72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.pos {
  color: #1e8449;
  font-weight: 600;
}

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


/*  Own Style  */

label {
  margin-bottom: 0.5rem !important;
  color: #000 !important;
}

/* =====================================================================
   Select2 (single select) that matches Bootstrap 5.3.3  .form-control
   - same height, border, radius, font, focus ring as an <input class="form-control">
   - selected text centred horizontally and vertically
   - Bootstrap-style chevron instead of Select2's tiny triangle
   LOAD THIS FILE AFTER select2.min.css (and after bootstrap.min.css)
   Also init Select2 with  { width: '100%' }  so the width matches too.
   ===================================================================== */

/* ---------- the box ---------- */
.select2-container .select2-selection--single {
  position: relative;
  display: flex;
  align-items: center;
  /* vertical middle */
  height: calc(1.5em + .75rem + calc(var(--bs-border-width) * 2));
  /* = .form-control height (38px) */
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border: var(--bs-border-width) solid #2c3e50;
  border-radius: var(--bs-border-radius);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* ---------- the selected text: centred ---------- */
.select2-container .select2-selection--single .select2-selection__rendered {
  flex: 1 1 auto;
  min-width: 0;
  /*padding: 0 1.75rem;*/
  /* equal space left + right so the text is truly centred */
  line-height: 1.5;
  color: inherit;
  text-align: left;
  /* horizontal centre */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select2-container .select2-selection--single .select2-selection__placeholder {
  color: var(--bs-secondary-color);
}

/* ---------- the dropdown icon (Bootstrap's own chevron) ---------- */
.select2-container .select2-selection--single .select2-selection__arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  right: .75rem;
  width: 1rem;
  height: auto;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat center / 16px 12px;
  transition: transform .15s ease-in-out;
}

.select2-container .select2-selection--single .select2-selection__arrow b {
  display: none;
}

/* hide Select2's triangle */
[data-bs-theme="dark"] .select2-container .select2-selection--single .select2-selection__arrow {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.select2-container--open .select2-selection--single .select2-selection__arrow {
  transform: rotate(180deg);
}

/* ---------- the "x" clear button (allowClear: true) ---------- */
.select2-container .select2-selection--single .select2-selection__clear {
  position: absolute;
  top: 50%;
  right: 2rem;
  float: none;
  margin: 0;
  height: auto;
  padding: 0;
  line-height: 1;
  transform: translateY(-50%);
}

/* ---------- focus / open / disabled (same as .form-control:focus) ---------- */
.select2-container--focus .select2-selection--single,
.select2-container--open .select2-selection--single {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 var(--bs-focus-ring-width, .25rem) var(--bs-focus-ring-color, rgba(13, 110, 253, .25));
}

.select2-container--disabled .select2-selection--single {
  background-color: var(--bs-secondary-bg);
  opacity: 1;
  cursor: not-allowed;
}

/* ---------- dropdown panel ---------- */
.select2-dropdown {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border: var(--bs-border-width) solid #86b7fe;
  border-radius: var(--bs-border-radius);
}

.select2-container--open .select2-dropdown--below {
  margin-top: 2px;
}

.select2-container--open .select2-dropdown--above {
  margin-bottom: 2px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  height: calc(1.5em + .75rem + calc(var(--bs-border-width) * 2));
  padding: .375rem .75rem;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border: var(--bs-border-width) solid #2c3e50;
  border-radius: var(--bs-border-radius);
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 var(--bs-focus-ring-width, .25rem) var(--bs-focus-ring-color, rgba(13, 110, 253, .25));
}

.select2-container--default .select2-results__option {
  padding: .375rem .75rem;
  text-align: left;
}

/* remove text-align to keep list items left-aligned */
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--selected {
  color: var(--bs-body-color);
  background-color: var(--bs-tertiary-bg);
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  color: #fff;
  background-color: var(--bs-primary);
}

.form-control {
  border: var(--bs-border-width) solid #2c3e50 !important;
}


/* Badge  */
.badge-button {
  /* Base Badge & Button Sizing */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35em 0.65em;
  margin-left: 0.35em;
  font-size: 0.75em;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;

  /* Make it look like a rounded button */
  border-radius: 0.375rem;
  /* Use 50rem or .rounded-pill for pill style */
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

  /* Background and Text Colors */
  background-color: #0d6efd;
  /* Bootstrap primary blue or any custom hex/rgb */
  color: #ffffff;
  /* Text color */
}

/* Hover and Active States for Button Interactivity */
.badge-button:hover {
  background-color: #0b5ed7;
  color: #ffffff;
  transform: scale(1.05);
}

.badge-button:focus,
.badge-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.5);
}

.ms-1 {
  margin-left: 1em !important;
}

.ms-2 {
  margin-left: 2em !important;
}

.me-1 {
  margin-right: 1em !important;
}

.me-2 {
  margin-right: 2em !important;
}

.btn-top {
  margin-top: 1.85em !important;
}

.btn-top:hover {
  transform: scale(1.10);
}

.thick-icon {
  -webkit-text-stroke: 2px currentColor;
  /* Adds a 1px border around the icon */
}


.border-label {
  position: relative;
  border: 0.5px solid #303549;
  /* Bootstrap primary color */
  border-radius: .5rem;
  padding: 1.5rem;
  margin-top: 2rem;
}

.border-label>.label-text {
  position: absolute;
  top: -1rem;
  left: 0.25rem;
  background: #fff;
  padding: 0 .5rem;
  font-weight: 600;
  color: #303549;
}

/* Chrome, Safari, Edge, Opera */
.own_number_2::-webkit-outer-spin-button,
.own_number_2::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.own_number_2 {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Chrome, Safari, Edge, Opera */
.own_number::-webkit-outer-spin-button,
.own_number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.own_number {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Chrome, Safari, Edge, Opera */
.own_number_0::-webkit-outer-spin-button,
.own_number_0::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.own_number_0 {
  -moz-appearance: textfield;
  appearance: textfield;
}

.dash-card {
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.dash-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Optional: slight press effect when clicked */
.dash-card:active {
  transform: scale(0.98);
}

/* Default state: light border */
.form-control {
  border: 1px solid #e0e4ea !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover: slightly different shade */
/*.form-control:hover {
  border-color: #a5b4fc;
}


.form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
  outline: 0;
}*/