/* Consolidated extracted page and shared styles. */

/* Shared extracted styles */
/* Extracted shared inline styles */
.leave-navbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  color: #6d7693;
  font-size: 0.98rem;
  font-weight: 600;
  min-height: 40px;
}

.leave-navbar-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.leave-navbar-breadcrumbs a:hover {
  color: #6e3ef6;
}

.leave-navbar-breadcrumbs .active {
  color: #6e3ef6;
}

.leave-navbar-breadcrumbs i {
  font-size: 0.78rem;
  color: #8b92aa;
}

@media (max-width: 767.98px) {
  .leave-navbar-breadcrumbs {
    gap: 0.55rem;
    font-size: 0.9rem;
  }
}

.logout-modal {
  max-width: 700px;
}

.logout-modal .modal-content {
  border: 1px solid rgba(223, 231, 241, 0.95);
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.logout-modal .modal-header {
  padding: 1.55rem 1.8rem;
  border-bottom: 1px solid rgba(223, 231, 241, 0.92);
}

.logout-modal__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--app-text-primary);
  letter-spacing: -0.03em;
}

.logout-modal__title-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #fee2e2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.logout-modal .btn-close {
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(199, 210, 230, 0.95);
  border-radius: 50%;
  background-size: 0.95rem;
  opacity: 1;
  box-shadow: 0 8px 24px rgba(37, 55, 95, 0.08);
}

.logout-modal .btn-close:hover,
.logout-modal .btn-close:focus-visible {
  border-color: rgba(220, 38, 38, 0.3);
}

.logout-modal .modal-body {
  padding: 1.8rem 1.8rem 2rem;
}

