/* Shared mobile drawer controls for user portal pages. */
.portal-menu-btn,
.portal-sidebar-close,
.security-menu-btn,
.security-sidebar-close {
  display: none;
}

@media (max-width: 768px) {
  html,
  body {
    overflow: auto !important;
    height: auto !important;
    min-height: 100%;
  }

  .portal-layout,
  .security-layout {
    display: block;
    width: 100%;
    height: max-content !important;
    min-height: 100vh;
    overflow: visible !important;
  }

  .portal-menu-btn,
  .security-menu-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 120;
    width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(163, 230, 53, 0.5);
    border-radius: 12px;
    background: #08140e;
    color: #d4ff62;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    cursor: pointer;
  }

  .portal-menu-btn svg,
  .security-menu-btn svg,
  .portal-sidebar-close svg,
  .security-sidebar-close svg {
    pointer-events: none;
  }

  .portal-sidebar-close,
  .security-sidebar-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 210, 0, 0.45);
    border-radius: 10px;
    background: #08140e;
    color: #ffd200;
    cursor: pointer;
  }

  .portal-layout.sidebar-open .portal-sidebar,
  .security-layout.sidebar-open .security-sidebar {
    transform: translateX(0);
  }

  .portal-layout.sidebar-open::after,
  .security-layout.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.58);
    pointer-events: none;
  }

  .portal-sidebar,
  .security-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1100 !important;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    width: min(290px, 86vw) !important;
    min-width: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    background: #05100b !important;
    opacity: 1 !important;
  }

  .portal-sidebar {
    display: flex !important;
  }

  .security-sidebar {
    display: flex !important;
  }

  .portal-main,
  .security-main {
    width: 100%;
    min-width: 0;
    height: auto !important;
    overflow-y: visible !important;
    padding: 76px 16px 24px !important;
  }

  .portal-sidebar-nav,
  .security-nav {
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  .portal-layout:not(.sidebar-open) .portal-sidebar,
  .security-layout:not(.sidebar-open) .security-sidebar {
    pointer-events: none;
  }

  .portal-topbar,
  .tx-topbar,
  .news-topbar,
  .security-topbar {
    flex-wrap: wrap;
  }

  .portal-topbar > *,
  .tx-topbar > *,
  .news-topbar > *,
  .security-topbar > * {
    min-width: 0;
  }

  .portal-payout-box {
    min-width: 0 !important;
    max-width: 48%;
    padding: 8px 8px 7px !important;
  }

  .portal-payout-display {
    gap: 2px !important;
  }

  .payout-num {
    font-size: clamp(13px, 4vw, 19px) !important;
  }

  .portal-balance-amount {
    font-size: clamp(27px, 9vw, 42px) !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere;
  }

  .portal-wallets-grid {
    grid-template-columns: 1fr !important;
  }

  .portal-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .portal-wallet-card {
    min-width: 0;
    padding: 16px !important;
  }

  .portal-quick-btn {
    min-width: 0;
  }
  .portal-ref-input-box{
      flex-wrap: wrap;
      border-radius: 16px;
      gap:10px;
  }

  .tx-tabs-pill {
    width: 100%;
    border-radius: 20px !important;
    align-items: stretch !important;
    gap: 2px !important;
  }

  .tx-tab-btn {
    flex: 1 1 46%;
    justify-content: center;
    min-width: 0;
    padding: 9px 6px !important;
    font-size: 9px !important;
    letter-spacing: .5px !important;
  }

  .tx-card {
    min-width: 0;
    padding: 42px 16px !important;
  }
}
