.mh-site-footer {
  position: relative;
  margin-top: clamp(2rem, 6vw, 4.5rem);
  padding-top: clamp(0.4rem, 2vw, 1rem);
  background: transparent;
}

.mh-site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 84%, rgba(0, 217, 255, 0.045), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(33, 230, 193, 0.04), transparent 22%);
  opacity: 0.6;
}

.mh-site-footer > .mh-container {
  position: relative;
  z-index: 1;
}

.mh-site-footer .mh-divider {
  opacity: 0.58;
}

.mh-toast-viewport {
  position: fixed;
  top: calc(var(--mh-header-h) + 1rem);
  right: clamp(0.85rem, 2vw, 1.5rem);
  z-index: 320;
  display: grid;
  gap: 0.75rem;
  width: min(25rem, calc(100vw - 1.7rem));
  pointer-events: none;
}

[dir="rtl"] .mh-toast-viewport,
.mh-shell[data-rtl="true"] .mh-toast-viewport {
  left: clamp(0.85rem, 2vw, 1.5rem);
  right: auto;
}

.mh-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1rem 0.95rem;
  overflow: hidden;
  border-radius: 1.45rem;
  border: 1px solid color-mix(in srgb, var(--mh-glass-edge) 78%, var(--mh-card-border));
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(160deg, color-mix(in srgb, var(--mh-card-highlight) 94%, transparent), color-mix(in srgb, var(--mh-surface-strong) 96%, transparent));
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 44px rgba(7, 15, 24, 0.2);
  color: var(--mh-text);
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.mh-toast::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mh-muted) 50%, transparent);
}

.mh-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mh-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
}

.mh-toast[data-tone="success"]::after {
  background: linear-gradient(180deg, #34d399, #10b981);
}

.mh-toast[data-tone="warning"]::after {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.mh-toast[data-tone="danger"]::after {
  background: linear-gradient(180deg, #fb7185, #ef4444);
}

.mh-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.95rem;
  background: color-mix(in srgb, var(--mh-surface-soft) 90%, transparent);
  color: var(--mh-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mh-toast__icon svg,
.mh-toast__close svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.mh-toast[data-tone="success"] .mh-toast__icon {
  color: #10b981;
}

.mh-toast[data-tone="warning"] .mh-toast__icon {
  color: #f59e0b;
}

.mh-toast[data-tone="danger"] .mh-toast__icon {
  color: #ef4444;
}

.mh-toast__copy {
  padding-top: 0.15rem;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--mh-text);
}

.mh-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 0.95rem;
  background: color-mix(in srgb, var(--mh-surface-soft) 84%, transparent);
  color: var(--mh-muted);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.mh-toast__close:hover {
  background: color-mix(in srgb, var(--mh-accent-soft) 72%, var(--mh-surface-soft));
  color: var(--mh-text);
  transform: translateY(-1px);
}

.mh-toast__progress {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.5rem;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mh-card-border) 84%, transparent);
  overflow: hidden;
}

.mh-toast__progress::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--mh-accent), color-mix(in srgb, var(--mh-accent-secondary) 78%, white));
  animation: mh-toast-progress linear forwards;
  animation-duration: var(--mh-toast-duration, 5200ms);
}

.mh-toast[data-persistent="true"] .mh-toast__progress {
  display: none;
}

.mh-password-field {
  position: relative;
}

.mh-password-field .mh-field {
  padding-inline-end: 3.45rem;
}

[dir="rtl"] .mh-password-field .mh-field,
.mh-shell[data-rtl="true"] .mh-password-field .mh-field {
  padding-inline-end: 1rem;
  padding-inline-start: 3.45rem;
}

.mh-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 0.95rem;
  background: color-mix(in srgb, var(--mh-surface-soft) 88%, transparent);
  color: var(--mh-muted);
  transform: translateY(-50%);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

[dir="rtl"] .mh-password-toggle,
.mh-shell[data-rtl="true"] .mh-password-toggle {
  left: 0.65rem;
  right: auto;
}

.mh-password-toggle:hover {
  background: color-mix(in srgb, var(--mh-accent-soft) 72%, var(--mh-surface-soft));
  color: var(--mh-text);
}

