/* ===== MENU PANEL ===== */
.menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.menu-panel {
  position: absolute;
  bottom: 16px;
  left: 8px;
  right: 8px;
  z-index: 31;
  background: rgba(243,243,243,0.97);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border-radius: 21px;
  box-shadow: 0 0 2px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.14);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  padding: 8px 16px 16px;
  overflow: hidden;
}
.menu-overlay.visible .menu-panel {
  transform: translateY(0);
}
/* Bounce keyframe for menu entrance */
@keyframes menuBounce {
  0% { transform: translateY(100%); }
  60% { transform: translateY(-8px); }
  80% { transform: translateY(3px); }
  100% { transform: translateY(0); }
}
.menu-overlay.visible .menu-panel.bounce {
  animation: menuBounce 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

/* Drag handle */
.menu-handle {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: rgba(35,35,35,0.26);
  margin: 0 auto 16px;
}

/* Profile card */
.menu-profile {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  padding: 16px;
  gap: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-radius 0.3s ease, margin-bottom 0.3s ease;
}
.menu-profile.expanded {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}
.menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0078D4, #3E40C0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.menu-profile-info {
  flex: 1;
  min-width: 0;
}
.menu-profile-name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(0,0,0,0.86);
  line-height: 20px;
  letter-spacing: -0.23px;
}
.menu-profile-email {
  font-size: 13px;
  font-weight: 400;
  color: rgba(35,35,35,0.56);
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-profile-switch {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.menu-profile-switch svg {
  width: 20px;
  height: 20px;
  color: rgba(0,0,0,0.74);
  transition: transform 0.3s ease;
}
.menu-profile.expanded .menu-profile-switch svg {
  transform: rotate(180deg);
}

/* Expanded profile section */
.menu-profile-expanded {
  background: rgba(255,255,255,0.85);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.3s ease, margin-bottom 0.3s ease, opacity 0.15s ease;
  margin-bottom: 0;
}
.menu-profile-expanded.visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 10px;
  transition: grid-template-rows 0.3s ease, margin-bottom 0.3s ease, opacity 0.2s 0.05s ease;
}
.menu-profile-expanded-inner {
  min-height: 0;
  overflow: hidden;
}
.menu-profile-expanded-separator {
  height: 0.5px;
  background: rgba(0,0,0,0.08);
  margin: 0 16px;
}
.menu-profile-expanded-row {
  display: flex;
  align-items: center;
  padding: 4px 4px 4px 16px;
  gap: 12px;
}
.menu-profile-expanded-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0078D4, #3E40C0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.menu-profile-expanded-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: rgba(0,0,0,0.74);
  line-height: 20px;
}
.menu-profile-switch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #2169EB;
  font-size: 15px;
  font-weight: 600;
  font-family: -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  cursor: pointer;
}

/* Swipeable page tools container */
.menu-pages-viewport {
  overflow: hidden;
  position: relative;
}
.menu-pages-track {
  display: flex;
  transition: transform 0.3s ease;
  touch-action: pan-y;
}
.menu-page {
  flex: 0 0 100%;
  min-width: 0;
}

/* Icon grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 0;
}
.menu-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.menu-grid-item:active {
  background: rgba(0,0,0,0.06);
}
.menu-grid-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-grid-icon svg {
  width: 48px;
  height: 48px;
}
.menu-grid-icon.filled svg {
  width: 48px;
  height: 48px;
  color: #235cce;
}
.menu-grid-label {
  font-size: 12px;
  font-weight: 400;
  color: rgba(0,0,0,0.86);
  line-height: 16px;
  text-align: center;
  max-width: 72px;
  height: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* separator */
.menu-separator {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 10px 12px;
  gap: 10px;
  isolation: isolate;
  width: 100%;
  height: 12px;
}
.menu-separator::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: rgba(0,0,0,0.08);
}

/* Pagination dots */
.menu-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
}
.menu-dot {
  width: 16px;
  height: 2px;
  border-radius: 4px;
  background: rgba(0,0,0,0.11);
}
.menu-dot.active {
  background: rgba(0,0,0,0.86);
}

