.figtree {
  font-family: 'Figtree', sans-serif;
}

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

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

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

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

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

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

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

.p-2-5 {
  padding: 0.65rem 0.85rem !important;
}

label.required::after {
  content: " *";
  color: red;
}

@media (max-width: 576px) {
  .d-xs-none {
    display: none !important;
  }

  .d-xs {
    display: flex;
  }
}

@media (min-width: 576px) {
  .d-inline {
    display: inline;
  }

  .d-sm-none {
    display: none;
  }
}

/* Compact Slim Sidebar */
#layout-menu .menu-inner .menu-item .menu-link {
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
  margin-top: 0.1rem !important;
  margin-bottom: 0.1rem !important;
}

#layout-menu .menu-inner .menu-header {
  margin-top: 0.75rem !important;
  margin-bottom: 0.25rem !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

#layout-menu .app-brand {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
  min-height: 56px !important;
}

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

/* Select2 Sneat Alignment */
.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 38px !important;
  border: 1px solid #d9dee3 !important;
  border-radius: 0.375rem !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
  padding-left: 0.875rem !important;
  color: #566a7f !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 8px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #696cff !important;
  box-shadow: 0 0 0.25rem 0.05rem rgba(105, 108, 255, 0.1) !important;
}

/* Select2 Invalid State */
.form-select.is-invalid+.select2-container .select2-selection,
.select2.is-invalid+.select2-container .select2-selection {
  border-color: #ff3e1d !important;
}

.form-select.is-invalid~.invalid-feedback,
.select2.is-invalid~.invalid-feedback {
  display: block !important;
}

