/* ============================================================
   PURPLE ADMIN — shared stylesheet
   ============================================================ */
:root {
  --primary: #b66dff;
  --secondary: #d7dae3;
  --success: #1bcfb4;
  --info: #198ae3;
  --warning: #fed713;
  --danger: #fe7c96;
  --light: #f8f9fa;
  --dark: #3e4b5b;

  --sidebar-bg: #ffffff;
  --sidebar-width: 255px;
  --navbar-height: 70px;

  /* --body-bg: #f2edf3; */
  --body-bg: #f3f6fb;
  --text-muted: #9c9fa6;
  --text-default: #001737;
  --border-color: #ebedf2;
}

* {
  box-sizing: border-box;
}

html,
body {
  font-family: "Rubik", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--body-bg);
  color: var(--text-default);
  font-size: 14px;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

/* ===================== TOP NAVBAR ===================== */
.top-navbar {
  height: var(--navbar-height);
  background: #fff;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.navbar-brand-wrapper {
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 25px;
  border-right: 1px solid var(--border-color);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 28px;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.navbar-brand i {
  font-size: 26px;
}

.navbar-menu-wrapper {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 25px;
  justify-content: space-between;
}

.nav-toggler {
  background: transparent;
  border: 0;
  color: #5a5e76;
  font-size: 18px;
  padding: 8px 12px;
  cursor: pointer;
}

.search-form {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
  position: relative;
}

.search-form i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #c0c2d1;
  font-size: 14px;
}

.search-form input {
  width: 100%;
  border: 0;
  padding: 10px 10px 10px 38px;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #5a5e76;
}

.search-form input::placeholder {
  color: #b9b9c8;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.navbar-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar-user .name {
  font-weight: 500;
  color: #3e4b5b;
  font-size: 14px;
}

.navbar-user .caret {
  font-size: 11px;
  color: var(--primary);
}

.nav-icon {
  position: relative;
  color: #9c9fa6;
  font-size: 18px;
  cursor: pointer;
}

.nav-icon:hover {
  color: var(--primary);
}

.nav-icon .dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-warning {
  background: var(--warning);
}

.dot-danger {
  background: var(--danger);
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  padding-bottom: 30px;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #d8d8d8;
  border-radius: 2px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 25px;
}

.sidebar-profile img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-profile .name {
  font-weight: 600;
  color: #3e4b5b;
  font-size: 15px;
  margin: 0;
}

.sidebar-profile .role {
  font-size: 12px;
  color: #9e9da0;
  margin: 0;
}

.sidebar-profile .badge-check {
  margin-left: auto;
  width: 26px;
  height: 26px;
  background: #1bcfb4;
  color: #fff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu>li>a {
  display: flex;
  align-items: center;
  padding: 13px 25px;
  color: #3e4b5b;
  font-size: 14px;
  font-weight: 400;
  transition: background .15s ease;
  position: relative;
}

.nav-menu>li>a .menu-title {
  flex: 1;
}

.nav-menu>li>a .menu-icon {
  width: 22px;
  color: #bba8cf;
  text-align: right;
  font-size: 16px;
}

.nav-menu>li>a:hover {
  background: #f7f7fb;
  color: var(--primary);
}

.nav-menu>li.active>a {
  color: var(--primary);
  background: #f7f7fb;
}

.nav-menu>li.active>a .menu-icon {
  color: var(--primary);
}

.sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fafafa;
  display: none;
}

.nav-menu>li.open .sub-menu {
  display: block;
}

.sub-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 25px 11px 60px;
  color: #888;
  font-size: 13.5px;
  position: relative;
}

.sub-menu li a::before {
  content: "\f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 32px;
  font-size: 10px;
  color: #b0b0b0;
}

.sub-menu li a:hover,
.sub-menu li.active a {
  color: var(--primary);
}

.sub-menu li.active a::before {
  color: var(--primary);
}

.arrow-toggle {
  transition: transform .25s ease;
  font-size: 11px !important;
  margin-right: 8px;
}

.nav-menu>li.open .arrow-toggle {
  transform: rotate(180deg);
}

.menu-indicator {
  width: 22px;
  height: 22px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 8px;
  margin-left: 6px;
}

