/* ===== Sidebar ===== */

/* Transitions */
.page-wrapper .sidebar-wrapper,
.sidebar-wrapper .sidebar-brand > a,
.sidebar-wrapper .sidebar-dropdown > a:after,
.sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li a:before,
.sidebar-wrapper ul li a i,
.page-wrapper .page-content,
.sidebar-wrapper .sidebar-menu ul li a,
#show-sidebar,
#close-sidebar {
  transition: all 0.3s ease;
}

/* ===== Page wrapper ===== */
.page-wrapper {
  height: 100vh;
}

.page-wrapper.toggled .sidebar-wrapper {
  left: 0;
}

@media screen and (min-width: 768px) {
  .page-wrapper.toggled .page-content {
    padding-left: 260px;
  }
}

/* ===== Show/close sidebar buttons ===== */
#show-sidebar {
  background-color: #252525;
  border: 1px solid #333;
  position: fixed;
  left: 0;
  top: 10px;
  border-radius: 0 8px 8px 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition-delay: 0.3s;
  z-index: 99;
  color: #888;
}

#show-sidebar:hover {
  color: #FF6B00;
  border-color: rgba(255, 107, 0, 0.3);
}

.page-wrapper.toggled #show-sidebar {
  left: -40px;
}

#close-sidebar {
  cursor: pointer;
  font-size: 16px;
  color: #666;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

#close-sidebar:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* ===== Sidebar container ===== */
.sidebar-wrapper {
  width: 260px;
  height: 100%;
  max-height: 100%;
  position: fixed;
  top: 0;
  left: -300px;
  z-index: 999;
  background: #131313;
  border-right: 1px solid #222;
  font-family: 'DM Sans', sans-serif;
}

.sidebar-wrapper ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.sidebar-wrapper a {
  text-decoration: none;
}

/* ===== Sidebar content (scrollable) ===== */
.sidebar-content {
  max-height: calc(100% - 48px);
  height: calc(100% - 48px);
  overflow-y: auto;
  position: relative;
}

.sidebar-content.desktop {
  overflow-y: hidden;
}

/* ===== Brand ===== */
.sidebar-brand {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2a2a2a;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  color: #fff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar-brand-link:hover {
  color: #fff !important;
}

.sidebar-brand-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #FF6B00, #FF8533);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
}

/* ===== User header ===== */
.sidebar-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

.sidebar-header .user-pic {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #333;
}

.sidebar-header .user-pic img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.sidebar-header .user-info {
  min-width: 0;
}

.sidebar-header .user-info > span {
  display: block;
}

.sidebar-header .user-info .user-name strong {
  color: #e0e0e0 !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.sidebar-header .user-info .business-name {
  font-size: 0.75rem;
  color: #777;
}

.sidebar-header .user-info .switch-account {
  font-size: 0.7rem;
  margin-top: 4px;
  display: block;
}

.sidebar-header .user-info .switch-account a {
  text-decoration: none;
  color: #888;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  background: #222;
  border: 1px solid #2a2a2a;
  transition: all 0.2s ease;
}

.sidebar-header .user-info .switch-account a:hover {
  color: #ccc;
  border-color: #444;
}

.sidebar-header .user-info .switch-account a:hover i {
  color: #FF6B00;
}

.sidebar-header .user-info .switch-account i {
  font-size: 9px;
  margin-right: 5px;
}

/* ===== Menu ===== */
.sidebar-menu {
  padding: 0.5rem 0;
}

.sidebar-menu .header-menu span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #555;
  padding: 1rem 1.25rem 0.4rem;
  display: inline-block;
}

.sidebar-menu ul li a {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  position: relative;
  padding: 0.5rem 1.25rem;
  color: #888;
  font-size: 0.85rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.sidebar-menu ul li a:hover {
  color: #ccc;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-menu ul li a i {
  margin-right: 0.65rem;
  font-size: 0.8rem;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 6px;
  background: #222;
  color: #666;
  flex-shrink: 0;
  transition: all 0.2s;
}

.sidebar-menu ul li a:hover i {
  color: #FF6B00;
}

/* Active item */
.sidebar-menu ul li.active-sidebar-item > a {
  color: #fff;
  background: rgba(255, 107, 0, 0.06);
  border-left-color: #FF6B00;
}

.sidebar-menu ul li.active-sidebar-item > a i {
  color: #FF6B00;
  background: rgba(255, 107, 0, 0.1);
}

/* ===== Dropdown ===== */
.sidebar-dropdown > a:after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f105";
  display: inline-block;
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #555;
  transition: transform 0.2s;
}

.sidebar-dropdown.active > a:after {
  transform: translateY(-50%) rotate(90deg);
}

.sidebar-submenu {
  display: none;
}

.sidebar-submenu ul {
  padding: 0.25rem 0;
}

.sidebar-submenu li {
  padding-left: 1rem;
}

.sidebar-submenu li a {
  font-size: 0.8rem !important;
  padding: 0.35rem 1.25rem !important;
  color: #777 !important;
}

.sidebar-submenu li a:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #444;
  margin-right: 0.6rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.sidebar-submenu li a:hover {
  color: #ccc !important;
}

.sidebar-submenu li a:hover:before {
  background: #FF6B00;
}

.sidebar-submenu li.active-sidebar-item a {
  color: #fff !important;
}

.sidebar-submenu li.active-sidebar-item a:before {
  background: #FF6B00;
}

/* Remove icon background in submenus */
.sidebar-submenu li a i {
  display: none;
}

/* ===== Footer ===== */
.sidebar-footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  border-top: 1px solid #2a2a2a;
  background: #0f0f0f;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  color: #666 !important;
  text-decoration: none !important;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-logout:hover {
  color: #f87171 !important;
  background: rgba(248, 113, 113, 0.05);
}

.sidebar-logout i {
  font-size: 0.85rem;
}

/* ===== Page content ===== */
.page-wrapper .page-content {
  display: inline-block;
  width: 100%;
  min-height: 100vh;
  padding-left: 0;
  padding-top: 20px;
  overflow-x: hidden;
}
