:root {
  color-scheme: dark;
  --ink: #f8f4ff;
  --muted: #aaa1b8;
  --surface: #1d1828;
  --surface-2: #241d31;
  --stroke: #3b314b;
  --purple: #9861d7;
  --purple-light: #c5a0f2;
}

body {
  min-height: 100vh;
  background: #13101b;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.d-none {
  display: none !important;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
  background: radial-gradient(ellipse at 75% 15%, #55367555, transparent 38%), #13101b;
}

.auth-card {
  width: min(100%, 460px);
  padding: 38px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: #1a1523ed;
  box-shadow: 0 24px 80px #08060d77;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #b17bea, #634095);
  color: white;
  font-weight: 900;
  font-size: 24px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--purple-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.auth-card > .eyebrow {
  margin-top: 24px;
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 9vw, 50px);
  font-weight: 850;
  letter-spacing: -.06em;
  line-height: .98;
}

.auth-card h1 span,
.welcome-banner h2 span {
  color: var(--purple-light);
}

.auth-tabs {
  gap: 8px;
  margin-top: 26px;
  border-bottom: 1px solid var(--stroke);
  border-radius: 0;
}

.auth-tabs .nav-link {
  color: var(--muted);
  border-radius: 10px 10px 0 0;
}

.auth-tabs .nav-link.active,
.nav-pills .nav-link.active {
  background: #422f58;
  color: white;
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: var(--stroke);
  background-color: #171320;
  color: var(--ink);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--purple-light);
  background-color: #171320;
  color: var(--ink);
  box-shadow: 0 0 0 .2rem #9861d744;
}

.form-control::placeholder {
  color: #827990;
}

.form-label {
  color: #ded7e8;
  font-size: 13px;
}

.btn-purple {
  border: 1px solid #a879e0;
  background: linear-gradient(135deg, #9c66db, #7444ad);
  color: #fff;
  font-weight: 700;
}

.btn-purple:hover,
.btn-purple:focus {
  border-color: #c3a0ee;
  background: linear-gradient(135deg, #ac79e9, #8050b9);
  color: white;
}

.btn-outline-light {
  border-color: #675875;
  color: #eee6f7;
}

.btn-discord {
  border: 1px solid #7684ff;
  background: #5865f2;
  color: #fff;
  font-weight: 750;
}

.btn-discord:hover,
.btn-discord:focus {
  border-color: #aeb6ff;
  background: #4752c4;
  color: #fff;
}

.discord-icon {
  margin-right: 8px;
  font-size: 18px;
  vertical-align: -1px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--stroke);
  content: "";
}

.discord-account-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--stroke);
  background: #181421;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 34px 4px;
  color: var(--ink);
  text-decoration: none;
}

.brand-lockup .brand-mark {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.brand-lockup strong,
.brand-lockup small,
.user-label strong,
.user-label small {
  display: block;
}

.brand-lockup strong {
  font-size: 12px;
  letter-spacing: .12em;
}

.brand-lockup small,
.user-label small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.sidebar .nav {
  gap: 4px;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: #c0b7ce;
  text-align: left;
  border-radius: 9px;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #31243f;
  color: white;
}

.nav-icon {
  width: 20px;
  color: var(--purple-light);
  font-size: 18px;
  text-align: center;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px 4px 0;
  border-top: 1px solid var(--stroke);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #775298;
  border-radius: 12px;
  background: #3a2a4c;
  color: #e4caff;
  font-size: 12px;
  font-weight: 800;
}

.user-label {
  min-width: 0;
  flex: 1;
}

.user-label strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--stroke);
  background: #171320;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.03em;
}

.page-content {
  width: min(1180px, 100%);
  margin: auto;
  padding: 32px clamp(20px, 4vw, 54px) 70px;
}