/* Form Section Card Polish */
.card-title {
  color: #566a7f;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

/* Sneat DataTables Custom Styling */
.card-datatable {
  position: relative;
}

.dataTables_wrapper {
  font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_length {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #697a8d;
  font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_length select {
  width: auto;
  min-width: 4.5rem;
  padding: 0.25rem 1.75rem 0.25rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 0.375rem;
  border: 1px solid #d9dee3;
  color: #566a7f;
  background-color: #fff;
}

.dataTables_wrapper .dataTables_info {
  color: #a1acb8;
  font-size: 0.85rem;
  padding-top: 0 !important;
}

.dataTables_wrapper .dataTables_paginate {
  margin: 0 !important;
}

.dataTables_wrapper .pagination {
  margin-bottom: 0;
  gap: 2px;
}

.dataTables_wrapper .page-item .page-link {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  font-size: 0.85rem;
  color: #697a8d;
  border-radius: 0.375rem !important;
  border: 1px solid transparent;
  background-color: #f5f5f9;
  transition: all 0.2s ease-in-out;
}

.dataTables_wrapper .page-item:not(.active):not(.disabled) .page-link:hover {
  background-color: #e7e7ff;
  color: #696cff;
}

.dataTables_wrapper .page-item.active .page-link {
  background-color: #696cff !important;
  border-color: #696cff !important;
  color: #fff !important;
  box-shadow: 0 0.125rem 0.25rem rgba(105, 108, 255, 0.4);
}

.dataTables_wrapper .page-item.disabled .page-link {
  color: #c7cdd4;
  background-color: #fbfbfb;
  cursor: not-allowed;
}

table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

table.dataTable thead th,
.table thead th {
  font-size: 0.75rem !important;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #566a7f;
  background-color: #f5f5f9 !important;
  border-bottom: 1px solid #d9dee3 !important;
  border-top: none !important;
  padding: 0.75rem 0.85rem !important;
  font-weight: 600;
}

table.dataTable tbody td,
.table tbody td {
  font-size: 0.8125rem !important;
  padding: 0.65rem 0.85rem !important;
  border-bottom: 1px solid #f0f2f4 !important;
  color: #566a7f;
  vertical-align: middle;
}

table.dataTable tbody td .small,
table.dataTable tbody td small,
.table tbody td .small,
.table tbody td small {
  font-size: 0.72rem !important;
}

table.dataTable tbody td .badge,
.table tbody td .badge {
  font-size: 0.72rem !important;
  padding: 0.3em 0.55em;
}

table.dataTable tbody td .btn-sm,
.table tbody td .btn-sm {
  font-size: 0.75rem !important;
  padding: 0.3rem 0.65rem !important;
  font-weight: 500 !important;
  border-radius: 0.375rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.3 !important;
  transition: all 0.2s ease-in-out !important;
}

table.dataTable tbody td .btn-sm i,
.table tbody td .btn-sm i {
  font-size: 0.875rem !important;
}

/* Enhanced Outline Action Buttons */
.table .btn-outline-primary,
table.dataTable .btn-outline-primary {
  color: #696cff !important;
  border: 1px solid #696cff !important;
  background-color: rgba(105, 108, 255, 0.05) !important;
}

.table .btn-outline-primary:hover,
table.dataTable .btn-outline-primary:hover {
  color: #fff !important;
  background-color: #696cff !important;
  border-color: #696cff !important;
  box-shadow: 0 0.125rem 0.375rem 0 rgba(105, 108, 255, 0.35) !important;
}

.table .btn-outline-secondary,
table.dataTable .btn-outline-secondary {
  color: #697a8d !important;
  border: 1px solid #d9dee3 !important;
  background-color: #fff !important;
}

.table .btn-outline-secondary:hover,
table.dataTable .btn-outline-secondary:hover {
  color: #fff !important;
  background-color: #8592a3 !important;
  border-color: #8592a3 !important;
  box-shadow: 0 0.125rem 0.375rem 0 rgba(133, 146, 163, 0.35) !important;
}

table.dataTable.table-hover tbody tr:hover td,
.table.table-hover tbody tr:hover td {
  background-color: #fafafc !important;
}

/* ==========================================================================
   App Navbar – Primary Navigation
   ========================================================================== */
.app-navbar {
  background-color: #fff;
  border-bottom: 1px solid #e7eaf0;
  box-shadow: 0 2px 8px rgba(105, 108, 255, 0.06);
  padding: 0 0;
  min-height: 62px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-navbar .navbar-brand {
  gap: 0.5rem;
}

.app-navbar .app-brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #566a7f;
}

.app-navbar .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #697a8d;
  padding: 0.55rem 0.95rem;
  border-radius: 0.375rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.app-navbar .nav-link:hover {
  color: #696cff;
  background-color: rgba(105, 108, 255, 0.06);
}

.app-navbar .nav-link.active {
  color: #696cff !important;
  background-color: rgba(105, 108, 255, 0.1);
  font-weight: 600;
}

.app-navbar .nav-link .bx {
  font-size: 1rem;
  vertical-align: -1px;
}

/* Badge next to nav links (action count) */
.app-navbar .nav-badge {
  font-size: 0.7rem;
  padding: 0.2em 0.45em;
  line-height: 1;
}

/* Navbar toggler styling (mobile) */
.app-navbar .navbar-toggler {
  border: 1px solid #d9dee3;
  padding: 0.3rem 0.5rem;
  border-radius: 0.375rem;
}

.app-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(105, 108, 255, 0.25);
}

/* Mobile Drawer Sidebar Styles */
@media (max-width: 991.98px) {
  #layout-menu {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100% !important;
    z-index: 1080 !important;
    width: 16.25rem !important;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.25s ease-in-out;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
  }

  .layout-menu-expanded #layout-menu {
    transform: translate3d(0, 0, 0) !important;
  }

  .layout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(34, 48, 62, 0.5);
    z-index: 1079;
    display: none;
    cursor: pointer;
  }

  .layout-menu-expanded .layout-overlay {
    display: block !important;
  }

  /* Fix user dropdown alignment on mobile */
  .app-navbar .navbar-nav .nav-item.dropdown-user {
    position: relative !important;
    float: none !important;
  }

  .app-navbar .navbar-nav .nav-item.dropdown-user .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    min-width: 14rem !important;
    max-width: 90vw !important;
    width: auto !important;
    margin-top: 0.5rem !important;
    transform: none !important;
    box-shadow: 0 0.5rem 1.25rem rgba(67, 89, 113, 0.15) !important;
  }
}

/* ==========================================================================
   Full-Width Layout (no sidebar on desktop)
   ========================================================================== */
