/* Sidebar */
.sidebar {
  width: 220px;
  background: #FFF7F2;
  margin-top:60px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  transition: transform 0.3s ease-in-out;
  z-index: 999;

}
.logo {
  display: none;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 220px; /* matches sidebar width */
  right: 0;
  height: 60px;
  background: #FFF7F2;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 998; /* below sidebar */
}

/* Burger Button */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: #872657;
  color: white;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  z-index: 1000;
  cursor: pointer;
  border: none;
  font-size: 1.2rem;
}

/* --- Lavender Logo --- */
.topbar .logo {
  font-size: 1.4rem;
  font-weight: bold;
  font-family: 'Macondo', cursive;
  color: #872657;
  text-decoration: none;
  margin: 0 auto;
}

.topbar .logo:hover {
  color: #D462A6;
  transition: color 0.3s ease;
}

.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* User Info */
.user-info {
  text-align: center;
  margin-bottom: 20px;
  color: #872657;
}

.profile-pic {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.6rem;
  border: 2px solid #872657; /* subtle border */
}

.username-link {
  color: #872657;
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: bold;
  display: block;
  margin-bottom: 0.3rem;
}

.logout-link,
.login-link {
  color: #872657;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* Nav Links */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin: 0.8rem 0;
}

.sidebar ul li a {
  color: #872657;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  background-color: #fff;
  transform: translateX(3px); /* little slide effect */
}

/* Sidebar Separator */
.sidebar-separator {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2rem 0;
}
.sidebar-text {
  font-size: 0.9rem;
  color: #471f04;
  font-family: 'Macondo', sans-serif;
  text-align: center;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

/* Topbar Right Buttons */
.topbar-right {
  display: flex;
  gap: 0.8rem;
  margin-left: auto;
}

.topbar-btn {
  font-size: 1.2rem;
  text-decoration: none;
  color: #872657;
  padding: 0.3rem 0.6rem;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.topbar-btn:hover {
  background: #D462A6;
  color: #fff;
}

.topbar-left {
  display: flex;
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.search-form input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 20px 0 0 20px;
  outline: none;
}

.search-form button {
  background: #872657;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 0 20px 20px 0;
  color: #fff;
  cursor: pointer;
}

/* Search Icon */
.search-icon {
  display: none;
  font-size: 1.2rem;
  color: #872657;
  padding: 0.3rem 0.6rem;
  border-radius: 50%;
  transition: background 0.3s ease;
  cursor: pointer;
}

.search-icon:hover {
  background: #D462A6;
  color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: block;
  }

  .topbar {
    left: 0;
    width: 100%;
  }

  .sidebar {
    transform: translateX(-100%);
    top: 60px; /* below topbar */
    height: calc(100vh - 60px);
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .search-form {
    display: none;
  }
  .search-icon {
    display: block;
  }

  .sidebar {
    padding: 1rem 0.8rem;
  }
  .sidebar ul li {
    margin: 0.6rem 0;
  }

  .topbar-right {
    gap: 0.5rem;
  }

  .topbar-center {
    position: relative;
    left: auto;
    transform: none;
    margin: 0 auto;
  }

  .topbar .logo {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
  }
}