.welcome-banner {
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 34px 40px;
  border: 1px solid #624779;
  border-radius: 20px;
  background: radial-gradient(circle at 83% 46%, #8e4fd150, transparent 32%), linear-gradient(110deg, #352342, #1c1725);
}

.welcome-banner h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 850;
  letter-spacing: -.055em;
  line-height: 1;
}

.welcome-banner p:not(.eyebrow) {
  margin: 14px 0 20px;
  color: #c7bdd1;
}

.banner-mark {
  padding-right: 7%;
  color: #d5b5fa34;
  font-size: clamp(100px, 18vw, 190px);
  font-weight: 950;
  line-height: 1;
  transform: rotate(-9deg);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.metric-card,
.card-panel {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--surface);
}

.metric-card {
  position: relative;
  min-height: 142px;
  padding: 18px;
}

.metric-icon {
  position: absolute;
  top: 16px;
  right: 17px;
  color: var(--purple-light);
  font-size: 19px;
}

.metric-card p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.content-grid,
.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card-panel {
  padding: 22px;
}

.card-panel h2,
.page-intro h2,
.section-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.035em;
}

.card-panel h3 {
  margin: 0 0 16px;
  font-size: 17px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading .btn-link {
  color: var(--purple-light);
  font-size: 13px;
  text-decoration: none;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #352d40;
}

.round-icon,
.event-mini-date,
.rank-level {
  width: 39px;
  height: 39px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: #362646;
  color: #d4b2f4;
  font-weight: 800;
}

.row-copy {
  min-width: 0;
  flex: 1;
}

.row-copy strong,
.row-copy small {
  display: block;
}

.row-copy strong {
  font-size: 13px;
}

.row-copy small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
}

.xp-tag {
  color: #c9a4f0;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.approval-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
}

.approval-strip strong,
.approval-strip span {
  display: block;
}

.approval-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.inline-compose {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.feed-post {
  display: flex;
  gap: 12px;
  padding: 17px 0;
  border-top: 1px solid #352d40;
}

.post-content {
  min-width: 0;
  flex: 1;
}

.post-byline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.post-byline strong {
  font-size: 13px;
}

.post-byline small {
  color: var(--muted);
  font-size: 10px;
}

.post-content p {
  margin: 8px 0;
  color: #ded7e7;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.like-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
}

.like-button.liked {
  color: #ef91ba;
}

.page-intro {
  margin: 0 0 22px;
}

.page-intro h2 {
  font-size: clamp(26px, 4vw, 35px);
}

.page-intro > p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.progress-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 17px;
}

.progress-summary strong {
  color: var(--purple-light);
  font-size: 21px;
}

.progress-summary span,
.attendee-count {
  color: var(--muted);
  font-size: 12px;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-chip {
  padding: 7px 13px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: transparent;
  color: #c8bfd3;
  font-size: 12px;
}

.filter-chip.selected {
  border-color: #9861d7;
  background: #422f58;
  color: white;
}

.member-grid,
.product-grid,
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--surface);
}

.member-card .avatar {
  width: 48px;
  height: 48px;
}

.member-card h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.member-card p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
}

.badge-soft {
  border: 1px solid #674988;
  background: #372649;
  color: #d8b7f8;
  font-size: 10px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #352d40;
}

.rank-row strong,
.rank-row small {
  display: block;
}

.rank-row strong {
  font-size: 13px;
}

.rank-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.rank-level {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.application-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid #352d40;
}

.application-row:first-child {
  border-top: 0;
}

.application-meta {
  color: var(--purple-light);
  font-size: 11px;
  font-weight: 700;
}

.application-row h3 {
  margin: 5px 0;
}

