/* === NAVBAR: top bar + main navigation === */

.mh-topbar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: var(--text-sm);
}

.mh-topbar .mh-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
}

.mh-topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 600;
}

.mh-topbar__links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mh-topbar__links a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.mh-topbar__phone {
  text-decoration: none;
}

.mh-topbar__links a:hover,
.mh-topbar__phone:hover {
  color: var(--white);
  opacity: 0.92;
}

.mh-topbar__links a:focus,
.mh-topbar__phone:focus {
  outline: none;
  text-decoration: none;
}

.mh-topbar__sep {
  opacity: 0.6;
}

.mh-navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mh-navbar.is-scrolled {
  box-shadow: var(--shadow-md);
}

.mh-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.mh-navbar__logo {
  height: 42px;
  width: auto;
  display: block;
}

.mh-navbar a,
.mh-navbar a:hover,
.mh-navbar a:focus {
  text-decoration: none;
}

/* When Blade uses Bootstrap's .nav-link */
.mh-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 5px !important;
  border-radius: var(--radius-md);
  color: var(--gray-800);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.mh-navbar .nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mh-navbar .nav-link.active {
  background: var(--primary-light);
  border: 1px solid rgba(0, 80, 122, 0.25);
  color: var(--primary);
}

.mh-navbar__toggle {
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: none;
}

.mh-navbar__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-800);
}

.mh-navbar__toggle-bar + .mh-navbar__toggle-bar {
  margin-top: 5px;
}

.mh-navbar__menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.mh-nav {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.mh-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  color: var(--gray-800);
  font-weight: 600;
}

.mh-nav__link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mh-navbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* --- Toolbar: messages, notifications, plans (v1 header parity) --- */
.mh-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mh-toolbar__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-800);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.mh-toolbar__btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(0, 80, 122, 0.35);
  box-shadow: 0 2px 10px rgba(0, 80, 122, 0.12);
}

.mh-toolbar__btn.is-active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.mh-toolbar__btn i {
  font-size: 1.05rem;
}

.mh-toolbar__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  color: var(--white);
  background: #dc2626;
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* --- Profile trigger + dropdown --- */
.mh-profile {
  position: relative;
  margin-left: 4px;
}

.mh-profile__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  color: var(--gray-900);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mh-profile__trigger:hover {
  border-color: rgba(0, 80, 122, 0.35);
  box-shadow: 0 2px 12px rgba(0, 80, 122, 0.1);
}

.mh-profile__avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--primary-light);
}

.mh-profile__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mh-profile__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-profile__chev {
  font-size: 0.65rem;
  color: var(--gray-600);
  transition: transform 0.2s ease;
}

.mh-profile.is-open .mh-profile__chev {
  transform: rotate(180deg);
}

.mh-profile__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 280px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0;
  z-index: 10050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.mh-profile.is-open .mh-profile__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mh-profile__menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.mh-profile__menu-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.mh-profile__menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mh-profile__menu-meta {
  flex: 1;
  min-width: 0;
}

.mh-profile__menu-name {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: 4px;
}

.mh-profile__menu-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
}

.mh-profile__menu-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.mh-profile__menu-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0;
}

.mh-profile__menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gray-800);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mh-profile__menu-item i {
  width: 18px;
  text-align: center;
  color: var(--gray-600);
}

.mh-profile__menu-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mh-profile__menu-item:hover i {
  color: var(--primary);
}

.mh-profile__menu-item--danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.mh-profile__menu-item--danger:hover i {
  color: #b91c1c;
}

.mh-profile__menu-form {
  margin: 0;
}

@media (max-width: 992px) {
  .mh-profile__name {
    display: none;
  }

  .mh-profile__trigger {
    padding-right: 10px;
  }

  .mh-toolbar {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .mh-navbar__actions {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.mh-dropdown {
  position: relative;
}

.mh-dropdown__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  min-width: 240px;
  display: none;
}

.mh-dropdown.is-open > .mh-dropdown__menu {
  display: block;
}

.mh-dropdown__link,
.mh-mega__link {
  display: block;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  color: var(--gray-800);
  font-weight: 600;
}

.mh-dropdown__link:hover,
.mh-mega__link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.mh-mega {
  min-width: 520px;
}

.mh-mega__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mh-mega__title {
  font-weight: 800;
  color: var(--gray-900);
  padding: 8px 10px;
}