.layout-wrapper.layout-navbar-full {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-page-no-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.layout-page-no-sidebar .content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Ensure content wrapper fills full width without sidebar offset */
.layout-navbar-full .layout-page-no-sidebar,
.layout-navbar-full .layout-page-no-sidebar .content-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ==========================================================================
   Table Detail View (Clean, structured key-value table)
   ========================================================================== */
.table-detail {
  margin-bottom: 0 !important;
}

.table-detail th {
  color: #8592a3 !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid #f2f3f6 !important;
  background-color: transparent !important;
  vertical-align: middle;
}

.table-detail td {
  color: var(--bs-heading-color, #384551) !important;
  font-size: 0.8125rem !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid #f2f3f6 !important;
  vertical-align: middle;
}

.table-detail td.text-primary,
.table-detail td .text-primary {
  color: #696cff !important;
}

.table-detail td.text-success,
.table-detail td .text-success {
  color: #71dd37 !important;
}

.table-detail tr:last-child th,
.table-detail tr:last-child td {
  border-bottom: none !important;
}

/* Responsive Mobile Layout for Table Detail Cards (Stack to List) */
@media (max-width: 767.98px) {
  .table-responsive:has(> .table-detail) {
    overflow-x: visible !important;
  }

  .table-detail,
  .table-detail tbody,
  .table-detail tr {
    display: block !important;
    width: 100% !important;
  }

  .table-detail tr {
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid #f2f3f6 !important;
  }

  .table-detail tr:last-child {
    border-bottom: none !important;
  }

  .table-detail th,
  .table-detail td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
  }

  .table-detail th {
    font-size: 0.72rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #a1acb8 !important;
    margin-bottom: 0.15rem !important;
    padding-top: 0 !important;
  }

  .table-detail td {
    font-size: 0.875rem !important;
    color: var(--bs-heading-color, #384551) !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0 !important;
  }

  /* Last field within a row item doesn't need bottom margin */
  .table-detail td:last-child {
    margin-bottom: 0 !important;
  }

  /* Second pair of th/td on 4-cell rows */
  .table-detail th:nth-of-type(2) {
    margin-top: 0.5rem !important;
  }
}

/* ==========================================================================
   Icon Aliases & Adjustments
   ========================================================================== */
.bx-plane,
.bx.bx-plane {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M22 16.21v-1.895L14 8V4a2 2 0 0 0-4 0v4.105L2 14.42v1.789l8-2.81V18l-3 2v2l5-2l5 2v-2l-3-2v-4.685z'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Audit History Timeline / Stepper (Pixel-Perfect Alignment)
   ========================================================================== */
.timeline {
  position: relative;
  list-style: none;
  padding: 0.25rem 0 0 0.25rem;
  margin: 0;
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 1.5rem;
  border-left: none !important;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: 0;
  width: 2px;
  background-color: #e7e7ff;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-point {
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #696cff;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.25);
  z-index: 2;
}

.timeline-point-primary {
  background-color: #696cff !important;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.25) !important;
}

.timeline-point-success {
  background-color: #71dd37 !important;
  box-shadow: 0 0 0 3px rgba(113, 221, 55, 0.25) !important;
}

.timeline-point-warning {
  background-color: #ffab00 !important;
  box-shadow: 0 0 0 3px rgba(255, 171, 0, 0.25) !important;
}

.timeline-point-danger {
  background-color: #ff3e1d !important;
  box-shadow: 0 0 0 3px rgba(255, 62, 29, 0.25) !important;
}

.timeline-point-info {
  background-color: #03c3ec !important;
  box-shadow: 0 0 0 3px rgba(3, 195, 236, 0.25) !important;
}

.timeline-event {
  position: relative;
  top: -1px;
}

/* ==========================================================================
   Avatar Utilities
   ========================================================================== */
.avatar-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-lg {
  width: 96px;
  height: 96px;
  object-fit: cover;
}

/* ==========================================================================
   Stat Box (used on show/detail pages for summary counts)
   ========================================================================== */
.stat-box {
  border: 1px solid #eceef1;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  background-color: #fafafa;
  transition: box-shadow 0.2s ease;
}

.stat-box:hover {
  box-shadow: 0 2px 8px rgba(105, 108, 255, 0.08);
}

.stat-box .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-box .stat-label {
  font-size: 0.75rem;
  color: #a1acb8;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Password Input Toggle & Input Group Merge Error State
   ========================================================================== */
.form-password-toggle .input-group-text {
  cursor: pointer;
  user-select: none;
}

.input-group.input-group-merge .form-control.is-invalid ~ .input-group-text {
  border-color: #ff3e1d !important;
}

.input-group.input-group-merge .form-control.is-invalid:focus ~ .input-group-text {
  border-color: #ff3e1d !important;
  box-shadow: 0 0 0.25rem 0.05rem rgba(255, 62, 29, 0.1);
}

.invalid-feedback:not(:empty) {
  display: block;
}

/* ==========================================================================
   Authentication Brand Title (Mobile Responsiveness)
   ========================================================================== */
.authentication-wrapper .app-brand {
  min-height: auto !important;
  margin-bottom: 1.25rem !important;
  width: 100%;
}

.authentication-wrapper .app-brand-link {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

@media (max-width: 575.98px) {
  .authentication-wrapper .app-brand {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .authentication-wrapper .app-brand-text.demo {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
    letter-spacing: -0.2px !important;
    word-break: break-word;
    white-space: normal;
    text-align: center;
  }

  .authentication-wrapper .app-brand-logo {
    width: 28px !important;
    height: 28px !important;
  }
}