.application-row h3 small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.application-row p {
  margin: 0;
  color: #d1c8dc;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.application-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}

.form-grid .form-label {
  margin: 0;
}

.form-grid .form-control,
.form-grid .form-select {
  margin-top: 6px;
}

.form-span {
  grid-column: 1 / -1;
}

.event-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.event-date-block {
  width: 57px;
  height: 65px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #654683;
  border-radius: 11px;
  background: #362646;
}

.event-date-block strong {
  font-size: 22px;
  line-height: 1;
}

.event-date-block span {
  margin-top: 4px;
  color: #d1b4ed;
  font-size: 11px;
}

.event-copy {
  min-width: 0;
  flex: 1;
}

.event-copy .eyebrow {
  font-size: 9px;
}

.event-copy h3 {
  margin: 0;
  font-size: 16px;
}

.event-copy p:not(.eyebrow) {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.event-copy small {
  color: #cfb2ed;
  font-size: 10px;
}

.event-mini-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.event-mini-date strong {
  font-size: 15px;
}

.event-mini-date small {
  font-size: 10px;
}

.store-hero {
  margin-bottom: 20px;
  padding: 30px;
  border: 1px solid #624779;
  border-radius: 18px;
  background: radial-gradient(circle at 82% 40%, #8e4fd145, transparent 30%), #261d32;
}

.store-hero h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 43px);
  font-weight: 850;
  letter-spacing: -.05em;
}

.store-hero p:not(.eyebrow) {
  max-width: 600px;
  color: #c6bccf;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--surface);
}

.product-art {
  height: 130px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 70%, #8957ba50, transparent 50%), #282033;
  color: #d3b6f1;
  font-size: 60px;
}

.product-info {
  padding: 17px;
}

.product-info .eyebrow {
  font-size: 9px;
}

.product-info h3 {
  margin: 4px 0;
  font-size: 16px;
}

.product-info p {
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
}

.product-info > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-info > div strong {
  font-size: 14px;
}

.cart-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #352d40;
  font-size: 12px;
}

.cart-row span {
  flex: 1;
  overflow-wrap: anywhere;
}

.cart-row small {
  color: var(--muted);
}

.cart-row strong {
  white-space: nowrap;
}

.social-banner {
  margin-bottom: 18px;
}

.card-panel > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.profile-card {
  max-width: 720px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--stroke);
}

.avatar-large {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  font-size: 19px;
}

.profile-head h2 {
  margin: 0 0 5px;
}

.profile-head p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.profile-form {
  display: grid;
  gap: 16px;
  max-width: 480px;
  margin-top: 20px;
}

.empty-state {
  padding: 22px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.alert {
  border-color: var(--stroke);
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .rank-grid,
  .member-grid,
  .product-grid,
  .event-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-layout {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
  }

  .brand-lockup {
    margin: 0 0 10px;
  }

  .sidebar .nav {
    display: flex;
    flex-direction: row !important;
    overflow-x: auto;
    gap: 4px;
  }

  .sidebar .nav-link {
    flex: 0 0 auto;
    gap: 7px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .nav-icon {
    width: auto;
  }

  .sidebar-user {
    position: absolute;
    top: 13px;
    right: 12px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .sidebar-user .avatar,
  .user-label {
    display: none;
  }

  .topbar {
    min-height: 70px;
    padding: 14px 18px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar .btn {
    padding: 7px 9px;
    font-size: 11px;
  }

  .page-content {
    padding: 20px 15px 45px;
  }

  .welcome-banner {
    min-height: 230px;
    padding: 25px;
  }

  .banner-mark {
    margin-right: -20px;
    padding: 0;
    font-size: 92px;
  }

  .metrics-grid {
    gap: 9px;
  }

  .metric-card {
    min-height: 126px;
    padding: 14px;
  }

  .card-panel {
    padding: 17px;
  }

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

  .form-span {
    grid-column: auto;
  }

  .application-row,
  .event-card {
    flex-direction: column;
  }

  .application-actions {
    width: 100%;
  }

  .event-card > .btn {
    align-self: stretch;
  }

  .inline-compose {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-row {
    flex-wrap: wrap;
  }

  .auth-card {
    padding: 28px 23px;
  }
}