.logout-modal__alert {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  margin: 0 auto 1.45rem;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.logout-modal__heading {
  margin: 0 0 0.7rem;
  text-align: center;
  font-size: clamp(1.45rem, 1.2rem + 0.5vw, 1.8rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--app-text-primary);
}

.logout-modal__text {
  margin: 0;
  text-align: center;
  color: var(--app-text-muted);
  font-size: 0.96rem;
  font-weight: 500;
}

.logout-modal .modal-footer {
  padding: 1.35rem 1.8rem 1.8rem;
  border-top: 1px solid rgba(223, 231, 241, 0.92);
  justify-content: flex-end;
  gap: 1rem;
}

.logout-modal__cancel,
.logout-modal__confirm {
  min-width: 126px;
  min-height: 52px;
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.78rem 1.35rem;
}

.logout-modal__cancel {
  border: 1px solid rgba(217, 227, 240, 0.98);
  background: #ffffff;
  color: #24355f;
}

.logout-modal__cancel:hover,
.logout-modal__cancel:focus-visible {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.logout-modal__confirm {
  border: 0;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

.logout-modal__confirm:hover,
.logout-modal__confirm:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

@media (max-width: 767.98px) {
  .logout-modal {
    max-width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }

  .logout-modal .modal-header,
  .logout-modal .modal-body,
  .logout-modal .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .logout-modal .modal-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .logout-modal .modal-footer {
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
    }

  .logout-modal__cancel,
  .logout-modal__confirm {
      width: auto;
      min-width: 124px;
      min-height: 48px;
      padding: 0.72rem 1.1rem;
      font-size: 0.94rem;
    }

  .logout-modal .modal-footer form {
      margin: 0;
      flex: 0 0 auto;
    }

  .logout-modal__cancel {
      flex: 0 0 auto;
    }

  .logout-modal__confirm {
      flex: 0 0 auto;
    }
  }

.navbar-search-group {
  max-width: 300px;
}

.navbar-search-button {
  border-left: none;
}

.sidebar-section-title {
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.user-profile-label-col {
  width: 220px;
}

.user-profile-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
}

.user-profile-photo--fallback {
  background: #6c757d;
  color: #fff;
  font-weight: 700;
  font-size: 32px;
}

.user-detail-avatar-shell {
  width: 110px;
  height: 120px;
  background: #6c757d;
  border-radius: 0;
}

.user-detail-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-detail-avatar-initial {
  font-size: 1.5rem;
}

.user-detail-name {
  font-size: 1.2rem;
}

.user-detail-meta {
  font-size: 1rem;
}

.account-hidden-form {
  display: none;
}

/* Leave detail */
:root {
  --leave-detail-primary: #6e3ef6;
  --leave-detail-primary-deep: #5a2fe0;
  --leave-detail-primary-soft: #f4efff;
  --leave-detail-border: #ebe8f5;
  --leave-detail-surface: #ffffff;
  --leave-detail-surface-tint: linear-gradient(90deg, #fbfaff 0%, #f7f8ff 100%);
  --leave-detail-text: #1b2650;
  --leave-detail-muted: #6d7693;
  --leave-detail-danger: #ef4444;
  --leave-detail-danger-deep: #dc2626;
  --leave-detail-success: #16a34a;
  --leave-detail-warning: #fbbf24;
  --leave-detail-shadow: 0 18px 48px rgba(34, 28, 78, 0.08);
}

.leave-detail-page {
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(110, 62, 246, 0.06), transparent 24%),
    linear-gradient(180deg, #f7f8fc 0%, #f4f6fb 100%);
  min-height: 100%;
}

.leave-detail-shell {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

.leave-detail-content {
  padding: 1.35rem 1.5rem 1.5rem;
}

.leave-detail-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(232, 230, 243, 0.9);
  border-radius: 22px;
  box-shadow: var(--leave-detail-shadow);
  backdrop-filter: blur(10px);
  padding: 1.85rem;
  overflow: hidden;
}

.leave-detail-profile {
  margin-top: 1.5rem;
  background: var(--leave-detail-surface);
  overflow: hidden;
}

.leave-detail-profile__top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--leave-detail-surface-tint);
}

.leave-detail-profile__employee {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.leave-detail-avatar,
.leave-detail-avatar--fallback {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(44, 40, 77, 0.12);
  flex-shrink: 0;
}

.leave-detail-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5f6a7d 0%, #2f3745 100%);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.leave-detail-identity {
  min-width: 0;
}

.leave-detail-identity h2 span {
  color: #54607e;
  font-size: 1.25rem;
  font-weight: 600;
}

.leave-detail-department {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  color: var(--leave-detail-text);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.leave-detail-department strong {
  font-weight: 600;
}

.leave-detail-department span {
  color: var(--leave-detail-primary);
  font-weight: 700;
}

.leave-detail-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.92rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.leave-detail-status.pending {
  background: rgba(251, 191, 36, 0.2);
  color: #9a6700;
}

.leave-detail-status.approved {
  background: rgba(22, 163, 74, 0.14);
  color: #117239;
}

.leave-detail-status.rejected {
  background: rgba(239, 68, 68, 0.14);
  color: #c02828;
}

.leave-detail-body {
  padding: 0 1rem 1rem;
}

.leave-detail-row {
  display: grid;
  grid-template-columns: 48px minmax(180px, 280px) minmax(0, 1fr);
  gap: 0.95rem;
  align-items: center;
  padding: 1rem 0.1rem;
  border-bottom: 1px solid var(--leave-detail-border);
}

.leave-detail-row:last-child {
  border-bottom: none;
}

.leave-detail-row__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(109, 53, 245, 0.1);
  color: var(--leave-detail-primary);
  font-size: 1rem;
}

.leave-detail-row__label {
  color: var(--leave-detail-text);
  font-size: 1rem;
  font-weight: 700;
}

.leave-detail-row__value {
  color: #3b4562;
  font-size: 1rem;
  text-align: right;
}

.leave-detail-row__value--reason {
  text-align: left;
  white-space: pre-line;
}

.leave-detail-schedule {
  margin-top: 0.2rem;
  border: 1px solid var(--leave-detail-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.leave-detail-schedule__head,
.leave-detail-schedule__row,
.leave-detail-schedule__total {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
}

.leave-detail-schedule__head {
  background: linear-gradient(90deg, #faf8ff 0%, #f4f6ff 100%);
  color: var(--leave-detail-text);
  font-weight: 800;
}

.leave-detail-schedule__row {
  color: #42506c;
  border-top: 1px solid var(--leave-detail-border);
}

.leave-detail-schedule__total {
  border-top: 1px solid var(--leave-detail-border);
  color: var(--leave-detail-text);
  font-size: 1.02rem;
}

.leave-detail-schedule__total strong:nth-child(2) {
  text-align: right;
}

.leave-detail-comment {
  margin-top: 1.5rem;
}

.leave-detail-comment label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--leave-detail-text);
  font-size: 1rem;
  font-weight: 800;
}

.leave-detail-comment textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid #d7dbea;
  border-radius: 14px;
  background: #fff;
  color: var(--leave-detail-text);
  font-size: 1rem;
  padding: 1rem 1.1rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.leave-detail-comment textarea:focus {
  outline: none;
  border-color: rgba(109, 53, 245, 0.55);
  box-shadow: 0 0 0 4px rgba(109, 53, 245, 0.12);
}

.leave-detail-actions {
  margin-top: 1.6rem;
  display: flex;
  justify-content: flex-end;
  gap: 1.05rem;
  flex-wrap: wrap;
}

.leave-detail-btn {
  min-width: 112px;
  padding: 0.82rem 1.3rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.leave-detail-btn:hover {
  transform: translateY(-1px);
}

.leave-detail-btn--ghost {
  background: #fff;
  border-color: #d7dbea;
  color: var(--leave-detail-text);
}

.leave-detail-btn--ghost:hover {
  box-shadow: 0 10px 20px rgba(26, 35, 55, 0.08);
  color: var(--leave-detail-text);
}

.leave-detail-btn--approve {
  background: linear-gradient(135deg, var(--leave-detail-primary) 0%, var(--leave-detail-primary-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(88, 38, 216, 0.25);
}

.leave-detail-btn--approve:hover {
  color: #fff;
  box-shadow: 0 18px 32px rgba(88, 38, 216, 0.32);
}

.leave-detail-btn--reject {
  background: linear-gradient(135deg, var(--leave-detail-danger) 0%, var(--leave-detail-danger-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.2);
}

.leave-detail-btn--reject:hover {
  color: #fff;
  box-shadow: 0 18px 32px rgba(220, 38, 38, 0.28);
}

@media (max-width: 991.98px) {
  .leave-detail-page {
    padding: 0;
  }

  .leave-detail-card {
    padding: 1.25rem;
    border-radius: 20px;
  }

  .leave-detail-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .leave-detail-profile__top {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .leave-detail-status,
  .leave-detail-department {
    justify-self: start;
    text-align: left;
  }

  .leave-detail-row {
    grid-template-columns: 40px 1fr;
  }

  .leave-detail-row__value {
    grid-column: 2 / -1;
    text-align: left;
    padding-left: 0;
  }
}

@media (max-width: 767.98px) {
  .leave-detail-profile__employee {
    align-items: flex-start;
  }

  .leave-detail-avatar,
  .leave-detail-avatar--fallback {
    width: 76px;
    height: 76px;
  }

  .leave-detail-identity h2 {
    font-size: 1.5rem;
  }

  .leave-detail-identity h2 span {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.05rem;
  }

  .leave-detail-profile {
    border-radius: 14px;
  }

  .leave-detail-schedule {
    overflow-x: auto;
  }

  .leave-detail-schedule__head,
  .leave-detail-schedule__row,
  .leave-detail-schedule__total {
    min-width: 540px;
  }

  .leave-detail-actions {
    justify-content: stretch;
  }

  .leave-detail-btn {
    flex: 1 1 100%;
  }
}

/* Leave history */
.leave-history-page {
  --history-border: #dfe7f1;
  --history-muted: #6d7a92;
  --history-text: #17233b;
  --history-purple: #7c3aed;
  --history-shadow: 0 22px 50px rgba(15, 23, 42, 0.06);
  color: var(--history-text);
}

.content-wrapper {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.06), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
}

.leave-history-shell {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--history-border);
  border-radius: 24px;
  box-shadow: var(--history-shadow);
  overflow: visible;
}

.leave-history-shell__top {
  padding: 1.4rem 1.5rem 1.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.leave-history-page__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--history-muted);
  font-size: 0.96rem;
  margin-bottom: 1rem;
}

.leave-history-page__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.leave-history-page__breadcrumbs a:hover {
  color: var(--history-purple);
}

.leave-history-page__breadcrumbs .active {
  color: var(--history-purple);
  font-weight: 700;
}

.leave-history-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.leave-history-page__create {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 1.15rem;
  text-decoration: none;
  box-shadow: none;
}

.leave-history-page__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.leave-history-tabs {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  border: 1px solid var(--history-border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.82);
}

.leave-history-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  color: var(--history-text);
  text-decoration: none;
  font-weight: 600;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  background: transparent;
}

.leave-history-tab:last-child {
  border-right: 0;
}

.leave-history-tab--active {
  color: var(--history-purple);
  background: rgba(124, 58, 237, 0.08);
}

.leave-history-tab__count {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.leave-history-tab__count--all {
  background: rgba(124, 58, 237, 0.14);
  color: var(--history-purple);
}

.leave-history-tab__count--approved {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.leave-history-tab__count--pending {
  background: rgba(245, 158, 11, 0.16);
  color: #a16207;
}

.leave-history-tab__count--rejected {
  background: rgba(244, 63, 94, 0.14);
  color: #e11d48;
}

.leave-history-toolbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.leave-history-search {
  min-width: min(100%, 290px);
}

.leave-history-search .input-group {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--history-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--history-shadow);
}

.leave-history-search .form-control {
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--history-text);
  padding-left: 1rem;
}

.leave-history-search .form-control:focus {
  box-shadow: none;
}

.leave-history-search .btn {
  border: 0;
  background: transparent;
  color: var(--history-muted);
  padding-inline: 1rem;
}

.leave-history-toolbar__button {
  min-width: 54px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--history-border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--history-text);
  box-shadow: var(--history-shadow);
}

.leave-history-toolbar__button--wide {
  min-width: 104px;
  padding-inline: 1rem;
}

.leave-history-sort-item label {
  width: 100%;
  cursor: pointer;
}

.leave-history-sort-item input {
  margin-right: 0.55rem;
}

.leave-history-table-wrap {
  overflow: visible;
}

.leave-history-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.leave-history-table thead th {
  padding: 1.25rem 1rem;
  background: rgba(248, 250, 252, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--history-text) !important;
  text-transform: none !important;
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.leave-history-table tbody td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  vertical-align: middle;
  color: var(--history-text) !important;
  font-size: 0.98rem !important;
}

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

.leave-history-employee {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.leave-history-employee__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #94a3b8, #6b7280);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.leave-history-employee__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leave-history-employee__name {
  margin: 0;
  font-weight: 700;
}

.leave-history-employee__sub {
  color: var(--history-muted);
  font-size: 0.92rem;
}

.leave-history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.leave-history-badge--approved {
  background: #16a34a;
  color: #fff;
}

.leave-history-badge--pending {
  background: #f4b400;
  color: #1f2937;
}

.leave-history-badge--rejected {
  background: #ef4444;
  color: #fff;
}

.leave-history-badge--cancelled {
  background: #64748b;
  color: #fff;
}

.leave-history-actions {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--history-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
}

.leave-history-actions__link,
.leave-history-actions__toggle {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--history-text);
  background: transparent;
  border: 0;
  text-decoration: none;
}

.leave-history-actions__toggle {
  border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.leave-history-table__action-cell .dropdown-menu {
  z-index: 1080;
}

.leave-history-table__action-cell,
.leave-history-table__action-cell .dropdown {
  position: relative;
}

.leave-history-table__action-cell .dropdown-menu.show {
  display: block;
}

.leave-history-shell__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem 1.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.leave-history-shell__count {
  font-size: 0.98rem;
}

.leave-history-shell__pager {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.leave-history-shell__page-size {
  min-width: 112px;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--history-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--history-text);
}

.leave-history-shell .pagination {
  margin: 0;
  gap: 0.55rem;
}

.leave-history-shell .page-item .page-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #5b21b6;
  font-weight: 600;
  box-shadow: none;
}

.leave-history-shell .page-item .page-link:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.28);
}

