:root {
  --sidebar-width: 250px;
  --sidebar-width-collapsed: 60px;
}

body {
  min-height: 100vh;
}

.brand-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bs-secondary-bg);
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 56px); /* account for navbar height */
}

.sidebar {
  width: var(--sidebar-width);
  --bs-offcanvas-width: var(--sidebar-width);
  border-right: 1px solid var(--bs-border-color);
  flex: 0 0 var(--sidebar-width);
  transition: width 0.2s ease;
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
  --bs-offcanvas-width: var(--sidebar-width-collapsed);
  flex: 0 0 var(--sidebar-width-collapsed);
}

.sidebar .nav-link {
  padding: 0.3rem 0.45rem;
}

.sidebar .nav-link i {
  width: 1.25rem;
}

.sidebar .nav-link.active {
  font-weight: 600;
  color: var(--bs-primary);
}

.admin-main {
  margin-left: 0;
}

.admin-main > .container-fluid {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.navbar .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

.crm-funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.crm-funnel-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  color: var(--bs-body-color);
  background: var(--bs-tertiary-bg);
  text-decoration: none;
}

.crm-funnel-step:hover,
.crm-funnel-step:focus {
  color: var(--bs-body-color);
  background: var(--bs-secondary-bg);
  border-color: var(--bs-primary);
}

.crm-funnel-label {
  font-weight: 600;
}

.crm-funnel-count {
  min-width: 2.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
  text-align: center;
  font-weight: 700;
}

.crm-funnel-stage-1 {
  max-width: 100%;
}

.crm-funnel-stage-2 {
  max-width: 92%;
}

.crm-funnel-stage-3 {
  max-width: 84%;
}

.crm-funnel-stage-4 {
  max-width: 76%;
}

.crm-funnel-stage-5 {
  max-width: 68%;
}

.sidebar.collapsed .nav-link {
  padding: 0.35rem 0.35rem;
  justify-content: center;
}

.sidebar.collapsed .nav-link .nav-text {
  display: none;
}

@media (max-width: 991.98px) {
  .admin-layout {
    display: block;
  }
  .sidebar {
    width: 100%;
    border-right: none;
  }

  .crm-funnel-step {
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  /* offcanvas becomes static sidebar */
  .offcanvas-lg.sidebar {
    position: static;
    transform: none;
    visibility: visible;
    opacity: 1;
    box-shadow: none;
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
  }
}
