/* ===============================
   GLOBAL LAYOUT & WRAPPER
================================= */
.user-wrapper {
  display: flex;
  min-height: 100vh;     /* Full height layout */
}

/* ===============================
   SIDEBAR
================================= */
#sidebar {
  background-color: #008080;
  color: white;
  width: 260px;
  padding: 20px;
  flex-shrink: 0;
  overflow-y: auto;      /* Independent scroll */
  height: 100vh;         /* Fill viewport */
  position: sticky;
  top: 0;
  z-index: 1030;
}

#sidebar a {
  display: block;
  padding: 6px 0;
  color: white;
  text-decoration: none;
}

#sidebar a:hover {
  text-decoration: underline;
}

/* Collapsible sections */
.menu-section {
  margin-bottom: 10px;
}
.menu-title {
  font-weight: bold;
  padding: 5px 0;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.menu-title::after {
  content: " ▸";
  float: right;
  transition: transform 0.3s ease;
}
.menu-section.active .menu-title::after {
  transform: rotate(90deg);
}
.submenu {
  margin-left: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.menu-section.active .submenu {
  max-height: 500px;
}
.submenu a {
  padding: 5px 0;
}

/* ===============================
   CONTENT
================================= */
.user-content {
  flex-grow: 1;
  padding: 1rem;
  /* ⛔ No independent scroll — scrolls with page */
}

/* ===============================
   NAVBAR (Bootstrap 5 fixes)
================================= */
.navbar {
  background-color: #cccccc !important;
  border: none;
}

.navbar-nav {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 15px;
}

.nav-link {
  color: #333 !important;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-link.active {
  background-color: #004d4d;
  color: #fff !important;
  font-weight: 700;
}

/* Dropdown fixes */
.dropdown-menu {
  background: #008080 !important;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  min-width: 200px;
}
.dropdown-item {
  color: #fff !important;
  font-weight: 600;
}
.dropdown-item:hover {
  background: #005353;
}

/* ===============================
   CARDS & COMPONENTS
================================= */
.card {
  border: none;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.card-title {
  font-size: 1rem;
  font-weight: bold;
}

/* Tabs */
.nav-tabs .nav-link {
  background-color: #cccccc;
  color: #333;
  font-weight: 600;
  border: none;
  border-radius: 4px 4px 0 0;
}
.nav-tabs .nav-link.active {
  background-color: #008080;
  color: #fff;
}

/* ===============================
   FOOTER
================================= */
footer {
  flex-shrink: 0;
  background-color: #f8f9fa;
  padding: 20px 0;
  text-align: center;
  width: 100%;
}

/* ===============================
   MOBILE ADJUSTMENTS
================================= */
@media (max-width: 767px) {
  .user-wrapper {
    flex-direction: column;
  }
  #sidebar {
    width: 100%;
    height: auto;
    position: relative;
    max-height: none;
  }
  .user-content {
    padding: 1rem;
  }
}