.leave-history-shell .page-item.active .page-link {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.leave-history-shell .page-item.disabled .page-link {
  background: #f8fafc;
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}

.leave-history-empty {
  text-align: center;
  padding: 2.6rem 1rem;
  color: var(--history-muted);
}

.leave-history-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.leave-history-offcanvas .offcanvas-body {
  display: grid;
  gap: 1rem;
}

.leave-history-offcanvas .form-control,
.leave-history-offcanvas .form-select {
  min-height: 46px;
  border-radius: 12px;
}

@media (max-width: 991.98px) {

  .leave-history-page__header,
  .leave-history-page__controls,
  .leave-history-shell__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .leave-history-toolbar {
    justify-content: stretch;
  }

  .leave-history-search {
    min-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .leave-history-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
  }

  .leave-history-tabs {
    width: 100%;
  }

  .leave-history-tab {
    flex: 1 1 48%;
    justify-content: center;
  }

  .leave-history-table thead {
    display: none;
  }

  .leave-history-table tbody tr {
    display: block;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding: 0.5rem 0;
  }

  .leave-history-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.55rem 1rem;
    border: 0;
  }

  .leave-history-table tbody td::before {
    content: attr(data-colname);
    font-weight: 700;
    color: var(--history-text);
  }

  .leave-history-table tbody td.leave-history-table__employee-cell::before,
  .leave-history-table tbody td.leave-history-table__action-cell::before {
    content: "";
  }

  .leave-history-table tbody td.leave-history-table__employee-cell,
  .leave-history-table tbody td.leave-history-table__action-cell {
    display: block;
  }
}

