/**
 * SRO logged-in member sidebar panel — Silkroad / Ottoman fantasy
 * Dark stone/leather + gold metal frame (no neon / SaaS blue)
 */

@keyframes sro-panel-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legacy-sidebar .sro-user-panel {
  width: 186px !important;
  margin: 2px auto 10px !important;
  padding: 0 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  color: #e8dfd0 !important;
  animation: sro-panel-rise 0.55s ease-out both !important;
}

.legacy-sidebar .sro-user-panel__frame {
  position: relative !important;
  padding: 14px 10px 16px !important;
  margin-bottom: 4px !important;
  border: 2px solid #c9a24a !important;
  box-shadow:
    0 0 0 1px #6e5320,
    0 0 0 3px rgba(40, 30, 14, 0.95),
    inset 0 0 0 1px rgba(232, 198, 112, 0.35),
    inset 0 1px 0 rgba(255, 230, 160, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    0 0 14px rgba(180, 130, 40, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.5) !important;
  /* leather / stone grain + warm top glow */
  background-color: #0b0907 !important;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0 0.04 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 8%, rgba(110, 82, 40, 0.4) 0%, transparent 50%),
    linear-gradient(168deg, #1c1814 0%, #0b0907 48%, #14110d 100%) !important;
  background-blend-mode: soft-light, normal, normal !important;
}

/* Ottoman / filigree corner motifs */
.legacy-sidebar .sro-user-panel__corner {
  position: absolute !important;
  width: 22px !important;
  height: 22px !important;
  pointer-events: none !important;
  z-index: 2 !important;
  opacity: 0.95 !important;
  background-repeat: no-repeat !important;
  background-size: 22px 22px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath fill='%23e8c56a' d='M1 1h8v1.5H2.5V9H1V1zm3.5 3.5c1.2 0 2.2.7 2.7 1.7.2-.1.5-.2.8-.2 1.1 0 2 .9 2 2 0 .3-.1.6-.2.8 1 .5 1.7 1.5 1.7 2.7H10c0-.8-.7-1.5-1.5-1.5S7 9.7 7 10.5H5.5c0-1.2.7-2.2 1.7-2.7-.1-.2-.2-.5-.2-.8 0-.6.3-1.1.7-1.4-.3-.4-.7-.7-1.2-.7V4.5z'/%3E%3Cpath fill='none' stroke='%23c9a24a' stroke-width='1.2' d='M1.5 1.5H10M1.5 1.5V10'/%3E%3Ccircle cx='4' cy='4' r='1.2' fill='%23f0d78a'/%3E%3C/svg%3E") !important;
  filter: drop-shadow(0 0 3px rgba(212, 168, 75, 0.55)) !important;
}

.legacy-sidebar .sro-user-panel__corner::before,
.legacy-sidebar .sro-user-panel__corner::after {
  display: none !important;
  content: none !important;
}

.legacy-sidebar .sro-user-panel__corner--tl { top: 1px !important; left: 1px !important; }
.legacy-sidebar .sro-user-panel__corner--tr {
  top: 1px !important;
  right: 1px !important;
  transform: scaleX(-1) !important;
}
.legacy-sidebar .sro-user-panel__corner--bl {
  bottom: 1px !important;
  left: 1px !important;
  transform: scaleY(-1) !important;
}
.legacy-sidebar .sro-user-panel__corner--br {
  bottom: 1px !important;
  right: 1px !important;
  transform: scale(-1) !important;
}

/* Bottom-center metal finial (inside frame padding) */
.legacy-sidebar .sro-user-panel__finial {
  position: absolute !important;
  left: 50% !important;
  bottom: 2px !important;
  width: 12px !important;
  height: 8px !important;
  margin-left: -6px !important;
  background:
    linear-gradient(180deg, #f0d78a 0%, #b8893a 45%, #6e5320 100%) !important;
  clip-path: polygon(50% 100%, 0 0, 100% 0) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45) !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

/* ---- Avatar ---- */
.legacy-sidebar .sro-user-panel__avatar-wrap {
  position: relative !important;
  text-align: center !important;
  margin: 0 0 8px !important;
}

.legacy-sidebar .sro-user-panel__avatar-btn {
  position: relative !important;
  display: inline-block !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  line-height: 0 !important;
  vertical-align: top !important;
}

.legacy-sidebar .sro-user-panel__avatar-btn:hover .sro-user-panel__avatar-ring,
.legacy-sidebar .sro-user-panel__avatar-btn:focus .sro-user-panel__avatar-ring {
  box-shadow:
    0 0 0 2px rgba(60, 42, 16, 0.95),
    0 0 20px rgba(232, 197, 106, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 240, 200, 0.7) !important;
}

.legacy-sidebar .sro-user-panel__avatar-btn:disabled {
  cursor: wait !important;
  opacity: 0.75 !important;
}

.legacy-sidebar .sro-user-panel__avatar-btn:focus {
  outline: none !important;
}

.legacy-sidebar .sro-user-panel__avatar-ring {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 78px !important;
  height: 78px !important;
  border-radius: 50% !important;
  padding: 3px !important;
  background:
    linear-gradient(145deg, #f5e2a8 0%, #d4a84b 28%, #8a6828 55%, #e8c56a 78%, #c9a24a 100%) !important;
  box-shadow:
    0 0 0 2px rgba(60, 42, 16, 0.9),
    0 0 16px rgba(212, 168, 75, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 240, 200, 0.55) !important;
}

.legacy-sidebar .sro-user-panel__avatar {
  display: block !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #2a2214 !important;
  background: #e8dcc8 !important;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.25) !important;
}

/* Gold/bronze metallic camera badge — Silkroad frame aesthetic */
.legacy-sidebar .sro-user-panel__avatar-edit {
  position: absolute !important;
  right: -1px !important;
  bottom: 0 !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 2 !important;
  color: #2a1a08 !important;
  text-shadow: 0 1px 0 rgba(255, 236, 180, 0.55) !important;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 245, 210, 0.95) 0%, transparent 42%),
    linear-gradient(145deg, #f3dfa0 0%, #d4a84b 32%, #7a5a22 58%, #e8c56a 82%, #b8893a 100%) !important;
  border: 1px solid #3c2a10 !important;
  box-shadow:
    0 0 0 1px rgba(245, 226, 168, 0.45),
    0 2px 5px rgba(0, 0, 0, 0.55),
    inset 0 1px 1px rgba(255, 245, 210, 0.7),
    inset 0 -2px 3px rgba(60, 40, 10, 0.45) !important;
}

.legacy-sidebar .sro-user-panel__avatar-edit .fa {
  font-size: 10px !important;
  line-height: 1 !important;
  position: relative !important;
  top: 0.5px !important;
}

.legacy-sidebar .sro-user-panel__avatar-btn:hover .sro-user-panel__avatar-edit,
.legacy-sidebar .sro-user-panel__avatar-btn:focus .sro-user-panel__avatar-edit {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 250, 220, 1) 0%, transparent 45%),
    linear-gradient(145deg, #ffe9b0 0%, #e0b655 30%, #8a6828 58%, #f0d78a 82%, #c9a24a 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 236, 180, 0.65),
    0 2px 8px rgba(212, 168, 75, 0.45),
    inset 0 1px 1px rgba(255, 250, 220, 0.85),
    inset 0 -2px 3px rgba(60, 40, 10, 0.4) !important;
}

.legacy-sidebar .sro-user-panel__avatar-flourish {
  display: block !important;
  width: 48px !important;
  height: 10px !important;
  margin: 4px auto 0 !important;
  background:
    radial-gradient(ellipse at center, #e8c56a 0%, transparent 70%),
    linear-gradient(90deg, transparent, #c9a24a 30%, #f0d78a 50%, #c9a24a 70%, transparent) !important;
  opacity: 0.85 !important;
}

/* ---- Welcome ---- */
.legacy-sidebar .sro-user-panel__welcome {
  margin: 0 0 6px !important;
  padding: 0 2px !important;
  text-align: center !important;
  font-family: "Cinzel", "Marcellus", "Cormorant Garamond", Georgia, serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  line-height: 1.35 !important;
  color: #e8c56a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 10px rgba(200, 150, 50, 0.2) !important;
  word-break: break-word !important;
}

.legacy-sidebar .sro-user-panel__welcome .legacy-notif-badge {
  vertical-align: middle !important;
}

.legacy-sidebar .sro-user-panel__divider {
  position: relative !important;
  height: 10px !important;
  margin: 0 4px 10px !important;
  text-align: center !important;
}

.legacy-sidebar .sro-user-panel__divider::before {
  content: "" !important;
  position: absolute !important;
  left: 8px !important;
  right: 8px !important;
  top: 50% !important;
  height: 1px !important;
  margin-top: -1px !important;
  background: linear-gradient(90deg, transparent, #a67c2e 20%, #e8c56a 50%, #a67c2e 80%, transparent) !important;
  box-shadow: 0 0 4px rgba(212, 168, 75, 0.35) !important;
}

.legacy-sidebar .sro-user-panel__divider span {
  position: relative !important;
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  top: 1px !important;
  background: linear-gradient(135deg, #f0d78a, #8a6828) !important;
  transform: rotate(45deg) !important;
  box-shadow: 0 0 5px rgba(212, 168, 75, 0.5) !important;
  z-index: 1 !important;
}

/* ---- Balance leather cards ---- */
.legacy-sidebar .sro-user-panel__balances {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 0 10px !important;
}

.legacy-sidebar .sro-user-panel__balance {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 28px !important;
  padding: 5px 8px !important;
  border-radius: 2px !important;
  background:
    linear-gradient(180deg, rgba(50, 40, 28, 0.95) 0%, rgba(22, 17, 12, 0.98) 100%) !important;
  border-top: 1px solid rgba(201, 162, 74, 0.65) !important;
  border-bottom: 1px solid rgba(201, 162, 74, 0.45) !important;
  border-left: 1px solid rgba(140, 105, 40, 0.35) !important;
  border-right: 1px solid rgba(140, 105, 40, 0.35) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 140, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.35) !important;
}

.legacy-sidebar .sro-user-panel__coin {
  flex-shrink: 0 !important;
  width: 18px !important;
  text-align: center !important;
  font-size: 14px !important;
  line-height: 1 !important;
  color: #e8c56a !important;
  text-shadow:
    0 1px 0 #5a4018,
    0 0 6px rgba(212, 168, 75, 0.45) !important;
}

.legacy-sidebar .sro-user-panel__coin .fa {
  font-size: 14px !important;
  color: #e8c56a !important;
}

.legacy-sidebar .sro-user-panel__balance-label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  font-family: "Marcellus", "Cormorant Garamond", "Cinzel", Georgia, serif !important;
  font-size: 10px !important;
  color: #d8cfc0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.legacy-sidebar .sro-user-panel__balance-value {
  flex-shrink: 0 !important;
  font-family: "Cinzel", "Marcellus", Georgia, serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #f0e6d0 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6) !important;
}

/* ---- Menu cards ---- */
.legacy-sidebar .sro-user-panel__menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.legacy-sidebar .sro-user-panel__link {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 2px !important;
  text-decoration: none !important;
  color: #ebe3d4 !important;
  font-family: "Marcellus", "Cormorant Garamond", "Cinzel", Georgia, serif !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  background:
    linear-gradient(180deg, #3a2f24 0%, #1c1610 55%, #15110c 100%) !important;
  border-top: 1px solid rgba(201, 162, 74, 0.55) !important;
  border-bottom: 1px solid rgba(160, 120, 45, 0.4) !important;
  border-left: 1px solid rgba(100, 75, 30, 0.35) !important;
  border-right: 1px solid rgba(100, 75, 30, 0.35) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.07),
    0 1px 2px rgba(0, 0, 0, 0.35) !important;
  transition:
    transform 200ms ease,
    filter 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    background 200ms ease !important;
}

.legacy-sidebar .sro-user-panel__link:hover,
.legacy-sidebar .sro-user-panel__link:focus {
  color: #fff8e8 !important;
  transform: scale(1.02) !important;
  filter: brightness(1.12) !important;
  border-color: #e0bc5a !important;
  border-top-color: #f0d78a !important;
  border-bottom-color: #c9a24a !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 170, 0.15),
    0 0 0 1px rgba(212, 168, 75, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(180, 130, 40, 0.2) !important;
  outline: none !important;
}

.legacy-sidebar .sro-user-panel__link-icon {
  flex-shrink: 0 !important;
  width: 18px !important;
  text-align: center !important;
  font-size: 13px !important;
  line-height: 1 !important;
  color: #e0bc5a !important;
  text-shadow:
    0 1px 0 #4a3414,
    0 0 5px rgba(212, 168, 75, 0.4) !important;
}

.legacy-sidebar .sro-user-panel__link-icon .fa {
  font-size: 13px !important;
  color: #e0bc5a !important;
}

.legacy-sidebar .sro-user-panel__link-title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  color: inherit !important;
  font-size: 11px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.legacy-sidebar .sro-user-panel__chevron {
  flex-shrink: 0 !important;
  font-family: Georgia, serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #c9a24a !important;
  opacity: 0.9 !important;
}

.legacy-sidebar .sro-user-panel__link:hover .sro-user-panel__chevron {
  color: #f0d78a !important;
}

.legacy-sidebar .sro-user-panel .legacy-notif-badge {
  display: inline-block !important;
  min-width: 15px !important;
  height: 15px !important;
  line-height: 15px !important;
  padding: 0 4px !important;
  margin-left: 5px !important;
  border-radius: 8px !important;
  background: #8b1e1e !important;
  border: 1px solid #c9a24a !important;
  color: #fff !important;
  font-family: Georgia, serif !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  text-align: center !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) !important;
}

.legacy-sidebar .sro-user-panel .legacy-notif-badge--inline {
  margin-left: 4px !important;
}

.legacy-sidebar .sro-user-panel__notif-count {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  margin-left: auto !important;
  margin-right: 6px !important;
  padding: 0 6px !important;
  border-radius: 11px !important;
  background: #e11d2e !important;
  border: 2px solid #fff3a0 !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 12px rgba(225, 29, 46, 0.65) !important;
  animation: jgNotifPulse 1.8s ease-in-out infinite !important;
}

@keyframes jgNotifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.legacy-sidebar .sro-user-panel__link--notif {
  position: relative !important;
}

.legacy-sidebar .sro-user-panel__link--notif .sro-user-panel__link-icon {
  color: #c9a24a !important;
}

.legacy-sidebar .sro-user-panel__link--notif .sro-user-panel__chevron {
  margin-left: 0 !important;
}

.legacy-sidebar .sro-user-panel__link--notif .sro-user-panel__link-title {
  flex: 1 1 auto !important;
}

@media (max-width: 768px) {
  .legacy-sidebar .sro-user-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px 0 12px !important;
  }

  .legacy-sidebar .sro-user-panel__frame {
    padding: 16px 12px 14px !important;
  }

  .legacy-sidebar .sro-user-panel__balance,
  .legacy-sidebar .sro-user-panel__link {
    width: 100% !important;
  }

  .legacy-sidebar .sro-user-panel__welcome {
    font-size: 13px !important;
  }

  .legacy-sidebar .sro-user-panel__link-title,
  .legacy-sidebar .sro-user-panel__balance-label {
    font-size: 12px !important;
  }
}
