/* Custom styles for table ======================================================Table */
.grid-view {
  font-size: var(--font-size-body);
}
.grid-view .table > :not(caption) > * > * {
  padding: var(--space-3) var(--space-3);
}
.grid-view thead {
  background: var(--color-neutral-20);
}

.grid-view thead th > a,
.grid-view thead th {
  color: var(--color-neutral-90);
  font-weight: var(--bs-body-font-weight);
}

.grid-view th {
  position: relative;
  white-space: nowrap;
  /* padding: var(--space-2) var(--space-2) !important; */
  border-right: none !important; /* Remove standard border */
}

.grid-view th:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%; /* Starts 20% from the top */
  height: 60%; /* Ends 20% from the bottom */
  width: 1px;
  background-color: var(--bs-border-color); /* Separator color */
}
.grid-view th a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.grid-view th a:not(.asc):not(.desc) .kv-sort-icon::before {
  content: "swap_vert";
  color: #bdbdbd; /* Light gray */
  opacity: 0.5;
  font-variation-settings: "wght" 300;
}

.grid-view tbody > tr > td {
  background: var(--color-bg-canvas);
}

.grid-view .kv-sort-link .kv-sort-icon {
  display: flex;
}
.grid-view .kv-sort-link::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
}

.grid-view th a:not(.asc):not(.desc)::after {
  content: "▲\A▼";
  font-variation-settings: "FILL" 1;
  color: var(--bs-border-color);
  font-size: 10px;
  white-space: pre;
  line-height: 9px;
  display: inline-block;
  margin-left: 4px;
}
.grid-view a.asc .kv-sort-icon::before {
  content: "▲";
  font-variation-settings: "FILL" 1;
  color: var(--bs-border-color);
  font-size: 10px;
}

.grid-view a.desc .kv-sort-icon::before {
  content: "▼";
  font-variation-settings: "FILL" 1;
  color: var(--bs-border-color);
  font-size: 10px;
}

/* Custom styles for modal =================================================================== Modal */
.modal-header .btn-close {
  font-size: var(--font-size-small);
}
.modal-open .modal-backdrop {
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 1 !important;
}
.modal-content {
  border-radius: var(--radius-lg);
  background-color: var(--erp-modal-bg);
  /* border: 1px solid var(--erp-modal-border); */
}
.modal-header {
  background-color: var(--erp-modal-header-bg);
  border-bottom-color: var(--erp-modal-border);
}

/* Custom styles for modal close here */

/* Custom styles for _nav */
.nav-underline .nav-link.active,
.nav-underline .show > .nav-link {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
}
.material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}

a,
a:hover {
  text-decoration: none;
}

.navbar-brand-custom {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--erp-navbar-fg);
}

.logo-box {
  background-color: var(--erp-logo-bg);
  color: var(--erp-logo-fg);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-3);
  font-weight: 700;
}

.header-icons {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  color: var(--erp-navbar-fg);
  gap: var(--space-2);
}