.mh-password-toggle:active {
  transform: translateY(calc(-50% + 1px));
}

.mh-password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.mh-password-toggle [data-password-icon="visible"] {
  display: none;
}

.mh-password-toggle[data-password-state="visible"] [data-password-icon="hidden"] {
  display: none;
}

.mh-password-toggle[data-password-state="visible"] [data-password-icon="visible"] {
  display: block;
}

.mh-account-menu {
  position: relative;
  display: none;
}

.mh-account-menu summary {
  list-style: none;
  cursor: pointer;
}

.mh-account-menu summary::-webkit-details-marker {
  display: none;
}

.mh-header-actions {
  margin-right: 0.65rem !important;
  gap: 0.75rem !important;
  display: flex !important;
  align-items: center !important;
}

.mh-account-chip {
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--mh-card-border, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  padding: 4px 14px 4px 5px !important;
  border-radius: 14px !important;
  min-width: 0 !important;
  width: auto !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="dark"] .mh-account-chip,
.dark .mh-account-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.mh-account-chip:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.15) !important;
}

.mh-account-avatar--squircle {
  border-radius: 10px !important;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0 !important;
}

/* --- VERTICAL LANGUAGE CAPSULE --- */
.mh-lang-capsule {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 31px;
  height: 56px;
  padding: 8px 4px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mh-card-border) 92%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--mh-surface-soft) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(7, 16, 28, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mh-lang-capsule:hover {
  background: color-mix(in srgb, var(--mh-surface-strong) 92%, transparent);
  border-color: var(--mh-muted);
  transform: translateY(-1px);
}

.mh-lang-capsule__icon {
  color: var(--mh-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mh-lang-capsule__code {
  font-size: 9px;
  font-weight: 800;
  color: var(--mh-text);
  letter-spacing: 0.02em;
  line-height: 1;
}

.mh-account-menu[open] .mh-account-trigger {
  color: var(--mh-text);
  border-color: color-mix(in srgb, var(--mh-accent) 24%, var(--mh-card-border));
}

.mh-account-dropdown {
  position: absolute;
  top: calc(100% + 0.9rem);
  right: 0;
  width: min(22rem, 92vw);
  padding: 0.8rem;
  border-radius: 1.65rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(160deg, color-mix(in srgb, var(--mh-card-highlight) 92%, transparent), color-mix(in srgb, var(--mh-surface-strong) 96%, transparent));
  border: 1px solid color-mix(in srgb, var(--mh-glass-edge) 82%, var(--mh-card-border));
  backdrop-filter: blur(22px) saturate(1.32);
  -webkit-backdrop-filter: blur(22px) saturate(1.32);
  box-shadow: var(--mh-shadow);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
  z-index: 25;
}

[dir="rtl"] .mh-account-dropdown,
.mh-shell[data-rtl="true"] .mh-account-dropdown {
  left: 0;
  right: auto;
  transform-origin: top left;
}

.mh-account-menu[open] .mh-account-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mh-account-dropdown__item,
.mh-account-dropdown__section {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.88rem 0.95rem;
  border-radius: 1.15rem;
  color: var(--mh-text);
  background: transparent;
  border: 1px solid transparent;
}

.mh-account-dropdown__item {
  text-decoration: none;
  justify-content: space-between;
}

.mh-account-dropdown__item:hover,
.mh-account-dropdown__section:hover {
  border-color: color-mix(in srgb, var(--mh-accent) 22%, var(--mh-card-border));
  background: color-mix(in srgb, var(--mh-accent-soft) 58%, var(--mh-surface-soft));
}

.mh-account-dropdown__item-copy,
.mh-account-dropdown__section-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.12rem;
}

.mh-account-dropdown__item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--mh-text);
}

.mh-account-dropdown__section-note,
.mh-account-dropdown__value {
  font-size: 0.78rem;
  color: var(--mh-muted);
}

.mh-account-dropdown__item--danger {
  color: #ff8c98;
}

.mh-account-dropdown__item--danger .mh-account-dropdown__item-title,
.mh-account-dropdown__item--danger svg {
  color: inherit;
}

