/* Shared mobile application shell for every public and investor page. */
@media (min-width: 992px) {
  .mobile-app-header,
  .mobile-bottom-nav,
  .mobile-drawer,
  .mobile-drawer-overlay {
    display: none !important;
  }
}

@media (max-width: 991px) {
  :root {
    --mobile-shell-navy: #082942;
    --mobile-shell-blue: #0e5b83;
    --mobile-shell-green: #7ac72c;
    --mobile-shell-ink: #0b1c35;
    --mobile-shell-muted: #718198;
    --mobile-shell-line: #e2eaf0;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-top: 66px !important;
    padding-bottom: 72px !important;
  }

  body.mobile-guest {
    padding-bottom: 0 !important;
  }

  body.mobile-drawer-open {
    overflow: hidden !important;
    touch-action: none;
  }

  html body #page-header,
  html body > #page-header,
  html body header#page-header {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .sf-site-footer {
    display: block !important;
    margin-bottom: 0 !important;
  }

  .copyright,
  #page-footer,
  .footer-section {
    display: none !important;
  }

  html body > .mobile-app-header {
    position: fixed !important;
    z-index: 1100 !important;
    inset: 0 0 auto !important;
    display: grid !important;
    right: auto !important;
    width: var(--mobile-viewport-width, 100%) !important;
    max-width: var(--mobile-viewport-width, 100%) !important;
    height: 66px !important;
    grid-template-columns: 42px minmax(0, 1fr) minmax(42px, auto);
    align-items: center;
    gap: 10px;
    padding: 0 14px !important;
    border-bottom: 1px solid rgba(8, 41, 66, .08) !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 7px 25px rgba(8, 41, 66, .07) !important;
    backdrop-filter: blur(16px);
    visibility: visible !important;
    box-sizing: border-box !important;
  }

  html body > .mobile-app-header > * {
    box-sizing: border-box !important;
  }

  .mobile-drawer-toggle {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 1px solid #e1e9ef !important;
    place-items: center;
    border-radius: 12px;
    background: #f6f9fb !important;
    color: var(--mobile-shell-navy) !important;
    font-size: 16px !important;
  }

  .mobile-drawer-toggle i {
    position: relative;
    display: block;
    width: 18px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    font-size: 0 !important;
  }

  .mobile-drawer-toggle i::after {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 15px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
    transform: translateY(-50%);
  }

  .mobile-header-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    justify-self: center;
    margin: 0 !important;
    transform: none !important;
  }

  .mobile-logo {
    width: auto;
    max-width: 148px;
    height: 29px !important;
    object-fit: contain;
  }

  .mobile-wallet-pill,
  .mobile-login-pill {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe8ee;
    border-radius: 12px;
    text-decoration: none !important;
  }

  .mobile-wallet-pill {
    position: static !important;
    right: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: 104px;
    min-width: 40px;
    gap: 7px;
    justify-self: end;
    margin: 0 !important;
    padding: 4px 9px 4px 5px;
    background: #f8fafb;
    color: var(--mobile-shell-ink) !important;
    transform: none !important;
  }

  .mobile-wallet-pill > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: #eaf5de;
    color: #68ad20;
    font-size: 11px;
  }

  .mobile-wallet-pill strong {
    font: 800 11px/1 "Inter", sans-serif;
    white-space: nowrap;
  }

  .mobile-login-pill {
    padding: 0 14px;
    border-color: var(--mobile-shell-blue);
    background: var(--mobile-shell-blue);
    color: #fff !important;
    font: 800 11px/1 "Inter", sans-serif;
    white-space: nowrap;
  }

  .mobile-drawer-overlay {
    position: fixed !important;
    z-index: 1180 !important;
    inset: 0 !important;
    display: block !important;
    right: auto !important;
    width: var(--mobile-viewport-width, 100%) !important;
    max-width: var(--mobile-viewport-width, 100%) !important;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(5, 22, 38, .58) !important;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(4px);
    transition: opacity .24s ease, visibility .24s ease;
  }

  .mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-drawer {
    position: fixed !important;
    z-index: 1190 !important;
    inset: 0 auto 0 0 !important;
    display: flex !important;
    width: min(86vw, 340px) !important;
    height: 100vh;
    overflow: hidden;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, .45);
    background: #fff !important;
    box-shadow: 22px 0 65px rgba(4, 22, 39, .24) !important;
    transform: translate3d(-104%, 0, 0);
    transition: transform .28s cubic-bezier(.22, .72, .26, 1);
  }

  .mobile-drawer.active {
    transform: translate3d(0, 0, 0);
  }

  .mobile-drawer-header {
    position: relative;
    display: flex;
    min-height: 130px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 24px 54px 22px 20px !important;
    background:
      radial-gradient(circle at 0 0, rgba(126, 205, 45, .25), transparent 42%),
      linear-gradient(135deg, #082942, #0d587d) !important;
  }

  .drawer-user-info {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
  }

  .drawer-avatar-frame {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    overflow: hidden;
    padding: 3px;
    place-items: center;
    border: 2px solid #8bd23a;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  }

  .drawer-avatar {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 50%;
    background: #e9f3df;
    object-fit: cover;
    object-position: center;
  }

  .drawer-user-details {
    min-width: 0;
  }

  .drawer-user-details > span {
    display: block;
    margin-bottom: 3px;
    color: #a8d77b;
    font: 800 8px/1.3 "Inter", sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .drawer-user-details h2 {
    margin: 0 0 4px !important;
    overflow: hidden;
    color: #fff !important;
    font: 800 16px/1.25 "Inter", sans-serif !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drawer-user-details p {
    max-width: 180px;
    margin: 0 !important;
    overflow: hidden;
    color: #bfd0dc !important;
    font: 500 10px/1.3 "Inter", sans-serif !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drawer-guest-brand img {
    display: block;
    width: 145px;
    height: auto;
    filter: brightness(0) invert(1);
  }

  .drawer-guest-brand span {
    display: block;
    margin-top: 9px;
    color: #bfd0dc;
    font: 600 10px/1.4 "Inter", sans-serif;
  }

  .mobile-drawer-close {
    position: absolute;
    top: 18px;
    right: 16px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .2) !important;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
    font-size: 14px !important;
  }

  .drawer-wallet-card {
    display: grid;
    min-height: 66px;
    grid-template-columns: 38px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 11px;
    margin: 14px 16px 0;
    padding: 10px 13px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0b314e, #12638a);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(8, 60, 88, .15);
  }

  .drawer-wallet-card > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(139, 210, 58, .18);
    color: #8bd23a;
  }

  .drawer-wallet-card small,
  .drawer-wallet-card strong {
    display: block;
  }

  .drawer-wallet-card small {
    color: #aac0d0;
    font: 700 8px/1.3 "Inter", sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .drawer-wallet-card strong {
    margin-top: 2px;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0;
  }

  .drawer-wallet-card > i {
    color: #91acbf;
    font-size: 9px;
  }

  .mobile-drawer-content {
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 14px 16px !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .drawer-menu-label {
    display: block;
    margin: 0 9px 10px;
    color: #9aa8b8;
    font: 800 8px/1.2 "Inter", sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .drawer-menu-list {
    display: grid !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  .drawer-menu-list li {
    margin: 0 !important;
  }

  .drawer-menu-list li a {
    display: grid !important;
    min-height: 48px;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px !important;
    padding: 6px 10px !important;
    border-left: 3px solid transparent;
    border-radius: 11px;
    color: #53657c !important;
    font: 700 12px/1.3 "Inter", sans-serif !important;
    text-decoration: none !important;
  }

  .drawer-menu-list li a i {
    display: grid !important;
    width: 34px !important;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #f1f5f8;
    color: #74869a !important;
    font-size: 12px !important;
  }

  .drawer-menu-list li a:hover,
  .drawer-menu-list li a.active {
    border-left-color: #78c52a;
    background: #eff7e8 !important;
    color: #579c17 !important;
  }

  .drawer-menu-list li a:hover i,
  .drawer-menu-list li a.active i {
    background: #dff0d0;
    color: #62a91c !important;
  }

  .mobile-drawer-footer {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 1fr 1.25fr;
    gap: 9px;
    padding: 13px 16px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid #e9eef2;
    background: #fff;
  }

  .mobile-drawer-footer .logout-link {
    display: flex;
    min-height: 46px;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border-radius: 11px;
    background: #fff2f3;
    color: #b8414b !important;
    font: 800 12px/1 "Inter", sans-serif;
    text-decoration: none !important;
  }

  .drawer-secondary-action,
  .drawer-primary-action {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font: 800 11px/1 "Inter", sans-serif;
    text-decoration: none !important;
  }

  .drawer-secondary-action {
    border: 1px solid #dce5ec;
    color: var(--mobile-shell-blue) !important;
  }

  .drawer-primary-action {
    background: var(--mobile-shell-blue);
    color: #fff !important;
  }

  .mobile-bottom-nav {
    position: fixed !important;
    z-index: 1150 !important;
    inset: auto auto 0 0 !important;
    display: grid !important;
    width: var(--mobile-viewport-width, 100%) !important;
    max-width: var(--mobile-viewport-width, 100%) !important;
    height: calc(66px + env(safe-area-inset-bottom)) !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    padding: 5px 8px env(safe-area-inset-bottom) !important;
    border-top: 1px solid #e1e9ef !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: 0 -10px 30px rgba(8, 41, 66, .09) !important;
    backdrop-filter: blur(15px);
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .bottom-nav-item {
    position: relative;
    display: flex !important;
    width: auto !important;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 3px !important;
    padding: 5px 3px !important;
    border-radius: 11px;
    color: #7d8da1 !important;
    font: 700 9px/1.2 "Inter", sans-serif !important;
    text-decoration: none !important;
  }

  .bottom-nav-item i {
    display: grid;
    width: 29px;
    height: 27px;
    place-items: center;
    border-radius: 9px;
    font-size: 13px !important;
  }

  .bottom-nav-item.active {
    background: #f1f8ea;
    color: #5fa61b !important;
  }

  .bottom-nav-item.active i {
    background: #dff0d0;
    color: #62aa1c;
  }

  .bottom-nav-item.active::before {
    position: absolute;
    top: 0;
    width: 26px;
    height: 3px;
    border-radius: 0 0 5px 5px;
    background: #79c62b;
    content: "";
  }

  .back-to-top {
    display: none !important;
  }

  .sf-footer-container {
    width: calc(100% - 30px) !important;
    padding-top: 40px !important;
    padding-bottom: 30px !important;
  }

  .sf-footer-main {
    gap: 32px !important;
    padding-bottom: 34px !important;
  }

  .sf-footer-brand > p {
    margin: 18px 0 !important;
  }

  .sf-footer-links {
    gap: 28px 18px !important;
  }

  .sf-footer-bottom {
    padding-bottom: 8px;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 991px) {
    .mobile-drawer {
      height: 100dvh;
    }
  }
}

@media (max-width: 380px) {
  .mobile-logo {
    max-width: 122px;
    height: 25px !important;
  }

  .mobile-wallet-pill strong {
    display: none;
  }

  .mobile-wallet-pill {
    padding-right: 5px;
  }

  .mobile-drawer {
    width: 91vw !important;
  }
}

@media (max-width: 430px) {
  html body > .mobile-app-header {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 7px;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  html body.mobile-guest > .mobile-app-header {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  body.mobile-guest .mobile-login-pill {
    min-width: 86px;
    padding: 0 10px;
  }

  .mobile-wallet-pill {
    width: 40px !important;
    height: 40px;
    padding: 4px !important;
  }

  .mobile-wallet-pill strong {
    display: none !important;
  }

  .mobile-wallet-pill > span {
    width: 30px;
    height: 30px;
  }
}