.menu-indicator::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* ===================== MAIN PANEL ===================== */
.main-panel {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  padding: 30px;
  min-height: calc(100vh - var(--navbar-height));
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-title {
  font-size: 18px;
  font-weight: 400;
  color: #3e4b5b;
  margin: 0;
}

.breadcrumb-custom {
  font-size: 13px;
  color: #3e4b5b;
}

.breadcrumb-custom a {
  color: var(--primary);
}

.breadcrumb-custom .sep {
  margin: 0 6px;
  color: #c0c2d1;
}

.card {
  background: #fff;
  border-radius: 22px;
  border: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  padding: 35px 30px;
  margin-bottom: 30px;
}

.card-title {
  font-size: 17px;
  font-weight: 500;
  color: #3e4b5b;
  margin-bottom: 6px;
}

.card-desc {
  color: #9c9fa6;
  font-size: 14px;
  margin-bottom: 30px;
}

.code-snippet {
  color: var(--danger);
  font-family: "Courier New", monospace;
  font-size: 13px;
}

/* ===================== BUTTONS ===================== */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.btn {
  height: 42px;
  font-weight: 500;
  font-size: 14px;
  padding: 13px 28px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  transition: opacity .2s ease, transform .15s ease;
  letter-spacing: .3px;
  cursor: pointer;
  font-family: inherit;
  justify-content: center;
  align-items: center;
  display: flex;
}

.btn:hover {
  opacity: .92;
  transform: translateY(-1px);
}

.btn:focus {
  box-shadow: none;
  outline: none;
}

.btn-gradient-primary {
  background: linear-gradient(89deg, #da8cff 0%, #9a55ff 100%);
  color: #fff;
}

.btn-gradient-secondary {
  background: linear-gradient(89deg, #e7ebf0 0%, #868e96 100%);
  color: #fff;
}

.btn-gradient-success {
  background: linear-gradient(89deg, #84d9d2 0%, #07cdae 100%);
  color: #fff;
}

.btn-gradient-danger {
  background: linear-gradient(89deg, #ffbf96 0%, #fe7096 100%);
  color: #fff;
}

.btn-gradient-warning {
  background: linear-gradient(89deg, #f6e384 0%, #ffd500 100%);
  color: #fff;
}

.btn-gradient-info {
  background: linear-gradient(89deg, #90caf9 0%, #047edf 100%);
  color: #fff;
}

.btn-gradient-light {
  background: linear-gradient(89deg, #f4f4f4 0%, #e8e8e8 100%);
  color: #3e4b5b;
}

.btn-gradient-dark {
  background: linear-gradient(89deg, #5e6977 0%, #3e4b5b 100%);
  color: #fff;
}

/* ============================================================
   COLOR ACCENT ACTIVE ROUTE FIX
   Makes selected accent color apply to active route/menu
   ============================================================ */

.nav-menu>li>a:hover {
  color: var(--primary);
}

.nav-menu>li>a:hover .menu-icon {
  color: var(--primary);
}

.nav-menu>li.active>a {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, #ffffff);
}

.nav-menu>li.active>a .menu-icon {
  color: var(--primary);
}

.sub-menu li a.active,
.sub-menu li.active a {
  color: var(--primary);
  font-weight: 600;
}

.sub-menu li a.active::before,
.sub-menu li.active a::before {
  color: var(--primary);
}

.menu-indicator {
  border-color: var(--primary);
}

.menu-indicator::after {
  background: var(--primary);
}

.arrow-toggle {
  color: var(--primary);
}

.menu-flyout .ft-title:hover,
.menu-flyout .ft-sub li a:hover,
.menu-flyout .ft-sub li a.active,
.menu-flyout .ft-sub li.active a {
  color: var(--primary);
}

.menu-flyout .ft-sub li a:hover,
.menu-flyout .ft-sub li a.active,
.menu-flyout .ft-sub li.active a {
  background: color-mix(in srgb, var(--primary) 8%, #ffffff);
}

/* Active color button style */
.rp-color.active {
  border-color: #ffffff;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent),
    0 6px 14px rgba(0, 0, 0, .18);
  transform: scale(1.08);
}

/* Dark mode active route */
body.dark-mode .nav-menu>li.active>a {
  background: color-mix(in srgb, var(--primary) 16%, #232735);
}

body.dark-mode .menu-flyout .ft-sub li a:hover,
body.dark-mode .menu-flyout .ft-sub li a.active,
body.dark-mode .menu-flyout .ft-sub li.active a {
  background: color-mix(in srgb, var(--primary) 16%, #232735);
}

.btn-link-custom {
  color: var(--info);
  text-decoration: underline;
  background: transparent;
  padding: 13px 10px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.btn-link-custom:hover {
  color: #0d6efd;
}

.btn-rounded {
  border-radius: 50px;
  padding: 13px 32px;
}

.btn-outline {
  background: transparent;
  border: 1px solid;
  padding: 12px 27px;
  font-weight: 500;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #d7dae3;
}

.btn-outline-success {
  color: var(--success);
  border-color: var(--success);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-outline-warning {
  color: #d6b900;
  border-color: var(--warning);
}

.btn-outline-info {
  color: var(--info);
  border-color: var(--info);
}

.btn-outline-light {
  color: #6c757d;
  border-color: #d7dae3;
}

.btn-outline-dark {
  color: var(--dark);
  border-color: var(--dark);
}

.btn-outline:hover {
  background: rgba(0, 0, 0, .03);
  transform: none;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

.btn-outline-success:hover {
  background: var(--success);
  color: #fff;
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-outline-warning:hover {
  background: var(--warning);
  color: #fff;
}

.btn-outline-info:hover {
  background: var(--info);
  color: #fff;
}

.btn-outline-dark:hover {
  background: var(--dark);
  color: #fff;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 12px;
}

/* ===================== STAT CARDS (Dashboard) ===================== */
.stat-card {
  border-radius: 22px;
  padding: 28px 30px;
  color: #fff;
  min-height: 130px;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-label {
  font-size: 14px;
  opacity: .9;
  margin: 0 0 14px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 500;
  margin: 0;
}

.stat-card .stat-icon {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  opacity: .25;
}

.bg-grad-1 {
  background: linear-gradient(89deg, #da8cff 0%, #9a55ff 100%);
}

.bg-grad-2 {
  background: linear-gradient(89deg, #84d9d2 0%, #07cdae 100%);
}

.bg-grad-3 {
  background: linear-gradient(89deg, #90caf9 0%, #047edf 100%);
}

.bg-grad-4 {
  background: linear-gradient(89deg, #ffbf96 0%, #fe7096 100%);
}

/* ===================== TABLES ===================== */
.table-custom {
  width: 100%;
  border-collapse: collapse;
}

.table-custom th,
.table-custom td {
  padding: 14px 12px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f2f2f2;
}

.table-custom th {
  font-weight: 500;
  color: #9c9fa6;
  border-bottom: 1px solid #ebedf2;
}

.table-custom tr:hover td {
  background: #fafafa;
}

.table-striped tr:nth-child(even) td {
  background: #fbfbfb;
}

.table-bordered {
  border: 1px solid #ebedf2;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #ebedf2;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

.badge-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}

.badge-success {
  background: var(--success);
}

.badge-warning {
  background: var(--warning);
  color: #3e4b5b;
}

.badge-danger {
  background: var(--danger);
}

.badge-info {
  background: var(--info);
}

/* ===================== FORMS ===================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 8px;
  color: #3e4b5b;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ebedf2;
  border-radius: 2px;
  background: #fff;
  color: #3e4b5b;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ===================== DROPDOWN ===================== */
.dropdown-wrap {
  position: relative;
  display: inline-block;
  margin: 6px 4px;
}

.dropdown-toggle {
  padding-right: 40px !important;
  position: relative;
}

.dropdown-toggle::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: -2px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  padding: 8px 0;
  margin-top: 4px;
  display: none;
  z-index: 100;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 18px;
  color: #3e4b5b;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: #f7f7fb;
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: #ebedf2;
  margin: 6px 0;
}

/* ===================== ICONS GRID ===================== */
.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.icon-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #f2f2f2;
  border-radius: 22px;
  font-size: 13px;
  color: #5a5e76;
  transition: all .15s;
}

.icon-cell:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.icon-cell i {
  font-size: 20px;
  color: var(--primary);
  width: 24px;
  text-align: center;
}

/* ===================== TYPOGRAPHY ===================== */
.typo h1,
.typo h2,
.typo h3,
.typo h4,
.typo h5,
.typo h6 {
  font-weight: 500;
  color: #3e4b5b;
  margin: 0 0 14px;
}

.typo h1 {
  font-size: 36px;
}

.typo h2 {
  font-size: 30px;
}

.typo h3 {
  font-size: 24px;
}

.typo h4 {
  font-size: 20px;
}

.typo h5 {
  font-size: 16px;
}

.typo h6 {
  font-size: 14px;
}

.typo p {
  line-height: 1.7;
  color: #5a5e76;
}

.typo .lead {
  font-size: 18px;
  font-weight: 300;
  color: #5a5e76;
}

.typo blockquote {
  border-left: 4px solid var(--primary);
  padding: 10px 20px;
  margin: 20px 0;
  color: #5a5e76;
  font-style: italic;
  background: #fafafa;
}

.typo code {
  background: #f7f7fb;
  color: var(--danger);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

/* ===================== AUTH PAGES ===================== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f2edf3 0%, #e8dff0 100%);
  padding: 30px 20px;
}

.auth-card {
  background: #fff;
  width: 100%;
  /* max-width: 440px; */
  border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
  padding: 50px 40px;
}

.auth-brand {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  text-align: center;
  color: #9c9fa6;
  margin-bottom: 30px;
  font-size: 14px;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
}

.auth-foot {
  text-align: center;
  margin-top: 22px;
  color: #5a5e76;
  font-size: 14px;
}

.auth-foot a {
  color: var(--primary);
  font-weight: 500;
}

/* ===================== GRID HELPERS ===================== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.col {
  padding: 0 12px;
  flex: 1;
}

.col-3,
.col-4,
.col-6,
.col-8,
.col-12 {
  padding: 0 12px;
}

.col-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

.col-4 {
  flex: 0 0 33.33%;
  max-width: 33.33%;
}

.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.col-8 {
  flex: 0 0 66.66%;
  max-width: 66.66%;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (max-width: 991px) {

  .col-3,
  .col-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-6,
  .col-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 575px) {

  .col-3,
  .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

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

  .navbar-brand-wrapper {
    width: auto;
    border-right: 0;
  }

  .search-form {
    max-width: none;
  }
}

@media (max-width: 575px) {
  .search-form {
    display: none;
  }

  .navbar-user .name {
    display: none;
  }

  .main-panel {
    padding: 18px;
  }

  .card {
    padding: 22px 18px;
  }

  .btn {
    padding: 11px 20px;
    font-size: 13px;
  }
}

/* ============================================================
   NAVBAR INTERACTIVE ELEMENTS
   ============================================================ */

/* nav-icon as button/anchor — reset native styles */
button.nav-icon,
a.nav-icon {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.nav-icon:focus,
a.nav-icon:focus {
  outline: none;
}

/* shared popover wrapper used by user / mail / bell */
.navbar-pop {
  position: relative;
  display: inline-block;
}

.navbar-pop-trigger {
  cursor: pointer;
}

.navbar-pop-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: 6px 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1100;
}

.navbar-pop.open .navbar-pop-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navbar-pop-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, .04);
}

.navbar-pop-menu-wide {
  min-width: 340px;
}

/* pop header (user dropdown style) */
.pop-head {
  padding: 14px 18px 12px;
  border-bottom: 1px solid #f0f0f4;
}

.pop-head strong {
  display: block;
  color: #3e4b5b;
  font-size: 14px;
}

.pop-head small {
  color: #9c9fa6;
  font-size: 12px;
}

.pop-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* simple link item in user dropdown */
.pop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  font-size: 14px;
  color: #3e4b5b;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.pop-item:hover {
  background: #f7f7fb;
  color: var(--primary);
}

.pop-item i {
  width: 18px;
  text-align: center;
  color: #9c9fa6;
  font-size: 14px;
}

.pop-item:hover i {
  color: var(--primary);
}

.pop-item-danger:hover,
.pop-item-danger:hover i {
  color: var(--danger);
}

.pop-divider {
  height: 1px;
  background: #f0f0f4;
  margin: 6px 0;
}

/* list-style items (messages/notifications) */
.pop-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f5f5f8;
  transition: background .15s ease;
}

.pop-list-item:last-of-type {
  border-bottom: 0;
}

.pop-list-item:hover {
  background: #fafbff;
}

.pop-list-item .avatar-sm {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.pop-icon-circle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.pop-list-body {
  flex: 1;
  min-width: 0;
}

.pop-list-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #3e4b5b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop-list-desc {
  font-size: 12.5px;
  color: #9c9fa6;
  margin-top: 2px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop-list-time {
  color: #b9b9c8;
  font-size: 11px;
  white-space: nowrap;
}

.pop-foot {
  display: block;
  padding: 12px 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: #fafbff;
  text-decoration: none;
  border-top: 1px solid #f0f0f4;
}

.pop-foot:hover {
  background: #f3f0fb;
}

/* ============================================================
   RIGHT-SIDE SETTINGS PANEL
   ============================================================ */
.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: #fff;
  z-index: 1200;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, .0, .2, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
}

.right-panel.open {
  transform: translateX(0);
}

.right-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #f0f0f4;
}

.right-panel-head strong {
  font-size: 16px;
  color: #3e4b5b;
}

.right-panel-close {
  background: transparent;
  border: 0;
  font-size: 16px;
  color: #9c9fa6;
  cursor: pointer;
  padding: 4px 8px;
}

.right-panel-close:hover {
  color: var(--danger);
}

.right-panel-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}

.rp-section {
  margin-bottom: 24px;
}

.rp-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #9c9fa6;
  margin-bottom: 12px;
}

.rp-row {
  margin-bottom: 10px;
}

/* iOS-style toggle switch */
.rp-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #3e4b5b;
}

.rp-toggle input {
  display: none;
}

.rp-switch {
  width: 40px;
  height: 22px;
  background: #d7dae3;
  border-radius: 22px;
  position: relative;
  transition: background .2s ease;
  flex-shrink: 0;
}

.rp-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  transition: transform .2s ease;
}

.rp-toggle input:checked+.rp-switch {
  background: var(--primary);
}

.rp-toggle input:checked+.rp-switch::after {
  transform: translateX(18px);
}

.rp-colors {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rp-color {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.rp-color:hover {
  transform: scale(1.1);
}

.rp-color:focus {
  outline: none;
  border-color: rgba(0, 0, 0, .2);
}

.right-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, .4);
  z-index: 1150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.right-panel-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   DARK MODE
   ============================================================ */
body.dark-mode {
  --body-bg: #1a1d28;
  --sidebar-bg: #232735;
  --border-color: #2d3142;
  --text-default: #e3e6ed;
  background: var(--body-bg);
  color: var(--text-default);
}

body.dark-mode .top-navbar,
body.dark-mode .sidebar,
body.dark-mode .card,
body.dark-mode .navbar-pop-menu,
body.dark-mode .right-panel,
body.dark-mode .auth-card {
  background: #232735;
  color: #e3e6ed;
}

body.dark-mode .navbar-brand-wrapper {
  border-right-color: #2d3142;
}

body.dark-mode .sidebar {
  border-right-color: #2d3142;
}

body.dark-mode .navbar-pop-menu::before {
  background: #232735;
  box-shadow: none;
}

body.dark-mode .page-title,
body.dark-mode .card-title,
body.dark-mode .sidebar-profile .name,
body.dark-mode .nav-menu>li>a,
body.dark-mode .pop-head strong,
body.dark-mode .pop-list-title,
body.dark-mode .right-panel-head strong,
body.dark-mode .rp-toggle {
  color: #e3e6ed;
}

body.dark-mode .card-desc,
body.dark-mode .pop-list-desc,
body.dark-mode .pop-head small {
  color: #8b8fa1;
}

body.dark-mode .nav-menu>li>a:hover,
body.dark-mode .nav-menu>li.active>a,
body.dark-mode .pop-item:hover,
body.dark-mode .pop-list-item:hover {
  background: #2a2e3d;
}

body.dark-mode .sub-menu {
  background: #1d212c;
}

body.dark-mode .pop-foot {
  background: #1d212c;
  border-top-color: #2d3142;
}

body.dark-mode .navbar-user .name,
body.dark-mode .search-form input {
  color: #e3e6ed;
}

body.dark-mode .search-form input::placeholder {
  color: #6f7384;
}

body.dark-mode .form-control {
  background: #2a2e3d;
  border-color: #353a4d;
  color: #e3e6ed;
}

body.dark-mode .table-custom th,
body.dark-mode .table-custom td {
  border-bottom-color: #2d3142;
}

body.dark-mode .table-custom tr:hover td {
  background: #2a2e3d;
}

body.dark-mode .table-striped tr:nth-child(even) td {
  background: #1f2330;
}

body.dark-mode .icon-cell {
  border-color: #2d3142;
  color: #c2c6d4;
}

body.dark-mode .pop-divider,
body.dark-mode .pop-list-item {
  border-color: #2d3142;
}

body.dark-mode .rp-switch {
  background: #3a3f54;
}

body.dark-mode .right-panel-head,
body.dark-mode .pop-head {
  border-bottom-color: #2d3142;
}

body.dark-mode .auth-wrap {
  background: linear-gradient(135deg, #1a1d28 0%, #2a1f3c 100%);
}

/* responsive tweaks for navbar dropdowns */
@media (max-width: 575px) {
  .navbar-pop-menu {
    right: -50px;
    min-width: 280px;
  }

  .navbar-pop-menu-wide {
    right: -80px;
    min-width: 300px;
  }
}

/* ============================================================
   COLLAPSIBLE (MINI) SIDEBAR
   ============================================================ */
:root {
  --sidebar-mini-width: 75px;
}

.sidebar,
.main-panel,
.navbar-brand-wrapper,
.navbar-brand span {
  transition: width .25s ease, margin-left .25s ease, padding .25s ease, opacity .2s ease;
}

/* ----- desktop mini state ----- */
@media (min-width: 992px) {
  body.sidebar-mini .navbar-brand-wrapper {
    width: var(--sidebar-mini-width);
    padding: 0;
    justify-content: center;
  }

  body.sidebar-mini .navbar-brand span {
    opacity: 0;
    width: 0;
    overflow: hidden;
  }

  body.sidebar-mini .sidebar {
    width: var(--sidebar-mini-width);
    overflow: visible;
    /* allow flyouts to escape */
  }

  body.sidebar-mini .main-panel {
    margin-left: var(--sidebar-mini-width);
  }

  /* hide labels in collapsed sidebar */
  body.sidebar-mini .sidebar-profile .name,
  body.sidebar-mini .sidebar-profile .role,
  body.sidebar-mini .sidebar-profile .badge-check,
  body.sidebar-mini .nav-menu>li>a .menu-title,
  body.sidebar-mini .nav-menu>li>a .menu-indicator,
  body.sidebar-mini .nav-menu>li>a .arrow-toggle {
    display: none;
  }

  /* sub-menus are folded away in mini mode (they reappear in the flyout) */
  body.sidebar-mini .sub-menu {
    display: none !important;
  }

  /* profile: only avatar, centered */
  body.sidebar-mini .sidebar-profile {
    justify-content: center;
    padding: 18px 0;
  }

  body.sidebar-mini .sidebar-profile img {
    width: 42px;
    height: 42px;
  }

  /* nav items: icon centered */
  body.sidebar-mini .nav-menu>li>a {
    justify-content: center;
    padding: 14px 0;
  }

  body.sidebar-mini .nav-menu>li>a .menu-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    text-align: center;
    margin: 0;
    font-size: 18px;
    transition: background .2s ease, color .2s ease;
  }

  /* active item highlighted with a colored tile (matches the screenshot) */
  body.sidebar-mini .nav-menu>li.active>a {
    background: transparent;
  }

  body.sidebar-mini .nav-menu>li.active>a .menu-icon {
    background: linear-gradient(89deg, #da8cff 0%, #9a55ff 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(154, 85, 255, .35);
  }

  /* hover on a regular item gives a soft tile */
  body.sidebar-mini .nav-menu>li>a:hover {
    background: transparent;
  }

  body.sidebar-mini .nav-menu>li:not(.active)>a:hover .menu-icon {
    background: #f3eefb;
    color: var(--primary);
  }

  /* ---------- HOVER FLYOUT (mini mode only) ---------- */
  body.sidebar-mini .nav-menu>li {
    position: relative;
  }

  body.sidebar-mini .menu-flyout {
    display: block;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    min-width: 200px;
    background: var(--sidebar-bg);
    box-shadow: 0 12px 30px rgba(40, 20, 80, .15);
    border-radius: 22px;
    padding: 8px 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 1200;
  }

  body.sidebar-mini .menu-flyout::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: var(--sidebar-bg);
    transform: translateY(-50%) rotate(45deg);
    box-shadow: -2px 2px 4px rgba(0, 0, 0, .04);
  }

  body.sidebar-mini .nav-menu>li:hover .menu-flyout {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
  }

  /* flyout content */
  .menu-flyout .ft-title {
    display: block;
    padding: 10px 18px;
    font-weight: 500;
    color: #3e4b5b;
    font-size: 14px;
    text-decoration: none;
  }

  .menu-flyout .ft-title:hover {
    color: var(--primary);
  }

  .menu-flyout .ft-sub {
    list-style: none;
    padding: 4px 0 6px;
    margin: 0;
    border-top: 1px solid #f0f0f4;
  }

  .menu-flyout .ft-sub li a {
    display: block;
    padding: 8px 18px;
    font-size: 13px;
    color: #6c757d;
    text-decoration: none;
  }

  .menu-flyout .ft-sub li a:hover,
  .menu-flyout .ft-sub li.active a {
    color: var(--primary);
    background: var(--primary);
  }

  /* hide flyout in normal (full) sidebar mode */
  body:not(.sidebar-mini) .menu-flyout {
    display: none;
  }
}

/* hide flyout entirely on mobile (sidebar uses slide-in instead) */
@media (max-width: 991px) {
  .menu-flyout {
    display: none !important;
  }
}

/* dark-mode tweaks for mini sidebar + flyout */
body.dark-mode.sidebar-mini .nav-menu>li:not(.active)>a:hover .menu-icon {
  background: #2a2e3d;
  color: var(--primary);
}

body.dark-mode .menu-flyout {
  background: #2a2e3d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

body.dark-mode .menu-flyout::before {
  background: #2a2e3d;
  box-shadow: none;
}

body.dark-mode .menu-flyout .ft-title {
  color: #e3e6ed;
}

body.dark-mode .menu-flyout .ft-sub {
  border-top-color: #353a4d;
}

body.dark-mode .menu-flyout .ft-sub li a {
  color: #b9bccb;
}

body.dark-mode .menu-flyout .ft-sub li a:hover,
body.dark-mode .menu-flyout .ft-sub li.active a {
  background: #353a4d;
}

/* ============================================================
   HR ROUTED SIDEBAR — STYLE FIXES
   Works with sidebar_with_laravel_routes.blade.php
   ============================================================ */

/* Use same system font as requested before */
html,
body,
button,
input,
select,
textarea {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

/* Cleaner sidebar base */
.sidebar {
  background: var(--sidebar-bg);
  z-index: 1045;
  box-shadow: 8px 0 22px rgba(15, 23, 42, .035);
}

.sidebar-profile {
  margin: 12px 14px 10px;
  padding: 14px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(182, 109, 255, .08), rgba(25, 138, 227, .055));
  border: 1px solid rgba(182, 109, 255, .10);
}

.sidebar-profile img {
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .10);
}

.sidebar-profile .name {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile .badge-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(27, 207, 180, .28);
}

/* Menu spacing */
.nav-menu {
  padding: 4px 12px 18px;
}

.nav-menu>li {
  position: relative;
  margin: 3px 0;
  border-radius: 22px;
}

.nav-menu>li>a {
  min-height: 44px;
  padding: 11px 12px 11px 16px;
  border-radius: 22px;
  font-weight: 500;
  color: #4b5563;
  gap: 10px;
}

.nav-menu>li>a .menu-title {
  min-width: 0;
  line-height: 1.2;
}

.nav-menu>li>a .menu-icon {
  width: 24px;
  min-width: 24px;
  font-size: 15px;
  color: #9ca3af;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* Full sidebar hover */
.nav-menu>li>a:hover {
  background: rgba(154, 85, 255, .075);
  color: var(--primary);
}

.nav-menu>li>a:hover .menu-icon {
  color: var(--primary);
}

/* Full sidebar active */
.nav-menu>li.active>a {
  background: linear-gradient(90deg, rgba(154, 85, 255, .16), rgba(4, 126, 223, .08));
  color: #7c3aed;
  box-shadow: inset 3px 0 0 #9a55ff;
}

.nav-menu>li.active>a .menu-icon,
.nav-menu>li.open>a .menu-icon {
  color: #8b5cf6;
}

/* Dropdown arrow and indicator */
.arrow-toggle {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px;
  margin-right: 0;
  font-size: 10px !important;
  border-radius: 999px;
  background: rgba(154, 85, 255, .08);
  color: #9a55ff !important;
}

.nav-menu>li.open .arrow-toggle {
  transform: rotate(180deg);
  background: rgba(154, 85, 255, .15);
}

.menu-indicator {
  display: none;
}

/* Submenu container */
.sub-menu {
  margin: 4px 0 8px;
  padding: 6px 0 6px;
  background: transparent;
  border-left: 1px dashed rgba(154, 85, 255, .22);
  margin-left: 26px;
}

.nav-menu>li.open .sub-menu {
  display: block;
}

.sub-menu li {
  list-style: none;
  margin: 2px 0;
}

.sub-menu li a {
  padding: 8px 10px 8px 28px;
  border-radius: 22px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.sub-menu li a::before {
  content: "";
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c7cad1;
  font-family: inherit;
}

/* IMPORTANT FIX:
   Your Blade uses <a class="active">, not <li class="active"> */
.sub-menu li a:hover,
.sub-menu li a.active,
.sub-menu li.active>a {
  color: #7c3aed;
  background: rgba(154, 85, 255, .085);
}

.sub-menu li a:hover::before,
.sub-menu li a.active::before,
.sub-menu li.active>a::before {
  background: #9a55ff;
  box-shadow: 0 0 0 3px rgba(154, 85, 255, .12);
}

/* Flyout active state fix for mini sidebar */
.menu-flyout .ft-sub li a.active,
.menu-flyout .ft-sub li.active>a {
  color: var(--primary);
  background: #faf7ff;
}

/* Mini sidebar corrections */
@media (min-width: 992px) {
  body.sidebar-mini .sidebar {
    width: var(--sidebar-mini-width);
    overflow: visible;
  }

  body.sidebar-mini .sidebar-profile {
    margin: 12px 8px 10px;
    padding: 12px 0;
    background: transparent;
    border-color: transparent;
  }

  body.sidebar-mini .nav-menu {
    padding: 4px 8px 18px;
  }

  body.sidebar-mini .nav-menu>li>a {
    padding: 8px 0;
    min-height: 54px;
  }

  body.sidebar-mini .nav-menu>li>a .menu-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  body.sidebar-mini .nav-menu>li.active>a {
    box-shadow: none;
    background: transparent;
  }

  body.sidebar-mini .nav-menu>li.active>a .menu-icon {
    background: linear-gradient(135deg, #da8cff 0%, #9a55ff 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(154, 85, 255, .32);
  }

  body.sidebar-mini .nav-menu>li:not(.active)>a:hover .menu-icon {
    background: rgba(154, 85, 255, .10);
    color: var(--primary);
  }

  body.sidebar-mini .menu-flyout {
    top: 50%;
    left: calc(100% - 0px);
    border: 1px solid rgba(235, 237, 242, .95);
    border-radius: 14px;
    overflow: hidden;
  }

  body.sidebar-mini .menu-flyout .ft-title {
    font-weight: 600;
  }
}

/* Mobile sidebar layering */
@media (max-width: 991px) {
  .sidebar {
    z-index: 1100;
    box-shadow: 10px 0 34px rgba(15, 23, 42, .16);
  }

  .sidebar.show {
    transform: translateX(0);
  }
}

/* Dark mode active/submenu fixes */
body.dark-mode .sidebar-profile {
  background: linear-gradient(135deg, rgba(154, 85, 255, .14), rgba(4, 126, 223, .09));
  border-color: rgba(154, 85, 255, .16);
}

body.dark-mode .nav-menu>li>a {
  color: #d7dae3;
}

body.dark-mode .nav-menu>li>a .menu-icon {
  color: #a8adbd;
}

body.dark-mode .nav-menu>li.active>a {
  background: rgba(154, 85, 255, .18);
  color: #e9d5ff;
}

body.dark-mode .sub-menu {
  border-left-color: rgba(154, 85, 255, .28);
}

body.dark-mode .sub-menu li a {
  color: #b9bccb;
}

body.dark-mode .sub-menu li a:hover,
body.dark-mode .sub-menu li a.active,
body.dark-mode .sub-menu li.active>a {
  color: #e9d5ff;
  background: rgba(154, 85, 255, .14);
}

body.dark-mode .menu-flyout .ft-sub li a.active,
body.dark-mode .menu-flyout .ft-sub li.active>a {
  color: #e9d5ff;
  background: rgba(154, 85, 255, .16);
}

/* ============================================================
   FINAL FIX — COLOR ACCENT ACTIVE ROUTE
   Put this section at the bottom so it overrides older purple values.
   When Quick Settings changes --primary, active route follows it.
   ============================================================ */

html,
body {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

/* Navbar / general accent */
.navbar-brand,
.navbar-brand i,
.navbar-user .caret,
.nav-icon:hover,
.breadcrumb-custom a,
.auth-brand,
.auth-foot a,
.pop-foot,
.btn-outline-primary,
.icon-cell i {
  color: var(--primary) !important;
}

/* Primary buttons/cards also follow accent */
.btn-gradient-primary,
.bg-grad-1 {
  background: var(--primary) !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
}

/* Full sidebar hover */
.nav-menu>li>a:hover {
  color: var(--primary) !important;
  background: #f8f9fb !important;
  background: color-mix(in srgb, var(--primary) 8%, #ffffff) !important;
}

.nav-menu>li>a:hover .menu-icon {
  color: var(--primary) !important;
}

/* Full sidebar active route */
.nav-menu>li.active>a,
.nav-menu>li.open>a {
  color: var(--primary) !important;
  background: #f8f9fb !important;
  background: linear-gradient(90deg,
      color-mix(in srgb, var(--primary) 18%, #ffffff),
      color-mix(in srgb, var(--primary) 7%, #ffffff)) !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
}

.nav-menu>li.active>a .menu-icon,
.nav-menu>li.open>a .menu-icon {
  color: var(--primary) !important;
}

/* Dropdown arrow uses selected accent */
.arrow-toggle {
  color: var(--primary) !important;
  background: #f8f9fb !important;
  background: color-mix(in srgb, var(--primary) 10%, #ffffff) !important;
}

.nav-menu>li.open .arrow-toggle {
  background: #f0f2f7 !important;
  background: color-mix(in srgb, var(--primary) 18%, #ffffff) !important;
}

/* Menu indicator uses selected accent */
.menu-indicator {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

.menu-indicator::after {
  background: var(--primary) !important;
}

/* Submenu active route */
.sub-menu {
  border-left-color: color-mix(in srgb, var(--primary) 28%, transparent) !important;
}

.sub-menu li a:hover,
.sub-menu li a.active,
.sub-menu li.active>a {
  color: var(--primary) !important;
  background: transparent !important;
  background: color-mix(in srgb, var(--primary) 9%, #ffffff) !important;
  font-weight: 700 !important;
}

.sub-menu li a:hover::before,
.sub-menu li a.active::before,
.sub-menu li.active>a::before {
  background: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent) !important;
}

/* Mini sidebar active route */
@media (min-width: 992px) {
  body.sidebar-mini .nav-menu>li.active>a {
    background: transparent !important;
    box-shadow: none !important;
  }

  body.sidebar-mini .nav-menu>li.active>a .menu-icon {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 34%, transparent) !important;
  }

  body.sidebar-mini .nav-menu>li:not(.active)>a:hover .menu-icon {
    color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 10%, #ffffff) !important;
  }
}

/* Flyout active / hover */
.menu-flyout .ft-title:hover,
.menu-flyout .ft-sub li a:hover,
.menu-flyout .ft-sub li a.active,
.menu-flyout .ft-sub li.active>a {
  color: var(--primary) !important;
}


.menu-flyout .ft-sub li a:hover,
.menu-flyout .ft-sub li a.active,
.menu-flyout .ft-sub li.active>a {
  /* background: #fafafa !important;
  background: color-mix(in srgb, var(--primary) 9%, #ffffff) !important; */
  background-color: var(--primary) !important;
}

/* Quick Settings color button active state */
.rp-color.active {
  border-color: #ffffff !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent),
    0 8px 18px rgba(0, 0, 0, .18) !important;
  transform: scale(1.08) !important;
}

/* Toggle switches follow accent */
.rp-toggle input:checked+.rp-switch {
  background: var(--primary) !important;
}

/* Dark mode accent route */
body.dark-mode .nav-menu>li>a:hover {
  background: color-mix(in srgb, var(--primary) 13%, #232735) !important;
}

body.dark-mode .nav-menu>li.active>a,
body.dark-mode .nav-menu>li.open>a {
  color: color-mix(in srgb, var(--primary) 75%, #ffffff) !important;
  background: color-mix(in srgb, var(--primary) 18%, #232735) !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
}

body.dark-mode .nav-menu>li.active>a .menu-icon,
body.dark-mode .nav-menu>li.open>a .menu-icon {
  color: color-mix(in srgb, var(--primary) 75%, #ffffff) !important;
}

body.dark-mode .arrow-toggle {
  color: color-mix(in srgb, var(--primary) 75%, #ffffff) !important;
  background: color-mix(in srgb, var(--primary) 13%, #232735) !important;
}

body.dark-mode .nav-menu>li.open .arrow-toggle {
  background: color-mix(in srgb, var(--primary) 22%, #232735) !important;
}

body.dark-mode .sub-menu {
  border-left-color: color-mix(in srgb, var(--primary) 34%, transparent) !important;
}

body.dark-mode .sub-menu li a:hover,
body.dark-mode .sub-menu li a.active,
body.dark-mode .sub-menu li.active>a {
  color: color-mix(in srgb, var(--primary) 78%, #ffffff) !important;
  background: color-mix(in srgb, var(--primary) 15%, #232735) !important;
}

body.dark-mode .sub-menu li a:hover::before,
body.dark-mode .sub-menu li a.active::before,
body.dark-mode .sub-menu li.active>a::before {
  background: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent) !important;
}

body.dark-mode.sidebar-mini .nav-menu>li.active>a .menu-icon {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 34%, transparent) !important;
}

body.dark-mode.sidebar-mini .nav-menu>li:not(.active)>a:hover .menu-icon {
  color: color-mix(in srgb, var(--primary) 78%, #ffffff) !important;
  background: color-mix(in srgb, var(--primary) 14%, #232735) !important;
}

body.dark-mode .menu-flyout .ft-sub li a:hover,
body.dark-mode .menu-flyout .ft-sub li a.active,
body.dark-mode .menu-flyout .ft-sub li.active>a {
  color: color-mix(in srgb, var(--primary) 78%, #ffffff) !important;
  background: color-mix(in srgb, var(--primary) 16%, #232735) !important;
}

body.dark-mode .sidebar-profile {
  border-color: color-mix(in srgb, var(--primary) 20%, transparent) !important;
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--primary) 14%, #232735),
      color-mix(in srgb, var(--primary) 7%, #232735)) !important;
}














/* ============================================================
   SIDEBAR BACKGROUND COLOR PICKER
============================================================ */

.sidebar {
  background: var(--sidebar-bg) !important;
}

/* Auto text color when sidebar is dark */
body.sidebar-dark-custom .sidebar,
body.sidebar-dark-custom .sidebar .nav-menu>li>a,
body.sidebar-dark-custom .sidebar .sub-menu li a,
body.sidebar-dark-custom .sidebar .menu-flyout .ft-title,
body.sidebar-dark-custom .sidebar .menu-flyout .ft-sub li a {
  color: rgba(255, 255, 255, .78) !important;
}

body.sidebar-dark-custom .sidebar {
  border-right-color: rgba(255, 255, 255, .08) !important;
  box-shadow: 8px 0 24px rgba(0, 0, 0, .18) !important;
}

body.sidebar-dark-custom .nav-menu>li>a .menu-icon {
  color: rgba(255, 255, 255, .58) !important;
}

body.sidebar-dark-custom .nav-menu>li>a:hover,
body.sidebar-dark-custom .nav-menu>li.active>a,
body.sidebar-dark-custom .nav-menu>li.open>a {
  background: rgba(255, 255, 255, .10) !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
}

body.sidebar-dark-custom .nav-menu>li>a:hover .menu-icon,
body.sidebar-dark-custom .nav-menu>li.active>a .menu-icon,
body.sidebar-dark-custom .nav-menu>li.open>a .menu-icon {
  color: #ffffff !important;
}

body.sidebar-dark-custom .sub-menu {
  border-left-color: rgba(255, 255, 255, .18) !important;
}

body.sidebar-dark-custom .sub-menu li a {
  color: rgba(255, 255, 255, .66) !important;
}

body.sidebar-dark-custom .sub-menu li a:hover,
body.sidebar-dark-custom .sub-menu li a.active,
body.sidebar-dark-custom .sub-menu li.active>a {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .10) !important;
}

body.sidebar-dark-custom .sub-menu li a::before {
  background: rgba(255, 255, 255, .35) !important;
}

body.sidebar-dark-custom .sub-menu li a:hover::before,
body.sidebar-dark-custom .sub-menu li a.active::before,
body.sidebar-dark-custom .sub-menu li.active>a::before {
  background: var(--primary) !important;
}

body.sidebar-dark-custom .arrow-toggle {
  background: rgba(255, 255, 255, .12) !important;
  color: #ffffff !important;
}

/* Brand wrapper follow sidebar background */
body.sidebar-dark-custom .navbar-brand-wrapper {
  background: var(--sidebar-bg) !important;
  border-right-color: rgba(255, 255, 255, .08) !important;
}

body.sidebar-dark-custom .navbar-brand {
  color: #ffffff !important;
}

/* White sidebar mode */
body.sidebar-light-custom .sidebar {
  background: #ffffff !important;
}

body.sidebar-light-custom .navbar-brand-wrapper {
  background: #ffffff !important;
}

/* Active sidebar color button */
.rp-sidebar-color.active {
  border-color: #ffffff !important;
  box-shadow:
    0 0 0 3px rgba(154, 85, 255, .35),
    0 8px 18px rgba(0, 0, 0, .18) !important;
  transform: scale(1.08) !important;
}