.badges-workspace {
  padding: 42px clamp(22px, 3vw, 46px) 46px;
}

.badge-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.badge-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 23px;
  font-weight: 850;
  padding: 0;
}

.badge-filter-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-save-status {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(64, 214, 111, 0.22);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(64, 214, 111, 0.08);
  color: #bdf7ce;
  font-size: 12px;
  font-weight: 850;
}

.badge-preview-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 14px 16px;
  background: #111111;
}

.badge-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-preview-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.badge-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-profile-card strong,
.badge-profile-card span {
  display: block;
}

.badge-profile-card strong {
  color: #ffffff;
  font-size: 17px;
}

.badge-profile-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.active-badge-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.active-badge-preview span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.active-badge-preview .real-badge-token {
  border-color: color-mix(in srgb, var(--badge-bg) 42%, rgba(255, 255, 255, 0.12));
  padding-left: 5px;
}

.real-badge-token i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--badge-bg);
}

.real-badge-token svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.real-badge-token .discord-logo-svg {
  width: 15px;
  height: 12px;
  fill: #ffffff;
  stroke: none;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 14px;
}

.badge-card {
  min-height: 84px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 14px 16px;
  background: #111111;
  position: relative;
  overflow: hidden;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.badge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 6% 50%, var(--badge-glow), transparent 30%);
  opacity: 0.34;
  pointer-events: none;
}

.badge-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--badge-bg) 34%, rgba(255, 255, 255, 0.12));
  background: #141414;
}

.badge-card.is-locked {
  opacity: 0.72;
}

.badge-card > * {
  position: relative;
  z-index: 1;
}

.badge-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--badge-bg);
  filter:
    drop-shadow(0 0 8px var(--badge-glow))
    drop-shadow(0 0 14px var(--badge-glow));
}

.badge-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-icon .discord-logo-svg {
  width: 27px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.badge-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.08;
}

.badge-card p {
  margin: 5px 0 0;
  color: #b8b0bd;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
}

.badge-card-footer {
  justify-self: end;
}

.badge-toggle {
  min-width: 130px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 0 16px;
  background: #1a1a1a;
  color: #ffffff;
  font-weight: 800;
}

.badge-toggle.is-active {
  border-color: rgba(64, 214, 111, 0.35);
  background: rgba(64, 214, 111, 0.16);
}

.badge-toggle:disabled {
  color: rgba(255, 255, 255, 0.48);
  cursor: not-allowed;
}

.custom-badges-panel,
.premium-badge-banner {
  margin-top: 36px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  padding: 24px;
  background: #111111;
}

.custom-badges-panel h2,
.premium-badge-banner h2 {
  margin: 0;
  color: #ffffff;
  font-size: 23px;
}

.custom-badges-panel h2 span {
  display: inline-grid;
  place-items: center;
  min-height: 29px;
  margin-left: 8px;
  border: 1px solid rgba(217, 86, 212, 0.55);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(217, 86, 212, 0.24);
  color: #ffffff;
  font-size: 14px;
  vertical-align: middle;
}

.custom-badges-panel p,
.premium-badge-banner p {
  max-width: 980px;
  margin: 10px 0 0;
  color: #b8b0bd;
  font-size: 15px;
  font-weight: 650;
}

.custom-badge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.custom-badge-actions button,
.premium-badge-banner button {
  min-width: 232px;
  min-height: 42px;
  border: 1px solid rgba(217, 86, 212, 0.55);
  border-radius: 999px;
  background: rgba(96, 28, 105, 0.7);
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
}

.custom-badge-actions button:last-child {
  min-width: 200px;
  border-color: rgba(255, 255, 255, 0.075);
  background: #1a1a1a;
}

.premium-badge-banner {
  min-height: 150px;
  background:
    radial-gradient(circle at 8% 15%, rgba(217, 86, 212, 0.22), transparent 26%),
    radial-gradient(circle at 88% 38%, rgba(217, 86, 212, 0.16), transparent 28%),
    #27162b;
  border-color: rgba(217, 86, 212, 0.42);
}

.premium-badge-banner button {
  min-width: 138px;
  margin-top: 22px;
  border-color: rgba(255, 255, 255, 0.075);
  background: #151515;
}

.badge-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: 330px;
  border: 1px solid rgba(64, 214, 111, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  background: #101912;
  color: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.badge-toast[hidden] {
  display: none !important;
}

@media (max-width: 1280px) {
  .badge-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 820px) {
  .badges-workspace {
    padding: 24px 16px;
  }

  .badge-library-header,
  .badge-preview-panel {
    display: grid;
  }

  .badge-grid {
    grid-template-columns: 1fr;
  }

  .badge-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .badge-card-footer {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .badge-toggle {
    width: 100%;
  }

  .active-badge-preview {
    justify-content: flex-start;
  }
}
