@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Thin-FD.woff2") format("truetype");
  font-weight: 100;
}

@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Light-FD.woff2") format("truetype");
  font-weight: 300;
}

@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-FD.woff2") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Medium-FD.woff2") format("truetype");
  font-weight: 500;
}

@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Bold-FD.woff2") format("truetype");
  font-weight: 700;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Shabnam", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body:not(.dark-mode) {
  direction: rtl;
  background-color: #f4f7fe;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f4f7fe;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#preloader .spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 3s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.top-header {
  display: none;
}

.side-header {
  position: fixed;
  top: 0;
  right: 0;
  padding: 30px;
  height: 100vh;
  width: 350px;
  background-color: #ffffff;
  overflow-y: auto;
}

.side-menu {
  height: 70%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: scroll;
  padding: 10px 0;
}

.side-menu::-webkit-scrollbar {
  display: none;
}

.logo {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.s-name {
  font-weight: 700;
}

.dm-btn i {
  width: 15px;
  height: 15px;
  text-align: center;
}

.dm-btn button {
  all: unset;
  cursor: pointer;
  padding: 8px 10px 5px 10px;
  background-color: #445ae1;
  color: #fff;
  border-radius: 10px;
}

.menu {
  width: 100%;
}

.menu a {
  text-decoration: none;
  color: #000;
}

.menu ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  cursor: pointer;
  margin-bottom: 10px;
}

.dashboard-menu:hover {
  background: #e3ddff;
  border-radius: 10px;
}

.dashboard-menu:hover .menu-icon {
  color: #461cff;
}

.dashboard-menu:active {
  background: #e3ddff;
  border-radius: 10px;
}

.dashboard-menu:active .menu-icon {
  color: #461cff;
}

.right-side {
  display: flex;
  align-items: center;
}

.menu-icon {
  margin-left: 8px;
  color: #9b9da9;
}

.toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.toggle-btn i {
  transition: transform 0.3s ease;
}

.toggle-btn i.rotate {
  transform: rotate(180deg);
}

.submenu li {
  padding: 8px 10px;
  margin: 0px 20px 0px 0px;
  cursor: pointer;
  border-radius: 10px;
}

.submenu li:hover {
  background: #e3ddff;
}

.submenu li:active {
  background: #e3ddff;
}

.submenu .menu-icon {
  color: #31589c;
}

.submenu li:hover .menu-icon {
  color: #461cff;
}

.submenu li:active .menu-icon {
  color: #461cff;
}

.account {
  height: 30%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: end;
}

.account-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.user-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.user-name {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.user-img {
  display: flex;
  align-items: center;
}

.user-img img {
  width: 70px;
  height: 70px;
}

.user-name-welcome {
  display: flex;
  flex-direction: column;
}

.edit-profile {
  display: flex;
  justify-content: center;
  align-items: end;
}

.profile-link {
  all: unset;
  cursor: pointer;
}

.logout {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background-color: #e3ddff;
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
}

.logout:hover {
  background-color: #c4b7fd;
}

input:focus {
  outline: none;
}

.active {
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(10px);
}

.mobile-slide {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}

.mobile-slide.active {
  display: block;
}

.mobile-slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.mobile-slide-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.5s ease;
  overflow-y: auto;
}

.mobile-slide.active .mobile-slide-content {
  transform: translateX(0);
  padding: 20px;
}

div:where(.swal2-container) div:where(.swal2-popup) {
  border-radius: 10px !important;
  font-size: 14px !important;
}

div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) {
  border-radius: 10px !important;
}

div:where(.swal2-container) div:where(.swal2-popup) a {
  color: #7066e0;
  text-decoration: none;
  font-weight: 600;
}

div:where(.swal2-container) button:where(.swal2-styled):not([disabled]) {
  border-radius: 10px !important;
}

@media only screen and (max-width: 1300px) {
  .top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    width: 100%;
    height: auto;
    background-color: #fff;
  }
  .top-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .top-s-name {
    font-weight: 700;
  }
  .s-version i {
    padding: 10px;
    background-color: #445ae1;
    color: #fff;
    border-radius: 10px;
  }
  .top-account {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
  }
  .top-account-details {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 30px;
  }
  .top-user-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
  }
  .top-user-name {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .top-user-img {
    display: flex;
    align-items: center;
  }
  .top-user-img img {
    width: 50px;
    height: 50px;
  }
  .top-user-name-welcome {
    display: flex;
    flex-direction: column;
  }
  .top-user-name-welcome span,
  .top-user-name-welcome span b {
    font-size: 12px;
  }
  .top-edit-profile {
    display: flex;
    justify-content: center;
    align-items: end;
  }
  .side-header {
    display: none;
  }
  .side-menu {
    height: 85%;
  }
  .account {
    height: 15%;
  }
}

@media only screen and (max-width: 1024px) {
  .side-header {
    display: none;
  }
  .main-content {
    margin-right: 0;
  }
  .top-user-img img {
    width: 45px;
    height: 45px;
  }
}

@media only screen and (max-width: 767px) {
  .top-user-name {
    flex-direction: row-reverse;
  }
  .top-user-name-welcome {
    text-align: left;
  }
  .top-s-name,
  .top-logout,
  .top-edit-profile {
    display: none;
  }
  div:where(.swal2-container).swal2-center > .swal2-popup {
    width: 330px;
  }
}

body.dark-mode {
  direction: rtl;
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .side-header,
body.dark-mode .mobile-slide-content {
  background-color: #1e1e1e;
}

body.dark-mode .menu a,
body.dark-mode .submenu li,
body.dark-mode .menu-icon,
body.dark-mode .toggle-btn {
  color: #cfcfcf;
}

body.dark-mode .submenu li:hover .menu-icon {
  color: #cfcfcf;
}

body.dark-mode .dashboard-menu:hover .menu-icon {
  color: #cfcfcf;
}

body.dark-mode .dashboard-menu:hover,
body.dark-mode .submenu li:hover {
  background: #2c2c2c;
}

body.dark-mode .dashboard-menu:active,
body.dark-mode .submenu li:active {
  background: #2c2c2c;
}

body.dark-mode .logout {
  background-color: #2c2c2c;
  color: #fff;
}

body.dark-mode .logout:hover {
  background-color: #3b3b3b;
}

body.dark-mode .top-header {
  color: #cfcfcf;
  background-color: #232323;
}

body.dark-mode #preloader {
  background: #121212;
}