.mh-theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  flex-shrink: 0;
}

.mh-theme-switch__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  width: 5rem;
  height: 2.8rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mh-card-border) 92%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--mh-surface-soft) 82%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(7, 16, 28, 0.1);
}

.mh-theme-switch__thumb {
  position: absolute;
  inset: 0.26rem auto 0.26rem 0.28rem;
  width: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mh-accent), color-mix(in srgb, var(--mh-accent-secondary) 84%, white));
  box-shadow:
    0 10px 18px rgba(0, 217, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background 220ms ease;
}

.mh-theme-switch__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mh-muted);
  transition: color 180ms ease, transform 180ms ease;
}

.mh-theme-switch[data-theme-state="dark"] .mh-theme-switch__thumb {
  transform: translateX(2.18rem);
  background: linear-gradient(135deg, color-mix(in srgb, var(--mh-surface-strong) 78%, #111827), #06111d);
}

.mh-theme-switch[data-theme-state="light"] [data-theme-icon="sun"],
.mh-theme-switch[data-theme-state="dark"] [data-theme-icon="moon"] {
  color: var(--mh-text);
  transform: scale(1.04);
}

.mh-mobile-theme-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--mh-surface-soft) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--mh-card-border) 92%, transparent);
}

.mh-mobile-theme-card__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mh-text);
}

.mh-logout-modal {
  width: min(100%, 31rem);
}

.mh-logout-modal__body {
  margin-top: 1rem;
  color: var(--mh-muted-strong);
  line-height: 1.75;
}

.mh-logout-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.mh-logout-modal__actions form {
  margin: 0;
}

.mh-feedback-modal {
  width: min(100%, 28rem);
  text-align: center;
}

.mh-feedback-modal__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mh-muted);
}

.mh-feedback-modal__title {
  margin-top: 0.65rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mh-text);
}

.mh-feedback-modal__body {
  margin-top: 0.95rem;
  color: var(--mh-muted-strong);
  line-height: 1.75;
}

.mh-feedback-modal__spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.mh-feedback-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.mh-feedback-modal[data-tone="success"] .mh-feedback-modal__title {
  color: #10b981;
}

.mh-feedback-modal[data-tone="warning"] .mh-feedback-modal__title {
  color: #f59e0b;
}

.mh-feedback-modal[data-tone="danger"] .mh-feedback-modal__title {
  color: #ef4444;
}

.iti {
  width: 100%;
  position: relative;
}

.iti input.mh-field[type="tel"] {
  min-height: 3.45rem;
  padding-inline: 6.1rem 1rem;
}

[dir="rtl"] .iti input.mh-field[type="tel"],
.mh-shell[data-rtl="true"] .iti input.mh-field[type="tel"] {
  padding-inline: 1rem 6.1rem;
}

.iti--separate-dial-code .iti__selected-country-primary {
  height: calc(100% - 2px);
  margin: 1px;
  padding-inline: 0.95rem 0.8rem;
  border-radius: 1rem 0 0 1rem;
  background: color-mix(in srgb, var(--mh-surface-soft) 92%, transparent);
  border-inline-end: 1px solid color-mix(in srgb, var(--mh-card-border) 96%, transparent);
}

[dir="rtl"] .iti--separate-dial-code .iti__selected-country-primary,
.mh-shell[data-rtl="true"] .iti--separate-dial-code .iti__selected-country-primary {
  border-radius: 0 1rem 1rem 0;
  border-inline-end: 0;
  border-inline-start: 1px solid color-mix(in srgb, var(--mh-card-border) 96%, transparent);
}

.iti__selected-dial-code {
  color: var(--mh-text) !important;
  font-weight: 700 !important;
}

.iti__arrow {
  border-top-color: var(--mh-muted) !important;
}

.iti__country-list {
  background: var(--mh-surface-strong) !important;
  border: 1px solid var(--mh-card-border) !important;
  color: var(--mh-text) !important;
  border-radius: 1.25rem !important;
  box-shadow: var(--mh-shadow) !important;
  margin-top: 8px !important;
  padding: 8px !important;
  z-index: 10000 !important;
  width: 100% !important;
  left: 0 !important;
}

