/* MyMappi v566: intentional main menu and calm private-account dashboard. */

html body .app-shell .category-rail.app-main-menu,
html body main.app-shell .category-rail.app-main-menu {
  position: fixed !important;
  top: calc(env(safe-area-inset-top) + 78px) !important;
  right: auto !important;
  bottom: auto !important;
  left: max(18px, env(safe-area-inset-left)) !important;
  width: min(370px, calc(100vw - 36px)) !important;
  max-width: min(370px, calc(100vw - 36px)) !important;
  max-height: min(72dvh, 620px) !important;
  padding: 16px !important;
  gap: 16px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 1px solid rgba(214, 250, 240, 0.16) !important;
  border-radius: 24px !important;
  color: #f5fffb !important;
  background:
    radial-gradient(circle at 9% 0%, rgba(37, 196, 148, 0.18), transparent 36%),
    linear-gradient(155deg, rgba(5, 42, 52, 0.97), rgba(5, 25, 39, 0.96)) !important;
  box-shadow:
    0 26px 68px rgba(2, 25, 37, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
  transform-origin: left top !important;
  z-index: 920 !important;
}

html body .app-shell .category-rail.app-main-menu.open,
html body main.app-shell .category-rail.app-main-menu.open {
  display: grid !important;
  animation: mymappiMenuIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.app-menu-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.app-menu-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(206, 255, 240, 0.2);
  border-radius: 16px;
  color: #effff9;
  background: linear-gradient(145deg, rgba(36, 190, 142, 0.3), rgba(29, 119, 164, 0.28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.app-menu-mark svg {
  width: 23px;
  height: 23px;
}

.app-menu-heading > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.app-menu-heading small,
.app-menu-label,
.account-menu-label {
  color: rgba(189, 238, 225, 0.58);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-menu-heading strong {
  overflow: hidden;
  color: #f8fffc;
  font-size: 1.02rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-section {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(214, 250, 240, 0.1);
}

.app-menu-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.app-menu-button,
.app-menu-list-button {
  min-width: 0;
  border: 1px solid rgba(214, 250, 240, 0.1);
  color: rgba(239, 255, 249, 0.84);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-menu-button {
  display: grid;
  grid-template-rows: 34px auto;
  gap: 7px;
  place-items: center;
  min-height: 86px;
  padding: 10px 6px;
  border-radius: 16px;
}

.app-menu-button > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #dffff5;
  background: linear-gradient(145deg, rgba(32, 180, 135, 0.24), rgba(35, 119, 163, 0.2));
}

.app-menu-button svg {
  width: 18px;
  height: 18px;
}

.app-menu-button strong {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.app-menu-list-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border-radius: 15px;
  text-align: left;
  text-decoration: none;
}

.app-menu-list-button > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #cffff0;
  background: rgba(62, 205, 162, 0.11);
}

.app-menu-list-button > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.app-menu-list-button strong,
.app-menu-list-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-list-button strong {
  color: #f4fffb;
  font-size: 0.82rem;
  font-weight: 820;
}

.app-menu-list-button small {
  color: rgba(213, 242, 234, 0.56);
  font-size: 0.69rem;
  font-weight: 650;
}

.app-menu-list-button > span:last-child {
  color: rgba(217, 246, 238, 0.42);
}

.app-menu-button:hover,
.app-menu-button:focus-visible,
.app-menu-list-button:hover,
.app-menu-list-button:focus-visible {
  border-color: rgba(116, 229, 195, 0.24);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.095);
  transform: translateY(-1px);
}

.app-menu-legal {
  display: flex;
  justify-content: center;
  gap: 9px;
  color: rgba(206, 239, 230, 0.4);
  font-size: 0.7rem;
  font-weight: 750;
}

.app-menu-legal a {
  color: rgba(220, 247, 239, 0.62);
  text-decoration: none;
}

html body .app-shell .account-menu,
html body main.app-shell .account-menu {
  width: min(400px, calc(100vw - 36px)) !important;
  max-width: min(400px, calc(100vw - 36px)) !important;
  max-height: min(72dvh, 650px) !important;
  padding: 16px !important;
  gap: 10px !important;
  border: 1px solid rgba(214, 250, 240, 0.16) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(39, 195, 147, 0.17), transparent 34%),
    linear-gradient(160deg, rgba(5, 41, 51, 0.97), rgba(5, 24, 38, 0.96)) !important;
  box-shadow:
    0 28px 72px rgba(2, 24, 36, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
}

html body .app-shell .account-menu.open,
html body main.app-shell .account-menu.open {
  display: grid !important;
  animation: mymappiAccountIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

html body .app-shell .account-cloud-card,
html body main.app-shell .account-cloud-card {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 4px 2px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(214, 250, 240, 0.11) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.account-profile-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(207, 255, 240, 0.2);
  border-radius: 17px;
  color: #f3fffb;
  background: linear-gradient(145deg, rgba(38, 194, 146, 0.34), rgba(29, 119, 164, 0.3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.account-profile-mark svg {
  width: 24px;
  height: 24px;
}

.account-profile-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-profile-copy > strong {
  overflow: hidden;
  color: #f8fffc;
  font-size: 1.02rem;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-copy > p {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(220, 246, 239, 0.6) !important;
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html body .app-shell .account-backup-dashboard,
html body main.app-shell .account-backup-dashboard {
  gap: 7px !important;
}

html body .app-shell .account-backup-stat,
html body main.app-shell .account-backup-stat {
  min-height: 64px !important;
  padding: 10px 11px !important;
  gap: 4px !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

html body .app-shell .account-backup-stat strong,
html body main.app-shell .account-backup-stat strong {
  font-size: 0.98rem !important;
}

html body .app-shell .account-sync-status,
html body main.app-shell .account-sync-status {
  padding: 9px 11px !important;
  border-radius: 14px !important;
  font-size: 0.72rem !important;
}

.account-menu-label {
  display: block;
  margin: 5px 3px 0;
}

.account-session-label {
  margin-top: 9px;
}

.account-menu-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

html body .app-shell .account-menu .account-menu-item,
html body main.app-shell .account-menu .account-menu-item {
  justify-content: flex-start !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(214, 250, 240, 0.1) !important;
  border-radius: 14px !important;
  color: rgba(236, 253, 248, 0.78) !important;
  font-size: 0.76rem !important;
  font-weight: 780 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

html body .app-shell .account-menu .account-menu-item svg,
html body main.app-shell .account-menu .account-menu-item svg {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto !important;
}

html body .app-shell .account-menu .account-sync-button,
html body main.app-shell .account-menu .account-sync-button {
  justify-content: center !important;
  min-height: 48px !important;
  border-color: rgba(203, 255, 240, 0.22) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #199f78, #127e9b) !important;
  box-shadow: 0 12px 26px rgba(13, 126, 142, 0.2) !important;
}

html body .app-shell .account-menu .account-menu-item:hover,
html body .app-shell .account-menu .account-menu-item:focus-visible,
html body main.app-shell .account-menu .account-menu-item:hover,
html body main.app-shell .account-menu .account-menu-item:focus-visible {
  border-color: rgba(116, 229, 195, 0.22) !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

html body .app-shell .account-menu .account-delete-button,
html body main.app-shell .account-menu .account-delete-button {
  margin-top: 5px !important;
  border-color: rgba(255, 140, 130, 0.11) !important;
  color: rgba(255, 195, 188, 0.72) !important;
  background: rgba(126, 36, 38, 0.12) !important;
}

html body .app-shell #accountMenuButton,
html body main.app-shell #accountMenuButton {
  overflow: visible !important;
}

html body .app-shell #accountMenuButton .account-nav-status,
html body main.app-shell #accountMenuButton .account-nav-status {
  position: absolute;
  top: 9px;
  left: calc(50% + 8px);
  width: 7px;
  height: 7px;
  border: 1.5px solid rgba(7, 47, 58, 0.92);
  border-radius: 50%;
  background: rgba(194, 219, 218, 0.55);
  box-shadow: 0 0 0 2px rgba(194, 219, 218, 0.06);
}

html body .app-shell #accountMenuButton.is-signed-in .account-nav-status,
html body main.app-shell #accountMenuButton.is-signed-in .account-nav-status {
  background: #53e3b3;
  box-shadow: 0 0 0 3px rgba(83, 227, 179, 0.1);
}

@keyframes mymappiMenuIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mymappiAccountIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  html body .app-shell .category-rail.app-main-menu,
  html body main.app-shell .category-rail.app-main-menu {
    top: calc(env(safe-area-inset-top) + 66px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(70dvh, 590px) !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  html body .app-shell .account-menu,
  html body main.app-shell .account-menu,
  html body .app-shell .account-menu.open,
  html body main.app-shell .account-menu.open {
    right: 10px !important;
    bottom: calc(78px + env(safe-area-inset-bottom) + 12px) !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(68dvh, 590px) !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .app-menu-navigation {
    gap: 7px;
  }

  .app-menu-button {
    min-height: 80px;
  }

  .account-menu-pair {
    gap: 7px;
  }

  html body .app-shell #accountMenuButton .account-nav-status,
  html body main.app-shell #accountMenuButton .account-nav-status {
    top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell .category-rail.app-main-menu.open,
  html body main.app-shell .category-rail.app-main-menu.open,
  html body .app-shell .account-menu.open,
  html body main.app-shell .account-menu.open {
    animation: none !important;
  }
}