/* User list */
.users-page {
  --users-border: #dfe7f1;
  --users-muted: #6d7a92;
  --users-text: #17233b;
  --users-purple: #7c3aed;
  --users-shadow: 0 22px 50px rgba(15, 23, 42, 0.06);
  color: var(--users-text);
}

.content-wrapper {
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.06), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
}

.users-shell {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--users-border);
  border-radius: 24px;
  box-shadow: var(--users-shadow);
  overflow: visible;
}

.users-shell__top {
  padding: 1.45rem 1.55rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.users-page__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--users-muted);
  font-size: 0.96rem;
  margin-bottom: 1rem;
}

.users-page__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.users-page__breadcrumbs a:hover {
  color: var(--users-purple);
}

.users-page__breadcrumbs .active {
  color: var(--users-purple);
  font-weight: 700;
}

.users-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.users-page__title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.users-page__count {
  padding: 0.38rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--users-border);
  background: rgba(248, 250, 252, 0.9);
  font-weight: 700;
  font-size: 0.98rem;
}

.users-page__subtitle {
  margin: 0;
  color: var(--users-muted);
}

.users-page__add {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.2rem;
  text-decoration: none;
  box-shadow: none;
}

.users-page__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.users-page__showing {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--users-text);
  font-size: 1rem;
}