.iti__country {
  border-radius: 0.75rem !important;
  padding: 10px 12px !important;
  transition: background 0.2s ease !important;
}

.iti__country.iti__highlight {
  background: var(--mh-surface-soft) !important;
}

.iti__dial-code {
  color: var(--mh-muted) !important;
}

.iti__search-input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid var(--mh-card-border);
  background: color-mix(in srgb, var(--mh-surface-soft) 86%, transparent);
  color: var(--mh-text);
  margin-bottom: 0.55rem;
}

.iti__search-input:focus {
  outline: none;
  border-color: var(--mh-accent);
}

/* Correct z-index for intl-tel-input dropdown to appear above modals */
.iti--container {
  z-index: 10000 !important;
}

@media (min-width: 768px) {
  .mh-account-menu {
    display: inline-flex;
  }
}

@media (max-width: 1023px) {
  .mh-mobile-menu__actions {
    gap: 0.85rem;
  }

  .mh-mobile-theme-card {
    margin-top: 0.15rem;
  }
}

@media (max-width: 767px) {
  .mh-site-footer {
    margin-top: 2.4rem;
    padding-top: 0.4rem;
  }

  .mh-toast-viewport {
    top: calc(var(--mh-header-h) + 0.7rem);
    right: 0.85rem;
    left: 0.85rem;
    width: auto;
  }

  .mh-logout-modal__actions {
    flex-direction: column-reverse;
  }

  .mh-logout-modal__actions .mh-btn-primary,
  .mh-logout-modal__actions .mh-btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@keyframes mh-toast-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (min-width: 1025px) {
  #mh-smart-app-banner { display: none !important; }
}

/* ══════════════════════════════════════════════
   MONOGRAPH MODAL OVERLAY — NUCLEAR FIX
   These classes must ALWAYS cover the full viewport regardless
   of any ancestor stacking context.
   ══════════════════════════════════════════════ */
.mon-ai-backdrop,
.mon-result-backdrop,
.mon-voice-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2147483640 !important;
  transform: none !important;
  will-change: auto !important;
  contain: none !important;
  isolation: auto !important;
  -webkit-transform: none !important;
}

/* ══════════════════════════════════════════════
   GLOBAL HEADER FULL-WIDTH & NOTIFICATIONS FLYOUT
   ══════════════════════════════════════════════ */
.mh-site-header .mh-container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 1.5rem !important;
}

#mh-notif-container {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

.mh-notif-btn {
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--mh-card-border, rgba(255, 255, 255, 0.12)) !important;
  color: var(--mh-text, #f8fafc) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mh-notif-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.mh-notif-badge-count {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  display: none;
  line-height: 18px !important;
  text-align: center !important;
  border: 2px solid var(--mh-surface, #0f172a) !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5) !important;
}

.mh-notif-flyout {
  display: none !important;
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  width: 380px !important;
  max-width: calc(100vw - 2rem) !important;
  border-radius: 20px !important;
  z-index: 999999 !important;
  overflow: hidden !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  
  /* Theme-aware flyout */
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .mh-notif-flyout,
.dark .mh-notif-flyout {
  background: rgba(15, 23, 42, 0.97) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75) !important;
}

.mh-notif-flyout.active {
  display: block !important;
}

.mh-notif-flyout-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

[data-theme="dark"] .mh-notif-flyout-header,
.dark .mh-notif-flyout-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.mh-notif-flyout-title {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: inherit !important;
  margin: 0 !important;
}

.mh-notif-flyout-list {
  max-height: 380px !important;
  overflow-y: auto !important;
  padding: 0.65rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.45rem !important;
}

.mh-notif-flyout-list .mh-notif-item {
  padding: 0.85rem 1rem !important;
  border-radius: 14px !important;
  background: rgba(0, 0, 0, 0.025) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

[data-theme="dark"] .mh-notif-flyout-list .mh-notif-item,
.dark .mh-notif-flyout-list .mh-notif-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

.mh-notif-flyout-list .mh-notif-item:hover {
  background: rgba(56, 189, 248, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px) !important;
}

.mh-notif-flyout-list .mh-notif-item.unread {
  border-left: 3px solid #38bdf8 !important;
  background: rgba(56, 189, 248, 0.07) !important;
}

.mh-notif-item-title {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: inherit !important;
}

.mh-notif-item-time {
  font-size: 0.68rem !important;
  color: var(--mh-muted, #94a3b8) !important;
  white-space: nowrap !important;
}

.mh-notif-item-body {
  font-size: 0.76rem !important;
  color: var(--mh-muted, #94a3b8) !important;
  margin: 0.25rem 0 0 !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ══════════════════════════════════════════════
   THEME-AWARE ACCOUNT DROPDOWN & LIST ROWS
   ══════════════════════════════════════════════ */
.mh-account-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  min-width: 320px !important;
  max-width: calc(100vw - 2rem) !important;
  border-radius: 20px !important;
  padding: 14px !important;
  z-index: 999999 !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.25) !important;
  
  /* Light theme default */
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

[data-theme="dark"] .mh-account-dropdown,
.dark .mh-account-dropdown {
  background: rgba(15, 23, 42, 0.97) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75) !important;
}

.mh-profile-list-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.85rem !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 12px !important;
  margin-bottom: 0.35rem !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
  
  /* Light theme */
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

[data-theme="dark"] .mh-profile-list-item,
.dark .mh-profile-list-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
}

.mh-profile-list-item:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  transform: translateX(2px) !important;
}

.mh-profile-list-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: rgba(56, 189, 248, 0.1) !important;
}

