/** @format */

@font-face {
  font-family: "Vazirmatn FD";
  src:
    local("Vazirmatn FD Medium"),
    local("Vazirmatn-FD-Medium"),
    url("fonts/Vazirmatn-FD-Medium.woff") format("woff"),
    url("fonts/Vazirmatn-FD-Medium.svg#Vazirmatn-FD-Medium") format("svg");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn FD", sans-serif;
}

body {
  background: #f1f5f9;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 250px;
  background: #0f172a;
  color: white;
  transition: 0.3s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar-header {
  padding: 20px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

/* menu */

.menu {
  list-style: none;
  padding: 10px;
  flex: 1;
}

.menu li {
  margin-bottom: 6px;
}

.menu,
.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  background: none;
  color: #cbd5e1;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.2s;
}

.nav-btn:hover {
  background: #1e293b;
}

.nav-btn.active {
  background: #3b82f6;
  color: white;
}

.icon {
  font-size: 32px;
  min-width: 32px;
  text-align: center;
}

.Subcategory-icon {
  width: 32px;
  height: 32px;
}

.label {
  white-space: nowrap;
  transition: 0.2s;
}

/* collapse sidebar */

.sidebar.collapsed .label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-btn {
  justify-content: center;
}

.sidebar.collapsed .sidebar-header {
  display: none;
}

/* submenu animation */

.has-submenu .submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-5px);
  margin-right: 20px;

  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.has-submenu.open .submenu {
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
}

/* arrow */

.arrow {
  margin-right: auto;
  transition: transform 0.25s ease;
}

.has-submenu.open .arrow {
  transform: rotate(90deg);
}

/* sub buttons */

.sub-btn {
  font-size: 14px;
  padding-right: 24px;
}

/* main */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.divider {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
  display: inline-block;
}

.topbar-left {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle {
  font-size: 20px;
  background: #e2e8f0;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.content {
  flex: 1;
  padding: 25px;
  overflow: auto;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* mobile */

.mobile-btn {
  display: none;
  position: fixed;
  top: 6px;
  right: 15px;
  z-index: 2000;
  background: #3b82f6;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 20px;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    right: -250px;
    top: 0;
    height: 100%;
    z-index: 1000;
  }

  .sidebar.active {
    right: 0;
  }

  .mobile-btn {
    display: block;
  }

  .topbar .toggle {
    display: none !important;
  }
}

.icontopbarleft {
  width: 32px;
  height: 32px;
}

.github {
  width: 40px;
  height: 40px;
}

/* ============ Footer =================== */

.sidebar-footer {
  margin-top: auto;
  padding: 15px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  transition: 0.2s;
}

.footer-text {
  transition: 0.2s;
}

.sidebar.collapsed .footer-text {
  opacity: 0;
  width: 0;
}