.users-page__showing-box {
  min-width: 78px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--users-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--users-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.users-toolbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.users-search {
  min-width: min(100%, 320px);
}

.users-search .input-group {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--users-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--users-shadow);
}

.users-search .form-control {
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--users-text);
  padding-left: 1rem;
}

.users-search .form-control:focus {
  box-shadow: none;
}

.users-search .btn {
  border: 0;
  background: transparent;
  color: var(--users-muted);
  padding-inline: 1rem;
}

.users-toolbar__button {
  min-width: 54px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--users-border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--users-text);
  box-shadow: var(--users-shadow);
}

.users-toolbar__button--wide {
  min-width: 96px;
  padding-inline: 1rem;
}

.users-sort-item label {
  width: 100%;
  cursor: pointer;
}

.users-sort-item input {
  margin-right: 0.55rem;
}

.users-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.users-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.users-table thead th {
  padding: 1.25rem 1rem;
  background: rgba(248, 250, 252, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--users-text) !important;
  text-transform: none !important;
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.users-table tbody td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  vertical-align: middle;
  color: var(--users-text) !important;
  font-size: 0.98rem !important;
}

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

.users-employee {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.users-employee__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #94a3b8, #6b7280);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.users-employee__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.users-employee__name {
  margin: 0;
  font-weight: 700;
}

.users-employee__sub {
  color: var(--users-muted);
  font-size: 0.92rem;
}

.users-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid;
}

.users-status--active {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.55);
}

.users-status--inactive {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.45);
}

.users-actions {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--users-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
}

.users-actions__link,
.users-actions__toggle {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--users-text);
  background: transparent;
  border: 0;
  text-decoration: none;
}

.users-actions__toggle {
  border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.users-table__action-cell .dropdown-menu {
  z-index: 1080;
}

.users-shell__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem 1.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.users-shell__count {
  font-size: 0.98rem;
}

.users-shell .pagination {
  margin: 0;
  gap: 0.55rem;
}

.users-shell .page-item .page-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #5b21b6;
  font-weight: 600;
}

.users-shell .page-item .page-link:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.28);
}

.users-shell .page-item.active .page-link {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.users-shell .page-item.disabled .page-link {
  background: #f8fafc;
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}

.users-empty {
  text-align: center;
  padding: 2.6rem 1rem;
  color: var(--users-muted);
}

.users-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.users-offcanvas .offcanvas-body {
  display: grid;
  gap: 1rem;
}

.users-offcanvas .form-control {
  min-height: 46px;
  border-radius: 12px;
}

@media (max-width: 991.98px) {

  .users-page__header,
  .users-page__controls,
  .users-shell__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .users-toolbar {
    justify-content: stretch;
  }

  .users-search {
    min-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .users-table thead {
    display: none;
  }

  .users-table tbody tr {
    display: block;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding: 0.5rem 0;
  }

  .users-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.55rem 1rem;
    border: 0;
  }

  .users-table tbody td::before {
    content: attr(data-colname);
    font-weight: 700;
    color: var(--users-text);
  }

  .users-table tbody td.users-table__employee-cell::before,
  .users-table tbody td.users-table__action-cell::before {
    content: "";
  }

  .users-table tbody td.users-table__employee-cell,
  .users-table tbody td.users-table__action-cell {
    display: block;
  }
}