.mh-profile-list-icon img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  object-fit: contain !important;
  display: block !important;
}

.mh-profile-list-body {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.mh-profile-list-label {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
}

[data-theme="dark"] .mh-profile-list-label,
.dark .mh-profile-list-label {
  color: #94a3b8 !important;
}

.mh-profile-list-val {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #0f172a !important;
}

[data-theme="dark"] .mh-profile-list-val,
.dark .mh-profile-list-val {
  color: #f8fafc !important;
}

/* ─── Hero CTA Buttons Enhancement ─── */
#hero-cta-download {
  padding: 0.85rem 2.25rem !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #6366f1 100%) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4), 0 0 20px rgba(56, 189, 248, 0.25) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#hero-cta-download:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 14px 40px rgba(14, 165, 233, 0.55), 0 0 30px rgba(56, 189, 248, 0.4) !important;
}

#hero-cta-login {
  padding: 0.85rem 2rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid var(--mh-card-border, rgba(255, 255, 255, 0.15)) !important;
  color: var(--mh-text, #ffffff) !important;
  backdrop-filter: blur(16px) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#hero-cta-login:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  transform: translateY(-2px) !important;
}

/* ─── Logged-out Header Icon Buttons ─── */
.mh-header-icon-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.mh-header-icon-btn--download {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.3) !important;
}

.mh-header-icon-btn--download:hover {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  color: #059669 !important;
  transform: translateY(-1px) scale(1.05) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}

.mh-header-icon-btn--login {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1.5px solid #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}

.mh-header-icon-btn--login:hover {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.05) !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4) !important;
}

[data-theme="dark"] .mh-header-icon-btn--download,
.dark .mh-header-icon-btn--download {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}

[data-theme="dark"] .mh-header-icon-btn--download:hover,
.dark .mh-header-icon-btn--download:hover {
  color: #6ee7b7 !important;
  background: rgba(16, 185, 129, 0.28) !important;
}

[data-theme="dark"] .mh-header-icon-btn--login,
.dark .mh-header-icon-btn--login {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   HERO CTA REDESIGN (Primary vs Secondary, QR Popover, Trust Micro-Copy)
   ═════════════════════════════════════════════════════════════════════════ */
.mh-hero-cta-wrap {
  margin-top: 0.5rem;
  margin-bottom: 1.75rem;
}

.mh-hero-btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.85rem 1.75rem !important;
  border-radius: 9999px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  box-shadow: 0 8px 24px -4px rgba(2, 132, 199, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

.mh-hero-btn-primary:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 12px 30px -4px rgba(2, 132, 199, 0.55), 0 0 0 1.5px rgba(255, 255, 255, 0.25) inset !important;
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
}

.mh-hero-btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.85rem 1.5rem !important;
  border-radius: 9999px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--mh-text, #0f172a) !important;
  background: rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

[data-theme="dark"] .mh-hero-btn-secondary,
.dark .mh-hero-btn-secondary {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.mh-hero-btn-secondary:hover {
  transform: translateY(-2px) !important;
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .mh-hero-btn-secondary:hover,
.dark .mh-hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.35) !important;
}

#mh-hero-download-trigger-wrap {
  position: relative !important;
  z-index: 50 !important;
}

