﻿/* ===== Navigation Bar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  z-index: 99998;
}

.navbar .navbar-brand {
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.navbar .navbar-brand:hover {
  color: var(--accent-color);
}

.navbar .menu-toggle {
  position: absolute;
  left: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.navbar .menu-toggle:hover {
  transform: scale(1.1);
}

/* ===== Sidebar Styles ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: -270px;
  width: 270px;
  height: 100%;
  background: #fff;
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  transition: left 0.3s ease;
  z-index: 99999;
}

.sidebar.active {
  left: 0;
}

/* Sidebar Header */
.sidebar-header {
  padding: 20px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h5 {
  margin: 0;
  font-size: 1.2rem;
}

/* Navigation Menu */
.nav {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}

.nav li {
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Menu Rows */
.nav .menu-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.nav .menu-row a {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #000;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 1rem;
}

.nav .menu-row a:hover {
  background-color: #f0f5ff;
  color: #2575fc;
}

.nav i {
  margin-right: 15px;
  width: 20px;
  text-align: center;
  color: #6a11cb;
}

/* Collapse Toggle */
.collapse-toggle {
  margin-left: auto;
  cursor: pointer;
  padding: 0 15px;
  color: #6a11cb;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
}

.collapse-menu.active .collapse-toggle i {
  transform: rotate(180deg);
}

/* Submenu Content */
.collapse-content {
  width: 100%;
  background-color: #f8f9fa;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.collapse-content.active {
  max-height: 500px;
}

.collapse-content a {
  display: block;
  padding: 12px 20px 12px 55px;
  font-size: 1rem;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  border-left: 3px solid transparent;
}

.collapse-content a:hover {
  background-color: #e8eeff;
  color: #2575fc;
  border-left: 3px solid #6a11cb;
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  transition: all 0.3s;
}

.overlay.active {
  display: block;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
    left: -250px;
  }
  
  .collapse-content a {
    padding-left: 50px;
  }
  
  .collapse-content a:before {
    left: 30px;
  }
}