.erp-top-link {
  color: var(--erp-navbar-fg);
  text-decoration: none;
  font-size: var(--font-size-body);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

.erp-top-link:hover {
  color: var(--erp-navbar-fg);
  background: color-mix(in srgb, var(--erp-navbar-fg) 12%, transparent);
}

.header-icon-btn {
  background: none;
  border: 0;
  color: var(--erp-navbar-fg);
  padding: 0;
  margin-left: var(--space-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-6);
  height: var(--size-6);
  border-radius: 999px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.header-icon-btn:hover {
  color: var(--erp-navbar-fg);
  background: color-mix(in srgb, var(--erp-navbar-fg) 12%, transparent);
}
/* 
.profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--erp-profile-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--erp-navbar-fg) 20%, transparent);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.profile-img:hover {
  background-color: color-mix(
    in srgb,
    var(--erp-profile-bg) 80%,
    var(--erp-navbar-fg) 20%
  );
  transform: translateY(-1px);
} */

/*** Custom styles for sidebar and icons ======================================================_icon_sidebar*/
.icon-sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.icon-item {
  padding: var(--space-3) 0;
  color: var(--color-secondary-60);
  cursor: pointer;
  width: calc(100% - var(--space-2));
  min-height: calc(var(--size-6) + var(--space-1));
  text-align: center;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  text-decoration: none;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-item:hover {
  background-color: var(--color-primary-10);
  color: var(--theme-dark);
}

.icon-item.active {
  background-color: var(--color-primary-10);
  color: var(--theme-dark);
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--color-primary-60) 30%, transparent);
}

.icon-version {
  font-size: var(--font-size-small);
}

.nav-list {
  list-style: none;
  padding: var(--space-3) var(--space-2);
  margin: 0;
}

/* Custom styles for text sidebar links ======================================================_text_sidebar */
.nav-link-custom {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--bs-body-color);
  text-decoration: none;
  font-size: var(--font-size-body);
  border-radius: var(--radius-md);
  margin: var(--space-1) 0;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-link-custom__content {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link-custom__icon {
  font-size: 18px;
  line-height: 1;
}

.nav-link-custom:hover {
  background-color: var(--theme-hover);
  color: var(--theme-dark);
}

.nav-link-custom.active {
  background-color: color-mix(
    in srgb,
    var(--theme-active) 75%,
    var(--color-bg-elevated) 25%
  );
  font-weight: 500;
  color: var(--theme-dark);
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--color-primary-60) 20%, transparent);
}

.erp-treeview .has-children > .nav-link-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.erp-treeview .has-children > .nav-link-custom::after {
  content: "expand_more";
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  transition: transform 0.2s ease;
}

.erp-treeview .has-children.is-open > .nav-link-custom::after {
  transform: rotate(180deg);
}

.erp-treeview__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.erp-treeview__submenu .nav-link-custom {
  padding-left: var(--space-8);
}

/*** Custom styles for page header and actions ======================================================_page_header */
.erp-page-header__container {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

.erp-page-header__left {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.erp-page-header__back {
  border: 1px solid var(--bs-border-color);
  background: var(--color-bg-elevated);
}

.erp-page-header__title {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-heading);
}

.erp-page-header__subtitle {
  color: var(--color-secondary-60);
  margin: 0;
}

.erp-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/*** Custom styles for breadcrumb ======================================================_breadcrumb */
.erp-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.erp-breadcrumb__item {
  color: var(--color-secondary-60);
  font-size: var(--font-size-small);
}

.erp-breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2);
}

.erp-breadcrumb__link {
  color: var(--bs-primary);
  text-decoration: none;
}

.erp-breadcrumb__text {
  color: var(--color-secondary-70);
}

/*** Custom styles for notifications and badges ======================================================_notifications */
.erp-notification-badge {
  position: absolute;
  top: calc(var(--space-1) * -1);
  right: calc(var(--space-2) * -1);
  background: var(--bs-danger);
  color: var(--color-neutral-10);
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-1);
}
/* Custom styles for dropdowns ======================================================_dropdown */

/* Hide the default dropdown arrow for a modern look */
.dropdown-toggle::after {
  display: none;
}

/* Smooth transition for hover effects */
.dropdown-item {
  transition: background 0.2s ease;
}

/* Custom spacing for the dropdown menu */
.dropdown-menu {
  min-width: 220px;
}

.dropdown-menu {
  margin-top: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 220px;
}

/* Ensure the arrow matches the dark header if you use one */
.dropdown-menu.dropdown-menu-dark::before {
  /* background: #343a40; */
  border: none;
}

.card,
.erp-card {
  border: 1px solid var(--bs-border-color);
  background: var(--color-bg-elevated);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card .card-header,
.erp-card .card-header {
  padding: var(--space-3) var(--space-4);
}

.erp-card__tools {
  display: flex;
  gap: var(--space-2);
}

.erp-card.is-collapsed .card-body,
.erp-card.is-collapsed .erp-card__body {
  display: none;
}

.erp-card.is-removed {
  display: none;
}

.erp-info-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--bs-border-color);
}

.erp-info-box__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.erp-info-box__label {
  color: var(--color-secondary-70);
  font-size: var(--font-size-small);
}

.erp-info-box__value {
  font-size: var(--font-size-h4);
  font-weight: 700;
  line-height: var(--line-height-heading);
}