/* QR Code Popover (Rendered in Foreground Above Buttons) */
.mh-hero-qr-popover {
  position: absolute !important;
  bottom: calc(100% + 14px) !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-6px) !important;
  z-index: 999999 !important;
  width: 210px !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 1.25rem !important;
  padding: 1rem !important;
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="dark"] .mh-hero-qr-popover,
.dark .mh-hero-qr-popover {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

#mh-hero-download-trigger-wrap:hover .mh-hero-qr-popover,
#mh-hero-download-trigger-wrap:focus-within .mh-hero-qr-popover {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

.mh-hero-qr-popover-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.mh-hero-qr-code-box {
  width: 130px;
  height: 130px;
  background: #ffffff;
  padding: 0.35rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mh-hero-qr-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mh-muted, #64748b);
  line-height: 1.35;
  margin: 0;
}

/* Trust Bar Micro-Copy */
.mh-hero-trust-bar {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.mh-hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mh-muted, #64748b);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .mh-hero-trust-badge,
.dark .mh-hero-trust-badge {
  color: #94a3b8;
}

/* ─── Global App Layout & Sidebar (Essential Shell Styles) ──── */
.mh-app-layout {
  display: flex !important;
  min-height: calc(100vh - var(--mh-header-h, 64px)) !important;
  position: relative !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.mh-sidebar {
  width: 230px !important;
  flex-shrink: 0 !important;
  position: sticky !important;
  top: calc(var(--mh-header-h, 64px) + 16px) !important;
  height: calc(100vh - var(--mh-header-h, 64px) - 32px) !important;
  padding: 1rem 0.75rem !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 20 !important;
}

@media (max-width: 768px) {
  .mh-sidebar {
    display: none !important;
  }
}

.mh-sidebar-inner {
  background: var(--mh-card-bg, rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid var(--mh-card-border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 24px !important;
  padding: 1rem 0.6rem !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  height: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  overflow-y: auto !important;
}

[data-theme="light"] .mh-sidebar-inner {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05) !important;
}

.mh-sidebar-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.4rem !important;
}

.mh-sidebar-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.7rem 0.85rem !important;
  border-radius: 14px !important;
  color: var(--mh-muted, #94a3b8) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  width: 100% !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.mh-sidebar-link:hover {
  background: rgba(14, 165, 233, 0.08) !important;
  color: var(--mh-text, #ffffff) !important;
  transform: translateX(3px) !important;
}

.mh-sidebar-link.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.15)) !important;
  border: 1px solid rgba(14, 165, 233, 0.35) !important;
  color: var(--mh-text, #ffffff) !important;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2) !important;
}

[data-theme="light"] .mh-sidebar-link {
  color: #64748b !important;
}

[data-theme="light"] .mh-sidebar-link:hover {
  color: #0f172a !important;
  background: rgba(14, 165, 233, 0.08) !important;
}

[data-theme="light"] .mh-sidebar-link.active {
  color: #0284c7 !important;
  background: rgba(14, 165, 233, 0.12) !important;
  border-color: rgba(14, 165, 233, 0.35) !important;
}

.mh-sidebar-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.mh-sidebar-icon img,
.mh-sidebar-icon svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  object-fit: contain !important;
  display: block !important;
}

.mh-sidebar-label {
  white-space: nowrap !important;
}

.mh-main-content {
  flex: 1 !important;
  min-width: 0 !important;
  padding: 1rem 1.5rem 4rem !important;
  box-sizing: border-box !important;
}
