/* Side menu drawer */

.sm {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--phone-w, 473px);
  z-index: 1200;
  pointer-events: none;
  visibility: hidden;
}
.sm.is-open {
  pointer-events: auto;
  visibility: visible;
}

.sm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.sm.is-open .sm-backdrop { opacity: 1; }

.sm-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 88%;
  max-width: 380px;
  background: #07090C;
  color: #EAECEF;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-104%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}
.sm.is-open .sm-drawer { transform: translateX(0); }

.sm-drawer *,
.sm-drawer *::before,
.sm-drawer *::after { box-sizing: border-box; }

.sm-drawer svg { flex-shrink: 0; overflow: visible; }

.sm-glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 260px;
  background:
    radial-gradient(90% 80% at 8% 0%, rgba(240, 185, 11, 0.14), transparent 55%),
    radial-gradient(70% 70% at 92% 8%, rgba(240, 185, 11, 0.07), transparent 50%);
  pointer-events: none;
}
.sm-glow::after {
  content: "";
  position: absolute;
  inset: 36px -18% auto 18%;
  height: 150px;
  background: repeating-linear-gradient(
    -18deg,
    transparent 0 14px,
    rgba(240, 185, 11, 0.035) 14px 16px
  );
  opacity: 0.9;
}

/* —— Header —— */
.sm-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-top: 2px;
}
.sm-brand {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}
.sm-logo {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.sm-logo svg { width: 26px; height: 26px; }
.sm-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.sm-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #0ECB81;
  line-height: 1;
}
.sm-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0ECB81;
  display: inline-block;
}
.sm-tag {
  margin-top: 4px;
  font-size: 10.5px;
  color: #848E9C;
  line-height: 1.3;
}
.sm-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-top: -2px;
}
.sm-close svg { width: 17px; height: 17px; }

/* —— Profile —— */
.sm-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid #2B3139;
  background: linear-gradient(135deg, #151920, #10141A);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0 18px rgba(240, 185, 11, 0.05);
}
.sm-ava {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  background: #2B3139;
  color: #B7BDC6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: visible;
  aspect-ratio: 1 / 1;
  box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.45);
}
.sm-ava svg { width: 22px; height: 22px; }
.sm-ava-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  z-index: 0;
}
.sm-cam {
  position: absolute;
  right: -2px;
  bottom: -1px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #F0B90B;
  color: #0B0E11;
  display: grid;
  place-items: center;
  border: 2px solid #10141A;
  z-index: 2;
  overflow: visible;
}
.sm-cam svg {
  width: 10px;
  height: 10px;
  color: #0B0E11;
  fill: #0B0E11;
}
.sm-profile-body {
  flex: 1;
  min-width: 0;
  padding-right: 2px;
}
.sm-uname {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.sm-uemail {
  margin-top: 2px;
  font-size: 11px;
  color: #848E9C;
  line-height: 1.3;
}
.sm-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}
.sm-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
}
.sm-badge.verified {
  background: #F0B90B;
  color: #0B0E11;
}
.sm-badge.verified svg { width: 9px; height: 9px; stroke-width: 2.6; }
.sm-badge.regular {
  background: #2B3139;
  color: #B7BDC6;
}
.sm-bio {
  margin-top: 6px;
  font-size: 10.5px;
  color: #848E9C;
  line-height: 1.3;
}
.sm-rchev {
  width: 14px;
  height: 14px;
  color: #848E9C;
  flex-shrink: 0;
  align-self: center;
}
.sm-rchev svg { width: 14px; height: 14px; }

/* —— Balance —— */
.sm-bal {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(240, 185, 11, 0.5);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(240, 185, 11, 0.16), transparent 55%),
    linear-gradient(135deg, #17130A, #12161C 55%);
  box-shadow:
    0 0 0 1px rgba(240, 185, 11, 0.1),
    0 0 20px rgba(240, 185, 11, 0.1);
}
.sm-bal-l { flex: 1; min-width: 0; }
.sm-bal-lab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #B7BDC6;
  font-weight: 600;
  line-height: 1;
}
.sm-eye {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sm-eye svg { width: 13px; height: 13px; }
.sm-bal-val {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.sm-bal-pnl {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.sm-bal-pnl.is-up { color: #0ECB81; }
.sm-bal-pnl.is-down { color: #F6465D; }
.sm-dep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  background: #F0B90B;
  color: #0B0E11;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.sm-dep svg { width: 14px; height: 14px; }

/* —— Sections / grids —— */
.sm-sec { margin-bottom: 14px; }
.sm-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 1px;
}
.sm-sec-h h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.sm-sec-h a {
  color: #F0B90B;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.sm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
}
.sm-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 64px;
  padding: 8px 3px 7px;
  border-radius: 12px;
  background: #14181F;
  border: 1px solid #1E2329;
  text-decoration: none;
  color: #fff;
  text-align: center;
}
.sm-tile .ico {
  position: relative;
  width: 20px;
  height: 20px;
  color: #F0B90B;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sm-tile .ico svg { width: 18px; height: 18px; }
.sm-tile .ico .dot {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F6465D;
  border: 1.5px solid #14181F;
}
.sm-tile .lab {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: 100%;
  min-height: 2.2em;
  padding: 0 1px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  color: #EAECEF;
}
.sm-tile.is-on {
  background: #F0B90B;
  border-color: #F0B90B;
  box-shadow: 0 4px 14px rgba(240, 185, 11, 0.32);
}
.sm-tile.is-on .ico { color: #0B0E11; }
.sm-tile.is-on .lab { color: #0B0E11; font-weight: 800; }

/* —— Invite —— */
.sm-invite {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 11px 10px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid rgba(240, 185, 11, 0.45);
  background:
    radial-gradient(80% 120% at 0% 50%, rgba(240, 185, 11, 0.14), transparent 55%),
    #12161C;
}
.sm-gift-wrap {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.sm-gift { width: 36px; height: 36px; }
.sm-invite-copy {
  min-width: 0;
}
.sm-invite-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #F0B90B;
  line-height: 1.2;
}
.sm-invite-copy span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
  color: #848E9C;
}
.sm-invite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: #F0B90B;
  color: #0B0E11;
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

/* —— Logout / footer —— */
.sm-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid rgba(246, 70, 93, 0.45);
  background: rgba(246, 70, 93, 0.1);
  color: #F6465D;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
}
.sm-logout .lico {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}
.sm-logout .lico svg { width: 18px; height: 18px; }
.sm-logout span:nth-child(2) { flex: 1; }
.sm-logout .rchev svg { width: 14px; height: 14px; }

.sm-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 2px;
  font-size: 10px;
  color: #848E9C;
}
.sm-foot-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
}
.sm-foot-brand .logo {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
.sm-foot-brand .logo svg { width: 16px; height: 16px; }
.sm-foot-brand strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.sm-foot-brand em {
  display: block;
  font-style: normal;
  font-size: 9px;
  color: #848E9C;
  line-height: 1.2;
  margin-top: 1px;
}

body.sm-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 390px) {
  .sm-drawer { padding-left: 10px; padding-right: 10px; }
  .sm-grid { gap: 6px; }
  .sm-tile { min-height: 60px; padding: 7px 2px 6px; }
  .sm-tile .lab { font-size: 8.5px; }
}
