/* Google Font Import - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* scroll */
*::-webkit-scrollbar {
  width: 7px;
}

*::-webkit-scrollbar-track {
  background: #f1f1f1;
}

*::-webkit-scrollbar-thumb {
  background: #aaa;
}

*::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.swiper-pagination-bullet-active {
  background: #a148ee !important;
}

:root {
  /* ===== Colors ===== */
  --body-color: #e4e9f7;
  --sidebar-color: #fff;
  --primary-color: #3a86ff;
  --primary-color-light: #f6f5ff;
  --toggle-color: #ddd;
  --text-color: #707070;

  /* ====== Transition ====== */
  --tran-03: all 0.2s ease;
  --tran-03: all 0.3s ease;
  --tran-04: all 0.3s ease;
  --tran-05: all 0.3s ease;
}

body {
  /* min-height: 100vh; */
  /* background-color: var(--body-color); */
  transition: var(--tran-05);
  background-color: #f3f5f8;
}

/* ::selection {
  background-color: var(--primary-color);
  color: #fff;
} */

body.dark {
  --body-color: #18191a;
  --sidebar-color: #242526;
  --primary-color: #3a3b3c;
  --primary-color-light: #3a3b3c;
  --toggle-color: #fff;
  --text-color: #ccc;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 250px;
  padding: 10px 14px;
  background: var(--sidebar-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  transition: var(--tran-05);
  z-index: 100;
}

.sidebar.close {
  width: 66px;
}

/* ===== Reusable code - Here ===== */
.sidebar li {
  height: 45px;
  list-style: none;
  display: flex;
  align-items: center;
  margin-top: 0px;
}

.sidebar header .image,
.sidebar .icon {
  min-width: 60px;
  border-radius: 6px;
}

.sidebar .logo-icon {
  font-size: 30px;
  color: #333;
}

.sidebar .icon {
  min-width: 40px;
  border-radius: 6px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.sidebar .text,
.sidebar .icon {
  color: #aaa;
  transition: var(--tran-03);
}

.sidebar .text {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
}

.sidebar.close .text {
  opacity: 0;
}

/* =========================== */

.sidebar header {
  position: relative;
}

.sidebar header .image-text {
  display: flex;
  align-items: center;
}

.sidebar header .logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text img {
  width: 120px;
  height: 30px;
  /* object-fit: cover; */
}

header .image-text .name {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 600;
}

header .image-text .profession {
  font-size: 16px;
  margin-top: -2px;
  display: block;
}

.sidebar header .image {
  display: flex;
  align-items: center;
  padding-left: 7px;
  /* justify-content: center; */
}

.sidebar header .image img {
  width: 40px;
  border-radius: 6px;
}

.sidebar header .toggle {
  position: absolute;
  top: 20%;
  right: -60px;
  transform: translateY(-50%) rotate(180deg);
  height: 40px;
  width: 40px;
  /* background-color: #fff; */
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  cursor: pointer;
  transition: var(--tran-05);
  display: none;
}

body.dark .sidebar header .toggle {
  color: var(--text-color);
}

.sidebar.close .toggle {
  transform: translateY(-50%) rotate(0deg);
}

.sidebar .menu {
  margin-top: 40px;
}

.sidebar li.search-box {
  border-radius: 6px;
  background-color: var(--primary-color-light);
  cursor: pointer;
  transition: var(--tran-05);
}

.sidebar li.search-box input {
  height: 100%;
  width: 100%;
  outline: none;
  border: none;
  background-color: var(--primary-color-light);
  color: var(--text-color);
  border-radius: 6px;
  font-size: 17px;
  font-weight: 500;
  transition: var(--tran-05);
}

.sidebar li a {
  list-style: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  height: 75%;
  width: 100%;
  border-radius: 6px;
  text-decoration: none;
  transition: var(--tran-03);
}

.sidebar li a:hover {
  background-color: #7a2cbff0;
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text {
  color: var(--sidebar-color);
}

body.dark .sidebar li a:hover .icon,
body.dark .sidebar li a:hover .text {
  color: var(--text-color);
}

/* New active class styles */
.sidebar li a.active {
  background-color: #7a2cbff0;
}

.sidebar li a.active .icon,
.sidebar li a.active .text {
  color: #fff;
}

body.dark .sidebar li a.active .icon,
body.dark .sidebar li a.active .text {
  color: #fff;
}

/* HR Dropdown Menu Styles */
.hr-dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
}

.hr-dropdown-menu.show {
  max-height: 300px;
  opacity: 1;
  visibility: visible;
}

.hr-dropdown-menu li {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hr-dropdown-menu.show li {
  opacity: 1;
  transform: translateX(0);
}

.hr-dropdown-menu.show li:nth-child(1) { transition-delay: 0.1s; }
.hr-dropdown-menu.show li:nth-child(2) { transition-delay: 0.15s; }
.hr-dropdown-menu.show li:nth-child(3) { transition-delay: 0.2s; }
.hr-dropdown-menu.show li:nth-child(4) { transition-delay: 0.25s; }

.hr-dropdown-menu li a {
  padding-left: 30px !important;
}

/* Dropdown Arrow Animation */
.dropdown-arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px !important;
  margin-left: auto;
}

.hr-dropdown-toggle.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Hover Effect for Desktop */
@media (min-width: 869px) {
  .dropdown:hover .hr-dropdown-menu {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
  }
  
  .dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
  }
  
  .dropdown:hover .hr-dropdown-menu li {
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Smooth close when mouse leaves */
  .hr-dropdown-menu {
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out, visibility 0s 0.3s;
  }
  
  .dropdown:hover .hr-dropdown-menu {
    transition: max-height 0.35s ease-in, opacity 0.3s ease-in, visibility 0s 0s;
  }
}

/* Mobile Dropdown Styles */
@media (max-width: 868px) {
  .hr-dropdown-menu {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-top: 5px;
  }
  
  .hr-dropdown-menu.show {
    animation: slideDown 0.3s ease-in-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.collapse li a {
  padding-left: 30px !important;
}

.sidebar .menu-bar {
  height: calc(100% - 55px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.menu-bar::-webkit-scrollbar {
  display: none;
}

.sidebar .menu-bar .mode {
  border-radius: 6px;
  background-color: var(--primary-color-light);
  position: relative;
  transition: var(--tran-05);
}

.menu-bar .mode .sun-moon {
  height: 50px;
  width: 60px;
}

.mode .sun-moon i {
  position: absolute;
}

.mode .sun-moon i.sun {
  opacity: 0;
}

body.dark .mode .sun-moon i.sun {
  opacity: 1;
}

body.dark .mode .sun-moon i.moon {
  opacity: 0;
}

.menu-bar .bottom-content .toggle-switch {
  position: absolute;
  right: 0;
  height: 100%;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
}

.toggle-switch .switch {
  position: relative;
  height: 22px;
  width: 40px;
  border-radius: 25px;
  background-color: var(--toggle-color);
  transition: var(--tran-05);
}

.switch::before {
  content: '';
  position: absolute;
  height: 15px;
  width: 15px;
  border-radius: 50%;
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
  background-color: var(--sidebar-color);
  transition: var(--tran-04);
}

body.dark .switch::before {
  left: 20px;
}

/* Sidebar on hover */
.sidebar.close:hover {
  width: 250px;
}

.sidebar.close:hover .text {
  opacity: 1;
}

.sidebar.close:hover .toggle {
  transform: translateY(-50%) rotate(180deg);
}

.home {
  /* position: absolute;
  top: 0;
  top: 0; */
  left: 250px;
  height: auto;
  /* width: calc(100% - 250px); */
  /* background-color: var(--body-color); */
  transition: var(--tran-05);
  width: 90%;
  margin: 0 auto;
}

.home .text {
  font-size: 30px;
  font-weight: 500;
  color: var(--text-color);
  padding: 12px 60px;
}

.sidebar.close~.home {
  left: 78px;
  height: auto;
  /* width: calc(60% - 78px); */
}

body.dark .home .text {
  color: var(--text-color);
}

/* @media screen and (max-width: 900px) {
  .home {
    position: absolute;
    top: 0;
    top: 0;
    left: 250px;
    height: auto;
    width: calc(100% - 250px);
    background-color: var(--body-color);
    transition: var(--tran-05);
    width: 60%;
  margin: 0 auto;
  }
  .sidebar.close ~ .home {
    left: 78px;
    height: auto;
    width: calc(100% - 78px);
  }
} */
/****** Knowledge hub page css start here  *****/
/* Knowledge */
.home-section {
  padding: 30px 50px;
}

.home h1 {
  font-size: 2rem;
  font-weight: bold;
}

.home .banner {
  background: linear-gradient(to right, #6084bf, #3b82f6);
  padding: 20px;
  border-radius: 15px;
  color: white;
  position: relative;
}

.home .banner .stat {
  font-size: 1.5rem;
  font-weight: bold;
}

.banner {
  background-color: #7b2cbf;
  color: white;
  border-radius: 15px;
  padding: 20px;
  margin: 10px;
  position: relative;
  /* height: 200px; */
}

.stat {
  font-size: 24px;
  font-weight: bold;
}

.slick-prev:before,
.slick-next:before {
  color: #7b2cbf;
}

.swiper-pagination-bulle {
  background-color: #fff !important;
  color: #fff !important;
}

.swiper-pagination {
  position: relative;
  margin-top: 20px;
}

.brain-title {
  color: #5a189a;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.brain-card {
  background-color: #7a2cbff0;
  /* background: radial-gradient(115.49% 100% at 49.96% 100%, #a34bfc 0, #a34bfc 100%); */
  color: white;
  border-radius: 15px;
  padding: 20px;
  margin: 10px;
  position: relative;
  height: 200px !important;
}

.new-brain-card {
  /* background-color: #e2e8f0; */
  background: linear-gradient(141deg, #7a2cbf13 0%, #b6b6b6 51%, #b6b6b6 75%);
  color: #1a202c;
}

.brain-icon {
  position: absolute;
  right: 15px;
  bottom: 10px;
  width: 170px;
  height: 170px;
}

.stat {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 0;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

.settings-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.slick-prev:before,
.slick-next:before {
  color: #7b2cbf;
}

.create-new-btn {
  background-color: white;
  color: #1a202c;
  border: none;
  border-radius: 20px;
  padding: 5px 15px;
  text-decoration: none;
}

.modal-content {
  border-radius: 15px;
}

.color-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 5px 10px;
  display: inline-block;
  cursor: pointer;
}

/* section content */
.nav-tabs .nav-link {
  color: #000;
  border: none;
}

.nav-tabs .nav-link.active {
  font-weight: bold;
  border-bottom: 2px solid #000;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.file-icon {
  margin-right: 10px;
}

.come-back {
  background-color: #e6f2ff;
  color: #0066cc;
  text-align: center;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

.uploader {
  text-align: center;
  border: 1px solid royalblue;
  margin: 15px 0;
  padding: 30px 0;
  border-radius: 5px;
}

.uploader label {
  cursor: pointer;
}

/* data of brain */

.file-item {
  width: 100%;
  background-color: #fff;
  padding: 15px;
  border: none;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  cursor: pointer;
  transition: all .3s;
}

.file-item:hover {
  background-color: #ffffff3c;
}

.dropdown-item:hover {
  background-color: transparent !important;
}

@media (max-width: 900px) {
  .home-section {
    padding: 30px 50px;
  }

  .sidebar li a {
    height: 100%;
  }
}

@media (max-width: 500px) {
  .home-section {
    padding: 30px 10px;
  }

  .home h1 {
    padding: 0 ;
    margin: 0;
  }
  .home h1 {
    font-size: 20px;
    font-weight: bold;
  }
  /* .brain-icon {
    display: none;
  } */
  .brain-icon {
    position: absolute;
    right: 0px;
    bottom: 20px;
    width: 90px;
    height: 90px;
  }

  .nav-item {
    font-size: 14px;
  }

  .nav-link {
    padding: 5px;
  }

  .container,
  .container-fluid,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    --bs-gutter-x: .1rem;
  }
}

/* this is a home page and it contact with js code in small screens  */
@media screen and (max-width: 868px) {
  .sidebar {
    left: -250px;
  }

  .sidebar.close {
    left: -88px;
  }

  .sidebar.show {
    left: 0;
  }

  .home {
    left: 0;
    width: 100%;
  }

  .sidebar.close~.home,
  .sidebar.show~.home {
    left: 0;
    width: 100%;
  }

  .sidebar header .toggle {
    right: -52px;
    transform: translateY(-50%);
    display: flex;
  }

  /* .sidebar.show header .toggle {
    right: 10px;
  } */
}

/* page settings */

.setting-box {
  padding: 30px;
}

.setting-box h1 {
  font-size: 20px;
  font-weight: 700
}

.setting-box form {
  padding: 20px;
}

.toggle-password {
  font-size: 18px;
  color: #aaa;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.form-group .col-form-label {
  font-weight: 600;
}

@media screen and (max-width: 600px) {
  .setting-box {
    padding: 20px 0px;
  }

  .setting-box form {
    padding: 5px;
  }
}

.parent-tags .wrapper-tags {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid #dee2e6;
  padding: 4px 10px;
  border-radius: 10px;
  margin: 5px 8px;
}

.input-tag {
  border: none;
  outline: none;
  background-color: transparent;
  padding: 4px 0;
  flex: 1;

}

.item-tag {
  display: flex;
  align-items: center;
  column-gap: 10px;
  width: max-content;
  box-shadow: 0 2px 10px 0 rgb(0, 0, 0, 8%);
  padding: 8px;
  background-color: #000;
  color: #fff;
  border-radius: 25px;
  font-size: 15px;
  cursor: default;
}

.btn-rm-tag {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 11px;
  cursor: pointer;
}

.tags-length {
  display: block;
  text-align: right;
  padding: 10px 5px;
  font-size: 14px;
}

/* module hr  */

.module-section {
  padding: 15px 25px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  border-radius: 10px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.module-content p {
  font-weight: bold;
  font-size: 18px;
}


/* select file */
.upload {
  display: flex;
  align-items: center;
  justify-content: center;
}


.wrapper-file {
  width: 100%;
  background: #fff;
  border-radius: 5px;
  padding: 10px;
}

.wrapper-file header {
  color: #6990F2;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}

.wrapper-file .form {
  height: 150px;
  display: flex;
  cursor: pointer;
  margin: 20px 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 5px;
  border: 1px dashed #6990F2;
}

.form :where(i, p) {
  color: #6990F2;
}

.form i {
  font-size: 30px;
}

.form p {
  margin-top: 15px;
  font-size: 16px;
}

section .row-progress {
  margin-bottom: 5px;
  background: #fff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  list-style: none;
  padding: 7px 10px;
  border-radius: 5px;
  display: flex;
  align-items: self-start;
  justify-content: space-between;
}

section .row-progress i {
  font-size: 20px;
}

section .details span {
  font-size: 14px;
}

.progress-area .row-progress .progress-content {
  width: 100%;
  margin-left: 15px;
}

.progress-area .details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 4px;
  justify-content: space-between;
}

.progress-area .progress-content .progress-bar {
  height: 6px;
  width: 100%;
  margin-bottom: 4px;
  background: #fff;
  border-radius: 30px;
}

.progress-content .progress-bar .progress-part {
  height: 100%;
  width: 0%;
  background: #6990F2;
  border-radius: inherit;
}

.uploaded-area {
  max-height: 180px;
  overflow-y: scroll;
}

.uploaded-area {
  max-height: 232px;
  overflow-y: scroll;
}

.uploaded-area::-webkit-scrollbar {
  width: 0;
}

.uploaded-area.onprogress {
  max-height: 150px;
}

.uploaded-area::-webkit-scrollbar {
  width: 0px;
}

.uploaded-area .row-progress .progress-content {
  display: flex;
  align-items: center;
}

.uploaded-area .row-progress .details {
  display: flex;
  margin-left: 15px;
  flex-direction: column;
}

.uploaded-area .row-progress .details .size {
  color: #404040;
  font-size: 11px;
}

.uploaded-area i.fa-check {
  font-size: 16px;
}

@media screen and (max-width: 1000px) {
  .module-section {
    padding: 15px;
  }

  .wrapper-file {
    border-radius: 5px;
    padding: 10px;
  }
}

.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.actions a i {
  font-size: 20px;
}


@media screen and (max-width: 500px) {
  section .row-progress {
    padding: 15px 7px;
  }

}

/* page dashboard */

.card-icons .icon-home-dashboard {
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.card-icons .fa-microchip {
  background-color: #7a2cbf2c;
  color: #7b2cbf;
}

.card-icons .fa-user {
  background-color: rgba(140, 233, 157, 0.304);
  color: rgba(40, 226, 84, 0.833);
}

.card-icons .fa-question {
  background-color: rgba(237, 155, 155, 0.304);
  color: rgba(212, 40, 40, 0.833);
}

.card-icons .fa-exclamation {
  background-color: rgba(255, 166, 0, 0.201);
  color: orange;
}

.card-icons .fa-wallet {
  background-color: rgba(255, 166, 0, 0.693) !important;
  color: white !important;
}

.card-icons .fa-chalkboard {
  background-color: #79a6e63f !important;
  color: #1c7cc6 !important;
}
.card-icons .fa-building {
  background-color: #7a2cbf2c !important;
  color: #7a2cbf !important;
}

.copy-link {
  font-size: 18px;
  color: #aaa;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

/* empty brain */

.empty-data {
  display: flex;
  justify-content: center;
}

.empty-data img {
  height: 400px;
}

@media screen and (max-width: 768px) {
  .empty-data img {
    height: 300px;
  }
}


/* page roles , add role , edit role , view role  */

.role-table .add-role {
  background-color: #7a36b6f0;
  color: white;
  border: none;
  padding: 10px 15px;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  font-size: 12px;
  line-height: 1.2;
  margin: 4px 2px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.role-table .add-role:hover {
  background-color: #771bc8;
}

.role-table .table-responsive {
  overflow-x: auto;
}

.role-table .table {
  margin-bottom: 0;
  min-width: 720px;
}

.role-table .table th,
.role-table .table td {
  vertical-align: middle;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
}

.role-table .table th {
  color: #707070;
}

.role-table .table td {
  color: #8c8c8c;
  font-size: 13px;
}

.role-table .table thead th {
  background-color: #b6b6b625;
  border-top: none;
  border-bottom: 2px solid #dee2e6;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  border: #fff;
}

.role-table .table tbody tr {
  background-color: #ffffff;
  border: #f1f1f1;
}

.role-table .table tbody tr:nth-of-type(even) {
  background-color: #f8f9fa;
}

.role-table .table td,
.role-table .table th {
  vertical-align: middle;
  padding: 0.6rem 0.75rem;
}

.role-table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  line-height: 1.1;
}

.form-roles {
  padding: 15px 25px;
}

.form-check-input:checked {
  background-color: #7a36b6f0;
  border: none;
}

.btn-outline-warning:hover,
.btn-outline-info:hover {
  color: #fff !important;
}

.form-users {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  /* gap: 10px; */
}

.form-users .form-group {
  margin: 5px;
}

.form-users .form-group label {
  display: flex;
  padding: 5px 0;
}

.form-users .form-group label::after {
  content: "*";
  padding: 0 5px;
  color: rgba(212, 40, 40, 0.833);
}

.status span,
.permision span {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status .active {
  background-color: #771BC8;
  color: #fff;
}

.status .not-active {
  background-color: rgba(237, 155, 155, 0.304);
  color: rgba(212, 40, 40, 0.833);
}

.permision span {
  background-color: #7a2cbf2c;
  color: #7b2cbf;
}

@media (max-width: 767px) {
  .role-table .table-responsive .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }

  .role-table .add-role {
    padding: 6px 10px;
    font-size: 12px;
    margin: 2px;
  }

  .action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .action-btns a {
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* scroll */
  .table-responsive {
    overflow-x: auto;
  }

  .role-table .table th,
  .role-table .table td {
    white-space: nowrap;
  }

  /* Customizing the scrollbar */
  .table-responsive::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  .table-responsive::-webkit-scrollbar-thumb {
    background-color: #8888888b;
    border-radius: 10px;
  }

  .table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: #999;
  }

  .table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  .role-table .table td,
.role-table .table th {
  vertical-align: middle;
  padding:  0.5rem;
}
}

@media screen and (max-width: 500px) {
  .form-roles {
    padding: 8px 10px;
  }

}

/* Create user modal — brand purple + dark/light body (matches role-table / brain-title) */
.create-user-modal .modal-content {
  border-radius: 14px;
  border: 1px solid rgba(122, 54, 182, 0.3);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28);
}

body.dark .create-user-modal .modal-content {
  background: #242526;
  border-color: rgba(167, 139, 250, 0.22);
  color: #e4e4e7;
}

body:not(.dark) .create-user-modal .modal-content {
  background: #fff;
}

body.dark .create-user-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body:not(.dark) .create-user-modal .modal-header {
  border-bottom: 1px solid #eee;
}

.create-user-modal .modal-title {
  font-weight: 700;
  color: var(--company-brand-primary, #5a189a);
}

body.dark .create-user-modal .modal-title {
  color: #c4b5fd;
}

body.dark .create-user-modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark .create-user-modal .form-label {
  color: #e4e4e7;
}

body.dark .create-user-modal .form-control,
body.dark .create-user-modal .form-select {
  background-color: #3a3b3c;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
}

body.dark .create-user-modal .form-control::placeholder {
  color: #a1a1aa;
}

body.dark .create-user-modal .form-control:focus,
body.dark .create-user-modal .form-select:focus {
  border-color: var(--company-brand-primary, #7b2cbf);
  box-shadow: 0 0 0 0.2rem rgba(122, 54, 182, 0.35);
  background-color: #3a3b3c;
  color: #f4f4f5;
}

body:not(.dark) .create-user-modal .form-control:focus,
body:not(.dark) .create-user-modal .form-select:focus {
  border-color: var(--company-brand-primary, #7b2cbf);
  box-shadow: 0 0 0 0.2rem rgba(122, 54, 182, 0.22);
}

body.dark .create-user-modal .select2-container--bootstrap-5 .select2-selection {
  background-color: #3a3b3c;
  border-color: rgba(255, 255, 255, 0.12);
  min-height: calc(1.5em + 0.75rem + 2px);
}

body.dark .create-user-modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: #f4f4f5;
}

body.dark .create-user-modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow b {
  border-color: #e4e4e7 transparent transparent transparent;
}

body.dark .create-user-modal .select2-container--bootstrap-5.select2-container--focus .select2-selection,
body.dark .create-user-modal .select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--company-brand-primary, #7b2cbf);
  box-shadow: 0 0 0 0.2rem rgba(122, 54, 182, 0.35);
}

body.dark .create-user-modal .select2-dropdown {
  background-color: #3a3b3c;
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark .create-user-modal .select2-results__option {
  color: #f4f4f5;
}

body.dark .create-user-modal .select2-results__option--highlighted {
  background-color: rgba(119, 27, 200, 0.55) !important;
  color: #fff !important;
}

body.dark .create-user-modal .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body:not(.dark) .create-user-modal .modal-footer {
  border-top: 1px solid #eee;
}

.create-user-modal .add-role {
  background-color: #7a36b6f0;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.create-user-modal .add-role:hover {
  background-color: #771bc8;
  color: #fff;
}

.create-user-modal .create-user-modal__cancel {
  background: transparent;
  border: 1px solid rgba(122, 54, 182, 0.45);
  color: var(--company-brand-primary, #7b2cbf);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
}

body.dark .create-user-modal .create-user-modal__cancel {
  border-color: rgba(196, 181, 253, 0.45);
  color: #c4b5fd;
}

body.dark .create-user-modal .create-user-modal__cancel:hover {
  background: rgba(122, 54, 182, 0.22);
  color: #f3e8ff;
}

body:not(.dark) .create-user-modal .create-user-modal__cancel:hover {
  background: rgba(122, 54, 182, 0.08);
}

body.dark .create-user-modal .alert-danger {
  background-color: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.4);
  color: #fda4af;
}

/* --------------------------------------------------------------------------
   App toast pattern (Bootstrap 5) — reuse: #dashboard-toast-container +
   window.showDashboardToast(type, message, titleOverride?)
   -------------------------------------------------------------------------- */
.dashboard-toast-container {
  z-index: 11000;
}

.dashboard-toast.toast {
  --dash-toast-bg: #181818;
  --dash-toast-border: rgba(255, 255, 255, 0.06);
  --dash-toast-title: #ffffff;
  --dash-toast-msg: #a3a3a3;
  --dash-toast-icon-ring: rgba(34, 197, 94, 0.45);
  --dash-toast-icon-inner: #141414;
  --dash-toast-icon-fg: #22c55e;
  padding: 0;
  max-width: min(420px, 92vw);
  background: transparent;
  border: none;
}

.dashboard-toast__inner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 0.65rem 1rem 1rem;
  min-width: 280px;
  background-color: var(--dash-toast-bg);
  border: 1px solid var(--dash-toast-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.dashboard-toast__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dash-toast-icon-inner);
  border: 1px solid var(--dash-toast-icon-ring);
  color: var(--dash-toast-icon-fg);
  font-size: 0.95rem;
}

.dashboard-toast__content {
  padding-right: 0.25rem;
}

.dashboard-toast__title {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--dash-toast-title);
  margin: 0 0 0.2rem 0;
}

.dashboard-toast__text {
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 400;
  color: var(--dash-toast-msg);
  margin: 0;
}

.dashboard-toast--error.toast {
  --dash-toast-icon-ring: rgba(248, 113, 113, 0.5);
  --dash-toast-icon-fg: #f87171;
}

.dashboard-toast__close {
  align-self: flex-start;
  margin-top: 0.1rem;
  margin-right: 0.15rem;
  padding: 0.35rem;
  opacity: 0.45;
  background: transparent;
}

.dashboard-toast__close:hover {
  opacity: 0.9;
}

body:not(.dark) .dashboard-toast.toast {
  --dash-toast-bg: #fafafa;
  --dash-toast-border: rgba(0, 0, 0, 0.08);
  --dash-toast-title: #18181b;
  --dash-toast-msg: #71717a;
  --dash-toast-icon-inner: #f4f4f5;
}

body:not(.dark) .dashboard-toast__close {
  filter: none;
  opacity: 0.5;
}

body.dark .dashboard-toast__close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.5;
}

body.dark .dashboard-toast__close:hover {
  opacity: 0.85;
}

.dashboard-toast--success,
.dashboard-toast--error {
  border-left: none;
}