.erp-info-box--primary .erp-info-box__icon {
  background: var(--color-primary-20);
  color: var(--color-primary-90);
}

.erp-info-box--success .erp-info-box__icon {
  background: var(--color-success-20);
  color: var(--color-success-90);
}

.erp-info-box--warning .erp-info-box__icon {
  background: var(--color-warning-20);
  color: var(--color-warning-90);
}

.erp-info-box--danger .erp-info-box__icon {
  background: var(--color-danger-20);
  color: var(--color-danger-90);
}

.alert {
  border-radius: var(--radius-md);
}

.erp-badge-status--success {
  background-color: var(--erp-status-success-bg);
  color: var(--erp-status-success-fg);
}

.erp-badge-status--warning {
  background-color: var(--erp-status-warning-bg);
  color: var(--erp-status-warning-fg);
}

.erp-badge-status--danger {
  background-color: var(--erp-status-danger-bg);
  color: var(--erp-status-danger-fg);
}

.erp-badge-status--info {
  background-color: var(--erp-status-info-bg);
  color: var(--erp-status-info-fg);
}

.erp-badge-status--neutral {
  background-color: var(--erp-status-neutral-bg);
  color: var(--erp-status-neutral-fg);
}

.erp-badge-token {
  border: 1px solid transparent;
}

.erp-badge-token--success {
  background-color: var(--erp-status-success);
  color: var(--color-success-100);
}

.erp-badge-token--warning {
  background-color: var(--erp-status-warning);
  color: var(--color-warning-100);
}

.erp-badge-token--danger {
  background-color: var(--erp-status-danger);
  color: var(--color-danger-100);
}

.erp-content {
  min-width: 0;
}
.form-container {
  position: relative;
  padding-bottom: var(--space-8);
}

.form-container::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  bottom: 0;
  border-bottom: 1px solid var(--bs-border-color);
  pointer-events: none;
}

form div.required > label::after {
  content: " *";
  color: red;
  margin-left: 0.25rem; /* Adds a small space between text and asterisk */
}

.form-control,
.form-select {
  border-radius: var(--radius-md);
}

.select2-container--bootstrap5 .select2-selection {
  border-radius: var(--radius-md);
}

.is-invalid {
  border-color: var(--bs-danger);
}

.erp-overlay {
  position: absolute;
  inset: 0;
  background: var(--erp-overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.erp-elevation-sm {
  box-shadow: var(--shadow-sm);
}

.erp-bg-surface {
  background: var(--color-bg-surface);
}

.theme-space-box {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--bs-border-color);
  background: var(--color-bg-surface);
}

.theme-utility-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.erp-text-muted {
  color: var(--color-neutral-60);
}

.company-setting-border-end {
  border-right: 1px solid var(--color-secondary-20);
}

.company-setting-logo-circle {
  background-color: var(--color-bg-surface);
  border: 2px dashed var(--color-neutral-30);
  width: 11.25rem;
  height: 11.25rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.company-setting-logo-circle:hover {
  background-color: var(--color-secondary-10);
  border-color: var(--color-neutral-50);
}

.company-setting-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-setting-logo-icon {
  font-size: 3rem;
}

.company-setting-logo-upload-icon {
  font-size: 2.5rem;
}

.company-setting-info-label {
  font-size: var(--font-size-small);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-secondary-60);
  font-weight: 700;
  min-width: 11.25rem;
  display: flex;
  align-items: center;
}

.company-setting-info-value {
  font-weight: 500;
  color: var(--bs-body-color);
  flex: 1;
}

.company-setting-detail-row {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--bs-border-color);
  width: 100%;
}

.company-setting-detail-row:last-child {
  border-bottom: 0;
}

.company-setting-section-separator {
  font-size: var(--font-size-small);
  font-weight: 800;
  color: var(--bs-primary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--bs-border-color);
  display: block;
}

.company-setting-form-title {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--bs-border-color);
}

@media (max-width: 991.98px) {
  .erp-top-link {
    display: none;
  }

  .erp-page-header__container {
    align-items: flex-start;
  }

  .company-setting-border-end {
    border-right: 0;
  }
}
