.portal-body {
  min-height: 100vh;
  margin: 0;
  background: #0f1013;
  color: #fff;
  font-family: var(--font-inter), Inter, "Inter Fallback", Arial, sans-serif;
}

.portal-topbar {
  padding: 48px 24px 0;
}

.portal-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(100%, 1260px);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 16px;
  background: #101115;
  box-shadow: 0 14px 40px rgb(0 0 0 / 18%);
}

.portal-logo {
  display: inline-flex;
  align-items: center;
  width: 146px;
}

.portal-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.portal-nav a {
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.portal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.portal-button.subtle {
  border: 1px solid #34363d;
  background: #24252a;
}

.portal-button.orange,
.discord-login,
.vip-button,
.small-credit-button {
  border: 1px solid #e38a16;
  background: linear-gradient(90deg, #f18d12, #b9700e);
}

.logout-link {
  display: none;
}

.portal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 1260px);
  margin: 36px auto 0;
  padding: 0 0 32px;
}

.portal-sidebar {
  min-height: 820px;
  padding: 16px;
  border-radius: 10px;
  background: #111216;
}

.player-card {
  padding: 16px;
  border-radius: 7px;
  background: #202025;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
}

.player-row strong {
  font-size: 14px;
  line-height: 1.25;
}

.credit-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 28px 0 28px;
}

.coin {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 30%, #ffe994 0 18%, transparent 19%),
    linear-gradient(135deg, #f7d84e, #ca8c00);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 22%);
}

.credit-row strong {
  font-size: 14px;
}

.small-credit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.vip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.side-section {
  margin-top: 18px;
}

.side-section h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.side-link {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.side-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.side-link.active {
  background: #242428;
}

.side-link.disabled {
  cursor: default;
}

.side-link:hover {
  background: #202126;
}

.count-pill {
  min-width: 22px;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2b2c31;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.profile-panel {
  min-height: 820px;
  padding: 28px 24px;
  border-radius: 10px;
  background: #0c0d10;
}

.profile-panel h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.panel-rule {
  height: 1px;
  margin-top: 24px;
  background: #1f2025;
}

.profile-error {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  text-align: center;
}

.profile-error strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.2;
}

.profile-error span {
  color: #fff;
  font-size: 16px;
}

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 112px);
  padding: 40px 24px;
}

.login-card {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid #202126;
  border-radius: 10px;
  background: #101115;
  box-shadow: 0 20px 60px rgb(0 0 0 / 24%);
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  color: #cfd1d6;
  font-size: 13px;
  background: rgb(255 255 255 / 7%);
}

.login-card h1 {
  margin: 22px 0 12px;
  color: #fff;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
}

.login-card p {
  margin: 0;
  color: #b7b9c0;
  line-height: 1.7;
}

.discord-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 26px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.discord-login[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .7;
}

.discord-login svg {
  width: 22px;
  height: 22px;
  margin-right: 10px;
}

.login-message {
  display: none;
  margin-top: 18px !important;
  padding: 12px;
  border: 1px solid #2d3038;
  border-radius: 8px;
  color: #dfe1e6 !important;
  background: #17181d;
  font-size: 14px;
}

.login-message.visible {
  display: block;
}

.login-message.error {
  border-color: rgb(241 141 18 / 42%);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 22px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  background: #242428;
}

.panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading-row h1 {
  margin: 0;
}

.muted-text {
  margin: 26px 0 0;
  color: #aeb4c2;
  font-size: 14px;
}

.portal-notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #2d3038;
  border-radius: 8px;
  color: #dfe1e6;
  background: #121319;
}

.portal-notice.error {
  border-color: rgb(241 141 18 / 42%);
  color: #ffd972;
}

.outline-button,
.orange-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.outline-button {
  border: 1px solid #363941;
  background: #1b1c21;
}

.orange-action {
  border: 1px solid #e38a16;
  background: linear-gradient(90deg, #f18d12, #b9700e);
}

.portal-input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #373943;
  border-radius: 7px;
  color: #fff;
  background: #1a1b20;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
}

.portal-input::placeholder {
  color: #717783;
}

.shop-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 260px) 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: -50px;
  margin-left: 230px;
}

.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 7px;
  background: #202025;
}

.shop-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 0 12px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.shop-tabs button.active {
  color: #111216;
  background: #fff;
}

.shop-tabs.compact {
  margin-left: auto;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.shop-card,
.crate-card,
.history-panel,
.empty-panel,
.invite-card,
.list-panel article,
.faction-grid article {
  border: 1px solid rgb(255 255 255 / 4%);
  border-radius: 8px;
  background: #111218;
}

.shop-card {
  display: block;
  padding: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
}

.shop-card:hover {
  border-color: rgb(241 141 18 / 42%);
  transform: translateY(-1px);
}

.shop-image {
  overflow: hidden;
  min-height: 235px;
  border-bottom: 6px solid #050506;
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(circle at 70% 42%, rgb(255 255 255 / 40%), transparent 17%),
    linear-gradient(135deg, #cad7ff, #26324f 45%, #111216);
}

.shop-image img,
.product-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-image.car-1 {
  background:
    radial-gradient(circle at 58% 42%, rgb(255 255 255 / 34%), transparent 18%),
    linear-gradient(135deg, #b8cdfa, #1d2a42 42%, #111216);
}

.shop-image.car-2 {
  background:
    radial-gradient(circle at 48% 52%, rgb(255 255 255 / 34%), transparent 20%),
    linear-gradient(135deg, #93a6cb, #28374f 44%, #111216);
}

.shop-image.car-3 {
  background:
    radial-gradient(circle at 58% 52%, rgb(255 255 255 / 28%), transparent 20%),
    linear-gradient(135deg, #4f6a8e, #172233 44%, #111216);
}

.shop-info {
  padding: 18px 16px;
}

.shop-info span {
  color: #dbe0ed;
  font-size: 13px;
}

.shop-info h2 {
  margin: 3px 0 12px;
  font-size: 20px;
}

.shop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.shop-tags b,
.shop-tags em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #bfc5d2;
  background: #181a21;
  font-size: 12px;
  font-style: normal;
}

.shop-tags b {
  color: #fff;
  background: #24b349;
}

.shop-info p {
  color: #aeb4c2;
  font-size: 13px;
  line-height: 1.5;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(0 0 0 / 72%);
}

.product-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(280px, 420px);
  gap: 22px;
  width: min(100%, 980px);
  padding: 18px;
  border: 1px solid #2e3139;
  border-radius: 10px;
  background: #101116;
  box-shadow: 0 24px 90px rgb(0 0 0 / 50%);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #24252b;
  font-size: 22px;
  cursor: pointer;
}

.product-preview-image {
  min-height: 320px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #cad7ff, #26324f 45%, #111216);
}

.product-preview-info {
  padding: 22px 12px 12px;
}

.product-preview-info > span {
  color: #b6bdcb;
  font-size: 14px;
}

.product-preview-info h2 {
  margin: 6px 0 16px;
  font-size: 30px;
}

.product-preview-info p {
  color: #c5cbda;
  line-height: 1.65;
}

.paypal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  border: 1px solid #ffc439;
  border-radius: 8px;
  color: #111216;
  background: #ffc439;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.paypal-button:disabled {
  cursor: wait;
  opacity: .75;
}

.payment-status {
  min-height: 22px;
  margin-top: 12px;
  color: #ffd972 !important;
  font-size: 13px;
}

.payment-result {
  width: min(100%, 620px);
  margin: 16vh auto;
  padding: 28px;
  border: 1px solid #242630;
  border-radius: 10px;
  background: #101116;
  text-align: center;
}

.payment-result h1 {
  margin: 0 0 12px;
}

.payment-result p {
  color: #c5cbda;
}

.application-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.application-row {
  padding: 16px;
  border: 1px solid #242630;
  border-radius: 8px;
  background: #111218;
}

.application-row strong {
  color: #fff;
  font-size: 17px;
}

.application-row p,
.application-row small {
  display: block;
  margin: 7px 0 0;
  color: #aeb4c2;
}

.section-subtitle {
  display: flex;
  align-items: center;
  margin: 30px 0 18px;
  font-size: 21px;
}

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

.crate-card {
  color: inherit;
  font: inherit;
  padding: 24px;
  text-align: center;
}

.crate-buy-card {
  cursor: pointer;
}

.crate-buy-card:hover {
  border-color: rgb(241 141 18 / 42%);
  transform: translateY(-1px);
}

.crate-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 156px;
  border-radius: 7px;
  color: #f18d12;
  font-size: 56px;
  font-weight: 900;
  background: linear-gradient(135deg, #1d1e24, #101116);
}

.crate-art.crate-preview {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.crate-art.crate-2,
.crate-art.crate-5 {
  color: #25c34d;
}

.crate-art.crate-4 {
  color: #9237ff;
}

.crate-card h2 {
  min-height: 48px;
  margin: 18px 0 10px;
  font-size: 19px;
}

.crate-card p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.coin.tiny {
  width: 15px;
  height: 15px;
}

.empty-panel {
  margin-top: 24px;
  padding: 36px;
  text-align: center;
}

.empty-panel h2 {
  margin: 0 0 8px;
  color: #c8cdd7;
  font-size: 24px;
}

.empty-panel p,
.history-panel p {
  margin: 0;
  color: #d6d9e0;
}

.history-panel {
  margin-top: 24px;
  padding: 26px 24px;
}

.history-panel > span {
  color: #9ea6b6;
  font-size: 14px;
}

.history-panel h2 {
  margin: 4px 0 16px;
  font-size: 24px;
}

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

.history-grid article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid #292b33;
  border-radius: 8px;
  background: #18191e;
}

.history-thumb,
.faction-thumb {
  border-radius: 5px;
  background: linear-gradient(135deg, #39455f, #14151b);
}

.history-grid h3 {
  margin: 4px 0 10px;
  font-size: 18px;
}

.history-grid small,
.history-grid p {
  color: #bac0ce;
  font-size: 13px;
}

.leader-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
}

.leader-table th,
.leader-table td {
  padding: 16px 20px;
  color: #fff;
  text-align: left;
  vertical-align: middle;
}

.leader-table th {
  color: #b7becd;
  font-size: 14px;
  font-weight: 500;
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #25272e;
}

.rank-1 { background: linear-gradient(135deg, #ffdf49, #a67700); }
.rank-2 { background: linear-gradient(135deg, #bfc3cc, #5b6068); }
.rank-3 { background: linear-gradient(135deg, #ff7c34, #8d360e); }

.blur-name {
  display: block;
  width: 170px;
  height: 20px;
  border-radius: 999px;
  filter: blur(10px);
  background: #343842;
}

.blank-space {
  min-height: 560px;
}

.list-panel {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.list-panel article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px;
}

.status-pill {
  display: inline-flex;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  background: #d93232;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.green {
  background: #22bb35;
}

.list-panel strong,
.faction-grid strong {
  color: #fff;
  font-size: 18px;
}

.list-panel p,
.faction-grid p {
  margin: 8px 0 0;
  color: #c4cada;
  font-size: 14px;
}

.appeal-form {
  display: grid;
  gap: 24px;
  width: min(100%, 656px);
  margin: 0 auto;
}

.appeal-form label {
  display: grid;
  gap: 9px;
  color: #fff;
  font-weight: 800;
}

.appeal-form textarea {
  min-height: 138px;
  padding-top: 12px;
  resize: vertical;
}

.breadcrumb-arrow {
  color: #c8cdd7;
  padding: 0 16px;
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.faction-grid article {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 24px 16px;
}

.faction-thumb {
  min-height: 34px;
}

.invite-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 30px;
}

.invite-summary-grid article {
  display: grid;
  grid-template-columns: 52px 1fr auto auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border-radius: 8px;
  background: #111218;
}

.summary-icon,
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid #3b3d47;
  border-radius: 8px;
  color: #fff;
  background: #24252b;
}

.icon-action {
  width: 34px;
  height: 34px;
  border: 0;
  cursor: pointer;
}

.invite-summary-grid strong {
  display: block;
  font-size: 18px;
}

.invite-summary-grid p {
  margin: 4px 0 0;
  color: #fff;
  font-size: 14px;
}

.invite-card {
  margin-top: 32px;
  padding: 24px;
}

.invite-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.orange-text {
  color: #f18d12;
  margin-right: 8px;
}

.reward-track {
  position: relative;
  height: 4px;
  margin: 34px 0 14px;
  background: #1b1c21;
}

.reward-track span {
  display: block;
  height: 100%;
  background: #f18d12;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.reward-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #9097a7;
  text-align: center;
}

.reward-dot {
  position: absolute;
  top: -28px;
  width: 24px;
  height: 24px;
  border: 3px solid #2b2d35;
  border-radius: 999px;
  background: #111218;
}

.reward-step.unlocked .reward-dot {
  border-color: #f18d12;
}

.reward-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #292b33;
  border-radius: 4px;
  color: #dfe3ec;
  background: #17181e;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.reward-button.locked,
.reward-button.claimed {
  cursor: default;
}

.reward-button.claimed {
  color: #7fe08e;
}

.redeem-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.yellow-note {
  margin: 14px 0 0;
  color: #ffe600;
  font-size: 13px;
  font-weight: 700;
}

.member-list {
  display: grid;
  gap: 10px;
}

.member-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #242630;
  border-radius: 8px;
}

.member-row img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.member-row span {
  display: block;
  margin-top: 3px;
  color: #aab1c0;
  font-size: 12px;
}

@media (max-width: 980px) {
  .portal-topbar {
    padding-top: 16px;
  }

  .portal-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .portal-nav,
  .portal-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .portal-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }

  .portal-sidebar,
  .profile-panel {
    min-height: auto;
  }

  .shop-toolbar {
    grid-template-columns: 1fr;
    margin: 22px 0 0;
  }

  .shop-grid,
  .crate-grid,
  .history-grid,
  .reward-grid,
  .faction-grid,
  .invite-summary-grid {
    grid-template-columns: 1fr;
  }

  .product-dialog {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow: auto;
  }

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

@media (max-width: 560px) {
  .portal-nav {
    gap: 14px;
  }

  .portal-button {
    width: 100%;
  }

  .portal-actions {
    width: 100%;
  }

  .login-card {
    padding: 24px;
  }
}
